XEmacs 21.4.11 "Native Windows TTY Support".
[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=''
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_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 | moduledir )
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                         "")                                             val=yes    ;;
746             g | gt | gtk )                              val=gtk    ;;
747             ms | msw )                                  val=msw    ;;
748             * ) (echo "$progname: Usage error:"
749 echo " " "The \`--$optname' option must have one of these values:
750   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752           esac
753           eval "$opt=\"$val\""
754         ;;
755
756                 "use_minimal_tagbits" | \
757         "use_indexed_lrecord_implementation" | \
758         "run_in_place"  | \
759         "const_is_losing" | \
760         "with_gnu_make" )
761           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
762         ;;
763
764                 * ) (echo "$progname: Usage error:"
765 echo " " "Unrecognized option: $arg"
766 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
767
768       esac
769     ;;
770
771         *-*-*) configuration="$arg" ;;
772
773         *) (echo "$progname: Usage error:"
774 echo " " "Unrecognized argument: $arg"
775 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
776
777   esac
778 done
779
780
781 test -n "$cpp"      && CPP="$cpp"
782 test -n "$cppflags" && CPPFLAGS="$cppflags"
783 test -n "$libs"     && LIBS="$libs"
784 test -n "$ldflags"  && LDFLAGS="$ldflags"
785
786 eval set x "$quoted_arguments"; shift
787
788 test "$extra_verbose" = "yes" && verbose=yes
789
790 test -n "$with_x" && with_x11="$with_x"
791
792 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
793   test "$with_system_malloc" = "default" && with_system_malloc=yes
794 fi
795
796
797
798 if test "$with_cde $with_tooltalk" = "yes no"; then
799   (echo "$progname: Usage error:"
800 echo " " "--with-cde requires --with-tooltalk"
801 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
802 elif test "$with_tooltalk" = "no" ; then with_cde=no
803 elif test "$with_cde" = "yes"; then with_tooltalk=yes
804 fi
805
806
807 case "$srcdir" in
808
809     "" )
810     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
811       if test -f "$dir/src/lisp.h" -a \
812               -f "$dir/lisp/version.el" ; then
813         srcdir="$dir"
814         break
815       fi
816     done
817     if test -z "$srcdir" ; then
818       (echo "$progname: Usage error:"
819 echo " " "Neither the current directory nor its parent seem to
820   contain the XEmacs sources.  If you do not want to build XEmacs in its
821   source tree, you should run \`$progname' in the directory in which
822   you wish to build XEmacs, using the \`--srcdir' option to say where the
823   sources may be found."
824 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
825     fi
826   ;;
827
828     * )
829     if test ! -f "$srcdir/src/lisp.h" -o \
830             ! -f "$srcdir/lisp/version.el" ; then
831       (echo "$progname: Usage error:"
832 echo " " "The directory specified with the \`--srcdir' option,
833   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
834   either run the \`$progname' script at the top of the XEmacs source
835   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837     fi
838   ;;
839 esac
840
841 if test -z "$configuration"; then
842     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
843   if test -z "$configuration"; then
844     (echo "$progname: Usage error:"
845 echo " " "XEmacs has not been ported to this host type.
846 Try explicitly specifying the CONFIGURATION when rerunning configure."
847 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
848   fi
849 fi
850
851 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
852 echo "configure:853: checking whether ln -s works" >&5
853
854 rm -f conftestdata
855 if ln -s X conftestdata 2>/dev/null
856 then
857   rm -f conftestdata
858   ac_cv_prog_LN_S="ln -s"
859 else
860   ac_cv_prog_LN_S=ln
861 fi
862 LN_S="$ac_cv_prog_LN_S"
863 if test "$ac_cv_prog_LN_S" = "ln -s"; then
864   echo "$ac_t""yes" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869
870 for dir in lisp etc man info tests; do
871   if test ! -d "$dir" ; then
872     echo Making symbolic link to "$srcdir/$dir"
873     ${LN_S} "$srcdir/$dir" "$dir"
874   fi
875 done
876
877
878 absolute_pwd="`pwd`";
879 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
880 then blddir="$PWD"
881 else blddir="$absolute_pwd"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   blddir=`echo "$blddir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi
886 fi
887
888
889 case "$srcdir" in
890   /* ) ;;
891   .  ) srcdir="$blddir" ;;
892   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
893   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
894   srcdir=`echo "$srcdir" | \
895    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
896 fi ;;
897 esac
898
899 if test `pwd` != `sh -c cd $srcdir && pwd`  \
900    && test -f "$srcdir/src/config.h"; then
901   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
902    echo "   as a build directory right now; it has been configured in its own"
903    echo "   right.  To configure in another directory as well, you MUST"
904    echo "   use GNU make.  If you do not have GNU make, then you must"
905    echo "   now do \`make distclean' in $srcdir,"
906    echo "   and then run $progname again.") >&2
907   extrasub='/^VPATH[     ]*=/c\
908 vpath %.c $(srcdir)\
909 vpath %.h $(srcdir)\
910 vpath %.y $(srcdir)\
911 vpath %.l $(srcdir)\
912 vpath %.s $(srcdir)\
913 vpath %.in $(srcdir)'
914 fi
915
916 . "$srcdir/version.sh" || exit 1;
917 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
918 : "${extra_verbose=$beta}"
919 version="${emacs_major_version}.${emacs_minor_version}"
920 { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_MAJOR_VERSION = $emacs_major_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_MAJOR_VERSION $emacs_major_version
925 EOF
926 }
927
928 { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_MINOR_VERSION = $emacs_minor_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_MINOR_VERSION $emacs_minor_version
933 EOF
934 }
935
936 if test -n "$emacs_beta_version" ; then
937   if test "$beta" = "yes"; then
938         version="${version}-b${emacs_beta_version}"
939         { test "$extra_verbose" = "yes" && cat << EOF
940     Defining EMACS_BETA_VERSION = $emacs_beta_version
941 EOF
942 cat >> confdefs.h <<EOF
943 #define EMACS_BETA_VERSION $emacs_beta_version
944 EOF
945 }
946
947   else
948         version="${version}.${emacs_beta_version}"
949         { test "$extra_verbose" = "yes" && cat << EOF
950     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
951 EOF
952 cat >> confdefs.h <<EOF
953 #define EMACS_PATCH_LEVEL $emacs_beta_version
954 EOF
955 }
956
957   fi
958 fi
959 { test "$extra_verbose" = "yes" && cat << EOF
960     Defining XEMACS_CODENAME = "$xemacs_codename"
961 EOF
962 cat >> confdefs.h <<EOF
963 #define XEMACS_CODENAME "$xemacs_codename"
964 EOF
965 }
966
967 { test "$extra_verbose" = "yes" && cat << EOF
968     Defining EMACS_VERSION = "$version"
969 EOF
970 cat >> confdefs.h <<EOF
971 #define EMACS_VERSION "$version"
972 EOF
973 }
974
975
976 if test "$with_infodock" = "yes"; then
977   if test ! -f ../../ID-INSTALL; then
978     echo "Cannot build InfoDock without InfoDock sources"
979     with_infodock=no
980   fi
981 fi
982
983 if test "$with_infodock" = "yes"; then
984       { test "$extra_verbose" = "yes" && cat << EOF
985     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
986 EOF
987 cat >> confdefs.h <<EOF
988 #define INFODOCK_MAJOR_VERSION $infodock_major_version
989 EOF
990 }
991
992   { test "$extra_verbose" = "yes" && cat << EOF
993     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
994 EOF
995 cat >> confdefs.h <<EOF
996 #define INFODOCK_MINOR_VERSION $infodock_minor_version
997 EOF
998 }
999
1000   { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define INFODOCK_BUILD_VERSION $infodock_build_version
1005 EOF
1006 }
1007
1008   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1009   PROGNAME=infodock
1010   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1011 else
1012   PROGNAME=xemacs
1013 fi
1014
1015 { test "$extra_verbose" = "yes" && cat << EOF
1016     Defining EMACS_PROGNAME = "$PROGNAME"
1017 EOF
1018 cat >> confdefs.h <<EOF
1019 #define EMACS_PROGNAME "$PROGNAME"
1020 EOF
1021 }
1022
1023
1024 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1025 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_EXTENTS
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_EXTENTS 1
1030 EOF
1031 }
1032
1033 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1034     Defining ERROR_CHECK_TYPECHECK
1035 EOF
1036 cat >> confdefs.h <<\EOF
1037 #define ERROR_CHECK_TYPECHECK 1
1038 EOF
1039 }
1040
1041 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1042     Defining ERROR_CHECK_BUFPOS
1043 EOF
1044 cat >> confdefs.h <<\EOF
1045 #define ERROR_CHECK_BUFPOS 1
1046 EOF
1047 }
1048
1049 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1050     Defining ERROR_CHECK_GC
1051 EOF
1052 cat >> confdefs.h <<\EOF
1053 #define ERROR_CHECK_GC 1
1054 EOF
1055 }
1056
1057 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1058     Defining ERROR_CHECK_MALLOC
1059 EOF
1060 cat >> confdefs.h <<\EOF
1061 #define ERROR_CHECK_MALLOC 1
1062 EOF
1063 }
1064
1065 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1066     Defining ERROR_CHECK_BYTE_CODE
1067 EOF
1068 cat >> confdefs.h <<\EOF
1069 #define ERROR_CHECK_BYTE_CODE 1
1070 EOF
1071 }
1072
1073 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1074     Defining ERROR_CHECK_GLYPHS
1075 EOF
1076 cat >> confdefs.h <<\EOF
1077 #define ERROR_CHECK_GLYPHS 1
1078 EOF
1079 }
1080
1081 if test "${debug:=$beta}" = "yes"; then
1082   use_assertions=yes memory_usage_stats=yes
1083   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1084    echo "    xemacs will be linked with \"debug.o\""
1085  fi
1086   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"tests.o\""
1088  fi
1089   { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining DEBUG_XEMACS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define DEBUG_XEMACS 1
1094 EOF
1095 }
1096
1097 fi
1098 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1099     Defining USE_ASSERTIONS
1100 EOF
1101 cat >> confdefs.h <<\EOF
1102 #define USE_ASSERTIONS 1
1103 EOF
1104 }
1105
1106 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1107     Defining MEMORY_USAGE_STATS
1108 EOF
1109 cat >> confdefs.h <<\EOF
1110 #define MEMORY_USAGE_STATS 1
1111 EOF
1112 }
1113
1114
1115
1116 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1117 echo "configure:1118: checking "host system type"" >&5
1118 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1119 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1120 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 echo "$ac_t""$configuration" 1>&6
1123
1124
1125
1126
1127
1128 machine='' opsys=''
1129
1130 case "$canonical" in
1131   sparc-*-*        ) machine=sparc ;;
1132   alpha*-*-*       ) machine=alpha ;;
1133   vax-*-*          ) machine=vax ;;
1134   mips-dec-*       ) machine=pmax ;;
1135   mips-sgi-irix6*  ) machine=iris6d ;;
1136   mips-sgi-*       ) machine=iris4d ;;
1137   mips*-linux      ) machine=mips ;;
1138   romp-ibm-*       ) machine=ibmrt ;;
1139   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1140   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1141   powerpc*-*       ) machine=powerpc ;;
1142   hppa-*-*         ) machine=hp800 ;;
1143   m88k-dg-*        ) machine=aviion ;;
1144   m68*-sony-*      ) machine=news ;;
1145   mips-sony-*      ) machine=news-risc ;;
1146   clipper-*        ) machine=clipper ;;
1147   arm*             ) machine=arm ;;
1148   ns32k-*          ) machine=ns32000 ;;
1149 esac
1150
1151 case "$canonical" in
1152   *-*-linux*    ) opsys=linux ;;
1153   *-*-netbsd*   ) opsys=netbsd ;;
1154   *-*-openbsd*  ) opsys=openbsd ;;
1155   *-*-nextstep* ) opsys=nextstep ;;
1156   *-*-vms       ) opsys=vms ;;
1157
1158     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1159   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1160   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1161   *-dec-osf3*                ) opsys=decosf3-1 ;;
1162   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1163
1164     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1165   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1166   *-*-ultrix* )         opsys=ultrix4-3 ;;
1167
1168     *-*-aix3.1*  ) opsys=aix3-1 ;;
1169   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1170   *-*-aix3*    ) opsys=aix3-2   ;;
1171   *-*-aix4.0*  ) opsys=aix4     ;;
1172   *-*-aix4.1*  ) opsys=aix4-1   ;;
1173   *-*-aix4*    ) opsys=aix4-2   ;;
1174
1175     *-gnu* )                    opsys=gnu    ;;
1176   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1177   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1178   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1179   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1180   *-*-aos*   )                  opsys=bsd4-3 ;;
1181   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1182   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1183   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1184   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1185   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1186   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1187         if test -z "$NON_GNU_CPP" ; then
1188           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1189             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1190           done
1191         fi
1192         opsys=usg5-4-2 ;;
1193     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1194     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1195 esac
1196
1197 case "$canonical" in
1198
1199     *-*-netbsd* )
1200     case "$canonical" in
1201       i[3-9]86-*-netbsd*) machine=intel386 ;;
1202       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1203                                             machine=hp9000s300 ;;
1204       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1205       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1206     esac
1207   ;;
1208
1209     *-*-openbsd* )
1210     case "${canonical}" in
1211       i386-*-openbsd*)          machine=intel386 ;;
1212       m68k-*-openbsd*)          machine=hp9000s300 ;;
1213       mipsel-*-openbsd*)        machine=pmax ;;
1214      esac
1215    ;;
1216
1217     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1218   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1219
1220     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1221   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1222
1223     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1224
1225     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1226
1227     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1228
1229     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1230
1231     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1232
1233     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1234   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1235   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1236
1237   
1238     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1239
1240     *-convex-bsd* | *-convex-convexos* )
1241     machine=convex opsys=bsd4-3
1242     NON_GNU_CPP="cc -E -P"
1243   ;;
1244
1245     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1246
1247     *-*-darwin*)
1248     opsys=darwin
1249     RANLIB="ranlib -c"     ;;
1250
1251     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1252   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1253   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1254   m88k-dg-dgux*                           ) opsys=dgux     ;;
1255
1256     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1257   m88k-motorola-sysv4* )
1258                     machine=delta88k opsys=usg5-4-2
1259   ;;
1260   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1261
1262     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1263   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1264
1265     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1266
1267     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1268   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1269   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1270
1271       m88k-harris-cxux* )
1272         case "`uname -r`" in
1273        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1274        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1275     esac
1276     NON_GNU_CPP="/lib/cpp"
1277   ;;
1278     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1279     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1280
1281     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1282
1283     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1284
1285     *-hp-hpux* )
1286         case "$canonical" in
1287       m68*  ) machine=hp9000s300 ;;
1288       hppa* ) machine=hp800      ;;
1289     esac
1290
1291     case "$canonical" in
1292       *-hp-hpux7*  )  opsys=hpux   ;;
1293       *-hp-hpux8*  )  opsys=hpux8  ;;
1294       *-hp-hpux9*  )  opsys=hpux9  ;;
1295       *-hp-hpux10* )  opsys=hpux10 ;;
1296       *-hp-hpux11* )  opsys=hpux11 ;;
1297       *            )  opsys=hpux   ;;
1298     esac
1299
1300         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1301    echo "    xemacs will be linked with \"strcat.o\""
1302  fi ;; esac
1303
1304     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1305         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1306     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1307
1308     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1309   ;;
1310
1311     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1312   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1313
1314     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1315   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1316   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1317   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1318   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1319   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1320
1321     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1322   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1323
1324     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1325
1326     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1327
1328     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1329
1330     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1331
1332       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1333
1334     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1335
1336     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1337
1338     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1339
1340     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1341
1342         mips-mips-usg* ) machine=mips4 ;;
1343   mips-mips-riscos4 )
1344     machine=mips4
1345     NON_GNU_CC="cc -systype bsd43"
1346     NON_GNU_CPP="cc -systype bsd43 -E"
1347     case "$canonical" in
1348       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1349       mips-mips-riscos5* ) opsys=riscos5 ;;
1350     esac
1351   ;;
1352   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1353   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1354
1355     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1356
1357     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1358
1359     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1360   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1361
1362     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1363
1364     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1365
1366     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1367
1368     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1369
1370     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1371   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1372
1373     mips-siemens-sysv* | mips-sni-sysv*)
1374     machine=mips-siemens opsys=usg5-4
1375     NON_GNU_CC=/usr/ccs/bin/cc
1376     NON_GNU_CPP=/usr/ccs/lib/cpp
1377   ;;
1378
1379     mips-nec-sysv*)
1380     machine=mips-nec
1381     NON_GNU_CC=/usr/ccs/bin/cc
1382     NON_GNU_CPP=/usr/ccs/lib/cpp
1383   ;;
1384
1385       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1386   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1387     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1388   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1389   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1390   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1391   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1392   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1393   mips-sgi-irix*      ) opsys=irix5-0 ;;
1394
1395     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1396   *-sony-news* ) opsys=newsos5 ;;
1397
1398     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1399
1400     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1401         case "$canonical" in
1402       m68*-sunos1* )             machine=sun1     ;;
1403       m68*-sunos2* )             machine=sun2     ;;
1404       m68* )                     machine=sun3     ;;
1405       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1406       i*86-*-* )                 machine=intel386 ;;
1407       rs6000* )                  machine=rs6000   ;;
1408     esac
1409
1410         case "$canonical" in *-sunos5*)
1411       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1412     esac
1413
1414                     case "$canonical" in
1415       *-sunos4* )
1416         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1417         : ;;
1418       *-solaris2* )
1419         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1420         RANLIB=':' ;;
1421     esac
1422
1423     case "$canonical" in
1424       *-solaris*          )
1425         opsys=sol2
1426         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1427         { test "$extra_verbose" = "yes" && cat << EOF
1428     Defining OS_RELEASE = $os_release
1429 EOF
1430 cat >> confdefs.h <<EOF
1431 #define OS_RELEASE $os_release
1432 EOF
1433 }
1434  ;;
1435
1436             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1437       *-sunos4.0*         ) opsys=sunos4-0      ;;
1438       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1439       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1440       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1441       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1442       *-mach*             ) opsys=mach-bsd4-3   ;;
1443       *                   ) opsys=bsd4-2        ;;
1444     esac
1445
1446     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1447
1448         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1449   ;;
1450
1451     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1452
1453     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1454   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1455
1456     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1457
1458     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1459
1460     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1461       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1462
1463     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1464
1465     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1466
1467     vax-dec-* )
1468     case "$canonical" in
1469       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1470       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1471       *-mach* )                         opsys=mach-bsd4-3 ;;
1472     esac
1473   ;;
1474
1475     ns16k-whitechapel-* ) machine=mg1 ;;
1476
1477     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1478
1479     i[3-9]86-*-* )
1480     machine=intel386
1481     case "$canonical" in
1482       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1483       *-isc2.2* )               opsys=isc2-2 ;;
1484       *-isc4.0* )               opsys=isc4-0 ;;
1485       *-isc4.* )                opsys=isc4-1
1486                                 GCC_TEST_OPTIONS=-posix
1487                                 NON_GCC_TEST_OPTIONS=-Xp
1488                                 ;;
1489       *-isc* )                  opsys=isc3-0 ;;
1490       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1491       *-esix* )                 opsys=esix ;;
1492       *-mach* )                 opsys=mach-bsd4-3 ;;
1493       *-xenix* )                opsys=xenix ;;
1494       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1495       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1496       *-bsdi4* )                opsys=bsdos4 ;;
1497       *-bsdi3* )                opsys=bsdos3 ;;
1498       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1499       *-bsdi2* )                opsys=bsdos2 ;;
1500       *-sco3.2v5* )             opsys=sco5 ;;
1501       *-sysv5* )                opsys=sco7 ;;
1502       *-386bsd* )               opsys=386bsd ;;
1503       *-freebsd* )              opsys=freebsd ;;
1504       *-nextstep* )             opsys=nextstep ;;
1505       *-pc-cygwin* )            opsys=cygwin32 ;;
1506       *-pc-mingw* )             opsys=mingw32 ;
1507                                 test -z "$with_tty" && with_tty="no";;
1508           esac
1509   ;;
1510
1511     m68k-*-linux* ) machine=m68k opsys=linux ;;
1512
1513 esac
1514
1515 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1516
1517 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1518
1519 if test -r "${srcdir}/src/m/${machine}.h"; then
1520   machfile="m/${machine}.h"
1521   { test "$extra_verbose" = "yes" && cat << EOF
1522     Defining config_machfile = "$machfile"
1523 EOF
1524 cat >> confdefs.h <<EOF
1525 #define config_machfile "$machfile"
1526 EOF
1527 }
1528
1529 else
1530   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1531   echo "Using configure-time autodetection only."
1532 fi
1533
1534 if test -r "${srcdir}/src/s/${opsys}.h"; then
1535   opsysfile="s/${opsys}.h"
1536   { test "$extra_verbose" = "yes" && cat << EOF
1537     Defining config_opsysfile = "$opsysfile"
1538 EOF
1539 cat >> confdefs.h <<EOF
1540 #define config_opsysfile "$opsysfile"
1541 EOF
1542 }
1543
1544 else
1545   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1546   echo "Using configure-time autodetection only."
1547 fi
1548
1549
1550 if test -z "$pdump"; then
1551   case "$opsys" in
1552     linux* )      pdump=yes ;;        *-*-darwin* ) pdump=yes ;;        *)            pdump=no ;;
1553   esac
1554 fi
1555
1556 if test -z "$dynamic"; then
1557   case "$opsys" in
1558     hpux* | sunos4* ) dynamic=no ;;
1559     *) dynamic=yes ;;
1560   esac
1561 fi
1562 if test "$dynamic" = "yes"; then
1563   case "$opsys" in
1564     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1565     decosf* ) ld_call_shared="-call_shared" ;;
1566   esac
1567 else   case "$opsys" in
1568     sol2 )
1569       echo "Static linking is not supported on Solaris 2."
1570       echo "Rerun configure without specifying --dynamic=no."
1571       exit 1 ;;
1572     linux   ) ld_call_shared="-Bstatic" ;;
1573     decosf* ) ld_call_shared="-non_shared" ;;
1574   esac
1575 fi
1576
1577 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1578
1579 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1580 { test "$extra_verbose" = "yes" && cat << EOF
1581     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1582 EOF
1583 cat >> confdefs.h <<EOF
1584 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1585 EOF
1586 }
1587
1588
1589
1590 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1591 if test "$with_workshop $with_tooltalk" = "yes no"; then
1592   (echo "$progname: Usage error:"
1593 echo " " "--with-workshop requires --with-tooltalk"
1594 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1595 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1596 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1597 fi
1598
1599 if test "$with_workshop" = "yes"; then
1600   { test "$extra_verbose" = "yes" && cat << \EOF
1601     Defining SUNPRO
1602 EOF
1603 cat >> confdefs.h <<\EOF
1604 #define SUNPRO 1
1605 EOF
1606 }
1607
1608   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1609    echo "    xemacs will be linked with \"sunpro.o\""
1610  fi
1611 fi
1612
1613 if test "$with_clash_detection" != "no"; then
1614   { test "$extra_verbose" = "yes" && cat << \EOF
1615     Defining CLASH_DETECTION
1616 EOF
1617 cat >> confdefs.h <<\EOF
1618 #define CLASH_DETECTION 1
1619 EOF
1620 }
1621
1622   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1623    echo "    xemacs will be linked with \"filelock.o\""
1624  fi
1625 fi
1626
1627 test -n "$compiler" && CC="$compiler"
1628 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1629 fi
1630
1631 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1632 if test "${CFLAGS-unset}" != unset
1633   then cflags_specified=yes;
1634   else cflags_specified=no;
1635 fi
1636
1637 xe_save_CFLAGS="$CFLAGS"
1638
1639 # Extract the first word of "gcc", so it can be a program name with args.
1640 set dummy gcc; ac_word=$2
1641 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1642 echo "configure:1643: checking for $ac_word" >&5
1643
1644 if test -n "$CC"; then
1645   ac_cv_prog_CC="$CC" # Let the user override the test.
1646 else
1647   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1648   ac_dummy="$PATH"
1649   for ac_dir in $ac_dummy; do
1650     test -z "$ac_dir" && ac_dir=.
1651     if test -f $ac_dir/$ac_word; then
1652       ac_cv_prog_CC="gcc"
1653       break
1654     fi
1655   done
1656   IFS="$ac_save_ifs"
1657 fi
1658 CC="$ac_cv_prog_CC"
1659 if test -n "$CC"; then
1660   echo "$ac_t""$CC" 1>&6
1661 else
1662   echo "$ac_t""no" 1>&6
1663 fi
1664
1665 if test -z "$CC"; then
1666   # Extract the first word of "cc", so it can be a program name with args.
1667 set dummy cc; ac_word=$2
1668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1669 echo "configure:1670: checking for $ac_word" >&5
1670
1671 if test -n "$CC"; then
1672   ac_cv_prog_CC="$CC" # Let the user override the test.
1673 else
1674   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1675   ac_prog_rejected=no
1676   ac_dummy="$PATH"
1677   for ac_dir in $ac_dummy; do
1678     test -z "$ac_dir" && ac_dir=.
1679     if test -f $ac_dir/$ac_word; then
1680       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1681         ac_prog_rejected=yes
1682         continue
1683       fi
1684       ac_cv_prog_CC="cc"
1685       break
1686     fi
1687   done
1688   IFS="$ac_save_ifs"
1689 if test $ac_prog_rejected = yes; then
1690   # We found a bogon in the path, so make sure we never use it.
1691   set dummy $ac_cv_prog_CC
1692   shift
1693   if test $# -gt 0; then
1694     # We chose a different compiler from the bogus one.
1695     # However, it has the same basename, so the bogon will be chosen
1696     # first if we set CC to just the basename; use the full file name.
1697     shift
1698     set dummy "$ac_dir/$ac_word" "$@"
1699     shift
1700     ac_cv_prog_CC="$@"
1701   fi
1702 fi
1703 fi
1704 CC="$ac_cv_prog_CC"
1705 if test -n "$CC"; then
1706   echo "$ac_t""$CC" 1>&6
1707 else
1708   echo "$ac_t""no" 1>&6
1709 fi
1710
1711   if test -z "$CC"; then
1712     case "`uname -s`" in
1713     *win32* | *WIN32*)
1714       # Extract the first word of "cl", so it can be a program name with args.
1715 set dummy cl; ac_word=$2
1716 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1717 echo "configure:1718: checking for $ac_word" >&5
1718
1719 if test -n "$CC"; then
1720   ac_cv_prog_CC="$CC" # Let the user override the test.
1721 else
1722   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1723   ac_dummy="$PATH"
1724   for ac_dir in $ac_dummy; do
1725     test -z "$ac_dir" && ac_dir=.
1726     if test -f $ac_dir/$ac_word; then
1727       ac_cv_prog_CC="cl"
1728       break
1729     fi
1730   done
1731   IFS="$ac_save_ifs"
1732 fi
1733 CC="$ac_cv_prog_CC"
1734 if test -n "$CC"; then
1735   echo "$ac_t""$CC" 1>&6
1736 else
1737   echo "$ac_t""no" 1>&6
1738 fi
1739  ;;
1740     esac
1741   fi
1742   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1743 fi
1744
1745 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1746 echo "configure:1747: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1747
1748 ac_ext=c
1749 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1750 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1751 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'
1752 ac_cpp='$CPP '"$xe_cppflags"
1753 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1754 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1755 cross_compiling=no
1756
1757 cat > conftest.$ac_ext << EOF
1758
1759 #line 1760 "configure"
1760 #include "confdefs.h"
1761
1762 main(){return(0);}
1763 EOF
1764 if { (eval echo configure:1765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1765   ac_cv_prog_cc_works=yes
1766   # If we can't run a trivial program, we are probably using a cross compiler.
1767   if (./conftest; exit) 2>/dev/null; then
1768     ac_cv_prog_cc_cross=no
1769   else
1770     ac_cv_prog_cc_cross=yes
1771   fi
1772 else
1773   echo "configure: failed program was:" >&5
1774   cat conftest.$ac_ext >&5
1775   ac_cv_prog_cc_works=no
1776 fi
1777 rm -fr conftest*
1778 ac_ext=c
1779 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1780 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1781 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'
1782 ac_cpp='$CPP '"$xe_cppflags"
1783 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1784 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1785 cross_compiling=no
1786
1787 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1788 if test $ac_cv_prog_cc_works = no; then
1789   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1790 fi
1791 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1792 echo "configure:1793: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1793 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1794 cross_compiling=$ac_cv_prog_cc_cross
1795
1796 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1797 echo "configure:1798: checking whether we are using GNU C" >&5
1798
1799 cat > conftest.c <<EOF
1800 #ifdef __GNUC__
1801   yes;
1802 #endif
1803 EOF
1804 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1805   ac_cv_prog_gcc=yes
1806 else
1807   ac_cv_prog_gcc=no
1808 fi
1809
1810 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1811
1812 if test $ac_cv_prog_gcc = yes; then
1813   GCC=yes
1814 else
1815   GCC=
1816 fi
1817
1818 ac_test_CFLAGS="${CFLAGS+set}"
1819 ac_save_CFLAGS="$CFLAGS"
1820 CFLAGS=
1821 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1822 echo "configure:1823: checking whether ${CC-cc} accepts -g" >&5
1823
1824 echo 'void f(){}' > conftest.c
1825 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1826   ac_cv_prog_cc_g=yes
1827 else
1828   ac_cv_prog_cc_g=no
1829 fi
1830 rm -f conftest*
1831
1832
1833 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1834 if test "$ac_test_CFLAGS" = set; then
1835   CFLAGS="$ac_save_CFLAGS"
1836 elif test $ac_cv_prog_cc_g = yes; then
1837   if test "$GCC" = yes; then
1838     CFLAGS="-g -O2"
1839   else
1840     CFLAGS="-g"
1841   fi
1842 else
1843   if test "$GCC" = yes; then
1844     CFLAGS="-O2"
1845   else
1846     CFLAGS=
1847   fi
1848 fi
1849  
1850 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1851   CC=${NON_GNU_CC-cc}
1852   # Extract the first word of "gcc", so it can be a program name with args.
1853 set dummy gcc; ac_word=$2
1854 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1855 echo "configure:1856: checking for $ac_word" >&5
1856
1857 if test -n "$CC"; then
1858   ac_cv_prog_CC="$CC" # Let the user override the test.
1859 else
1860   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1861   ac_dummy="$PATH"
1862   for ac_dir in $ac_dummy; do
1863     test -z "$ac_dir" && ac_dir=.
1864     if test -f $ac_dir/$ac_word; then
1865       ac_cv_prog_CC="gcc"
1866       break
1867     fi
1868   done
1869   IFS="$ac_save_ifs"
1870 fi
1871 CC="$ac_cv_prog_CC"
1872 if test -n "$CC"; then
1873   echo "$ac_t""$CC" 1>&6
1874 else
1875   echo "$ac_t""no" 1>&6
1876 fi
1877
1878 if test -z "$CC"; then
1879   # Extract the first word of "cc", so it can be a program name with args.
1880 set dummy cc; ac_word=$2
1881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1882 echo "configure:1883: checking for $ac_word" >&5
1883
1884 if test -n "$CC"; then
1885   ac_cv_prog_CC="$CC" # Let the user override the test.
1886 else
1887   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1888   ac_prog_rejected=no
1889   ac_dummy="$PATH"
1890   for ac_dir in $ac_dummy; do
1891     test -z "$ac_dir" && ac_dir=.
1892     if test -f $ac_dir/$ac_word; then
1893       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1894         ac_prog_rejected=yes
1895         continue
1896       fi
1897       ac_cv_prog_CC="cc"
1898       break
1899     fi
1900   done
1901   IFS="$ac_save_ifs"
1902 if test $ac_prog_rejected = yes; then
1903   # We found a bogon in the path, so make sure we never use it.
1904   set dummy $ac_cv_prog_CC
1905   shift
1906   if test $# -gt 0; then
1907     # We chose a different compiler from the bogus one.
1908     # However, it has the same basename, so the bogon will be chosen
1909     # first if we set CC to just the basename; use the full file name.
1910     shift
1911     set dummy "$ac_dir/$ac_word" "$@"
1912     shift
1913     ac_cv_prog_CC="$@"
1914   fi
1915 fi
1916 fi
1917 CC="$ac_cv_prog_CC"
1918 if test -n "$CC"; then
1919   echo "$ac_t""$CC" 1>&6
1920 else
1921   echo "$ac_t""no" 1>&6
1922 fi
1923
1924   if test -z "$CC"; then
1925     case "`uname -s`" in
1926     *win32* | *WIN32*)
1927       # Extract the first word of "cl", so it can be a program name with args.
1928 set dummy cl; ac_word=$2
1929 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1930 echo "configure:1931: checking for $ac_word" >&5
1931
1932 if test -n "$CC"; then
1933   ac_cv_prog_CC="$CC" # Let the user override the test.
1934 else
1935   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1936   ac_dummy="$PATH"
1937   for ac_dir in $ac_dummy; do
1938     test -z "$ac_dir" && ac_dir=.
1939     if test -f $ac_dir/$ac_word; then
1940       ac_cv_prog_CC="cl"
1941       break
1942     fi
1943   done
1944   IFS="$ac_save_ifs"
1945 fi
1946 CC="$ac_cv_prog_CC"
1947 if test -n "$CC"; then
1948   echo "$ac_t""$CC" 1>&6
1949 else
1950   echo "$ac_t""no" 1>&6
1951 fi
1952  ;;
1953     esac
1954   fi
1955   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1956 fi
1957
1958 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1959 echo "configure:1960: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1960
1961 ac_ext=c
1962 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1963 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1964 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'
1965 ac_cpp='$CPP '"$xe_cppflags"
1966 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1967 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1968 cross_compiling=no
1969
1970 cat > conftest.$ac_ext << EOF
1971
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974
1975 main(){return(0);}
1976 EOF
1977 if { (eval echo configure:1978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1978   ac_cv_prog_cc_works=yes
1979   # If we can't run a trivial program, we are probably using a cross compiler.
1980   if (./conftest; exit) 2>/dev/null; then
1981     ac_cv_prog_cc_cross=no
1982   else
1983     ac_cv_prog_cc_cross=yes
1984   fi
1985 else
1986   echo "configure: failed program was:" >&5
1987   cat conftest.$ac_ext >&5
1988   ac_cv_prog_cc_works=no
1989 fi
1990 rm -fr conftest*
1991 ac_ext=c
1992 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1993 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1994 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'
1995 ac_cpp='$CPP '"$xe_cppflags"
1996 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1997 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1998 cross_compiling=no
1999
2000 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2001 if test $ac_cv_prog_cc_works = no; then
2002   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2003 fi
2004 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2005 echo "configure:2006: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2006 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2007 cross_compiling=$ac_cv_prog_cc_cross
2008
2009 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2010 echo "configure:2011: checking whether we are using GNU C" >&5
2011
2012 cat > conftest.c <<EOF
2013 #ifdef __GNUC__
2014   yes;
2015 #endif
2016 EOF
2017 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2018   ac_cv_prog_gcc=yes
2019 else
2020   ac_cv_prog_gcc=no
2021 fi
2022
2023 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2024
2025 if test $ac_cv_prog_gcc = yes; then
2026   GCC=yes
2027 else
2028   GCC=
2029 fi
2030
2031 ac_test_CFLAGS="${CFLAGS+set}"
2032 ac_save_CFLAGS="$CFLAGS"
2033 CFLAGS=
2034 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2035 echo "configure:2036: checking whether ${CC-cc} accepts -g" >&5
2036
2037 echo 'void f(){}' > conftest.c
2038 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2039   ac_cv_prog_cc_g=yes
2040 else
2041   ac_cv_prog_cc_g=no
2042 fi
2043 rm -f conftest*
2044
2045
2046 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2047 if test "$ac_test_CFLAGS" = set; then
2048   CFLAGS="$ac_save_CFLAGS"
2049 elif test $ac_cv_prog_cc_g = yes; then
2050   if test "$GCC" = yes; then
2051     CFLAGS="-g -O2"
2052   else
2053     CFLAGS="-g"
2054   fi
2055 else
2056   if test "$GCC" = yes; then
2057     CFLAGS="-O2"
2058   else
2059     CFLAGS=
2060   fi
2061 fi
2062
2063 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2064   CC=gcc
2065   # Extract the first word of "gcc", so it can be a program name with args.
2066 set dummy gcc; ac_word=$2
2067 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2068 echo "configure:2069: checking for $ac_word" >&5
2069
2070 if test -n "$CC"; then
2071   ac_cv_prog_CC="$CC" # Let the user override the test.
2072 else
2073   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2074   ac_dummy="$PATH"
2075   for ac_dir in $ac_dummy; do
2076     test -z "$ac_dir" && ac_dir=.
2077     if test -f $ac_dir/$ac_word; then
2078       ac_cv_prog_CC="gcc"
2079       break
2080     fi
2081   done
2082   IFS="$ac_save_ifs"
2083 fi
2084 CC="$ac_cv_prog_CC"
2085 if test -n "$CC"; then
2086   echo "$ac_t""$CC" 1>&6
2087 else
2088   echo "$ac_t""no" 1>&6
2089 fi
2090
2091 if test -z "$CC"; then
2092   # Extract the first word of "cc", so it can be a program name with args.
2093 set dummy cc; ac_word=$2
2094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2095 echo "configure:2096: checking for $ac_word" >&5
2096
2097 if test -n "$CC"; then
2098   ac_cv_prog_CC="$CC" # Let the user override the test.
2099 else
2100   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2101   ac_prog_rejected=no
2102   ac_dummy="$PATH"
2103   for ac_dir in $ac_dummy; do
2104     test -z "$ac_dir" && ac_dir=.
2105     if test -f $ac_dir/$ac_word; then
2106       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2107         ac_prog_rejected=yes
2108         continue
2109       fi
2110       ac_cv_prog_CC="cc"
2111       break
2112     fi
2113   done
2114   IFS="$ac_save_ifs"
2115 if test $ac_prog_rejected = yes; then
2116   # We found a bogon in the path, so make sure we never use it.
2117   set dummy $ac_cv_prog_CC
2118   shift
2119   if test $# -gt 0; then
2120     # We chose a different compiler from the bogus one.
2121     # However, it has the same basename, so the bogon will be chosen
2122     # first if we set CC to just the basename; use the full file name.
2123     shift
2124     set dummy "$ac_dir/$ac_word" "$@"
2125     shift
2126     ac_cv_prog_CC="$@"
2127   fi
2128 fi
2129 fi
2130 CC="$ac_cv_prog_CC"
2131 if test -n "$CC"; then
2132   echo "$ac_t""$CC" 1>&6
2133 else
2134   echo "$ac_t""no" 1>&6
2135 fi
2136
2137   if test -z "$CC"; then
2138     case "`uname -s`" in
2139     *win32* | *WIN32*)
2140       # Extract the first word of "cl", so it can be a program name with args.
2141 set dummy cl; ac_word=$2
2142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2143 echo "configure:2144: checking for $ac_word" >&5
2144
2145 if test -n "$CC"; then
2146   ac_cv_prog_CC="$CC" # Let the user override the test.
2147 else
2148   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2149   ac_dummy="$PATH"
2150   for ac_dir in $ac_dummy; do
2151     test -z "$ac_dir" && ac_dir=.
2152     if test -f $ac_dir/$ac_word; then
2153       ac_cv_prog_CC="cl"
2154       break
2155     fi
2156   done
2157   IFS="$ac_save_ifs"
2158 fi
2159 CC="$ac_cv_prog_CC"
2160 if test -n "$CC"; then
2161   echo "$ac_t""$CC" 1>&6
2162 else
2163   echo "$ac_t""no" 1>&6
2164 fi
2165  ;;
2166     esac
2167   fi
2168   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2169 fi
2170
2171 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2172 echo "configure:2173: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2173
2174 ac_ext=c
2175 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2176 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2177 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'
2178 ac_cpp='$CPP '"$xe_cppflags"
2179 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2180 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2181 cross_compiling=no
2182
2183 cat > conftest.$ac_ext << EOF
2184
2185 #line 2186 "configure"
2186 #include "confdefs.h"
2187
2188 main(){return(0);}
2189 EOF
2190 if { (eval echo configure:2191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2191   ac_cv_prog_cc_works=yes
2192   # If we can't run a trivial program, we are probably using a cross compiler.
2193   if (./conftest; exit) 2>/dev/null; then
2194     ac_cv_prog_cc_cross=no
2195   else
2196     ac_cv_prog_cc_cross=yes
2197   fi
2198 else
2199   echo "configure: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   ac_cv_prog_cc_works=no
2202 fi
2203 rm -fr conftest*
2204 ac_ext=c
2205 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2206 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2207 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'
2208 ac_cpp='$CPP '"$xe_cppflags"
2209 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2210 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2211 cross_compiling=no
2212
2213 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2214 if test $ac_cv_prog_cc_works = no; then
2215   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2216 fi
2217 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2218 echo "configure:2219: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2219 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2220 cross_compiling=$ac_cv_prog_cc_cross
2221
2222 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2223 echo "configure:2224: checking whether we are using GNU C" >&5
2224
2225 cat > conftest.c <<EOF
2226 #ifdef __GNUC__
2227   yes;
2228 #endif
2229 EOF
2230 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2231   ac_cv_prog_gcc=yes
2232 else
2233   ac_cv_prog_gcc=no
2234 fi
2235
2236 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2237
2238 if test $ac_cv_prog_gcc = yes; then
2239   GCC=yes
2240 else
2241   GCC=
2242 fi
2243
2244 ac_test_CFLAGS="${CFLAGS+set}"
2245 ac_save_CFLAGS="$CFLAGS"
2246 CFLAGS=
2247 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2248 echo "configure:2249: checking whether ${CC-cc} accepts -g" >&5
2249
2250 echo 'void f(){}' > conftest.c
2251 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2252   ac_cv_prog_cc_g=yes
2253 else
2254   ac_cv_prog_cc_g=no
2255 fi
2256 rm -f conftest*
2257
2258
2259 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2260 if test "$ac_test_CFLAGS" = set; then
2261   CFLAGS="$ac_save_CFLAGS"
2262 elif test $ac_cv_prog_cc_g = yes; then
2263   if test "$GCC" = yes; then
2264     CFLAGS="-g -O2"
2265   else
2266     CFLAGS="-g"
2267   fi
2268 else
2269   if test "$GCC" = yes; then
2270     CFLAGS="-O2"
2271   else
2272     CFLAGS=
2273   fi
2274 fi
2275
2276 fi
2277 CFLAGS="$xe_save_CFLAGS"
2278
2279
2280 test -n "$CPP" -a -d "$CPP" && CPP=
2281
2282 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2283
2284 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2285 echo "configure:2286: checking how to run the C preprocessor" >&5
2286 # On Suns, sometimes $CPP names a directory.
2287 if test -n "$CPP" && test -d "$CPP"; then
2288   CPP=
2289 fi
2290 if test -z "$CPP"; then
2291
2292   # This must be in double quotes, not single quotes, because CPP may get
2293   # substituted into the Makefile and "${CC-cc}" will confuse make.
2294   CPP="${CC-cc} -E"
2295   # On the NeXT, cc -E runs the code through the compiler's parser,
2296   # not just through cpp.
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #include <assert.h>
2301 Syntax Error
2302 EOF
2303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2304 { (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2306 if test -z "$ac_err"; then
2307   :
2308 else
2309   echo "$ac_err" >&5
2310   echo "configure: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   rm -rf conftest*
2313   CPP="${CC-cc} -E -traditional-cpp"
2314   cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #include <assert.h>
2318 Syntax Error
2319 EOF
2320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2321 { (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2323 if test -z "$ac_err"; then
2324   :
2325 else
2326   echo "$ac_err" >&5
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   CPP="${CC-cc} -nologo -E"
2331   cat > conftest.$ac_ext <<EOF
2332 #line 2333 "configure"
2333 #include "confdefs.h"
2334 #include <assert.h>
2335 Syntax Error
2336 EOF
2337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2338 { (eval echo configure:2339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2340 if test -z "$ac_err"; then
2341   :
2342 else
2343   echo "$ac_err" >&5
2344   echo "configure: failed program was:" >&5
2345   cat conftest.$ac_ext >&5
2346   rm -rf conftest*
2347   CPP=/lib/cpp
2348 fi
2349 rm -f conftest*
2350 fi
2351 rm -f conftest*
2352 fi
2353 rm -f conftest*
2354   ac_cv_prog_CPP="$CPP"
2355   CPP="$ac_cv_prog_CPP"
2356 else
2357   ac_cv_prog_CPP="$CPP"
2358 fi
2359 echo "$ac_t""$CPP" 1>&6
2360
2361
2362
2363 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2364 echo "configure:2365: checking for AIX" >&5
2365 cat > conftest.$ac_ext <<EOF
2366 #line 2367 "configure"
2367 #include "confdefs.h"
2368 #ifdef _AIX
2369   yes
2370 #endif
2371
2372 EOF
2373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2374   egrep "yes" >/dev/null 2>&1; then
2375   rm -rf conftest*
2376   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2377     Defining _ALL_SOURCE
2378 EOF
2379 cat >> confdefs.h <<\EOF
2380 #define _ALL_SOURCE 1
2381 EOF
2382 }
2383
2384 else
2385   rm -rf conftest*
2386   echo "$ac_t""no" 1>&6
2387 fi
2388 rm -f conftest*
2389
2390  
2391
2392 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2393 echo "configure:2394: checking for GNU libc" >&5
2394 cat > conftest.$ac_ext <<EOF
2395 #line 2396 "configure"
2396 #include "confdefs.h"
2397 #include <features.h>
2398 int main() {
2399
2400 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2401 #error Not a GNU libc system :-(
2402 ******* ======= ******** &&&&&&&&
2403 #endif
2404
2405 ; return 0; }
2406 EOF
2407 if { (eval echo configure:2408: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2408   rm -rf conftest*
2409   have_glibc=yes
2410 else
2411   echo "configure: failed program was:" >&5
2412   cat conftest.$ac_ext >&5
2413   rm -rf conftest*
2414   have_glibc=no
2415 fi
2416 rm -f conftest*
2417 echo "$ac_t""$have_glibc" 1>&6
2418 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2419     Defining _GNU_SOURCE
2420 EOF
2421 cat >> confdefs.h <<\EOF
2422 #define _GNU_SOURCE 1
2423 EOF
2424 }
2425
2426
2427 case "$opsys" in
2428   sol2)
2429    { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining __EXTENSIONS__
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define __EXTENSIONS__ 1
2434 EOF
2435 }
2436
2437       if test "$os_release" -ge 55; then
2438      { test "$extra_verbose" = "yes" && cat << \EOF
2439     Defining _XOPEN_SOURCE = 500
2440 EOF
2441 cat >> confdefs.h <<\EOF
2442 #define _XOPEN_SOURCE 500
2443 EOF
2444 }
2445
2446      { test "$extra_verbose" = "yes" && cat << \EOF
2447     Defining _XOPEN_SOURCE_EXTENDED
2448 EOF
2449 cat >> confdefs.h <<\EOF
2450 #define _XOPEN_SOURCE_EXTENDED 1
2451 EOF
2452 }
2453
2454    fi ;;
2455   linux)
2456     { test "$extra_verbose" = "yes" && cat << \EOF
2457     Defining _POSIX_C_SOURCE = 199506L
2458 EOF
2459 cat >> confdefs.h <<\EOF
2460 #define _POSIX_C_SOURCE 199506L
2461 EOF
2462 }
2463
2464     { test "$extra_verbose" = "yes" && cat << \EOF
2465     Defining _XOPEN_SOURCE = 500
2466 EOF
2467 cat >> confdefs.h <<\EOF
2468 #define _XOPEN_SOURCE 500
2469 EOF
2470 }
2471
2472     { test "$extra_verbose" = "yes" && cat << \EOF
2473     Defining _XOPEN_SOURCE_EXTENDED
2474 EOF
2475 cat >> confdefs.h <<\EOF
2476 #define _XOPEN_SOURCE_EXTENDED 1
2477 EOF
2478 }
2479
2480     ;;
2481 esac
2482
2483 cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2486 int main () {
2487 #if defined __SUNPRO_C
2488 return 11;
2489 #elif defined __DECC
2490 return 12;
2491 #elif defined __USLC__ && defined __SCO_VERSION__
2492 return 13;
2493 #else
2494 return 0;
2495 #endif
2496 }
2497 EOF
2498 if { (eval echo configure:2499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2499 then
2500   :
2501 else
2502   conftest_rc="$?"
2503   echo "configure: failed program was:" >&5
2504   cat conftest.$ac_ext >&5
2505   rm -fr conftest*
2506   case "$conftest_rc" in
2507   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2508   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2509   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2510 esac
2511 fi
2512 rm -fr conftest*
2513
2514
2515
2516
2517 echo "Extracting information from the machine- and system-dependent headers..."
2518
2519 tempcname="conftest.c"
2520
2521
2522
2523 cat > $tempcname < confdefs.h
2524 cat >> $tempcname <<EOF
2525 #define NOT_C_CODE
2526 #define C_SWITCH_SITE
2527 #define C_SWITCH_X_SITE
2528 #define LD_SWITCH_SITE
2529 #define LD_SWITCH_X_SITE
2530 #define LD_SWITCH_X_SITE_AUX
2531 #define OS_RELEASE $os_release
2532
2533 #ifdef config_opsysfile
2534 #include "$srcdir/src/$opsysfile"
2535 #endif
2536
2537 #ifdef config_machfile
2538 #include "$srcdir/src/$machfile"
2539 #endif
2540
2541 #ifndef LIBS_MACHINE
2542 #define LIBS_MACHINE
2543 #endif
2544 configure___ libs_machine=LIBS_MACHINE
2545
2546 #ifndef LIBS_SYSTEM
2547 #define LIBS_SYSTEM
2548 #endif
2549 configure___ libs_system=LIBS_SYSTEM
2550
2551 #ifndef LIBS_TERMCAP
2552 #define LIBS_TERMCAP
2553 #endif
2554 configure___ libs_termcap=LIBS_TERMCAP
2555
2556 #ifndef LIB_STANDARD
2557 #define LIB_STANDARD
2558 #endif
2559 configure___ libs_standard=LIB_STANDARD
2560
2561
2562 #ifndef OBJECTS_MACHINE
2563 #define OBJECTS_MACHINE
2564 #endif
2565 configure___ objects_machine=OBJECTS_MACHINE
2566
2567 #ifndef OBJECTS_SYSTEM
2568 #define OBJECTS_SYSTEM
2569 #endif
2570 configure___ objects_system=OBJECTS_SYSTEM
2571
2572
2573 #ifndef C_SWITCH_MACHINE
2574 #define C_SWITCH_MACHINE
2575 #endif
2576 configure___ c_switch_machine=C_SWITCH_MACHINE
2577
2578 #ifndef C_SWITCH_SYSTEM
2579 #define C_SWITCH_SYSTEM
2580 #endif
2581 configure___ c_switch_system=C_SWITCH_SYSTEM
2582
2583
2584 #ifndef LD_SWITCH_MACHINE
2585 #define LD_SWITCH_MACHINE
2586 #endif
2587 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2588
2589 #ifndef LD_SWITCH_SYSTEM
2590 #define LD_SWITCH_SYSTEM
2591 #endif
2592 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2593
2594
2595 #ifndef UNEXEC
2596 #define UNEXEC "unexec.o"
2597 #endif
2598 configure___ unexec=UNEXEC
2599
2600
2601 #ifndef LD_SWITCH_SHARED
2602 #define LD_SWITCH_SHARED "-c"
2603 #endif
2604 configure___ ld_switch_shared=LD_SWITCH_SHARED
2605
2606
2607 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2608 configure___ ordinary_ld=ORDINARY_LD
2609
2610 #ifdef ORDINARY_LINK
2611 #define LD ORDINARY_LD
2612 #else /* no ORDINARY LINK */
2613 #ifdef COFF_ENCAPSULATE
2614 #define LD "\$(CC) -nostdlib"
2615 #else /* not COFF_ENCAPSULATE */
2616 #ifdef LINKER
2617 #define LD LINKER
2618 #else /* ! defined (LINKER) */
2619 #define LD "ld"
2620 #endif /* ! defined (LINKER) */
2621 #endif /* ! defined (COFF_ENCAPSULATE) */
2622 #endif /* not ORDINARY_LINK */
2623 configure___ ld=LD
2624
2625 #ifndef LIB_GCC
2626 #define LIB_GCC
2627 #endif
2628 configure___ lib_gcc=LIB_GCC
2629
2630 #ifndef LD_TEXT_START_ADDR
2631 #define LD_TEXT_START_ADDR
2632 #endif
2633 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2634
2635
2636 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2637 #ifdef NO_REMAP
2638 #ifdef COFF_ENCAPSULATE
2639 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2640 #else /* ! defined (COFF_ENCAPSULATE) */
2641 #define START_FILES "pre-crt0.o /lib/crt0.o"
2642 #endif /* ! defined (COFF_ENCAPSULATE) */
2643 #else /* ! defined (NO_REMAP) */
2644 #define START_FILES "ecrt0.o"
2645 #endif /* ! defined (NO_REMAP) */
2646 #endif /* no ORDINARY_LINK */
2647 #ifndef START_FILES
2648 #define START_FILES
2649 #endif
2650 configure___ start_files=START_FILES
2651
2652 #ifdef ORDINARY_LINK
2653 configure___ ordinary_link=yes
2654 #else
2655 configure___ ordinary_link=no
2656 #endif
2657
2658 #ifdef SYSTEM_MALLOC
2659 configure___ system_malloc=yes
2660 #else
2661 configure___ system_malloc=no
2662 #endif
2663
2664 #ifdef TERMINFO
2665 configure___ have_terminfo=yes
2666 #else
2667 configure___ have_terminfo=no
2668 #endif
2669
2670 #ifdef MAIL_USE_FLOCK
2671 configure___ mail_use_flock=yes
2672 #else
2673 configure___ mail_use_flock=no
2674 #endif
2675
2676 #ifdef MAIL_USE_LOCKF
2677 configure___ mail_use_lockf=yes
2678 #else
2679 configure___ mail_use_lockf=no
2680 #endif
2681
2682 #ifdef MAIL_USE_LOCKING
2683 configure___ mail_use_locking=yes
2684 #else
2685 configure___ mail_use_locking=no
2686 #endif
2687
2688 #ifdef HAVE_WIN32_PROCESSES
2689 configure___ win32_processes=yes
2690 #else
2691 configure___ win32_processes=no
2692 #endif
2693
2694 EOF
2695
2696 CPP=`eval "echo $CPP $CPPFLAGS"`
2697 eval `$CPP -Isrc $tempcname \
2698         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2699
2700 rm $tempcname
2701
2702 if test "$pdump" = "yes"; then
2703   ordinary_link="yes"
2704   ld="${ordinary_ld}"
2705   start_files=
2706   libs_standard=
2707   unexec=
2708   lib_gcc=
2709 fi
2710
2711 test "$extra_verbose" = "yes" && \
2712   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 ""
2713
2714 case "$opsys" in mingw* | cygwin*)
2715   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2716   cygwin_include=`eval "dirname $cygwin_include"` ;
2717   cygwin_include="-I$cygwin_include/../include" ;
2718   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2719   case "$opsys" in mingw*)
2720     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2721   esac
2722   ;;
2723 esac
2724
2725 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2726
2727
2728 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2729
2730 if test "$__USLC__" = yes; then
2731   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2732 echo "configure:2733: checking for whether the -Kalloca compiler flag is needed" >&5
2733   need_kalloca=no
2734   cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2737
2738 int main() {
2739 void *x = alloca(4);
2740 ; return 0; }
2741 EOF
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2743   rm -rf conftest*
2744   :
2745 else
2746   echo "configure: failed program was:" >&5
2747   cat conftest.$ac_ext >&5
2748   rm -rf conftest*
2749   
2750     xe_save_c_switch_system="$c_switch_system"
2751     c_switch_system="$c_switch_system -Kalloca"
2752     cat > conftest.$ac_ext <<EOF
2753 #line 2754 "configure"
2754 #include "confdefs.h"
2755
2756 int main() {
2757 void *x = alloca(4);
2758 ; return 0; }
2759 EOF
2760 if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2761   rm -rf conftest*
2762    need_kalloca=yes 
2763 else
2764   echo "configure: failed program was:" >&5
2765   cat conftest.$ac_ext >&5
2766 fi
2767 rm -f conftest*
2768     c_switch_system="$xe_save_c_switch_system"
2769 fi
2770 rm -f conftest*
2771   echo "$ac_t""$need_kalloca" 1>&6
2772   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
2773 fi
2774
2775 if test "$cflags_specified" = "no"; then
2776       if   test "$GCC" = "yes"; then
2777     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2778         CFLAGS="$CFLAGS -Wsign-compare"
2779                 if test "$xemacs_compiler" != "g++"; then
2780       CFLAGS="$CFLAGS -Wshadow"
2781     fi
2782             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2783               elif test "$__SUNPRO_C" = "yes"; then
2784     case "$opsys" in
2785       sol2    ) CFLAGS="-v -xO4" ;;
2786       sunos4* ) CFLAGS="-xO2";;
2787     esac
2788   elif test "$__DECC" = "yes"; then
2789     CFLAGS="-O3"
2790   elif test "$CC" = "xlc"; then
2791     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2792     else
2793     CFLAGS="-O" ;  fi
2794 fi
2795
2796 if test "$GCC" = "yes"; then
2797 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2798 echo "configure:2799: checking for buggy gcc versions" >&5
2799 GCC_VERSION=`$CC --version`
2800 case `uname -s`:`uname -m`:$GCC_VERSION in
2801                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2802                         case "$CFLAGS" in
2803             *-O2*|*-O3*)
2804                 case "$CFLAGS" in
2805                     *-fno-schedule-insns*) ;;
2806                     *)
2807                         echo "$ac_t""yes" 1>&6
2808                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2809                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2810                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2811                         ;;
2812                 esac
2813                 ;;
2814         esac
2815         ;;
2816                     Linux:alpha:egcs-2.91.*)
2817         echo "$ac_t""yes" 1>&6
2818         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2819         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2820         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2821         ;;
2822     *:i*86*:2.7.2*)
2823         case "$CFLAGS" in
2824             *-O2*|*-O3*)
2825                 case "$GCC_VERSION" in
2826                     2.7.2)
2827                         case "$CFLAGS" in
2828                             *-fno-strength-reduce*) ;;
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-strength-reduce." 1>&2
2833                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2834                                 ;;
2835                         esac
2836                         ;;
2837                 esac
2838                 case "$CFLAGS" in
2839                  *-fno-caller-saves*) ;;
2840                  *)
2841                     echo "$ac_t""yes" 1>&6
2842                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2843                     echo "configure: warning: -fno-caller-saves." 1>&2
2844                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2845                     ;;
2846                 esac
2847                 ;;
2848         esac
2849         ;;
2850 esac
2851 echo "$ac_t""no" 1>&6
2852 fi
2853
2854 if test "$pdump" != "yes"; then
2855   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2856 echo "configure:2857: checking for \"-z nocombreloc\" linker flag" >&5
2857   case "`ld --help 2>&1`" in
2858     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2859       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2860     *) echo "$ac_t""no" 1>&6 ;;
2861   esac
2862 fi
2863
2864
2865
2866 if test "$GCC" = "yes"; then
2867   set x $ld_switch_system; shift; ld_switch_system=""
2868   while test -n "$1"; do
2869     case $1 in
2870       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2871       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2872       -Xlinker* ) ;;
2873       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2874     esac
2875     shift
2876   done
2877 fi
2878
2879 if test "$GCC" = "yes"; then
2880   set x $ld_switch_machine; shift; ld_switch_machine=""
2881   while test -n "$1"; do
2882     case $1 in
2883       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2884       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2885       -Xlinker* ) ;;
2886       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2887     esac
2888     shift
2889   done
2890 fi
2891
2892 if test "$GCC" = "yes"; then
2893   set x $ld_switch_site; shift; ld_switch_site=""
2894   while test -n "$1"; do
2895     case $1 in
2896       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2897       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2898       -Xlinker* ) ;;
2899       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2900     esac
2901     shift
2902   done
2903 fi
2904
2905 if test "$GCC" = "yes"; then
2906   set x $LDFLAGS; shift; LDFLAGS=""
2907   while test -n "$1"; do
2908     case $1 in
2909       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2910       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2911       -Xlinker* ) ;;
2912       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2913     esac
2914     shift
2915   done
2916 fi
2917
2918 if test "$GCC" = "yes"; then
2919   set x $ld_call_shared; shift; ld_call_shared=""
2920   while test -n "$1"; do
2921     case $1 in
2922       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2923       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2924       -Xlinker* ) ;;
2925       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2926     esac
2927     shift
2928   done
2929 fi
2930
2931 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2932    echo "    xemacs will be linked with \"$objects_machine\""
2933  fi
2934 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2935    echo "    xemacs will be linked with \"$objects_system\""
2936  fi
2937 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2938    echo "    xemacs will be linked with \"$unexec\""
2939  fi
2940 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2941    echo "    xemacs will be linked with \"dumper.o\""
2942  fi
2943
2944 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2945 echo "configure:2946: checking for dynodump" >&5
2946 if test "$unexec" != "unexsol2.o"; then
2947   echo "$ac_t""no" 1>&6
2948 else
2949   echo "$ac_t""yes" 1>&6
2950   { test "$extra_verbose" = "yes" && cat << \EOF
2951     Defining DYNODUMP
2952 EOF
2953 cat >> confdefs.h <<\EOF
2954 #define DYNODUMP 1
2955 EOF
2956 }
2957
2958   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2959   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2960   case "$machine" in
2961     sparc   ) dynodump_arch=sparc ;;
2962     *86*    ) dynodump_arch=i386  ;;
2963     powerpc ) dynodump_arch=ppc   ;;
2964   esac
2965     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
2966 fi
2967
2968
2969 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2970
2971 if test "$unexec" = "unexaix.o"; then
2972   if   test "$dynamic" = "no"; then
2973   start_flags="-Wl,-bnso,-bnodelcsect"
2974   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2975   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2976     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2977   done
2978   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2979     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2980   done
2981   
2982 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2983 echo "configure:2984: checking for terminateAndUnload in -lC" >&5
2984 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2985
2986 xe_check_libs=" -lC "
2987 cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990 /* Override any gcc2 internal prototype to avoid an error.  */
2991 /* We use char because int might match the return type of a gcc2
2992     builtin and then its argument prototype would still apply.  */
2993 char terminateAndUnload();
2994
2995 int main() {
2996 terminateAndUnload()
2997 ; return 0; }
2998 EOF
2999 if { (eval echo configure:3000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3000   rm -rf conftest*
3001   eval "ac_cv_lib_$ac_lib_var=yes"
3002 else
3003   echo "configure: failed program was:" >&5
3004   cat conftest.$ac_ext >&5
3005   rm -rf conftest*
3006   eval "ac_cv_lib_$ac_lib_var=no"
3007 fi
3008 rm -f conftest*
3009 xe_check_libs=""
3010
3011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3012   echo "$ac_t""yes" 1>&6
3013   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3014 else
3015   echo "$ac_t""no" 1>&6
3016 fi
3017
3018
3019   fi
3020 elif test -n "$ld_text_start_addr"; then
3021   start_flags="-T $ld_text_start_addr -e __start"
3022 fi
3023
3024
3025
3026
3027 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3028  test -z "$linker" &&  linker='$(CC) -nostdlib'
3029  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3030 fi
3031 test "$GCC" != "yes" && lib_gcc=
3032
3033
3034
3035
3036
3037 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3038 if test -n "$site_libraries"; then
3039   for arg in $site_libraries; do
3040     case "$arg" in
3041      -* ) ;;
3042      * ) test -d "$arg" || \
3043            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3044        arg="-L${arg}" ;;
3045     esac
3046     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3047   done
3048 fi
3049
3050 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3051 if test -n "$site_includes"; then
3052   for arg in $site_includes; do
3053     case "$arg" in
3054       -* ) ;;
3055       * ) test -d "$arg" || \
3056            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3057       arg="-I${arg}" ;;
3058     esac
3059     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3060   done
3061 fi
3062
3063 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3064 if test -n "$site_prefixes"; then
3065   for dir in $site_prefixes; do
3066     lib_dir="${dir}/lib"
3067     inc_dir="${dir}/include"
3068     if test ! -d "$dir"; then
3069       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3070     elif test ! -d "$lib_dir"; then
3071       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3072     else
3073       if test -d "$inc_dir"; then
3074         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
3075       fi
3076       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
3077     fi
3078   done
3079 fi
3080
3081
3082 for dir in "/usr/ccs/lib"; do
3083   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
3084 done
3085
3086 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3087 if test -n "$site_runtime_libraries"; then
3088   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3089   export LD_RUN_PATH
3090 fi
3091
3092
3093
3094
3095
3096 if test -n "$add_runtime_path"; then :;
3097 elif test "$dynamic" = "no"; then add_runtime_path=no
3098 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3099 else case "$opsys" in
3100        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3101        * ) add_runtime_path=no ;;
3102      esac
3103 fi
3104
3105 if test "$add_runtime_path" = "yes"; then
3106       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3107 echo "configure:3108: checking "for runtime libraries flag"" >&5
3108   case "$opsys" in
3109     sol2 ) dash_r="-R" ;;
3110     decosf* | linux* | irix*) dash_r="-rpath " ;;
3111     *)
3112       dash_r=""
3113       for try_dash_r in "-R" "-R " "-rpath "; do
3114         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3115         
3116 if test "$GCC" = "yes"; then
3117   set x $xe_check_libs; shift; xe_check_libs=""
3118   while test -n "$1"; do
3119     case $1 in
3120       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3121       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3122       -Xlinker* ) ;;
3123       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3124     esac
3125     shift
3126   done
3127 fi
3128         cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131
3132 int main() {
3133
3134 ; return 0; }
3135 EOF
3136 if { (eval echo configure:3137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3137   rm -rf conftest*
3138   dash_r="$try_dash_r"
3139 else
3140   echo "configure: failed program was:" >&5
3141   cat conftest.$ac_ext >&5
3142 fi
3143 rm -f conftest*
3144         xe_check_libs=""
3145         test -n "$dash_r" && break
3146       done ;;
3147   esac
3148   if test -n "$dash_r";
3149     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3150     else echo "$ac_t""NONE" 1>&6
3151   fi
3152 fi
3153
3154 xe_add_unique_runpath_dir='
3155   xe_add_p=yes
3156   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3157   done
3158   if test "$xe_add_p" = "yes"; then
3159     test -n "$runpath" && runpath="${runpath}:"
3160     runpath="${runpath}${xe_runpath_dir}"
3161     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3162   fi'
3163
3164
3165
3166
3167 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3168     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3169   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3170   
3171         runpath="" runpath_dirs=""
3172   if test -n "$LD_RUN_PATH"; then
3173     runpath="$LD_RUN_PATH"
3174   elif test "$GCC" = "yes"; then
3175         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3176     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3177     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3178     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3179       case "$arg" in P,* | -L* | -R* )
3180         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3181           {
3182 xe_runpath_dir="$dir"
3183   test "$xe_runpath_dir" != "/lib"     -a \
3184         "$xe_runpath_dir" != "/usr/lib" -a \
3185         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3186   eval "$xe_add_unique_runpath_dir"
3187 }
3188         done ;;
3189       esac
3190     done
3191     ld_switch_run="$ld_switch_run_save"
3192     rm -f conftest*
3193   else
3194         for arg in $ld_switch_site $ld_switch_x_site; do
3195       case "$arg" in -L*) {
3196 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3197   test "$xe_runpath_dir" != "/lib"     -a \
3198         "$xe_runpath_dir" != "/usr/lib" -a \
3199         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3200   eval "$xe_add_unique_runpath_dir"
3201 };; esac
3202     done
3203         if test "$opsys $need_motif" = "sol2 yes"; then
3204       xe_runpath_dir="/opt/SUNWdt/lib";
3205       eval "$xe_add_unique_runpath_dir";
3206     fi
3207   fi 
3208   if test -n "$runpath"; then
3209     ld_switch_run="${dash_r}${runpath}"
3210     
3211 if test "$GCC" = "yes"; then
3212   set x $ld_switch_run; shift; ld_switch_run=""
3213   while test -n "$1"; do
3214     case $1 in
3215       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3216       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3217       -Xlinker* ) ;;
3218       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3219     esac
3220     shift
3221   done
3222 fi
3223     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3224   fi
3225 fi
3226
3227
3228
3229 GNU_MALLOC=yes
3230 if test "$with_dlmalloc" != "no"; then
3231         doug_lea_malloc=yes
3232 else
3233         doug_lea_malloc=no
3234 fi
3235 after_morecore_hook_exists=yes
3236 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3237 echo "configure:3238: checking for malloc_set_state" >&5
3238
3239 cat > conftest.$ac_ext <<EOF
3240 #line 3241 "configure"
3241 #include "confdefs.h"
3242 /* System header to define __stub macros and hopefully few prototypes,
3243     which can conflict with char malloc_set_state(); below.  */
3244 #include <assert.h>
3245 /* Override any gcc2 internal prototype to avoid an error.  */
3246 /* We use char because int might match the return type of a gcc2
3247     builtin and then its argument prototype would still apply.  */
3248 char malloc_set_state();
3249
3250 int main() {
3251
3252 /* The GNU C library defines this for functions which it implements
3253     to always fail with ENOSYS.  Some functions are actually named
3254     something starting with __ and the normal name is an alias.  */
3255 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3256 choke me
3257 #else
3258 malloc_set_state();
3259 #endif
3260
3261 ; return 0; }
3262 EOF
3263 if { (eval echo configure:3264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3264   rm -rf conftest*
3265   eval "ac_cv_func_malloc_set_state=yes"
3266 else
3267   echo "configure: failed program was:" >&5
3268   cat conftest.$ac_ext >&5
3269   rm -rf conftest*
3270   eval "ac_cv_func_malloc_set_state=no"
3271 fi
3272 rm -f conftest*
3273
3274 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3275   echo "$ac_t""yes" 1>&6
3276   :
3277 else
3278   echo "$ac_t""no" 1>&6
3279 doug_lea_malloc=no
3280 fi
3281
3282 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3283 echo "configure:3284: checking whether __after_morecore_hook exists" >&5
3284 cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3287 extern void (* __after_morecore_hook)();
3288 int main() {
3289 __after_morecore_hook = 0
3290 ; return 0; }
3291 EOF
3292 if { (eval echo configure:3293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3293   rm -rf conftest*
3294   echo "$ac_t""yes" 1>&6
3295 else
3296   echo "configure: failed program was:" >&5
3297   cat conftest.$ac_ext >&5
3298   rm -rf conftest*
3299   echo "$ac_t""no" 1>&6
3300    after_morecore_hook_exists=no
3301 fi
3302 rm -f conftest*
3303 if test "$system_malloc" = "yes" ; then
3304   GNU_MALLOC=no
3305   GNU_MALLOC_reason="
3306     - The GNU allocators don't work with this system configuration."
3307 elif test "$with_system_malloc" = "yes" ; then
3308   GNU_MALLOC=no
3309   GNU_MALLOC_reason="
3310     - User chose not to use GNU allocators."
3311 elif test "$with_debug_malloc" = "yes" ; then
3312   GNU_MALLOC=no
3313   GNU_MALLOC_reason="
3314     - User chose to use Debugging Malloc."
3315 fi
3316
3317 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3318   GNU_MALLOC_reason="
3319     - Using Doug Lea's new malloc from the GNU C Library."
3320   { test "$extra_verbose" = "yes" && cat << \EOF
3321     Defining DOUG_LEA_MALLOC
3322 EOF
3323 cat >> confdefs.h <<\EOF
3324 #define DOUG_LEA_MALLOC 1
3325 EOF
3326 }
3327
3328   if test "$after_morecore_hook_exists" = "no" ; then
3329     GNU_MALLOC_reason="
3330     - Using Doug Lea's new malloc from the Linux C Library."
3331     { test "$extra_verbose" = "yes" && cat << \EOF
3332     Defining _NO_MALLOC_WARNING_
3333 EOF
3334 cat >> confdefs.h <<\EOF
3335 #define _NO_MALLOC_WARNING_ 1
3336 EOF
3337 }
3338
3339   fi
3340 fi
3341
3342
3343
3344
3345 # Extract the first word of "ranlib", so it can be a program name with args.
3346 set dummy ranlib; ac_word=$2
3347 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3348 echo "configure:3349: checking for $ac_word" >&5
3349
3350 if test -n "$RANLIB"; then
3351   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3352 else
3353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3354   ac_dummy="$PATH"
3355   for ac_dir in $ac_dummy; do
3356     test -z "$ac_dir" && ac_dir=.
3357     if test -f $ac_dir/$ac_word; then
3358       ac_cv_prog_RANLIB="ranlib"
3359       break
3360     fi
3361   done
3362   IFS="$ac_save_ifs"
3363   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3364 fi
3365 RANLIB="$ac_cv_prog_RANLIB"
3366 if test -n "$RANLIB"; then
3367   echo "$ac_t""$RANLIB" 1>&6
3368 else
3369   echo "$ac_t""no" 1>&6
3370 fi
3371
3372 ac_aux_dir=
3373 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3374   if test -f $ac_dir/install-sh; then
3375     ac_aux_dir=$ac_dir
3376     ac_install_sh="$ac_aux_dir/install-sh -c"
3377     break
3378   elif test -f $ac_dir/install.sh; then
3379     ac_aux_dir=$ac_dir
3380     ac_install_sh="$ac_aux_dir/install.sh -c"
3381     break
3382   fi
3383 done
3384 if test -z "$ac_aux_dir"; then
3385   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3386 fi
3387 ac_config_guess=$ac_aux_dir/config.guess
3388 ac_config_sub=$ac_aux_dir/config.sub
3389 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3390
3391 # Find a good install program.  We prefer a C program (faster),
3392 # so one script is as good as another.  But avoid the broken or
3393 # incompatible versions:
3394 # SysV /etc/install, /usr/sbin/install
3395 # SunOS /usr/etc/install
3396 # IRIX /sbin/install
3397 # AIX /bin/install
3398 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3399 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3400 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3401 # ./install, which can be erroneously created by make from ./install.sh.
3402 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3403 echo "configure:3404: checking for a BSD compatible install" >&5
3404 if test -z "$INSTALL"; then
3405
3406   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3407   for ac_dir in $PATH; do
3408     # Account for people who put trailing slashes in PATH elements.
3409     case "$ac_dir/" in
3410     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3411     *)
3412       # OSF1 and SCO ODT 3.0 have their own names for install.
3413       # Don't use installbsd from OSF since it installs stuff as root
3414       # by default.
3415       for ac_prog in ginstall scoinst install; do
3416         if test -f $ac_dir/$ac_prog; then
3417           if test $ac_prog = install &&
3418             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3419             # AIX install.  It has an incompatible calling convention.
3420             :
3421           else
3422             ac_cv_path_install="$ac_dir/$ac_prog -c"
3423             break 2
3424           fi
3425         fi
3426       done
3427       ;;
3428     esac
3429   done
3430   IFS="$ac_save_IFS"
3431
3432   if test "${ac_cv_path_install+set}" = set; then
3433     INSTALL="$ac_cv_path_install"
3434   else
3435     # As a last resort, use the slow shell script.  We don't cache a
3436     # path for INSTALL within a source directory, because that will
3437     # break other packages using the cache if that directory is
3438     # removed, or if the path is relative.
3439     INSTALL="$ac_install_sh"
3440   fi
3441 fi
3442 echo "$ac_t""$INSTALL" 1>&6
3443
3444 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3445 # It thinks the first close brace ends the variable substitution.
3446 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3447
3448 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3449
3450 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3451
3452 for ac_prog in 'bison -y' byacc
3453 do
3454 # Extract the first word of "$ac_prog", so it can be a program name with args.
3455 set dummy $ac_prog; ac_word=$2
3456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3457 echo "configure:3458: checking for $ac_word" >&5
3458
3459 if test -n "$YACC"; then
3460   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3461 else
3462   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3463   ac_dummy="$PATH"
3464   for ac_dir in $ac_dummy; do
3465     test -z "$ac_dir" && ac_dir=.
3466     if test -f $ac_dir/$ac_word; then
3467       ac_cv_prog_YACC="$ac_prog"
3468       break
3469     fi
3470   done
3471   IFS="$ac_save_ifs"
3472 fi
3473 YACC="$ac_cv_prog_YACC"
3474 if test -n "$YACC"; then
3475   echo "$ac_t""$YACC" 1>&6
3476 else
3477   echo "$ac_t""no" 1>&6
3478 fi
3479
3480 test -n "$YACC" && break
3481 done
3482 test -n "$YACC" || YACC="yacc"
3483
3484
3485 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 
3486 do
3487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3489 echo "configure:3490: checking for $ac_hdr" >&5
3490
3491 cat > conftest.$ac_ext <<EOF
3492 #line 3493 "configure"
3493 #include "confdefs.h"
3494 #include <$ac_hdr>
3495 EOF
3496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3497 { (eval echo configure:3498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3499 if test -z "$ac_err"; then
3500   rm -rf conftest*
3501   eval "ac_cv_header_$ac_safe=yes"
3502 else
3503   echo "$ac_err" >&5
3504   echo "configure: failed program was:" >&5
3505   cat conftest.$ac_ext >&5
3506   rm -rf conftest*
3507   eval "ac_cv_header_$ac_safe=no"
3508 fi
3509 rm -f conftest*
3510 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3511   echo "$ac_t""yes" 1>&6
3512     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3513   { test "$extra_verbose" = "yes" && cat << EOF
3514     Defining $ac_tr_hdr
3515 EOF
3516 cat >> confdefs.h <<EOF
3517 #define $ac_tr_hdr 1
3518 EOF
3519 }
3520  
3521 else
3522   echo "$ac_t""no" 1>&6
3523 fi
3524 done
3525
3526 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3527 echo "configure:3528: checking for sys/wait.h that is POSIX.1 compatible" >&5
3528
3529 cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 #include <sys/types.h>
3533 #include <sys/wait.h>
3534 #ifndef WEXITSTATUS
3535 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3536 #endif
3537 #ifndef WIFEXITED
3538 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3539 #endif
3540 int main() {
3541 int s;
3542 wait (&s);
3543 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3544 ; return 0; }
3545 EOF
3546 if { (eval echo configure:3547: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3547   rm -rf conftest*
3548   ac_cv_header_sys_wait_h=yes
3549 else
3550   echo "configure: failed program was:" >&5
3551   cat conftest.$ac_ext >&5
3552   rm -rf conftest*
3553   ac_cv_header_sys_wait_h=no
3554 fi
3555 rm -f conftest*
3556
3557 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3558 if test $ac_cv_header_sys_wait_h = yes; then
3559   { test "$extra_verbose" = "yes" && cat << \EOF
3560     Defining HAVE_SYS_WAIT_H
3561 EOF
3562 cat >> confdefs.h <<\EOF
3563 #define HAVE_SYS_WAIT_H 1
3564 EOF
3565 }
3566
3567 fi
3568
3569 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3570 echo "configure:3571: checking for ANSI C header files" >&5
3571
3572 cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <stdlib.h>
3576 #include <stdarg.h>
3577 #include <string.h>
3578 #include <float.h>
3579 EOF
3580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3581 { (eval echo configure:3582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3583 if test -z "$ac_err"; then
3584   rm -rf conftest*
3585   ac_cv_header_stdc=yes
3586 else
3587   echo "$ac_err" >&5
3588   echo "configure: failed program was:" >&5
3589   cat conftest.$ac_ext >&5
3590   rm -rf conftest*
3591   ac_cv_header_stdc=no
3592 fi
3593 rm -f conftest*
3594
3595 if test $ac_cv_header_stdc = yes; then
3596   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3597 cat > conftest.$ac_ext <<EOF
3598 #line 3599 "configure"
3599 #include "confdefs.h"
3600 #include <string.h>
3601 EOF
3602 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3603   egrep "memchr" >/dev/null 2>&1; then
3604   :
3605 else
3606   rm -rf conftest*
3607   ac_cv_header_stdc=no
3608 fi
3609 rm -f conftest*
3610
3611 fi
3612
3613 if test $ac_cv_header_stdc = yes; then
3614   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3615 cat > conftest.$ac_ext <<EOF
3616 #line 3617 "configure"
3617 #include "confdefs.h"
3618 #include <stdlib.h>
3619 EOF
3620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3621   egrep "free" >/dev/null 2>&1; then
3622   :
3623 else
3624   rm -rf conftest*
3625   ac_cv_header_stdc=no
3626 fi
3627 rm -f conftest*
3628
3629 fi
3630
3631 if test $ac_cv_header_stdc = yes; then
3632   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3633 cat > conftest.$ac_ext <<EOF
3634 #line 3635 "configure"
3635 #include "confdefs.h"
3636 #include <ctype.h>
3637 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3638 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3639 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3640 int main () { int i; for (i = 0; i < 256; i++)
3641 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3642 exit (0); }
3643
3644 EOF
3645 if { (eval echo configure:3646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3646 then
3647   :
3648 else
3649   conftest_rc="$?"
3650   echo "configure: failed program was:" >&5
3651   cat conftest.$ac_ext >&5
3652   rm -fr conftest*
3653   ac_cv_header_stdc=no
3654 fi
3655 rm -fr conftest*
3656 fi
3657
3658 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3659 if test $ac_cv_header_stdc = yes; then
3660   { test "$extra_verbose" = "yes" && cat << \EOF
3661     Defining STDC_HEADERS
3662 EOF
3663 cat >> confdefs.h <<\EOF
3664 #define STDC_HEADERS 1
3665 EOF
3666 }
3667
3668 fi
3669
3670 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3671 echo "configure:3672: checking whether time.h and sys/time.h may both be included" >&5
3672
3673 cat > conftest.$ac_ext <<EOF
3674 #line 3675 "configure"
3675 #include "confdefs.h"
3676 #include <sys/types.h>
3677 #include <sys/time.h>
3678 #include <time.h>
3679 int main() {
3680 struct tm *tp;
3681 ; return 0; }
3682 EOF
3683 if { (eval echo configure:3684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3684   rm -rf conftest*
3685   ac_cv_header_time=yes
3686 else
3687   echo "configure: failed program was:" >&5
3688   cat conftest.$ac_ext >&5
3689   rm -rf conftest*
3690   ac_cv_header_time=no
3691 fi
3692 rm -f conftest*
3693
3694 echo "$ac_t""$ac_cv_header_time" 1>&6
3695 if test $ac_cv_header_time = yes; then
3696   { test "$extra_verbose" = "yes" && cat << \EOF
3697     Defining TIME_WITH_SYS_TIME
3698 EOF
3699 cat >> confdefs.h <<\EOF
3700 #define TIME_WITH_SYS_TIME 1
3701 EOF
3702 }
3703
3704 fi
3705
3706 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3707 echo "configure:3708: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3708
3709 cat > conftest.$ac_ext <<EOF
3710 #line 3711 "configure"
3711 #include "confdefs.h"
3712 #include <sys/types.h>
3713 #include <signal.h>
3714 /* NetBSD declares sys_siglist in unistd.h.  */
3715 #ifdef HAVE_UNISTD_H
3716 #include <unistd.h>
3717 #endif
3718 int main() {
3719 char *msg = *(sys_siglist + 1);
3720 ; return 0; }
3721 EOF
3722 if { (eval echo configure:3723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3723   rm -rf conftest*
3724   ac_cv_decl_sys_siglist=yes
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728   rm -rf conftest*
3729   ac_cv_decl_sys_siglist=no
3730 fi
3731 rm -f conftest*
3732
3733 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3734 if test $ac_cv_decl_sys_siglist = yes; then
3735   { test "$extra_verbose" = "yes" && cat << \EOF
3736     Defining SYS_SIGLIST_DECLARED
3737 EOF
3738 cat >> confdefs.h <<\EOF
3739 #define SYS_SIGLIST_DECLARED 1
3740 EOF
3741 }
3742
3743 fi
3744
3745
3746
3747 echo $ac_n "checking for utime""... $ac_c" 1>&6
3748 echo "configure:3749: checking for utime" >&5
3749 cat > conftest.$ac_ext <<EOF
3750 #line 3751 "configure"
3751 #include "confdefs.h"
3752 #include <sys/types.h>
3753 #include <utime.h>
3754 int main() {
3755 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3756 ; return 0; }
3757 EOF
3758 if { (eval echo configure:3759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3759   rm -rf conftest*
3760   echo "$ac_t""yes" 1>&6
3761    { test "$extra_verbose" = "yes" && cat << \EOF
3762     Defining HAVE_UTIME
3763 EOF
3764 cat >> confdefs.h <<\EOF
3765 #define HAVE_UTIME 1
3766 EOF
3767 }
3768
3769 else
3770   echo "configure: failed program was:" >&5
3771   cat conftest.$ac_ext >&5
3772   rm -rf conftest*
3773   echo "$ac_t""no" 1>&6
3774       for ac_func in utimes
3775 do
3776 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3777 echo "configure:3778: checking for $ac_func" >&5
3778
3779 cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3782 /* System header to define __stub macros and hopefully few prototypes,
3783     which can conflict with char $ac_func(); below.  */
3784 #include <assert.h>
3785 /* Override any gcc2 internal prototype to avoid an error.  */
3786 /* We use char because int might match the return type of a gcc2
3787     builtin and then its argument prototype would still apply.  */
3788 char $ac_func();
3789
3790 int main() {
3791
3792 /* The GNU C library defines this for functions which it implements
3793     to always fail with ENOSYS.  Some functions are actually named
3794     something starting with __ and the normal name is an alias.  */
3795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3796 choke me
3797 #else
3798 $ac_func();
3799 #endif
3800
3801 ; return 0; }
3802 EOF
3803 if { (eval echo configure:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3804   rm -rf conftest*
3805   eval "ac_cv_func_$ac_func=yes"
3806 else
3807   echo "configure: failed program was:" >&5
3808   cat conftest.$ac_ext >&5
3809   rm -rf conftest*
3810   eval "ac_cv_func_$ac_func=no"
3811 fi
3812 rm -f conftest*
3813
3814 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3815   echo "$ac_t""yes" 1>&6
3816     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3817   { test "$extra_verbose" = "yes" && cat << EOF
3818     Defining $ac_tr_func
3819 EOF
3820 cat >> confdefs.h <<EOF
3821 #define $ac_tr_func 1
3822 EOF
3823 }
3824  
3825 else
3826   echo "$ac_t""no" 1>&6
3827 fi
3828 done
3829
3830 fi
3831 rm -f conftest*
3832
3833
3834 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3835 echo "configure:3836: checking return type of signal handlers" >&5
3836
3837 cat > conftest.$ac_ext <<EOF
3838 #line 3839 "configure"
3839 #include "confdefs.h"
3840 #include <sys/types.h>
3841 #include <signal.h>
3842 #ifdef signal
3843 #undef signal
3844 #endif
3845 #ifdef __cplusplus
3846 extern "C" void (*signal (int, void (*)(int)))(int);
3847 #else
3848 void (*signal ()) ();
3849 #endif
3850
3851 int main() {
3852 int i;
3853 ; return 0; }
3854 EOF
3855 if { (eval echo configure:3856: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3856   rm -rf conftest*
3857   ac_cv_type_signal=void
3858 else
3859   echo "configure: failed program was:" >&5
3860   cat conftest.$ac_ext >&5
3861   rm -rf conftest*
3862   ac_cv_type_signal=int
3863 fi
3864 rm -f conftest*
3865
3866 echo "$ac_t""$ac_cv_type_signal" 1>&6
3867 { test "$extra_verbose" = "yes" && cat << EOF
3868     Defining RETSIGTYPE = $ac_cv_type_signal
3869 EOF
3870 cat >> confdefs.h <<EOF
3871 #define RETSIGTYPE $ac_cv_type_signal
3872 EOF
3873 }
3874
3875
3876 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3877 echo "configure:3878: checking for size_t" >&5
3878
3879 cat > conftest.$ac_ext <<EOF
3880 #line 3881 "configure"
3881 #include "confdefs.h"
3882 #include <sys/types.h>
3883 #if STDC_HEADERS
3884 #include <stdlib.h>
3885 #include <stddef.h>
3886 #endif
3887 EOF
3888 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3889   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3890   rm -rf conftest*
3891   ac_cv_type_size_t=yes
3892 else
3893   rm -rf conftest*
3894   ac_cv_type_size_t=no
3895 fi
3896 rm -f conftest*
3897
3898 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3899 if test $ac_cv_type_size_t = no; then
3900   { test "$extra_verbose" = "yes" && cat << \EOF
3901     Defining size_t = unsigned
3902 EOF
3903 cat >> confdefs.h <<\EOF
3904 #define size_t unsigned
3905 EOF
3906 }
3907
3908 fi
3909
3910 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3911 echo "configure:3912: checking for pid_t" >&5
3912
3913 cat > conftest.$ac_ext <<EOF
3914 #line 3915 "configure"
3915 #include "confdefs.h"
3916 #include <sys/types.h>
3917 #if STDC_HEADERS
3918 #include <stdlib.h>
3919 #include <stddef.h>
3920 #endif
3921 EOF
3922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3923   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3924   rm -rf conftest*
3925   ac_cv_type_pid_t=yes
3926 else
3927   rm -rf conftest*
3928   ac_cv_type_pid_t=no
3929 fi
3930 rm -f conftest*
3931
3932 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3933 if test $ac_cv_type_pid_t = no; then
3934   { test "$extra_verbose" = "yes" && cat << \EOF
3935     Defining pid_t = int
3936 EOF
3937 cat >> confdefs.h <<\EOF
3938 #define pid_t int
3939 EOF
3940 }
3941
3942 fi
3943
3944 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3945 echo "configure:3946: checking for uid_t in sys/types.h" >&5
3946
3947 cat > conftest.$ac_ext <<EOF
3948 #line 3949 "configure"
3949 #include "confdefs.h"
3950 #include <sys/types.h>
3951 EOF
3952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3953   egrep "uid_t" >/dev/null 2>&1; then
3954   rm -rf conftest*
3955   ac_cv_type_uid_t=yes
3956 else
3957   rm -rf conftest*
3958   ac_cv_type_uid_t=no
3959 fi
3960 rm -f conftest*
3961
3962
3963 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3964 if test $ac_cv_type_uid_t = no; then
3965   { test "$extra_verbose" = "yes" && cat << \EOF
3966     Defining uid_t = int
3967 EOF
3968 cat >> confdefs.h <<\EOF
3969 #define uid_t int
3970 EOF
3971 }
3972
3973   { test "$extra_verbose" = "yes" && cat << \EOF
3974     Defining gid_t = int
3975 EOF
3976 cat >> confdefs.h <<\EOF
3977 #define gid_t int
3978 EOF
3979 }
3980
3981 fi
3982
3983 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3984 echo "configure:3985: checking for mode_t" >&5
3985
3986 cat > conftest.$ac_ext <<EOF
3987 #line 3988 "configure"
3988 #include "confdefs.h"
3989 #include <sys/types.h>
3990 #if STDC_HEADERS
3991 #include <stdlib.h>
3992 #include <stddef.h>
3993 #endif
3994 EOF
3995 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3996   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3997   rm -rf conftest*
3998   ac_cv_type_mode_t=yes
3999 else
4000   rm -rf conftest*
4001   ac_cv_type_mode_t=no
4002 fi
4003 rm -f conftest*
4004
4005 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4006 if test $ac_cv_type_mode_t = no; then
4007   { test "$extra_verbose" = "yes" && cat << \EOF
4008     Defining mode_t = int
4009 EOF
4010 cat >> confdefs.h <<\EOF
4011 #define mode_t int
4012 EOF
4013 }
4014
4015 fi
4016
4017 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4018 echo "configure:4019: checking for off_t" >&5
4019
4020 cat > conftest.$ac_ext <<EOF
4021 #line 4022 "configure"
4022 #include "confdefs.h"
4023 #include <sys/types.h>
4024 #if STDC_HEADERS
4025 #include <stdlib.h>
4026 #include <stddef.h>
4027 #endif
4028 EOF
4029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4030   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4031   rm -rf conftest*
4032   ac_cv_type_off_t=yes
4033 else
4034   rm -rf conftest*
4035   ac_cv_type_off_t=no
4036 fi
4037 rm -f conftest*
4038
4039 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4040 if test $ac_cv_type_off_t = no; then
4041   { test "$extra_verbose" = "yes" && cat << \EOF
4042     Defining off_t = long
4043 EOF
4044 cat >> confdefs.h <<\EOF
4045 #define off_t long
4046 EOF
4047 }
4048
4049 fi
4050
4051 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4052 echo "configure:4053: checking for ssize_t" >&5
4053
4054 cat > conftest.$ac_ext <<EOF
4055 #line 4056 "configure"
4056 #include "confdefs.h"
4057 #include <sys/types.h>
4058 #if STDC_HEADERS
4059 #include <stdlib.h>
4060 #include <stddef.h>
4061 #endif
4062 EOF
4063 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4064   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4065   rm -rf conftest*
4066   ac_cv_type_ssize_t=yes
4067 else
4068   rm -rf conftest*
4069   ac_cv_type_ssize_t=no
4070 fi
4071 rm -f conftest*
4072
4073 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4074 if test $ac_cv_type_ssize_t = no; then
4075   { test "$extra_verbose" = "yes" && cat << \EOF
4076     Defining ssize_t = int
4077 EOF
4078 cat >> confdefs.h <<\EOF
4079 #define ssize_t int
4080 EOF
4081 }
4082
4083 fi
4084
4085
4086 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4087 echo "configure:4088: checking for socklen_t" >&5
4088 cat > conftest.$ac_ext <<EOF
4089 #line 4090 "configure"
4090 #include "confdefs.h"
4091 #include <sys/types.h>
4092 #include <sys/socket.h>
4093 socklen_t x;
4094
4095 int main() {
4096
4097 ; return 0; }
4098 EOF
4099 if { (eval echo configure:4100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4100   rm -rf conftest*
4101   echo "$ac_t""yes" 1>&6
4102 else
4103   echo "configure: failed program was:" >&5
4104   cat conftest.$ac_ext >&5
4105   rm -rf conftest*
4106   
4107 cat > conftest.$ac_ext <<EOF
4108 #line 4109 "configure"
4109 #include "confdefs.h"
4110 #include <sys/types.h>
4111 #include <sys/socket.h>
4112 int accept (int, struct sockaddr *, size_t *);
4113
4114 int main() {
4115
4116 ; return 0; }
4117 EOF
4118 if { (eval echo configure:4119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4119   rm -rf conftest*
4120   
4121 echo "$ac_t""size_t" 1>&6
4122 { test "$extra_verbose" = "yes" && cat << \EOF
4123     Defining socklen_t = size_t
4124 EOF
4125 cat >> confdefs.h <<\EOF
4126 #define socklen_t size_t
4127 EOF
4128 }
4129
4130 else
4131   echo "configure: failed program was:" >&5
4132   cat conftest.$ac_ext >&5
4133   rm -rf conftest*
4134   
4135 echo "$ac_t""int" 1>&6
4136 { test "$extra_verbose" = "yes" && cat << \EOF
4137     Defining socklen_t = int
4138 EOF
4139 cat >> confdefs.h <<\EOF
4140 #define socklen_t int
4141 EOF
4142 }
4143
4144 fi
4145 rm -f conftest*
4146 fi
4147 rm -f conftest*
4148
4149 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4150 echo "configure:4151: checking for struct timeval" >&5
4151 cat > conftest.$ac_ext <<EOF
4152 #line 4153 "configure"
4153 #include "confdefs.h"
4154 #ifdef TIME_WITH_SYS_TIME
4155 #include <sys/time.h>
4156 #include <time.h>
4157 #else
4158 #ifdef HAVE_SYS_TIME_H
4159 #include <sys/time.h>
4160 #else
4161 #include <time.h>
4162 #endif
4163 #endif
4164 int main() {
4165 static struct timeval x; x.tv_sec = x.tv_usec;
4166 ; return 0; }
4167 EOF
4168 if { (eval echo configure:4169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4169   rm -rf conftest*
4170   echo "$ac_t""yes" 1>&6
4171   HAVE_TIMEVAL=yes
4172   { test "$extra_verbose" = "yes" && cat << \EOF
4173     Defining HAVE_TIMEVAL
4174 EOF
4175 cat >> confdefs.h <<\EOF
4176 #define HAVE_TIMEVAL 1
4177 EOF
4178 }
4179
4180 else
4181   echo "configure: failed program was:" >&5
4182   cat conftest.$ac_ext >&5
4183   rm -rf conftest*
4184   echo "$ac_t""no" 1>&6
4185    HAVE_TIMEVAL=no
4186 fi
4187 rm -f conftest*
4188
4189 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4190 echo "configure:4191: checking whether struct tm is in sys/time.h or time.h" >&5
4191
4192 cat > conftest.$ac_ext <<EOF
4193 #line 4194 "configure"
4194 #include "confdefs.h"
4195 #include <sys/types.h>
4196 #include <time.h>
4197 int main() {
4198 struct tm *tp; tp->tm_sec;
4199 ; return 0; }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202   rm -rf conftest*
4203   ac_cv_struct_tm=time.h
4204 else
4205   echo "configure: failed program was:" >&5
4206   cat conftest.$ac_ext >&5
4207   rm -rf conftest*
4208   ac_cv_struct_tm=sys/time.h
4209 fi
4210 rm -f conftest*
4211
4212 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4213 if test $ac_cv_struct_tm = sys/time.h; then
4214   { test "$extra_verbose" = "yes" && cat << \EOF
4215     Defining TM_IN_SYS_TIME
4216 EOF
4217 cat >> confdefs.h <<\EOF
4218 #define TM_IN_SYS_TIME 1
4219 EOF
4220 }
4221
4222 fi
4223
4224 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4225 echo "configure:4226: checking for tm_zone in struct tm" >&5
4226
4227 cat > conftest.$ac_ext <<EOF
4228 #line 4229 "configure"
4229 #include "confdefs.h"
4230 #include <sys/types.h>
4231 #include <$ac_cv_struct_tm>
4232 int main() {
4233 struct tm tm; tm.tm_zone;
4234 ; return 0; }
4235 EOF
4236 if { (eval echo configure:4237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4237   rm -rf conftest*
4238   ac_cv_struct_tm_zone=yes
4239 else
4240   echo "configure: failed program was:" >&5
4241   cat conftest.$ac_ext >&5
4242   rm -rf conftest*
4243   ac_cv_struct_tm_zone=no
4244 fi
4245 rm -f conftest*
4246
4247 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4248 if test "$ac_cv_struct_tm_zone" = yes; then
4249   { test "$extra_verbose" = "yes" && cat << \EOF
4250     Defining HAVE_TM_ZONE
4251 EOF
4252 cat >> confdefs.h <<\EOF
4253 #define HAVE_TM_ZONE 1
4254 EOF
4255 }
4256
4257 else
4258   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4259 echo "configure:4260: checking for tzname" >&5
4260
4261 cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 #include <time.h>
4265 #ifndef tzname /* For SGI.  */
4266 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4267 #endif
4268 int main() {
4269 atoi(*tzname);
4270 ; return 0; }
4271 EOF
4272 if { (eval echo configure:4273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4273   rm -rf conftest*
4274   ac_cv_var_tzname=yes
4275 else
4276   echo "configure: failed program was:" >&5
4277   cat conftest.$ac_ext >&5
4278   rm -rf conftest*
4279   ac_cv_var_tzname=no
4280 fi
4281 rm -f conftest*
4282
4283 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4284   if test $ac_cv_var_tzname = yes; then
4285     { test "$extra_verbose" = "yes" && cat << \EOF
4286     Defining HAVE_TZNAME
4287 EOF
4288 cat >> confdefs.h <<\EOF
4289 #define HAVE_TZNAME 1
4290 EOF
4291 }
4292
4293   fi
4294 fi
4295
4296
4297 echo $ac_n "checking for working const""... $ac_c" 1>&6
4298 echo "configure:4299: checking for working const" >&5
4299
4300 cat > conftest.$ac_ext <<EOF
4301 #line 4302 "configure"
4302 #include "confdefs.h"
4303
4304 int main() {
4305
4306 /* Ultrix mips cc rejects this.  */
4307 typedef int charset[2]; const charset x;
4308 /* SunOS 4.1.1 cc rejects this.  */
4309 char const *const *ccp;
4310 char **p;
4311 /* NEC SVR4.0.2 mips cc rejects this.  */
4312 struct point {int x, y;};
4313 static struct point const zero = {0,0};
4314 /* AIX XL C 1.02.0.0 rejects this.
4315    It does not let you subtract one const X* pointer from another in an arm
4316    of an if-expression whose if-part is not a constant expression */
4317 const char *g = "string";
4318 ccp = &g + (g ? g-g : 0);
4319 /* HPUX 7.0 cc rejects these. */
4320 ++ccp;
4321 p = (char**) ccp;
4322 ccp = (char const *const *) p;
4323 { /* SCO 3.2v4 cc rejects this.  */
4324   char *t;
4325   char const *s = 0 ? (char *) 0 : (char const *) 0;
4326
4327   *t++ = 0;
4328 }
4329 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4330   int x[] = {25, 17};
4331   const int *foo = &x[0];
4332   ++foo;
4333 }
4334 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4335   typedef const int *iptr;
4336   iptr p = 0;
4337   ++p;
4338 }
4339 { /* AIX XL C 1.02.0.0 rejects this saying
4340      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4341   struct s { int j; const int *ap[3]; };
4342   struct s *b; b->j = 5;
4343 }
4344 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4345   const int foo = 10;
4346 }
4347
4348 ; return 0; }
4349 EOF
4350 if { (eval echo configure:4351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4351   rm -rf conftest*
4352   ac_cv_c_const=yes
4353 else
4354   echo "configure: failed program was:" >&5
4355   cat conftest.$ac_ext >&5
4356   rm -rf conftest*
4357   ac_cv_c_const=no
4358 fi
4359 rm -f conftest*
4360
4361 echo "$ac_t""$ac_cv_c_const" 1>&6
4362 if test $ac_cv_c_const = no; then
4363   { test "$extra_verbose" = "yes" && cat << \EOF
4364     Defining const = 
4365 EOF
4366 cat >> confdefs.h <<\EOF
4367 #define const 
4368 EOF
4369 }
4370
4371 fi
4372
4373
4374 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4375 echo "configure:4376: checking whether ${MAKE-make} sets \${MAKE}" >&5
4376 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4377
4378 cat > conftestmake <<\EOF
4379 all:
4380         @echo 'ac_maketemp="${MAKE}"'
4381 EOF
4382 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4383 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4384 if test -n "$ac_maketemp"; then
4385   eval ac_cv_prog_make_${ac_make}_set=yes
4386 else
4387   eval ac_cv_prog_make_${ac_make}_set=no
4388 fi
4389 rm -f conftestmake
4390 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4391   echo "$ac_t""yes" 1>&6
4392   SET_MAKE=
4393 else
4394   echo "$ac_t""no" 1>&6
4395   SET_MAKE="MAKE=${MAKE-make}"
4396 fi
4397
4398
4399 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4400 echo "configure:4401: checking whether byte ordering is bigendian" >&5
4401
4402 ac_cv_c_bigendian=unknown
4403 # See if sys/param.h defines the BYTE_ORDER macro.
4404 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 #include <sys/types.h>
4408 #include <sys/param.h>
4409 int main() {
4410
4411 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4412  bogus endian macros
4413 #endif
4414 ; return 0; }
4415 EOF
4416 if { (eval echo configure:4417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4417   rm -rf conftest*
4418   # It does; now see whether it defined to BIG_ENDIAN or not.
4419 cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422 #include <sys/types.h>
4423 #include <sys/param.h>
4424 int main() {
4425
4426 #if BYTE_ORDER != BIG_ENDIAN
4427  not big endian
4428 #endif
4429 ; return 0; }
4430 EOF
4431 if { (eval echo configure:4432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4432   rm -rf conftest*
4433   ac_cv_c_bigendian=yes
4434 else
4435   echo "configure: failed program was:" >&5
4436   cat conftest.$ac_ext >&5
4437   rm -rf conftest*
4438   ac_cv_c_bigendian=no
4439 fi
4440 rm -f conftest*
4441 else
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444 fi
4445 rm -f conftest*
4446 if test $ac_cv_c_bigendian = unknown; then
4447 cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 main () {
4451   /* Are we little or big endian?  From Harbison&Steele.  */
4452   union
4453   {
4454     long l;
4455     char c[sizeof (long)];
4456   } u;
4457   u.l = 1;
4458   exit (u.c[sizeof (long) - 1] == 1);
4459 }
4460 EOF
4461 if { (eval echo configure:4462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4462 then
4463   ac_cv_c_bigendian=no
4464 else
4465   conftest_rc="$?"
4466   echo "configure: failed program was:" >&5
4467   cat conftest.$ac_ext >&5
4468   rm -fr conftest*
4469   ac_cv_c_bigendian=yes
4470 fi
4471 rm -fr conftest*
4472 fi
4473
4474 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4475 if test $ac_cv_c_bigendian = yes; then
4476   { test "$extra_verbose" = "yes" && cat << \EOF
4477     Defining WORDS_BIGENDIAN
4478 EOF
4479 cat >> confdefs.h <<\EOF
4480 #define WORDS_BIGENDIAN 1
4481 EOF
4482 }
4483
4484 fi
4485
4486
4487 echo $ac_n "checking size of short""... $ac_c" 1>&6
4488 echo "configure:4489: checking size of short" >&5
4489
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <stdio.h>
4494 #include <sys/types.h>
4495 main()
4496 {
4497   FILE *f=fopen("conftestval", "w");
4498   if (!f) exit(1);
4499   fprintf(f, "%d\n", sizeof(short));
4500   exit(0);
4501 }
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4504 then
4505   ac_cv_sizeof_short=`cat conftestval`
4506 else
4507   conftest_rc="$?"
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -fr conftest*
4511   ac_cv_sizeof_short=0
4512 fi
4513 rm -fr conftest*
4514 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4515 { test "$extra_verbose" = "yes" && cat << EOF
4516     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4517 EOF
4518 cat >> confdefs.h <<EOF
4519 #define SIZEOF_SHORT $ac_cv_sizeof_short
4520 EOF
4521 }
4522
4523
4524 if test "$ac_cv_sizeof_short" = 0; then
4525   echo ""
4526   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4527   echo "*** PANIC *** Please examine config.log for compilation errors."
4528   exit 1
4529 fi
4530 echo $ac_n "checking size of int""... $ac_c" 1>&6
4531 echo "configure:4532: checking size of int" >&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(int));
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_int=`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_int=0
4555 fi
4556 rm -fr conftest*
4557 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4558 { test "$extra_verbose" = "yes" && cat << EOF
4559     Defining SIZEOF_INT = $ac_cv_sizeof_int
4560 EOF
4561 cat >> confdefs.h <<EOF
4562 #define SIZEOF_INT $ac_cv_sizeof_int
4563 EOF
4564 }
4565
4566
4567 echo $ac_n "checking size of long""... $ac_c" 1>&6
4568 echo "configure:4569: checking size of 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));
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=`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=0
4592 fi
4593 rm -fr conftest*
4594 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4595 { test "$extra_verbose" = "yes" && cat << EOF
4596     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4597 EOF
4598 cat >> confdefs.h <<EOF
4599 #define SIZEOF_LONG $ac_cv_sizeof_long
4600 EOF
4601 }
4602
4603
4604 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4605 echo "configure:4606: checking size of long long" >&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(long long));
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_long_long=`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_long_long=0
4629 fi
4630 rm -fr conftest*
4631 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4632 { test "$extra_verbose" = "yes" && cat << EOF
4633     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4634 EOF
4635 cat >> confdefs.h <<EOF
4636 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4637 EOF
4638 }
4639
4640
4641 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4642 echo "configure:4643: checking size of void *" >&5
4643
4644 cat > conftest.$ac_ext <<EOF
4645 #line 4646 "configure"
4646 #include "confdefs.h"
4647 #include <stdio.h>
4648 #include <sys/types.h>
4649 main()
4650 {
4651   FILE *f=fopen("conftestval", "w");
4652   if (!f) exit(1);
4653   fprintf(f, "%d\n", sizeof(void *));
4654   exit(0);
4655 }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4658 then
4659   ac_cv_sizeof_void_p=`cat conftestval`
4660 else
4661   conftest_rc="$?"
4662   echo "configure: failed program was:" >&5
4663   cat conftest.$ac_ext >&5
4664   rm -fr conftest*
4665   ac_cv_sizeof_void_p=0
4666 fi
4667 rm -fr conftest*
4668 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4669 { test "$extra_verbose" = "yes" && cat << EOF
4670     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4671 EOF
4672 cat >> confdefs.h <<EOF
4673 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4674 EOF
4675 }
4676
4677
4678
4679 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4680 echo "configure:4681: checking for long file names" >&5
4681
4682 ac_cv_sys_long_file_names=yes
4683 # Test for long file names in all the places we know might matter:
4684 #      .                the current directory, where building will happen
4685 #      $prefix/lib      where we will be installing things
4686 #      $exec_prefix/lib likewise
4687 # eval it to expand exec_prefix.
4688 #      $TMPDIR          if set, where it might want to write temporary files
4689 # if $TMPDIR is not set:
4690 #      /tmp             where it might want to write temporary files
4691 #      /var/tmp         likewise
4692 #      /usr/tmp         likewise
4693 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4694   ac_tmpdirs="$TMPDIR"
4695 else
4696   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4697 fi
4698 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4699   test -d $ac_dir || continue
4700   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4701   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4702   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4703   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4704   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4705     ac_cv_sys_long_file_names=no
4706     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4707     break
4708   fi
4709   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4710 done
4711
4712 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4713 if test $ac_cv_sys_long_file_names = yes; then
4714   { test "$extra_verbose" = "yes" && cat << \EOF
4715     Defining HAVE_LONG_FILE_NAMES
4716 EOF
4717 cat >> confdefs.h <<\EOF
4718 #define HAVE_LONG_FILE_NAMES 1
4719 EOF
4720 }
4721
4722 fi
4723
4724
4725 echo $ac_n "checking for sin""... $ac_c" 1>&6
4726 echo "configure:4727: checking for sin" >&5
4727
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731 /* System header to define __stub macros and hopefully few prototypes,
4732     which can conflict with char sin(); below.  */
4733 #include <assert.h>
4734 /* Override any gcc2 internal prototype to avoid an error.  */
4735 /* We use char because int might match the return type of a gcc2
4736     builtin and then its argument prototype would still apply.  */
4737 char sin();
4738
4739 int main() {
4740
4741 /* The GNU C library defines this for functions which it implements
4742     to always fail with ENOSYS.  Some functions are actually named
4743     something starting with __ and the normal name is an alias.  */
4744 #if defined (__stub_sin) || defined (__stub___sin)
4745 choke me
4746 #else
4747 sin();
4748 #endif
4749
4750 ; return 0; }
4751 EOF
4752 if { (eval echo configure:4753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4753   rm -rf conftest*
4754   eval "ac_cv_func_sin=yes"
4755 else
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   eval "ac_cv_func_sin=no"
4760 fi
4761 rm -f conftest*
4762
4763 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4764   echo "$ac_t""yes" 1>&6
4765   :
4766 else
4767   echo "$ac_t""no" 1>&6
4768
4769 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4770 echo "configure:4771: checking for sin in -lm" >&5
4771 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4772
4773 xe_check_libs=" -lm "
4774 cat > conftest.$ac_ext <<EOF
4775 #line 4776 "configure"
4776 #include "confdefs.h"
4777 /* Override any gcc2 internal prototype to avoid an error.  */
4778 /* We use char because int might match the return type of a gcc2
4779     builtin and then its argument prototype would still apply.  */
4780 char sin();
4781
4782 int main() {
4783 sin()
4784 ; return 0; }
4785 EOF
4786 if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4787   rm -rf conftest*
4788   eval "ac_cv_lib_$ac_lib_var=yes"
4789 else
4790   echo "configure: failed program was:" >&5
4791   cat conftest.$ac_ext >&5
4792   rm -rf conftest*
4793   eval "ac_cv_lib_$ac_lib_var=no"
4794 fi
4795 rm -f conftest*
4796 xe_check_libs=""
4797
4798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4799   echo "$ac_t""yes" 1>&6
4800     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4801     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4802   { test "$extra_verbose" = "yes" && cat << EOF
4803     Defining $ac_tr_lib
4804 EOF
4805 cat >> confdefs.h <<EOF
4806 #define $ac_tr_lib 1
4807 EOF
4808 }
4809
4810   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4811
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815
4816
4817 fi
4818
4819
4820 { test "$extra_verbose" = "yes" && cat << \EOF
4821     Defining LISP_FLOAT_TYPE
4822 EOF
4823 cat >> confdefs.h <<\EOF
4824 #define LISP_FLOAT_TYPE 1
4825 EOF
4826 }
4827
4828
4829 cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832 #include <math.h>
4833 int main() {
4834 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   { test "$extra_verbose" = "yes" && cat << \EOF
4840     Defining HAVE_INVERSE_HYPERBOLIC
4841 EOF
4842 cat >> confdefs.h <<\EOF
4843 #define HAVE_INVERSE_HYPERBOLIC 1
4844 EOF
4845 }
4846
4847 else
4848   echo "configure: failed program was:" >&5
4849   cat conftest.$ac_ext >&5
4850 fi
4851 rm -f conftest*
4852
4853 echo "checking type of mail spool file locking" 1>&6
4854 echo "configure:4855: checking type of mail spool file locking" >&5
4855 for ac_func in lockf flock
4856 do
4857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4858 echo "configure:4859: checking for $ac_func" >&5
4859
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4863 /* System header to define __stub macros and hopefully few prototypes,
4864     which can conflict with char $ac_func(); below.  */
4865 #include <assert.h>
4866 /* Override any gcc2 internal prototype to avoid an error.  */
4867 /* We use char because int might match the return type of a gcc2
4868     builtin and then its argument prototype would still apply.  */
4869 char $ac_func();
4870
4871 int main() {
4872
4873 /* The GNU C library defines this for functions which it implements
4874     to always fail with ENOSYS.  Some functions are actually named
4875     something starting with __ and the normal name is an alias.  */
4876 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4877 choke me
4878 #else
4879 $ac_func();
4880 #endif
4881
4882 ; return 0; }
4883 EOF
4884 if { (eval echo configure:4885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4885   rm -rf conftest*
4886   eval "ac_cv_func_$ac_func=yes"
4887 else
4888   echo "configure: failed program was:" >&5
4889   cat conftest.$ac_ext >&5
4890   rm -rf conftest*
4891   eval "ac_cv_func_$ac_func=no"
4892 fi
4893 rm -f conftest*
4894
4895 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4896   echo "$ac_t""yes" 1>&6
4897     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4898   { test "$extra_verbose" = "yes" && cat << EOF
4899     Defining $ac_tr_func
4900 EOF
4901 cat >> confdefs.h <<EOF
4902 #define $ac_tr_func 1
4903 EOF
4904 }
4905  
4906 else
4907   echo "$ac_t""no" 1>&6
4908 fi
4909 done
4910
4911 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4912 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4913 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4914 if   test -z "$mail_locking"; then
4915   case "$opsys" in cygwin* | mingw*)
4916     mail_locking=pop ;;
4917   esac
4918 fi
4919
4920 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4921     Defining MAIL_LOCK_LOCKF
4922 EOF
4923 cat >> confdefs.h <<\EOF
4924 #define MAIL_LOCK_LOCKF 1
4925 EOF
4926 }
4927
4928 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4929     Defining MAIL_LOCK_FLOCK
4930 EOF
4931 cat >> confdefs.h <<\EOF
4932 #define MAIL_LOCK_FLOCK 1
4933 EOF
4934 }
4935
4936 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4937     Defining MAIL_LOCK_LOCKING
4938 EOF
4939 cat >> confdefs.h <<\EOF
4940 #define MAIL_LOCK_LOCKING 1
4941 EOF
4942 }
4943
4944 elif test "$mail_locking" = "pop"; then
4945   with_pop=yes
4946   mail_locking=
4947 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4948     Defining MAIL_LOCK_DOT
4949 EOF
4950 cat >> confdefs.h <<\EOF
4951 #define MAIL_LOCK_DOT 1
4952 EOF
4953 }
4954
4955 fi
4956 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4957   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4958 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4959   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4960 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4961   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4962
4963 case "$opsys" in decosf*)
4964   
4965 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4966 echo "configure:4967: checking for cma_open in -lpthreads" >&5
4967 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4968
4969 xe_check_libs=" -lpthreads "
4970 cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973 /* Override any gcc2 internal prototype to avoid an error.  */
4974 /* We use char because int might match the return type of a gcc2
4975     builtin and then its argument prototype would still apply.  */
4976 char cma_open();
4977
4978 int main() {
4979 cma_open()
4980 ; return 0; }
4981 EOF
4982 if { (eval echo configure:4983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4983   rm -rf conftest*
4984   eval "ac_cv_lib_$ac_lib_var=yes"
4985 else
4986   echo "configure: failed program was:" >&5
4987   cat conftest.$ac_ext >&5
4988   rm -rf conftest*
4989   eval "ac_cv_lib_$ac_lib_var=no"
4990 fi
4991 rm -f conftest*
4992 xe_check_libs=""
4993
4994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4995   echo "$ac_t""yes" 1>&6
4996     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4997     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4998   { test "$extra_verbose" = "yes" && cat << EOF
4999     Defining $ac_tr_lib
5000 EOF
5001 cat >> confdefs.h <<EOF
5002 #define $ac_tr_lib 1
5003 EOF
5004 }
5005
5006   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5007
5008 else
5009   echo "$ac_t""no" 1>&6
5010 fi
5011
5012
5013   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5014     c_switch_site="$c_switch_site -threads" ;;
5015 esac
5016
5017
5018 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5019 echo "configure:5020: checking whether the -xildoff compiler flag is required" >&5
5020 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5021   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5022     then echo "$ac_t""no" 1>&6;
5023     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
5024   fi
5025   else echo "$ac_t""no" 1>&6
5026 fi
5027
5028 if test "$opsys" = "sol2"; then
5029   if test "$os_release" -ge 56; then
5030     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5031 echo "configure:5032: checking for \"-z ignore\" linker flag" >&5
5032     case "`ld -h 2>&1`" in
5033       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5034         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5035       *) echo "$ac_t""no" 1>&6 ;;
5036     esac
5037   fi
5038 fi
5039
5040
5041 echo "checking "for specified window system"" 1>&6
5042 echo "configure:5043: checking "for specified window system"" >&5
5043
5044
5045 GNOME_CONFIG=no
5046 GTK_CONFIG=no
5047
5048 if test "$with_gnome" != "no"; then
5049    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5050 echo "configure:5051: checking for GNOME configuration script" >&5
5051    for possible in gnome-config
5052    do
5053       possible_version=`${possible} --version 2> /dev/null`
5054       if test "x${possible_version}" != "x"; then
5055               GNOME_CONFIG="${possible}"
5056               with_gnome=yes
5057               with_gtk=yes
5058               break
5059       fi
5060    done
5061    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5062 fi
5063
5064 if test "${GNOME_CONFIG}" != "no"; then
5065       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5066       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5067       { test "$extra_verbose" = "yes" && cat << \EOF
5068     Defining HAVE_GNOME
5069 EOF
5070 cat >> confdefs.h <<\EOF
5071 #define HAVE_GNOME 1
5072 EOF
5073 }
5074
5075       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5076       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5077 fi
5078
5079 if test "$with_gtk" != "no";then
5080    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5081 echo "configure:5082: checking for GTK configuration script" >&5
5082    for possible in gtk12-config gtk14-config gtk-config
5083    do
5084       possible_version=`${possible} --version 2> /dev/null`
5085       if test "x${possible_version}" != "x"; then
5086               GTK_CONFIG="${possible}"
5087       fi
5088       case "${possible_version}" in
5089         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5090         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5091         1.2.*)
5092                 with_gtk=yes
5093                 break
5094                 ;;
5095         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5096       esac
5097    done
5098    echo "$ac_t""${GTK_CONFIG}" 1>&6
5099 fi
5100
5101 if test "${GTK_CONFIG}" != "no"; then
5102       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5103 echo "configure:5104: checking gtk version" >&5
5104       GTK_VERSION=`${GTK_CONFIG} --version`
5105       echo "$ac_t""${GTK_VERSION}" 1>&6
5106
5107       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5108 echo "configure:5109: checking gtk libs" >&5
5109       GTK_LIBS=`${GTK_CONFIG} --libs`
5110       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5111       echo "$ac_t""${GTK_LIBS}" 1>&6
5112
5113       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5114 echo "configure:5115: checking gtk cflags" >&5
5115       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5116       if test "$GCC" = "yes"; then
5117         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5118       fi
5119       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5120       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5121
5122       
5123 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5124 echo "configure:5125: checking for main in -lgdk_imlib" >&5
5125 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5126
5127 xe_check_libs=" -lgdk_imlib "
5128 cat > conftest.$ac_ext <<EOF
5129 #line 5130 "configure"
5130 #include "confdefs.h"
5131
5132 int main() {
5133 main()
5134 ; return 0; }
5135 EOF
5136 if { (eval echo configure:5137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5137   rm -rf conftest*
5138   eval "ac_cv_lib_$ac_lib_var=yes"
5139 else
5140   echo "configure: failed program was:" >&5
5141   cat conftest.$ac_ext >&5
5142   rm -rf conftest*
5143   eval "ac_cv_lib_$ac_lib_var=no"
5144 fi
5145 rm -f conftest*
5146 xe_check_libs=""
5147
5148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5149   echo "$ac_t""yes" 1>&6
5150   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5151 else
5152   echo "$ac_t""no" 1>&6
5153 fi
5154
5155
5156       
5157 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5158 echo "configure:5159: checking for Imlib_init in -lImlib" >&5
5159 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5160
5161 xe_check_libs=" -lImlib "
5162 cat > conftest.$ac_ext <<EOF
5163 #line 5164 "configure"
5164 #include "confdefs.h"
5165 /* Override any gcc2 internal prototype to avoid an error.  */
5166 /* We use char because int might match the return type of a gcc2
5167     builtin and then its argument prototype would still apply.  */
5168 char Imlib_init();
5169
5170 int main() {
5171 Imlib_init()
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175   rm -rf conftest*
5176   eval "ac_cv_lib_$ac_lib_var=yes"
5177 else
5178   echo "configure: failed program was:" >&5
5179   cat conftest.$ac_ext >&5
5180   rm -rf conftest*
5181   eval "ac_cv_lib_$ac_lib_var=no"
5182 fi
5183 rm -f conftest*
5184 xe_check_libs=""
5185
5186 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5187   echo "$ac_t""yes" 1>&6
5188   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5189 else
5190   echo "$ac_t""no" 1>&6
5191 fi
5192
5193
5194       for ac_func in gdk_imlib_init
5195 do
5196 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5197 echo "configure:5198: checking for $ac_func" >&5
5198
5199 cat > conftest.$ac_ext <<EOF
5200 #line 5201 "configure"
5201 #include "confdefs.h"
5202 /* System header to define __stub macros and hopefully few prototypes,
5203     which can conflict with char $ac_func(); below.  */
5204 #include <assert.h>
5205 /* Override any gcc2 internal prototype to avoid an error.  */
5206 /* We use char because int might match the return type of a gcc2
5207     builtin and then its argument prototype would still apply.  */
5208 char $ac_func();
5209
5210 int main() {
5211
5212 /* The GNU C library defines this for functions which it implements
5213     to always fail with ENOSYS.  Some functions are actually named
5214     something starting with __ and the normal name is an alias.  */
5215 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5216 choke me
5217 #else
5218 $ac_func();
5219 #endif
5220
5221 ; return 0; }
5222 EOF
5223 if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5224   rm -rf conftest*
5225   eval "ac_cv_func_$ac_func=yes"
5226 else
5227   echo "configure: failed program was:" >&5
5228   cat conftest.$ac_ext >&5
5229   rm -rf conftest*
5230   eval "ac_cv_func_$ac_func=no"
5231 fi
5232 rm -f conftest*
5233
5234 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5235   echo "$ac_t""yes" 1>&6
5236     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5237   { test "$extra_verbose" = "yes" && cat << EOF
5238     Defining $ac_tr_func
5239 EOF
5240 cat >> confdefs.h <<EOF
5241 #define $ac_tr_func 1
5242 EOF
5243 }
5244  
5245 else
5246   echo "$ac_t""no" 1>&6
5247 fi
5248 done
5249
5250
5251       { test "$extra_verbose" = "yes" && cat << \EOF
5252     Defining HAVE_XPM
5253 EOF
5254 cat >> confdefs.h <<\EOF
5255 #define HAVE_XPM 1
5256 EOF
5257 }
5258
5259       { test "$extra_verbose" = "yes" && cat << \EOF
5260     Defining HAVE_GTK
5261 EOF
5262 cat >> confdefs.h <<\EOF
5263 #define HAVE_GTK 1
5264 EOF
5265 }
5266
5267       
5268
5269       window_system=gtk
5270       with_gtk=yes
5271       with_x11=no
5272
5273       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5274       test "${with_toolbars}" != no && with_toolbars=gtk
5275       test "${with_menubars}" != "no" && with_menubars=gtk
5276       test "${with_dialogs}" != "no" && with_dialogs=gtk
5277       test "${with_widgets}" != "no" && with_widgets=gtk
5278
5279       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5280    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5281  fi
5282       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5283    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5284  fi
5285       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5286    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5287  fi
5288       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5289    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5290  fi
5291
5292             OLD_CFLAGS="${CFLAGS}"
5293       OLD_CPPFLAGS="${CPPFLAGS}"
5294       OLD_LDFLAGS="${LDFLAGS}"
5295       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5296       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5297       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5298       for ac_hdr in glade/glade.h glade.h
5299 do
5300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5302 echo "configure:5303: checking for $ac_hdr" >&5
5303
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307 #include <$ac_hdr>
5308 EOF
5309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5310 { (eval echo configure:5311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5312 if test -z "$ac_err"; then
5313   rm -rf conftest*
5314   eval "ac_cv_header_$ac_safe=yes"
5315 else
5316   echo "$ac_err" >&5
5317   echo "configure: failed program was:" >&5
5318   cat conftest.$ac_ext >&5
5319   rm -rf conftest*
5320   eval "ac_cv_header_$ac_safe=no"
5321 fi
5322 rm -f conftest*
5323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5324   echo "$ac_t""yes" 1>&6
5325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5326   { test "$extra_verbose" = "yes" && cat << EOF
5327     Defining $ac_tr_hdr
5328 EOF
5329 cat >> confdefs.h <<EOF
5330 #define $ac_tr_hdr 1
5331 EOF
5332 }
5333  
5334 else
5335   echo "$ac_t""no" 1>&6
5336 fi
5337 done
5338
5339       
5340 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5341 echo "configure:5342: checking for main in -lxml" >&5
5342 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5343
5344 xe_check_libs=" -lxml "
5345 cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348
5349 int main() {
5350 main()
5351 ; return 0; }
5352 EOF
5353 if { (eval echo configure:5354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5354   rm -rf conftest*
5355   eval "ac_cv_lib_$ac_lib_var=yes"
5356 else
5357   echo "configure: failed program was:" >&5
5358   cat conftest.$ac_ext >&5
5359   rm -rf conftest*
5360   eval "ac_cv_lib_$ac_lib_var=no"
5361 fi
5362 rm -f conftest*
5363 xe_check_libs=""
5364
5365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5366   echo "$ac_t""yes" 1>&6
5367   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5368 else
5369   echo "$ac_t""no" 1>&6
5370 fi
5371
5372
5373       
5374 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5375 echo "configure:5376: checking for main in -lglade" >&5
5376 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5377
5378 xe_check_libs=" -lglade "
5379 cat > conftest.$ac_ext <<EOF
5380 #line 5381 "configure"
5381 #include "confdefs.h"
5382
5383 int main() {
5384 main()
5385 ; return 0; }
5386 EOF
5387 if { (eval echo configure:5388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5388   rm -rf conftest*
5389   eval "ac_cv_lib_$ac_lib_var=yes"
5390 else
5391   echo "configure: failed program was:" >&5
5392   cat conftest.$ac_ext >&5
5393   rm -rf conftest*
5394   eval "ac_cv_lib_$ac_lib_var=no"
5395 fi
5396 rm -f conftest*
5397 xe_check_libs=""
5398
5399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5400   echo "$ac_t""yes" 1>&6
5401   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5402 else
5403   echo "$ac_t""no" 1>&6
5404 fi
5405
5406
5407       
5408 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5409 echo "configure:5410: checking for main in -lglade-gnome" >&5
5410 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5411
5412 xe_check_libs=" -lglade-gnome "
5413 cat > conftest.$ac_ext <<EOF
5414 #line 5415 "configure"
5415 #include "confdefs.h"
5416
5417 int main() {
5418 main()
5419 ; return 0; }
5420 EOF
5421 if { (eval echo configure:5422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5422   rm -rf conftest*
5423   eval "ac_cv_lib_$ac_lib_var=yes"
5424 else
5425   echo "configure: failed program was:" >&5
5426   cat conftest.$ac_ext >&5
5427   rm -rf conftest*
5428   eval "ac_cv_lib_$ac_lib_var=no"
5429 fi
5430 rm -f conftest*
5431 xe_check_libs=""
5432
5433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5434   echo "$ac_t""yes" 1>&6
5435   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5436 else
5437   echo "$ac_t""no" 1>&6
5438 fi
5439
5440
5441       cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 #include <glade/glade-xml.h>
5445 EOF
5446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5447   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5448   rm -rf conftest*
5449   echo "$ac_t""yes" 1>&6
5450                        { test "$extra_verbose" = "yes" && cat << \EOF
5451     Defining LIBGLADE_XML_TXTDOMAIN = 1
5452 EOF
5453 cat >> confdefs.h <<\EOF
5454 #define LIBGLADE_XML_TXTDOMAIN 1
5455 EOF
5456 }
5457
5458 else
5459   rm -rf conftest*
5460   echo "$ac_t""no" 1>&6
5461 fi
5462 rm -f conftest*
5463
5464       CFLAGS="${OLD_CFLAGS}"
5465       CPPFLAGS="${OLD_CPPFLAGS}"
5466       LDFLAGS="${OLD_LDFLAGS}"
5467 fi
5468
5469
5470 if test "$with_x11" != "no"; then
5471     test "$x_includes $x_libraries" != "NONE NONE" && \
5472    window_system=x11 with_x11=yes
5473
5474         
5475       if test "$x_includes $x_libraries" = "NONE NONE" \
5476     -a -n "$OPENWINHOME" \
5477     -a "$OPENWINHOME" != "/usr/openwin" \
5478     -a -d "$OPENWINHOME"; then
5479       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5480       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5481       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5482   fi
5483
5484   if test "$x_includes" = "NONE"; then
5485                     for dir in "/usr/X11" "/usr/X11R6"; do
5486       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5487     done
5488   fi
5489
5490   if test "$x_libraries" = "NONE"; then
5491     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5492       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5493     done
5494   fi
5495
5496   # If we find X, set shell vars x_includes and x_libraries to the
5497 # paths, otherwise set no_x=yes.
5498 # Uses ac_ vars as temps to allow command line to override cache and checks.
5499 # --without-x overrides everything else, but does not touch the cache.
5500 echo $ac_n "checking for X""... $ac_c" 1>&6
5501 echo "configure:5502: checking for X" >&5
5502
5503 # Check whether --with-x or --without-x was given.
5504 if test "${with_x+set}" = set; then
5505   withval="$with_x"
5506   :
5507 fi
5508
5509 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5510 if test "x$with_x" = xno; then
5511   # The user explicitly disabled X.
5512   have_x=disabled
5513 else
5514   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5515     # Both variables are already set.
5516     have_x=yes
5517   else
5518
5519 # One or both of the vars are not set, and there is no cached value.
5520 ac_x_includes=NO ac_x_libraries=NO
5521 rm -fr conftestdir
5522 if mkdir conftestdir; then
5523   cd conftestdir
5524   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5525   cat > Imakefile <<'EOF'
5526 acfindx:
5527         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5528 EOF
5529   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5530     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5531     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5532     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5533     for ac_extension in a so sl; do
5534       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5535         test -f $ac_im_libdir/libX11.$ac_extension; then
5536         ac_im_usrlibdir=$ac_im_libdir; break
5537       fi
5538     done
5539     # Screen out bogus values from the imake configuration.  They are
5540     # bogus both because they are the default anyway, and because
5541     # using them would break gcc on systems where it needs fixed includes.
5542     case "$ac_im_incroot" in
5543         /usr/include) ;;
5544         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5545     esac
5546     case "$ac_im_usrlibdir" in
5547         /usr/lib | /lib) ;;
5548         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5549     esac
5550   fi
5551   cd ..
5552   rm -fr conftestdir
5553 fi
5554
5555 if test "$ac_x_includes" = NO; then
5556   # Guess where to find include files, by looking for this one X11 .h file.
5557   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5558
5559   # First, try using that file with no special directory specified.
5560 cat > conftest.$ac_ext <<EOF
5561 #line 5562 "configure"
5562 #include "confdefs.h"
5563 #include <$x_direct_test_include>
5564 EOF
5565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5566 { (eval echo configure:5567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5568 if test -z "$ac_err"; then
5569   rm -rf conftest*
5570   # We can compile using X headers with no special include directory.
5571 ac_x_includes=
5572 else
5573   echo "$ac_err" >&5
5574   echo "configure: failed program was:" >&5
5575   cat conftest.$ac_ext >&5
5576   rm -rf conftest*
5577   # Look for the header file in a standard set of common directories.
5578 # Check X11 before X11Rn because it is often a symlink to the current release.
5579   for ac_dir in               \
5580     /usr/X11/include          \
5581     /usr/X11R6/include        \
5582     /usr/X11R5/include        \
5583     /usr/X11R4/include        \
5584                               \
5585     /usr/include/X11          \
5586     /usr/include/X11R6        \
5587     /usr/include/X11R5        \
5588     /usr/include/X11R4        \
5589                               \
5590     /usr/local/X11/include    \
5591     /usr/local/X11R6/include  \
5592     /usr/local/X11R5/include  \
5593     /usr/local/X11R4/include  \
5594                               \
5595     /usr/local/include/X11    \
5596     /usr/local/include/X11R6  \
5597     /usr/local/include/X11R5  \
5598     /usr/local/include/X11R4  \
5599                               \
5600     /usr/X386/include         \
5601     /usr/x386/include         \
5602     /usr/XFree86/include/X11  \
5603                               \
5604     /usr/include              \
5605     /usr/local/include        \
5606     /usr/unsupported/include  \
5607     /usr/athena/include       \
5608     /usr/local/x11r5/include  \
5609     /usr/lpp/Xamples/include  \
5610                               \
5611     /usr/openwin/include      \
5612     /usr/openwin/share/include \
5613     ; \
5614   do
5615     if test -r "$ac_dir/$x_direct_test_include"; then
5616       ac_x_includes=$ac_dir
5617       break
5618     fi
5619   done
5620 fi
5621 rm -f conftest*
5622 fi # $ac_x_includes = NO
5623
5624 if test "$ac_x_libraries" = NO; then
5625   # Check for the libraries.
5626
5627   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5628   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5629
5630   # See if we find them without any special options.
5631   # Don't add to $LIBS permanently.
5632   ac_save_LIBS="$LIBS"
5633   LIBS="-l$x_direct_test_library $LIBS"
5634 cat > conftest.$ac_ext <<EOF
5635 #line 5636 "configure"
5636 #include "confdefs.h"
5637
5638 int main() {
5639 ${x_direct_test_function}()
5640 ; return 0; }
5641 EOF
5642 if { (eval echo configure:5643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5643   rm -rf conftest*
5644   LIBS="$ac_save_LIBS"
5645 # We can link X programs with no special library path.
5646 ac_x_libraries=
5647 else
5648   echo "configure: failed program was:" >&5
5649   cat conftest.$ac_ext >&5
5650   rm -rf conftest*
5651   LIBS="$ac_save_LIBS"
5652 # First see if replacing the include by lib works.
5653 # Check X11 before X11Rn because it is often a symlink to the current release.
5654 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5655     /usr/X11/lib          \
5656     /usr/X11R6/lib        \
5657     /usr/X11R5/lib        \
5658     /usr/X11R4/lib        \
5659                           \
5660     /usr/lib/X11          \
5661     /usr/lib/X11R6        \
5662     /usr/lib/X11R5        \
5663     /usr/lib/X11R4        \
5664                           \
5665     /usr/local/X11/lib    \
5666     /usr/local/X11R6/lib  \
5667     /usr/local/X11R5/lib  \
5668     /usr/local/X11R4/lib  \
5669                           \
5670     /usr/local/lib/X11    \
5671     /usr/local/lib/X11R6  \
5672     /usr/local/lib/X11R5  \
5673     /usr/local/lib/X11R4  \
5674                           \
5675     /usr/X386/lib         \
5676     /usr/x386/lib         \
5677     /usr/XFree86/lib/X11  \
5678                           \
5679     /usr/lib              \
5680     /usr/local/lib        \
5681     /usr/unsupported/lib  \
5682     /usr/athena/lib       \
5683     /usr/local/x11r5/lib  \
5684     /usr/lpp/Xamples/lib  \
5685     /lib/usr/lib/X11      \
5686                           \
5687     /usr/openwin/lib      \
5688     /usr/openwin/share/lib \
5689     ; \
5690 do
5691   for ac_extension in a so sl; do
5692     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5693       ac_x_libraries=$ac_dir
5694       break 2
5695     fi
5696   done
5697 done
5698 fi
5699 rm -f conftest*
5700 fi # $ac_x_libraries = NO
5701
5702 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5703   # Didn't find X anywhere.  Cache the known absence of X.
5704   ac_cv_have_x="have_x=no"
5705 else
5706   # Record where we found X for the cache.
5707   ac_cv_have_x="have_x=yes \
5708                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5709 fi
5710   fi
5711   eval "$ac_cv_have_x"
5712 fi # $with_x != no
5713
5714 if test "$have_x" != yes; then
5715   echo "$ac_t""$have_x" 1>&6
5716   no_x=yes
5717 else
5718   # If each of the values was on the command line, it overrides each guess.
5719   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5720   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5721   # Update the cache value to reflect the command line values.
5722   ac_cv_have_x="have_x=yes \
5723                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5724   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5725 fi
5726
5727 if test "$no_x" = yes; then
5728   # Not all programs may use this symbol, but it does not hurt to define it.
5729   { test "$extra_verbose" = "yes" && cat << \EOF
5730     Defining X_DISPLAY_MISSING
5731 EOF
5732 cat >> confdefs.h <<\EOF
5733 #define X_DISPLAY_MISSING 1
5734 EOF
5735 }
5736
5737   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5738 else
5739   if test -n "$x_includes"; then
5740     X_CFLAGS="$X_CFLAGS -I$x_includes"
5741   fi
5742
5743   # It would also be nice to do this for all -L options, not just this one.
5744   if test -n "$x_libraries"; then
5745     X_LIBS="$X_LIBS -L$x_libraries"
5746     # For Solaris; some versions of Sun CC require a space after -R and
5747     # others require no space.  Words are not sufficient . . . .
5748     case "`(uname -sr) 2>/dev/null`" in
5749     "SunOS 5"*)
5750       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5751 echo "configure:5752: checking whether -R must be followed by a space" >&5
5752       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5753       cat > conftest.$ac_ext <<EOF
5754 #line 5755 "configure"
5755 #include "confdefs.h"
5756
5757 int main() {
5758
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   ac_R_nospace=yes
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   ac_R_nospace=no
5769 fi
5770 rm -f conftest*
5771       if test $ac_R_nospace = yes; then
5772         echo "$ac_t""no" 1>&6
5773         X_LIBS="$X_LIBS -R$x_libraries"
5774       else
5775         LIBS="$ac_xsave_LIBS -R $x_libraries"
5776         cat > conftest.$ac_ext <<EOF
5777 #line 5778 "configure"
5778 #include "confdefs.h"
5779
5780 int main() {
5781
5782 ; return 0; }
5783 EOF
5784 if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5785   rm -rf conftest*
5786   ac_R_space=yes
5787 else
5788   echo "configure: failed program was:" >&5
5789   cat conftest.$ac_ext >&5
5790   rm -rf conftest*
5791   ac_R_space=no
5792 fi
5793 rm -f conftest*
5794         if test $ac_R_space = yes; then
5795           echo "$ac_t""yes" 1>&6
5796           X_LIBS="$X_LIBS -R $x_libraries"
5797         else
5798           echo "$ac_t""neither works" 1>&6
5799         fi
5800       fi
5801       LIBS="$ac_xsave_LIBS"
5802     esac
5803   fi
5804
5805   # Check for system-dependent libraries X programs must link with.
5806   # Do this before checking for the system-independent R6 libraries
5807   # (-lICE), since we may need -lsocket or whatever for X linking.
5808
5809   if test "$ISC" = yes; then
5810     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5811   else
5812     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5813     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5814     # the Alpha needs dnet_stub (dnet does not exist).
5815     if test "$with_dnet" = "no" ; then
5816 ac_cv_lib_dnet_dnet_ntoa=no
5817 else
5818
5819 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5820 echo "configure:5821: checking for dnet_ntoa in -ldnet" >&5
5821 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5822
5823 xe_check_libs=" -ldnet "
5824 cat > conftest.$ac_ext <<EOF
5825 #line 5826 "configure"
5826 #include "confdefs.h"
5827 /* Override any gcc2 internal prototype to avoid an error.  */
5828 /* We use char because int might match the return type of a gcc2
5829     builtin and then its argument prototype would still apply.  */
5830 char dnet_ntoa();
5831
5832 int main() {
5833 dnet_ntoa()
5834 ; return 0; }
5835 EOF
5836 if { (eval echo configure:5837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5837   rm -rf conftest*
5838   eval "ac_cv_lib_$ac_lib_var=yes"
5839 else
5840   echo "configure: failed program was:" >&5
5841   cat conftest.$ac_ext >&5
5842   rm -rf conftest*
5843   eval "ac_cv_lib_$ac_lib_var=no"
5844 fi
5845 rm -f conftest*
5846 xe_check_libs=""
5847
5848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5849   echo "$ac_t""yes" 1>&6
5850   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5851 else
5852   echo "$ac_t""no" 1>&6
5853 fi
5854
5855 fi
5856
5857     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5858       
5859 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5860 echo "configure:5861: checking for dnet_ntoa in -ldnet_stub" >&5
5861 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5862
5863 xe_check_libs=" -ldnet_stub "
5864 cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 /* Override any gcc2 internal prototype to avoid an error.  */
5868 /* We use char because int might match the return type of a gcc2
5869     builtin and then its argument prototype would still apply.  */
5870 char dnet_ntoa();
5871
5872 int main() {
5873 dnet_ntoa()
5874 ; return 0; }
5875 EOF
5876 if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5877   rm -rf conftest*
5878   eval "ac_cv_lib_$ac_lib_var=yes"
5879 else
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=no"
5884 fi
5885 rm -f conftest*
5886 xe_check_libs=""
5887
5888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5889   echo "$ac_t""yes" 1>&6
5890   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5891 else
5892   echo "$ac_t""no" 1>&6
5893 fi
5894
5895
5896     fi
5897
5898     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5899     # to get the SysV transport functions.
5900     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5901     # needs -lnsl.
5902     # The nsl library prevents programs from opening the X display
5903     # on Irix 5.2, according to dickey@clark.net.
5904     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5905 echo "configure:5906: checking for gethostbyname" >&5
5906
5907 cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5910 /* System header to define __stub macros and hopefully few prototypes,
5911     which can conflict with char gethostbyname(); below.  */
5912 #include <assert.h>
5913 /* Override any gcc2 internal prototype to avoid an error.  */
5914 /* We use char because int might match the return type of a gcc2
5915     builtin and then its argument prototype would still apply.  */
5916 char gethostbyname();
5917
5918 int main() {
5919
5920 /* The GNU C library defines this for functions which it implements
5921     to always fail with ENOSYS.  Some functions are actually named
5922     something starting with __ and the normal name is an alias.  */
5923 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5924 choke me
5925 #else
5926 gethostbyname();
5927 #endif
5928
5929 ; return 0; }
5930 EOF
5931 if { (eval echo configure:5932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5932   rm -rf conftest*
5933   eval "ac_cv_func_gethostbyname=yes"
5934 else
5935   echo "configure: failed program was:" >&5
5936   cat conftest.$ac_ext >&5
5937   rm -rf conftest*
5938   eval "ac_cv_func_gethostbyname=no"
5939 fi
5940 rm -f conftest*
5941
5942 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5943   echo "$ac_t""yes" 1>&6
5944   :
5945 else
5946   echo "$ac_t""no" 1>&6
5947 fi
5948
5949     if test $ac_cv_func_gethostbyname = no; then
5950       
5951 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5952 echo "configure:5953: checking for gethostbyname in -lnsl" >&5
5953 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5954
5955 xe_check_libs=" -lnsl "
5956 cat > conftest.$ac_ext <<EOF
5957 #line 5958 "configure"
5958 #include "confdefs.h"
5959 /* Override any gcc2 internal prototype to avoid an error.  */
5960 /* We use char because int might match the return type of a gcc2
5961     builtin and then its argument prototype would still apply.  */
5962 char gethostbyname();
5963
5964 int main() {
5965 gethostbyname()
5966 ; return 0; }
5967 EOF
5968 if { (eval echo configure:5969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5969   rm -rf conftest*
5970   eval "ac_cv_lib_$ac_lib_var=yes"
5971 else
5972   echo "configure: failed program was:" >&5
5973   cat conftest.$ac_ext >&5
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=no"
5976 fi
5977 rm -f conftest*
5978 xe_check_libs=""
5979
5980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5981   echo "$ac_t""yes" 1>&6
5982   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5983 else
5984   echo "$ac_t""no" 1>&6
5985 fi
5986
5987
5988     fi
5989
5990     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5991     # socket/setsockopt and other routines are undefined under SCO ODT
5992     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5993     # on later versions), says simon@lia.di.epfl.ch: it contains
5994     # gethostby* variants that don't use the nameserver (or something).
5995     # -lsocket must be given before -lnsl if both are needed.
5996     # We assume that if connect needs -lnsl, so does gethostbyname.
5997     echo $ac_n "checking for connect""... $ac_c" 1>&6
5998 echo "configure:5999: checking for connect" >&5
5999
6000 cat > conftest.$ac_ext <<EOF
6001 #line 6002 "configure"
6002 #include "confdefs.h"
6003 /* System header to define __stub macros and hopefully few prototypes,
6004     which can conflict with char connect(); below.  */
6005 #include <assert.h>
6006 /* Override any gcc2 internal prototype to avoid an error.  */
6007 /* We use char because int might match the return type of a gcc2
6008     builtin and then its argument prototype would still apply.  */
6009 char connect();
6010
6011 int main() {
6012
6013 /* The GNU C library defines this for functions which it implements
6014     to always fail with ENOSYS.  Some functions are actually named
6015     something starting with __ and the normal name is an alias.  */
6016 #if defined (__stub_connect) || defined (__stub___connect)
6017 choke me
6018 #else
6019 connect();
6020 #endif
6021
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025   rm -rf conftest*
6026   eval "ac_cv_func_connect=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_func_connect=no"
6032 fi
6033 rm -f conftest*
6034
6035 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6036   echo "$ac_t""yes" 1>&6
6037   :
6038 else
6039   echo "$ac_t""no" 1>&6
6040 fi
6041
6042     if test $ac_cv_func_connect = no; then
6043       
6044 xe_msg_checking="for connect in -lsocket"
6045 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6046 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6047 echo "configure:6048: checking "$xe_msg_checking"" >&5
6048 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6049
6050 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6051 cat > conftest.$ac_ext <<EOF
6052 #line 6053 "configure"
6053 #include "confdefs.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 connect();
6058
6059 int main() {
6060 connect()
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6064   rm -rf conftest*
6065   eval "ac_cv_lib_$ac_lib_var=yes"
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   eval "ac_cv_lib_$ac_lib_var=no"
6071 fi
6072 rm -f conftest*
6073 xe_check_libs=""
6074
6075 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6076   echo "$ac_t""yes" 1>&6
6077   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6078 else
6079   echo "$ac_t""no" 1>&6
6080 fi
6081
6082
6083     fi
6084
6085     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6086     echo $ac_n "checking for remove""... $ac_c" 1>&6
6087 echo "configure:6088: checking for remove" >&5
6088
6089 cat > conftest.$ac_ext <<EOF
6090 #line 6091 "configure"
6091 #include "confdefs.h"
6092 /* System header to define __stub macros and hopefully few prototypes,
6093     which can conflict with char remove(); below.  */
6094 #include <assert.h>
6095 /* Override any gcc2 internal prototype to avoid an error.  */
6096 /* We use char because int might match the return type of a gcc2
6097     builtin and then its argument prototype would still apply.  */
6098 char remove();
6099
6100 int main() {
6101
6102 /* The GNU C library defines this for functions which it implements
6103     to always fail with ENOSYS.  Some functions are actually named
6104     something starting with __ and the normal name is an alias.  */
6105 #if defined (__stub_remove) || defined (__stub___remove)
6106 choke me
6107 #else
6108 remove();
6109 #endif
6110
6111 ; return 0; }
6112 EOF
6113 if { (eval echo configure:6114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6114   rm -rf conftest*
6115   eval "ac_cv_func_remove=yes"
6116 else
6117   echo "configure: failed program was:" >&5
6118   cat conftest.$ac_ext >&5
6119   rm -rf conftest*
6120   eval "ac_cv_func_remove=no"
6121 fi
6122 rm -f conftest*
6123
6124 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6125   echo "$ac_t""yes" 1>&6
6126   :
6127 else
6128   echo "$ac_t""no" 1>&6
6129 fi
6130
6131     if test $ac_cv_func_remove = no; then
6132       
6133 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6134 echo "configure:6135: checking for remove in -lposix" >&5
6135 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6136
6137 xe_check_libs=" -lposix "
6138 cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.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 remove();
6145
6146 int main() {
6147 remove()
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_lib_$ac_lib_var=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_lib_$ac_lib_var=no"
6158 fi
6159 rm -f conftest*
6160 xe_check_libs=""
6161
6162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6163   echo "$ac_t""yes" 1>&6
6164   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6165 else
6166   echo "$ac_t""no" 1>&6
6167 fi
6168
6169
6170     fi
6171
6172     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6173     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6174 echo "configure:6175: checking for shmat" >&5
6175
6176 cat > conftest.$ac_ext <<EOF
6177 #line 6178 "configure"
6178 #include "confdefs.h"
6179 /* System header to define __stub macros and hopefully few prototypes,
6180     which can conflict with char shmat(); below.  */
6181 #include <assert.h>
6182 /* Override any gcc2 internal prototype to avoid an error.  */
6183 /* We use char because int might match the return type of a gcc2
6184     builtin and then its argument prototype would still apply.  */
6185 char shmat();
6186
6187 int main() {
6188
6189 /* The GNU C library defines this for functions which it implements
6190     to always fail with ENOSYS.  Some functions are actually named
6191     something starting with __ and the normal name is an alias.  */
6192 #if defined (__stub_shmat) || defined (__stub___shmat)
6193 choke me
6194 #else
6195 shmat();
6196 #endif
6197
6198 ; return 0; }
6199 EOF
6200 if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6201   rm -rf conftest*
6202   eval "ac_cv_func_shmat=yes"
6203 else
6204   echo "configure: failed program was:" >&5
6205   cat conftest.$ac_ext >&5
6206   rm -rf conftest*
6207   eval "ac_cv_func_shmat=no"
6208 fi
6209 rm -f conftest*
6210
6211 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6212   echo "$ac_t""yes" 1>&6
6213   :
6214 else
6215   echo "$ac_t""no" 1>&6
6216 fi
6217
6218     if test $ac_cv_func_shmat = no; then
6219       
6220 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6221 echo "configure:6222: checking for shmat in -lipc" >&5
6222 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6223
6224 xe_check_libs=" -lipc "
6225 cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* Override any gcc2 internal prototype to avoid an error.  */
6229 /* We use char because int might match the return type of a gcc2
6230     builtin and then its argument prototype would still apply.  */
6231 char shmat();
6232
6233 int main() {
6234 shmat()
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_lib_$ac_lib_var=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_lib_$ac_lib_var=no"
6245 fi
6246 rm -f conftest*
6247 xe_check_libs=""
6248
6249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6250   echo "$ac_t""yes" 1>&6
6251   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6252 else
6253   echo "$ac_t""no" 1>&6
6254 fi
6255
6256
6257     fi
6258   fi
6259
6260   # Check for libraries that X11R6 Xt/Xaw programs need.
6261   ac_save_LDFLAGS="$LDFLAGS"
6262   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6263   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6264   # check for ICE first), but we must link in the order -lSM -lICE or
6265   # we get undefined symbols.  So assume we have SM if we have ICE.
6266   # These have to be linked with before -lX11, unlike the other
6267   # libraries we check for below, so use a different variable.
6268   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6269   
6270 xe_msg_checking="for IceConnectionNumber in -lICE"
6271 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6272 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6273 echo "configure:6274: checking "$xe_msg_checking"" >&5
6274 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6275
6276 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6277 cat > conftest.$ac_ext <<EOF
6278 #line 6279 "configure"
6279 #include "confdefs.h"
6280 /* Override any gcc2 internal prototype to avoid an error.  */
6281 /* We use char because int might match the return type of a gcc2
6282     builtin and then its argument prototype would still apply.  */
6283 char IceConnectionNumber();
6284
6285 int main() {
6286 IceConnectionNumber()
6287 ; return 0; }
6288 EOF
6289 if { (eval echo configure:6290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6290   rm -rf conftest*
6291   eval "ac_cv_lib_$ac_lib_var=yes"
6292 else
6293   echo "configure: failed program was:" >&5
6294   cat conftest.$ac_ext >&5
6295   rm -rf conftest*
6296   eval "ac_cv_lib_$ac_lib_var=no"
6297 fi
6298 rm -f conftest*
6299 xe_check_libs=""
6300
6301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6302   echo "$ac_t""yes" 1>&6
6303   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6304 else
6305   echo "$ac_t""no" 1>&6
6306 fi
6307
6308
6309   LDFLAGS="$ac_save_LDFLAGS"
6310
6311 fi
6312  # Autoconf claims to find X library and include dirs for us.
6313   if test "$no_x" = "yes"
6314   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6315   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6316   fi
6317 fi
6318
6319
6320 if test "$with_x11" = "yes"; then
6321   { test "$extra_verbose" = "yes" && cat << \EOF
6322     Defining HAVE_X_WINDOWS
6323 EOF
6324 cat >> confdefs.h <<\EOF
6325 #define HAVE_X_WINDOWS 1
6326 EOF
6327 }
6328
6329   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6330   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6331
6332       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6333     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6334     if test -d "$lib_dir" -a -d "$inc_dir"; then
6335       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6336         x_libraries="$lib_dir $x_libraries"
6337         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6338       esac
6339       case "$x_includes" in "$inc_dir"* ) ;; *)
6340         x_includes="$inc_dir $x_includes"
6341         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6342       esac
6343       break;       fi
6344   done
6345
6346     for rel in "X11R6" "X11R5" "X11R4"; do
6347     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6348     if test -d "$lib_dir" -a -d "$inc_dir"; then
6349       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6350         x_libraries="$x_libraries $lib_dir"
6351         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6352       esac
6353       case "$x_includes" in "$inc_dir"* ) ;; *)
6354         x_includes="$x_includes $inc_dir"
6355         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6356       esac
6357       break;     fi
6358   done
6359
6360     case "$opsys" in
6361   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 ;;
6362   esac
6363
6364   ld_switch_x_site="$X_LIBS"
6365
6366   
6367 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6368     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6369   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6370   
6371         runpath="" runpath_dirs=""
6372   if test -n "$LD_RUN_PATH"; then
6373     runpath="$LD_RUN_PATH"
6374   elif test "$GCC" = "yes"; then
6375         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6376     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6377     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6378     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6379       case "$arg" in P,* | -L* | -R* )
6380         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6381           {
6382 xe_runpath_dir="$dir"
6383   test "$xe_runpath_dir" != "/lib"     -a \
6384         "$xe_runpath_dir" != "/usr/lib" -a \
6385         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6386   eval "$xe_add_unique_runpath_dir"
6387 }
6388         done ;;
6389       esac
6390     done
6391     ld_switch_run="$ld_switch_run_save"
6392     rm -f conftest*
6393   else
6394         for arg in $ld_switch_site $ld_switch_x_site; do
6395       case "$arg" in -L*) {
6396 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6397   test "$xe_runpath_dir" != "/lib"     -a \
6398         "$xe_runpath_dir" != "/usr/lib" -a \
6399         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6400   eval "$xe_add_unique_runpath_dir"
6401 };; esac
6402     done
6403         if test "$opsys $need_motif" = "sol2 yes"; then
6404       xe_runpath_dir="/opt/SUNWdt/lib";
6405       eval "$xe_add_unique_runpath_dir";
6406     fi
6407   fi 
6408   if test -n "$runpath"; then
6409     ld_switch_run="${dash_r}${runpath}"
6410     
6411 if test "$GCC" = "yes"; then
6412   set x $ld_switch_run; shift; ld_switch_run=""
6413   while test -n "$1"; do
6414     case $1 in
6415       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6416       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6417       -Xlinker* ) ;;
6418       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6419     esac
6420     shift
6421   done
6422 fi
6423     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6424   fi
6425 fi
6426
6427
6428   if test "$extra_verbose" = "yes"; then
6429     echo; echo "X11 compilation variables:"
6430     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6431     echo
6432   fi
6433
6434             bitmapdirs=
6435   if test "$x_includes" != NONE; then
6436     for i in $x_includes; do
6437       if test -d "$i/bitmaps"; then
6438         bitmapdirs="$i/bitmaps:$bitmapdirs"
6439       fi
6440       if test -d "$i/X11/bitmaps"; then
6441         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6442       fi
6443     done
6444     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6445   fi
6446   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6447     Defining BITMAPDIR = "$bitmapdirs"
6448 EOF
6449 cat >> confdefs.h <<EOF
6450 #define BITMAPDIR "$bitmapdirs"
6451 EOF
6452 }
6453
6454
6455     echo "checking for X defines extracted by xmkmf" 1>&6
6456 echo "configure:6457: checking for X defines extracted by xmkmf" >&5
6457   rm -fr conftestdir
6458   if mkdir conftestdir; then
6459     cd conftestdir
6460     cat > Imakefile <<'EOF'
6461 xetest:
6462         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6463 EOF
6464     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6465       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6466       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6467     fi
6468     cd ..
6469     rm -fr conftestdir
6470     for word in $xmkmf_defines; do
6471       case "$word" in 
6472       -D__STDC__*) ;;
6473       -D* )
6474         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6475         case "$word" in
6476           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6477           *     ) val=1 ;;
6478         esac
6479         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6480           if test "$val" = "1"
6481             then { test "$extra_verbose" = "yes" && cat << EOF
6482     Defining $sym
6483 EOF
6484 cat >> confdefs.h <<EOF
6485 #define $sym 1
6486 EOF
6487 }
6488
6489             else { test "$extra_verbose" = "yes" && cat << EOF
6490     Defining $sym = $val
6491 EOF
6492 cat >> confdefs.h <<EOF
6493 #define $sym $val
6494 EOF
6495 }
6496
6497           fi
6498         fi  ;;
6499       esac
6500     done
6501   fi
6502
6503     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6504 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6505 echo "configure:6506: checking for X11/Intrinsic.h" >&5
6506
6507 cat > conftest.$ac_ext <<EOF
6508 #line 6509 "configure"
6509 #include "confdefs.h"
6510 #include <X11/Intrinsic.h>
6511 EOF
6512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6513 { (eval echo configure:6514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6515 if test -z "$ac_err"; then
6516   rm -rf conftest*
6517   eval "ac_cv_header_$ac_safe=yes"
6518 else
6519   echo "$ac_err" >&5
6520   echo "configure: failed program was:" >&5
6521   cat conftest.$ac_ext >&5
6522   rm -rf conftest*
6523   eval "ac_cv_header_$ac_safe=no"
6524 fi
6525 rm -f conftest*
6526 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6527   echo "$ac_t""yes" 1>&6
6528   :
6529 else
6530   echo "$ac_t""no" 1>&6
6531 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6532 fi
6533
6534
6535       
6536 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6537 echo "configure:6538: checking for XOpenDisplay in -lX11" >&5
6538 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6539
6540 xe_check_libs=" -lX11 "
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 XOpenDisplay();
6548
6549 int main() {
6550 XOpenDisplay()
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   have_lib_x11=yes
6568 else
6569   echo "$ac_t""no" 1>&6
6570 fi
6571
6572
6573   if test "$have_lib_x11" != "yes"; then
6574     
6575 xe_msg_checking="for XGetFontProperty in -lX11"
6576 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6577 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6578 echo "configure:6579: checking "$xe_msg_checking"" >&5
6579 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6580
6581 xe_check_libs=" -lX11 -b i486-linuxaout"
6582 cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* Override any gcc2 internal prototype to avoid an error.  */
6586 /* We use char because int might match the return type of a gcc2
6587     builtin and then its argument prototype would still apply.  */
6588 char XGetFontProperty();
6589
6590 int main() {
6591 XGetFontProperty()
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_lib_$ac_lib_var=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=no"
6602 fi
6603 rm -f conftest*
6604 xe_check_libs=""
6605
6606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6607   echo "$ac_t""yes" 1>&6
6608   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6609 else
6610   echo "$ac_t""no" 1>&6
6611 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6612 fi
6613
6614
6615   fi
6616   libs_x="-lX11"
6617   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6618
6619     
6620 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6621 echo "configure:6622: checking for XShapeSelectInput in -lXext" >&5
6622 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6623
6624 xe_check_libs=" -lXext "
6625 cat > conftest.$ac_ext <<EOF
6626 #line 6627 "configure"
6627 #include "confdefs.h"
6628 /* Override any gcc2 internal prototype to avoid an error.  */
6629 /* We use char because int might match the return type of a gcc2
6630     builtin and then its argument prototype would still apply.  */
6631 char XShapeSelectInput();
6632
6633 int main() {
6634 XShapeSelectInput()
6635 ; return 0; }
6636 EOF
6637 if { (eval echo configure:6638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6638   rm -rf conftest*
6639   eval "ac_cv_lib_$ac_lib_var=yes"
6640 else
6641   echo "configure: failed program was:" >&5
6642   cat conftest.$ac_ext >&5
6643   rm -rf conftest*
6644   eval "ac_cv_lib_$ac_lib_var=no"
6645 fi
6646 rm -f conftest*
6647 xe_check_libs=""
6648
6649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6650   echo "$ac_t""yes" 1>&6
6651   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6652 else
6653   echo "$ac_t""no" 1>&6
6654 fi
6655
6656
6657
6658     
6659 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6660 echo "configure:6661: checking for XtOpenDisplay in -lXt" >&5
6661 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6662
6663 xe_check_libs=" -lXt "
6664 cat > conftest.$ac_ext <<EOF
6665 #line 6666 "configure"
6666 #include "confdefs.h"
6667 /* Override any gcc2 internal prototype to avoid an error.  */
6668 /* We use char because int might match the return type of a gcc2
6669     builtin and then its argument prototype would still apply.  */
6670 char XtOpenDisplay();
6671
6672 int main() {
6673 XtOpenDisplay()
6674 ; return 0; }
6675 EOF
6676 if { (eval echo configure:6677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6677   rm -rf conftest*
6678   eval "ac_cv_lib_$ac_lib_var=yes"
6679 else
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=no"
6684 fi
6685 rm -f conftest*
6686 xe_check_libs=""
6687
6688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6689   echo "$ac_t""yes" 1>&6
6690   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6691 else
6692   echo "$ac_t""no" 1>&6
6693 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6694 fi
6695
6696
6697
6698   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6699 echo "configure:6700: checking the version of X11 being used" >&5
6700   cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 #include <X11/Intrinsic.h>
6704     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6705 EOF
6706 if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6707 then
6708   ./conftest foobar; x11_release=$?
6709 else
6710   conftest_rc="$?"
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -fr conftest*
6714   x11_release=4
6715 fi
6716 rm -fr conftest*
6717   echo "$ac_t""R${x11_release}" 1>&6
6718   { test "$extra_verbose" = "yes" && cat << EOF
6719     Defining THIS_IS_X11R${x11_release}
6720 EOF
6721 cat >> confdefs.h <<EOF
6722 #define THIS_IS_X11R${x11_release} 1
6723 EOF
6724 }
6725
6726
6727   if test "${x11_release}" = "4"; then
6728     case "$with_widgets" in
6729       "" | "no") with_widgets=no ;;
6730       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6731     esac
6732   fi
6733
6734   for ac_func in XConvertCase
6735 do
6736 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6737 echo "configure:6738: checking for $ac_func" >&5
6738
6739 cat > conftest.$ac_ext <<EOF
6740 #line 6741 "configure"
6741 #include "confdefs.h"
6742 /* System header to define __stub macros and hopefully few prototypes,
6743     which can conflict with char $ac_func(); below.  */
6744 #include <assert.h>
6745 /* Override any gcc2 internal prototype to avoid an error.  */
6746 /* We use char because int might match the return type of a gcc2
6747     builtin and then its argument prototype would still apply.  */
6748 char $ac_func();
6749
6750 int main() {
6751
6752 /* The GNU C library defines this for functions which it implements
6753     to always fail with ENOSYS.  Some functions are actually named
6754     something starting with __ and the normal name is an alias.  */
6755 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6756 choke me
6757 #else
6758 $ac_func();
6759 #endif
6760
6761 ; return 0; }
6762 EOF
6763 if { (eval echo configure:6764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6764   rm -rf conftest*
6765   eval "ac_cv_func_$ac_func=yes"
6766 else
6767   echo "configure: failed program was:" >&5
6768   cat conftest.$ac_ext >&5
6769   rm -rf conftest*
6770   eval "ac_cv_func_$ac_func=no"
6771 fi
6772 rm -f conftest*
6773
6774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6775   echo "$ac_t""yes" 1>&6
6776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6777   { test "$extra_verbose" = "yes" && cat << EOF
6778     Defining $ac_tr_func
6779 EOF
6780 cat >> confdefs.h <<EOF
6781 #define $ac_tr_func 1
6782 EOF
6783 }
6784  
6785 else
6786   echo "$ac_t""no" 1>&6
6787 fi
6788 done
6789
6790
6791   for ac_hdr in X11/Xlocale.h
6792 do
6793 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6794 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6795 echo "configure:6796: checking for $ac_hdr" >&5
6796
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 #include <$ac_hdr>
6801 EOF
6802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6803 { (eval echo configure:6804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6805 if test -z "$ac_err"; then
6806   rm -rf conftest*
6807   eval "ac_cv_header_$ac_safe=yes"
6808 else
6809   echo "$ac_err" >&5
6810   echo "configure: failed program was:" >&5
6811   cat conftest.$ac_ext >&5
6812   rm -rf conftest*
6813   eval "ac_cv_header_$ac_safe=no"
6814 fi
6815 rm -f conftest*
6816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6817   echo "$ac_t""yes" 1>&6
6818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6819   { test "$extra_verbose" = "yes" && cat << EOF
6820     Defining $ac_tr_hdr
6821 EOF
6822 cat >> confdefs.h <<EOF
6823 #define $ac_tr_hdr 1
6824 EOF
6825 }
6826  
6827 else
6828   echo "$ac_t""no" 1>&6
6829 fi
6830 done
6831
6832
6833     for ac_func in XRegisterIMInstantiateCallback
6834 do
6835 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6836 echo "configure:6837: checking for $ac_func" >&5
6837
6838 cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6841 /* System header to define __stub macros and hopefully few prototypes,
6842     which can conflict with char $ac_func(); below.  */
6843 #include <assert.h>
6844 /* Override any gcc2 internal prototype to avoid an error.  */
6845 /* We use char because int might match the return type of a gcc2
6846     builtin and then its argument prototype would still apply.  */
6847 char $ac_func();
6848
6849 int main() {
6850
6851 /* The GNU C library defines this for functions which it implements
6852     to always fail with ENOSYS.  Some functions are actually named
6853     something starting with __ and the normal name is an alias.  */
6854 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6855 choke me
6856 #else
6857 $ac_func();
6858 #endif
6859
6860 ; return 0; }
6861 EOF
6862 if { (eval echo configure:6863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6863   rm -rf conftest*
6864   eval "ac_cv_func_$ac_func=yes"
6865 else
6866   echo "configure: failed program was:" >&5
6867   cat conftest.$ac_ext >&5
6868   rm -rf conftest*
6869   eval "ac_cv_func_$ac_func=no"
6870 fi
6871 rm -f conftest*
6872
6873 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6874   echo "$ac_t""yes" 1>&6
6875     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6876   { test "$extra_verbose" = "yes" && cat << EOF
6877     Defining $ac_tr_func
6878 EOF
6879 cat >> confdefs.h <<EOF
6880 #define $ac_tr_func 1
6881 EOF
6882 }
6883  
6884 else
6885   echo "$ac_t""no" 1>&6
6886 fi
6887 done
6888
6889   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6890 echo "configure:6891: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6891   cat > conftest.$ac_ext <<EOF
6892 #line 6893 "configure"
6893 #include "confdefs.h"
6894
6895 #define NeedFunctionPrototypes 1
6896 #include <X11/Xlib.h>
6897 extern Bool XRegisterIMInstantiateCallback(
6898    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6899
6900 int main() {
6901
6902 ; return 0; }
6903 EOF
6904 if { (eval echo configure:6905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6905   rm -rf conftest*
6906   echo "$ac_t""yes" 1>&6
6907 else
6908   echo "configure: failed program was:" >&5
6909   cat conftest.$ac_ext >&5
6910   rm -rf conftest*
6911   echo "$ac_t""no" 1>&6
6912    { test "$extra_verbose" = "yes" && cat << \EOF
6913     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6914 EOF
6915 cat >> confdefs.h <<\EOF
6916 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6917 EOF
6918 }
6919
6920 fi
6921 rm -f conftest*
6922
6923     test -z "$with_xmu" && { 
6924 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6925 echo "configure:6926: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6926 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6927
6928 xe_check_libs=" -lXmu "
6929 cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932 /* Override any gcc2 internal prototype to avoid an error.  */
6933 /* We use char because int might match the return type of a gcc2
6934     builtin and then its argument prototype would still apply.  */
6935 char XmuReadBitmapDataFromFile();
6936
6937 int main() {
6938 XmuReadBitmapDataFromFile()
6939 ; return 0; }
6940 EOF
6941 if { (eval echo configure:6942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6942   rm -rf conftest*
6943   eval "ac_cv_lib_$ac_lib_var=yes"
6944 else
6945   echo "configure: failed program was:" >&5
6946   cat conftest.$ac_ext >&5
6947   rm -rf conftest*
6948   eval "ac_cv_lib_$ac_lib_var=no"
6949 fi
6950 rm -f conftest*
6951 xe_check_libs=""
6952
6953 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6954   echo "$ac_t""yes" 1>&6
6955   with_xmu=yes
6956 else
6957   echo "$ac_t""no" 1>&6
6958 with_xmu=no
6959 fi
6960
6961  }
6962   if test "$with_xmu" = "no"; then
6963     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6964    echo "    xemacs will be linked with \"xmu.o\""
6965  fi
6966   else
6967     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6968     { test "$extra_verbose" = "yes" && cat << \EOF
6969     Defining HAVE_XMU
6970 EOF
6971 cat >> confdefs.h <<\EOF
6972 #define HAVE_XMU 1
6973 EOF
6974 }
6975
6976   fi
6977
6978       
6979 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6980 echo "configure:6981: checking for main in -lXbsd" >&5
6981 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6982
6983 xe_check_libs=" -lXbsd "
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987
6988 int main() {
6989 main()
6990 ; return 0; }
6991 EOF
6992 if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6993   rm -rf conftest*
6994   eval "ac_cv_lib_$ac_lib_var=yes"
6995 else
6996   echo "configure: failed program was:" >&5
6997   cat conftest.$ac_ext >&5
6998   rm -rf conftest*
6999   eval "ac_cv_lib_$ac_lib_var=no"
7000 fi
7001 rm -f conftest*
7002 xe_check_libs=""
7003
7004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7005   echo "$ac_t""yes" 1>&6
7006   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7007 else
7008   echo "$ac_t""no" 1>&6
7009 fi
7010
7011
7012
7013     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7014         if test "$GCC" = "yes"; then
7015       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
7016       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
7017     else
7018       case "$CC" in
7019         "xlc" ) CC="xlc_r" ;;
7020         "xlC" ) CC="xlC_r" ;;
7021         "cc"  ) CC="cc_r" ;;
7022       esac
7023     fi
7024   fi
7025
7026 fi 
7027 if test "$with_msw" != "no"; then
7028   echo "checking for MS-Windows" 1>&6
7029 echo "configure:7030: checking for MS-Windows" >&5
7030   
7031 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7032 echo "configure:7033: checking for main in -lgdi32" >&5
7033 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7034
7035 xe_check_libs=" -lgdi32 "
7036 cat > conftest.$ac_ext <<EOF
7037 #line 7038 "configure"
7038 #include "confdefs.h"
7039
7040 int main() {
7041 main()
7042 ; return 0; }
7043 EOF
7044 if { (eval echo configure:7045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7045   rm -rf conftest*
7046   eval "ac_cv_lib_$ac_lib_var=yes"
7047 else
7048   echo "configure: failed program was:" >&5
7049   cat conftest.$ac_ext >&5
7050   rm -rf conftest*
7051   eval "ac_cv_lib_$ac_lib_var=no"
7052 fi
7053 rm -f conftest*
7054 xe_check_libs=""
7055
7056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7057   echo "$ac_t""yes" 1>&6
7058   with_msw=yes
7059 else
7060   echo "$ac_t""no" 1>&6
7061 fi
7062
7063
7064   if test "$with_msw" = "yes"; then
7065     { test "$extra_verbose" = "yes" && cat << \EOF
7066     Defining HAVE_MS_WINDOWS
7067 EOF
7068 cat >> confdefs.h <<\EOF
7069 #define HAVE_MS_WINDOWS 1
7070 EOF
7071 }
7072
7073
7074         if test "$with_netinstall" = "yes"; then
7075       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7076       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7077       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7078     fi
7079
7080     install_pp="$blddir/lib-src/installexe.sh"
7081     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
7082     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7083     if test "$window_system" != x11; then
7084         window_system=msw
7085         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7086             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7087    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7088  fi
7089         test "$with_menubars"   != "no" && with_menubars=msw \
7090             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7091    echo "    xemacs will be linked with \"menubar-msw.o\""
7092  fi
7093         test "$with_toolbars"   != "no" && with_toolbars=msw \
7094             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7095    echo "    xemacs will be linked with \"toolbar-msw.o\""
7096  fi
7097         test "$with_dialogs"   != "no" && with_dialogs=msw \
7098             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7099    echo "    xemacs will be linked with \"dialog-msw.o\""
7100  fi
7101         test "$with_widgets"   != "no" && with_widgets=msw
7102     else
7103         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7104    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7105  fi
7106         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7107    echo "    xemacs will be linked with \"menubar-msw.o\""
7108  fi
7109         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7110    echo "    xemacs will be linked with \"toolbar-msw.o\""
7111  fi
7112         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7113    echo "    xemacs will be linked with \"dialog-msw.o\""
7114  fi
7115     fi
7116         cat > conftest.$ac_ext <<EOF
7117 #line 7118 "configure"
7118 #include "confdefs.h"
7119 #include <fcntl.h>
7120     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7121 EOF
7122 if { (eval echo configure:7123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7123 then
7124   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7125     Defining HAVE_MSG_SELECT
7126 EOF
7127 cat >> confdefs.h <<\EOF
7128 #define HAVE_MSG_SELECT 1
7129 EOF
7130 }
7131
7132 else
7133   conftest_rc="$?"
7134   echo "configure: failed program was:" >&5
7135   cat conftest.$ac_ext >&5
7136 fi
7137 rm -fr conftest*
7138     with_file_coding=yes
7139     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
7140    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\""
7141  fi
7142   fi
7143 fi
7144
7145
7146
7147 test -z "$window_system" && window_system="none"
7148
7149 if test "$window_system" = "none"; then
7150   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7151   do
7152     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7153        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7154     fi
7155     eval "with_${feature}=no"
7156   done
7157 else
7158   test -z "$with_toolbars" && with_toolbars=yes
7159 fi
7160
7161 if test "$with_msw" != "yes"; then
7162   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7163   do
7164     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7165        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7166     fi
7167     eval "with_${feature}=no"
7168   done
7169 else
7170   :
7171 fi
7172
7173 if test "$with_x11" != "yes"; then
7174             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7175   do
7176     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7177        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7178     fi
7179     eval "with_${feature}=no"
7180   done
7181 fi
7182
7183 if test "$with_x11" = "yes"; then
7184   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7185 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7186 echo "configure:7187: checking for X11/extensions/shape.h" >&5
7187
7188 cat > conftest.$ac_ext <<EOF
7189 #line 7190 "configure"
7190 #include "confdefs.h"
7191 #include <X11/extensions/shape.h>
7192 EOF
7193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7194 { (eval echo configure:7195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7195 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7196 if test -z "$ac_err"; then
7197   rm -rf conftest*
7198   eval "ac_cv_header_$ac_safe=yes"
7199 else
7200   echo "$ac_err" >&5
7201   echo "configure: failed program was:" >&5
7202   cat conftest.$ac_ext >&5
7203   rm -rf conftest*
7204   eval "ac_cv_header_$ac_safe=no"
7205 fi
7206 rm -f conftest*
7207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7208   echo "$ac_t""yes" 1>&6
7209   
7210    { test "$extra_verbose" = "yes" && cat << \EOF
7211     Defining HAVE_BALLOON_HELP
7212 EOF
7213 cat >> confdefs.h <<\EOF
7214 #define HAVE_BALLOON_HELP 1
7215 EOF
7216 }
7217
7218    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7219    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7220  fi
7221 else
7222   echo "$ac_t""no" 1>&6
7223 fi
7224
7225 fi
7226
7227 bitmapdir=
7228
7229 case "$window_system" in
7230   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7231   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7232   gtk  )
7233        HAVE_X_WINDOWS=no
7234        test "$with_gnome" = "yes" && echo "  Using GNOME."
7235        test "$with_gnome" = "no" && echo "  Using GTK."
7236        ;;
7237   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7238 esac
7239
7240 case "$x_libraries" in *X11R4* )
7241   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7242   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7243 esac
7244
7245 echo "checking for WM_COMMAND option" 1>&6
7246 echo "configure:7247: checking for WM_COMMAND option" >&5;
7247 if test "$with_wmcommand" != "no"; then
7248   { test "$extra_verbose" = "yes" && cat << \EOF
7249     Defining HAVE_WMCOMMAND
7250 EOF
7251 cat >> confdefs.h <<\EOF
7252 #define HAVE_WMCOMMAND 1
7253 EOF
7254 }
7255
7256 fi
7257
7258 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7259 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7260 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7261 echo "configure:7262: checking for X11/Xauth.h" >&5
7262
7263 cat > conftest.$ac_ext <<EOF
7264 #line 7265 "configure"
7265 #include "confdefs.h"
7266 #include <X11/Xauth.h>
7267 EOF
7268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7269 { (eval echo configure:7270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7271 if test -z "$ac_err"; then
7272   rm -rf conftest*
7273   eval "ac_cv_header_$ac_safe=yes"
7274 else
7275   echo "$ac_err" >&5
7276   echo "configure: failed program was:" >&5
7277   cat conftest.$ac_ext >&5
7278   rm -rf conftest*
7279   eval "ac_cv_header_$ac_safe=no"
7280 fi
7281 rm -f conftest*
7282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7283   echo "$ac_t""yes" 1>&6
7284   :
7285 else
7286   echo "$ac_t""no" 1>&6
7287 with_xauth=no
7288 fi
7289  }
7290 test -z "$with_xauth" && { 
7291 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7292 echo "configure:7293: checking for XauGetAuthByAddr in -lXau" >&5
7293 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7294
7295 xe_check_libs=" -lXau "
7296 cat > conftest.$ac_ext <<EOF
7297 #line 7298 "configure"
7298 #include "confdefs.h"
7299 /* Override any gcc2 internal prototype to avoid an error.  */
7300 /* We use char because int might match the return type of a gcc2
7301     builtin and then its argument prototype would still apply.  */
7302 char XauGetAuthByAddr();
7303
7304 int main() {
7305 XauGetAuthByAddr()
7306 ; return 0; }
7307 EOF
7308 if { (eval echo configure:7309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7309   rm -rf conftest*
7310   eval "ac_cv_lib_$ac_lib_var=yes"
7311 else
7312   echo "configure: failed program was:" >&5
7313   cat conftest.$ac_ext >&5
7314   rm -rf conftest*
7315   eval "ac_cv_lib_$ac_lib_var=no"
7316 fi
7317 rm -f conftest*
7318 xe_check_libs=""
7319
7320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7321   echo "$ac_t""yes" 1>&6
7322   :
7323 else
7324   echo "$ac_t""no" 1>&6
7325 with_xauth=no
7326 fi
7327
7328  }
7329 test -z "$with_xauth" && with_xauth=yes
7330 if test "$with_xauth" = "yes"; then
7331   { test "$extra_verbose" = "yes" && cat << \EOF
7332     Defining HAVE_XAUTH
7333 EOF
7334 cat >> confdefs.h <<\EOF
7335 #define HAVE_XAUTH 1
7336 EOF
7337 }
7338
7339   
7340 T=""
7341 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
7342 libs_xauth="$T"
7343
7344 fi
7345
7346
7347
7348
7349 if test "$with_tooltalk" != "no" ; then
7350       for dir in "" "Tt/" "desktop/" ; do
7351     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7352 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7353 echo "configure:7354: checking for ${dir}tt_c.h" >&5
7354
7355 cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 #include <${dir}tt_c.h>
7359 EOF
7360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7361 { (eval echo configure:7362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7363 if test -z "$ac_err"; then
7364   rm -rf conftest*
7365   eval "ac_cv_header_$ac_safe=yes"
7366 else
7367   echo "$ac_err" >&5
7368   echo "configure: failed program was:" >&5
7369   cat conftest.$ac_ext >&5
7370   rm -rf conftest*
7371   eval "ac_cv_header_$ac_safe=no"
7372 fi
7373 rm -f conftest*
7374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7375   echo "$ac_t""yes" 1>&6
7376   tt_c_h_file="${dir}tt_c.h"; break
7377 else
7378   echo "$ac_t""no" 1>&6
7379 fi
7380
7381   done
7382   if test -z "$tt_c_h_file"; then
7383     if test "$with_tooltalk" = "yes"; then
7384       (echo "$progname: Usage error:"
7385 echo " " "Unable to find required tooltalk header files."
7386 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7387     fi
7388     with_tooltalk=no
7389   fi
7390 fi
7391 if test "$with_tooltalk" != "no" ; then
7392   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7393     
7394 xe_msg_checking="for tt_message_create in -ltt"
7395 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7396 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7397 echo "configure:7398: checking "$xe_msg_checking"" >&5
7398 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7399
7400 xe_check_libs=" -ltt $extra_libs"
7401 cat > conftest.$ac_ext <<EOF
7402 #line 7403 "configure"
7403 #include "confdefs.h"
7404 /* Override any gcc2 internal prototype to avoid an error.  */
7405 /* We use char because int might match the return type of a gcc2
7406     builtin and then its argument prototype would still apply.  */
7407 char tt_message_create();
7408
7409 int main() {
7410 tt_message_create()
7411 ; return 0; }
7412 EOF
7413 if { (eval echo configure:7414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7414   rm -rf conftest*
7415   eval "ac_cv_lib_$ac_lib_var=yes"
7416 else
7417   echo "configure: failed program was:" >&5
7418   cat conftest.$ac_ext >&5
7419   rm -rf conftest*
7420   eval "ac_cv_lib_$ac_lib_var=no"
7421 fi
7422 rm -f conftest*
7423 xe_check_libs=""
7424
7425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7426   echo "$ac_t""yes" 1>&6
7427   tt_libs="-ltt $extra_libs"; break
7428 else
7429   echo "$ac_t""no" 1>&6
7430 :
7431 fi
7432
7433
7434   done
7435   if test -z "$tt_libs"; then
7436     if test "$with_tooltalk" = "yes"; then
7437       (echo "$progname: Usage error:"
7438 echo " " "Unable to find required tooltalk libraries."
7439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7440     fi
7441     with_tooltalk=no
7442   fi
7443 fi
7444 test -z "$with_tooltalk" && with_tooltalk=yes
7445 if test "$with_tooltalk" = "yes"; then
7446   { test "$extra_verbose" = "yes" && cat << \EOF
7447     Defining TOOLTALK
7448 EOF
7449 cat >> confdefs.h <<\EOF
7450 #define TOOLTALK 1
7451 EOF
7452 }
7453
7454   { test "$extra_verbose" = "yes" && cat << EOF
7455     Defining TT_C_H_FILE = "$tt_c_h_file"
7456 EOF
7457 cat >> confdefs.h <<EOF
7458 #define TT_C_H_FILE "$tt_c_h_file"
7459 EOF
7460 }
7461
7462   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7463   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7464    echo "    xemacs will be linked with \"tooltalk.o\""
7465  fi
7466 fi
7467
7468 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7469 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7470 echo "configure:7471: checking for Dt/Dt.h" >&5
7471
7472 cat > conftest.$ac_ext <<EOF
7473 #line 7474 "configure"
7474 #include "confdefs.h"
7475 #include <Dt/Dt.h>
7476 EOF
7477 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7478 { (eval echo configure:7479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7479 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7480 if test -z "$ac_err"; then
7481   rm -rf conftest*
7482   eval "ac_cv_header_$ac_safe=yes"
7483 else
7484   echo "$ac_err" >&5
7485   echo "configure: failed program was:" >&5
7486   cat conftest.$ac_ext >&5
7487   rm -rf conftest*
7488   eval "ac_cv_header_$ac_safe=no"
7489 fi
7490 rm -f conftest*
7491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7492   echo "$ac_t""yes" 1>&6
7493   :
7494 else
7495   echo "$ac_t""no" 1>&6
7496 with_cde=no
7497 fi
7498  }
7499 test -z "$with_cde" && { 
7500 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7501 echo "configure:7502: checking for DtDndDragStart in -lDtSvc" >&5
7502 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7503
7504 xe_check_libs=" -lDtSvc "
7505 cat > conftest.$ac_ext <<EOF
7506 #line 7507 "configure"
7507 #include "confdefs.h"
7508 /* Override any gcc2 internal prototype to avoid an error.  */
7509 /* We use char because int might match the return type of a gcc2
7510     builtin and then its argument prototype would still apply.  */
7511 char DtDndDragStart();
7512
7513 int main() {
7514 DtDndDragStart()
7515 ; return 0; }
7516 EOF
7517 if { (eval echo configure:7518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7518   rm -rf conftest*
7519   eval "ac_cv_lib_$ac_lib_var=yes"
7520 else
7521   echo "configure: failed program was:" >&5
7522   cat conftest.$ac_ext >&5
7523   rm -rf conftest*
7524   eval "ac_cv_lib_$ac_lib_var=no"
7525 fi
7526 rm -f conftest*
7527 xe_check_libs=""
7528
7529 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7530   echo "$ac_t""yes" 1>&6
7531   :
7532 else
7533   echo "$ac_t""no" 1>&6
7534 with_cde=no
7535 fi
7536
7537  }
7538 test -z "$with_cde" && with_cde=yes
7539 if test "$with_dragndrop" = no; then
7540   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7541   with_cde=no
7542 fi
7543 if test "$with_cde" = "yes" ; then
7544   { test "$extra_verbose" = "yes" && cat << \EOF
7545     Defining HAVE_CDE
7546 EOF
7547 cat >> confdefs.h <<\EOF
7548 #define HAVE_CDE 1
7549 EOF
7550 }
7551
7552   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7553   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7554   with_tooltalk=yes # CDE requires Tooltalk
7555   need_motif=yes    # CDE requires Motif
7556 fi
7557
7558 test "$window_system" != "x11" && with_offix=no
7559 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7560   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7561   with_offix=no
7562 fi
7563 if test "$with_dragndrop" = no; then
7564   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7565   with_offix=no
7566 fi
7567 if test "$with_cde" = yes; then
7568   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7569   with_offix=no
7570 fi
7571 test -z "$with_offix" && with_offix=no
7572 if test "$with_offix" = "yes"; then
7573   { test "$extra_verbose" = "yes" && cat << \EOF
7574     Defining HAVE_OFFIX_DND
7575 EOF
7576 cat >> confdefs.h <<\EOF
7577 #define HAVE_OFFIX_DND 1
7578 EOF
7579 }
7580
7581   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7582   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7583 fi
7584 if test "$with_gtk" = "yes"; then
7585    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7586 fi
7587
7588 if test "$with_dragndrop" != "no" ; then
7589   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7590 echo "configure:7591: checking if drag and drop API is needed" >&5
7591   if test -n "$dragndrop_proto" ; then
7592     with_dragndrop=yes
7593     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7594     { test "$extra_verbose" = "yes" && cat << \EOF
7595     Defining HAVE_DRAGNDROP
7596 EOF
7597 cat >> confdefs.h <<\EOF
7598 #define HAVE_DRAGNDROP 1
7599 EOF
7600 }
7601
7602     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7603   else
7604     with_dragndrop=no
7605     echo "$ac_t""no" 1>&6
7606   fi
7607 fi
7608
7609 echo "checking for LDAP" 1>&6
7610 echo "configure:7611: checking for LDAP" >&5
7611 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7612 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7613 echo "configure:7614: checking for ldap.h" >&5
7614
7615 cat > conftest.$ac_ext <<EOF
7616 #line 7617 "configure"
7617 #include "confdefs.h"
7618 #include <ldap.h>
7619 EOF
7620 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7621 { (eval echo configure:7622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7622 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7623 if test -z "$ac_err"; then
7624   rm -rf conftest*
7625   eval "ac_cv_header_$ac_safe=yes"
7626 else
7627   echo "$ac_err" >&5
7628   echo "configure: failed program was:" >&5
7629   cat conftest.$ac_ext >&5
7630   rm -rf conftest*
7631   eval "ac_cv_header_$ac_safe=no"
7632 fi
7633 rm -f conftest*
7634 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7635   echo "$ac_t""yes" 1>&6
7636   :
7637 else
7638   echo "$ac_t""no" 1>&6
7639 with_ldap=no
7640 fi
7641  }
7642 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7643 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7644 echo "configure:7645: checking for lber.h" >&5
7645
7646 cat > conftest.$ac_ext <<EOF
7647 #line 7648 "configure"
7648 #include "confdefs.h"
7649 #include <lber.h>
7650 EOF
7651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7652 { (eval echo configure:7653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7654 if test -z "$ac_err"; then
7655   rm -rf conftest*
7656   eval "ac_cv_header_$ac_safe=yes"
7657 else
7658   echo "$ac_err" >&5
7659   echo "configure: failed program was:" >&5
7660   cat conftest.$ac_ext >&5
7661   rm -rf conftest*
7662   eval "ac_cv_header_$ac_safe=no"
7663 fi
7664 rm -f conftest*
7665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7666   echo "$ac_t""yes" 1>&6
7667   :
7668 else
7669   echo "$ac_t""no" 1>&6
7670 with_ldap=no
7671 fi
7672  }
7673 if test "$with_ldap" != "no"; then
7674   
7675 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7676 echo "configure:7677: checking for ldap_search in -lldap" >&5
7677 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7678
7679 xe_check_libs=" -lldap "
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_search();
7687
7688 int main() {
7689 ldap_search()
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_nolber=yes
7707 else
7708   echo "$ac_t""no" 1>&6
7709 with_ldap_nolber=no
7710 fi
7711
7712
7713   test "$with_ldap_nolber" = "no" && { 
7714 xe_msg_checking="for ldap_open in -lldap"
7715 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
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"
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_lber=yes
7748 else
7749   echo "$ac_t""no" 1>&6
7750 with_ldap_lber=no
7751 fi
7752
7753  }
7754   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7755 xe_msg_checking="for ldap_open in -lldap"
7756 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
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"
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_krb=yes
7789 else
7790   echo "$ac_t""no" 1>&6
7791 with_ldap_krb=no
7792 fi
7793
7794  }
7795   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7796 xe_msg_checking="for ldap_open in -lldap"
7797 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7798 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7799 echo "configure:7800: checking "$xe_msg_checking"" >&5
7800 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7801
7802 xe_check_libs=" -lldap -llber -lkrb -ldes"
7803 cat > conftest.$ac_ext <<EOF
7804 #line 7805 "configure"
7805 #include "confdefs.h"
7806 /* Override any gcc2 internal prototype to avoid an error.  */
7807 /* We use char because int might match the return type of a gcc2
7808     builtin and then its argument prototype would still apply.  */
7809 char ldap_open();
7810
7811 int main() {
7812 ldap_open()
7813 ; return 0; }
7814 EOF
7815 if { (eval echo configure:7816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7816   rm -rf conftest*
7817   eval "ac_cv_lib_$ac_lib_var=yes"
7818 else
7819   echo "configure: failed program was:" >&5
7820   cat conftest.$ac_ext >&5
7821   rm -rf conftest*
7822   eval "ac_cv_lib_$ac_lib_var=no"
7823 fi
7824 rm -f conftest*
7825 xe_check_libs=""
7826
7827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7828   echo "$ac_t""yes" 1>&6
7829   with_ldap_krbdes=yes
7830 else
7831   echo "$ac_t""no" 1>&6
7832 with_ldap_krbdes=no
7833 fi
7834
7835  }
7836   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
7837 fi
7838 if test "$with_ldap" = "yes"; then
7839   { test "$extra_verbose" = "yes" && cat << \EOF
7840     Defining HAVE_LDAP
7841 EOF
7842 cat >> confdefs.h <<\EOF
7843 #define HAVE_LDAP 1
7844 EOF
7845 }
7846
7847   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7848    echo "    xemacs will be linked with \"eldap.o\""
7849  fi
7850   if test "$with_ldap_nolber" = "yes" ; then
7851     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7852   else
7853     if test "$with_ldap_krb" = "yes" ; then
7854       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7855     fi
7856     if test "$with_ldap_krbdes" = "yes" ; then
7857       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7858       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7859     fi
7860     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7861     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7862   fi
7863   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7864 do
7865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7866 echo "configure:7867: checking for $ac_func" >&5
7867
7868 cat > conftest.$ac_ext <<EOF
7869 #line 7870 "configure"
7870 #include "confdefs.h"
7871 /* System header to define __stub macros and hopefully few prototypes,
7872     which can conflict with char $ac_func(); below.  */
7873 #include <assert.h>
7874 /* Override any gcc2 internal prototype to avoid an error.  */
7875 /* We use char because int might match the return type of a gcc2
7876     builtin and then its argument prototype would still apply.  */
7877 char $ac_func();
7878
7879 int main() {
7880
7881 /* The GNU C library defines this for functions which it implements
7882     to always fail with ENOSYS.  Some functions are actually named
7883     something starting with __ and the normal name is an alias.  */
7884 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7885 choke me
7886 #else
7887 $ac_func();
7888 #endif
7889
7890 ; return 0; }
7891 EOF
7892 if { (eval echo configure:7893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7893   rm -rf conftest*
7894   eval "ac_cv_func_$ac_func=yes"
7895 else
7896   echo "configure: failed program was:" >&5
7897   cat conftest.$ac_ext >&5
7898   rm -rf conftest*
7899   eval "ac_cv_func_$ac_func=no"
7900 fi
7901 rm -f conftest*
7902
7903 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7904   echo "$ac_t""yes" 1>&6
7905     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7906   { test "$extra_verbose" = "yes" && cat << EOF
7907     Defining $ac_tr_func
7908 EOF
7909 cat >> confdefs.h <<EOF
7910 #define $ac_tr_func 1
7911 EOF
7912 }
7913  
7914 else
7915   echo "$ac_t""no" 1>&6
7916 fi
7917 done
7918
7919 fi
7920
7921 if test "$with_postgresql" != "no"; then
7922   echo "checking for PostgreSQL" 1>&6
7923 echo "configure:7924: checking for PostgreSQL" >&5
7924
7925   for header_dir in "" "pgsql/" "postgresql/"; do
7926     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7927 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7928 echo "configure:7929: checking for ${header_dir}libpq-fe.h" >&5
7929
7930 cat > conftest.$ac_ext <<EOF
7931 #line 7932 "configure"
7932 #include "confdefs.h"
7933 #include <${header_dir}libpq-fe.h>
7934 EOF
7935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7936 { (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7938 if test -z "$ac_err"; then
7939   rm -rf conftest*
7940   eval "ac_cv_header_$ac_safe=yes"
7941 else
7942   echo "$ac_err" >&5
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   eval "ac_cv_header_$ac_safe=no"
7947 fi
7948 rm -f conftest*
7949 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7950   echo "$ac_t""yes" 1>&6
7951   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7952 else
7953   echo "$ac_t""no" 1>&6
7954 fi
7955
7956   done
7957
7958   test -n "$libpq_fe_h_file" && { 
7959 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7960 echo "configure:7961: checking for PQconnectdb in -lpq" >&5
7961 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7962
7963 xe_check_libs=" -lpq "
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 /* Override any gcc2 internal prototype to avoid an error.  */
7968 /* We use char because int might match the return type of a gcc2
7969     builtin and then its argument prototype would still apply.  */
7970 char PQconnectdb();
7971
7972 int main() {
7973 PQconnectdb()
7974 ; return 0; }
7975 EOF
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=yes"
7979 else
7980   echo "configure: failed program was:" >&5
7981   cat conftest.$ac_ext >&5
7982   rm -rf conftest*
7983   eval "ac_cv_lib_$ac_lib_var=no"
7984 fi
7985 rm -f conftest*
7986 xe_check_libs=""
7987
7988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7989   echo "$ac_t""yes" 1>&6
7990   have_libpq=yes
7991 else
7992   echo "$ac_t""no" 1>&6
7993 fi
7994
7995  }
7996
7997   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7998     with_postgresql=yes
7999     { test "$extra_verbose" = "yes" && cat << \EOF
8000     Defining HAVE_POSTGRESQL
8001 EOF
8002 cat >> confdefs.h <<\EOF
8003 #define HAVE_POSTGRESQL 1
8004 EOF
8005 }
8006
8007     
8008 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8009 echo "configure:8010: checking for PQconnectStart in -lpq" >&5
8010 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8011
8012 xe_check_libs=" -lpq "
8013 cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* Override any gcc2 internal prototype to avoid an error.  */
8017 /* We use char because int might match the return type of a gcc2
8018     builtin and then its argument prototype would still apply.  */
8019 char PQconnectStart();
8020
8021 int main() {
8022 PQconnectStart()
8023 ; return 0; }
8024 EOF
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8026   rm -rf conftest*
8027   eval "ac_cv_lib_$ac_lib_var=yes"
8028 else
8029   echo "configure: failed program was:" >&5
8030   cat conftest.$ac_ext >&5
8031   rm -rf conftest*
8032   eval "ac_cv_lib_$ac_lib_var=no"
8033 fi
8034 rm -f conftest*
8035 xe_check_libs=""
8036
8037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8038   echo "$ac_t""yes" 1>&6
8039   with_postgresqlv7=yes;
8040                  { test "$extra_verbose" = "yes" && cat << \EOF
8041     Defining HAVE_POSTGRESQLV7
8042 EOF
8043 cat >> confdefs.h <<\EOF
8044 #define HAVE_POSTGRESQLV7 1
8045 EOF
8046 }
8047
8048 else
8049   echo "$ac_t""no" 1>&6
8050 fi
8051
8052
8053     { test "$extra_verbose" = "yes" && cat << EOF
8054     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8055 EOF
8056 cat >> confdefs.h <<EOF
8057 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8058 EOF
8059 }
8060
8061     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8062     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8063    echo "    xemacs will be linked with \"postgresql.o\""
8064  fi
8065   elif test "$with_postgresql" = "yes"; then
8066     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8067   fi
8068 fi
8069
8070
8071 if test "$window_system" != "none"; then
8072   echo "checking for graphics libraries" 1>&6
8073 echo "configure:8074: checking for graphics libraries" >&5
8074
8075       libpath_xpm=
8076   incpath_xpm=
8077   case "$opsys" in 
8078     cygwin*)
8079       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8080       cygwin_top=`eval "dirname ${cygwin_top}"`;
8081       cygwin_top="${cygwin_top}/..";
8082       case "$window_system" in
8083                 x11)  ;;
8084                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8085              incpath_xpm="-I${cygwin_top}/include/noX"
8086               ;;
8087                 gtk)  ;;
8088                 none) ;;
8089                 *)    ;;
8090       esac
8091       ;;
8092         *) ;;
8093   esac
8094     xpm_problem=""
8095   if test -z "$with_xpm"; then
8096     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8097     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8098     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8099 echo "configure:8100: checking for Xpm - no older than 3.4f" >&5
8100     xe_check_libs=-lXpm
8101     cat > conftest.$ac_ext <<EOF
8102 #line 8103 "configure"
8103 #include "confdefs.h"
8104 #define XPM_NUMBERS
8105 #include <X11/xpm.h>
8106     int main(int c, char **v) {
8107     return c == 1 ? 0 :
8108       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8109       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8110 EOF
8111 if { (eval echo configure:8112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8112 then
8113   ./conftest dummy_arg; xpm_status=$?;
8114       if test "$xpm_status" = "0"; then
8115         with_xpm=yes;
8116       else
8117         with_xpm=no;
8118         if test "$xpm_status" = "1"; then
8119           xpm_problem="Xpm library version and header file version don't match!"
8120         elif test "$xpm_status" = "2"; then
8121           xpm_problem="Xpm library version is too old!"
8122         else
8123           xpm_problem="Internal xpm detection logic error!"
8124         fi
8125         echo "
8126 *** WARNING *** $xpm_problem
8127   I'm not touching that with a 10-foot pole!
8128   If you really want to use the installed version of Xpm, rerun
8129   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8130     fi
8131 else
8132   conftest_rc="$?"
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -fr conftest*
8136   with_xpm=no
8137 fi
8138 rm -fr conftest*
8139     xe_check_libs=
8140     echo "$ac_t""$with_xpm" 1>&6
8141   fi
8142   if test "$with_xpm" = "yes"; then
8143                 { test "$extra_verbose" = "yes" && cat << \EOF
8144     Defining HAVE_XPM
8145 EOF
8146 cat >> confdefs.h <<\EOF
8147 #define HAVE_XPM 1
8148 EOF
8149 }
8150
8151     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8152     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8153     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8154     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8155 echo "configure:8156: checking for \"FOR_MSW\" xpm" >&5
8156     xe_check_libs=-lXpm
8157     cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160
8161 int main() {
8162 XpmCreatePixmapFromData()
8163 ; return 0; }
8164 EOF
8165 if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8166   rm -rf conftest*
8167   xpm_for_msw=no
8168 else
8169   echo "configure: failed program was:" >&5
8170   cat conftest.$ac_ext >&5
8171   rm -rf conftest*
8172   xpm_for_msw=yes
8173 fi
8174 rm -f conftest*
8175     xe_check_libs=
8176     echo "$ac_t""$xpm_for_msw" 1>&6
8177     if test "$xpm_for_msw" = "yes"; then
8178       { test "$extra_verbose" = "yes" && cat << \EOF
8179     Defining FOR_MSW
8180 EOF
8181 cat >> confdefs.h <<\EOF
8182 #define FOR_MSW 1
8183 EOF
8184 }
8185
8186     fi
8187   fi
8188
8189     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8190 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8191 echo "configure:8192: checking for compface.h" >&5
8192
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 #include <compface.h>
8197 EOF
8198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8199 { (eval echo configure:8200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8201 if test -z "$ac_err"; then
8202   rm -rf conftest*
8203   eval "ac_cv_header_$ac_safe=yes"
8204 else
8205   echo "$ac_err" >&5
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_header_$ac_safe=no"
8210 fi
8211 rm -f conftest*
8212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8213   echo "$ac_t""yes" 1>&6
8214   :
8215 else
8216   echo "$ac_t""no" 1>&6
8217 with_xface=no
8218 fi
8219  }
8220   test -z "$with_xface" && { 
8221 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8222 echo "configure:8223: checking for UnGenFace in -lcompface" >&5
8223 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8224
8225 xe_check_libs=" -lcompface "
8226 cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* Override any gcc2 internal prototype to avoid an error.  */
8230 /* We use char because int might match the return type of a gcc2
8231     builtin and then its argument prototype would still apply.  */
8232 char UnGenFace();
8233
8234 int main() {
8235 UnGenFace()
8236 ; return 0; }
8237 EOF
8238 if { (eval echo configure:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=yes"
8241 else
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=no"
8246 fi
8247 rm -f conftest*
8248 xe_check_libs=""
8249
8250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8251   echo "$ac_t""yes" 1>&6
8252   : 
8253 else
8254   echo "$ac_t""no" 1>&6
8255 with_xface=no
8256 fi
8257
8258  }
8259   test -z "$with_xface" && with_xface=yes
8260   if test "$with_xface" = "yes"; then
8261     { test "$extra_verbose" = "yes" && cat << \EOF
8262     Defining HAVE_XFACE
8263 EOF
8264 cat >> confdefs.h <<\EOF
8265 #define HAVE_XFACE 1
8266 EOF
8267 }
8268
8269     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8270   fi
8271
8272         if test "$with_gif" != "no"; then
8273     with_gif="yes"
8274     { test "$extra_verbose" = "yes" && cat << \EOF
8275     Defining HAVE_GIF
8276 EOF
8277 cat >> confdefs.h <<\EOF
8278 #define HAVE_GIF 1
8279 EOF
8280 }
8281
8282     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8283    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8284  fi
8285   fi
8286
8287       if test "$with_png $with_tiff" != "no no"; then
8288     
8289 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8290 echo "configure:8291: checking for inflate in -lc" >&5
8291 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8292
8293 xe_check_libs=" -lc "
8294 cat > conftest.$ac_ext <<EOF
8295 #line 8296 "configure"
8296 #include "confdefs.h"
8297 /* Override any gcc2 internal prototype to avoid an error.  */
8298 /* We use char because int might match the return type of a gcc2
8299     builtin and then its argument prototype would still apply.  */
8300 char inflate();
8301
8302 int main() {
8303 inflate()
8304 ; return 0; }
8305 EOF
8306 if { (eval echo configure:8307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=yes"
8309 else
8310   echo "configure: failed program was:" >&5
8311   cat conftest.$ac_ext >&5
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=no"
8314 fi
8315 rm -f conftest*
8316 xe_check_libs=""
8317
8318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8319   echo "$ac_t""yes" 1>&6
8320   :
8321 else
8322   echo "$ac_t""no" 1>&6
8323
8324 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8325 echo "configure:8326: checking for inflate in -lz" >&5
8326 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8327
8328 xe_check_libs=" -lz "
8329 cat > conftest.$ac_ext <<EOF
8330 #line 8331 "configure"
8331 #include "confdefs.h"
8332 /* Override any gcc2 internal prototype to avoid an error.  */
8333 /* We use char because int might match the return type of a gcc2
8334     builtin and then its argument prototype would still apply.  */
8335 char inflate();
8336
8337 int main() {
8338 inflate()
8339 ; return 0; }
8340 EOF
8341 if { (eval echo configure:8342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8342   rm -rf conftest*
8343   eval "ac_cv_lib_$ac_lib_var=yes"
8344 else
8345   echo "configure: failed program was:" >&5
8346   cat conftest.$ac_ext >&5
8347   rm -rf conftest*
8348   eval "ac_cv_lib_$ac_lib_var=no"
8349 fi
8350 rm -f conftest*
8351 xe_check_libs=""
8352
8353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8354   echo "$ac_t""yes" 1>&6
8355   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8356 else
8357   echo "$ac_t""no" 1>&6
8358
8359 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8360 echo "configure:8361: checking for inflate in -lgz" >&5
8361 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8362
8363 xe_check_libs=" -lgz "
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* Override any gcc2 internal prototype to avoid an error.  */
8368 /* We use char because int might match the return type of a gcc2
8369     builtin and then its argument prototype would still apply.  */
8370 char inflate();
8371
8372 int main() {
8373 inflate()
8374 ; return 0; }
8375 EOF
8376 if { (eval echo configure:8377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8377   rm -rf conftest*
8378   eval "ac_cv_lib_$ac_lib_var=yes"
8379 else
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=no"
8384 fi
8385 rm -f conftest*
8386 xe_check_libs=""
8387
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8389   echo "$ac_t""yes" 1>&6
8390   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8391 else
8392   echo "$ac_t""no" 1>&6
8393 fi
8394
8395
8396 fi
8397
8398
8399 fi
8400
8401
8402   fi
8403
8404     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8405 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8406 echo "configure:8407: checking for jpeglib.h" >&5
8407
8408 cat > conftest.$ac_ext <<EOF
8409 #line 8410 "configure"
8410 #include "confdefs.h"
8411 #include <jpeglib.h>
8412 EOF
8413 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8414 { (eval echo configure:8415: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8415 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8416 if test -z "$ac_err"; then
8417   rm -rf conftest*
8418   eval "ac_cv_header_$ac_safe=yes"
8419 else
8420   echo "$ac_err" >&5
8421   echo "configure: failed program was:" >&5
8422   cat conftest.$ac_ext >&5
8423   rm -rf conftest*
8424   eval "ac_cv_header_$ac_safe=no"
8425 fi
8426 rm -f conftest*
8427 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8428   echo "$ac_t""yes" 1>&6
8429   :
8430 else
8431   echo "$ac_t""no" 1>&6
8432 with_jpeg=no
8433 fi
8434  }
8435   test -z "$with_jpeg" && { 
8436 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8437 echo "configure:8438: checking for jpeg_destroy_decompress in -ljpeg" >&5
8438 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8439
8440 xe_check_libs=" -ljpeg "
8441 cat > conftest.$ac_ext <<EOF
8442 #line 8443 "configure"
8443 #include "confdefs.h"
8444 /* Override any gcc2 internal prototype to avoid an error.  */
8445 /* We use char because int might match the return type of a gcc2
8446     builtin and then its argument prototype would still apply.  */
8447 char jpeg_destroy_decompress();
8448
8449 int main() {
8450 jpeg_destroy_decompress()
8451 ; return 0; }
8452 EOF
8453 if { (eval echo configure:8454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8454   rm -rf conftest*
8455   eval "ac_cv_lib_$ac_lib_var=yes"
8456 else
8457   echo "configure: failed program was:" >&5
8458   cat conftest.$ac_ext >&5
8459   rm -rf conftest*
8460   eval "ac_cv_lib_$ac_lib_var=no"
8461 fi
8462 rm -f conftest*
8463 xe_check_libs=""
8464
8465 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8466   echo "$ac_t""yes" 1>&6
8467   :
8468 else
8469   echo "$ac_t""no" 1>&6
8470 with_jpeg=no
8471 fi
8472
8473  }
8474   test -z "$with_jpeg" && with_jpeg=yes
8475   if test "$with_jpeg" = "yes"; then
8476     { test "$extra_verbose" = "yes" && cat << \EOF
8477     Defining HAVE_JPEG
8478 EOF
8479 cat >> confdefs.h <<\EOF
8480 #define HAVE_JPEG 1
8481 EOF
8482 }
8483
8484     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8485   fi
8486
8487     png_problem=""
8488   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8489 echo "configure:8490: checking for pow" >&5
8490
8491 cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 /* System header to define __stub macros and hopefully few prototypes,
8495     which can conflict with char pow(); below.  */
8496 #include <assert.h>
8497 /* Override any gcc2 internal prototype to avoid an error.  */
8498 /* We use char because int might match the return type of a gcc2
8499     builtin and then its argument prototype would still apply.  */
8500 char pow();
8501
8502 int main() {
8503
8504 /* The GNU C library defines this for functions which it implements
8505     to always fail with ENOSYS.  Some functions are actually named
8506     something starting with __ and the normal name is an alias.  */
8507 #if defined (__stub_pow) || defined (__stub___pow)
8508 choke me
8509 #else
8510 pow();
8511 #endif
8512
8513 ; return 0; }
8514 EOF
8515 if { (eval echo configure:8516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516   rm -rf conftest*
8517   eval "ac_cv_func_pow=yes"
8518 else
8519   echo "configure: failed program was:" >&5
8520   cat conftest.$ac_ext >&5
8521   rm -rf conftest*
8522   eval "ac_cv_func_pow=no"
8523 fi
8524 rm -f conftest*
8525
8526 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8527   echo "$ac_t""yes" 1>&6
8528   :
8529 else
8530   echo "$ac_t""no" 1>&6
8531 with_png=no
8532 fi
8533  }
8534   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8535 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8536 echo "configure:8537: checking for png.h" >&5
8537
8538 cat > conftest.$ac_ext <<EOF
8539 #line 8540 "configure"
8540 #include "confdefs.h"
8541 #include <png.h>
8542 EOF
8543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8544 { (eval echo configure:8545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8546 if test -z "$ac_err"; then
8547   rm -rf conftest*
8548   eval "ac_cv_header_$ac_safe=yes"
8549 else
8550   echo "$ac_err" >&5
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -rf conftest*
8554   eval "ac_cv_header_$ac_safe=no"
8555 fi
8556 rm -f conftest*
8557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8558   echo "$ac_t""yes" 1>&6
8559   :
8560 else
8561   echo "$ac_t""no" 1>&6
8562 with_png=no
8563 fi
8564  }
8565   test -z "$with_png" && { 
8566 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8567 echo "configure:8568: checking for png_read_image in -lpng" >&5
8568 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8569
8570 xe_check_libs=" -lpng "
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 /* Override any gcc2 internal prototype to avoid an error.  */
8575 /* We use char because int might match the return type of a gcc2
8576     builtin and then its argument prototype would still apply.  */
8577 char png_read_image();
8578
8579 int main() {
8580 png_read_image()
8581 ; return 0; }
8582 EOF
8583 if { (eval echo configure:8584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8584   rm -rf conftest*
8585   eval "ac_cv_lib_$ac_lib_var=yes"
8586 else
8587   echo "configure: failed program was:" >&5
8588   cat conftest.$ac_ext >&5
8589   rm -rf conftest*
8590   eval "ac_cv_lib_$ac_lib_var=no"
8591 fi
8592 rm -f conftest*
8593 xe_check_libs=""
8594
8595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8596   echo "$ac_t""yes" 1>&6
8597   :
8598 else
8599   echo "$ac_t""no" 1>&6
8600 with_png=no
8601 fi
8602
8603  }
8604   if test -z "$with_png"; then
8605     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8606 echo "configure:8607: checking for workable png version information" >&5
8607     xe_check_libs="-lpng -lz"
8608     cat > conftest.$ac_ext <<EOF
8609 #line 8610 "configure"
8610 #include "confdefs.h"
8611 #include <png.h>
8612     int main(int c, char **v) {
8613     if (c == 1) return 0;
8614     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8615     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8618 then
8619   ./conftest dummy_arg; png_status=$?;
8620       if test "$png_status" = "0"; then
8621         with_png=yes;
8622       else
8623         with_png=no;
8624         if test "$png_status" = "1"; then
8625           png_problem="PNG library version and header file don't match!"
8626         elif test "$png_status" = "2"; then
8627           png_problem="PNG library version too old (pre 1.0.2)!"
8628         fi
8629         echo "
8630 *** WARNING *** $png_problem
8631   I'm not touching that with a 10-foot pole!
8632   If you really want to use the installed version of libPNG, rerun
8633   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8634     fi
8635 else
8636   conftest_rc="$?"
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -fr conftest*
8640   with_png=no
8641 fi
8642 rm -fr conftest*
8643     xe_check_libs=
8644     echo "$ac_t""$with_png" 1>&6
8645   fi
8646   if test "$with_png" = "yes"; then
8647     { test "$extra_verbose" = "yes" && cat << \EOF
8648     Defining HAVE_PNG
8649 EOF
8650 cat >> confdefs.h <<\EOF
8651 #define HAVE_PNG 1
8652 EOF
8653 }
8654
8655     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8656   fi
8657
8658     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8659 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8660 echo "configure:8661: checking for tiffio.h" >&5
8661
8662 cat > conftest.$ac_ext <<EOF
8663 #line 8664 "configure"
8664 #include "confdefs.h"
8665 #include <tiffio.h>
8666 EOF
8667 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8668 { (eval echo configure:8669: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8669 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8670 if test -z "$ac_err"; then
8671   rm -rf conftest*
8672   eval "ac_cv_header_$ac_safe=yes"
8673 else
8674   echo "$ac_err" >&5
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677   rm -rf conftest*
8678   eval "ac_cv_header_$ac_safe=no"
8679 fi
8680 rm -f conftest*
8681 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8682   echo "$ac_t""yes" 1>&6
8683   :
8684 else
8685   echo "$ac_t""no" 1>&6
8686 with_tiff=no
8687 fi
8688  }
8689   test -z "$with_tiff" && { 
8690 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8691 echo "configure:8692: checking for TIFFClientOpen in -ltiff" >&5
8692 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8693
8694 xe_check_libs=" -ltiff "
8695 cat > conftest.$ac_ext <<EOF
8696 #line 8697 "configure"
8697 #include "confdefs.h"
8698 /* Override any gcc2 internal prototype to avoid an error.  */
8699 /* We use char because int might match the return type of a gcc2
8700     builtin and then its argument prototype would still apply.  */
8701 char TIFFClientOpen();
8702
8703 int main() {
8704 TIFFClientOpen()
8705 ; return 0; }
8706 EOF
8707 if { (eval echo configure:8708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=yes"
8710 else
8711   echo "configure: failed program was:" >&5
8712   cat conftest.$ac_ext >&5
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=no"
8715 fi
8716 rm -f conftest*
8717 xe_check_libs=""
8718
8719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8720   echo "$ac_t""yes" 1>&6
8721   :
8722 else
8723   echo "$ac_t""no" 1>&6
8724 with_tiff=no
8725 fi
8726
8727  }
8728   test -z "$with_tiff" && with_tiff=yes
8729   if test "$with_tiff" = "yes"; then
8730     { test "$extra_verbose" = "yes" && cat << \EOF
8731     Defining HAVE_TIFF
8732 EOF
8733 cat >> confdefs.h <<\EOF
8734 #define HAVE_TIFF 1
8735 EOF
8736 }
8737
8738     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8739   fi
8740 fi
8741
8742
8743 if test "$with_gtk" = "yes"; then
8744     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8745 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8746 echo "configure:8747: checking for compface.h" >&5
8747
8748 cat > conftest.$ac_ext <<EOF
8749 #line 8750 "configure"
8750 #include "confdefs.h"
8751 #include <compface.h>
8752 EOF
8753 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8754 { (eval echo configure:8755: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8755 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8756 if test -z "$ac_err"; then
8757   rm -rf conftest*
8758   eval "ac_cv_header_$ac_safe=yes"
8759 else
8760   echo "$ac_err" >&5
8761   echo "configure: failed program was:" >&5
8762   cat conftest.$ac_ext >&5
8763   rm -rf conftest*
8764   eval "ac_cv_header_$ac_safe=no"
8765 fi
8766 rm -f conftest*
8767 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8768   echo "$ac_t""yes" 1>&6
8769   :
8770 else
8771   echo "$ac_t""no" 1>&6
8772 with_xface=no
8773 fi
8774  }
8775   test -z "$with_xface" && { 
8776 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8777 echo "configure:8778: checking for UnGenFace in -lcompface" >&5
8778 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8779
8780 xe_check_libs=" -lcompface "
8781 cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 /* Override any gcc2 internal prototype to avoid an error.  */
8785 /* We use char because int might match the return type of a gcc2
8786     builtin and then its argument prototype would still apply.  */
8787 char UnGenFace();
8788
8789 int main() {
8790 UnGenFace()
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8794   rm -rf conftest*
8795   eval "ac_cv_lib_$ac_lib_var=yes"
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -rf conftest*
8800   eval "ac_cv_lib_$ac_lib_var=no"
8801 fi
8802 rm -f conftest*
8803 xe_check_libs=""
8804
8805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8806   echo "$ac_t""yes" 1>&6
8807   : 
8808 else
8809   echo "$ac_t""no" 1>&6
8810 with_xface=no
8811 fi
8812
8813  }
8814   test -z "$with_xface" && with_xface=yes
8815   if test "$with_xface" = "yes"; then
8816     { test "$extra_verbose" = "yes" && cat << \EOF
8817     Defining HAVE_XFACE
8818 EOF
8819 cat >> confdefs.h <<\EOF
8820 #define HAVE_XFACE 1
8821 EOF
8822 }
8823
8824     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8825   fi
8826 fi
8827
8828
8829
8830 if test "$with_x11" = "yes"; then
8831   echo "checking for X11 graphics libraries" 1>&6
8832 echo "configure:8833: checking for X11 graphics libraries" >&5
8833 fi
8834
8835 case "$with_widgets" in
8836   "yes" | "athena")             detect_athena=yes ;;
8837    *)                           detect_athena=no ;;
8838 esac
8839
8840 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8841   echo "checking for the Athena widgets" 1>&6
8842 echo "configure:8843: checking for the Athena widgets" >&5
8843
8844     case "$with_athena" in
8845         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8846     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8847     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8848     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8849     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8850     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8851   esac
8852
8853     if test "$athena_3d" = "no"; then
8854     
8855 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8856 echo "configure:8857: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8857 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8858
8859 xe_check_libs=" -l$athena_variant "
8860 cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* Override any gcc2 internal prototype to avoid an error.  */
8864 /* We use char because int might match the return type of a gcc2
8865     builtin and then its argument prototype would still apply.  */
8866 char XawScrollbarSetThumb();
8867
8868 int main() {
8869 XawScrollbarSetThumb()
8870 ; return 0; }
8871 EOF
8872 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8873   rm -rf conftest*
8874   eval "ac_cv_lib_$ac_lib_var=yes"
8875 else
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -rf conftest*
8879   eval "ac_cv_lib_$ac_lib_var=no"
8880 fi
8881 rm -f conftest*
8882 xe_check_libs=""
8883
8884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8885   echo "$ac_t""yes" 1>&6
8886           
8887 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8888 echo "configure:8889: checking for threeDClassRec in -l$athena_variant" >&5
8889 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8890
8891 xe_check_libs=" -l$athena_variant "
8892 cat > conftest.$ac_ext <<EOF
8893 #line 8894 "configure"
8894 #include "confdefs.h"
8895 /* Override any gcc2 internal prototype to avoid an error.  */
8896 /* We use char because int might match the return type of a gcc2
8897     builtin and then its argument prototype would still apply.  */
8898 char threeDClassRec();
8899
8900 int main() {
8901 threeDClassRec()
8902 ; return 0; }
8903 EOF
8904 if { (eval echo configure:8905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8905   rm -rf conftest*
8906   eval "ac_cv_lib_$ac_lib_var=yes"
8907 else
8908   echo "configure: failed program was:" >&5
8909   cat conftest.$ac_ext >&5
8910   rm -rf conftest*
8911   eval "ac_cv_lib_$ac_lib_var=no"
8912 fi
8913 rm -f conftest*
8914 xe_check_libs=""
8915
8916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8917   echo "$ac_t""yes" 1>&6
8918   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8919 else
8920   echo "$ac_t""no" 1>&6
8921 athena_lib=$athena_variant
8922 fi
8923
8924
8925       
8926 else
8927   echo "$ac_t""no" 1>&6
8928 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8929 fi
8930
8931
8932   else
8933         
8934 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8935 echo "configure:8936: checking for threeDClassRec in -l$athena_variant" >&5
8936 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8937
8938 xe_check_libs=" -l$athena_variant "
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* Override any gcc2 internal prototype to avoid an error.  */
8943 /* We use char because int might match the return type of a gcc2
8944     builtin and then its argument prototype would still apply.  */
8945 char threeDClassRec();
8946
8947 int main() {
8948 threeDClassRec()
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8952   rm -rf conftest*
8953   eval "ac_cv_lib_$ac_lib_var=yes"
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=no"
8959 fi
8960 rm -f conftest*
8961 xe_check_libs=""
8962
8963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8964   echo "$ac_t""yes" 1>&6
8965   athena_lib=$athena_variant
8966 else
8967   echo "$ac_t""no" 1>&6
8968 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8969 echo "configure:8970: checking for threeDClassRec in -lXaw" >&5
8970 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8971
8972 xe_check_libs=" -lXaw "
8973 cat > conftest.$ac_ext <<EOF
8974 #line 8975 "configure"
8975 #include "confdefs.h"
8976 /* Override any gcc2 internal prototype to avoid an error.  */
8977 /* We use char because int might match the return type of a gcc2
8978     builtin and then its argument prototype would still apply.  */
8979 char threeDClassRec();
8980
8981 int main() {
8982 threeDClassRec()
8983 ; return 0; }
8984 EOF
8985 if { (eval echo configure:8986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8986   rm -rf conftest*
8987   eval "ac_cv_lib_$ac_lib_var=yes"
8988 else
8989   echo "configure: failed program was:" >&5
8990   cat conftest.$ac_ext >&5
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=no"
8993 fi
8994 rm -f conftest*
8995 xe_check_libs=""
8996
8997 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8998   echo "$ac_t""yes" 1>&6
8999   athena_lib=Xaw;
9000           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
9001         
9002 else
9003   echo "$ac_t""no" 1>&6
9004 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
9005 fi
9006
9007
9008 fi
9009
9010
9011   fi
9012
9013     if test "$athena_3d" = "no"; then
9014     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9015 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9016 echo "configure:9017: checking for X11/Xaw/ThreeD.h" >&5
9017
9018 cat > conftest.$ac_ext <<EOF
9019 #line 9020 "configure"
9020 #include "confdefs.h"
9021 #include <X11/Xaw/ThreeD.h>
9022 EOF
9023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9024 { (eval echo configure:9025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9026 if test -z "$ac_err"; then
9027   rm -rf conftest*
9028   eval "ac_cv_header_$ac_safe=yes"
9029 else
9030   echo "$ac_err" >&5
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_header_$ac_safe=no"
9035 fi
9036 rm -f conftest*
9037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9038   echo "$ac_t""yes" 1>&6
9039   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9040 else
9041   echo "$ac_t""no" 1>&6
9042 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9043 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9044 echo "configure:9045: checking for X11/Xaw/XawInit.h" >&5
9045
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 #include <X11/Xaw/XawInit.h>
9050 EOF
9051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9052 { (eval echo configure:9053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9054 if test -z "$ac_err"; then
9055   rm -rf conftest*
9056   eval "ac_cv_header_$ac_safe=yes"
9057 else
9058   echo "$ac_err" >&5
9059   echo "configure: failed program was:" >&5
9060   cat conftest.$ac_ext >&5
9061   rm -rf conftest*
9062   eval "ac_cv_header_$ac_safe=no"
9063 fi
9064 rm -f conftest*
9065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9066   echo "$ac_t""yes" 1>&6
9067   athena_h_path=X11/Xaw
9068 else
9069   echo "$ac_t""no" 1>&6
9070 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9071 fi
9072
9073 fi
9074
9075   else
9076             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9077 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9078 echo "configure:9079: checking for X11/$athena_variant/XawInit.h" >&5
9079
9080 cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9083 #include <X11/$athena_variant/XawInit.h>
9084 EOF
9085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9086 { (eval echo configure:9087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9088 if test -z "$ac_err"; then
9089   rm -rf conftest*
9090   eval "ac_cv_header_$ac_safe=yes"
9091 else
9092   echo "$ac_err" >&5
9093   echo "configure: failed program was:" >&5
9094   cat conftest.$ac_ext >&5
9095   rm -rf conftest*
9096   eval "ac_cv_header_$ac_safe=no"
9097 fi
9098 rm -f conftest*
9099 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9100   echo "$ac_t""yes" 1>&6
9101   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9102 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9103 echo "configure:9104: checking for X11/$athena_variant/ThreeD.h" >&5
9104
9105 cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9108 #include <X11/$athena_variant/ThreeD.h>
9109 EOF
9110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9111 { (eval echo configure:9112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9113 if test -z "$ac_err"; then
9114   rm -rf conftest*
9115   eval "ac_cv_header_$ac_safe=yes"
9116 else
9117   echo "$ac_err" >&5
9118   echo "configure: failed program was:" >&5
9119   cat conftest.$ac_ext >&5
9120   rm -rf conftest*
9121   eval "ac_cv_header_$ac_safe=no"
9122 fi
9123 rm -f conftest*
9124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9125   echo "$ac_t""yes" 1>&6
9126   athena_h_path=X11/$athena_variant
9127 else
9128   echo "$ac_t""no" 1>&6
9129 fi
9130
9131 else
9132   echo "$ac_t""no" 1>&6
9133 fi
9134
9135
9136         if test -z "$athena_h_path"; then
9137       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9138 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9139 echo "configure:9140: checking for $athena_variant/XawInit.h" >&5
9140
9141 cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144 #include <$athena_variant/XawInit.h>
9145 EOF
9146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9147 { (eval echo configure:9148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9149 if test -z "$ac_err"; then
9150   rm -rf conftest*
9151   eval "ac_cv_header_$ac_safe=yes"
9152 else
9153   echo "$ac_err" >&5
9154   echo "configure: failed program was:" >&5
9155   cat conftest.$ac_ext >&5
9156   rm -rf conftest*
9157   eval "ac_cv_header_$ac_safe=no"
9158 fi
9159 rm -f conftest*
9160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9161   echo "$ac_t""yes" 1>&6
9162   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9163 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9164 echo "configure:9165: checking for $athena_variant/ThreeD.h" >&5
9165
9166 cat > conftest.$ac_ext <<EOF
9167 #line 9168 "configure"
9168 #include "confdefs.h"
9169 #include <$athena_variant/ThreeD.h>
9170 EOF
9171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9172 { (eval echo configure:9173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9174 if test -z "$ac_err"; then
9175   rm -rf conftest*
9176   eval "ac_cv_header_$ac_safe=yes"
9177 else
9178   echo "$ac_err" >&5
9179   echo "configure: failed program was:" >&5
9180   cat conftest.$ac_ext >&5
9181   rm -rf conftest*
9182   eval "ac_cv_header_$ac_safe=no"
9183 fi
9184 rm -f conftest*
9185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9186   echo "$ac_t""yes" 1>&6
9187   athena_h_path=$athena_variant
9188 else
9189   echo "$ac_t""no" 1>&6
9190 fi
9191
9192 else
9193   echo "$ac_t""no" 1>&6
9194 fi
9195
9196     fi
9197
9198         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9199       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9200 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9201 echo "configure:9202: checking for X11/Xaw3d/XawInit.h" >&5
9202
9203 cat > conftest.$ac_ext <<EOF
9204 #line 9205 "configure"
9205 #include "confdefs.h"
9206 #include <X11/Xaw3d/XawInit.h>
9207 EOF
9208 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9209 { (eval echo configure:9210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9210 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9211 if test -z "$ac_err"; then
9212   rm -rf conftest*
9213   eval "ac_cv_header_$ac_safe=yes"
9214 else
9215   echo "$ac_err" >&5
9216   echo "configure: failed program was:" >&5
9217   cat conftest.$ac_ext >&5
9218   rm -rf conftest*
9219   eval "ac_cv_header_$ac_safe=no"
9220 fi
9221 rm -f conftest*
9222 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9223   echo "$ac_t""yes" 1>&6
9224   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9225 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9226 echo "configure:9227: checking for X11/Xaw3d/ThreeD.h" >&5
9227
9228 cat > conftest.$ac_ext <<EOF
9229 #line 9230 "configure"
9230 #include "confdefs.h"
9231 #include <X11/Xaw3d/ThreeD.h>
9232 EOF
9233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9234 { (eval echo configure:9235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9236 if test -z "$ac_err"; then
9237   rm -rf conftest*
9238   eval "ac_cv_header_$ac_safe=yes"
9239 else
9240   echo "$ac_err" >&5
9241   echo "configure: failed program was:" >&5
9242   cat conftest.$ac_ext >&5
9243   rm -rf conftest*
9244   eval "ac_cv_header_$ac_safe=no"
9245 fi
9246 rm -f conftest*
9247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9248   echo "$ac_t""yes" 1>&6
9249   
9250             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9251             athena_h_path=X11/Xaw3d
9252           
9253 else
9254   echo "$ac_t""no" 1>&6
9255 fi
9256
9257 else
9258   echo "$ac_t""no" 1>&6
9259 fi
9260
9261     fi
9262
9263         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9264       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9265 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9266 echo "configure:9267: checking for Xaw3d/XawInit.h" >&5
9267
9268 cat > conftest.$ac_ext <<EOF
9269 #line 9270 "configure"
9270 #include "confdefs.h"
9271 #include <Xaw3d/XawInit.h>
9272 EOF
9273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9274 { (eval echo configure:9275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9276 if test -z "$ac_err"; then
9277   rm -rf conftest*
9278   eval "ac_cv_header_$ac_safe=yes"
9279 else
9280   echo "$ac_err" >&5
9281   echo "configure: failed program was:" >&5
9282   cat conftest.$ac_ext >&5
9283   rm -rf conftest*
9284   eval "ac_cv_header_$ac_safe=no"
9285 fi
9286 rm -f conftest*
9287 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9288   echo "$ac_t""yes" 1>&6
9289   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9290 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9291 echo "configure:9292: checking for Xaw3d/ThreeD.h" >&5
9292
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 #include <Xaw3d/ThreeD.h>
9297 EOF
9298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9299 { (eval echo configure:9300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9301 if test -z "$ac_err"; then
9302   rm -rf conftest*
9303   eval "ac_cv_header_$ac_safe=yes"
9304 else
9305   echo "$ac_err" >&5
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -rf conftest*
9309   eval "ac_cv_header_$ac_safe=no"
9310 fi
9311 rm -f conftest*
9312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9313   echo "$ac_t""yes" 1>&6
9314   
9315             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9316             athena_h_path=Xaw3d
9317           
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322 else
9323   echo "$ac_t""no" 1>&6
9324 fi
9325
9326     fi
9327
9328             if test -z "$athena_h_path"; then
9329       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9330 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9331 echo "configure:9332: checking for X11/Xaw/ThreeD.h" >&5
9332
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336 #include <X11/Xaw/ThreeD.h>
9337 EOF
9338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9339 { (eval echo configure:9340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9341 if test -z "$ac_err"; then
9342   rm -rf conftest*
9343   eval "ac_cv_header_$ac_safe=yes"
9344 else
9345   echo "$ac_err" >&5
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_header_$ac_safe=no"
9350 fi
9351 rm -f conftest*
9352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9353   echo "$ac_t""yes" 1>&6
9354   
9355           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9356           athena_h_path=X11/Xaw
9357         
9358 else
9359   echo "$ac_t""no" 1>&6
9360 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9361 fi
9362
9363     fi
9364   fi
9365
9366     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9367     have_xaw=yes
9368   else
9369     have_xaw=no
9370   fi
9371
9372 else
9373   have_xaw=no
9374 fi 
9375 if test "$with_x11" = "yes"; then
9376     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9377 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9378 echo "configure:9379: checking for Xm/Xm.h" >&5
9379
9380 cat > conftest.$ac_ext <<EOF
9381 #line 9382 "configure"
9382 #include "confdefs.h"
9383 #include <Xm/Xm.h>
9384 EOF
9385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9386 { (eval echo configure:9387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9388 if test -z "$ac_err"; then
9389   rm -rf conftest*
9390   eval "ac_cv_header_$ac_safe=yes"
9391 else
9392   echo "$ac_err" >&5
9393   echo "configure: failed program was:" >&5
9394   cat conftest.$ac_ext >&5
9395   rm -rf conftest*
9396   eval "ac_cv_header_$ac_safe=no"
9397 fi
9398 rm -f conftest*
9399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9400   echo "$ac_t""yes" 1>&6
9401   
9402 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9403 echo "configure:9404: checking for XmStringFree in -lXm" >&5
9404 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9405
9406 xe_check_libs=" -lXm "
9407 cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* Override any gcc2 internal prototype to avoid an error.  */
9411 /* We use char because int might match the return type of a gcc2
9412     builtin and then its argument prototype would still apply.  */
9413 char XmStringFree();
9414
9415 int main() {
9416 XmStringFree()
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=yes"
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_lib_$ac_lib_var=no"
9427 fi
9428 rm -f conftest*
9429 xe_check_libs=""
9430
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9432   echo "$ac_t""yes" 1>&6
9433   have_motif=yes
9434 else
9435   echo "$ac_t""no" 1>&6
9436 have_motif=no
9437 fi
9438
9439
9440 else
9441   echo "$ac_t""no" 1>&6
9442 have_motif=no
9443 fi
9444
9445
9446   if test "$have_motif" = "yes"; then
9447         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9448 echo "configure:9449: checking for Lesstif" >&5
9449     cat > conftest.$ac_ext <<EOF
9450 #line 9451 "configure"
9451 #include "confdefs.h"
9452 #include <Xm/Xm.h>
9453 #ifdef LESSTIF_VERSION
9454 yes
9455 #endif
9456
9457 EOF
9458 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9459   egrep "yes" >/dev/null 2>&1; then
9460   rm -rf conftest*
9461   have_lesstif=yes
9462 else
9463   rm -rf conftest*
9464   have_lesstif=no
9465 fi
9466 rm -f conftest*
9467
9468   echo "$ac_t""$have_lesstif" 1>&6
9469   fi
9470
9471 fi 
9472
9473 case "$with_menubars" in "" | "yes" | "athena" )
9474   with_menubars="lucid" ;;
9475 esac
9476 case "$with_dialogs" in "" | "yes" | "lucid" )
9477   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9478   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9479   else with_dialogs=no
9480   fi ;;
9481 esac
9482 case "$with_scrollbars" in "" | "yes" )
9483   with_scrollbars="lucid" ;;
9484 esac
9485 case "$with_widgets" in "" | "yes" | "lucid")
9486   if   test "$have_motif" = "yes"; then with_widgets="motif"
9487   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9488   else with_widgets=no
9489   fi ;;
9490 esac
9491
9492 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9493
9494 case "$all_widgets" in
9495   *athena* )
9496     if test "$have_xaw" != "yes"; then
9497       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9498     fi
9499
9500         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9501
9502         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9503
9504                     { test "$extra_verbose" = "yes" && cat << EOF
9505     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9506 EOF
9507 cat >> confdefs.h <<EOF
9508 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9509 EOF
9510 }
9511
9512     { test "$extra_verbose" = "yes" && cat << EOF
9513     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9514 EOF
9515 cat >> confdefs.h <<EOF
9516 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9517 EOF
9518 }
9519
9520     { test "$extra_verbose" = "yes" && cat << EOF
9521     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9522 EOF
9523 cat >> confdefs.h <<EOF
9524 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9525 EOF
9526 }
9527
9528     { test "$extra_verbose" = "yes" && cat << EOF
9529     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9530 EOF
9531 cat >> confdefs.h <<EOF
9532 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9533 EOF
9534 }
9535
9536     { test "$extra_verbose" = "yes" && cat << EOF
9537     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9538 EOF
9539 cat >> confdefs.h <<EOF
9540 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9541 EOF
9542 }
9543
9544     { test "$extra_verbose" = "yes" && cat << EOF
9545     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9546 EOF
9547 cat >> confdefs.h <<EOF
9548 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9549 EOF
9550 }
9551
9552     { test "$extra_verbose" = "yes" && cat << EOF
9553     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9554 EOF
9555 cat >> confdefs.h <<EOF
9556 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9557 EOF
9558 }
9559
9560     { test "$extra_verbose" = "yes" && cat << EOF
9561     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9562 EOF
9563 cat >> confdefs.h <<EOF
9564 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9565 EOF
9566 }
9567
9568     { test "$extra_verbose" = "yes" && cat << EOF
9569     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9570 EOF
9571 cat >> confdefs.h <<EOF
9572 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9573 EOF
9574 }
9575
9576     { test "$extra_verbose" = "yes" && cat << EOF
9577     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9578 EOF
9579 cat >> confdefs.h <<EOF
9580 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9581 EOF
9582 }
9583
9584
9585     { test "$extra_verbose" = "yes" && cat << \EOF
9586     Defining LWLIB_USES_ATHENA
9587 EOF
9588 cat >> confdefs.h <<\EOF
9589 #define LWLIB_USES_ATHENA 1
9590 EOF
9591 }
9592
9593     { test "$extra_verbose" = "yes" && cat << \EOF
9594     Defining NEED_ATHENA
9595 EOF
9596 cat >> confdefs.h <<\EOF
9597 #define NEED_ATHENA 1
9598 EOF
9599 }
9600
9601     need_athena="yes"
9602
9603     if test "$athena_3d" = "yes"; then
9604       { test "$extra_verbose" = "yes" && cat << \EOF
9605     Defining HAVE_ATHENA_3D
9606 EOF
9607 cat >> confdefs.h <<\EOF
9608 #define HAVE_ATHENA_3D 1
9609 EOF
9610 }
9611
9612     fi
9613   ;;
9614 esac
9615
9616 case "$all_widgets" in *motif* )
9617   { test "$extra_verbose" = "yes" && cat << \EOF
9618     Defining LWLIB_USES_MOTIF
9619 EOF
9620 cat >> confdefs.h <<\EOF
9621 #define LWLIB_USES_MOTIF 1
9622 EOF
9623 }
9624
9625   { test "$extra_verbose" = "yes" && cat << \EOF
9626     Defining NEED_MOTIF
9627 EOF
9628 cat >> confdefs.h <<\EOF
9629 #define NEED_MOTIF 1
9630 EOF
9631 }
9632
9633   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9634   need_motif=yes ;;
9635 esac
9636
9637 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9638 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9639 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9640 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9641         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9642 case "$with_widgets" in athena* )
9643         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;;
9644 esac
9645 case "$all_widgets" in *lucid* )
9646   { test "$extra_verbose" = "yes" && cat << \EOF
9647     Defining NEED_LUCID
9648 EOF
9649 cat >> confdefs.h <<\EOF
9650 #define NEED_LUCID 1
9651 EOF
9652 }
9653
9654   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9655 esac
9656
9657
9658
9659 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9660     Defining LWLIB_SCROLLBARS_ATHENA
9661 EOF
9662 cat >> confdefs.h <<\EOF
9663 #define LWLIB_SCROLLBARS_ATHENA 1
9664 EOF
9665 }
9666
9667 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9668     Defining LWLIB_DIALOGS_ATHENA
9669 EOF
9670 cat >> confdefs.h <<\EOF
9671 #define LWLIB_DIALOGS_ATHENA 1
9672 EOF
9673 }
9674
9675
9676 if test "$athena_3d" = "yes"; then
9677   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9678     Defining LWLIB_SCROLLBARS_ATHENA3D
9679 EOF
9680 cat >> confdefs.h <<\EOF
9681 #define LWLIB_SCROLLBARS_ATHENA3D 1
9682 EOF
9683 }
9684
9685   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9686     Defining LWLIB_DIALOGS_ATHENA3D
9687 EOF
9688 cat >> confdefs.h <<\EOF
9689 #define LWLIB_DIALOGS_ATHENA3D 1
9690 EOF
9691 }
9692
9693 fi
9694
9695 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9696     Defining LWLIB_WIDGETS_ATHENA
9697 EOF
9698 cat >> confdefs.h <<\EOF
9699 #define LWLIB_WIDGETS_ATHENA 1
9700 EOF
9701 }
9702 ;; esac
9703 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9704         { test "$extra_verbose" = "yes" && cat << \EOF
9705     Defining LWLIB_TABS_LUCID
9706 EOF
9707 cat >> confdefs.h <<\EOF
9708 #define LWLIB_TABS_LUCID 1
9709 EOF
9710 }
9711
9712
9713 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9714     Defining HAVE_MENUBARS
9715 EOF
9716 cat >> confdefs.h <<\EOF
9717 #define HAVE_MENUBARS 1
9718 EOF
9719 }
9720
9721 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9722     Defining HAVE_SCROLLBARS
9723 EOF
9724 cat >> confdefs.h <<\EOF
9725 #define HAVE_SCROLLBARS 1
9726 EOF
9727 }
9728
9729 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9730     Defining HAVE_DIALOGS
9731 EOF
9732 cat >> confdefs.h <<\EOF
9733 #define HAVE_DIALOGS 1
9734 EOF
9735 }
9736
9737 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9738     Defining HAVE_TOOLBARS
9739 EOF
9740 cat >> confdefs.h <<\EOF
9741 #define HAVE_TOOLBARS 1
9742 EOF
9743 }
9744
9745 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9746     Defining HAVE_WIDGETS
9747 EOF
9748 cat >> confdefs.h <<\EOF
9749 #define HAVE_WIDGETS 1
9750 EOF
9751 }
9752
9753
9754 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9755     Defining LWLIB_MENUBARS_LUCID
9756 EOF
9757 cat >> confdefs.h <<\EOF
9758 #define LWLIB_MENUBARS_LUCID 1
9759 EOF
9760 }
9761
9762 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9763     Defining LWLIB_SCROLLBARS_LUCID
9764 EOF
9765 cat >> confdefs.h <<\EOF
9766 #define LWLIB_SCROLLBARS_LUCID 1
9767 EOF
9768 }
9769
9770
9771 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9772     Defining LWLIB_MENUBARS_MOTIF
9773 EOF
9774 cat >> confdefs.h <<\EOF
9775 #define LWLIB_MENUBARS_MOTIF 1
9776 EOF
9777 }
9778
9779 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9780     Defining LWLIB_SCROLLBARS_MOTIF
9781 EOF
9782 cat >> confdefs.h <<\EOF
9783 #define LWLIB_SCROLLBARS_MOTIF 1
9784 EOF
9785 }
9786
9787 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9788     Defining LWLIB_DIALOGS_MOTIF
9789 EOF
9790 cat >> confdefs.h <<\EOF
9791 #define LWLIB_DIALOGS_MOTIF 1
9792 EOF
9793 }
9794
9795 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9796     Defining LWLIB_WIDGETS_MOTIF
9797 EOF
9798 cat >> confdefs.h <<\EOF
9799 #define LWLIB_WIDGETS_MOTIF 1
9800 EOF
9801 }
9802
9803
9804 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"menubar.o\""
9806  fi
9807 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"scrollbar.o\""
9809  fi
9810 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9811    echo "    xemacs will be linked with \"dialog.o\""
9812  fi
9813 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9814    echo "    xemacs will be linked with \"toolbar.o\""
9815  fi
9816
9817 if test "$with_gtk" = "yes"; then
9818   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9819    echo "    xemacs will be linked with \"menubar-gtk.o\""
9820  fi
9821   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9822    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9823  fi
9824   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9825    echo "    xemacs will be linked with \"dialog-gtk.o\""
9826  fi
9827   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9828    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9829  fi
9830   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9831    echo "    xemacs will be linked with \"gui-gtk.o\""
9832  fi
9833 fi
9834
9835 if test "$with_x11" = "yes"; then
9836   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9837    echo "    xemacs will be linked with \"menubar-x.o\""
9838  fi
9839   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9840    echo "    xemacs will be linked with \"scrollbar-x.o\""
9841  fi
9842   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9843    echo "    xemacs will be linked with \"dialog-x.o\""
9844  fi
9845   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9846    echo "    xemacs will be linked with \"toolbar-x.o\""
9847  fi
9848   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9849    echo "    xemacs will be linked with \"gui-x.o\""
9850  fi
9851 fi
9852
9853
9854 test -z "$with_mule" && with_mule=no
9855 test -z "$with_file_coding" && with_file_coding=no
9856
9857
9858 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9859   { test "$extra_verbose" = "yes" && cat << \EOF
9860     Defining FILE_CODING
9861 EOF
9862 cat >> confdefs.h <<\EOF
9863 #define FILE_CODING 1
9864 EOF
9865 }
9866
9867   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9868    echo "    xemacs will be linked with \"file-coding.o\""
9869  fi
9870 fi
9871
9872 if test "$with_mule" = "yes" ; then
9873   echo "checking for Mule-related features" 1>&6
9874 echo "configure:9875: checking for Mule-related features" >&5
9875   { test "$extra_verbose" = "yes" && cat << \EOF
9876     Defining MULE
9877 EOF
9878 cat >> confdefs.h <<\EOF
9879 #define MULE 1
9880 EOF
9881 }
9882
9883   { test "$extra_verbose" = "yes" && cat << \EOF
9884     Defining FILE_CODING
9885 EOF
9886 cat >> confdefs.h <<\EOF
9887 #define FILE_CODING 1
9888 EOF
9889 }
9890
9891   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9892    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9893  fi
9894
9895     for ac_hdr in libintl.h
9896 do
9897 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9898 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9899 echo "configure:9900: checking for $ac_hdr" >&5
9900
9901 cat > conftest.$ac_ext <<EOF
9902 #line 9903 "configure"
9903 #include "confdefs.h"
9904 #include <$ac_hdr>
9905 EOF
9906 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9907 { (eval echo configure:9908: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9908 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9909 if test -z "$ac_err"; then
9910   rm -rf conftest*
9911   eval "ac_cv_header_$ac_safe=yes"
9912 else
9913   echo "$ac_err" >&5
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   eval "ac_cv_header_$ac_safe=no"
9918 fi
9919 rm -f conftest*
9920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9921   echo "$ac_t""yes" 1>&6
9922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9923   { test "$extra_verbose" = "yes" && cat << EOF
9924     Defining $ac_tr_hdr
9925 EOF
9926 cat >> confdefs.h <<EOF
9927 #define $ac_tr_hdr 1
9928 EOF
9929 }
9930  
9931 else
9932   echo "$ac_t""no" 1>&6
9933 fi
9934 done
9935
9936   
9937 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9938 echo "configure:9939: checking for strerror in -lintl" >&5
9939 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9940
9941 xe_check_libs=" -lintl "
9942 cat > conftest.$ac_ext <<EOF
9943 #line 9944 "configure"
9944 #include "confdefs.h"
9945 /* Override any gcc2 internal prototype to avoid an error.  */
9946 /* We use char because int might match the return type of a gcc2
9947     builtin and then its argument prototype would still apply.  */
9948 char strerror();
9949
9950 int main() {
9951 strerror()
9952 ; return 0; }
9953 EOF
9954 if { (eval echo configure:9955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9955   rm -rf conftest*
9956   eval "ac_cv_lib_$ac_lib_var=yes"
9957 else
9958   echo "configure: failed program was:" >&5
9959   cat conftest.$ac_ext >&5
9960   rm -rf conftest*
9961   eval "ac_cv_lib_$ac_lib_var=no"
9962 fi
9963 rm -f conftest*
9964 xe_check_libs=""
9965
9966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9967   echo "$ac_t""yes" 1>&6
9968     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9969     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9970   { test "$extra_verbose" = "yes" && cat << EOF
9971     Defining $ac_tr_lib
9972 EOF
9973 cat >> confdefs.h <<EOF
9974 #define $ac_tr_lib 1
9975 EOF
9976 }
9977
9978   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9979
9980 else
9981   echo "$ac_t""no" 1>&6
9982 fi
9983
9984
9985
9986   echo "checking for Mule input methods" 1>&6
9987 echo "configure:9988: checking for Mule input methods" >&5
9988         case "$with_xim" in "" | "yes" )
9989     echo "checking for XIM" 1>&6
9990 echo "configure:9991: checking for XIM" >&5
9991     
9992 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9993 echo "configure:9994: checking for XOpenIM in -lX11" >&5
9994 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9995
9996 xe_check_libs=" -lX11 "
9997 cat > conftest.$ac_ext <<EOF
9998 #line 9999 "configure"
9999 #include "confdefs.h"
10000 /* Override any gcc2 internal prototype to avoid an error.  */
10001 /* We use char because int might match the return type of a gcc2
10002     builtin and then its argument prototype would still apply.  */
10003 char XOpenIM();
10004
10005 int main() {
10006 XOpenIM()
10007 ; return 0; }
10008 EOF
10009 if { (eval echo configure:10010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10010   rm -rf conftest*
10011   eval "ac_cv_lib_$ac_lib_var=yes"
10012 else
10013   echo "configure: failed program was:" >&5
10014   cat conftest.$ac_ext >&5
10015   rm -rf conftest*
10016   eval "ac_cv_lib_$ac_lib_var=no"
10017 fi
10018 rm -f conftest*
10019 xe_check_libs=""
10020
10021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10022   echo "$ac_t""yes" 1>&6
10023   with_xim=xlib
10024 else
10025   echo "$ac_t""no" 1>&6
10026 with_xim=no
10027 fi
10028
10029
10030         if test "$have_motif $have_lesstif" = "yes no"; then
10031       
10032 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10033 echo "configure:10034: checking for XmImMbLookupString in -lXm" >&5
10034 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10035
10036 xe_check_libs=" -lXm "
10037 cat > conftest.$ac_ext <<EOF
10038 #line 10039 "configure"
10039 #include "confdefs.h"
10040 /* Override any gcc2 internal prototype to avoid an error.  */
10041 /* We use char because int might match the return type of a gcc2
10042     builtin and then its argument prototype would still apply.  */
10043 char XmImMbLookupString();
10044
10045 int main() {
10046 XmImMbLookupString()
10047 ; return 0; }
10048 EOF
10049 if { (eval echo configure:10050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10050   rm -rf conftest*
10051   eval "ac_cv_lib_$ac_lib_var=yes"
10052 else
10053   echo "configure: failed program was:" >&5
10054   cat conftest.$ac_ext >&5
10055   rm -rf conftest*
10056   eval "ac_cv_lib_$ac_lib_var=no"
10057 fi
10058 rm -f conftest*
10059 xe_check_libs=""
10060
10061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10062   echo "$ac_t""yes" 1>&6
10063   with_xim=motif
10064 else
10065   echo "$ac_t""no" 1>&6
10066 fi
10067
10068
10069     fi ;;
10070   esac
10071   if test "$with_xim" != "no"; then
10072     { test "$extra_verbose" = "yes" && cat << \EOF
10073     Defining HAVE_XIM
10074 EOF
10075 cat >> confdefs.h <<\EOF
10076 #define HAVE_XIM 1
10077 EOF
10078 }
10079
10080     if test "$with_xim" = "xlib"; then
10081       { test "$extra_verbose" = "yes" && cat << \EOF
10082     Defining XIM_XLIB
10083 EOF
10084 cat >> confdefs.h <<\EOF
10085 #define XIM_XLIB 1
10086 EOF
10087 }
10088
10089       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10090    echo "    xemacs will be linked with \"input-method-xlib.o\""
10091  fi
10092     fi
10093     if test "$with_xim" = "motif"; then
10094       { test "$extra_verbose" = "yes" && cat << \EOF
10095     Defining XIM_MOTIF
10096 EOF
10097 cat >> confdefs.h <<\EOF
10098 #define XIM_MOTIF 1
10099 EOF
10100 }
10101
10102       need_motif=yes
10103       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10104    echo "    xemacs will be linked with \"input-method-motif.o\""
10105  fi
10106     fi
10107     if test "$with_xim" = "motif"; then
10108       with_xfs=no
10109     fi
10110   fi
10111
10112     if test "$with_xfs" = "yes" ; then
10113     echo "checking for XFontSet" 1>&6
10114 echo "configure:10115: checking for XFontSet" >&5
10115     
10116 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10117 echo "configure:10118: checking for XmbDrawString in -lX11" >&5
10118 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10119
10120 xe_check_libs=" -lX11 "
10121 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 /* Override any gcc2 internal prototype to avoid an error.  */
10125 /* We use char because int might match the return type of a gcc2
10126     builtin and then its argument prototype would still apply.  */
10127 char XmbDrawString();
10128
10129 int main() {
10130 XmbDrawString()
10131 ; return 0; }
10132 EOF
10133 if { (eval echo configure:10134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10134   rm -rf conftest*
10135   eval "ac_cv_lib_$ac_lib_var=yes"
10136 else
10137   echo "configure: failed program was:" >&5
10138   cat conftest.$ac_ext >&5
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=no"
10141 fi
10142 rm -f conftest*
10143 xe_check_libs=""
10144
10145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10146   echo "$ac_t""yes" 1>&6
10147   :
10148 else
10149   echo "$ac_t""no" 1>&6
10150 with_xfs=no
10151 fi
10152
10153
10154     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10155       { test "$extra_verbose" = "yes" && cat << \EOF
10156     Defining USE_XFONTSET
10157 EOF
10158 cat >> confdefs.h <<\EOF
10159 #define USE_XFONTSET 1
10160 EOF
10161 }
10162
10163       if test "$with_xim" = "no" ; then
10164         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10165    echo "    xemacs will be linked with \"input-method-xlib.o\""
10166  fi
10167       fi
10168     fi
10169   fi 
10170     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10171   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10172 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10173 echo "configure:10174: checking for wnn/jllib.h" >&5
10174
10175 cat > conftest.$ac_ext <<EOF
10176 #line 10177 "configure"
10177 #include "confdefs.h"
10178 #include <wnn/jllib.h>
10179 EOF
10180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10181 { (eval echo configure:10182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10182 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10183 if test -z "$ac_err"; then
10184   rm -rf conftest*
10185   eval "ac_cv_header_$ac_safe=yes"
10186 else
10187   echo "$ac_err" >&5
10188   echo "configure: failed program was:" >&5
10189   cat conftest.$ac_ext >&5
10190   rm -rf conftest*
10191   eval "ac_cv_header_$ac_safe=no"
10192 fi
10193 rm -f conftest*
10194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10195   echo "$ac_t""yes" 1>&6
10196   :
10197 else
10198   echo "$ac_t""no" 1>&6
10199 with_wnn=no
10200 fi
10201  }
10202     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10203 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10204 echo "configure:10205: checking for wnn/commonhd.h" >&5
10205
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <wnn/commonhd.h>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227   :
10228 else
10229   echo "$ac_t""no" 1>&6
10230 with_wnn=no
10231 fi
10232  }
10233     if test "$with_wnn" != "no"; then
10234     for ac_func in crypt
10235 do
10236 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10237 echo "configure:10238: checking for $ac_func" >&5
10238
10239 cat > conftest.$ac_ext <<EOF
10240 #line 10241 "configure"
10241 #include "confdefs.h"
10242 /* System header to define __stub macros and hopefully few prototypes,
10243     which can conflict with char $ac_func(); below.  */
10244 #include <assert.h>
10245 /* Override any gcc2 internal prototype to avoid an error.  */
10246 /* We use char because int might match the return type of a gcc2
10247     builtin and then its argument prototype would still apply.  */
10248 char $ac_func();
10249
10250 int main() {
10251
10252 /* The GNU C library defines this for functions which it implements
10253     to always fail with ENOSYS.  Some functions are actually named
10254     something starting with __ and the normal name is an alias.  */
10255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10256 choke me
10257 #else
10258 $ac_func();
10259 #endif
10260
10261 ; return 0; }
10262 EOF
10263 if { (eval echo configure:10264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10264   rm -rf conftest*
10265   eval "ac_cv_func_$ac_func=yes"
10266 else
10267   echo "configure: failed program was:" >&5
10268   cat conftest.$ac_ext >&5
10269   rm -rf conftest*
10270   eval "ac_cv_func_$ac_func=no"
10271 fi
10272 rm -f conftest*
10273
10274 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10275   echo "$ac_t""yes" 1>&6
10276     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10277   { test "$extra_verbose" = "yes" && cat << EOF
10278     Defining $ac_tr_func
10279 EOF
10280 cat >> confdefs.h <<EOF
10281 #define $ac_tr_func 1
10282 EOF
10283 }
10284  
10285 else
10286   echo "$ac_t""no" 1>&6
10287 fi
10288 done
10289
10290     test "$ac_cv_func_crypt" != "yes" && { 
10291 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10292 echo "configure:10293: checking for crypt in -lcrypt" >&5
10293 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10294
10295 xe_check_libs=" -lcrypt "
10296 cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 /* Override any gcc2 internal prototype to avoid an error.  */
10300 /* We use char because int might match the return type of a gcc2
10301     builtin and then its argument prototype would still apply.  */
10302 char crypt();
10303
10304 int main() {
10305 crypt()
10306 ; return 0; }
10307 EOF
10308 if { (eval echo configure:10309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10309   rm -rf conftest*
10310   eval "ac_cv_lib_$ac_lib_var=yes"
10311 else
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   eval "ac_cv_lib_$ac_lib_var=no"
10316 fi
10317 rm -f conftest*
10318 xe_check_libs=""
10319
10320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10321   echo "$ac_t""yes" 1>&6
10322     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10323     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10324   { test "$extra_verbose" = "yes" && cat << EOF
10325     Defining $ac_tr_lib
10326 EOF
10327 cat >> confdefs.h <<EOF
10328 #define $ac_tr_lib 1
10329 EOF
10330 }
10331
10332   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10333
10334 else
10335   echo "$ac_t""no" 1>&6
10336 fi
10337
10338  }
10339   fi
10340     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10341     
10342 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10343 echo "configure:10344: checking for jl_dic_list_e in -lwnn" >&5
10344 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10345
10346 xe_check_libs=" -lwnn "
10347 cat > conftest.$ac_ext <<EOF
10348 #line 10349 "configure"
10349 #include "confdefs.h"
10350 /* Override any gcc2 internal prototype to avoid an error.  */
10351 /* We use char because int might match the return type of a gcc2
10352     builtin and then its argument prototype would still apply.  */
10353 char jl_dic_list_e();
10354
10355 int main() {
10356 jl_dic_list_e()
10357 ; return 0; }
10358 EOF
10359 if { (eval echo configure:10360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10360   rm -rf conftest*
10361   eval "ac_cv_lib_$ac_lib_var=yes"
10362 else
10363   echo "configure: failed program was:" >&5
10364   cat conftest.$ac_ext >&5
10365   rm -rf conftest*
10366   eval "ac_cv_lib_$ac_lib_var=no"
10367 fi
10368 rm -f conftest*
10369 xe_check_libs=""
10370
10371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10372   echo "$ac_t""yes" 1>&6
10373   libwnn=wnn
10374 else
10375   echo "$ac_t""no" 1>&6
10376 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10377 echo "configure:10378: checking for jl_dic_list_e in -lwnn4" >&5
10378 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10379
10380 xe_check_libs=" -lwnn4 "
10381 cat > conftest.$ac_ext <<EOF
10382 #line 10383 "configure"
10383 #include "confdefs.h"
10384 /* Override any gcc2 internal prototype to avoid an error.  */
10385 /* We use char because int might match the return type of a gcc2
10386     builtin and then its argument prototype would still apply.  */
10387 char jl_dic_list_e();
10388
10389 int main() {
10390 jl_dic_list_e()
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_lib_$ac_lib_var=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=no"
10401 fi
10402 rm -f conftest*
10403 xe_check_libs=""
10404
10405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10406   echo "$ac_t""yes" 1>&6
10407   libwnn=wnn4
10408 else
10409   echo "$ac_t""no" 1>&6
10410 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10411 echo "configure:10412: checking for jl_dic_list_e in -lwnn6" >&5
10412 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10413
10414 xe_check_libs=" -lwnn6 "
10415 cat > conftest.$ac_ext <<EOF
10416 #line 10417 "configure"
10417 #include "confdefs.h"
10418 /* Override any gcc2 internal prototype to avoid an error.  */
10419 /* We use char because int might match the return type of a gcc2
10420     builtin and then its argument prototype would still apply.  */
10421 char jl_dic_list_e();
10422
10423 int main() {
10424 jl_dic_list_e()
10425 ; return 0; }
10426 EOF
10427 if { (eval echo configure:10428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10428   rm -rf conftest*
10429   eval "ac_cv_lib_$ac_lib_var=yes"
10430 else
10431   echo "configure: failed program was:" >&5
10432   cat conftest.$ac_ext >&5
10433   rm -rf conftest*
10434   eval "ac_cv_lib_$ac_lib_var=no"
10435 fi
10436 rm -f conftest*
10437 xe_check_libs=""
10438
10439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10440   echo "$ac_t""yes" 1>&6
10441   libwnn=wnn6
10442 else
10443   echo "$ac_t""no" 1>&6
10444 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10445 echo "configure:10446: checking for dic_list_e in -lwnn6_fromsrc" >&5
10446 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10447
10448 xe_check_libs=" -lwnn6_fromsrc "
10449 cat > conftest.$ac_ext <<EOF
10450 #line 10451 "configure"
10451 #include "confdefs.h"
10452 /* Override any gcc2 internal prototype to avoid an error.  */
10453 /* We use char because int might match the return type of a gcc2
10454     builtin and then its argument prototype would still apply.  */
10455 char dic_list_e();
10456
10457 int main() {
10458 dic_list_e()
10459 ; return 0; }
10460 EOF
10461 if { (eval echo configure:10462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10462   rm -rf conftest*
10463   eval "ac_cv_lib_$ac_lib_var=yes"
10464 else
10465   echo "configure: failed program was:" >&5
10466   cat conftest.$ac_ext >&5
10467   rm -rf conftest*
10468   eval "ac_cv_lib_$ac_lib_var=no"
10469 fi
10470 rm -f conftest*
10471 xe_check_libs=""
10472
10473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10474   echo "$ac_t""yes" 1>&6
10475   libwnn=wnn6_fromsrc
10476 else
10477   echo "$ac_t""no" 1>&6
10478 with_wnn=no
10479 fi
10480
10481
10482 fi
10483
10484
10485 fi
10486
10487
10488 fi
10489
10490
10491   fi
10492   test -z "$with_wnn" && with_wnn=yes
10493   if test "$with_wnn" = "yes"; then
10494     { test "$extra_verbose" = "yes" && cat << \EOF
10495     Defining HAVE_WNN
10496 EOF
10497 cat >> confdefs.h <<\EOF
10498 #define HAVE_WNN 1
10499 EOF
10500 }
10501
10502     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10503     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10504    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10505  fi
10506     if test "$with_wnn6" != "no"; then
10507       
10508 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10509 echo "configure:10510: checking for jl_fi_dic_list in -l$libwnn" >&5
10510 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10511
10512 xe_check_libs=" -l$libwnn "
10513 cat > conftest.$ac_ext <<EOF
10514 #line 10515 "configure"
10515 #include "confdefs.h"
10516 /* Override any gcc2 internal prototype to avoid an error.  */
10517 /* We use char because int might match the return type of a gcc2
10518     builtin and then its argument prototype would still apply.  */
10519 char jl_fi_dic_list();
10520
10521 int main() {
10522 jl_fi_dic_list()
10523 ; return 0; }
10524 EOF
10525 if { (eval echo configure:10526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10526   rm -rf conftest*
10527   eval "ac_cv_lib_$ac_lib_var=yes"
10528 else
10529   echo "configure: failed program was:" >&5
10530   cat conftest.$ac_ext >&5
10531   rm -rf conftest*
10532   eval "ac_cv_lib_$ac_lib_var=no"
10533 fi
10534 rm -f conftest*
10535 xe_check_libs=""
10536
10537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10538   echo "$ac_t""yes" 1>&6
10539   with_wnn6=yes
10540 else
10541   echo "$ac_t""no" 1>&6
10542 fi
10543
10544
10545       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10546     Defining WNN6
10547 EOF
10548 cat >> confdefs.h <<\EOF
10549 #define WNN6 1
10550 EOF
10551 }
10552
10553     fi
10554   fi
10555
10556     canna_includes_found=no
10557   if test "$with_canna" != "no"; then
10558     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10559 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10560 echo "configure:10561: checking for canna/jrkanji.h" >&5
10561
10562 cat > conftest.$ac_ext <<EOF
10563 #line 10564 "configure"
10564 #include "confdefs.h"
10565 #include <canna/jrkanji.h>
10566 EOF
10567 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10568 { (eval echo configure:10569: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10569 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10570 if test -z "$ac_err"; then
10571   rm -rf conftest*
10572   eval "ac_cv_header_$ac_safe=yes"
10573 else
10574   echo "$ac_err" >&5
10575   echo "configure: failed program was:" >&5
10576   cat conftest.$ac_ext >&5
10577   rm -rf conftest*
10578   eval "ac_cv_header_$ac_safe=no"
10579 fi
10580 rm -f conftest*
10581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10582   echo "$ac_t""yes" 1>&6
10583   canna_includes_found=yes
10584 else
10585   echo "$ac_t""no" 1>&6
10586 fi
10587
10588   fi
10589   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10590       -d "/usr/local/canna/include"; then
10591     save_c_switch_site="$c_switch_site"
10592     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10593     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10594 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10595 echo "configure:10596: checking for canna/jrkanji.h" >&5
10596
10597 cat > conftest.$ac_ext <<EOF
10598 #line 10599 "configure"
10599 #include "confdefs.h"
10600 #include <canna/jrkanji.h>
10601 EOF
10602 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10603 { (eval echo configure:10604: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10604 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10605 if test -z "$ac_err"; then
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=yes"
10608 else
10609   echo "$ac_err" >&5
10610   echo "configure: failed program was:" >&5
10611   cat conftest.$ac_ext >&5
10612   rm -rf conftest*
10613   eval "ac_cv_header_$ac_safe=no"
10614 fi
10615 rm -f conftest*
10616 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10617   echo "$ac_t""yes" 1>&6
10618   canna_includes_found=yes
10619 else
10620   echo "$ac_t""no" 1>&6
10621 fi
10622
10623     if test "$canna_includes_found" != "yes"; then
10624       c_switch_site="$save_c_switch_site"
10625       with_canna="no"
10626     fi
10627   fi
10628
10629   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10630 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10631 echo "configure:10632: checking for canna/RK.h" >&5
10632
10633 cat > conftest.$ac_ext <<EOF
10634 #line 10635 "configure"
10635 #include "confdefs.h"
10636 #include <canna/RK.h>
10637 EOF
10638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10639 { (eval echo configure:10640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10641 if test -z "$ac_err"; then
10642   rm -rf conftest*
10643   eval "ac_cv_header_$ac_safe=yes"
10644 else
10645   echo "$ac_err" >&5
10646   echo "configure: failed program was:" >&5
10647   cat conftest.$ac_ext >&5
10648   rm -rf conftest*
10649   eval "ac_cv_header_$ac_safe=no"
10650 fi
10651 rm -f conftest*
10652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10653   echo "$ac_t""yes" 1>&6
10654   :
10655 else
10656   echo "$ac_t""no" 1>&6
10657 with_canna=no
10658 fi
10659  }
10660   test -z "$with_canna" && { 
10661 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10662 echo "configure:10663: checking for RkBgnBun in -lRKC" >&5
10663 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10664
10665 xe_check_libs=" -lRKC "
10666 cat > conftest.$ac_ext <<EOF
10667 #line 10668 "configure"
10668 #include "confdefs.h"
10669 /* Override any gcc2 internal prototype to avoid an error.  */
10670 /* We use char because int might match the return type of a gcc2
10671     builtin and then its argument prototype would still apply.  */
10672 char RkBgnBun();
10673
10674 int main() {
10675 RkBgnBun()
10676 ; return 0; }
10677 EOF
10678 if { (eval echo configure:10679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10679   rm -rf conftest*
10680   eval "ac_cv_lib_$ac_lib_var=yes"
10681 else
10682   echo "configure: failed program was:" >&5
10683   cat conftest.$ac_ext >&5
10684   rm -rf conftest*
10685   eval "ac_cv_lib_$ac_lib_var=no"
10686 fi
10687 rm -f conftest*
10688 xe_check_libs=""
10689
10690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10691   echo "$ac_t""yes" 1>&6
10692   :
10693 else
10694   echo "$ac_t""no" 1>&6
10695 with_canna=no
10696 fi
10697
10698  }
10699   test -z "$with_canna" && { 
10700 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10701 echo "configure:10702: checking for jrKanjiControl in -lcanna" >&5
10702 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10703
10704 xe_check_libs=" -lcanna "
10705 cat > conftest.$ac_ext <<EOF
10706 #line 10707 "configure"
10707 #include "confdefs.h"
10708 /* Override any gcc2 internal prototype to avoid an error.  */
10709 /* We use char because int might match the return type of a gcc2
10710     builtin and then its argument prototype would still apply.  */
10711 char jrKanjiControl();
10712
10713 int main() {
10714 jrKanjiControl()
10715 ; return 0; }
10716 EOF
10717 if { (eval echo configure:10718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=yes"
10720 else
10721   echo "configure: failed program was:" >&5
10722   cat conftest.$ac_ext >&5
10723   rm -rf conftest*
10724   eval "ac_cv_lib_$ac_lib_var=no"
10725 fi
10726 rm -f conftest*
10727 xe_check_libs=""
10728
10729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10730   echo "$ac_t""yes" 1>&6
10731   :
10732 else
10733   echo "$ac_t""no" 1>&6
10734 with_canna=no
10735 fi
10736
10737  }
10738   test -z "$with_canna" && with_canna=yes
10739   if test "$with_canna" = "yes"; then
10740     { test "$extra_verbose" = "yes" && cat << \EOF
10741     Defining HAVE_CANNA
10742 EOF
10743 cat >> confdefs.h <<\EOF
10744 #define HAVE_CANNA 1
10745 EOF
10746 }
10747
10748     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10749     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10750    echo "    xemacs will be linked with \"mule-canna.o\""
10751  fi
10752   fi
10753
10754 else   for feature in xim canna wnn; do
10755     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10756       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10757     fi
10758     eval "with_${feature}=no"
10759   done
10760 fi 
10761
10762 if test "$need_motif" = "yes" ; then
10763   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10764     
10765 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10766 echo "configure:10767: checking for layout_object_getvalue in -li18n" >&5
10767 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10768
10769 xe_check_libs=" -li18n "
10770 cat > conftest.$ac_ext <<EOF
10771 #line 10772 "configure"
10772 #include "confdefs.h"
10773 /* Override any gcc2 internal prototype to avoid an error.  */
10774 /* We use char because int might match the return type of a gcc2
10775     builtin and then its argument prototype would still apply.  */
10776 char layout_object_getvalue();
10777
10778 int main() {
10779 layout_object_getvalue()
10780 ; return 0; }
10781 EOF
10782 if { (eval echo configure:10783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10783   rm -rf conftest*
10784   eval "ac_cv_lib_$ac_lib_var=yes"
10785 else
10786   echo "configure: failed program was:" >&5
10787   cat conftest.$ac_ext >&5
10788   rm -rf conftest*
10789   eval "ac_cv_lib_$ac_lib_var=no"
10790 fi
10791 rm -f conftest*
10792 xe_check_libs=""
10793
10794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10795   echo "$ac_t""yes" 1>&6
10796   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10797 else
10798   echo "$ac_t""no" 1>&6
10799 fi
10800
10801
10802   
10803 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10804     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10805   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10806   
10807         runpath="" runpath_dirs=""
10808   if test -n "$LD_RUN_PATH"; then
10809     runpath="$LD_RUN_PATH"
10810   elif test "$GCC" = "yes"; then
10811         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10812     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10813     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10814     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10815       case "$arg" in P,* | -L* | -R* )
10816         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10817           {
10818 xe_runpath_dir="$dir"
10819   test "$xe_runpath_dir" != "/lib"     -a \
10820         "$xe_runpath_dir" != "/usr/lib" -a \
10821         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10822   eval "$xe_add_unique_runpath_dir"
10823 }
10824         done ;;
10825       esac
10826     done
10827     ld_switch_run="$ld_switch_run_save"
10828     rm -f conftest*
10829   else
10830         for arg in $ld_switch_site $ld_switch_x_site; do
10831       case "$arg" in -L*) {
10832 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10833   test "$xe_runpath_dir" != "/lib"     -a \
10834         "$xe_runpath_dir" != "/usr/lib" -a \
10835         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10836   eval "$xe_add_unique_runpath_dir"
10837 };; esac
10838     done
10839         if test "$opsys $need_motif" = "sol2 yes"; then
10840       xe_runpath_dir="/opt/SUNWdt/lib";
10841       eval "$xe_add_unique_runpath_dir";
10842     fi
10843   fi 
10844   if test -n "$runpath"; then
10845     ld_switch_run="${dash_r}${runpath}"
10846     
10847 if test "$GCC" = "yes"; then
10848   set x $ld_switch_run; shift; ld_switch_run=""
10849   while test -n "$1"; do
10850     case $1 in
10851       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10852       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10853       -Xlinker* ) ;;
10854       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10855     esac
10856     shift
10857   done
10858 fi
10859     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10860   fi
10861 fi
10862
10863 fi
10864
10865
10866 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
10867 do
10868 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10869 echo "configure:10870: checking for $ac_func" >&5
10870
10871 cat > conftest.$ac_ext <<EOF
10872 #line 10873 "configure"
10873 #include "confdefs.h"
10874 /* System header to define __stub macros and hopefully few prototypes,
10875     which can conflict with char $ac_func(); below.  */
10876 #include <assert.h>
10877 /* Override any gcc2 internal prototype to avoid an error.  */
10878 /* We use char because int might match the return type of a gcc2
10879     builtin and then its argument prototype would still apply.  */
10880 char $ac_func();
10881
10882 int main() {
10883
10884 /* The GNU C library defines this for functions which it implements
10885     to always fail with ENOSYS.  Some functions are actually named
10886     something starting with __ and the normal name is an alias.  */
10887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10888 choke me
10889 #else
10890 $ac_func();
10891 #endif
10892
10893 ; return 0; }
10894 EOF
10895 if { (eval echo configure:10896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10896   rm -rf conftest*
10897   eval "ac_cv_func_$ac_func=yes"
10898 else
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -rf conftest*
10902   eval "ac_cv_func_$ac_func=no"
10903 fi
10904 rm -f conftest*
10905
10906 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10907   echo "$ac_t""yes" 1>&6
10908     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10909   { test "$extra_verbose" = "yes" && cat << EOF
10910     Defining $ac_tr_func
10911 EOF
10912 cat >> confdefs.h <<EOF
10913 #define $ac_tr_func 1
10914 EOF
10915 }
10916  
10917 else
10918   echo "$ac_t""no" 1>&6
10919 fi
10920 done
10921
10922
10923 if test "$ac_cv_func_getaddrinfo" != "no" ; then
10924   case "$opsys" in
10925     hpux11* )
10926       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
10927       ac_cv_func_getaddrinfo=no
10928       ;;
10929   esac
10930 fi
10931
10932
10933 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10934 do
10935 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10936 echo "configure:10937: checking for $ac_func" >&5
10937
10938 cat > conftest.$ac_ext <<EOF
10939 #line 10940 "configure"
10940 #include "confdefs.h"
10941 /* System header to define __stub macros and hopefully few prototypes,
10942     which can conflict with char $ac_func(); below.  */
10943 #include <assert.h>
10944 /* Override any gcc2 internal prototype to avoid an error.  */
10945 /* We use char because int might match the return type of a gcc2
10946     builtin and then its argument prototype would still apply.  */
10947 char $ac_func();
10948
10949 int main() {
10950
10951 /* The GNU C library defines this for functions which it implements
10952     to always fail with ENOSYS.  Some functions are actually named
10953     something starting with __ and the normal name is an alias.  */
10954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10955 choke me
10956 #else
10957 $ac_func();
10958 #endif
10959
10960 ; return 0; }
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10963   rm -rf conftest*
10964   eval "ac_cv_func_$ac_func=yes"
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_func_$ac_func=no"
10970 fi
10971 rm -f conftest*
10972
10973 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10974   echo "$ac_t""yes" 1>&6
10975     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10976   { test "$extra_verbose" = "yes" && cat << EOF
10977     Defining $ac_tr_func
10978 EOF
10979 cat >> confdefs.h <<EOF
10980 #define $ac_tr_func 1
10981 EOF
10982 }
10983  
10984 else
10985   echo "$ac_t""no" 1>&6
10986 fi
10987 done
10988
10989
10990 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10991 echo "configure:10992: checking for openpty" >&5
10992
10993 cat > conftest.$ac_ext <<EOF
10994 #line 10995 "configure"
10995 #include "confdefs.h"
10996 /* System header to define __stub macros and hopefully few prototypes,
10997     which can conflict with char openpty(); below.  */
10998 #include <assert.h>
10999 /* Override any gcc2 internal prototype to avoid an error.  */
11000 /* We use char because int might match the return type of a gcc2
11001     builtin and then its argument prototype would still apply.  */
11002 char openpty();
11003
11004 int main() {
11005
11006 /* The GNU C library defines this for functions which it implements
11007     to always fail with ENOSYS.  Some functions are actually named
11008     something starting with __ and the normal name is an alias.  */
11009 #if defined (__stub_openpty) || defined (__stub___openpty)
11010 choke me
11011 #else
11012 openpty();
11013 #endif
11014
11015 ; return 0; }
11016 EOF
11017 if { (eval echo configure:11018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11018   rm -rf conftest*
11019   eval "ac_cv_func_openpty=yes"
11020 else
11021   echo "configure: failed program was:" >&5
11022   cat conftest.$ac_ext >&5
11023   rm -rf conftest*
11024   eval "ac_cv_func_openpty=no"
11025 fi
11026 rm -f conftest*
11027
11028 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11029   echo "$ac_t""yes" 1>&6
11030   have_openpty=yes
11031 else
11032   echo "$ac_t""no" 1>&6
11033
11034   
11035 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11036 echo "configure:11037: checking for openpty in -lutil" >&5
11037 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11038
11039 xe_check_libs=" -lutil "
11040 cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043 /* Override any gcc2 internal prototype to avoid an error.  */
11044 /* We use char because int might match the return type of a gcc2
11045     builtin and then its argument prototype would still apply.  */
11046 char openpty();
11047
11048 int main() {
11049 openpty()
11050 ; return 0; }
11051 EOF
11052 if { (eval echo configure:11053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11053   rm -rf conftest*
11054   eval "ac_cv_lib_$ac_lib_var=yes"
11055 else
11056   echo "configure: failed program was:" >&5
11057   cat conftest.$ac_ext >&5
11058   rm -rf conftest*
11059   eval "ac_cv_lib_$ac_lib_var=no"
11060 fi
11061 rm -f conftest*
11062 xe_check_libs=""
11063
11064 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11065   echo "$ac_t""yes" 1>&6
11066   have_openpty=yes need_libutil=yes
11067 else
11068   echo "$ac_t""no" 1>&6
11069 fi
11070
11071
11072 fi
11073
11074 if test "$have_openpty" = "yes"; then
11075   { test "$extra_verbose" = "yes" && cat << \EOF
11076     Defining HAVE_OPENPTY
11077 EOF
11078 cat >> confdefs.h <<\EOF
11079 #define HAVE_OPENPTY 1
11080 EOF
11081 }
11082
11083   for ac_hdr in pty.h libutil.h util.h
11084 do
11085 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11086 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11087 echo "configure:11088: checking for $ac_hdr" >&5
11088
11089 cat > conftest.$ac_ext <<EOF
11090 #line 11091 "configure"
11091 #include "confdefs.h"
11092 #include <$ac_hdr>
11093 EOF
11094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11095 { (eval echo configure:11096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11097 if test -z "$ac_err"; then
11098   rm -rf conftest*
11099   eval "ac_cv_header_$ac_safe=yes"
11100 else
11101   echo "$ac_err" >&5
11102   echo "configure: failed program was:" >&5
11103   cat conftest.$ac_ext >&5
11104   rm -rf conftest*
11105   eval "ac_cv_header_$ac_safe=no"
11106 fi
11107 rm -f conftest*
11108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11111   { test "$extra_verbose" = "yes" && cat << EOF
11112     Defining $ac_tr_hdr
11113 EOF
11114 cat >> confdefs.h <<EOF
11115 #define $ac_tr_hdr 1
11116 EOF
11117 }
11118  break
11119 else
11120   echo "$ac_t""no" 1>&6
11121 fi
11122 done
11123
11124   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11125 fi
11126
11127 for ac_hdr in stropts.h
11128 do
11129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11131 echo "configure:11132: checking for $ac_hdr" >&5
11132
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <$ac_hdr>
11137 EOF
11138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11139 { (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11141 if test -z "$ac_err"; then
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=yes"
11144 else
11145   echo "$ac_err" >&5
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=no"
11150 fi
11151 rm -f conftest*
11152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11155   { test "$extra_verbose" = "yes" && cat << EOF
11156     Defining $ac_tr_hdr
11157 EOF
11158 cat >> confdefs.h <<EOF
11159 #define $ac_tr_hdr 1
11160 EOF
11161 }
11162  
11163 else
11164   echo "$ac_t""no" 1>&6
11165 fi
11166 done
11167
11168 if test "$ac_cv_header_stropts_h" = "yes"; then
11169   for ac_func in isastream
11170 do
11171 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11172 echo "configure:11173: checking for $ac_func" >&5
11173
11174 cat > conftest.$ac_ext <<EOF
11175 #line 11176 "configure"
11176 #include "confdefs.h"
11177 /* System header to define __stub macros and hopefully few prototypes,
11178     which can conflict with char $ac_func(); below.  */
11179 #include <assert.h>
11180 /* Override any gcc2 internal prototype to avoid an error.  */
11181 /* We use char because int might match the return type of a gcc2
11182     builtin and then its argument prototype would still apply.  */
11183 char $ac_func();
11184
11185 int main() {
11186
11187 /* The GNU C library defines this for functions which it implements
11188     to always fail with ENOSYS.  Some functions are actually named
11189     something starting with __ and the normal name is an alias.  */
11190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11191 choke me
11192 #else
11193 $ac_func();
11194 #endif
11195
11196 ; return 0; }
11197 EOF
11198 if { (eval echo configure:11199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11199   rm -rf conftest*
11200   eval "ac_cv_func_$ac_func=yes"
11201 else
11202   echo "configure: failed program was:" >&5
11203   cat conftest.$ac_ext >&5
11204   rm -rf conftest*
11205   eval "ac_cv_func_$ac_func=no"
11206 fi
11207 rm -f conftest*
11208
11209 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11210   echo "$ac_t""yes" 1>&6
11211     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11212   { test "$extra_verbose" = "yes" && cat << EOF
11213     Defining $ac_tr_func
11214 EOF
11215 cat >> confdefs.h <<EOF
11216 #define $ac_tr_func 1
11217 EOF
11218 }
11219  
11220 else
11221   echo "$ac_t""no" 1>&6
11222 fi
11223 done
11224
11225   for ac_hdr in strtio.h
11226 do
11227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11229 echo "configure:11230: checking for $ac_hdr" >&5
11230
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11233 "configure"
11233 #include "confdefs.h"
11234 #include <$ac_hdr>
11235 EOF
11236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11237 { (eval echo configure:11238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11239 if test -z "$ac_err"; then
11240   rm -rf conftest*
11241   eval "ac_cv_header_$ac_safe=yes"
11242 else
11243   echo "$ac_err" >&5
11244   echo "configure: failed program was:" >&5
11245   cat conftest.$ac_ext >&5
11246   rm -rf conftest*
11247   eval "ac_cv_header_$ac_safe=no"
11248 fi
11249 rm -f conftest*
11250 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11251   echo "$ac_t""yes" 1>&6
11252     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11253   { test "$extra_verbose" = "yes" && cat << EOF
11254     Defining $ac_tr_hdr
11255 EOF
11256 cat >> confdefs.h <<EOF
11257 #define $ac_tr_hdr 1
11258 EOF
11259 }
11260  
11261 else
11262   echo "$ac_t""no" 1>&6
11263 fi
11264 done
11265  fi
11266
11267 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11268    echo "    xemacs will be linked with \"realpath.o\""
11269  fi
11270
11271 for ac_func in getloadavg
11272 do
11273 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_func" >&5
11275
11276 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 /* System header to define __stub macros and hopefully few prototypes,
11280     which can conflict with char $ac_func(); below.  */
11281 #include <assert.h>
11282 /* Override any gcc2 internal prototype to avoid an error.  */
11283 /* We use char because int might match the return type of a gcc2
11284     builtin and then its argument prototype would still apply.  */
11285 char $ac_func();
11286
11287 int main() {
11288
11289 /* The GNU C library defines this for functions which it implements
11290     to always fail with ENOSYS.  Some functions are actually named
11291     something starting with __ and the normal name is an alias.  */
11292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11293 choke me
11294 #else
11295 $ac_func();
11296 #endif
11297
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11301   rm -rf conftest*
11302   eval "ac_cv_func_$ac_func=yes"
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_func_$ac_func=no"
11308 fi
11309 rm -f conftest*
11310
11311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11312   echo "$ac_t""yes" 1>&6
11313     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11314   { test "$extra_verbose" = "yes" && cat << EOF
11315     Defining $ac_tr_func
11316 EOF
11317 cat >> confdefs.h <<EOF
11318 #define $ac_tr_func 1
11319 EOF
11320 }
11321  
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325 done
11326
11327
11328 if test "$ac_cv_func_getloadavg" = "yes"; then
11329         for ac_hdr in sys/loadavg.h
11330 do
11331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11333 echo "configure:11334: checking for $ac_hdr" >&5
11334
11335 cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 #include <$ac_hdr>
11339 EOF
11340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11341 { (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11343 if test -z "$ac_err"; then
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=yes"
11346 else
11347   echo "$ac_err" >&5
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=no"
11352 fi
11353 rm -f conftest*
11354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11355   echo "$ac_t""yes" 1>&6
11356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11357   { test "$extra_verbose" = "yes" && cat << EOF
11358     Defining $ac_tr_hdr
11359 EOF
11360 cat >> confdefs.h <<EOF
11361 #define $ac_tr_hdr 1
11362 EOF
11363 }
11364  
11365 else
11366   echo "$ac_t""no" 1>&6
11367 fi
11368 done
11369
11370 else
11371     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11372    echo "    xemacs will be linked with \"getloadavg.o\""
11373  fi
11374
11375     
11376 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11377 echo "configure:11378: checking for kstat_open in -lkstat" >&5
11378 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11379
11380 xe_check_libs=" -lkstat "
11381 cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 /* Override any gcc2 internal prototype to avoid an error.  */
11385 /* We use char because int might match the return type of a gcc2
11386     builtin and then its argument prototype would still apply.  */
11387 char kstat_open();
11388
11389 int main() {
11390 kstat_open()
11391 ; return 0; }
11392 EOF
11393 if { (eval echo configure:11394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11394   rm -rf conftest*
11395   eval "ac_cv_lib_$ac_lib_var=yes"
11396 else
11397   echo "configure: failed program was:" >&5
11398   cat conftest.$ac_ext >&5
11399   rm -rf conftest*
11400   eval "ac_cv_lib_$ac_lib_var=no"
11401 fi
11402 rm -f conftest*
11403 xe_check_libs=""
11404
11405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11406   echo "$ac_t""yes" 1>&6
11407     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11408     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11409   { test "$extra_verbose" = "yes" && cat << EOF
11410     Defining $ac_tr_lib
11411 EOF
11412 cat >> confdefs.h <<EOF
11413 #define $ac_tr_lib 1
11414 EOF
11415 }
11416
11417   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11418
11419 else
11420   echo "$ac_t""no" 1>&6
11421 fi
11422
11423
11424   for ac_hdr in kstat.h
11425 do
11426 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11427 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11428 echo "configure:11429: checking for $ac_hdr" >&5
11429
11430 cat > conftest.$ac_ext <<EOF
11431 #line 11432 "configure"
11432 #include "confdefs.h"
11433 #include <$ac_hdr>
11434 EOF
11435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11436 { (eval echo configure:11437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11438 if test -z "$ac_err"; then
11439   rm -rf conftest*
11440   eval "ac_cv_header_$ac_safe=yes"
11441 else
11442   echo "$ac_err" >&5
11443   echo "configure: failed program was:" >&5
11444   cat conftest.$ac_ext >&5
11445   rm -rf conftest*
11446   eval "ac_cv_header_$ac_safe=no"
11447 fi
11448 rm -f conftest*
11449 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11450   echo "$ac_t""yes" 1>&6
11451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11452   { test "$extra_verbose" = "yes" && cat << EOF
11453     Defining $ac_tr_hdr
11454 EOF
11455 cat >> confdefs.h <<EOF
11456 #define $ac_tr_hdr 1
11457 EOF
11458 }
11459  
11460 else
11461   echo "$ac_t""no" 1>&6
11462 fi
11463 done
11464
11465
11466     
11467 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11468 echo "configure:11469: checking for kvm_read in -lkvm" >&5
11469 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11470
11471 xe_check_libs=" -lkvm "
11472 cat > conftest.$ac_ext <<EOF
11473 #line 11474 "configure"
11474 #include "confdefs.h"
11475 /* Override any gcc2 internal prototype to avoid an error.  */
11476 /* We use char because int might match the return type of a gcc2
11477     builtin and then its argument prototype would still apply.  */
11478 char kvm_read();
11479
11480 int main() {
11481 kvm_read()
11482 ; return 0; }
11483 EOF
11484 if { (eval echo configure:11485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11485   rm -rf conftest*
11486   eval "ac_cv_lib_$ac_lib_var=yes"
11487 else
11488   echo "configure: failed program was:" >&5
11489   cat conftest.$ac_ext >&5
11490   rm -rf conftest*
11491   eval "ac_cv_lib_$ac_lib_var=no"
11492 fi
11493 rm -f conftest*
11494 xe_check_libs=""
11495
11496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11497   echo "$ac_t""yes" 1>&6
11498     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11500   { test "$extra_verbose" = "yes" && cat << EOF
11501     Defining $ac_tr_lib
11502 EOF
11503 cat >> confdefs.h <<EOF
11504 #define $ac_tr_lib 1
11505 EOF
11506 }
11507
11508   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11509
11510 else
11511   echo "$ac_t""no" 1>&6
11512 fi
11513
11514
11515 fi
11516
11517 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11518 echo "configure:11519: checking whether netdb declares h_errno" >&5
11519 cat > conftest.$ac_ext <<EOF
11520 #line 11521 "configure"
11521 #include "confdefs.h"
11522 #include <netdb.h>
11523 int main() {
11524 return h_errno;
11525 ; return 0; }
11526 EOF
11527 if { (eval echo configure:11528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11528   rm -rf conftest*
11529   echo "$ac_t""yes" 1>&6
11530    { test "$extra_verbose" = "yes" && cat << \EOF
11531     Defining HAVE_H_ERRNO
11532 EOF
11533 cat >> confdefs.h <<\EOF
11534 #define HAVE_H_ERRNO 1
11535 EOF
11536 }
11537
11538 else
11539   echo "configure: failed program was:" >&5
11540   cat conftest.$ac_ext >&5
11541   rm -rf conftest*
11542   echo "$ac_t""no" 1>&6
11543 fi
11544 rm -f conftest*
11545
11546 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11547 echo "configure:11548: checking for sigsetjmp" >&5
11548 cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551 #include <setjmp.h>
11552 int main() {
11553 sigjmp_buf bar; sigsetjmp (bar, 0);
11554 ; return 0; }
11555 EOF
11556 if { (eval echo configure:11557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11557   rm -rf conftest*
11558   echo "$ac_t""yes" 1>&6
11559    { test "$extra_verbose" = "yes" && cat << \EOF
11560     Defining HAVE_SIGSETJMP
11561 EOF
11562 cat >> confdefs.h <<\EOF
11563 #define HAVE_SIGSETJMP 1
11564 EOF
11565 }
11566
11567 else
11568   echo "configure: failed program was:" >&5
11569   cat conftest.$ac_ext >&5
11570   rm -rf conftest*
11571   echo "$ac_t""no" 1>&6
11572 fi
11573 rm -f conftest*
11574
11575 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11576 echo "configure:11577: checking whether localtime caches TZ" >&5
11577
11578 if test "$ac_cv_func_tzset" = "yes"; then
11579 cat > conftest.$ac_ext <<EOF
11580 #line 11581 "configure"
11581 #include "confdefs.h"
11582 #include <time.h>
11583 #if STDC_HEADERS
11584 # include <stdlib.h>
11585 #endif
11586 extern char **environ;
11587 unset_TZ ()
11588 {
11589   char **from, **to;
11590   for (to = from = environ; (*to = *from); from++)
11591     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11592       to++;
11593 }
11594 char TZ_GMT0[] = "TZ=GMT0";
11595 char TZ_PST8[] = "TZ=PST8";
11596 main()
11597 {
11598   time_t now = time ((time_t *) 0);
11599   int hour_GMT0, hour_unset;
11600   if (putenv (TZ_GMT0) != 0)
11601     exit (1);
11602   hour_GMT0 = localtime (&now)->tm_hour;
11603   unset_TZ ();
11604   hour_unset = localtime (&now)->tm_hour;
11605   if (putenv (TZ_PST8) != 0)
11606     exit (1);
11607   if (localtime (&now)->tm_hour == hour_GMT0)
11608     exit (1);
11609   unset_TZ ();
11610   if (localtime (&now)->tm_hour != hour_unset)
11611     exit (1);
11612   exit (0);
11613 }
11614 EOF
11615 if { (eval echo configure:11616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11616 then
11617   emacs_cv_localtime_cache=no
11618 else
11619   conftest_rc="$?"
11620   echo "configure: failed program was:" >&5
11621   cat conftest.$ac_ext >&5
11622   rm -fr conftest*
11623   emacs_cv_localtime_cache=yes
11624 fi
11625 rm -fr conftest*
11626 else
11627         # If we lack tzset, report that localtime does not cache TZ,
11628         # since we can't invalidate the cache if we don't have tzset.
11629         emacs_cv_localtime_cache=no
11630 fi
11631 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11632 if test $emacs_cv_localtime_cache = yes; then
11633   { test "$extra_verbose" = "yes" && cat << \EOF
11634     Defining LOCALTIME_CACHE
11635 EOF
11636 cat >> confdefs.h <<\EOF
11637 #define LOCALTIME_CACHE 1
11638 EOF
11639 }
11640
11641 fi
11642
11643 if test "$HAVE_TIMEVAL" = "yes"; then
11644 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11645 echo "configure:11646: checking whether gettimeofday accepts one or two arguments" >&5
11646 cat > conftest.$ac_ext <<EOF
11647 #line 11648 "configure"
11648 #include "confdefs.h"
11649
11650 #ifdef TIME_WITH_SYS_TIME
11651 #include <sys/time.h>
11652 #include <time.h>
11653 #else
11654 #ifdef HAVE_SYS_TIME_H
11655 #include <sys/time.h>
11656 #else
11657 #include <time.h>
11658 #endif
11659 #endif
11660   
11661 int main() {
11662
11663   struct timeval time;
11664   gettimeofday (&time, 0);
11665
11666 ; return 0; }
11667 EOF
11668 if { (eval echo configure:11669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11669   rm -rf conftest*
11670   echo "$ac_t""two" 1>&6
11671 else
11672   echo "configure: failed program was:" >&5
11673   cat conftest.$ac_ext >&5
11674   rm -rf conftest*
11675   echo "$ac_t""one" 1>&6
11676    { test "$extra_verbose" = "yes" && cat << \EOF
11677     Defining GETTIMEOFDAY_ONE_ARGUMENT
11678 EOF
11679 cat >> confdefs.h <<\EOF
11680 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11681 EOF
11682 }
11683
11684 fi
11685 rm -f conftest*
11686 fi
11687
11688
11689 echo $ac_n "checking for inline""... $ac_c" 1>&6
11690 echo "configure:11691: checking for inline" >&5
11691
11692 ac_cv_c_inline=no
11693 for ac_kw in inline __inline__ __inline; do
11694   cat > conftest.$ac_ext <<EOF
11695 #line 11696 "configure"
11696 #include "confdefs.h"
11697
11698 int main() {
11699 } $ac_kw foo() {
11700 ; return 0; }
11701 EOF
11702 if { (eval echo configure:11703: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11703   rm -rf conftest*
11704   ac_cv_c_inline=$ac_kw; break
11705 else
11706   echo "configure: failed program was:" >&5
11707   cat conftest.$ac_ext >&5
11708 fi
11709 rm -f conftest*
11710 done
11711
11712
11713 echo "$ac_t""$ac_cv_c_inline" 1>&6
11714 case "$ac_cv_c_inline" in
11715   inline | yes) ;;
11716   no) { test "$extra_verbose" = "yes" && cat << \EOF
11717     Defining inline = 
11718 EOF
11719 cat >> confdefs.h <<\EOF
11720 #define inline 
11721 EOF
11722 }
11723  ;;
11724   *)  { test "$extra_verbose" = "yes" && cat << EOF
11725     Defining inline = $ac_cv_c_inline
11726 EOF
11727 cat >> confdefs.h <<EOF
11728 #define inline $ac_cv_c_inline
11729 EOF
11730 }
11731  ;;
11732 esac
11733
11734 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11735    echo "    xemacs will be linked with \"inline.o\""
11736  fi
11737
11738
11739 if test "$__DECC" != "yes"; then
11740   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11741 # for constant arguments.  Useless!
11742 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11743 echo "configure:11744: checking for working alloca.h" >&5
11744
11745 cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 #include <alloca.h>
11749 int main() {
11750 char *p = alloca(2 * sizeof(int));
11751 ; return 0; }
11752 EOF
11753 if { (eval echo configure:11754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11754   rm -rf conftest*
11755   ac_cv_header_alloca_h=yes
11756 else
11757   echo "configure: failed program was:" >&5
11758   cat conftest.$ac_ext >&5
11759   rm -rf conftest*
11760   ac_cv_header_alloca_h=no
11761 fi
11762 rm -f conftest*
11763
11764 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11765 if test $ac_cv_header_alloca_h = yes; then
11766   { test "$extra_verbose" = "yes" && cat << \EOF
11767     Defining HAVE_ALLOCA_H
11768 EOF
11769 cat >> confdefs.h <<\EOF
11770 #define HAVE_ALLOCA_H 1
11771 EOF
11772 }
11773
11774 fi
11775
11776 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11777 echo "configure:11778: checking for alloca" >&5
11778
11779 cat > conftest.$ac_ext <<EOF
11780 #line 11781 "configure"
11781 #include "confdefs.h"
11782
11783 #ifdef __GNUC__
11784 # define alloca __builtin_alloca
11785 #else
11786 # ifdef _MSC_VER
11787 #  include <malloc.h>
11788 #  define alloca _alloca
11789 # else
11790 #  if HAVE_ALLOCA_H
11791 #   include <alloca.h>
11792 #  else
11793 #   ifdef _AIX
11794  #pragma alloca
11795 #   else
11796 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11797 char *alloca ();
11798 #    endif
11799 #   endif
11800 #  endif
11801 # endif
11802 #endif
11803
11804 int main() {
11805 char *p = (char *) alloca(1);
11806 ; return 0; }
11807 EOF
11808 if { (eval echo configure:11809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11809   rm -rf conftest*
11810   ac_cv_func_alloca_works=yes
11811 else
11812   echo "configure: failed program was:" >&5
11813   cat conftest.$ac_ext >&5
11814   rm -rf conftest*
11815   ac_cv_func_alloca_works=no
11816 fi
11817 rm -f conftest*
11818
11819 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11820 if test $ac_cv_func_alloca_works = yes; then
11821   { test "$extra_verbose" = "yes" && cat << \EOF
11822     Defining HAVE_ALLOCA
11823 EOF
11824 cat >> confdefs.h <<\EOF
11825 #define HAVE_ALLOCA 1
11826 EOF
11827 }
11828
11829 fi
11830
11831 if test $ac_cv_func_alloca_works = no; then
11832   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11833   # that cause trouble.  Some versions do not even contain alloca or
11834   # contain a buggy version.  If you still want to use their alloca,
11835   # use ar to extract alloca.o from them instead of compiling alloca.c.
11836   ALLOCA=alloca.${ac_objext}
11837   { test "$extra_verbose" = "yes" && cat << \EOF
11838     Defining C_ALLOCA
11839 EOF
11840 cat >> confdefs.h <<\EOF
11841 #define C_ALLOCA 1
11842 EOF
11843 }
11844
11845
11846 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11847 echo "configure:11848: checking whether alloca needs Cray hooks" >&5
11848
11849 cat > conftest.$ac_ext <<EOF
11850 #line 11851 "configure"
11851 #include "confdefs.h"
11852 #if defined(CRAY) && ! defined(CRAY2)
11853 webecray
11854 #else
11855 wenotbecray
11856 #endif
11857
11858 EOF
11859 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11860   egrep "webecray" >/dev/null 2>&1; then
11861   rm -rf conftest*
11862   ac_cv_os_cray=yes
11863 else
11864   rm -rf conftest*
11865   ac_cv_os_cray=no
11866 fi
11867 rm -f conftest*
11868
11869
11870 echo "$ac_t""$ac_cv_os_cray" 1>&6
11871 if test $ac_cv_os_cray = yes; then
11872 for ac_func in _getb67 GETB67 getb67; do
11873   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11874 echo "configure:11875: checking for $ac_func" >&5
11875
11876 cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 /* System header to define __stub macros and hopefully few prototypes,
11880     which can conflict with char $ac_func(); below.  */
11881 #include <assert.h>
11882 /* Override any gcc2 internal prototype to avoid an error.  */
11883 /* We use char because int might match the return type of a gcc2
11884     builtin and then its argument prototype would still apply.  */
11885 char $ac_func();
11886
11887 int main() {
11888
11889 /* The GNU C library defines this for functions which it implements
11890     to always fail with ENOSYS.  Some functions are actually named
11891     something starting with __ and the normal name is an alias.  */
11892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11893 choke me
11894 #else
11895 $ac_func();
11896 #endif
11897
11898 ; return 0; }
11899 EOF
11900 if { (eval echo configure:11901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11901   rm -rf conftest*
11902   eval "ac_cv_func_$ac_func=yes"
11903 else
11904   echo "configure: failed program was:" >&5
11905   cat conftest.$ac_ext >&5
11906   rm -rf conftest*
11907   eval "ac_cv_func_$ac_func=no"
11908 fi
11909 rm -f conftest*
11910
11911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11912   echo "$ac_t""yes" 1>&6
11913   { test "$extra_verbose" = "yes" && cat << EOF
11914     Defining CRAY_STACKSEG_END = $ac_func
11915 EOF
11916 cat >> confdefs.h <<EOF
11917 #define CRAY_STACKSEG_END $ac_func
11918 EOF
11919 }
11920
11921   break
11922 else
11923   echo "$ac_t""no" 1>&6
11924 fi
11925
11926 done
11927 fi
11928
11929 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11930 echo "configure:11931: checking stack direction for C alloca" >&5
11931
11932 cat > conftest.$ac_ext <<EOF
11933 #line 11934 "configure"
11934 #include "confdefs.h"
11935 find_stack_direction ()
11936 {
11937   static char *addr = 0;
11938   auto char dummy;
11939   if (addr == 0)
11940     {
11941       addr = &dummy;
11942       return find_stack_direction ();
11943     }
11944   else
11945     return (&dummy > addr) ? 1 : -1;
11946 }
11947 main ()
11948 {
11949   exit (find_stack_direction() < 0);
11950 }
11951 EOF
11952 if { (eval echo configure:11953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11953 then
11954   ac_cv_c_stack_direction=1
11955 else
11956   conftest_rc="$?"
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -fr conftest*
11960   ac_cv_c_stack_direction=-1
11961 fi
11962 rm -fr conftest*
11963
11964 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11965 { test "$extra_verbose" = "yes" && cat << EOF
11966     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11967 EOF
11968 cat >> confdefs.h <<EOF
11969 #define STACK_DIRECTION $ac_cv_c_stack_direction
11970 EOF
11971 }
11972
11973 fi
11974
11975   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11976    echo "    xemacs will be linked with \"$ALLOCA\""
11977  fi
11978 fi
11979
11980 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11981 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11982 echo "configure:11983: checking for vfork.h" >&5
11983
11984 cat > conftest.$ac_ext <<EOF
11985 #line 11986 "configure"
11986 #include "confdefs.h"
11987 #include <vfork.h>
11988 EOF
11989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11990 { (eval echo configure:11991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11992 if test -z "$ac_err"; then
11993   rm -rf conftest*
11994   eval "ac_cv_header_$ac_safe=yes"
11995 else
11996   echo "$ac_err" >&5
11997   echo "configure: failed program was:" >&5
11998   cat conftest.$ac_ext >&5
11999   rm -rf conftest*
12000   eval "ac_cv_header_$ac_safe=no"
12001 fi
12002 rm -f conftest*
12003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12004   echo "$ac_t""yes" 1>&6
12005   { test "$extra_verbose" = "yes" && cat << \EOF
12006     Defining HAVE_VFORK_H
12007 EOF
12008 cat >> confdefs.h <<\EOF
12009 #define HAVE_VFORK_H 1
12010 EOF
12011 }
12012
12013 else
12014   echo "$ac_t""no" 1>&6
12015 fi
12016
12017 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12018 echo "configure:12019: checking for working vfork" >&5
12019
12020 cat > conftest.$ac_ext <<EOF
12021 #line 12022 "configure"
12022 #include "confdefs.h"
12023 /* Thanks to Paul Eggert for this test.  */
12024 #include <stdio.h>
12025 #include <sys/types.h>
12026 #include <sys/stat.h>
12027 #ifdef HAVE_UNISTD_H
12028 #include <unistd.h>
12029 #endif
12030 #ifdef HAVE_VFORK_H
12031 #include <vfork.h>
12032 #endif
12033 /* On some sparc systems, changes by the child to local and incoming
12034    argument registers are propagated back to the parent.
12035    The compiler is told about this with #include <vfork.h>,
12036    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12037    Test for this by using a static variable whose address
12038    is put into a register that is clobbered by the vfork.  */
12039 static
12040 #ifdef __cplusplus
12041 sparc_address_test (int arg)
12042 #else
12043 sparc_address_test (arg) int arg;
12044 #endif
12045 {
12046   static pid_t child;
12047   if (!child) {
12048     child = vfork ();
12049     if (child < 0) {
12050       perror ("vfork");
12051       _exit(2);
12052     }
12053     if (!child) {
12054       arg = getpid();
12055       write(-1, "", 0);
12056       _exit (arg);
12057     }
12058   }
12059 }
12060 main() {
12061   pid_t parent = getpid ();
12062   pid_t child;
12063
12064   sparc_address_test ();
12065
12066   child = vfork ();
12067
12068   if (child == 0) {
12069     /* Here is another test for sparc vfork register problems.
12070        This test uses lots of local variables, at least
12071        as many local variables as main has allocated so far
12072        including compiler temporaries.  4 locals are enough for
12073        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12074        A buggy compiler should reuse the register of parent
12075        for one of the local variables, since it will think that
12076        parent can't possibly be used any more in this routine.
12077        Assigning to the local variable will thus munge parent
12078        in the parent process.  */
12079     pid_t
12080       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12081       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12082     /* Convince the compiler that p..p7 are live; otherwise, it might
12083        use the same hardware register for all 8 local variables.  */
12084     if (p != p1 || p != p2 || p != p3 || p != p4
12085         || p != p5 || p != p6 || p != p7)
12086       _exit(1);
12087
12088     /* On some systems (e.g. IRIX 3.3),
12089        vfork doesn't separate parent from child file descriptors.
12090        If the child closes a descriptor before it execs or exits,
12091        this munges the parent's descriptor as well.
12092        Test for this by closing stdout in the child.  */
12093     _exit(close(fileno(stdout)) != 0);
12094   } else {
12095     int status;
12096     struct stat st;
12097
12098     while (wait(&status) != child)
12099       ;
12100     exit(
12101          /* Was there some problem with vforking?  */
12102          child < 0
12103
12104          /* Did the child fail?  (This shouldn't happen.)  */
12105          || status
12106
12107          /* Did the vfork/compiler bug occur?  */
12108          || parent != getpid()
12109
12110          /* Did the file descriptor bug occur?  */
12111          || fstat(fileno(stdout), &st) != 0
12112          );
12113   }
12114 }
12115 EOF
12116 if { (eval echo configure:12117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12117 then
12118   ac_cv_func_vfork_works=yes
12119 else
12120   conftest_rc="$?"
12121   echo "configure: failed program was:" >&5
12122   cat conftest.$ac_ext >&5
12123   rm -fr conftest*
12124   ac_cv_func_vfork_works=no
12125 fi
12126 rm -fr conftest*
12127
12128 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12129 if test $ac_cv_func_vfork_works = no; then
12130   { test "$extra_verbose" = "yes" && cat << \EOF
12131     Defining vfork = fork
12132 EOF
12133 cat >> confdefs.h <<\EOF
12134 #define vfork fork
12135 EOF
12136 }
12137
12138 fi
12139
12140
12141 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12142 echo "configure:12143: checking for working strcoll" >&5
12143
12144 cat > conftest.$ac_ext <<EOF
12145 #line 12146 "configure"
12146 #include "confdefs.h"
12147 #include <string.h>
12148 main ()
12149 {
12150   exit (strcoll ("abc", "def") >= 0 ||
12151         strcoll ("ABC", "DEF") >= 0 ||
12152         strcoll ("123", "456") >= 0);
12153 }
12154 EOF
12155 if { (eval echo configure:12156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12156 then
12157   ac_cv_func_strcoll_works=yes
12158 else
12159   conftest_rc="$?"
12160   echo "configure: failed program was:" >&5
12161   cat conftest.$ac_ext >&5
12162   rm -fr conftest*
12163   ac_cv_func_strcoll_works=no
12164 fi
12165 rm -fr conftest*
12166
12167 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12168 if test $ac_cv_func_strcoll_works = yes; then
12169   { test "$extra_verbose" = "yes" && cat << \EOF
12170     Defining HAVE_STRCOLL
12171 EOF
12172 cat >> confdefs.h <<\EOF
12173 #define HAVE_STRCOLL 1
12174 EOF
12175 }
12176
12177 fi
12178
12179
12180 for ac_func in getpgrp
12181 do
12182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12183 echo "configure:12184: checking for $ac_func" >&5
12184
12185 cat > conftest.$ac_ext <<EOF
12186 #line 12187 "configure"
12187 #include "confdefs.h"
12188 /* System header to define __stub macros and hopefully few prototypes,
12189     which can conflict with char $ac_func(); below.  */
12190 #include <assert.h>
12191 /* Override any gcc2 internal prototype to avoid an error.  */
12192 /* We use char because int might match the return type of a gcc2
12193     builtin and then its argument prototype would still apply.  */
12194 char $ac_func();
12195
12196 int main() {
12197
12198 /* The GNU C library defines this for functions which it implements
12199     to always fail with ENOSYS.  Some functions are actually named
12200     something starting with __ and the normal name is an alias.  */
12201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12202 choke me
12203 #else
12204 $ac_func();
12205 #endif
12206
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   eval "ac_cv_func_$ac_func=yes"
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   eval "ac_cv_func_$ac_func=no"
12217 fi
12218 rm -f conftest*
12219
12220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12221   echo "$ac_t""yes" 1>&6
12222     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12223   { test "$extra_verbose" = "yes" && cat << EOF
12224     Defining $ac_tr_func
12225 EOF
12226 cat >> confdefs.h <<EOF
12227 #define $ac_tr_func 1
12228 EOF
12229 }
12230  
12231 else
12232   echo "$ac_t""no" 1>&6
12233 fi
12234 done
12235
12236 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12237 echo "configure:12238: checking whether getpgrp takes no argument" >&5
12238
12239 cat > conftest.$ac_ext <<EOF
12240 #line 12241 "configure"
12241 #include "confdefs.h"
12242
12243 /*
12244  * If this system has a BSD-style getpgrp(),
12245  * which takes a pid argument, exit unsuccessfully.
12246  *
12247  * Snarfed from Chet Ramey's bash pgrp.c test program
12248  */
12249 #include <stdio.h>
12250 #include <sys/types.h>
12251
12252 int     pid;
12253 int     pg1, pg2, pg3, pg4;
12254 int     ng, np, s, child;
12255
12256 main()
12257 {
12258         pid = getpid();
12259         pg1 = getpgrp(0);
12260         pg2 = getpgrp();
12261         pg3 = getpgrp(pid);
12262         pg4 = getpgrp(1);
12263
12264         /*
12265          * If all of these values are the same, it's pretty sure that
12266          * we're on a system that ignores getpgrp's first argument.
12267          */
12268         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12269                 exit(0);
12270
12271         child = fork();
12272         if (child < 0)
12273                 exit(1);
12274         else if (child == 0) {
12275                 np = getpid();
12276                 /*
12277                  * If this is Sys V, this will not work; pgrp will be
12278                  * set to np because setpgrp just changes a pgrp to be
12279                  * the same as the pid.
12280                  */
12281                 setpgrp(np, pg1);
12282                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12283                 if (ng == pg1) {
12284                         exit(1);
12285                 } else {
12286                         exit(0);
12287                 }
12288         } else {
12289                 wait(&s);
12290                 exit(s>>8);
12291         }
12292 }
12293
12294 EOF
12295 if { (eval echo configure:12296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12296 then
12297   ac_cv_func_getpgrp_void=yes
12298 else
12299   conftest_rc="$?"
12300   echo "configure: failed program was:" >&5
12301   cat conftest.$ac_ext >&5
12302   rm -fr conftest*
12303   ac_cv_func_getpgrp_void=no
12304 fi
12305 rm -fr conftest*
12306
12307
12308 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12309 if test $ac_cv_func_getpgrp_void = yes; then
12310   { test "$extra_verbose" = "yes" && cat << \EOF
12311     Defining GETPGRP_VOID
12312 EOF
12313 cat >> confdefs.h <<\EOF
12314 #define GETPGRP_VOID 1
12315 EOF
12316 }
12317
12318 fi
12319
12320
12321 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12322 echo "configure:12323: checking for working mmap" >&5
12323 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12324 cat > conftest.$ac_ext <<EOF
12325 #line 12326 "configure"
12326 #include "confdefs.h"
12327 #include <stdio.h>
12328 #include <unistd.h>
12329 #include <fcntl.h>
12330 #include <sys/mman.h>
12331
12332 #ifndef MAP_VARIABLE
12333 #define MAP_VARIABLE 0
12334 #endif
12335
12336 #ifndef MAP_FAILED
12337 #define MAP_FAILED -1
12338 #endif
12339
12340 int main (int argc, char *argv[])
12341 {
12342   int fd = -1;
12343   caddr_t p;
12344 #ifndef MAP_ANONYMOUS
12345   fd = open ("/dev/zero", O_RDWR);
12346   if (fd < 0)
12347     return 1;
12348 #define MAP_ANONYMOUS 0
12349 #endif
12350   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12351            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12352            fd, 0) != (void *) MAP_FAILED)
12353     return 0;
12354   perror ("conftest: mmap failed");
12355   return 1;
12356 }
12357 EOF
12358 if { (eval echo configure:12359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12359 then
12360   have_mmap=yes
12361 else
12362   conftest_rc="$?"
12363   echo "configure: failed program was:" >&5
12364   cat conftest.$ac_ext >&5
12365   rm -fr conftest*
12366   have_mmap=no
12367 fi
12368 rm -fr conftest* ;;
12369 esac
12370 echo "$ac_t""$have_mmap" 1>&6
12371 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12372     Defining HAVE_MMAP
12373 EOF
12374 cat >> confdefs.h <<\EOF
12375 #define HAVE_MMAP 1
12376 EOF
12377 }
12378
12379
12380 case "$opsys" in cygwin*) 
12381         test "$rel_alloc" = "default" && rel_alloc=no ;;
12382 esac
12383 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12384 if test "$rel_alloc $have_mmap" = "default yes"; then
12385   if test "$doug_lea_malloc" = "yes"; then
12386         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12387 echo "configure:12388: checking for M_MMAP_THRESHOLD" >&5
12388     cat > conftest.$ac_ext <<EOF
12389 #line 12390 "configure"
12390 #include "confdefs.h"
12391 #include <malloc.h>
12392 int main() {
12393
12394 #ifndef M_MMAP_THRESHOLD
12395 #error No M_MMAP_THRESHOLD :-(
12396 !@+$%^&*_)(_ - unlikely to compile...
12397 #endif
12398
12399 ; return 0; }
12400 EOF
12401 if { (eval echo configure:12402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12402   rm -rf conftest*
12403   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12404 else
12405   echo "configure: failed program was:" >&5
12406   cat conftest.$ac_ext >&5
12407   rm -rf conftest*
12408   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12409 fi
12410 rm -f conftest*
12411   else
12412     rel_alloc=yes
12413   fi
12414 fi
12415 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12416     Defining REL_ALLOC
12417 EOF
12418 cat >> confdefs.h <<\EOF
12419 #define REL_ALLOC 1
12420 EOF
12421 }
12422
12423
12424 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12425 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12426 echo "configure:12427: checking for termios.h" >&5
12427
12428 cat > conftest.$ac_ext <<EOF
12429 #line 12430 "configure"
12430 #include "confdefs.h"
12431 #include <termios.h>
12432 EOF
12433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12434 { (eval echo configure:12435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12436 if test -z "$ac_err"; then
12437   rm -rf conftest*
12438   eval "ac_cv_header_$ac_safe=yes"
12439 else
12440   echo "$ac_err" >&5
12441   echo "configure: failed program was:" >&5
12442   cat conftest.$ac_ext >&5
12443   rm -rf conftest*
12444   eval "ac_cv_header_$ac_safe=no"
12445 fi
12446 rm -f conftest*
12447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12448   echo "$ac_t""yes" 1>&6
12449   { test "$extra_verbose" = "yes" && cat << \EOF
12450     Defining HAVE_TERMIOS
12451 EOF
12452 cat >> confdefs.h <<\EOF
12453 #define HAVE_TERMIOS 1
12454 EOF
12455 }
12456
12457   { test "$extra_verbose" = "yes" && cat << \EOF
12458     Defining SIGNALS_VIA_CHARACTERS
12459 EOF
12460 cat >> confdefs.h <<\EOF
12461 #define SIGNALS_VIA_CHARACTERS 1
12462 EOF
12463 }
12464
12465   { test "$extra_verbose" = "yes" && cat << \EOF
12466     Defining NO_TERMIO
12467 EOF
12468 cat >> confdefs.h <<\EOF
12469 #define NO_TERMIO 1
12470 EOF
12471 }
12472
12473 else
12474   echo "$ac_t""no" 1>&6
12475 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12476 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12477 echo "configure:12478: checking for termio.h" >&5
12478
12479 cat > conftest.$ac_ext <<EOF
12480 #line 12481 "configure"
12481 #include "confdefs.h"
12482 #include <termio.h>
12483 EOF
12484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12485 { (eval echo configure:12486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12487 if test -z "$ac_err"; then
12488   rm -rf conftest*
12489   eval "ac_cv_header_$ac_safe=yes"
12490 else
12491   echo "$ac_err" >&5
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -rf conftest*
12495   eval "ac_cv_header_$ac_safe=no"
12496 fi
12497 rm -f conftest*
12498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12499   echo "$ac_t""yes" 1>&6
12500   { test "$extra_verbose" = "yes" && cat << \EOF
12501     Defining HAVE_TERMIO
12502 EOF
12503 cat >> confdefs.h <<\EOF
12504 #define HAVE_TERMIO 1
12505 EOF
12506 }
12507
12508 else
12509   echo "$ac_t""no" 1>&6
12510 fi
12511
12512 fi
12513
12514
12515
12516 echo $ac_n "checking for socket""... $ac_c" 1>&6
12517 echo "configure:12518: checking for socket" >&5
12518
12519 cat > conftest.$ac_ext <<EOF
12520 #line 12521 "configure"
12521 #include "confdefs.h"
12522 /* System header to define __stub macros and hopefully few prototypes,
12523     which can conflict with char socket(); below.  */
12524 #include <assert.h>
12525 /* Override any gcc2 internal prototype to avoid an error.  */
12526 /* We use char because int might match the return type of a gcc2
12527     builtin and then its argument prototype would still apply.  */
12528 char socket();
12529
12530 int main() {
12531
12532 /* The GNU C library defines this for functions which it implements
12533     to always fail with ENOSYS.  Some functions are actually named
12534     something starting with __ and the normal name is an alias.  */
12535 #if defined (__stub_socket) || defined (__stub___socket)
12536 choke me
12537 #else
12538 socket();
12539 #endif
12540
12541 ; return 0; }
12542 EOF
12543 if { (eval echo configure:12544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12544   rm -rf conftest*
12545   eval "ac_cv_func_socket=yes"
12546 else
12547   echo "configure: failed program was:" >&5
12548   cat conftest.$ac_ext >&5
12549   rm -rf conftest*
12550   eval "ac_cv_func_socket=no"
12551 fi
12552 rm -f conftest*
12553
12554 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12555   echo "$ac_t""yes" 1>&6
12556   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12557 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12558 echo "configure:12559: checking for netinet/in.h" >&5
12559
12560 cat > conftest.$ac_ext <<EOF
12561 #line 12562 "configure"
12562 #include "confdefs.h"
12563 #include <netinet/in.h>
12564 EOF
12565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12566 { (eval echo configure:12567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12568 if test -z "$ac_err"; then
12569   rm -rf conftest*
12570   eval "ac_cv_header_$ac_safe=yes"
12571 else
12572   echo "$ac_err" >&5
12573   echo "configure: failed program was:" >&5
12574   cat conftest.$ac_ext >&5
12575   rm -rf conftest*
12576   eval "ac_cv_header_$ac_safe=no"
12577 fi
12578 rm -f conftest*
12579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12580   echo "$ac_t""yes" 1>&6
12581   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12582 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12583 echo "configure:12584: checking for arpa/inet.h" >&5
12584
12585 cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 #include <arpa/inet.h>
12589 EOF
12590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12591 { (eval echo configure:12592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12593 if test -z "$ac_err"; then
12594   rm -rf conftest*
12595   eval "ac_cv_header_$ac_safe=yes"
12596 else
12597   echo "$ac_err" >&5
12598   echo "configure: failed program was:" >&5
12599   cat conftest.$ac_ext >&5
12600   rm -rf conftest*
12601   eval "ac_cv_header_$ac_safe=no"
12602 fi
12603 rm -f conftest*
12604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12605   echo "$ac_t""yes" 1>&6
12606   
12607   { test "$extra_verbose" = "yes" && cat << \EOF
12608     Defining HAVE_SOCKETS
12609 EOF
12610 cat >> confdefs.h <<\EOF
12611 #define HAVE_SOCKETS 1
12612 EOF
12613 }
12614
12615       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12616 echo "configure:12617: checking "for sun_len member in struct sockaddr_un"" >&5
12617       cat > conftest.$ac_ext <<EOF
12618 #line 12619 "configure"
12619 #include "confdefs.h"
12620
12621 #include <sys/types.h>
12622 #include <sys/socket.h>
12623 #include <sys/un.h>
12624       
12625 int main() {
12626 static struct sockaddr_un x; x.sun_len = 1;
12627 ; return 0; }
12628 EOF
12629 if { (eval echo configure:12630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12630   rm -rf conftest*
12631   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12632     Defining HAVE_SOCKADDR_SUN_LEN
12633 EOF
12634 cat >> confdefs.h <<\EOF
12635 #define HAVE_SOCKADDR_SUN_LEN 1
12636 EOF
12637 }
12638
12639 else
12640   echo "configure: failed program was:" >&5
12641   cat conftest.$ac_ext >&5
12642   rm -rf conftest*
12643   echo "$ac_t""no" 1>&6
12644 fi
12645 rm -f conftest*
12646       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12647 echo "configure:12648: checking "for ip_mreq struct in netinet/in.h"" >&5
12648       cat > conftest.$ac_ext <<EOF
12649 #line 12650 "configure"
12650 #include "confdefs.h"
12651
12652 #include <sys/types.h>
12653 #include <netinet/in.h>
12654       
12655 int main() {
12656 static struct ip_mreq x;
12657 ; return 0; }
12658 EOF
12659 if { (eval echo configure:12660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12660   rm -rf conftest*
12661   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12662     Defining HAVE_MULTICAST
12663 EOF
12664 cat >> confdefs.h <<\EOF
12665 #define HAVE_MULTICAST 1
12666 EOF
12667 }
12668
12669 else
12670   echo "configure: failed program was:" >&5
12671   cat conftest.$ac_ext >&5
12672   rm -rf conftest*
12673   echo "$ac_t""no" 1>&6
12674 fi
12675 rm -f conftest*
12676 else
12677   echo "$ac_t""no" 1>&6
12678 fi
12679
12680 else
12681   echo "$ac_t""no" 1>&6
12682 fi
12683
12684 else
12685   echo "$ac_t""no" 1>&6
12686 fi
12687
12688
12689 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12690 echo "configure:12691: checking for msgget" >&5
12691
12692 cat > conftest.$ac_ext <<EOF
12693 #line 12694 "configure"
12694 #include "confdefs.h"
12695 /* System header to define __stub macros and hopefully few prototypes,
12696     which can conflict with char msgget(); below.  */
12697 #include <assert.h>
12698 /* Override any gcc2 internal prototype to avoid an error.  */
12699 /* We use char because int might match the return type of a gcc2
12700     builtin and then its argument prototype would still apply.  */
12701 char msgget();
12702
12703 int main() {
12704
12705 /* The GNU C library defines this for functions which it implements
12706     to always fail with ENOSYS.  Some functions are actually named
12707     something starting with __ and the normal name is an alias.  */
12708 #if defined (__stub_msgget) || defined (__stub___msgget)
12709 choke me
12710 #else
12711 msgget();
12712 #endif
12713
12714 ; return 0; }
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12717   rm -rf conftest*
12718   eval "ac_cv_func_msgget=yes"
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -rf conftest*
12723   eval "ac_cv_func_msgget=no"
12724 fi
12725 rm -f conftest*
12726
12727 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12728   echo "$ac_t""yes" 1>&6
12729   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12730 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12731 echo "configure:12732: checking for sys/ipc.h" >&5
12732
12733 cat > conftest.$ac_ext <<EOF
12734 #line 12735 "configure"
12735 #include "confdefs.h"
12736 #include <sys/ipc.h>
12737 EOF
12738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12739 { (eval echo configure:12740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12741 if test -z "$ac_err"; then
12742   rm -rf conftest*
12743   eval "ac_cv_header_$ac_safe=yes"
12744 else
12745   echo "$ac_err" >&5
12746   echo "configure: failed program was:" >&5
12747   cat conftest.$ac_ext >&5
12748   rm -rf conftest*
12749   eval "ac_cv_header_$ac_safe=no"
12750 fi
12751 rm -f conftest*
12752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12753   echo "$ac_t""yes" 1>&6
12754   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12755 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12756 echo "configure:12757: checking for sys/msg.h" >&5
12757
12758 cat > conftest.$ac_ext <<EOF
12759 #line 12760 "configure"
12760 #include "confdefs.h"
12761 #include <sys/msg.h>
12762 EOF
12763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12764 { (eval echo configure:12765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12766 if test -z "$ac_err"; then
12767   rm -rf conftest*
12768   eval "ac_cv_header_$ac_safe=yes"
12769 else
12770   echo "$ac_err" >&5
12771   echo "configure: failed program was:" >&5
12772   cat conftest.$ac_ext >&5
12773   rm -rf conftest*
12774   eval "ac_cv_header_$ac_safe=no"
12775 fi
12776 rm -f conftest*
12777 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12778   echo "$ac_t""yes" 1>&6
12779   { test "$extra_verbose" = "yes" && cat << \EOF
12780     Defining HAVE_SYSVIPC
12781 EOF
12782 cat >> confdefs.h <<\EOF
12783 #define HAVE_SYSVIPC 1
12784 EOF
12785 }
12786
12787 else
12788   echo "$ac_t""no" 1>&6
12789 fi
12790
12791 else
12792   echo "$ac_t""no" 1>&6
12793 fi
12794
12795 else
12796   echo "$ac_t""no" 1>&6
12797 fi
12798
12799
12800 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12801 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12802 echo "configure:12803: checking for dirent.h" >&5
12803
12804 cat > conftest.$ac_ext <<EOF
12805 #line 12806 "configure"
12806 #include "confdefs.h"
12807 #include <dirent.h>
12808 EOF
12809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12810 { (eval echo configure:12811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12812 if test -z "$ac_err"; then
12813   rm -rf conftest*
12814   eval "ac_cv_header_$ac_safe=yes"
12815 else
12816   echo "$ac_err" >&5
12817   echo "configure: failed program was:" >&5
12818   cat conftest.$ac_ext >&5
12819   rm -rf conftest*
12820   eval "ac_cv_header_$ac_safe=no"
12821 fi
12822 rm -f conftest*
12823 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12824   echo "$ac_t""yes" 1>&6
12825   { test "$extra_verbose" = "yes" && cat << \EOF
12826     Defining SYSV_SYSTEM_DIR
12827 EOF
12828 cat >> confdefs.h <<\EOF
12829 #define SYSV_SYSTEM_DIR 1
12830 EOF
12831 }
12832
12833 else
12834   echo "$ac_t""no" 1>&6
12835 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12836 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12837 echo "configure:12838: checking for sys/dir.h" >&5
12838
12839 cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842 #include <sys/dir.h>
12843 EOF
12844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12845 { (eval echo configure:12846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12847 if test -z "$ac_err"; then
12848   rm -rf conftest*
12849   eval "ac_cv_header_$ac_safe=yes"
12850 else
12851   echo "$ac_err" >&5
12852   echo "configure: failed program was:" >&5
12853   cat conftest.$ac_ext >&5
12854   rm -rf conftest*
12855   eval "ac_cv_header_$ac_safe=no"
12856 fi
12857 rm -f conftest*
12858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12859   echo "$ac_t""yes" 1>&6
12860   :
12861 else
12862   echo "$ac_t""no" 1>&6
12863 { test "$extra_verbose" = "yes" && cat << \EOF
12864     Defining NONSYSTEM_DIR_LIBRARY
12865 EOF
12866 cat >> confdefs.h <<\EOF
12867 #define NONSYSTEM_DIR_LIBRARY 1
12868 EOF
12869 }
12870
12871 fi
12872
12873 fi
12874
12875
12876 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12877 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12878 echo "configure:12879: checking for nlist.h" >&5
12879
12880 cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 #include <nlist.h>
12884 EOF
12885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12886 { (eval echo configure:12887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12888 if test -z "$ac_err"; then
12889   rm -rf conftest*
12890   eval "ac_cv_header_$ac_safe=yes"
12891 else
12892   echo "$ac_err" >&5
12893   echo "configure: failed program was:" >&5
12894   cat conftest.$ac_ext >&5
12895   rm -rf conftest*
12896   eval "ac_cv_header_$ac_safe=no"
12897 fi
12898 rm -f conftest*
12899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12900   echo "$ac_t""yes" 1>&6
12901   { test "$extra_verbose" = "yes" && cat << \EOF
12902     Defining NLIST_STRUCT
12903 EOF
12904 cat >> confdefs.h <<\EOF
12905 #define NLIST_STRUCT 1
12906 EOF
12907 }
12908
12909 else
12910   echo "$ac_t""no" 1>&6
12911 fi
12912
12913
12914
12915 echo "checking "for sound support"" 1>&6
12916 echo "configure:12917: checking "for sound support"" >&5
12917 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12918
12919 if test "$with_native_sound" != "no"; then
12920     if test -n "$native_sound_lib"; then
12921     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12922 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12923 echo "configure:12924: checking for multimedia/audio_device.h" >&5
12924
12925 cat > conftest.$ac_ext <<EOF
12926 #line 12927 "configure"
12927 #include "confdefs.h"
12928 #include <multimedia/audio_device.h>
12929 EOF
12930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12931 { (eval echo configure:12932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12933 if test -z "$ac_err"; then
12934   rm -rf conftest*
12935   eval "ac_cv_header_$ac_safe=yes"
12936 else
12937   echo "$ac_err" >&5
12938   echo "configure: failed program was:" >&5
12939   cat conftest.$ac_ext >&5
12940   rm -rf conftest*
12941   eval "ac_cv_header_$ac_safe=no"
12942 fi
12943 rm -f conftest*
12944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12945   echo "$ac_t""yes" 1>&6
12946   sound_found=yes sound_cflags=""
12947       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12948    echo "    xemacs will be linked with \"sunplay.o\""
12949  fi
12950 else
12951   echo "$ac_t""no" 1>&6
12952 fi
12953
12954   fi
12955
12956     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12957     sound_found=yes
12958     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12959    echo "    xemacs will be linked with \"sunplay.o\""
12960  fi
12961     if test -d "/usr/demo/SOUND/include"
12962       then sound_cflags="-I/usr/demo/SOUND/include"
12963       else sound_cflags="-I/usr/demo/SOUND"
12964     fi
12965     if test -z "$native_sound_lib" ; then
12966       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12967         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12968         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12969       fi
12970     fi
12971   fi
12972
12973     if test -z "$sound_found"; then
12974     case "$canonical" in
12975     *-sgi-* )
12976       if test -z "$native_sound_lib"; then
12977         
12978 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12979 echo "configure:12980: checking for ALopenport in -laudio" >&5
12980 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12981
12982 xe_check_libs=" -laudio "
12983 cat > conftest.$ac_ext <<EOF
12984 #line 12985 "configure"
12985 #include "confdefs.h"
12986 /* Override any gcc2 internal prototype to avoid an error.  */
12987 /* We use char because int might match the return type of a gcc2
12988     builtin and then its argument prototype would still apply.  */
12989 char ALopenport();
12990
12991 int main() {
12992 ALopenport()
12993 ; return 0; }
12994 EOF
12995 if { (eval echo configure:12996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12996   rm -rf conftest*
12997   eval "ac_cv_lib_$ac_lib_var=yes"
12998 else
12999   echo "configure: failed program was:" >&5
13000   cat conftest.$ac_ext >&5
13001   rm -rf conftest*
13002   eval "ac_cv_lib_$ac_lib_var=no"
13003 fi
13004 rm -f conftest*
13005 xe_check_libs=""
13006
13007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13008   echo "$ac_t""yes" 1>&6
13009   native_sound_lib="-laudio"
13010 else
13011   echo "$ac_t""no" 1>&6
13012 fi
13013
13014
13015       fi
13016       if test -n "$native_sound_lib"; then
13017         sound_found=yes sound_cflags=""
13018         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13019    echo "    xemacs will be linked with \"sgiplay.o\""
13020  fi
13021       fi ;;
13022     hppa*-hp-hpux* )
13023       if test -z "$native_sound_lib"; then
13024         
13025 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13026 echo "configure:13027: checking for AOpenAudio in -lAlib" >&5
13027 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13028
13029 xe_check_libs=" -lAlib "
13030 cat > conftest.$ac_ext <<EOF
13031 #line 13032 "configure"
13032 #include "confdefs.h"
13033 /* Override any gcc2 internal prototype to avoid an error.  */
13034 /* We use char because int might match the return type of a gcc2
13035     builtin and then its argument prototype would still apply.  */
13036 char AOpenAudio();
13037
13038 int main() {
13039 AOpenAudio()
13040 ; return 0; }
13041 EOF
13042 if { (eval echo configure:13043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13043   rm -rf conftest*
13044   eval "ac_cv_lib_$ac_lib_var=yes"
13045 else
13046   echo "configure: failed program was:" >&5
13047   cat conftest.$ac_ext >&5
13048   rm -rf conftest*
13049   eval "ac_cv_lib_$ac_lib_var=no"
13050 fi
13051 rm -f conftest*
13052 xe_check_libs=""
13053
13054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13055   echo "$ac_t""yes" 1>&6
13056   native_sound_lib="-lAlib"
13057 else
13058   echo "$ac_t""no" 1>&6
13059 fi
13060
13061
13062       fi
13063       if test -n "$native_sound_lib"; then
13064         sound_found=yes
13065         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13066    echo "    xemacs will be linked with \"hpplay.o\""
13067  fi
13068         if test "$GCC" = "yes" # Kludge city
13069           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13070           else sound_cflags="+e -I/usr/audio/examples"
13071         fi
13072       fi ;;
13073     esac
13074   fi
13075
13076     if test -z "$sound_found"; then
13077     if test "$with_msw" = "yes"; then
13078     sound_found=yes
13079     native_sound_lib=
13080     fi
13081   fi
13082
13083     if test -z "$sound_found"; then
13084     for dir in "machine" "sys" "linux"; do
13085       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13086 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13087 echo "configure:13088: checking for ${dir}/soundcard.h" >&5
13088
13089 cat > conftest.$ac_ext <<EOF
13090 #line 13091 "configure"
13091 #include "confdefs.h"
13092 #include <${dir}/soundcard.h>
13093 EOF
13094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13095 { (eval echo configure:13096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13097 if test -z "$ac_err"; then
13098   rm -rf conftest*
13099   eval "ac_cv_header_$ac_safe=yes"
13100 else
13101   echo "$ac_err" >&5
13102   echo "configure: failed program was:" >&5
13103   cat conftest.$ac_ext >&5
13104   rm -rf conftest*
13105   eval "ac_cv_header_$ac_safe=no"
13106 fi
13107 rm -f conftest*
13108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13109   echo "$ac_t""yes" 1>&6
13110   sound_found=yes
13111        need_miscplay=yes
13112         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13113    echo "    xemacs will be linked with \"linuxplay.o\""
13114  fi
13115         { test "$extra_verbose" = "yes" && cat << EOF
13116     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13117 EOF
13118 cat >> confdefs.h <<EOF
13119 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13120 EOF
13121 }
13122
13123         break
13124 else
13125   echo "$ac_t""no" 1>&6
13126 fi
13127
13128     done
13129   fi
13130
13131   test "$sound_found" = "yes" && with_native_sound=yes
13132 fi
13133
13134 if test "$with_native_sound" = "yes"; then
13135   { test "$extra_verbose" = "yes" && cat << \EOF
13136     Defining HAVE_NATIVE_SOUND
13137 EOF
13138 cat >> confdefs.h <<\EOF
13139 #define HAVE_NATIVE_SOUND 1
13140 EOF
13141 }
13142
13143   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13144 fi
13145
13146 if test "$with_nas_sound" != "no"; then
13147   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13148 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13149 echo "configure:13150: checking for audio/audiolib.h" >&5
13150
13151 cat > conftest.$ac_ext <<EOF
13152 #line 13153 "configure"
13153 #include "confdefs.h"
13154 #include <audio/audiolib.h>
13155 EOF
13156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13157 { (eval echo configure:13158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13159 if test -z "$ac_err"; then
13160   rm -rf conftest*
13161   eval "ac_cv_header_$ac_safe=yes"
13162 else
13163   echo "$ac_err" >&5
13164   echo "configure: failed program was:" >&5
13165   cat conftest.$ac_ext >&5
13166   rm -rf conftest*
13167   eval "ac_cv_header_$ac_safe=no"
13168 fi
13169 rm -f conftest*
13170 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13171   echo "$ac_t""yes" 1>&6
13172   
13173     
13174 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13175 echo "configure:13176: checking for AuOpenServer in -laudio" >&5
13176 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13177
13178 xe_check_libs=" -laudio "
13179 cat > conftest.$ac_ext <<EOF
13180 #line 13181 "configure"
13181 #include "confdefs.h"
13182 /* Override any gcc2 internal prototype to avoid an error.  */
13183 /* We use char because int might match the return type of a gcc2
13184     builtin and then its argument prototype would still apply.  */
13185 char AuOpenServer();
13186
13187 int main() {
13188 AuOpenServer()
13189 ; return 0; }
13190 EOF
13191 if { (eval echo configure:13192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13192   rm -rf conftest*
13193   eval "ac_cv_lib_$ac_lib_var=yes"
13194 else
13195   echo "configure: failed program was:" >&5
13196   cat conftest.$ac_ext >&5
13197   rm -rf conftest*
13198   eval "ac_cv_lib_$ac_lib_var=no"
13199 fi
13200 rm -f conftest*
13201 xe_check_libs=""
13202
13203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13204   echo "$ac_t""yes" 1>&6
13205   have_nas_sound=yes
13206 else
13207   echo "$ac_t""no" 1>&6
13208 fi
13209
13210
13211 else
13212   echo "$ac_t""no" 1>&6
13213 fi
13214
13215   if test "$have_nas_sound" = "yes"; then
13216     with_nas_sound=yes
13217     { test "$extra_verbose" = "yes" && cat << \EOF
13218     Defining HAVE_NAS_SOUND
13219 EOF
13220 cat >> confdefs.h <<\EOF
13221 #define HAVE_NAS_SOUND 1
13222 EOF
13223 }
13224
13225     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13226    echo "    xemacs will be linked with \"nas.o\""
13227  fi
13228     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13229             cat > conftest.$ac_ext <<EOF
13230 #line 13231 "configure"
13231 #include "confdefs.h"
13232 #include <audio/Xtutil.h>
13233 EOF
13234 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13235   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13236   :
13237 else
13238   rm -rf conftest*
13239   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13240     Defining NAS_NO_ERROR_JUMP
13241 EOF
13242 cat >> confdefs.h <<\EOF
13243 #define NAS_NO_ERROR_JUMP 1
13244 EOF
13245 }
13246
13247 fi
13248 rm -f conftest*
13249
13250   else
13251     test "$with_nas_sound" = "yes" && \
13252       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13253     with_nas_sound=no
13254   fi
13255 fi
13256
13257 if test "$with_esd_sound" != "no"; then
13258   # Extract the first word of "esd-config", so it can be a program name with args.
13259 set dummy esd-config; ac_word=$2
13260 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13261 echo "configure:13262: checking for $ac_word" >&5
13262
13263 if test -n "$have_esd_config"; then
13264   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13265 else
13266   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13267   ac_dummy="$PATH"
13268   for ac_dir in $ac_dummy; do
13269     test -z "$ac_dir" && ac_dir=.
13270     if test -f $ac_dir/$ac_word; then
13271       ac_cv_prog_have_esd_config="yes"
13272       break
13273     fi
13274   done
13275   IFS="$ac_save_ifs"
13276   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13277 fi
13278 have_esd_config="$ac_cv_prog_have_esd_config"
13279 if test -n "$have_esd_config"; then
13280   echo "$ac_t""$have_esd_config" 1>&6
13281 else
13282   echo "$ac_t""no" 1>&6
13283 fi
13284
13285   if test "$have_esd_config" = "yes"; then
13286     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13287     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
13288     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13289     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13290 echo "configure:13291: checking for esd_play_stream" >&5
13291
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* System header to define __stub macros and hopefully few prototypes,
13296     which can conflict with char esd_play_stream(); below.  */
13297 #include <assert.h>
13298 /* Override any gcc2 internal prototype to avoid an error.  */
13299 /* We use char because int might match the return type of a gcc2
13300     builtin and then its argument prototype would still apply.  */
13301 char esd_play_stream();
13302
13303 int main() {
13304
13305 /* The GNU C library defines this for functions which it implements
13306     to always fail with ENOSYS.  Some functions are actually named
13307     something starting with __ and the normal name is an alias.  */
13308 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13309 choke me
13310 #else
13311 esd_play_stream();
13312 #endif
13313
13314 ; return 0; }
13315 EOF
13316 if { (eval echo configure:13317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13317   rm -rf conftest*
13318   eval "ac_cv_func_esd_play_stream=yes"
13319 else
13320   echo "configure: failed program was:" >&5
13321   cat conftest.$ac_ext >&5
13322   rm -rf conftest*
13323   eval "ac_cv_func_esd_play_stream=no"
13324 fi
13325 rm -f conftest*
13326
13327 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13328   echo "$ac_t""yes" 1>&6
13329   have_esd_sound=yes
13330 else
13331   echo "$ac_t""no" 1>&6
13332 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13333 fi
13334
13335   fi
13336
13337   if test "$have_esd_sound" = "yes"; then
13338     with_esd_sound=yes
13339     need_miscplay=yes
13340     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13341    echo "    xemacs will be linked with \"esd.o\""
13342  fi
13343     { test "$extra_verbose" = "yes" && cat << \EOF
13344     Defining HAVE_ESD_SOUND
13345 EOF
13346 cat >> confdefs.h <<\EOF
13347 #define HAVE_ESD_SOUND 1
13348 EOF
13349 }
13350
13351   else
13352     test "$with_esd_sound" = "yes" && \
13353       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13354     with_esd_sound=no
13355   fi
13356 fi
13357
13358 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13359    echo "    xemacs will be linked with \"miscplay.o\""
13360  fi
13361
13362
13363 test -z "$with_tty" && with_tty=yes
13364
13365 if test "$with_tty" = "yes"  ; then
13366   echo "checking for TTY-related features" 1>&6
13367 echo "configure:13368: checking for TTY-related features" >&5
13368   { test "$extra_verbose" = "yes" && cat << \EOF
13369     Defining HAVE_TTY
13370 EOF
13371 cat >> confdefs.h <<\EOF
13372 #define HAVE_TTY 1
13373 EOF
13374 }
13375
13376   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
13377    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\""
13378  fi
13379
13380     if test -z "$with_ncurses"; then
13381     
13382 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13383 echo "configure:13384: checking for tgetent in -lncurses" >&5
13384 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13385
13386 xe_check_libs=" -lncurses "
13387 cat > conftest.$ac_ext <<EOF
13388 #line 13389 "configure"
13389 #include "confdefs.h"
13390 /* Override any gcc2 internal prototype to avoid an error.  */
13391 /* We use char because int might match the return type of a gcc2
13392     builtin and then its argument prototype would still apply.  */
13393 char tgetent();
13394
13395 int main() {
13396 tgetent()
13397 ; return 0; }
13398 EOF
13399 if { (eval echo configure:13400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13400   rm -rf conftest*
13401   eval "ac_cv_lib_$ac_lib_var=yes"
13402 else
13403   echo "configure: failed program was:" >&5
13404   cat conftest.$ac_ext >&5
13405   rm -rf conftest*
13406   eval "ac_cv_lib_$ac_lib_var=no"
13407 fi
13408 rm -f conftest*
13409 xe_check_libs=""
13410
13411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13412   echo "$ac_t""yes" 1>&6
13413   with_ncurses=yes
13414 else
13415   echo "$ac_t""no" 1>&6
13416 with_ncurses=no
13417 fi
13418
13419
13420   fi
13421   if test "$with_ncurses" = "yes"; then
13422     { test "$extra_verbose" = "yes" && cat << \EOF
13423     Defining HAVE_NCURSES
13424 EOF
13425 cat >> confdefs.h <<\EOF
13426 #define HAVE_NCURSES 1
13427 EOF
13428 }
13429
13430     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13431 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13432 echo "configure:13433: checking for ncurses/curses.h" >&5
13433
13434 cat > conftest.$ac_ext <<EOF
13435 #line 13436 "configure"
13436 #include "confdefs.h"
13437 #include <ncurses/curses.h>
13438 EOF
13439 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13440 { (eval echo configure:13441: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13441 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13442 if test -z "$ac_err"; then
13443   rm -rf conftest*
13444   eval "ac_cv_header_$ac_safe=yes"
13445 else
13446   echo "$ac_err" >&5
13447   echo "configure: failed program was:" >&5
13448   cat conftest.$ac_ext >&5
13449   rm -rf conftest*
13450   eval "ac_cv_header_$ac_safe=no"
13451 fi
13452 rm -f conftest*
13453 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13454   echo "$ac_t""yes" 1>&6
13455   curses_h_file=ncurses/curses.h
13456 else
13457   echo "$ac_t""no" 1>&6
13458 fi
13459
13460     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13461 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13462 echo "configure:13463: checking for ncurses/term.h" >&5
13463
13464 cat > conftest.$ac_ext <<EOF
13465 #line 13466 "configure"
13466 #include "confdefs.h"
13467 #include <ncurses/term.h>
13468 EOF
13469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13470 { (eval echo configure:13471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13472 if test -z "$ac_err"; then
13473   rm -rf conftest*
13474   eval "ac_cv_header_$ac_safe=yes"
13475 else
13476   echo "$ac_err" >&5
13477   echo "configure: failed program was:" >&5
13478   cat conftest.$ac_ext >&5
13479   rm -rf conftest*
13480   eval "ac_cv_header_$ac_safe=no"
13481 fi
13482 rm -f conftest*
13483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13484   echo "$ac_t""yes" 1>&6
13485   term_h_file=ncurses/term.h
13486 else
13487   echo "$ac_t""no" 1>&6
13488 fi
13489
13490     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13491    echo "    xemacs will be linked with \"terminfo.o\""
13492  fi
13493     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13494
13495     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13496                         save_c_switch_site="$c_switch_site"
13497       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13498       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13499 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13500 echo "configure:13501: checking for ncurses/curses.h" >&5
13501
13502 cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 #include <ncurses/curses.h>
13506 EOF
13507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13508 { (eval echo configure:13509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13510 if test -z "$ac_err"; then
13511   rm -rf conftest*
13512   eval "ac_cv_header_$ac_safe=yes"
13513 else
13514   echo "$ac_err" >&5
13515   echo "configure: failed program was:" >&5
13516   cat conftest.$ac_ext >&5
13517   rm -rf conftest*
13518   eval "ac_cv_header_$ac_safe=no"
13519 fi
13520 rm -f conftest*
13521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13522   echo "$ac_t""yes" 1>&6
13523   curses_h_file=ncurses/curses.h
13524 else
13525   echo "$ac_t""no" 1>&6
13526 fi
13527
13528       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13529         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13530         else c_switch_site="$save_c_switch_site"
13531       fi
13532     fi
13533   else         if test "$have_terminfo" = "yes"; then
13534       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13535    echo "    xemacs will be linked with \"terminfo.o\""
13536  fi
13537       if test -n "$libs_termcap"; then
13538         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13539       else
13540         for lib in curses termlib termcap; do
13541           
13542 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13543 echo "configure:13544: checking for tgetent in -l$lib" >&5
13544 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13545
13546 xe_check_libs=" -l$lib "
13547 cat > conftest.$ac_ext <<EOF
13548 #line 13549 "configure"
13549 #include "confdefs.h"
13550 /* Override any gcc2 internal prototype to avoid an error.  */
13551 /* We use char because int might match the return type of a gcc2
13552     builtin and then its argument prototype would still apply.  */
13553 char tgetent();
13554
13555 int main() {
13556 tgetent()
13557 ; return 0; }
13558 EOF
13559 if { (eval echo configure:13560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13560   rm -rf conftest*
13561   eval "ac_cv_lib_$ac_lib_var=yes"
13562 else
13563   echo "configure: failed program was:" >&5
13564   cat conftest.$ac_ext >&5
13565   rm -rf conftest*
13566   eval "ac_cv_lib_$ac_lib_var=no"
13567 fi
13568 rm -f conftest*
13569 xe_check_libs=""
13570
13571 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13572   echo "$ac_t""yes" 1>&6
13573   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13574 else
13575   echo "$ac_t""no" 1>&6
13576 fi
13577
13578
13579         done
13580       fi
13581     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13582                                 
13583 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13584 echo "configure:13585: checking for tgoto in -ltermcap" >&5
13585 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13586
13587 xe_check_libs=" -ltermcap "
13588 cat > conftest.$ac_ext <<EOF
13589 #line 13590 "configure"
13590 #include "confdefs.h"
13591 /* Override any gcc2 internal prototype to avoid an error.  */
13592 /* We use char because int might match the return type of a gcc2
13593     builtin and then its argument prototype would still apply.  */
13594 char tgoto();
13595
13596 int main() {
13597 tgoto()
13598 ; return 0; }
13599 EOF
13600 if { (eval echo configure:13601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13601   rm -rf conftest*
13602   eval "ac_cv_lib_$ac_lib_var=yes"
13603 else
13604   echo "configure: failed program was:" >&5
13605   cat conftest.$ac_ext >&5
13606   rm -rf conftest*
13607   eval "ac_cv_lib_$ac_lib_var=no"
13608 fi
13609 rm -f conftest*
13610 xe_check_libs=""
13611
13612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13613   echo "$ac_t""yes" 1>&6
13614     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13615     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13616   { test "$extra_verbose" = "yes" && cat << EOF
13617     Defining $ac_tr_lib
13618 EOF
13619 cat >> confdefs.h <<EOF
13620 #define $ac_tr_lib 1
13621 EOF
13622 }
13623
13624   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13625
13626 else
13627   echo "$ac_t""no" 1>&6
13628 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13629    echo "    xemacs will be linked with \"tparam.o\""
13630  fi
13631 fi
13632
13633
13634       else
13635         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13636    echo "    xemacs will be linked with \"tparam.o\""
13637  fi
13638       fi
13639                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13640       if test -n "$libs_termcap"; then
13641         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13642       else
13643         
13644 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13645 echo "configure:13646: checking for tgetent in -lcurses" >&5
13646 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13647
13648 xe_check_libs=" -lcurses "
13649 cat > conftest.$ac_ext <<EOF
13650 #line 13651 "configure"
13651 #include "confdefs.h"
13652 /* Override any gcc2 internal prototype to avoid an error.  */
13653 /* We use char because int might match the return type of a gcc2
13654     builtin and then its argument prototype would still apply.  */
13655 char tgetent();
13656
13657 int main() {
13658 tgetent()
13659 ; return 0; }
13660 EOF
13661 if { (eval echo configure:13662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13662   rm -rf conftest*
13663   eval "ac_cv_lib_$ac_lib_var=yes"
13664 else
13665   echo "configure: failed program was:" >&5
13666   cat conftest.$ac_ext >&5
13667   rm -rf conftest*
13668   eval "ac_cv_lib_$ac_lib_var=no"
13669 fi
13670 rm -f conftest*
13671 xe_check_libs=""
13672
13673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13674   echo "$ac_t""yes" 1>&6
13675   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13676 else
13677   echo "$ac_t""no" 1>&6
13678 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13679 echo "configure:13680: checking for tgetent in -ltermcap" >&5
13680 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13681
13682 xe_check_libs=" -ltermcap "
13683 cat > conftest.$ac_ext <<EOF
13684 #line 13685 "configure"
13685 #include "confdefs.h"
13686 /* Override any gcc2 internal prototype to avoid an error.  */
13687 /* We use char because int might match the return type of a gcc2
13688     builtin and then its argument prototype would still apply.  */
13689 char tgetent();
13690
13691 int main() {
13692 tgetent()
13693 ; return 0; }
13694 EOF
13695 if { (eval echo configure:13696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13696   rm -rf conftest*
13697   eval "ac_cv_lib_$ac_lib_var=yes"
13698 else
13699   echo "configure: failed program was:" >&5
13700   cat conftest.$ac_ext >&5
13701   rm -rf conftest*
13702   eval "ac_cv_lib_$ac_lib_var=no"
13703 fi
13704 rm -f conftest*
13705 xe_check_libs=""
13706
13707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13708   echo "$ac_t""yes" 1>&6
13709   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13710 else
13711   echo "$ac_t""no" 1>&6
13712 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13713    echo "    xemacs will be linked with \"termcap.o\""
13714  fi
13715 fi
13716
13717
13718 fi
13719
13720
13721       fi
13722     fi
13723   fi
13724   { test "$extra_verbose" = "yes" && cat << EOF
13725     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13726 EOF
13727 cat >> confdefs.h <<EOF
13728 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13729 EOF
13730 }
13731
13732   { test "$extra_verbose" = "yes" && cat << EOF
13733     Defining TERM_H_FILE = "${term_h_file-term.h}"
13734 EOF
13735 cat >> confdefs.h <<EOF
13736 #define TERM_H_FILE "${term_h_file-term.h}"
13737 EOF
13738 }
13739
13740
13741     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13742 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13743 echo "configure:13744: checking for gpm.h" >&5
13744
13745 cat > conftest.$ac_ext <<EOF
13746 #line 13747 "configure"
13747 #include "confdefs.h"
13748 #include <gpm.h>
13749 EOF
13750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13751 { (eval echo configure:13752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13753 if test -z "$ac_err"; then
13754   rm -rf conftest*
13755   eval "ac_cv_header_$ac_safe=yes"
13756 else
13757   echo "$ac_err" >&5
13758   echo "configure: failed program was:" >&5
13759   cat conftest.$ac_ext >&5
13760   rm -rf conftest*
13761   eval "ac_cv_header_$ac_safe=no"
13762 fi
13763 rm -f conftest*
13764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13765   echo "$ac_t""yes" 1>&6
13766   :
13767 else
13768   echo "$ac_t""no" 1>&6
13769 with_gpm=no
13770 fi
13771  }
13772   test -z "$with_gpm" && { 
13773 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13774 echo "configure:13775: checking for Gpm_Open in -lgpm" >&5
13775 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13776
13777 xe_check_libs=" -lgpm "
13778 cat > conftest.$ac_ext <<EOF
13779 #line 13780 "configure"
13780 #include "confdefs.h"
13781 /* Override any gcc2 internal prototype to avoid an error.  */
13782 /* We use char because int might match the return type of a gcc2
13783     builtin and then its argument prototype would still apply.  */
13784 char Gpm_Open();
13785
13786 int main() {
13787 Gpm_Open()
13788 ; return 0; }
13789 EOF
13790 if { (eval echo configure:13791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13791   rm -rf conftest*
13792   eval "ac_cv_lib_$ac_lib_var=yes"
13793 else
13794   echo "configure: failed program was:" >&5
13795   cat conftest.$ac_ext >&5
13796   rm -rf conftest*
13797   eval "ac_cv_lib_$ac_lib_var=no"
13798 fi
13799 rm -f conftest*
13800 xe_check_libs=""
13801
13802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13803   echo "$ac_t""yes" 1>&6
13804   with_gpm=yes
13805 else
13806   echo "$ac_t""no" 1>&6
13807 with_gpm=no
13808 fi
13809
13810  }
13811   if test "$with_gpm" = "yes"; then
13812     { test "$extra_verbose" = "yes" && cat << \EOF
13813     Defining HAVE_GPM
13814 EOF
13815 cat >> confdefs.h <<\EOF
13816 #define HAVE_GPM 1
13817 EOF
13818 }
13819
13820     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13821    echo "    xemacs will be linked with \"gpmevent.o\""
13822  fi
13823     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13824   fi
13825
13826 else   for feature in ncurses gpm; do
13827     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13828       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13829     fi
13830     eval "with_${feature}=no"
13831   done
13832 fi 
13833 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
13834    echo "    xemacs will be linked with \"event-unixoid.o\""
13835  fi
13836
13837
13838 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13839   != "no no no" && echo "checking for database support" 1>&6
13840 echo "configure:13841: checking for database support" >&5
13841
13842 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13843   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13844 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13845 echo "configure:13846: checking for ndbm.h" >&5
13846
13847 cat > conftest.$ac_ext <<EOF
13848 #line 13849 "configure"
13849 #include "confdefs.h"
13850 #include <ndbm.h>
13851 EOF
13852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13853 { (eval echo configure:13854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13855 if test -z "$ac_err"; then
13856   rm -rf conftest*
13857   eval "ac_cv_header_$ac_safe=yes"
13858 else
13859   echo "$ac_err" >&5
13860   echo "configure: failed program was:" >&5
13861   cat conftest.$ac_ext >&5
13862   rm -rf conftest*
13863   eval "ac_cv_header_$ac_safe=no"
13864 fi
13865 rm -f conftest*
13866 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13867   echo "$ac_t""yes" 1>&6
13868   :
13869 else
13870   echo "$ac_t""no" 1>&6
13871
13872     test "$with_database_gdbm" = "yes" -o \
13873          "$with_database_dbm"  = "yes" && \
13874       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13875     with_database_gdbm=no with_database_dbm=no
13876 fi
13877
13878 fi
13879
13880 if test "$with_database_gdbm" != "no"; then
13881   
13882 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13883 echo "configure:13884: checking for dbm_open in -lgdbm" >&5
13884 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13885
13886 xe_check_libs=" -lgdbm "
13887 cat > conftest.$ac_ext <<EOF
13888 #line 13889 "configure"
13889 #include "confdefs.h"
13890 /* Override any gcc2 internal prototype to avoid an error.  */
13891 /* We use char because int might match the return type of a gcc2
13892     builtin and then its argument prototype would still apply.  */
13893 char dbm_open();
13894
13895 int main() {
13896 dbm_open()
13897 ; return 0; }
13898 EOF
13899 if { (eval echo configure:13900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13900   rm -rf conftest*
13901   eval "ac_cv_lib_$ac_lib_var=yes"
13902 else
13903   echo "configure: failed program was:" >&5
13904   cat conftest.$ac_ext >&5
13905   rm -rf conftest*
13906   eval "ac_cv_lib_$ac_lib_var=no"
13907 fi
13908 rm -f conftest*
13909 xe_check_libs=""
13910
13911 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13912   echo "$ac_t""yes" 1>&6
13913   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13914 else
13915   echo "$ac_t""no" 1>&6
13916 if test "$with_database_gdbm" = "yes"; then
13917      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13918    fi
13919    with_database_gdbm=no
13920 fi
13921
13922
13923 fi
13924
13925 if test "$with_database_dbm" != "no"; then
13926   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13927 echo "configure:13928: checking for dbm_open" >&5
13928
13929 cat > conftest.$ac_ext <<EOF
13930 #line 13931 "configure"
13931 #include "confdefs.h"
13932 /* System header to define __stub macros and hopefully few prototypes,
13933     which can conflict with char dbm_open(); below.  */
13934 #include <assert.h>
13935 /* Override any gcc2 internal prototype to avoid an error.  */
13936 /* We use char because int might match the return type of a gcc2
13937     builtin and then its argument prototype would still apply.  */
13938 char dbm_open();
13939
13940 int main() {
13941
13942 /* The GNU C library defines this for functions which it implements
13943     to always fail with ENOSYS.  Some functions are actually named
13944     something starting with __ and the normal name is an alias.  */
13945 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13946 choke me
13947 #else
13948 dbm_open();
13949 #endif
13950
13951 ; return 0; }
13952 EOF
13953 if { (eval echo configure:13954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13954   rm -rf conftest*
13955   eval "ac_cv_func_dbm_open=yes"
13956 else
13957   echo "configure: failed program was:" >&5
13958   cat conftest.$ac_ext >&5
13959   rm -rf conftest*
13960   eval "ac_cv_func_dbm_open=no"
13961 fi
13962 rm -f conftest*
13963
13964 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13965   echo "$ac_t""yes" 1>&6
13966   with_database_dbm=yes libdbm=
13967 else
13968   echo "$ac_t""no" 1>&6
13969
13970     
13971 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13972 echo "configure:13973: checking for dbm_open in -ldbm" >&5
13973 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13974
13975 xe_check_libs=" -ldbm "
13976 cat > conftest.$ac_ext <<EOF
13977 #line 13978 "configure"
13978 #include "confdefs.h"
13979 /* Override any gcc2 internal prototype to avoid an error.  */
13980 /* We use char because int might match the return type of a gcc2
13981     builtin and then its argument prototype would still apply.  */
13982 char dbm_open();
13983
13984 int main() {
13985 dbm_open()
13986 ; return 0; }
13987 EOF
13988 if { (eval echo configure:13989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13989   rm -rf conftest*
13990   eval "ac_cv_lib_$ac_lib_var=yes"
13991 else
13992   echo "configure: failed program was:" >&5
13993   cat conftest.$ac_ext >&5
13994   rm -rf conftest*
13995   eval "ac_cv_lib_$ac_lib_var=no"
13996 fi
13997 rm -f conftest*
13998 xe_check_libs=""
13999
14000 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14001   echo "$ac_t""yes" 1>&6
14002   with_database_dbm=yes libdbm=-ldbm
14003 else
14004   echo "$ac_t""no" 1>&6
14005 test "$with_database_dbm" = "yes" && \
14006         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14007       with_database_dbm=no
14008 fi
14009
14010
14011 fi
14012
14013 fi
14014
14015 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14016 test "$with_database_gdbm" = "yes" -o \
14017      "$with_database_dbm"  = "yes" && \
14018   { test "$extra_verbose" = "yes" && cat << \EOF
14019     Defining HAVE_DBM
14020 EOF
14021 cat >> confdefs.h <<\EOF
14022 #define HAVE_DBM 1
14023 EOF
14024 }
14025
14026
14027 if test "$with_database_berkdb" != "no"; then
14028   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14029 echo "configure:14030: checking for Berkeley db.h" >&5
14030   for header in "db/db.h" "db.h"; do
14031     cat > conftest.$ac_ext <<EOF
14032 #line 14033 "configure"
14033 #include "confdefs.h"
14034
14035 #include <stdlib.h>
14036 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14037 #ifdef HAVE_INTTYPES_H
14038 #define __BIT_TYPES_DEFINED__
14039 #include <inttypes.h>
14040 typedef uint8_t  u_int8_t;
14041 typedef uint16_t u_int16_t;
14042 typedef uint32_t u_int32_t;
14043 #ifdef WE_DONT_NEED_QUADS
14044 typedef uint64_t u_int64_t;
14045 #endif
14046 #endif
14047 #endif
14048 #include <$header>
14049
14050 int main() {
14051
14052 ; return 0; }
14053 EOF
14054 if { (eval echo configure:14055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14055   rm -rf conftest*
14056   db_h_file="$header"; break
14057 else
14058   echo "configure: failed program was:" >&5
14059   cat conftest.$ac_ext >&5
14060 fi
14061 rm -f conftest*
14062   done
14063   if test -z "$db_h_file"
14064   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14065   else echo "$ac_t""$db_h_file" 1>&6
14066   fi
14067
14068   if test "$with_database_berkdb" != "no"; then
14069     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14070 echo "configure:14071: checking for Berkeley DB version" >&5
14071     cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 #include <$db_h_file>
14075 #if DB_VERSION_MAJOR > 1
14076 yes
14077 #endif
14078
14079 EOF
14080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14081   egrep "yes" >/dev/null 2>&1; then
14082   rm -rf conftest*
14083   cat > conftest.$ac_ext <<EOF
14084 #line 14085 "configure"
14085 #include "confdefs.h"
14086 #include <$db_h_file>
14087 #if DB_VERSION_MAJOR > 2
14088 yes
14089 #endif
14090
14091 EOF
14092 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14093   egrep "yes" >/dev/null 2>&1; then
14094   rm -rf conftest*
14095   echo "$ac_t""3" 1>&6; dbfunc=db_create
14096 else
14097   rm -rf conftest*
14098   
14099     echo "$ac_t""2" 1>&6; dbfunc=db_open
14100 fi
14101 rm -f conftest*
14102
14103 else
14104   rm -rf conftest*
14105   
14106     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14107 fi
14108 rm -f conftest*
14109
14110     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14111 echo "configure:14112: checking for $dbfunc" >&5
14112
14113 cat > conftest.$ac_ext <<EOF
14114 #line 14115 "configure"
14115 #include "confdefs.h"
14116 /* System header to define __stub macros and hopefully few prototypes,
14117     which can conflict with char $dbfunc(); below.  */
14118 #include <assert.h>
14119 /* Override any gcc2 internal prototype to avoid an error.  */
14120 /* We use char because int might match the return type of a gcc2
14121     builtin and then its argument prototype would still apply.  */
14122 char $dbfunc();
14123
14124 int main() {
14125
14126 /* The GNU C library defines this for functions which it implements
14127     to always fail with ENOSYS.  Some functions are actually named
14128     something starting with __ and the normal name is an alias.  */
14129 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14130 choke me
14131 #else
14132 $dbfunc();
14133 #endif
14134
14135 ; return 0; }
14136 EOF
14137 if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14138   rm -rf conftest*
14139   eval "ac_cv_func_$dbfunc=yes"
14140 else
14141   echo "configure: failed program was:" >&5
14142   cat conftest.$ac_ext >&5
14143   rm -rf conftest*
14144   eval "ac_cv_func_$dbfunc=no"
14145 fi
14146 rm -f conftest*
14147
14148 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14149   echo "$ac_t""yes" 1>&6
14150   with_database_berkdb=yes need_libdb=no
14151 else
14152   echo "$ac_t""no" 1>&6
14153
14154     
14155 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14156 echo "configure:14157: checking for $dbfunc in -ldb" >&5
14157 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14158
14159 xe_check_libs=" -ldb "
14160 cat > conftest.$ac_ext <<EOF
14161 #line 14162 "configure"
14162 #include "confdefs.h"
14163 /* Override any gcc2 internal prototype to avoid an error.  */
14164 /* We use char because int might match the return type of a gcc2
14165     builtin and then its argument prototype would still apply.  */
14166 char $dbfunc();
14167
14168 int main() {
14169 $dbfunc()
14170 ; return 0; }
14171 EOF
14172 if { (eval echo configure:14173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14173   rm -rf conftest*
14174   eval "ac_cv_lib_$ac_lib_var=yes"
14175 else
14176   echo "configure: failed program was:" >&5
14177   cat conftest.$ac_ext >&5
14178   rm -rf conftest*
14179   eval "ac_cv_lib_$ac_lib_var=no"
14180 fi
14181 rm -f conftest*
14182 xe_check_libs=""
14183
14184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14185   echo "$ac_t""yes" 1>&6
14186   with_database_berkdb=yes need_libdb=yes
14187 else
14188   echo "$ac_t""no" 1>&6
14189 fi
14190
14191
14192 fi
14193
14194   fi
14195
14196   if test "$with_database_berkdb" = "yes"; then
14197     { test "$extra_verbose" = "yes" && cat << EOF
14198     Defining DB_H_FILE = "$db_h_file"
14199 EOF
14200 cat >> confdefs.h <<EOF
14201 #define DB_H_FILE "$db_h_file"
14202 EOF
14203 }
14204
14205     { test "$extra_verbose" = "yes" && cat << \EOF
14206     Defining HAVE_BERKELEY_DB
14207 EOF
14208 cat >> confdefs.h <<\EOF
14209 #define HAVE_BERKELEY_DB 1
14210 EOF
14211 }
14212
14213     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14214   else with_database_berkdb=no
14215   fi
14216 fi
14217
14218 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14219      != "no no no"; then
14220   { test "$extra_verbose" = "yes" && cat << \EOF
14221     Defining HAVE_DATABASE
14222 EOF
14223 cat >> confdefs.h <<\EOF
14224 #define HAVE_DATABASE 1
14225 EOF
14226 }
14227
14228   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14229    echo "    xemacs will be linked with \"database.o\""
14230  fi
14231 fi
14232
14233 if test "$with_socks" = "yes"; then
14234   
14235 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14236 echo "configure:14237: checking for SOCKSinit in -lsocks" >&5
14237 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14238
14239 xe_check_libs=" -lsocks "
14240 cat > conftest.$ac_ext <<EOF
14241 #line 14242 "configure"
14242 #include "confdefs.h"
14243 /* Override any gcc2 internal prototype to avoid an error.  */
14244 /* We use char because int might match the return type of a gcc2
14245     builtin and then its argument prototype would still apply.  */
14246 char SOCKSinit();
14247
14248 int main() {
14249 SOCKSinit()
14250 ; return 0; }
14251 EOF
14252 if { (eval echo configure:14253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14253   rm -rf conftest*
14254   eval "ac_cv_lib_$ac_lib_var=yes"
14255 else
14256   echo "configure: failed program was:" >&5
14257   cat conftest.$ac_ext >&5
14258   rm -rf conftest*
14259   eval "ac_cv_lib_$ac_lib_var=no"
14260 fi
14261 rm -f conftest*
14262 xe_check_libs=""
14263
14264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14265   echo "$ac_t""yes" 1>&6
14266     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14267     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14268   { test "$extra_verbose" = "yes" && cat << EOF
14269     Defining $ac_tr_lib
14270 EOF
14271 cat >> confdefs.h <<EOF
14272 #define $ac_tr_lib 1
14273 EOF
14274 }
14275
14276   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14277
14278 else
14279   echo "$ac_t""no" 1>&6
14280 fi
14281
14282
14283   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14284     Defining HAVE_SOCKS
14285 EOF
14286 cat >> confdefs.h <<\EOF
14287 #define HAVE_SOCKS 1
14288 EOF
14289 }
14290
14291 fi
14292
14293 if test "$usage_tracking" = "yes"; then
14294   { test "$extra_verbose" = "yes" && cat << \EOF
14295     Defining USAGE_TRACKING
14296 EOF
14297 cat >> confdefs.h <<\EOF
14298 #define USAGE_TRACKING 1
14299 EOF
14300 }
14301
14302   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14303 fi
14304
14305 if test "$with_modules" != "no"; then
14306   echo "checking for module support" 1>&6
14307 echo "configure:14308: checking for module support" >&5
14308
14309     if test "$with_msw" = "yes"; then
14310     have_dl=yes;
14311   else
14312         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14313 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14314 echo "configure:14315: checking for dlfcn.h" >&5
14315
14316 cat > conftest.$ac_ext <<EOF
14317 #line 14318 "configure"
14318 #include "confdefs.h"
14319 #include <dlfcn.h>
14320 EOF
14321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14322 { (eval echo configure:14323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14324 if test -z "$ac_err"; then
14325   rm -rf conftest*
14326   eval "ac_cv_header_$ac_safe=yes"
14327 else
14328   echo "$ac_err" >&5
14329   echo "configure: failed program was:" >&5
14330   cat conftest.$ac_ext >&5
14331   rm -rf conftest*
14332   eval "ac_cv_header_$ac_safe=no"
14333 fi
14334 rm -f conftest*
14335 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14336   echo "$ac_t""yes" 1>&6
14337   
14338       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14339 echo "configure:14340: checking for dlopen in -lc" >&5
14340       cat > conftest.$ac_ext <<EOF
14341 #line 14342 "configure"
14342 #include "confdefs.h"
14343 #include <dlfcn.h>
14344 int main() {
14345         dlopen ("", 0);
14346 ; return 0; }
14347 EOF
14348 if { (eval echo configure:14349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14349   rm -rf conftest*
14350    have_dl=yes 
14351 else
14352   echo "configure: failed program was:" >&5
14353   cat conftest.$ac_ext >&5
14354   rm -rf conftest*
14355   
14356       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14357 echo "configure:14358: checking for dlopen in -ldl" >&5
14358       ac_save_LIBS="$LIBS"
14359       LIBS="-ldl $LIBS"
14360       cat > conftest.$ac_ext <<EOF
14361 #line 14362 "configure"
14362 #include "confdefs.h"
14363 #include <dlfcn.h>
14364 int main() {
14365         dlopen ("", 0);
14366 ; return 0; }
14367 EOF
14368 if { (eval echo configure:14369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14369   rm -rf conftest*
14370    have_dl=yes 
14371 else
14372   echo "configure: failed program was:" >&5
14373   cat conftest.$ac_ext >&5
14374   rm -rf conftest*
14375   LIBS="$ac_save_LIBS"
14376 fi
14377 rm -f conftest*
14378       ac_save_LIBS=
14379 fi
14380 rm -f conftest*
14381 else
14382   echo "$ac_t""no" 1>&6
14383 fi
14384
14385     if test -n "$have_dl"; then
14386       { test "$extra_verbose" = "yes" && cat << \EOF
14387     Defining HAVE_DLOPEN
14388 EOF
14389 cat >> confdefs.h <<\EOF
14390 #define HAVE_DLOPEN 1
14391 EOF
14392 }
14393
14394     else
14395       
14396 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14397 echo "configure:14398: checking for shl_load in -ldld" >&5
14398 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14399
14400 xe_check_libs=" -ldld "
14401 cat > conftest.$ac_ext <<EOF
14402 #line 14403 "configure"
14403 #include "confdefs.h"
14404 /* Override any gcc2 internal prototype to avoid an error.  */
14405 /* We use char because int might match the return type of a gcc2
14406     builtin and then its argument prototype would still apply.  */
14407 char shl_load();
14408
14409 int main() {
14410 shl_load()
14411 ; return 0; }
14412 EOF
14413 if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14414   rm -rf conftest*
14415   eval "ac_cv_lib_$ac_lib_var=yes"
14416 else
14417   echo "configure: failed program was:" >&5
14418   cat conftest.$ac_ext >&5
14419   rm -rf conftest*
14420   eval "ac_cv_lib_$ac_lib_var=no"
14421 fi
14422 rm -f conftest*
14423 xe_check_libs=""
14424
14425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14426   echo "$ac_t""yes" 1>&6
14427   libdl=dld have_dl=yes;
14428         { test "$extra_verbose" = "yes" && cat << \EOF
14429     Defining HAVE_SHL_LOAD
14430 EOF
14431 cat >> confdefs.h <<\EOF
14432 #define HAVE_SHL_LOAD 1
14433 EOF
14434 }
14435
14436 else
14437   echo "$ac_t""no" 1>&6
14438
14439 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14440 echo "configure:14441: checking for dld_init in -ldld" >&5
14441 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14442
14443 xe_check_libs=" -ldld "
14444 cat > conftest.$ac_ext <<EOF
14445 #line 14446 "configure"
14446 #include "confdefs.h"
14447 /* Override any gcc2 internal prototype to avoid an error.  */
14448 /* We use char because int might match the return type of a gcc2
14449     builtin and then its argument prototype would still apply.  */
14450 char dld_init();
14451
14452 int main() {
14453 dld_init()
14454 ; return 0; }
14455 EOF
14456 if { (eval echo configure:14457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14457   rm -rf conftest*
14458   eval "ac_cv_lib_$ac_lib_var=yes"
14459 else
14460   echo "configure: failed program was:" >&5
14461   cat conftest.$ac_ext >&5
14462   rm -rf conftest*
14463   eval "ac_cv_lib_$ac_lib_var=no"
14464 fi
14465 rm -f conftest*
14466 xe_check_libs=""
14467
14468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14469   echo "$ac_t""yes" 1>&6
14470   libdl=dld have_dl=yes;
14471         { test "$extra_verbose" = "yes" && cat << \EOF
14472     Defining HAVE_DLD_INIT
14473 EOF
14474 cat >> confdefs.h <<\EOF
14475 #define HAVE_DLD_INIT 1
14476 EOF
14477 }
14478
14479 else
14480   echo "$ac_t""no" 1>&6
14481 fi
14482
14483
14484 fi
14485
14486
14487     fi
14488   fi 
14489   if test -n "$have_dl"; then
14490         
14491 dll_ld=
14492 dll_ldflags=
14493 dll_cflags=
14494 dll_post=
14495 dll_ldo="-o"
14496 ld_dynamic_link_flags=
14497 xehost=$canonical
14498 xealias=$internal_configuration
14499
14500 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14501 echo "configure:14502: checking how to build dynamic libraries for ${xehost}" >&5
14502 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14503 case "$xehost" in
14504 *-*-linux-gnu*) ;;
14505 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14506 esac
14507
14508 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14509 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14510 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14511
14512 case "$xehost_os" in
14513 aix3*)
14514   # AIX sometimes has problems with the GCC collect2 program.  For some
14515   # reason, if we set the COLLECT_NAMES environment variable, the problems
14516   # vanish in a puff of smoke.
14517   if test "${COLLECT_NAMES+set}" != set; then
14518     COLLECT_NAMES=
14519     export COLLECT_NAMES
14520   fi
14521   ;;
14522 esac
14523
14524 # Now see if the compiler is really GCC.
14525 if test "$GCC" = "yes"; then
14526   XEGCC=yes
14527 else
14528   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14529 echo "configure:14530: checking checking whether we are using GNU C" >&5
14530   cat > conftest.$ac_ext <<EOF
14531 #line 14532 "configure"
14532 #include "confdefs.h"
14533
14534 #ifdef __GNUC__
14535   yes;
14536 #endif
14537
14538 EOF
14539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14540   egrep "yes" >/dev/null 2>&1; then
14541   rm -rf conftest*
14542   XEGCC=yes
14543 else
14544   rm -rf conftest*
14545   XEGCC=no
14546 fi
14547 rm -f conftest*
14548
14549   echo "$ac_t""${XEGCC}" 1>&6
14550 fi
14551
14552 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14553 echo "configure:14554: checking how to produce PIC code" >&5
14554 wl=
14555
14556 can_build_shared=yes
14557 if test "$XEGCC" = yes; then
14558   wl='-Wl,'
14559
14560   case "$xehost_os" in
14561   aix[3-9]* | irix[5-9]* | osf[3-9])
14562     # PIC is the default for these OSes.
14563     ;;
14564
14565   os2*)
14566     # We can build DLLs from non-PIC.
14567     ;;
14568   amigaos*)
14569     # FIXME: we need at least 68020 code to build shared libraries, but
14570     # adding the `-m68020' flag to GCC prevents building anything better,
14571     # like `-m68040'.
14572     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14573     ;;
14574   *cygwin* | *mingw* )
14575     # PIC is the default
14576     ;;
14577   *)
14578     dll_cflags='-fPIC'
14579     ;;
14580   esac
14581 else
14582   # PORTME Check for PIC flags for the system compiler.
14583   case "$xehost_os" in
14584   hpux9* | hpux1[0-9]*)
14585     # Is there a better link_static_flag that works with the bundled CC?
14586     wl='-Wl,'
14587     dll_cflags='+Z'
14588     ;;
14589
14590   irix[5-9]*)
14591     wl='-Wl,'
14592     # PIC (with -KPIC) is the default.
14593     ;;
14594
14595   os2*)
14596     # We can build DLLs from non-PIC.
14597     ;;
14598
14599   osf[3-9]*)
14600     # All OSF/1 code is PIC.
14601     wl='-Wl,'
14602     ;;
14603
14604   aix[3-9]*)
14605     # All AIX code is PIC.
14606     wl='-Wl,'
14607     ;;
14608
14609   sco3.2v5*)
14610     dll_cflags='-belf -Kpic'
14611     wl='-Wl,'
14612     ;;
14613
14614   unixware*)
14615     dll_cflags="-KPIC"
14616     wl="-Wl,"
14617     ;;
14618
14619   sysv4*)
14620     dll_cflags="-KPIC"
14621     wl="-Wl,"
14622     ;;
14623
14624   sysv5*)
14625     dll_cflags="-KPIC"
14626     wl="-Wl,"
14627     ;;
14628
14629   solaris2*)
14630     dll_cflags='-KPIC'
14631     wl='-Wl,'
14632     ;;
14633
14634   sunos4*)
14635     dll_cflags='-PIC'
14636     wl='-Qoption ld '
14637     ;;
14638
14639   uts4*)
14640     dll_cflags='-pic'
14641     ;;
14642
14643   *)
14644     can_build_shared=no
14645     ;;
14646   esac
14647 fi
14648
14649 if test -n "$dll_cflags"; then
14650   echo "$ac_t""${dll_cflags}" 1>&6
14651
14652   # Check to make sure the dll_cflags actually works.
14653   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14654 echo "configure:14655: checking if PIC flag ${dll_cflags} really works" >&5
14655   save_CFLAGS="$CFLAGS"
14656   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14657   cat > conftest.$ac_ext <<EOF
14658 #line 14659 "configure"
14659 #include "confdefs.h"
14660
14661 int main() {
14662 int x=0;
14663 ; return 0; }
14664 EOF
14665 if { (eval echo configure:14666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14666   rm -rf conftest*
14667   
14668     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14669     # reports no error.  So, we need to grep stderr for (Bundled).
14670     if grep '(Bundled)' config.log >/dev/null; then
14671       echo "$ac_t""no" 1>&6
14672       can_build_shared=no
14673       dll_cflags=
14674     else
14675       echo "$ac_t""yes" 1>&6
14676     fi
14677 else
14678   echo "configure: failed program was:" >&5
14679   cat conftest.$ac_ext >&5
14680   rm -rf conftest*
14681   echo "$ac_t""no" 1>&6
14682     can_build_shared=no
14683     dll_cflags=
14684 fi
14685 rm -f conftest*
14686   CFLAGS="$save_CFLAGS"
14687 else
14688   echo "$ac_t""none" 1>&6
14689 fi
14690
14691 if test "$can_build_shared" = "yes"; then
14692 cc_produces_so=no
14693 xldf=
14694 xcldf=
14695 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14696 echo "configure:14697: checking if C compiler can produce shared libraries" >&5
14697 if test "$XEGCC" = yes; then
14698   xcldf="-shared"
14699   xldf="-shared"
14700 else # Not using GCC
14701   case "$xehost_os" in
14702     aix[3-9]*)
14703       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14704       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14705       ;;
14706
14707     freebsd2* | netbsd* | openbsd*)
14708       xldf="-Bshareable"
14709       xcldf="${wl}-Bshareable"
14710       ;;
14711
14712     freebsd3*)
14713       xcldf="-shared"
14714       ;;
14715
14716     hpux*)
14717       xldf="-b +s"
14718       xcldf="${wl}-b ${wl}+s"
14719       ;;
14720
14721     irix[5-9]* | osf[3-9]*)
14722       xcldf="${wl}-shared"
14723       xldf="-shared"
14724       ;;
14725
14726     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14727       xcldf="-G"
14728       xldf="-G"
14729       ;;
14730
14731     sunos4*)
14732       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14733       xldf="-assert pure-text -Bstatic"
14734       ;;
14735   esac
14736 fi # End if if we are using gcc
14737
14738 if test -n "$xcldf"; then
14739   save_LDFLAGS=$LDFLAGS
14740   save_LIBS=$LIBS
14741   save_xe_libs=$xe_libs
14742   LDFLAGS="$xcldf $LDFLAGS"
14743   LIBS=
14744   xe_libs=
14745   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14746   cat > conftest.$ac_ext <<EOF
14747 #line 14748 "configure"
14748 #include "confdefs.h"
14749
14750 int main() {
14751 int x=0;
14752 ; return 0; }
14753 EOF
14754 if { (eval echo configure:14755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14755   rm -rf conftest*
14756   cc_produces_so=yes
14757 else
14758   echo "configure: failed program was:" >&5
14759   cat conftest.$ac_ext >&5
14760   rm -rf conftest*
14761   cc_produces_so=no
14762 fi
14763 rm -f conftest*
14764   LDFLAGS=$save_LDFLAGS
14765   LIBS=$save_LIBS
14766   xe_libs=$save_xe_libs
14767   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14768 else
14769   cc_produces_so=no
14770 fi
14771 echo "$ac_t""${cc_produces_so}" 1>&6
14772
14773 LTLD=$LD
14774 if test -z "$LTLD"; then
14775   ac_prog=ld
14776   if test "$XEGCC" = yes; then
14777     # Check if gcc -print-prog-name=ld gives a path.
14778     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14779 echo "configure:14780: checking for ld used by GCC" >&5
14780     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14781     case "$ac_prog" in
14782     # Accept absolute paths.
14783     /*)
14784       if test -z "$LTLD"; then
14785 #        case "$ac_prog" in
14786 #          *gcc-lib*) LTLD="$CC"
14787 #                     ;;
14788 #          *)
14789          LTLD="$ac_prog"
14790 #                     ;;
14791 #        esac
14792       fi
14793       ;;
14794     "")
14795       # If it fails, then pretend we aren't using GCC.
14796       ac_prog=ld
14797       ;;
14798     *)
14799       # If it is relative, then search for the first ld in PATH.
14800       with_gnu_ld=unknown
14801       ;;
14802     esac
14803   else
14804     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14805 echo "configure:14806: checking for GNU ld" >&5
14806   fi
14807
14808   if test -z "$LTLD"; then
14809     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14810     for ac_dir in $PATH; do
14811       test -z "$ac_dir" && ac_dir=.
14812       if test -f "$ac_dir/$ac_prog"; then
14813         LTLD="$ac_dir/$ac_prog"
14814         # Check to see if the program is GNU ld.  I'd rather use --version,
14815         # but apparently some GNU ld's only accept -v.
14816         # Break only if it was the GNU/non-GNU ld that we prefer.
14817         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14818           xe_gnu_ld=yes
14819         else
14820           xe_gnu_ld=no
14821         fi
14822       fi
14823     done
14824     IFS="$ac_save_ifs"
14825   fi
14826
14827   if test -n "$LTLD"; then
14828     echo "$ac_t""${LTLD}" 1>&6
14829   else
14830     echo "$ac_t""no" 1>&6
14831   fi
14832
14833   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14834     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14835     exit 1
14836   fi
14837 fi
14838
14839 ld_dynamic_link_flags=
14840
14841 # Check to see if it really is or isn't GNU ld.
14842 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14843 echo "configure:14844: checking if the linker is GNU ld" >&5
14844 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14845 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14846   xe_gnu_ld=yes
14847 else
14848   xe_gnu_ld=no
14849 fi
14850 echo "$ac_t""${xe_gnu_ld}" 1>&6
14851
14852 case "$xehost_os" in
14853   amigaos* | sunos4*)
14854     # On these operating systems, we should treat GNU ld like the system ld.
14855     gnu_ld_acts_native=yes
14856     ;;
14857   *)
14858     gnu_ld_acts_native=no
14859     ;;
14860 esac
14861
14862 if test "$cc_produces_so" = "yes"; then
14863   dll_ld=$CC
14864   dll_ldflags=$xcldf
14865   can_build_shared=yes
14866   ld_shlibs=yes
14867 else
14868   # OK - only NOW do we futz about with ld.
14869   # See if the linker supports building shared libraries.
14870   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14871 echo "configure:14872: checking whether the linker supports shared libraries" >&5
14872   dll_ld=$CC
14873   dll_ldflags=$LDFLAGS
14874   ld_shlibs=yes
14875   can_build_shared=yes
14876   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14877     # See if GNU ld supports shared libraries.
14878     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14879       dll_ld=$CC
14880       dll_ldflags="-shared"
14881       ld_shlibs=yes
14882     else
14883       ld_shlibs=no
14884     fi
14885   else
14886     # PORTME fill in a description of your system's linker (not GNU ld)
14887     case "$xehost_os" in
14888     aix3*)
14889       dll_ld=$LTLD
14890       dll_ldflags=$xldf
14891       ;;
14892
14893     aix[4-9]*)
14894       dll_ldflags=$xcldf
14895       ;;
14896
14897     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14898     # support.  Future versions do this automatically, but an explicit c++rt0.o
14899     # doesn't break anything, and helps significantly (at the cost of a little
14900     # extra space).
14901     freebsd2.2*)
14902       dll_ld=$LTLD
14903       dll_ldflags=$xldf
14904       dll_post="/usr/lib/c++rt0.o"
14905       ;;
14906
14907     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14908     freebsd2*)
14909       dll_ld=$LTLD
14910       dll_ldflags="-Bshareable"
14911       ;;
14912
14913     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14914     freebsd3*)
14915       dll_ldflags="-shared"
14916       ;;
14917
14918     hpux*)
14919       dll_ld=$LTLD
14920       dll_ldflags=$xldf
14921       ;;
14922
14923     irix[5-9]*)
14924       dll_ld=$LTLD
14925       dll_ldflags=$xldf
14926       ;;
14927
14928     netbsd*)
14929       # Tested with NetBSD 1.2 ld
14930       dll_ld=$LTLD
14931       dll_ldflags=$xldf
14932       ;;
14933
14934     openbsd*)
14935       dll_ld=$LTLD
14936       dll_ldflags=$xldf
14937       ;;
14938
14939     osf3* | osf4*)
14940       dll_ld=$LTLD
14941       dll_ldflags=$xldf
14942       ;;
14943
14944     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14945     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14946       dll_ld=$LTLD
14947       case "$dll_ld" in
14948         *gcc*) dll_ldflags="-shared"
14949                dll_ld=$CC
14950                ;;
14951         *)     dll_ldflags="-G"
14952                ;;
14953       esac
14954       ;;
14955
14956     sunos4*)
14957       if test "$XEGCC" = yes; then
14958         dll_ld=$CC
14959       else
14960         dll_ld=$LTLD
14961       fi
14962       dll_ldflags=$xldf
14963       ;;
14964
14965     uts4*)
14966       dll_ld=$LTLD
14967       dll_ldflags="-G"
14968       ;;
14969
14970     bsdi*)
14971       dll_ldflags="-r"
14972       dll_ld="shlicc2"
14973       ;;
14974
14975     *)
14976       ld_shlibs=no
14977       can_build_shared=no
14978       ;;
14979     esac
14980   fi
14981   echo "$ac_t""${ld_shlibs}" 1>&6
14982   if test "$ld_shlibs" = "no"; then
14983     can_build_shared=no
14984   fi
14985 fi # End of if cc_produces_so = no
14986
14987
14988 if test "$xe_gnu_ld" = yes; then
14989   if test "$ld_shlibs" = yes; then
14990     ld_dynamic_link_flags="${wl}-export-dynamic"
14991   fi
14992 fi
14993
14994 if test -z "$ld_dynamic_link_flags"; then
14995   case "$xehost_os" in
14996   aix[3-9]*)
14997     ld_dynamic_link_flags=
14998     ;;
14999
15000   freebsd2.2*)
15001     ld_dynamic_link_flags=
15002     ;;
15003
15004   freebsd2*)
15005     ld_dynamic_link_flags=
15006     ;;
15007
15008   freebsd3*)
15009     ld_dynamic_link_flags=
15010     ;;
15011
15012   hpux*)
15013     ld_dynamic_link_flags="${wl}-E"
15014     ;;
15015
15016   irix[5-9]*)
15017     ld_dynamic_link_flags=
15018     ;;
15019
15020   netbsd*)
15021     ld_dynamic_link_flags=
15022     ;;
15023
15024   openbsd*)
15025     ld_dynamic_link_flags=
15026     ;;
15027
15028   osf3* | osf4*)
15029     ld_dynamic_link_flags=
15030     ;;
15031
15032   solaris2* | solaris7*)
15033     ld_dynamic_link_flags=
15034     ;;
15035
15036   sco3.2v5* | unixware* | sysv5* | sysv4*)
15037     ld_dynamic_link_flags="${wl}-Bexport"
15038     ;;
15039
15040   sunos4*)
15041     ld_dynamic_link_flags=
15042     ;;
15043
15044   uts4*)
15045     ld_dynamic_link_flags=
15046     ;;
15047
15048   bsdi*)
15049     ld_dynamic_link_flags=
15050     ;;
15051
15052   esac
15053 fi # End of if -z ld_dynamic_link_flags
15054 fi # End of if test "$can_build_shared" = "yes"
15055
15056
15057
15058
15059
15060
15061
15062
15063   fi
15064
15065   if test "$can_build_shared" = "yes"; then
15066     { test "$extra_verbose" = "yes" && cat << \EOF
15067     Defining HAVE_SHLIB
15068 EOF
15069 cat >> confdefs.h <<\EOF
15070 #define HAVE_SHLIB 1
15071 EOF
15072 }
15073
15074     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15075    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15076  fi
15077     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15078     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15079     for ac_func in dlerror _dlerror
15080 do
15081 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15082 echo "configure:15083: checking for $ac_func" >&5
15083
15084 cat > conftest.$ac_ext <<EOF
15085 #line 15086 "configure"
15086 #include "confdefs.h"
15087 /* System header to define __stub macros and hopefully few prototypes,
15088     which can conflict with char $ac_func(); below.  */
15089 #include <assert.h>
15090 /* Override any gcc2 internal prototype to avoid an error.  */
15091 /* We use char because int might match the return type of a gcc2
15092     builtin and then its argument prototype would still apply.  */
15093 char $ac_func();
15094
15095 int main() {
15096
15097 /* The GNU C library defines this for functions which it implements
15098     to always fail with ENOSYS.  Some functions are actually named
15099     something starting with __ and the normal name is an alias.  */
15100 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15101 choke me
15102 #else
15103 $ac_func();
15104 #endif
15105
15106 ; return 0; }
15107 EOF
15108 if { (eval echo configure:15109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15109   rm -rf conftest*
15110   eval "ac_cv_func_$ac_func=yes"
15111 else
15112   echo "configure: failed program was:" >&5
15113   cat conftest.$ac_ext >&5
15114   rm -rf conftest*
15115   eval "ac_cv_func_$ac_func=no"
15116 fi
15117 rm -f conftest*
15118
15119 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15120   echo "$ac_t""yes" 1>&6
15121     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15122   { test "$extra_verbose" = "yes" && cat << EOF
15123     Defining $ac_tr_func
15124 EOF
15125 cat >> confdefs.h <<EOF
15126 #define $ac_tr_func 1
15127 EOF
15128 }
15129  
15130 else
15131   echo "$ac_t""no" 1>&6
15132 fi
15133 done
15134
15135     with_modules=yes
15136   else
15137     if test "$with_modules" = "yes"; then
15138       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15139     else
15140       echo "configure: warning: "Module support cannot be provided."" 1>&2
15141     fi
15142     with_modules=no
15143   fi
15144 fi
15145
15146 cat > conftest.$ac_ext <<EOF
15147 #line 15148 "configure"
15148 #include "confdefs.h"
15149 int main(int c,char *v[]){return 0;}
15150 EOF
15151 if { (eval echo configure:15152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15152 then
15153   :
15154 else
15155   conftest_rc="$?"
15156   echo "configure: failed program was:" >&5
15157   cat conftest.$ac_ext >&5
15158   rm -fr conftest*
15159   
15160   echo ""
15161   echo "*** PANIC *** configure forgot how to build working executables!"
15162   echo ""
15163   echo "*** This is most commonly due to an unforeseen environment, causing"
15164   echo "*** configure to incorrectly compute the sequence of libraries to link."
15165   echo "*** Please examine the tail of config.log for runtime errors."
15166   echo "*** Pay special attention to the -l flags, and perhaps -I and -L."
15167   echo "*** Often adding or removing explicit options in the configure"
15168   echo "*** invocation can work around this kind of problem.  If so, please"
15169   echo "*** report it as a bug to xemacs-beta@xemacs.org."
15170   echo "***"
15171   echo "*** Other possible causes are inability to write to the file system"
15172   echo "*** (bogus permissions or disk full) or a misconfiguration of the dynamic"
15173   echo "*** linker.  On Linux, check /etc/ld.conf and rerun ldconfig if"
15174   echo "*** necessary.  On other systems, try telling configure where to find"
15175   echo "*** the shared libraries using the --site-runtime-libraries option."
15176   echo "***"
15177   echo "*** Another way to shoot yourself in the foot is to specify"
15178   echo "*** --with-FEATURE when FEATURE is not actually installed on your"
15179   echo "*** system.  Don't do that."
15180   exit 1
15181 fi
15182 rm -fr conftest*
15183
15184 if test "$win32_processes" = "yes"; then
15185   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15186    echo "    xemacs will be linked with \"process-nt.o\""
15187  fi
15188 else
15189   { test "$extra_verbose" = "yes" && cat << \EOF
15190     Defining HAVE_UNIX_PROCESSES
15191 EOF
15192 cat >> confdefs.h <<\EOF
15193 #define HAVE_UNIX_PROCESSES 1
15194 EOF
15195 }
15196
15197   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15198    echo "    xemacs will be linked with \"process-unix.o\""
15199  fi
15200 fi
15201
15202
15203
15204 T=""
15205 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15206 CFLAGS="$T"
15207
15208
15209 T=""
15210 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15211 extra_objs="$T"
15212
15213
15214 T=""
15215 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
15216 c_switch_general="$T"
15217
15218
15219 T=""
15220 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
15221 c_switch_window_system="$T"
15222
15223
15224 T=""
15225 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15226 c_switch_all="$T"
15227
15228
15229 T=""
15230 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
15231 ld_switch_general="$T"
15232
15233
15234 T=""
15235 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15236 ld_switch_window_system="$T"
15237
15238
15239 T=""
15240 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15241 ld_switch_all="$T"
15242
15243
15244 T=""
15245 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15246 ld_libs_general="$T"
15247
15248
15249 T=""
15250 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
15251 ld_libs_window_system="$T"
15252
15253
15254 T=""
15255 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15256 ld_libs_all="$T"
15257
15258
15259
15260 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15261 internal_makefile_list="Makefile.in"
15262 SUBDIR_MAKEFILES=''
15263 test -d lock || mkdir lock
15264 for dir in $MAKE_SUBDIR; do
15265   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15266         test -d "$d" || mkdir "$d"; cd "$d"
15267       done ) ;;
15268    * ) test -d "$dir" || mkdir "$dir" ;;
15269   esac
15270   
15271 T=""
15272 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15273 SUBDIR_MAKEFILES="$T"
15274
15275   
15276 T=""
15277 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15278 internal_makefile_list="$T"
15279
15280 done
15281
15282
15283
15284
15285 for dir in src/s src/m; do
15286   if test ! -d "$dir" ; then
15287     echo Making symbolic link to "$srcdir/$dir"
15288     ${LN_S} "$srcdir/$dir" "$dir"
15289   fi
15290 done
15291
15292 if test "$extra_verbose" = "yes"; then
15293   echo ""
15294   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
15295   echo ""
15296 fi
15297
15298
15299 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15300   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15301   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15302 fi
15303
15304 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15305   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15306   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15307 fi
15308
15309 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15310   test "$extra_verbose" = "yes" && echo "creating TAGS"
15311   echo "\f
15312 $srcdir/TAGS,include" > "TAGS"
15313 fi
15314
15315 if test "$__SUNPRO_C" = "yes"; then
15316   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15317   ( echo "# For use with Sun WorkShop's Source browser."
15318     echo "# See sbquery(1) and sbinit(4) for more information"
15319     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15320   ) > .sbinit
15321 fi
15322
15323 rm -f core
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344 PREFIX=$prefix
15345 while true; do
15346   case "$PREFIX" in
15347     *\$* ) eval "PREFIX=$PREFIX" ;;
15348     *) break ;;
15349   esac
15350 done
15351
15352
15353
15354
15355 EXEC_PREFIX=$exec_prefix
15356 while true; do
15357   case "$EXEC_PREFIX" in
15358     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15359     *) break ;;
15360   esac
15361 done
15362
15363
15364
15365
15366 INFODIR=$infodir
15367 while true; do
15368   case "$INFODIR" in
15369     *\$* ) eval "INFODIR=$INFODIR" ;;
15370     *) break ;;
15371   esac
15372 done
15373
15374
15375
15376
15377 INFOPATH=$infopath
15378 while true; do
15379   case "$INFOPATH" in
15380     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15381     *) break ;;
15382   esac
15383 done
15384
15385
15386
15387
15388 PACKAGE_PATH=$package_path
15389 while true; do
15390   case "$PACKAGE_PATH" in
15391     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15392     *) break ;;
15393   esac
15394 done
15395
15396
15397
15398
15399 LISPDIR=$lispdir
15400 while true; do
15401   case "$LISPDIR" in
15402     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15403     *) break ;;
15404   esac
15405 done
15406
15407
15408
15409
15410 MODULEDIR=$moduledir
15411 while true; do
15412   case "$MODULEDIR" in
15413     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15414     *) break ;;
15415   esac
15416 done
15417
15418
15419
15420
15421 SITELISPDIR=$sitelispdir
15422 while true; do
15423   case "$SITELISPDIR" in
15424     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15425     *) break ;;
15426   esac
15427 done
15428
15429
15430
15431
15432 SITEMODULEDIR=$sitemoduledir
15433 while true; do
15434   case "$SITEMODULEDIR" in
15435     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15436     *) break ;;
15437   esac
15438 done
15439
15440
15441
15442
15443 ETCDIR=$etcdir
15444 while true; do
15445   case "$ETCDIR" in
15446     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15447     *) break ;;
15448   esac
15449 done
15450
15451
15452
15453
15454 DOCDIR=$docdir
15455 while true; do
15456   case "$DOCDIR" in
15457     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15458     *) break ;;
15459   esac
15460 done
15461
15462
15463
15464
15465 ARCHLIBDIR=$archlibdir
15466 while true; do
15467   case "$ARCHLIBDIR" in
15468     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15469     *) break ;;
15470   esac
15471 done
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15493
15494
15495
15496
15497
15498
15499
15500 : ${XEMACS_CC:=$CC}
15501
15502
15503 if test "$with_prefix" = "yes"; then
15504   { test "$extra_verbose" = "yes" && cat << \EOF
15505     Defining PREFIX_USER_DEFINED
15506 EOF
15507 cat >> confdefs.h <<\EOF
15508 #define PREFIX_USER_DEFINED 1
15509 EOF
15510 }
15511
15512 fi
15513
15514 if test "$with_site_lisp" = "no"; then
15515   { test "$extra_verbose" = "yes" && cat << \EOF
15516     Defining INHIBIT_SITE_LISP
15517 EOF
15518 cat >> confdefs.h <<\EOF
15519 #define INHIBIT_SITE_LISP 1
15520 EOF
15521 }
15522
15523 fi
15524 if test "$with_site_modules" = "no"; then
15525   { test "$extra_verbose" = "yes" && cat << \EOF
15526     Defining INHIBIT_SITE_MODULES
15527 EOF
15528 cat >> confdefs.h <<\EOF
15529 #define INHIBIT_SITE_MODULES 1
15530 EOF
15531 }
15532
15533 fi
15534
15535
15536 T=""
15537 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15538 ac_configure_args="$T"
15539
15540 { test "$extra_verbose" = "yes" && cat << EOF
15541     Defining EMACS_CONFIGURATION = "$configuration"
15542 EOF
15543 cat >> confdefs.h <<EOF
15544 #define EMACS_CONFIGURATION "$configuration"
15545 EOF
15546 }
15547
15548 { test "$extra_verbose" = "yes" && cat << EOF
15549     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15550 EOF
15551 cat >> confdefs.h <<EOF
15552 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15553 EOF
15554 }
15555
15556
15557
15558 null_string=""
15559 { test "$extra_verbose" = "yes" && cat << EOF
15560     Defining LD_SWITCH_X_SITE = $null_string
15561 EOF
15562 cat >> confdefs.h <<EOF
15563 #define LD_SWITCH_X_SITE $null_string
15564 EOF
15565 }
15566
15567 { test "$extra_verbose" = "yes" && cat << EOF
15568     Defining LD_SWITCH_X_SITE_AUX = $null_string
15569 EOF
15570 cat >> confdefs.h <<EOF
15571 #define LD_SWITCH_X_SITE_AUX $null_string
15572 EOF
15573 }
15574
15575 { test "$extra_verbose" = "yes" && cat << EOF
15576     Defining C_SWITCH_X_SITE = $null_string
15577 EOF
15578 cat >> confdefs.h <<EOF
15579 #define C_SWITCH_X_SITE $null_string
15580 EOF
15581 }
15582
15583 { test "$extra_verbose" = "yes" && cat << EOF
15584     Defining LD_SWITCH_SITE = $null_string
15585 EOF
15586 cat >> confdefs.h <<EOF
15587 #define LD_SWITCH_SITE $null_string
15588 EOF
15589 }
15590
15591 { test "$extra_verbose" = "yes" && cat << EOF
15592     Defining C_SWITCH_SITE = $null_string
15593 EOF
15594 cat >> confdefs.h <<EOF
15595 #define C_SWITCH_SITE $null_string
15596 EOF
15597 }
15598
15599
15600
15601 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15602     Defining GNU_MALLOC
15603 EOF
15604 cat >> confdefs.h <<\EOF
15605 #define GNU_MALLOC 1
15606 EOF
15607 }
15608
15609 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15610     Defining USE_SYSTEM_MALLOC
15611 EOF
15612 cat >> confdefs.h <<\EOF
15613 #define USE_SYSTEM_MALLOC 1
15614 EOF
15615 }
15616
15617 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15618     Defining USE_DEBUG_MALLOC
15619 EOF
15620 cat >> confdefs.h <<\EOF
15621 #define USE_DEBUG_MALLOC 1
15622 EOF
15623 }
15624
15625                                               { test "$extra_verbose" = "yes" && cat << \EOF
15626     Defining USE_SYSTEM_MALLOC
15627 EOF
15628 cat >> confdefs.h <<\EOF
15629 #define USE_SYSTEM_MALLOC 1
15630 EOF
15631 }
15632
15633 fi
15634 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15635     Defining I18N3
15636 EOF
15637 cat >> confdefs.h <<\EOF
15638 #define I18N3 1
15639 EOF
15640 }
15641
15642 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15643     Defining USE_GCC
15644 EOF
15645 cat >> confdefs.h <<\EOF
15646 #define USE_GCC 1
15647 EOF
15648 }
15649
15650 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15651     Defining EXTERNAL_WIDGET
15652 EOF
15653 cat >> confdefs.h <<\EOF
15654 #define EXTERNAL_WIDGET 1
15655 EOF
15656 }
15657
15658 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15659     Defining QUICK_BUILD
15660 EOF
15661 cat >> confdefs.h <<\EOF
15662 #define QUICK_BUILD 1
15663 EOF
15664 }
15665
15666 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15667     Defining PURIFY
15668 EOF
15669 cat >> confdefs.h <<\EOF
15670 #define PURIFY 1
15671 EOF
15672 }
15673
15674 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15675     Defining QUANTIFY
15676 EOF
15677 cat >> confdefs.h <<\EOF
15678 #define QUANTIFY 1
15679 EOF
15680 }
15681
15682 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15683     Defining MAIL_USE_POP
15684 EOF
15685 cat >> confdefs.h <<\EOF
15686 #define MAIL_USE_POP 1
15687 EOF
15688 }
15689
15690 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15691     Defining KERBEROS
15692 EOF
15693 cat >> confdefs.h <<\EOF
15694 #define KERBEROS 1
15695 EOF
15696 }
15697
15698 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15699     Defining HESIOD
15700 EOF
15701 cat >> confdefs.h <<\EOF
15702 #define HESIOD 1
15703 EOF
15704 }
15705
15706 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15707     Defining USE_UNION_TYPE
15708 EOF
15709 cat >> confdefs.h <<\EOF
15710 #define USE_UNION_TYPE 1
15711 EOF
15712 }
15713
15714 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15715     Defining PDUMP
15716 EOF
15717 cat >> confdefs.h <<\EOF
15718 #define PDUMP 1
15719 EOF
15720 }
15721
15722 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15723     Defining IPV6_CANONICALIZE
15724 EOF
15725 cat >> confdefs.h <<\EOF
15726 #define IPV6_CANONICALIZE 1
15727 EOF
15728 }
15729
15730
15731
15732 (
15733 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15734 else
15735   echo "uname -a: `uname -a`"
15736 fi
15737 echo ""
15738 echo "$0 $quoted_arguments"
15739 ) > Installation
15740
15741 if test ! -z ${emacs_beta_version} ; then
15742   if test -z "${emacs_is_beta}" ; then
15743         xemacs_betaname=".${emacs_beta_version}"
15744   else
15745         xemacs_betaname="-b${emacs_beta_version}"
15746   fi
15747 else
15748   xemacs_betaname=""
15749 fi
15750
15751 (
15752 echo "
15753
15754 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15755 "
15756 echo "
15757 Compilation / Installation:"
15758 echo "  Source code location:              $srcdir"
15759 echo "  Installation prefix:               $prefix"
15760 if test -n "$site_includes"; then
15761   echo "  Additional header files:           $site_includes"
15762 fi
15763 if test -n "$site_libraries"; then
15764   echo "  Additional libraries:              $site_libraries"
15765 fi
15766 if test -n "$site_prefixes"; then
15767   echo "  Additional prefixes:               $site_prefixes"
15768 fi
15769 if test -n "$runpath"; then
15770   echo "  Runtime library search path:       $runpath"
15771 fi
15772
15773 if test -n "$opsysfile"
15774 then echo "  Operating system description file: \`$opsysfile'"
15775 else echo "  Not using any operating system description file"
15776 fi
15777 if test -n "$machfile"
15778 then echo "  Machine description file:          \`$machfile'"
15779 else echo "  Not using any machine description file"
15780 fi
15781
15782 echo "  Compiler:                          $CC $CFLAGS"
15783 echo "  Relocating allocator for buffers:  $rel_alloc"
15784 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15785 case "$ld_switch_site" in
15786   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15787     - Consider configuring with --pdump." ;;
15788 esac
15789
15790 echo "
15791 Window System:"
15792 if test "$with_msw" = "yes"; then
15793   echo "  Compiling in support for the Microsoft window system."
15794 fi
15795 if test "$with_x11" = "yes"; then
15796   echo "  Compiling in support for the X window system:"
15797   echo "    - X Windows headers location:                 $x_includes"
15798   echo "    - X Windows libraries location:               $x_libraries"
15799   if test "$with_xauth" != yes; then
15800     echo "    - Xau (X authority) not available."
15801   fi
15802   if test "$with_xmu" != yes; then
15803     echo "    - Xmu library not available; substituting equivalent routines."
15804   fi
15805   if test "$with_wmcommand" != no; then
15806     echo "    - Handling WM_COMMAND properly."
15807   fi
15808 fi
15809 if test "$need_athena" = "yes"; then
15810   echo "  Compiling in support for the Athena widget set:"
15811   echo "    - Athena headers location:                    $athena_h_path"
15812   echo "    - Athena library to link:                     $athena_lib"
15813 fi
15814 case "$with_menubars" in
15815   gtk   ) echo "  Using GTK menubars."   ;;
15816   lucid ) echo "  Using Lucid menubars." ;;
15817   motif ) echo "  Using Motif menubars."
15818           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15819           echo "             We recommend using the Lucid menubar instead."
15820           echo "             Re-run configure with --with-menubars='lucid'." ;;
15821     msw ) echo "  Using MS-Windows menubars." ;;
15822 esac
15823 case "$with_scrollbars" in
15824   gtk    ) echo "  Using GTK scrollbars."        ;;
15825   lucid  ) echo "  Using Lucid scrollbars."      ;;
15826   motif  ) echo "  Using Motif scrollbars."      ;;
15827   athena ) echo "  Using Athena scrollbars."     ;;
15828      msw ) echo "  Using MS-Windows scrollbars." ;;
15829 esac
15830 case "$with_dialogs" in
15831   gtk    ) echo "  Using GTK dialog boxes." ;;
15832   motif  ) echo "  Using Motif dialog boxes."
15833            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15834              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15835              echo "             We recommend using the Athena dialog boxes instead."
15836              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15837              echo "             Read the PROBLEMS file for more information."
15838            fi; fi ;;
15839   athena ) echo "  Using Athena dialog boxes."     ;;
15840      msw ) echo "  Using MS-Windows dialog boxes." ;;
15841 esac
15842 case "$with_widgets" in
15843   gtk    ) echo "  Using GTK native widgets."        ;;
15844   motif  ) echo "  Using Motif native widgets."      ;;
15845   athena ) echo "  Using Athena native widgets."     ;;
15846      msw ) echo "  Using MS-Windows native widgets." ;;
15847 esac
15848 if test "$with_dragndrop" = yes; then
15849   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15850   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15851 fi
15852
15853 echo "
15854 TTY:"
15855 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15856 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15857
15858 echo "
15859 Images:"
15860 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15861 if test "$with_xpm" = yes; then
15862   echo "  Compiling in support for XPM  images."
15863 elif test "$with_x11" = yes; then
15864   echo "  WARNING: -----------------------------------------------------------"
15865   echo "  WARNING: Compiling without XPM image support."
15866   if test "$xpm_problem" != ""; then
15867     echo "  Reason: $xpm_problem"
15868   fi
15869   echo "  WARNING: You should strongly consider installing XPM."
15870   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15871   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15872   echo "  WARNING: -----------------------------------------------------------"
15873 fi
15874 if test "$with_png" = yes; then
15875   echo "  Compiling in support for PNG  images."
15876 elif test "$window_system" != "none"; then
15877   echo "  WARNING: -----------------------------------------------------------"
15878   echo "  WARNING: Compiling without PNG image support."
15879   if test "$png_problem" != ""; then
15880     echo "  Reason: $png_problem"
15881   fi
15882   echo "  WARNING: You should strongly consider installing the PNG libraries."
15883   echo "  WARNING: Otherwise certain images and glyphs may not display."
15884   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15885   echo "  WARNING: -----------------------------------------------------------"
15886 fi
15887 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15888 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15889 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15890
15891 echo "
15892 Sound:"
15893 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15894 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15895 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15896 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15897
15898 echo "
15899 Databases:"
15900 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15901 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15902 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15903 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15904 if test "$with_postgresql" = yes; then
15905   echo "  Compiling in support for PostgreSQL."
15906   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15907   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15908 fi
15909
15910 echo "
15911 Internationalization:"
15912 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15913 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15914 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15915 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15916 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15917 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15918 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15919 if test "$with_wnn" = yes; then
15920   echo "  Compiling in support for the WNN input method on Mule."
15921   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15922 fi
15923 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15924
15925 echo "
15926 Mail:"
15927 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15928 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15929 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15930 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15931
15932 echo "
15933 Other Features:"
15934 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15935 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15936 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15937 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15938 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15939 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15940 if test "$use_union_type" = yes; then
15941   echo "  WARNING: ---------------------------------------------------------"
15942   echo "  Using the union type for Lisp_Objects."
15943   echo "  Union type has been implicated in hard-to-debug runtime crashes."
15944   echo "  Do NOT use this build of XEmacs for ordinary work.  See PROBLEMS."
15945   echo "  WARNING: ---------------------------------------------------------"
15946 fi
15947 test "$pdump" = yes && echo "  Using the new portable dumper."
15948 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15949 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15950 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15951   != "no no no no no no"; then
15952   echo "  WARNING: ---------------------------------------------------------"
15953   echo "  WARNING: Compiling in support for runtime error checking."
15954   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15955   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15956   echo "  WARNING: ---------------------------------------------------------"
15957 fi
15958 echo ""
15959 ) | tee -a Installation
15960 echo ""
15961
15962
15963 # Remove any trailing slashes in these variables.
15964 test -n "$prefix" &&
15965   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15966 test -n "$exec_prefix" &&
15967   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15968
15969
15970 for file in $internal_makefile_list; do
15971   test "$file" = src/Makefile.in && \
15972     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15973   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15974 done
15975 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15976 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
15977
15978 trap '' 1 2 15
15979
15980 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15981
15982 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15983 # Let make expand exec_prefix.
15984 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15985
15986 # Any assignment to VPATH causes Sun make to only execute
15987 # the first set of double-colon rules, so remove it if not needed.
15988 # If there is a colon in the path, we need to keep it.
15989 if test "x$srcdir" = x.; then
15990   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15991 fi
15992
15993 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15994
15995 DEFS=-DHAVE_CONFIG_H
15996
15997 # Without the "./", some shells look in PATH for config.status.
15998 : ${CONFIG_STATUS=./config.status}
15999
16000 echo creating $CONFIG_STATUS
16001 rm -f $CONFIG_STATUS
16002 cat > $CONFIG_STATUS <<EOF
16003 #! /bin/sh
16004 # Generated automatically by configure.
16005 # Run this file to recreate the current configuration.
16006 # This directory was configured as follows,
16007 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
16008 #
16009 # $0 $ac_configure_args
16010 #
16011 # Compiler output produced by configure, useful for debugging
16012 # configure, is in ./config.log if it exists.
16013
16014 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
16015 for ac_option
16016 do
16017   case "\$ac_option" in
16018   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16019     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16020     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16021   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16022     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16023     exit 0 ;;
16024   -help | --help | --hel | --he | --h)
16025     echo "\$ac_cs_usage"; exit 0 ;;
16026   *) echo "\$ac_cs_usage"; exit 1 ;;
16027   esac
16028 done
16029
16030 ac_given_srcdir=$srcdir
16031 ac_given_INSTALL="$INSTALL"
16032
16033 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16034 EOF
16035 cat >> $CONFIG_STATUS <<EOF
16036
16037 # Protect against being on the right side of a sed subst in config.status.
16038 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16039  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16040 $ac_vpsub
16041 $extrasub
16042 s%@SHELL@%$SHELL%g
16043 s%@CFLAGS@%$CFLAGS%g
16044 s%@CPPFLAGS@%$CPPFLAGS%g
16045 s%@CXXFLAGS@%$CXXFLAGS%g
16046 s%@FFLAGS@%$FFLAGS%g
16047 s%@DEFS@%$DEFS%g
16048 s%@LDFLAGS@%$LDFLAGS%g
16049 s%@LIBS@%$LIBS%g
16050 s%@exec_prefix@%$exec_prefix%g
16051 s%@prefix@%$prefix%g
16052 s%@program_transform_name@%$program_transform_name%g
16053 s%@bindir@%$bindir%g
16054 s%@sbindir@%$sbindir%g
16055 s%@libexecdir@%$libexecdir%g
16056 s%@datadir@%$datadir%g
16057 s%@sysconfdir@%$sysconfdir%g
16058 s%@sharedstatedir@%$sharedstatedir%g
16059 s%@localstatedir@%$localstatedir%g
16060 s%@libdir@%$libdir%g
16061 s%@includedir@%$includedir%g
16062 s%@oldincludedir@%$oldincludedir%g
16063 s%@infodir@%$infodir%g
16064 s%@mandir@%$mandir%g
16065 s%@LN_S@%$LN_S%g
16066 s%@blddir@%$blddir%g
16067 s%@CC@%$CC%g
16068 s%@CPP@%$CPP%g
16069 s%@start_flags@%$start_flags%g
16070 s%@ld_switch_shared@%$ld_switch_shared%g
16071 s%@start_files@%$start_files%g
16072 s%@ld@%$ld%g
16073 s%@lib_gcc@%$lib_gcc%g
16074 s%@RANLIB@%$RANLIB%g
16075 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16076 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16077 s%@INSTALL_DATA@%$INSTALL_DATA%g
16078 s%@YACC@%$YACC%g
16079 s%@SET_MAKE@%$SET_MAKE%g
16080 s%@GTK_CONFIG@%$GTK_CONFIG%g
16081 s%@X_CFLAGS@%$X_CFLAGS%g
16082 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16083 s%@X_LIBS@%$X_LIBS%g
16084 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16085 s%@install_pp@%$install_pp%g
16086 s%@libs_xauth@%$libs_xauth%g
16087 s%@dnd_objs@%$dnd_objs%g
16088 s%@lwlib_objs@%$lwlib_objs%g
16089 s%@ALLOCA@%$ALLOCA%g
16090 s%@have_esd_config@%$have_esd_config%g
16091 s%@dll_ld@%$dll_ld%g
16092 s%@dll_cflags@%$dll_cflags%g
16093 s%@dll_ldflags@%$dll_ldflags%g
16094 s%@dll_post@%$dll_post%g
16095 s%@dll_ldo@%$dll_ldo%g
16096 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16097 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16098 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16099 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16100 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16101 s%@PROGNAME@%$PROGNAME%g
16102 s%@version@%$version%g
16103 s%@configuration@%$configuration%g
16104 s%@canonical@%$canonical%g
16105 s%@inststaticdir@%$inststaticdir%g
16106 s%@instvardir@%$instvardir%g
16107 s%@srcdir@%$srcdir%g
16108 s%@pkgdir@%$pkgdir%g
16109 s%@statedir@%$statedir%g
16110 s%@extra_includes@%$extra_includes%g
16111 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16112 s%@PREFIX@%$PREFIX%g
16113 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16114 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16115 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16116 s%@INFODIR@%$INFODIR%g
16117 s%@infopath@%$infopath%g
16118 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16119 s%@INFOPATH@%$INFOPATH%g
16120 s%@package_path@%$package_path%g
16121 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16122 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16123 s%@lispdir@%$lispdir%g
16124 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16125 s%@LISPDIR@%$LISPDIR%g
16126 s%@moduledir@%$moduledir%g
16127 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16128 s%@MODULEDIR@%$MODULEDIR%g
16129 s%@sitelispdir@%$sitelispdir%g
16130 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16131 s%@SITELISPDIR@%$SITELISPDIR%g
16132 s%@sitemoduledir@%$sitemoduledir%g
16133 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16134 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16135 s%@etcdir@%$etcdir%g
16136 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16137 s%@ETCDIR@%$ETCDIR%g
16138 s%@docdir@%$docdir%g
16139 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16140 s%@DOCDIR@%$DOCDIR%g
16141 s%@archlibdir@%$archlibdir%g
16142 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16143 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16144 s%@bitmapdir@%$bitmapdir%g
16145 s%@extra_objs@%$extra_objs%g
16146 s%@machfile@%$machfile%g
16147 s%@opsysfile@%$opsysfile%g
16148 s%@c_switch_general@%$c_switch_general%g
16149 s%@c_switch_window_system@%$c_switch_window_system%g
16150 s%@c_switch_all@%$c_switch_all%g
16151 s%@ld_switch_general@%$ld_switch_general%g
16152 s%@ld_switch_window_system@%$ld_switch_window_system%g
16153 s%@ld_switch_all@%$ld_switch_all%g
16154 s%@ld_libs_general@%$ld_libs_general%g
16155 s%@ld_libs_window_system@%$ld_libs_window_system%g
16156 s%@ld_libs_all@%$ld_libs_all%g
16157 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16158 s%@native_sound_lib@%$native_sound_lib%g
16159 s%@sound_cflags@%$sound_cflags%g
16160 s%@dynodump_arch@%$dynodump_arch%g
16161 s%@XEMACS_CC@%$XEMACS_CC%g
16162 s%@internal_makefile_list@%$internal_makefile_list%g
16163
16164 CEOF
16165 EOF
16166
16167 cat >> $CONFIG_STATUS <<\EOF
16168
16169 # Split the substitutions into bite-sized pieces for seds with
16170 # small command number limits, like on Digital OSF/1 and HP-UX.
16171 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16172 ac_file=1 # Number of current file.
16173 ac_beg=1 # First line for current file.
16174 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16175 ac_more_lines=:
16176 ac_sed_cmds=""
16177 while $ac_more_lines; do
16178   if test $ac_beg -gt 1; then
16179     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16180   else
16181     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16182   fi
16183   if test ! -s conftest.s$ac_file; then
16184     ac_more_lines=false
16185     rm -f conftest.s$ac_file
16186   else
16187     if test -z "$ac_sed_cmds"; then
16188       ac_sed_cmds="sed -f conftest.s$ac_file"
16189     else
16190       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16191     fi
16192     ac_file=`expr $ac_file + 1`
16193     ac_beg=$ac_end
16194     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16195   fi
16196 done
16197 if test -z "$ac_sed_cmds"; then
16198   ac_sed_cmds=cat
16199 fi
16200 EOF
16201
16202 cat >> $CONFIG_STATUS <<EOF
16203
16204 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16205 EOF
16206 cat >> $CONFIG_STATUS <<\EOF
16207 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16208   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16209   case "$ac_file" in
16210   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16211        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16212   *) ac_file_in="${ac_file}.in" ;;
16213   esac
16214
16215   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16216
16217   # Remove last slash and all that follows it.  Not all systems have dirname.
16218   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16219   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16220     # The file is in a subdirectory.
16221     test ! -d "$ac_dir" && mkdir "$ac_dir"
16222     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16223     # A "../" for each directory in $ac_dir_suffix.
16224     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16225   else
16226     ac_dir_suffix= ac_dots=
16227   fi
16228
16229   case "$ac_given_srcdir" in
16230   .)  srcdir=.
16231       if test -z "$ac_dots"; then top_srcdir=.
16232       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16233   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16234   *) # Relative path.
16235     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16236     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16237   esac
16238
16239   case "$ac_given_INSTALL" in
16240   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16241   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16242   esac
16243
16244   echo creating "$ac_file"
16245   rm -f "$ac_file"
16246   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16247   case "$ac_file" in
16248   *Makefile*) ac_comsub="1i\\
16249 # $configure_input" ;;
16250   *) ac_comsub= ;;
16251   esac
16252
16253   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16254   sed -e "$ac_comsub
16255 s%@configure_input@%$configure_input%g
16256 s%@srcdir@%$srcdir%g
16257 s%@top_srcdir@%$top_srcdir%g
16258 s%@INSTALL@%$INSTALL%g
16259 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16260 fi; done
16261 rm -f conftest.s*
16262
16263 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16264 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16265 #
16266 # ac_d sets the value in "#define NAME VALUE" lines.
16267 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16268 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16269 ac_dC='\3'
16270 ac_dD='%g'
16271 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16272 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16273 ac_uB='\([      ]\)%\1#\2define\3'
16274 ac_uC=' '
16275 ac_uD='\4%g'
16276 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16277 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16278 ac_eB='$%\1#\2define\3'
16279 ac_eC=' '
16280 ac_eD='%g'
16281
16282 if test "${CONFIG_HEADERS+set}" != set; then
16283 EOF
16284 cat >> $CONFIG_STATUS <<EOF
16285   CONFIG_HEADERS="src/config.h lwlib/config.h"
16286 EOF
16287 cat >> $CONFIG_STATUS <<\EOF
16288 fi
16289 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16290   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16291   case "$ac_file" in
16292   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16293        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16294   *) ac_file_in="${ac_file}.in" ;;
16295   esac
16296
16297   echo creating $ac_file
16298
16299   rm -f conftest.frag conftest.in conftest.out
16300   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16301   cat $ac_file_inputs > conftest.in
16302
16303 EOF
16304
16305 # Transform confdefs.h into a sed script conftest.vals that substitutes
16306 # the proper values into config.h.in to produce config.h.  And first:
16307 # Protect against being on the right side of a sed subst in config.status.
16308 # Protect against being in an unquoted here document in config.status.
16309 rm -f conftest.vals
16310 cat > conftest.hdr <<\EOF
16311 s/[\\&%]/\\&/g
16312 s%[\\$`]%\\&%g
16313 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16314 s%ac_d%ac_u%gp
16315 s%ac_u%ac_e%gp
16316 EOF
16317 sed -n -f conftest.hdr confdefs.h > conftest.vals
16318 rm -f conftest.hdr
16319
16320 # This sed command replaces #undef with comments.  This is necessary, for
16321 # example, in the case of _POSIX_SOURCE, which is predefined and required
16322 # on some systems where configure will not decide to define it.
16323 cat >> conftest.vals <<\EOF
16324 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16325 EOF
16326
16327 # Break up conftest.vals because some shells have a limit on
16328 # the size of here documents, and old seds have small limits too.
16329
16330 rm -f conftest.tail
16331 while :
16332 do
16333   ac_lines=`grep -c . conftest.vals`
16334   # grep -c gives empty output for an empty file on some AIX systems.
16335   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16336   # Write a limited-size here document to conftest.frag.
16337   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16338   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16339   echo 'CEOF
16340   sed -f conftest.frag conftest.in > conftest.out
16341   rm -f conftest.in
16342   mv conftest.out conftest.in
16343 ' >> $CONFIG_STATUS
16344   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16345   rm -f conftest.vals
16346   mv conftest.tail conftest.vals
16347 done
16348 rm -f conftest.vals
16349
16350 cat >> $CONFIG_STATUS <<\EOF
16351   rm -f conftest.frag conftest.h
16352   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16353   cat conftest.in >> conftest.h
16354   rm -f conftest.in
16355   if cmp -s $ac_file conftest.h 2>/dev/null; then
16356     echo "$ac_file is unchanged"
16357     rm -f conftest.h
16358   else
16359     # Remove last slash and all that follows it.  Not all systems have dirname.
16360       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16361       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16362       # The file is in a subdirectory.
16363       test ! -d "$ac_dir" && mkdir "$ac_dir"
16364     fi
16365     rm -f $ac_file
16366     mv conftest.h $ac_file
16367   fi
16368 fi; done
16369
16370 EOF
16371 cat >> $CONFIG_STATUS <<EOF
16372 CPP="$CPP"
16373  top_srcdir="$srcdir"
16374  MAKE_SUBDIR="$MAKE_SUBDIR"
16375
16376 EOF
16377 cat >> $CONFIG_STATUS <<\EOF
16378 for dir in . $MAKE_SUBDIR; do
16379   (
16380     cd $dir
16381     rm -f junk.c
16382     < Makefile.in \
16383       sed -e '/^# Generated/d' \
16384           -e 's%/\*\*/#.*%%' \
16385           -e 's/^ *# */#/' \
16386           -e '/^##/d' \
16387           -e '/^#/ {
16388 p
16389 d
16390 }'        \
16391           -e '/./ {
16392 s/\([\"]\)/\\\1/g
16393 s/^/"/
16394 s/$/"/
16395 }'  > junk.c;
16396
16397
16398
16399     echo creating $dir/Makefile
16400 $CPP -I. -I${top_srcdir}/src  junk.c \
16401   | sed -e 's/^\#.*//'          \
16402         -e 's/^[        ][      ]*$//'\
16403         -e 's/^ /       /'              \
16404         -e '/^[ \f]*$/d' \
16405         -e '/^\"/ {
16406         s/\\\([\"]\)/\1/g
16407         s/^[    ]*\"//
16408         s/\"[   ]*$//
16409 }' > Makefile.new
16410     chmod 444 Makefile.new
16411     mv -f Makefile.new Makefile
16412
16413     echo creating $dir/GNUmakefile
16414 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16415   | sed -e 's/^\#.*//'          \
16416         -e 's/^[        ][      ]*$//'\
16417         -e 's/^ /       /'              \
16418         -e '/^[ \f]*$/d' \
16419         -e '/^\"/ {
16420         s/\\\([\"]\)/\1/g
16421         s/^[    ]*\"//
16422         s/\"[   ]*$//
16423 }' > Makefile.new
16424     chmod 444 Makefile.new
16425     mv -f Makefile.new GNUmakefile
16426
16427     rm -f junk.c
16428   )
16429 done
16430
16431 sed < config.status >> lib-src/config.values \
16432   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16433   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16434   -e 's/^\([^ ]*\) $/\1 ""/' \
16435   -e 's/ 1$/ t/'
16436
16437
16438 exit 0
16439 EOF
16440 chmod +x $CONFIG_STATUS
16441 rm -fr confdefs* $ac_clean_files
16442 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1