XEmacs 21.4.10 "Military Intelligence".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump="no"
261 with_dragndrop="no"
262 with_ipv6_cname="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"     pdump=yes              ;;
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 "$dynamic"; then
1551   case "$opsys" in
1552     hpux* | sunos4* ) dynamic=no ;;
1553     *) dynamic=yes ;;
1554   esac
1555 fi
1556 if test "$dynamic" = "yes"; then
1557   case "$opsys" in
1558     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1559     decosf* ) ld_call_shared="-call_shared" ;;
1560   esac
1561 else   case "$opsys" in
1562     sol2 )
1563       echo "Static linking is not supported on Solaris 2."
1564       echo "Rerun configure without specifying --dynamic=no."
1565       exit 1 ;;
1566     linux   ) ld_call_shared="-Bstatic" ;;
1567     decosf* ) ld_call_shared="-non_shared" ;;
1568   esac
1569 fi
1570
1571 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1572
1573 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1574 { test "$extra_verbose" = "yes" && cat << EOF
1575     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1576 EOF
1577 cat >> confdefs.h <<EOF
1578 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1579 EOF
1580 }
1581
1582
1583
1584 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1585 if test "$with_workshop $with_tooltalk" = "yes no"; then
1586   (echo "$progname: Usage error:"
1587 echo " " "--with-workshop requires --with-tooltalk"
1588 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1589 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1590 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1591 fi
1592
1593 if test "$with_workshop" = "yes"; then
1594   { test "$extra_verbose" = "yes" && cat << \EOF
1595     Defining SUNPRO
1596 EOF
1597 cat >> confdefs.h <<\EOF
1598 #define SUNPRO 1
1599 EOF
1600 }
1601
1602   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1603    echo "    xemacs will be linked with \"sunpro.o\""
1604  fi
1605 fi
1606
1607 if test "$with_clash_detection" != "no"; then
1608   { test "$extra_verbose" = "yes" && cat << \EOF
1609     Defining CLASH_DETECTION
1610 EOF
1611 cat >> confdefs.h <<\EOF
1612 #define CLASH_DETECTION 1
1613 EOF
1614 }
1615
1616   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1617    echo "    xemacs will be linked with \"filelock.o\""
1618  fi
1619 fi
1620
1621 test -n "$compiler" && CC="$compiler"
1622 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1623 fi
1624
1625 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1626 if test "${CFLAGS-unset}" != unset
1627   then cflags_specified=yes;
1628   else cflags_specified=no;
1629 fi
1630
1631 xe_save_CFLAGS="$CFLAGS"
1632
1633 # Extract the first word of "gcc", so it can be a program name with args.
1634 set dummy gcc; ac_word=$2
1635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1636 echo "configure:1637: checking for $ac_word" >&5
1637
1638 if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1642   ac_dummy="$PATH"
1643   for ac_dir in $ac_dummy; do
1644     test -z "$ac_dir" && ac_dir=.
1645     if test -f $ac_dir/$ac_word; then
1646       ac_cv_prog_CC="gcc"
1647       break
1648     fi
1649   done
1650   IFS="$ac_save_ifs"
1651 fi
1652 CC="$ac_cv_prog_CC"
1653 if test -n "$CC"; then
1654   echo "$ac_t""$CC" 1>&6
1655 else
1656   echo "$ac_t""no" 1>&6
1657 fi
1658
1659 if test -z "$CC"; then
1660   # Extract the first word of "cc", so it can be a program name with args.
1661 set dummy cc; ac_word=$2
1662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1663 echo "configure:1664: checking for $ac_word" >&5
1664
1665 if test -n "$CC"; then
1666   ac_cv_prog_CC="$CC" # Let the user override the test.
1667 else
1668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1669   ac_prog_rejected=no
1670   ac_dummy="$PATH"
1671   for ac_dir in $ac_dummy; do
1672     test -z "$ac_dir" && ac_dir=.
1673     if test -f $ac_dir/$ac_word; then
1674       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1675         ac_prog_rejected=yes
1676         continue
1677       fi
1678       ac_cv_prog_CC="cc"
1679       break
1680     fi
1681   done
1682   IFS="$ac_save_ifs"
1683 if test $ac_prog_rejected = yes; then
1684   # We found a bogon in the path, so make sure we never use it.
1685   set dummy $ac_cv_prog_CC
1686   shift
1687   if test $# -gt 0; then
1688     # We chose a different compiler from the bogus one.
1689     # However, it has the same basename, so the bogon will be chosen
1690     # first if we set CC to just the basename; use the full file name.
1691     shift
1692     set dummy "$ac_dir/$ac_word" "$@"
1693     shift
1694     ac_cv_prog_CC="$@"
1695   fi
1696 fi
1697 fi
1698 CC="$ac_cv_prog_CC"
1699 if test -n "$CC"; then
1700   echo "$ac_t""$CC" 1>&6
1701 else
1702   echo "$ac_t""no" 1>&6
1703 fi
1704
1705   if test -z "$CC"; then
1706     case "`uname -s`" in
1707     *win32* | *WIN32*)
1708       # Extract the first word of "cl", so it can be a program name with args.
1709 set dummy cl; ac_word=$2
1710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1711 echo "configure:1712: checking for $ac_word" >&5
1712
1713 if test -n "$CC"; then
1714   ac_cv_prog_CC="$CC" # Let the user override the test.
1715 else
1716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1717   ac_dummy="$PATH"
1718   for ac_dir in $ac_dummy; do
1719     test -z "$ac_dir" && ac_dir=.
1720     if test -f $ac_dir/$ac_word; then
1721       ac_cv_prog_CC="cl"
1722       break
1723     fi
1724   done
1725   IFS="$ac_save_ifs"
1726 fi
1727 CC="$ac_cv_prog_CC"
1728 if test -n "$CC"; then
1729   echo "$ac_t""$CC" 1>&6
1730 else
1731   echo "$ac_t""no" 1>&6
1732 fi
1733  ;;
1734     esac
1735   fi
1736   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1737 fi
1738
1739 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1740 echo "configure:1741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1741
1742 ac_ext=c
1743 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1744 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1745 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'
1746 ac_cpp='$CPP '"$xe_cppflags"
1747 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1748 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1749 cross_compiling=no
1750
1751 cat > conftest.$ac_ext << EOF
1752
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755
1756 main(){return(0);}
1757 EOF
1758 if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1759   ac_cv_prog_cc_works=yes
1760   # If we can't run a trivial program, we are probably using a cross compiler.
1761   if (./conftest; exit) 2>/dev/null; then
1762     ac_cv_prog_cc_cross=no
1763   else
1764     ac_cv_prog_cc_cross=yes
1765   fi
1766 else
1767   echo "configure: failed program was:" >&5
1768   cat conftest.$ac_ext >&5
1769   ac_cv_prog_cc_works=no
1770 fi
1771 rm -fr conftest*
1772 ac_ext=c
1773 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1774 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1775 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'
1776 ac_cpp='$CPP '"$xe_cppflags"
1777 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1778 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1779 cross_compiling=no
1780
1781 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1782 if test $ac_cv_prog_cc_works = no; then
1783   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1784 fi
1785 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1786 echo "configure:1787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1787 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1788 cross_compiling=$ac_cv_prog_cc_cross
1789
1790 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1791 echo "configure:1792: checking whether we are using GNU C" >&5
1792
1793 cat > conftest.c <<EOF
1794 #ifdef __GNUC__
1795   yes;
1796 #endif
1797 EOF
1798 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1799   ac_cv_prog_gcc=yes
1800 else
1801   ac_cv_prog_gcc=no
1802 fi
1803
1804 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1805
1806 if test $ac_cv_prog_gcc = yes; then
1807   GCC=yes
1808 else
1809   GCC=
1810 fi
1811
1812 ac_test_CFLAGS="${CFLAGS+set}"
1813 ac_save_CFLAGS="$CFLAGS"
1814 CFLAGS=
1815 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1816 echo "configure:1817: checking whether ${CC-cc} accepts -g" >&5
1817
1818 echo 'void f(){}' > conftest.c
1819 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1820   ac_cv_prog_cc_g=yes
1821 else
1822   ac_cv_prog_cc_g=no
1823 fi
1824 rm -f conftest*
1825
1826
1827 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1828 if test "$ac_test_CFLAGS" = set; then
1829   CFLAGS="$ac_save_CFLAGS"
1830 elif test $ac_cv_prog_cc_g = yes; then
1831   if test "$GCC" = yes; then
1832     CFLAGS="-g -O2"
1833   else
1834     CFLAGS="-g"
1835   fi
1836 else
1837   if test "$GCC" = yes; then
1838     CFLAGS="-O2"
1839   else
1840     CFLAGS=
1841   fi
1842 fi
1843  
1844 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1845   CC=${NON_GNU_CC-cc}
1846   # Extract the first word of "gcc", so it can be a program name with args.
1847 set dummy gcc; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850
1851 if test -n "$CC"; then
1852   ac_cv_prog_CC="$CC" # Let the user override the test.
1853 else
1854   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1855   ac_dummy="$PATH"
1856   for ac_dir in $ac_dummy; do
1857     test -z "$ac_dir" && ac_dir=.
1858     if test -f $ac_dir/$ac_word; then
1859       ac_cv_prog_CC="gcc"
1860       break
1861     fi
1862   done
1863   IFS="$ac_save_ifs"
1864 fi
1865 CC="$ac_cv_prog_CC"
1866 if test -n "$CC"; then
1867   echo "$ac_t""$CC" 1>&6
1868 else
1869   echo "$ac_t""no" 1>&6
1870 fi
1871
1872 if test -z "$CC"; then
1873   # Extract the first word of "cc", so it can be a program name with args.
1874 set dummy cc; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877
1878 if test -n "$CC"; then
1879   ac_cv_prog_CC="$CC" # Let the user override the test.
1880 else
1881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1882   ac_prog_rejected=no
1883   ac_dummy="$PATH"
1884   for ac_dir in $ac_dummy; do
1885     test -z "$ac_dir" && ac_dir=.
1886     if test -f $ac_dir/$ac_word; then
1887       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1888         ac_prog_rejected=yes
1889         continue
1890       fi
1891       ac_cv_prog_CC="cc"
1892       break
1893     fi
1894   done
1895   IFS="$ac_save_ifs"
1896 if test $ac_prog_rejected = yes; then
1897   # We found a bogon in the path, so make sure we never use it.
1898   set dummy $ac_cv_prog_CC
1899   shift
1900   if test $# -gt 0; then
1901     # We chose a different compiler from the bogus one.
1902     # However, it has the same basename, so the bogon will be chosen
1903     # first if we set CC to just the basename; use the full file name.
1904     shift
1905     set dummy "$ac_dir/$ac_word" "$@"
1906     shift
1907     ac_cv_prog_CC="$@"
1908   fi
1909 fi
1910 fi
1911 CC="$ac_cv_prog_CC"
1912 if test -n "$CC"; then
1913   echo "$ac_t""$CC" 1>&6
1914 else
1915   echo "$ac_t""no" 1>&6
1916 fi
1917
1918   if test -z "$CC"; then
1919     case "`uname -s`" in
1920     *win32* | *WIN32*)
1921       # Extract the first word of "cl", so it can be a program name with args.
1922 set dummy cl; ac_word=$2
1923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1924 echo "configure:1925: checking for $ac_word" >&5
1925
1926 if test -n "$CC"; then
1927   ac_cv_prog_CC="$CC" # Let the user override the test.
1928 else
1929   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1930   ac_dummy="$PATH"
1931   for ac_dir in $ac_dummy; do
1932     test -z "$ac_dir" && ac_dir=.
1933     if test -f $ac_dir/$ac_word; then
1934       ac_cv_prog_CC="cl"
1935       break
1936     fi
1937   done
1938   IFS="$ac_save_ifs"
1939 fi
1940 CC="$ac_cv_prog_CC"
1941 if test -n "$CC"; then
1942   echo "$ac_t""$CC" 1>&6
1943 else
1944   echo "$ac_t""no" 1>&6
1945 fi
1946  ;;
1947     esac
1948   fi
1949   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1950 fi
1951
1952 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1953 echo "configure:1954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1954
1955 ac_ext=c
1956 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1957 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1958 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'
1959 ac_cpp='$CPP '"$xe_cppflags"
1960 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1961 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1962 cross_compiling=no
1963
1964 cat > conftest.$ac_ext << EOF
1965
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968
1969 main(){return(0);}
1970 EOF
1971 if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1972   ac_cv_prog_cc_works=yes
1973   # If we can't run a trivial program, we are probably using a cross compiler.
1974   if (./conftest; exit) 2>/dev/null; then
1975     ac_cv_prog_cc_cross=no
1976   else
1977     ac_cv_prog_cc_cross=yes
1978   fi
1979 else
1980   echo "configure: failed program was:" >&5
1981   cat conftest.$ac_ext >&5
1982   ac_cv_prog_cc_works=no
1983 fi
1984 rm -fr conftest*
1985 ac_ext=c
1986 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1987 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1988 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'
1989 ac_cpp='$CPP '"$xe_cppflags"
1990 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1991 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1992 cross_compiling=no
1993
1994 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1995 if test $ac_cv_prog_cc_works = no; then
1996   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1997 fi
1998 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1999 echo "configure:2000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2000 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2001 cross_compiling=$ac_cv_prog_cc_cross
2002
2003 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2004 echo "configure:2005: checking whether we are using GNU C" >&5
2005
2006 cat > conftest.c <<EOF
2007 #ifdef __GNUC__
2008   yes;
2009 #endif
2010 EOF
2011 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2012   ac_cv_prog_gcc=yes
2013 else
2014   ac_cv_prog_gcc=no
2015 fi
2016
2017 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2018
2019 if test $ac_cv_prog_gcc = yes; then
2020   GCC=yes
2021 else
2022   GCC=
2023 fi
2024
2025 ac_test_CFLAGS="${CFLAGS+set}"
2026 ac_save_CFLAGS="$CFLAGS"
2027 CFLAGS=
2028 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2029 echo "configure:2030: checking whether ${CC-cc} accepts -g" >&5
2030
2031 echo 'void f(){}' > conftest.c
2032 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2033   ac_cv_prog_cc_g=yes
2034 else
2035   ac_cv_prog_cc_g=no
2036 fi
2037 rm -f conftest*
2038
2039
2040 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2041 if test "$ac_test_CFLAGS" = set; then
2042   CFLAGS="$ac_save_CFLAGS"
2043 elif test $ac_cv_prog_cc_g = yes; then
2044   if test "$GCC" = yes; then
2045     CFLAGS="-g -O2"
2046   else
2047     CFLAGS="-g"
2048   fi
2049 else
2050   if test "$GCC" = yes; then
2051     CFLAGS="-O2"
2052   else
2053     CFLAGS=
2054   fi
2055 fi
2056
2057 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2058   CC=gcc
2059   # Extract the first word of "gcc", so it can be a program name with args.
2060 set dummy gcc; ac_word=$2
2061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2062 echo "configure:2063: checking for $ac_word" >&5
2063
2064 if test -n "$CC"; then
2065   ac_cv_prog_CC="$CC" # Let the user override the test.
2066 else
2067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2068   ac_dummy="$PATH"
2069   for ac_dir in $ac_dummy; do
2070     test -z "$ac_dir" && ac_dir=.
2071     if test -f $ac_dir/$ac_word; then
2072       ac_cv_prog_CC="gcc"
2073       break
2074     fi
2075   done
2076   IFS="$ac_save_ifs"
2077 fi
2078 CC="$ac_cv_prog_CC"
2079 if test -n "$CC"; then
2080   echo "$ac_t""$CC" 1>&6
2081 else
2082   echo "$ac_t""no" 1>&6
2083 fi
2084
2085 if test -z "$CC"; then
2086   # Extract the first word of "cc", so it can be a program name with args.
2087 set dummy cc; ac_word=$2
2088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2089 echo "configure:2090: checking for $ac_word" >&5
2090
2091 if test -n "$CC"; then
2092   ac_cv_prog_CC="$CC" # Let the user override the test.
2093 else
2094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2095   ac_prog_rejected=no
2096   ac_dummy="$PATH"
2097   for ac_dir in $ac_dummy; do
2098     test -z "$ac_dir" && ac_dir=.
2099     if test -f $ac_dir/$ac_word; then
2100       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2101         ac_prog_rejected=yes
2102         continue
2103       fi
2104       ac_cv_prog_CC="cc"
2105       break
2106     fi
2107   done
2108   IFS="$ac_save_ifs"
2109 if test $ac_prog_rejected = yes; then
2110   # We found a bogon in the path, so make sure we never use it.
2111   set dummy $ac_cv_prog_CC
2112   shift
2113   if test $# -gt 0; then
2114     # We chose a different compiler from the bogus one.
2115     # However, it has the same basename, so the bogon will be chosen
2116     # first if we set CC to just the basename; use the full file name.
2117     shift
2118     set dummy "$ac_dir/$ac_word" "$@"
2119     shift
2120     ac_cv_prog_CC="$@"
2121   fi
2122 fi
2123 fi
2124 CC="$ac_cv_prog_CC"
2125 if test -n "$CC"; then
2126   echo "$ac_t""$CC" 1>&6
2127 else
2128   echo "$ac_t""no" 1>&6
2129 fi
2130
2131   if test -z "$CC"; then
2132     case "`uname -s`" in
2133     *win32* | *WIN32*)
2134       # Extract the first word of "cl", so it can be a program name with args.
2135 set dummy cl; ac_word=$2
2136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2137 echo "configure:2138: checking for $ac_word" >&5
2138
2139 if test -n "$CC"; then
2140   ac_cv_prog_CC="$CC" # Let the user override the test.
2141 else
2142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2143   ac_dummy="$PATH"
2144   for ac_dir in $ac_dummy; do
2145     test -z "$ac_dir" && ac_dir=.
2146     if test -f $ac_dir/$ac_word; then
2147       ac_cv_prog_CC="cl"
2148       break
2149     fi
2150   done
2151   IFS="$ac_save_ifs"
2152 fi
2153 CC="$ac_cv_prog_CC"
2154 if test -n "$CC"; then
2155   echo "$ac_t""$CC" 1>&6
2156 else
2157   echo "$ac_t""no" 1>&6
2158 fi
2159  ;;
2160     esac
2161   fi
2162   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2163 fi
2164
2165 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2166 echo "configure:2167: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2167
2168 ac_ext=c
2169 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2170 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2171 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'
2172 ac_cpp='$CPP '"$xe_cppflags"
2173 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2174 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2175 cross_compiling=no
2176
2177 cat > conftest.$ac_ext << EOF
2178
2179 #line 2180 "configure"
2180 #include "confdefs.h"
2181
2182 main(){return(0);}
2183 EOF
2184 if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2185   ac_cv_prog_cc_works=yes
2186   # If we can't run a trivial program, we are probably using a cross compiler.
2187   if (./conftest; exit) 2>/dev/null; then
2188     ac_cv_prog_cc_cross=no
2189   else
2190     ac_cv_prog_cc_cross=yes
2191   fi
2192 else
2193   echo "configure: failed program was:" >&5
2194   cat conftest.$ac_ext >&5
2195   ac_cv_prog_cc_works=no
2196 fi
2197 rm -fr conftest*
2198 ac_ext=c
2199 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2200 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2201 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'
2202 ac_cpp='$CPP '"$xe_cppflags"
2203 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2204 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2205 cross_compiling=no
2206
2207 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2208 if test $ac_cv_prog_cc_works = no; then
2209   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2210 fi
2211 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2213 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2214 cross_compiling=$ac_cv_prog_cc_cross
2215
2216 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2217 echo "configure:2218: checking whether we are using GNU C" >&5
2218
2219 cat > conftest.c <<EOF
2220 #ifdef __GNUC__
2221   yes;
2222 #endif
2223 EOF
2224 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2225   ac_cv_prog_gcc=yes
2226 else
2227   ac_cv_prog_gcc=no
2228 fi
2229
2230 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2231
2232 if test $ac_cv_prog_gcc = yes; then
2233   GCC=yes
2234 else
2235   GCC=
2236 fi
2237
2238 ac_test_CFLAGS="${CFLAGS+set}"
2239 ac_save_CFLAGS="$CFLAGS"
2240 CFLAGS=
2241 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2242 echo "configure:2243: checking whether ${CC-cc} accepts -g" >&5
2243
2244 echo 'void f(){}' > conftest.c
2245 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2246   ac_cv_prog_cc_g=yes
2247 else
2248   ac_cv_prog_cc_g=no
2249 fi
2250 rm -f conftest*
2251
2252
2253 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2254 if test "$ac_test_CFLAGS" = set; then
2255   CFLAGS="$ac_save_CFLAGS"
2256 elif test $ac_cv_prog_cc_g = yes; then
2257   if test "$GCC" = yes; then
2258     CFLAGS="-g -O2"
2259   else
2260     CFLAGS="-g"
2261   fi
2262 else
2263   if test "$GCC" = yes; then
2264     CFLAGS="-O2"
2265   else
2266     CFLAGS=
2267   fi
2268 fi
2269
2270 fi
2271 CFLAGS="$xe_save_CFLAGS"
2272
2273
2274 test -n "$CPP" -a -d "$CPP" && CPP=
2275
2276 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2277
2278 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2279 echo "configure:2280: checking how to run the C preprocessor" >&5
2280 # On Suns, sometimes $CPP names a directory.
2281 if test -n "$CPP" && test -d "$CPP"; then
2282   CPP=
2283 fi
2284 if test -z "$CPP"; then
2285
2286   # This must be in double quotes, not single quotes, because CPP may get
2287   # substituted into the Makefile and "${CC-cc}" will confuse make.
2288   CPP="${CC-cc} -E"
2289   # On the NeXT, cc -E runs the code through the compiler's parser,
2290   # not just through cpp.
2291   cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <assert.h>
2295 Syntax Error
2296 EOF
2297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2298 { (eval echo configure:2299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2300 if test -z "$ac_err"; then
2301   :
2302 else
2303   echo "$ac_err" >&5
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -rf conftest*
2307   CPP="${CC-cc} -E -traditional-cpp"
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP="${CC-cc} -nologo -E"
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <assert.h>
2329 Syntax Error
2330 EOF
2331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2332 { (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334 if test -z "$ac_err"; then
2335   :
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   CPP=/lib/cpp
2342 fi
2343 rm -f conftest*
2344 fi
2345 rm -f conftest*
2346 fi
2347 rm -f conftest*
2348   ac_cv_prog_CPP="$CPP"
2349   CPP="$ac_cv_prog_CPP"
2350 else
2351   ac_cv_prog_CPP="$CPP"
2352 fi
2353 echo "$ac_t""$CPP" 1>&6
2354
2355
2356
2357 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2358 echo "configure:2359: checking for AIX" >&5
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #ifdef _AIX
2363   yes
2364 #endif
2365
2366 EOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "yes" >/dev/null 2>&1; then
2369   rm -rf conftest*
2370   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2371     Defining _ALL_SOURCE
2372 EOF
2373 cat >> confdefs.h <<\EOF
2374 #define _ALL_SOURCE 1
2375 EOF
2376 }
2377
2378 else
2379   rm -rf conftest*
2380   echo "$ac_t""no" 1>&6
2381 fi
2382 rm -f conftest*
2383
2384  
2385
2386 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2387 echo "configure:2388: checking for GNU libc" >&5
2388 cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <features.h>
2392 int main() {
2393
2394 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2395 #error Not a GNU libc system :-(
2396 ******* ======= ******** &&&&&&&&
2397 #endif
2398
2399 ; return 0; }
2400 EOF
2401 if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2402   rm -rf conftest*
2403   have_glibc=yes
2404 else
2405   echo "configure: failed program was:" >&5
2406   cat conftest.$ac_ext >&5
2407   rm -rf conftest*
2408   have_glibc=no
2409 fi
2410 rm -f conftest*
2411 echo "$ac_t""$have_glibc" 1>&6
2412 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2413     Defining _GNU_SOURCE
2414 EOF
2415 cat >> confdefs.h <<\EOF
2416 #define _GNU_SOURCE 1
2417 EOF
2418 }
2419
2420
2421 case "$opsys" in
2422   sol2)
2423    { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining __EXTENSIONS__
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define __EXTENSIONS__ 1
2428 EOF
2429 }
2430
2431       if test "$os_release" -ge 55; then
2432      { test "$extra_verbose" = "yes" && cat << \EOF
2433     Defining _XOPEN_SOURCE = 500
2434 EOF
2435 cat >> confdefs.h <<\EOF
2436 #define _XOPEN_SOURCE 500
2437 EOF
2438 }
2439
2440      { test "$extra_verbose" = "yes" && cat << \EOF
2441     Defining _XOPEN_SOURCE_EXTENDED
2442 EOF
2443 cat >> confdefs.h <<\EOF
2444 #define _XOPEN_SOURCE_EXTENDED 1
2445 EOF
2446 }
2447
2448    fi ;;
2449   linux)
2450     { test "$extra_verbose" = "yes" && cat << \EOF
2451     Defining _POSIX_C_SOURCE = 199506L
2452 EOF
2453 cat >> confdefs.h <<\EOF
2454 #define _POSIX_C_SOURCE 199506L
2455 EOF
2456 }
2457
2458     { test "$extra_verbose" = "yes" && cat << \EOF
2459     Defining _XOPEN_SOURCE = 500
2460 EOF
2461 cat >> confdefs.h <<\EOF
2462 #define _XOPEN_SOURCE 500
2463 EOF
2464 }
2465
2466     { test "$extra_verbose" = "yes" && cat << \EOF
2467     Defining _XOPEN_SOURCE_EXTENDED
2468 EOF
2469 cat >> confdefs.h <<\EOF
2470 #define _XOPEN_SOURCE_EXTENDED 1
2471 EOF
2472 }
2473
2474     ;;
2475 esac
2476
2477 cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 int main () {
2481 #if defined __SUNPRO_C
2482 return 11;
2483 #elif defined __DECC
2484 return 12;
2485 #elif defined __USLC__ && defined __SCO_VERSION__
2486 return 13;
2487 #else
2488 return 0;
2489 #endif
2490 }
2491 EOF
2492 if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2493 then
2494   :
2495 else
2496   conftest_rc="$?"
2497   echo "configure: failed program was:" >&5
2498   cat conftest.$ac_ext >&5
2499   rm -fr conftest*
2500   case "$conftest_rc" in
2501   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2502   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2503   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2504 esac
2505 fi
2506 rm -fr conftest*
2507
2508
2509
2510
2511 echo "Extracting information from the machine- and system-dependent headers..."
2512
2513 tempcname="conftest.c"
2514
2515
2516
2517 cat > $tempcname < confdefs.h
2518 cat >> $tempcname <<EOF
2519 #define NOT_C_CODE
2520 #define C_SWITCH_SITE
2521 #define C_SWITCH_X_SITE
2522 #define LD_SWITCH_SITE
2523 #define LD_SWITCH_X_SITE
2524 #define LD_SWITCH_X_SITE_AUX
2525 #define OS_RELEASE $os_release
2526
2527 #ifdef config_opsysfile
2528 #include "$srcdir/src/$opsysfile"
2529 #endif
2530
2531 #ifdef config_machfile
2532 #include "$srcdir/src/$machfile"
2533 #endif
2534
2535 #ifndef LIBS_MACHINE
2536 #define LIBS_MACHINE
2537 #endif
2538 configure___ libs_machine=LIBS_MACHINE
2539
2540 #ifndef LIBS_SYSTEM
2541 #define LIBS_SYSTEM
2542 #endif
2543 configure___ libs_system=LIBS_SYSTEM
2544
2545 #ifndef LIBS_TERMCAP
2546 #define LIBS_TERMCAP
2547 #endif
2548 configure___ libs_termcap=LIBS_TERMCAP
2549
2550 #ifndef LIB_STANDARD
2551 #define LIB_STANDARD
2552 #endif
2553 configure___ libs_standard=LIB_STANDARD
2554
2555
2556 #ifndef OBJECTS_MACHINE
2557 #define OBJECTS_MACHINE
2558 #endif
2559 configure___ objects_machine=OBJECTS_MACHINE
2560
2561 #ifndef OBJECTS_SYSTEM
2562 #define OBJECTS_SYSTEM
2563 #endif
2564 configure___ objects_system=OBJECTS_SYSTEM
2565
2566
2567 #ifndef C_SWITCH_MACHINE
2568 #define C_SWITCH_MACHINE
2569 #endif
2570 configure___ c_switch_machine=C_SWITCH_MACHINE
2571
2572 #ifndef C_SWITCH_SYSTEM
2573 #define C_SWITCH_SYSTEM
2574 #endif
2575 configure___ c_switch_system=C_SWITCH_SYSTEM
2576
2577
2578 #ifndef LD_SWITCH_MACHINE
2579 #define LD_SWITCH_MACHINE
2580 #endif
2581 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2582
2583 #ifndef LD_SWITCH_SYSTEM
2584 #define LD_SWITCH_SYSTEM
2585 #endif
2586 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2587
2588
2589 #ifndef UNEXEC
2590 #define UNEXEC "unexec.o"
2591 #endif
2592 configure___ unexec=UNEXEC
2593
2594
2595 #ifndef LD_SWITCH_SHARED
2596 #define LD_SWITCH_SHARED "-c"
2597 #endif
2598 configure___ ld_switch_shared=LD_SWITCH_SHARED
2599
2600
2601 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2602 configure___ ordinary_ld=ORDINARY_LD
2603
2604 #ifdef ORDINARY_LINK
2605 #define LD ORDINARY_LD
2606 #else /* no ORDINARY LINK */
2607 #ifdef COFF_ENCAPSULATE
2608 #define LD "\$(CC) -nostdlib"
2609 #else /* not COFF_ENCAPSULATE */
2610 #ifdef LINKER
2611 #define LD LINKER
2612 #else /* ! defined (LINKER) */
2613 #define LD "ld"
2614 #endif /* ! defined (LINKER) */
2615 #endif /* ! defined (COFF_ENCAPSULATE) */
2616 #endif /* not ORDINARY_LINK */
2617 configure___ ld=LD
2618
2619 #ifndef LIB_GCC
2620 #define LIB_GCC
2621 #endif
2622 configure___ lib_gcc=LIB_GCC
2623
2624 #ifndef LD_TEXT_START_ADDR
2625 #define LD_TEXT_START_ADDR
2626 #endif
2627 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2628
2629
2630 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2631 #ifdef NO_REMAP
2632 #ifdef COFF_ENCAPSULATE
2633 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2634 #else /* ! defined (COFF_ENCAPSULATE) */
2635 #define START_FILES "pre-crt0.o /lib/crt0.o"
2636 #endif /* ! defined (COFF_ENCAPSULATE) */
2637 #else /* ! defined (NO_REMAP) */
2638 #define START_FILES "ecrt0.o"
2639 #endif /* ! defined (NO_REMAP) */
2640 #endif /* no ORDINARY_LINK */
2641 #ifndef START_FILES
2642 #define START_FILES
2643 #endif
2644 configure___ start_files=START_FILES
2645
2646 #ifdef ORDINARY_LINK
2647 configure___ ordinary_link=yes
2648 #else
2649 configure___ ordinary_link=no
2650 #endif
2651
2652 #ifdef SYSTEM_MALLOC
2653 configure___ system_malloc=yes
2654 #else
2655 configure___ system_malloc=no
2656 #endif
2657
2658 #ifdef TERMINFO
2659 configure___ have_terminfo=yes
2660 #else
2661 configure___ have_terminfo=no
2662 #endif
2663
2664 #ifdef MAIL_USE_FLOCK
2665 configure___ mail_use_flock=yes
2666 #else
2667 configure___ mail_use_flock=no
2668 #endif
2669
2670 #ifdef MAIL_USE_LOCKF
2671 configure___ mail_use_lockf=yes
2672 #else
2673 configure___ mail_use_lockf=no
2674 #endif
2675
2676 #ifdef MAIL_USE_LOCKING
2677 configure___ mail_use_locking=yes
2678 #else
2679 configure___ mail_use_locking=no
2680 #endif
2681
2682 #ifdef HAVE_WIN32_PROCESSES
2683 configure___ win32_processes=yes
2684 #else
2685 configure___ win32_processes=no
2686 #endif
2687
2688 EOF
2689
2690 CPP=`eval "echo $CPP $CPPFLAGS"`
2691 eval `$CPP -Isrc $tempcname \
2692         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2693
2694 rm $tempcname
2695
2696 if test "$pdump" = "yes"; then
2697   ordinary_link="yes"
2698   ld="${ordinary_ld}"
2699   start_files=
2700   libs_standard=
2701   unexec=
2702   lib_gcc=
2703 fi
2704
2705 test "$extra_verbose" = "yes" && \
2706   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 ""
2707
2708 case "$opsys" in mingw* | cygwin*)
2709   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2710   cygwin_include=`eval "dirname $cygwin_include"` ;
2711   cygwin_include="-I$cygwin_include/../include" ;
2712   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2713   case "$opsys" in mingw*)
2714     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2715   esac
2716   ;;
2717 esac
2718
2719 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2720
2721
2722 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2723
2724 if test "$__USLC__" = yes; then
2725   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2726 echo "configure:2727: checking for whether the -Kalloca compiler flag is needed" >&5
2727   need_kalloca=no
2728   cat > conftest.$ac_ext <<EOF
2729 #line 2730 "configure"
2730 #include "confdefs.h"
2731
2732 int main() {
2733 void *x = alloca(4);
2734 ; return 0; }
2735 EOF
2736 if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2737   rm -rf conftest*
2738   :
2739 else
2740   echo "configure: failed program was:" >&5
2741   cat conftest.$ac_ext >&5
2742   rm -rf conftest*
2743   
2744     xe_save_c_switch_system="$c_switch_system"
2745     c_switch_system="$c_switch_system -Kalloca"
2746     cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749
2750 int main() {
2751 void *x = alloca(4);
2752 ; return 0; }
2753 EOF
2754 if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755   rm -rf conftest*
2756    need_kalloca=yes 
2757 else
2758   echo "configure: failed program was:" >&5
2759   cat conftest.$ac_ext >&5
2760 fi
2761 rm -f conftest*
2762     c_switch_system="$xe_save_c_switch_system"
2763 fi
2764 rm -f conftest*
2765   echo "$ac_t""$need_kalloca" 1>&6
2766   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
2767 fi
2768
2769 if test "$cflags_specified" = "no"; then
2770       if   test "$GCC" = "yes"; then
2771     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2772         CFLAGS="$CFLAGS -Wsign-compare"
2773                 if test "$xemacs_compiler" != "g++"; then
2774       CFLAGS="$CFLAGS -Wshadow"
2775     fi
2776             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2777               elif test "$__SUNPRO_C" = "yes"; then
2778     case "$opsys" in
2779       sol2    ) CFLAGS="-v -xO4" ;;
2780       sunos4* ) CFLAGS="-xO2";;
2781     esac
2782   elif test "$__DECC" = "yes"; then
2783     CFLAGS="-O3"
2784   elif test "$CC" = "xlc"; then
2785     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2786     else
2787     CFLAGS="-O" ;  fi
2788 fi
2789
2790 if test "$GCC" = "yes"; then
2791 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2792 echo "configure:2793: checking for buggy gcc versions" >&5
2793 GCC_VERSION=`$CC --version`
2794 case `uname -s`:`uname -m`:$GCC_VERSION in
2795                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2796                         case "$CFLAGS" in
2797             *-O2*|*-O3*)
2798                 case "$CFLAGS" in
2799                     *-fno-schedule-insns*) ;;
2800                     *)
2801                         echo "$ac_t""yes" 1>&6
2802                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2803                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2804                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2805                         ;;
2806                 esac
2807                 ;;
2808         esac
2809         ;;
2810                     Linux:alpha:egcs-2.91.*)
2811         echo "$ac_t""yes" 1>&6
2812         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2813         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2814         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2815         ;;
2816     *:i*86*:2.7.2*)
2817         case "$CFLAGS" in
2818             *-O2*|*-O3*)
2819                 case "$GCC_VERSION" in
2820                     2.7.2)
2821                         case "$CFLAGS" in
2822                             *-fno-strength-reduce*) ;;
2823                             *)
2824                                 echo "$ac_t""yes" 1>&6
2825                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2826                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2827                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2828                                 ;;
2829                         esac
2830                         ;;
2831                 esac
2832                 case "$CFLAGS" in
2833                  *-fno-caller-saves*) ;;
2834                  *)
2835                     echo "$ac_t""yes" 1>&6
2836                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2837                     echo "configure: warning: -fno-caller-saves." 1>&2
2838                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2839                     ;;
2840                 esac
2841                 ;;
2842         esac
2843         ;;
2844 esac
2845 echo "$ac_t""no" 1>&6
2846 fi
2847
2848 if test "$pdump" != "yes"; then
2849   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
2850 echo "configure:2851: checking for \"-z nocombreloc\" linker flag" >&5
2851   case "`ld --help 2>&1`" in
2852     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
2853       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
2854     *) echo "$ac_t""no" 1>&6 ;;
2855   esac
2856 fi
2857
2858
2859
2860 if test "$GCC" = "yes"; then
2861   set x $ld_switch_system; shift; ld_switch_system=""
2862   while test -n "$1"; do
2863     case $1 in
2864       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2865       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2866       -Xlinker* ) ;;
2867       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2868     esac
2869     shift
2870   done
2871 fi
2872
2873 if test "$GCC" = "yes"; then
2874   set x $ld_switch_machine; shift; ld_switch_machine=""
2875   while test -n "$1"; do
2876     case $1 in
2877       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2878       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2879       -Xlinker* ) ;;
2880       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2881     esac
2882     shift
2883   done
2884 fi
2885
2886 if test "$GCC" = "yes"; then
2887   set x $ld_switch_site; shift; ld_switch_site=""
2888   while test -n "$1"; do
2889     case $1 in
2890       -L  | -l  | -u               ) ld_switch_site="$ld_switch_site $1 $2"; shift ;;
2891       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_site="$ld_switch_site $1" ;;
2892       -Xlinker* ) ;;
2893       * ) ld_switch_site="$ld_switch_site -Xlinker $1" ;;
2894     esac
2895     shift
2896   done
2897 fi
2898
2899 if test "$GCC" = "yes"; then
2900   set x $LDFLAGS; shift; LDFLAGS=""
2901   while test -n "$1"; do
2902     case $1 in
2903       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2904       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2905       -Xlinker* ) ;;
2906       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2907     esac
2908     shift
2909   done
2910 fi
2911
2912 if test "$GCC" = "yes"; then
2913   set x $ld_call_shared; shift; ld_call_shared=""
2914   while test -n "$1"; do
2915     case $1 in
2916       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2917       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2918       -Xlinker* ) ;;
2919       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2920     esac
2921     shift
2922   done
2923 fi
2924
2925 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2926    echo "    xemacs will be linked with \"$objects_machine\""
2927  fi
2928 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2929    echo "    xemacs will be linked with \"$objects_system\""
2930  fi
2931 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2932    echo "    xemacs will be linked with \"$unexec\""
2933  fi
2934 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2935    echo "    xemacs will be linked with \"dumper.o\""
2936  fi
2937
2938 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2939 echo "configure:2940: checking for dynodump" >&5
2940 if test "$unexec" != "unexsol2.o"; then
2941   echo "$ac_t""no" 1>&6
2942 else
2943   echo "$ac_t""yes" 1>&6
2944   { test "$extra_verbose" = "yes" && cat << \EOF
2945     Defining DYNODUMP
2946 EOF
2947 cat >> confdefs.h <<\EOF
2948 #define DYNODUMP 1
2949 EOF
2950 }
2951
2952   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2953   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2954   case "$machine" in
2955     sparc   ) dynodump_arch=sparc ;;
2956     *86*    ) dynodump_arch=i386  ;;
2957     powerpc ) dynodump_arch=ppc   ;;
2958   esac
2959     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
2960 fi
2961
2962
2963 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2964
2965 if test "$unexec" = "unexaix.o"; then
2966   if   test "$dynamic" = "no"; then
2967   start_flags="-Wl,-bnso,-bnodelcsect"
2968   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2969   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2970     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2971   done
2972   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2973     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2974   done
2975   
2976 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2977 echo "configure:2978: checking for terminateAndUnload in -lC" >&5
2978 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2979
2980 xe_check_libs=" -lC "
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 /* Override any gcc2 internal prototype to avoid an error.  */
2985 /* We use char because int might match the return type of a gcc2
2986     builtin and then its argument prototype would still apply.  */
2987 char terminateAndUnload();
2988
2989 int main() {
2990 terminateAndUnload()
2991 ; return 0; }
2992 EOF
2993 if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2994   rm -rf conftest*
2995   eval "ac_cv_lib_$ac_lib_var=yes"
2996 else
2997   echo "configure: failed program was:" >&5
2998   cat conftest.$ac_ext >&5
2999   rm -rf conftest*
3000   eval "ac_cv_lib_$ac_lib_var=no"
3001 fi
3002 rm -f conftest*
3003 xe_check_libs=""
3004
3005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
3006   echo "$ac_t""yes" 1>&6
3007   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
3008 else
3009   echo "$ac_t""no" 1>&6
3010 fi
3011
3012
3013   fi
3014 elif test -n "$ld_text_start_addr"; then
3015   start_flags="-T $ld_text_start_addr -e __start"
3016 fi
3017
3018
3019
3020
3021 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
3022  test -z "$linker" &&  linker='$(CC) -nostdlib'
3023  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3024 fi
3025 test "$GCC" != "yes" && lib_gcc=
3026
3027
3028
3029
3030
3031 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3032 if test -n "$site_libraries"; then
3033   for arg in $site_libraries; do
3034     case "$arg" in
3035      -* ) ;;
3036      * ) test -d "$arg" || \
3037            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3038        arg="-L${arg}" ;;
3039     esac
3040     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3041   done
3042 fi
3043
3044 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3045 if test -n "$site_includes"; then
3046   for arg in $site_includes; do
3047     case "$arg" in
3048       -* ) ;;
3049       * ) test -d "$arg" || \
3050            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3051       arg="-I${arg}" ;;
3052     esac
3053     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3054   done
3055 fi
3056
3057 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3058 if test -n "$site_prefixes"; then
3059   for dir in $site_prefixes; do
3060     lib_dir="${dir}/lib"
3061     inc_dir="${dir}/include"
3062     if test ! -d "$dir"; then
3063       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3064     elif test ! -d "$lib_dir"; then
3065       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3066     else
3067       if test -d "$inc_dir"; then
3068         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
3069       fi
3070       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
3071     fi
3072   done
3073 fi
3074
3075
3076 for dir in "/usr/ccs/lib"; do
3077   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
3078 done
3079
3080 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3081 if test -n "$site_runtime_libraries"; then
3082   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3083   export LD_RUN_PATH
3084 fi
3085
3086
3087
3088
3089
3090 if test -n "$add_runtime_path"; then :;
3091 elif test "$dynamic" = "no"; then add_runtime_path=no
3092 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3093 else case "$opsys" in
3094        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3095        * ) add_runtime_path=no ;;
3096      esac
3097 fi
3098
3099 if test "$add_runtime_path" = "yes"; then
3100       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3101 echo "configure:3102: checking "for runtime libraries flag"" >&5
3102   case "$opsys" in
3103     sol2 ) dash_r="-R" ;;
3104     decosf* | linux* | irix*) dash_r="-rpath " ;;
3105     *)
3106       dash_r=""
3107       for try_dash_r in "-R" "-R " "-rpath "; do
3108         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3109         
3110 if test "$GCC" = "yes"; then
3111   set x $xe_check_libs; shift; xe_check_libs=""
3112   while test -n "$1"; do
3113     case $1 in
3114       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3115       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3116       -Xlinker* ) ;;
3117       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3118     esac
3119     shift
3120   done
3121 fi
3122         cat > conftest.$ac_ext <<EOF
3123 #line 3124 "configure"
3124 #include "confdefs.h"
3125
3126 int main() {
3127
3128 ; return 0; }
3129 EOF
3130 if { (eval echo configure:3131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3131   rm -rf conftest*
3132   dash_r="$try_dash_r"
3133 else
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136 fi
3137 rm -f conftest*
3138         xe_check_libs=""
3139         test -n "$dash_r" && break
3140       done ;;
3141   esac
3142   if test -n "$dash_r";
3143     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3144     else echo "$ac_t""NONE" 1>&6
3145   fi
3146 fi
3147
3148 xe_add_unique_runpath_dir='
3149   xe_add_p=yes
3150   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3151   done
3152   if test "$xe_add_p" = "yes"; then
3153     test -n "$runpath" && runpath="${runpath}:"
3154     runpath="${runpath}${xe_runpath_dir}"
3155     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3156   fi'
3157
3158
3159
3160
3161 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3162     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3163   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3164   
3165         runpath="" runpath_dirs=""
3166   if test -n "$LD_RUN_PATH"; then
3167     runpath="$LD_RUN_PATH"
3168   elif test "$GCC" = "yes"; then
3169         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3170     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3171     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3172     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3173       case "$arg" in P,* | -L* | -R* )
3174         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3175           {
3176 xe_runpath_dir="$dir"
3177   test "$xe_runpath_dir" != "/lib"     -a \
3178         "$xe_runpath_dir" != "/usr/lib" -a \
3179         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3180   eval "$xe_add_unique_runpath_dir"
3181 }
3182         done ;;
3183       esac
3184     done
3185     ld_switch_run="$ld_switch_run_save"
3186     rm -f conftest*
3187   else
3188         for arg in $ld_switch_site $ld_switch_x_site; do
3189       case "$arg" in -L*) {
3190 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3191   test "$xe_runpath_dir" != "/lib"     -a \
3192         "$xe_runpath_dir" != "/usr/lib" -a \
3193         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3194   eval "$xe_add_unique_runpath_dir"
3195 };; esac
3196     done
3197         if test "$opsys $need_motif" = "sol2 yes"; then
3198       xe_runpath_dir="/opt/SUNWdt/lib";
3199       eval "$xe_add_unique_runpath_dir";
3200     fi
3201   fi 
3202   if test -n "$runpath"; then
3203     ld_switch_run="${dash_r}${runpath}"
3204     
3205 if test "$GCC" = "yes"; then
3206   set x $ld_switch_run; shift; ld_switch_run=""
3207   while test -n "$1"; do
3208     case $1 in
3209       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3210       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3211       -Xlinker* ) ;;
3212       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3213     esac
3214     shift
3215   done
3216 fi
3217     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3218   fi
3219 fi
3220
3221
3222
3223 GNU_MALLOC=yes
3224 if test "$with_dlmalloc" != "no"; then
3225         doug_lea_malloc=yes
3226 else
3227         doug_lea_malloc=no
3228 fi
3229 after_morecore_hook_exists=yes
3230 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3231 echo "configure:3232: checking for malloc_set_state" >&5
3232
3233 cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 /* System header to define __stub macros and hopefully few prototypes,
3237     which can conflict with char malloc_set_state(); below.  */
3238 #include <assert.h>
3239 /* Override any gcc2 internal prototype to avoid an error.  */
3240 /* We use char because int might match the return type of a gcc2
3241     builtin and then its argument prototype would still apply.  */
3242 char malloc_set_state();
3243
3244 int main() {
3245
3246 /* The GNU C library defines this for functions which it implements
3247     to always fail with ENOSYS.  Some functions are actually named
3248     something starting with __ and the normal name is an alias.  */
3249 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3250 choke me
3251 #else
3252 malloc_set_state();
3253 #endif
3254
3255 ; return 0; }
3256 EOF
3257 if { (eval echo configure:3258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3258   rm -rf conftest*
3259   eval "ac_cv_func_malloc_set_state=yes"
3260 else
3261   echo "configure: failed program was:" >&5
3262   cat conftest.$ac_ext >&5
3263   rm -rf conftest*
3264   eval "ac_cv_func_malloc_set_state=no"
3265 fi
3266 rm -f conftest*
3267
3268 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3269   echo "$ac_t""yes" 1>&6
3270   :
3271 else
3272   echo "$ac_t""no" 1>&6
3273 doug_lea_malloc=no
3274 fi
3275
3276 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3277 echo "configure:3278: checking whether __after_morecore_hook exists" >&5
3278 cat > conftest.$ac_ext <<EOF
3279 #line 3280 "configure"
3280 #include "confdefs.h"
3281 extern void (* __after_morecore_hook)();
3282 int main() {
3283 __after_morecore_hook = 0
3284 ; return 0; }
3285 EOF
3286 if { (eval echo configure:3287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3287   rm -rf conftest*
3288   echo "$ac_t""yes" 1>&6
3289 else
3290   echo "configure: failed program was:" >&5
3291   cat conftest.$ac_ext >&5
3292   rm -rf conftest*
3293   echo "$ac_t""no" 1>&6
3294    after_morecore_hook_exists=no
3295 fi
3296 rm -f conftest*
3297 if test "$system_malloc" = "yes" ; then
3298   GNU_MALLOC=no
3299   GNU_MALLOC_reason="
3300     - The GNU allocators don't work with this system configuration."
3301 elif test "$with_system_malloc" = "yes" ; then
3302   GNU_MALLOC=no
3303   GNU_MALLOC_reason="
3304     - User chose not to use GNU allocators."
3305 elif test "$with_debug_malloc" = "yes" ; then
3306   GNU_MALLOC=no
3307   GNU_MALLOC_reason="
3308     - User chose to use Debugging Malloc."
3309 fi
3310
3311 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3312   GNU_MALLOC_reason="
3313     - Using Doug Lea's new malloc from the GNU C Library."
3314   { test "$extra_verbose" = "yes" && cat << \EOF
3315     Defining DOUG_LEA_MALLOC
3316 EOF
3317 cat >> confdefs.h <<\EOF
3318 #define DOUG_LEA_MALLOC 1
3319 EOF
3320 }
3321
3322   if test "$after_morecore_hook_exists" = "no" ; then
3323     GNU_MALLOC_reason="
3324     - Using Doug Lea's new malloc from the Linux C Library."
3325     { test "$extra_verbose" = "yes" && cat << \EOF
3326     Defining _NO_MALLOC_WARNING_
3327 EOF
3328 cat >> confdefs.h <<\EOF
3329 #define _NO_MALLOC_WARNING_ 1
3330 EOF
3331 }
3332
3333   fi
3334 fi
3335
3336
3337
3338
3339 # Extract the first word of "ranlib", so it can be a program name with args.
3340 set dummy ranlib; ac_word=$2
3341 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3342 echo "configure:3343: checking for $ac_word" >&5
3343
3344 if test -n "$RANLIB"; then
3345   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3346 else
3347   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3348   ac_dummy="$PATH"
3349   for ac_dir in $ac_dummy; do
3350     test -z "$ac_dir" && ac_dir=.
3351     if test -f $ac_dir/$ac_word; then
3352       ac_cv_prog_RANLIB="ranlib"
3353       break
3354     fi
3355   done
3356   IFS="$ac_save_ifs"
3357   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3358 fi
3359 RANLIB="$ac_cv_prog_RANLIB"
3360 if test -n "$RANLIB"; then
3361   echo "$ac_t""$RANLIB" 1>&6
3362 else
3363   echo "$ac_t""no" 1>&6
3364 fi
3365
3366 ac_aux_dir=
3367 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3368   if test -f $ac_dir/install-sh; then
3369     ac_aux_dir=$ac_dir
3370     ac_install_sh="$ac_aux_dir/install-sh -c"
3371     break
3372   elif test -f $ac_dir/install.sh; then
3373     ac_aux_dir=$ac_dir
3374     ac_install_sh="$ac_aux_dir/install.sh -c"
3375     break
3376   fi
3377 done
3378 if test -z "$ac_aux_dir"; then
3379   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3380 fi
3381 ac_config_guess=$ac_aux_dir/config.guess
3382 ac_config_sub=$ac_aux_dir/config.sub
3383 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3384
3385 # Find a good install program.  We prefer a C program (faster),
3386 # so one script is as good as another.  But avoid the broken or
3387 # incompatible versions:
3388 # SysV /etc/install, /usr/sbin/install
3389 # SunOS /usr/etc/install
3390 # IRIX /sbin/install
3391 # AIX /bin/install
3392 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3393 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3394 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3395 # ./install, which can be erroneously created by make from ./install.sh.
3396 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3397 echo "configure:3398: checking for a BSD compatible install" >&5
3398 if test -z "$INSTALL"; then
3399
3400   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3401   for ac_dir in $PATH; do
3402     # Account for people who put trailing slashes in PATH elements.
3403     case "$ac_dir/" in
3404     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3405     *)
3406       # OSF1 and SCO ODT 3.0 have their own names for install.
3407       # Don't use installbsd from OSF since it installs stuff as root
3408       # by default.
3409       for ac_prog in ginstall scoinst install; do
3410         if test -f $ac_dir/$ac_prog; then
3411           if test $ac_prog = install &&
3412             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3413             # AIX install.  It has an incompatible calling convention.
3414             :
3415           else
3416             ac_cv_path_install="$ac_dir/$ac_prog -c"
3417             break 2
3418           fi
3419         fi
3420       done
3421       ;;
3422     esac
3423   done
3424   IFS="$ac_save_IFS"
3425
3426   if test "${ac_cv_path_install+set}" = set; then
3427     INSTALL="$ac_cv_path_install"
3428   else
3429     # As a last resort, use the slow shell script.  We don't cache a
3430     # path for INSTALL within a source directory, because that will
3431     # break other packages using the cache if that directory is
3432     # removed, or if the path is relative.
3433     INSTALL="$ac_install_sh"
3434   fi
3435 fi
3436 echo "$ac_t""$INSTALL" 1>&6
3437
3438 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3439 # It thinks the first close brace ends the variable substitution.
3440 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3441
3442 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3443
3444 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3445
3446 for ac_prog in 'bison -y' byacc
3447 do
3448 # Extract the first word of "$ac_prog", so it can be a program name with args.
3449 set dummy $ac_prog; ac_word=$2
3450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3451 echo "configure:3452: checking for $ac_word" >&5
3452
3453 if test -n "$YACC"; then
3454   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3455 else
3456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3457   ac_dummy="$PATH"
3458   for ac_dir in $ac_dummy; do
3459     test -z "$ac_dir" && ac_dir=.
3460     if test -f $ac_dir/$ac_word; then
3461       ac_cv_prog_YACC="$ac_prog"
3462       break
3463     fi
3464   done
3465   IFS="$ac_save_ifs"
3466 fi
3467 YACC="$ac_cv_prog_YACC"
3468 if test -n "$YACC"; then
3469   echo "$ac_t""$YACC" 1>&6
3470 else
3471   echo "$ac_t""no" 1>&6
3472 fi
3473
3474 test -n "$YACC" && break
3475 done
3476 test -n "$YACC" || YACC="yacc"
3477
3478
3479 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 
3480 do
3481 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3482 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3483 echo "configure:3484: checking for $ac_hdr" >&5
3484
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 #include <$ac_hdr>
3489 EOF
3490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3491 { (eval echo configure:3492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3493 if test -z "$ac_err"; then
3494   rm -rf conftest*
3495   eval "ac_cv_header_$ac_safe=yes"
3496 else
3497   echo "$ac_err" >&5
3498   echo "configure: failed program was:" >&5
3499   cat conftest.$ac_ext >&5
3500   rm -rf conftest*
3501   eval "ac_cv_header_$ac_safe=no"
3502 fi
3503 rm -f conftest*
3504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3505   echo "$ac_t""yes" 1>&6
3506     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3507   { test "$extra_verbose" = "yes" && cat << EOF
3508     Defining $ac_tr_hdr
3509 EOF
3510 cat >> confdefs.h <<EOF
3511 #define $ac_tr_hdr 1
3512 EOF
3513 }
3514  
3515 else
3516   echo "$ac_t""no" 1>&6
3517 fi
3518 done
3519
3520 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3521 echo "configure:3522: checking for sys/wait.h that is POSIX.1 compatible" >&5
3522
3523 cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 #include <sys/types.h>
3527 #include <sys/wait.h>
3528 #ifndef WEXITSTATUS
3529 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3530 #endif
3531 #ifndef WIFEXITED
3532 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3533 #endif
3534 int main() {
3535 int s;
3536 wait (&s);
3537 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3538 ; return 0; }
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3541   rm -rf conftest*
3542   ac_cv_header_sys_wait_h=yes
3543 else
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_header_sys_wait_h=no
3548 fi
3549 rm -f conftest*
3550
3551 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3552 if test $ac_cv_header_sys_wait_h = yes; then
3553   { test "$extra_verbose" = "yes" && cat << \EOF
3554     Defining HAVE_SYS_WAIT_H
3555 EOF
3556 cat >> confdefs.h <<\EOF
3557 #define HAVE_SYS_WAIT_H 1
3558 EOF
3559 }
3560
3561 fi
3562
3563 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3564 echo "configure:3565: checking for ANSI C header files" >&5
3565
3566 cat > conftest.$ac_ext <<EOF
3567 #line 3568 "configure"
3568 #include "confdefs.h"
3569 #include <stdlib.h>
3570 #include <stdarg.h>
3571 #include <string.h>
3572 #include <float.h>
3573 EOF
3574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3575 { (eval echo configure:3576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3577 if test -z "$ac_err"; then
3578   rm -rf conftest*
3579   ac_cv_header_stdc=yes
3580 else
3581   echo "$ac_err" >&5
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   ac_cv_header_stdc=no
3586 fi
3587 rm -f conftest*
3588
3589 if test $ac_cv_header_stdc = yes; then
3590   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3591 cat > conftest.$ac_ext <<EOF
3592 #line 3593 "configure"
3593 #include "confdefs.h"
3594 #include <string.h>
3595 EOF
3596 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3597   egrep "memchr" >/dev/null 2>&1; then
3598   :
3599 else
3600   rm -rf conftest*
3601   ac_cv_header_stdc=no
3602 fi
3603 rm -f conftest*
3604
3605 fi
3606
3607 if test $ac_cv_header_stdc = yes; then
3608   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3609 cat > conftest.$ac_ext <<EOF
3610 #line 3611 "configure"
3611 #include "confdefs.h"
3612 #include <stdlib.h>
3613 EOF
3614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3615   egrep "free" >/dev/null 2>&1; then
3616   :
3617 else
3618   rm -rf conftest*
3619   ac_cv_header_stdc=no
3620 fi
3621 rm -f conftest*
3622
3623 fi
3624
3625 if test $ac_cv_header_stdc = yes; then
3626   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3627 cat > conftest.$ac_ext <<EOF
3628 #line 3629 "configure"
3629 #include "confdefs.h"
3630 #include <ctype.h>
3631 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3632 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3633 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3634 int main () { int i; for (i = 0; i < 256; i++)
3635 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3636 exit (0); }
3637
3638 EOF
3639 if { (eval echo configure:3640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3640 then
3641   :
3642 else
3643   conftest_rc="$?"
3644   echo "configure: failed program was:" >&5
3645   cat conftest.$ac_ext >&5
3646   rm -fr conftest*
3647   ac_cv_header_stdc=no
3648 fi
3649 rm -fr conftest*
3650 fi
3651
3652 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3653 if test $ac_cv_header_stdc = yes; then
3654   { test "$extra_verbose" = "yes" && cat << \EOF
3655     Defining STDC_HEADERS
3656 EOF
3657 cat >> confdefs.h <<\EOF
3658 #define STDC_HEADERS 1
3659 EOF
3660 }
3661
3662 fi
3663
3664 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3665 echo "configure:3666: checking whether time.h and sys/time.h may both be included" >&5
3666
3667 cat > conftest.$ac_ext <<EOF
3668 #line 3669 "configure"
3669 #include "confdefs.h"
3670 #include <sys/types.h>
3671 #include <sys/time.h>
3672 #include <time.h>
3673 int main() {
3674 struct tm *tp;
3675 ; return 0; }
3676 EOF
3677 if { (eval echo configure:3678: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3678   rm -rf conftest*
3679   ac_cv_header_time=yes
3680 else
3681   echo "configure: failed program was:" >&5
3682   cat conftest.$ac_ext >&5
3683   rm -rf conftest*
3684   ac_cv_header_time=no
3685 fi
3686 rm -f conftest*
3687
3688 echo "$ac_t""$ac_cv_header_time" 1>&6
3689 if test $ac_cv_header_time = yes; then
3690   { test "$extra_verbose" = "yes" && cat << \EOF
3691     Defining TIME_WITH_SYS_TIME
3692 EOF
3693 cat >> confdefs.h <<\EOF
3694 #define TIME_WITH_SYS_TIME 1
3695 EOF
3696 }
3697
3698 fi
3699
3700 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3701 echo "configure:3702: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3702
3703 cat > conftest.$ac_ext <<EOF
3704 #line 3705 "configure"
3705 #include "confdefs.h"
3706 #include <sys/types.h>
3707 #include <signal.h>
3708 /* NetBSD declares sys_siglist in unistd.h.  */
3709 #ifdef HAVE_UNISTD_H
3710 #include <unistd.h>
3711 #endif
3712 int main() {
3713 char *msg = *(sys_siglist + 1);
3714 ; return 0; }
3715 EOF
3716 if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3717   rm -rf conftest*
3718   ac_cv_decl_sys_siglist=yes
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   ac_cv_decl_sys_siglist=no
3724 fi
3725 rm -f conftest*
3726
3727 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3728 if test $ac_cv_decl_sys_siglist = yes; then
3729   { test "$extra_verbose" = "yes" && cat << \EOF
3730     Defining SYS_SIGLIST_DECLARED
3731 EOF
3732 cat >> confdefs.h <<\EOF
3733 #define SYS_SIGLIST_DECLARED 1
3734 EOF
3735 }
3736
3737 fi
3738
3739
3740
3741 echo $ac_n "checking for utime""... $ac_c" 1>&6
3742 echo "configure:3743: checking for utime" >&5
3743 cat > conftest.$ac_ext <<EOF
3744 #line 3745 "configure"
3745 #include "confdefs.h"
3746 #include <sys/types.h>
3747 #include <utime.h>
3748 int main() {
3749 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3750 ; return 0; }
3751 EOF
3752 if { (eval echo configure:3753: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3753   rm -rf conftest*
3754   echo "$ac_t""yes" 1>&6
3755    { test "$extra_verbose" = "yes" && cat << \EOF
3756     Defining HAVE_UTIME
3757 EOF
3758 cat >> confdefs.h <<\EOF
3759 #define HAVE_UTIME 1
3760 EOF
3761 }
3762
3763 else
3764   echo "configure: failed program was:" >&5
3765   cat conftest.$ac_ext >&5
3766   rm -rf conftest*
3767   echo "$ac_t""no" 1>&6
3768       for ac_func in utimes
3769 do
3770 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3771 echo "configure:3772: checking for $ac_func" >&5
3772
3773 cat > conftest.$ac_ext <<EOF
3774 #line 3775 "configure"
3775 #include "confdefs.h"
3776 /* System header to define __stub macros and hopefully few prototypes,
3777     which can conflict with char $ac_func(); below.  */
3778 #include <assert.h>
3779 /* Override any gcc2 internal prototype to avoid an error.  */
3780 /* We use char because int might match the return type of a gcc2
3781     builtin and then its argument prototype would still apply.  */
3782 char $ac_func();
3783
3784 int main() {
3785
3786 /* The GNU C library defines this for functions which it implements
3787     to always fail with ENOSYS.  Some functions are actually named
3788     something starting with __ and the normal name is an alias.  */
3789 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3790 choke me
3791 #else
3792 $ac_func();
3793 #endif
3794
3795 ; return 0; }
3796 EOF
3797 if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3798   rm -rf conftest*
3799   eval "ac_cv_func_$ac_func=yes"
3800 else
3801   echo "configure: failed program was:" >&5
3802   cat conftest.$ac_ext >&5
3803   rm -rf conftest*
3804   eval "ac_cv_func_$ac_func=no"
3805 fi
3806 rm -f conftest*
3807
3808 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3809   echo "$ac_t""yes" 1>&6
3810     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3811   { test "$extra_verbose" = "yes" && cat << EOF
3812     Defining $ac_tr_func
3813 EOF
3814 cat >> confdefs.h <<EOF
3815 #define $ac_tr_func 1
3816 EOF
3817 }
3818  
3819 else
3820   echo "$ac_t""no" 1>&6
3821 fi
3822 done
3823
3824 fi
3825 rm -f conftest*
3826
3827
3828 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3829 echo "configure:3830: checking return type of signal handlers" >&5
3830
3831 cat > conftest.$ac_ext <<EOF
3832 #line 3833 "configure"
3833 #include "confdefs.h"
3834 #include <sys/types.h>
3835 #include <signal.h>
3836 #ifdef signal
3837 #undef signal
3838 #endif
3839 #ifdef __cplusplus
3840 extern "C" void (*signal (int, void (*)(int)))(int);
3841 #else
3842 void (*signal ()) ();
3843 #endif
3844
3845 int main() {
3846 int i;
3847 ; return 0; }
3848 EOF
3849 if { (eval echo configure:3850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3850   rm -rf conftest*
3851   ac_cv_type_signal=void
3852 else
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -rf conftest*
3856   ac_cv_type_signal=int
3857 fi
3858 rm -f conftest*
3859
3860 echo "$ac_t""$ac_cv_type_signal" 1>&6
3861 { test "$extra_verbose" = "yes" && cat << EOF
3862     Defining RETSIGTYPE = $ac_cv_type_signal
3863 EOF
3864 cat >> confdefs.h <<EOF
3865 #define RETSIGTYPE $ac_cv_type_signal
3866 EOF
3867 }
3868
3869
3870 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3871 echo "configure:3872: checking for size_t" >&5
3872
3873 cat > conftest.$ac_ext <<EOF
3874 #line 3875 "configure"
3875 #include "confdefs.h"
3876 #include <sys/types.h>
3877 #if STDC_HEADERS
3878 #include <stdlib.h>
3879 #include <stddef.h>
3880 #endif
3881 EOF
3882 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3883   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3884   rm -rf conftest*
3885   ac_cv_type_size_t=yes
3886 else
3887   rm -rf conftest*
3888   ac_cv_type_size_t=no
3889 fi
3890 rm -f conftest*
3891
3892 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3893 if test $ac_cv_type_size_t = no; then
3894   { test "$extra_verbose" = "yes" && cat << \EOF
3895     Defining size_t = unsigned
3896 EOF
3897 cat >> confdefs.h <<\EOF
3898 #define size_t unsigned
3899 EOF
3900 }
3901
3902 fi
3903
3904 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3905 echo "configure:3906: checking for pid_t" >&5
3906
3907 cat > conftest.$ac_ext <<EOF
3908 #line 3909 "configure"
3909 #include "confdefs.h"
3910 #include <sys/types.h>
3911 #if STDC_HEADERS
3912 #include <stdlib.h>
3913 #include <stddef.h>
3914 #endif
3915 EOF
3916 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3917   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3918   rm -rf conftest*
3919   ac_cv_type_pid_t=yes
3920 else
3921   rm -rf conftest*
3922   ac_cv_type_pid_t=no
3923 fi
3924 rm -f conftest*
3925
3926 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3927 if test $ac_cv_type_pid_t = no; then
3928   { test "$extra_verbose" = "yes" && cat << \EOF
3929     Defining pid_t = int
3930 EOF
3931 cat >> confdefs.h <<\EOF
3932 #define pid_t int
3933 EOF
3934 }
3935
3936 fi
3937
3938 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3939 echo "configure:3940: checking for uid_t in sys/types.h" >&5
3940
3941 cat > conftest.$ac_ext <<EOF
3942 #line 3943 "configure"
3943 #include "confdefs.h"
3944 #include <sys/types.h>
3945 EOF
3946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3947   egrep "uid_t" >/dev/null 2>&1; then
3948   rm -rf conftest*
3949   ac_cv_type_uid_t=yes
3950 else
3951   rm -rf conftest*
3952   ac_cv_type_uid_t=no
3953 fi
3954 rm -f conftest*
3955
3956
3957 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3958 if test $ac_cv_type_uid_t = no; then
3959   { test "$extra_verbose" = "yes" && cat << \EOF
3960     Defining uid_t = int
3961 EOF
3962 cat >> confdefs.h <<\EOF
3963 #define uid_t int
3964 EOF
3965 }
3966
3967   { test "$extra_verbose" = "yes" && cat << \EOF
3968     Defining gid_t = int
3969 EOF
3970 cat >> confdefs.h <<\EOF
3971 #define gid_t int
3972 EOF
3973 }
3974
3975 fi
3976
3977 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3978 echo "configure:3979: checking for mode_t" >&5
3979
3980 cat > conftest.$ac_ext <<EOF
3981 #line 3982 "configure"
3982 #include "confdefs.h"
3983 #include <sys/types.h>
3984 #if STDC_HEADERS
3985 #include <stdlib.h>
3986 #include <stddef.h>
3987 #endif
3988 EOF
3989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3990   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3991   rm -rf conftest*
3992   ac_cv_type_mode_t=yes
3993 else
3994   rm -rf conftest*
3995   ac_cv_type_mode_t=no
3996 fi
3997 rm -f conftest*
3998
3999 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
4000 if test $ac_cv_type_mode_t = no; then
4001   { test "$extra_verbose" = "yes" && cat << \EOF
4002     Defining mode_t = int
4003 EOF
4004 cat >> confdefs.h <<\EOF
4005 #define mode_t int
4006 EOF
4007 }
4008
4009 fi
4010
4011 echo $ac_n "checking for off_t""... $ac_c" 1>&6
4012 echo "configure:4013: checking for off_t" >&5
4013
4014 cat > conftest.$ac_ext <<EOF
4015 #line 4016 "configure"
4016 #include "confdefs.h"
4017 #include <sys/types.h>
4018 #if STDC_HEADERS
4019 #include <stdlib.h>
4020 #include <stddef.h>
4021 #endif
4022 EOF
4023 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4024   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4025   rm -rf conftest*
4026   ac_cv_type_off_t=yes
4027 else
4028   rm -rf conftest*
4029   ac_cv_type_off_t=no
4030 fi
4031 rm -f conftest*
4032
4033 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4034 if test $ac_cv_type_off_t = no; then
4035   { test "$extra_verbose" = "yes" && cat << \EOF
4036     Defining off_t = long
4037 EOF
4038 cat >> confdefs.h <<\EOF
4039 #define off_t long
4040 EOF
4041 }
4042
4043 fi
4044
4045 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4046 echo "configure:4047: checking for ssize_t" >&5
4047
4048 cat > conftest.$ac_ext <<EOF
4049 #line 4050 "configure"
4050 #include "confdefs.h"
4051 #include <sys/types.h>
4052 #if STDC_HEADERS
4053 #include <stdlib.h>
4054 #include <stddef.h>
4055 #endif
4056 EOF
4057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4058   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4059   rm -rf conftest*
4060   ac_cv_type_ssize_t=yes
4061 else
4062   rm -rf conftest*
4063   ac_cv_type_ssize_t=no
4064 fi
4065 rm -f conftest*
4066
4067 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4068 if test $ac_cv_type_ssize_t = no; then
4069   { test "$extra_verbose" = "yes" && cat << \EOF
4070     Defining ssize_t = int
4071 EOF
4072 cat >> confdefs.h <<\EOF
4073 #define ssize_t int
4074 EOF
4075 }
4076
4077 fi
4078
4079
4080 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4081 echo "configure:4082: checking for socklen_t" >&5
4082 cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085 #include <sys/types.h>
4086 #include <sys/socket.h>
4087 socklen_t x;
4088
4089 int main() {
4090
4091 ; return 0; }
4092 EOF
4093 if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4094   rm -rf conftest*
4095   echo "$ac_t""yes" 1>&6
4096 else
4097   echo "configure: failed program was:" >&5
4098   cat conftest.$ac_ext >&5
4099   rm -rf conftest*
4100   
4101 cat > conftest.$ac_ext <<EOF
4102 #line 4103 "configure"
4103 #include "confdefs.h"
4104 #include <sys/types.h>
4105 #include <sys/socket.h>
4106 int accept (int, struct sockaddr *, size_t *);
4107
4108 int main() {
4109
4110 ; return 0; }
4111 EOF
4112 if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4113   rm -rf conftest*
4114   
4115 echo "$ac_t""size_t" 1>&6
4116 { test "$extra_verbose" = "yes" && cat << \EOF
4117     Defining socklen_t = size_t
4118 EOF
4119 cat >> confdefs.h <<\EOF
4120 #define socklen_t size_t
4121 EOF
4122 }
4123
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   
4129 echo "$ac_t""int" 1>&6
4130 { test "$extra_verbose" = "yes" && cat << \EOF
4131     Defining socklen_t = int
4132 EOF
4133 cat >> confdefs.h <<\EOF
4134 #define socklen_t int
4135 EOF
4136 }
4137
4138 fi
4139 rm -f conftest*
4140 fi
4141 rm -f conftest*
4142
4143 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4144 echo "configure:4145: checking for struct timeval" >&5
4145 cat > conftest.$ac_ext <<EOF
4146 #line 4147 "configure"
4147 #include "confdefs.h"
4148 #ifdef TIME_WITH_SYS_TIME
4149 #include <sys/time.h>
4150 #include <time.h>
4151 #else
4152 #ifdef HAVE_SYS_TIME_H
4153 #include <sys/time.h>
4154 #else
4155 #include <time.h>
4156 #endif
4157 #endif
4158 int main() {
4159 static struct timeval x; x.tv_sec = x.tv_usec;
4160 ; return 0; }
4161 EOF
4162 if { (eval echo configure:4163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4163   rm -rf conftest*
4164   echo "$ac_t""yes" 1>&6
4165   HAVE_TIMEVAL=yes
4166   { test "$extra_verbose" = "yes" && cat << \EOF
4167     Defining HAVE_TIMEVAL
4168 EOF
4169 cat >> confdefs.h <<\EOF
4170 #define HAVE_TIMEVAL 1
4171 EOF
4172 }
4173
4174 else
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   echo "$ac_t""no" 1>&6
4179    HAVE_TIMEVAL=no
4180 fi
4181 rm -f conftest*
4182
4183 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4184 echo "configure:4185: checking whether struct tm is in sys/time.h or time.h" >&5
4185
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4189 #include <sys/types.h>
4190 #include <time.h>
4191 int main() {
4192 struct tm *tp; tp->tm_sec;
4193 ; return 0; }
4194 EOF
4195 if { (eval echo configure:4196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196   rm -rf conftest*
4197   ac_cv_struct_tm=time.h
4198 else
4199   echo "configure: failed program was:" >&5
4200   cat conftest.$ac_ext >&5
4201   rm -rf conftest*
4202   ac_cv_struct_tm=sys/time.h
4203 fi
4204 rm -f conftest*
4205
4206 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4207 if test $ac_cv_struct_tm = sys/time.h; then
4208   { test "$extra_verbose" = "yes" && cat << \EOF
4209     Defining TM_IN_SYS_TIME
4210 EOF
4211 cat >> confdefs.h <<\EOF
4212 #define TM_IN_SYS_TIME 1
4213 EOF
4214 }
4215
4216 fi
4217
4218 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4219 echo "configure:4220: checking for tm_zone in struct tm" >&5
4220
4221 cat > conftest.$ac_ext <<EOF
4222 #line 4223 "configure"
4223 #include "confdefs.h"
4224 #include <sys/types.h>
4225 #include <$ac_cv_struct_tm>
4226 int main() {
4227 struct tm tm; tm.tm_zone;
4228 ; return 0; }
4229 EOF
4230 if { (eval echo configure:4231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4231   rm -rf conftest*
4232   ac_cv_struct_tm_zone=yes
4233 else
4234   echo "configure: failed program was:" >&5
4235   cat conftest.$ac_ext >&5
4236   rm -rf conftest*
4237   ac_cv_struct_tm_zone=no
4238 fi
4239 rm -f conftest*
4240
4241 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4242 if test "$ac_cv_struct_tm_zone" = yes; then
4243   { test "$extra_verbose" = "yes" && cat << \EOF
4244     Defining HAVE_TM_ZONE
4245 EOF
4246 cat >> confdefs.h <<\EOF
4247 #define HAVE_TM_ZONE 1
4248 EOF
4249 }
4250
4251 else
4252   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4253 echo "configure:4254: checking for tzname" >&5
4254
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <time.h>
4259 #ifndef tzname /* For SGI.  */
4260 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4261 #endif
4262 int main() {
4263 atoi(*tzname);
4264 ; return 0; }
4265 EOF
4266 if { (eval echo configure:4267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4267   rm -rf conftest*
4268   ac_cv_var_tzname=yes
4269 else
4270   echo "configure: failed program was:" >&5
4271   cat conftest.$ac_ext >&5
4272   rm -rf conftest*
4273   ac_cv_var_tzname=no
4274 fi
4275 rm -f conftest*
4276
4277 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4278   if test $ac_cv_var_tzname = yes; then
4279     { test "$extra_verbose" = "yes" && cat << \EOF
4280     Defining HAVE_TZNAME
4281 EOF
4282 cat >> confdefs.h <<\EOF
4283 #define HAVE_TZNAME 1
4284 EOF
4285 }
4286
4287   fi
4288 fi
4289
4290
4291 echo $ac_n "checking for working const""... $ac_c" 1>&6
4292 echo "configure:4293: checking for working const" >&5
4293
4294 cat > conftest.$ac_ext <<EOF
4295 #line 4296 "configure"
4296 #include "confdefs.h"
4297
4298 int main() {
4299
4300 /* Ultrix mips cc rejects this.  */
4301 typedef int charset[2]; const charset x;
4302 /* SunOS 4.1.1 cc rejects this.  */
4303 char const *const *ccp;
4304 char **p;
4305 /* NEC SVR4.0.2 mips cc rejects this.  */
4306 struct point {int x, y;};
4307 static struct point const zero = {0,0};
4308 /* AIX XL C 1.02.0.0 rejects this.
4309    It does not let you subtract one const X* pointer from another in an arm
4310    of an if-expression whose if-part is not a constant expression */
4311 const char *g = "string";
4312 ccp = &g + (g ? g-g : 0);
4313 /* HPUX 7.0 cc rejects these. */
4314 ++ccp;
4315 p = (char**) ccp;
4316 ccp = (char const *const *) p;
4317 { /* SCO 3.2v4 cc rejects this.  */
4318   char *t;
4319   char const *s = 0 ? (char *) 0 : (char const *) 0;
4320
4321   *t++ = 0;
4322 }
4323 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4324   int x[] = {25, 17};
4325   const int *foo = &x[0];
4326   ++foo;
4327 }
4328 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4329   typedef const int *iptr;
4330   iptr p = 0;
4331   ++p;
4332 }
4333 { /* AIX XL C 1.02.0.0 rejects this saying
4334      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4335   struct s { int j; const int *ap[3]; };
4336   struct s *b; b->j = 5;
4337 }
4338 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4339   const int foo = 10;
4340 }
4341
4342 ; return 0; }
4343 EOF
4344 if { (eval echo configure:4345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4345   rm -rf conftest*
4346   ac_cv_c_const=yes
4347 else
4348   echo "configure: failed program was:" >&5
4349   cat conftest.$ac_ext >&5
4350   rm -rf conftest*
4351   ac_cv_c_const=no
4352 fi
4353 rm -f conftest*
4354
4355 echo "$ac_t""$ac_cv_c_const" 1>&6
4356 if test $ac_cv_c_const = no; then
4357   { test "$extra_verbose" = "yes" && cat << \EOF
4358     Defining const = 
4359 EOF
4360 cat >> confdefs.h <<\EOF
4361 #define const 
4362 EOF
4363 }
4364
4365 fi
4366
4367
4368 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4369 echo "configure:4370: checking whether ${MAKE-make} sets \${MAKE}" >&5
4370 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4371
4372 cat > conftestmake <<\EOF
4373 all:
4374         @echo 'ac_maketemp="${MAKE}"'
4375 EOF
4376 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4377 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4378 if test -n "$ac_maketemp"; then
4379   eval ac_cv_prog_make_${ac_make}_set=yes
4380 else
4381   eval ac_cv_prog_make_${ac_make}_set=no
4382 fi
4383 rm -f conftestmake
4384 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4385   echo "$ac_t""yes" 1>&6
4386   SET_MAKE=
4387 else
4388   echo "$ac_t""no" 1>&6
4389   SET_MAKE="MAKE=${MAKE-make}"
4390 fi
4391
4392
4393 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4394 echo "configure:4395: checking whether byte ordering is bigendian" >&5
4395
4396 ac_cv_c_bigendian=unknown
4397 # See if sys/param.h defines the BYTE_ORDER macro.
4398 cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 #include <sys/types.h>
4402 #include <sys/param.h>
4403 int main() {
4404
4405 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4406  bogus endian macros
4407 #endif
4408 ; return 0; }
4409 EOF
4410 if { (eval echo configure:4411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4411   rm -rf conftest*
4412   # It does; now see whether it defined to BIG_ENDIAN or not.
4413 cat > conftest.$ac_ext <<EOF
4414 #line 4415 "configure"
4415 #include "confdefs.h"
4416 #include <sys/types.h>
4417 #include <sys/param.h>
4418 int main() {
4419
4420 #if BYTE_ORDER != BIG_ENDIAN
4421  not big endian
4422 #endif
4423 ; return 0; }
4424 EOF
4425 if { (eval echo configure:4426: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4426   rm -rf conftest*
4427   ac_cv_c_bigendian=yes
4428 else
4429   echo "configure: failed program was:" >&5
4430   cat conftest.$ac_ext >&5
4431   rm -rf conftest*
4432   ac_cv_c_bigendian=no
4433 fi
4434 rm -f conftest*
4435 else
4436   echo "configure: failed program was:" >&5
4437   cat conftest.$ac_ext >&5
4438 fi
4439 rm -f conftest*
4440 if test $ac_cv_c_bigendian = unknown; then
4441 cat > conftest.$ac_ext <<EOF
4442 #line 4443 "configure"
4443 #include "confdefs.h"
4444 main () {
4445   /* Are we little or big endian?  From Harbison&Steele.  */
4446   union
4447   {
4448     long l;
4449     char c[sizeof (long)];
4450   } u;
4451   u.l = 1;
4452   exit (u.c[sizeof (long) - 1] == 1);
4453 }
4454 EOF
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4456 then
4457   ac_cv_c_bigendian=no
4458 else
4459   conftest_rc="$?"
4460   echo "configure: failed program was:" >&5
4461   cat conftest.$ac_ext >&5
4462   rm -fr conftest*
4463   ac_cv_c_bigendian=yes
4464 fi
4465 rm -fr conftest*
4466 fi
4467
4468 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4469 if test $ac_cv_c_bigendian = yes; then
4470   { test "$extra_verbose" = "yes" && cat << \EOF
4471     Defining WORDS_BIGENDIAN
4472 EOF
4473 cat >> confdefs.h <<\EOF
4474 #define WORDS_BIGENDIAN 1
4475 EOF
4476 }
4477
4478 fi
4479
4480
4481 echo $ac_n "checking size of short""... $ac_c" 1>&6
4482 echo "configure:4483: checking size of short" >&5
4483
4484 cat > conftest.$ac_ext <<EOF
4485 #line 4486 "configure"
4486 #include "confdefs.h"
4487 #include <stdio.h>
4488 #include <sys/types.h>
4489 main()
4490 {
4491   FILE *f=fopen("conftestval", "w");
4492   if (!f) exit(1);
4493   fprintf(f, "%d\n", sizeof(short));
4494   exit(0);
4495 }
4496 EOF
4497 if { (eval echo configure:4498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4498 then
4499   ac_cv_sizeof_short=`cat conftestval`
4500 else
4501   conftest_rc="$?"
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -fr conftest*
4505   ac_cv_sizeof_short=0
4506 fi
4507 rm -fr conftest*
4508 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4509 { test "$extra_verbose" = "yes" && cat << EOF
4510     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4511 EOF
4512 cat >> confdefs.h <<EOF
4513 #define SIZEOF_SHORT $ac_cv_sizeof_short
4514 EOF
4515 }
4516
4517
4518 if test "$ac_cv_sizeof_short" = 0; then
4519   echo ""
4520   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4521   echo "*** PANIC *** Please examine config.log for compilation errors."
4522   exit 1
4523 fi
4524 echo $ac_n "checking size of int""... $ac_c" 1>&6
4525 echo "configure:4526: checking size of int" >&5
4526
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <stdio.h>
4531 #include <sys/types.h>
4532 main()
4533 {
4534   FILE *f=fopen("conftestval", "w");
4535   if (!f) exit(1);
4536   fprintf(f, "%d\n", sizeof(int));
4537   exit(0);
4538 }
4539 EOF
4540 if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4541 then
4542   ac_cv_sizeof_int=`cat conftestval`
4543 else
4544   conftest_rc="$?"
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -fr conftest*
4548   ac_cv_sizeof_int=0
4549 fi
4550 rm -fr conftest*
4551 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4552 { test "$extra_verbose" = "yes" && cat << EOF
4553     Defining SIZEOF_INT = $ac_cv_sizeof_int
4554 EOF
4555 cat >> confdefs.h <<EOF
4556 #define SIZEOF_INT $ac_cv_sizeof_int
4557 EOF
4558 }
4559
4560
4561 echo $ac_n "checking size of long""... $ac_c" 1>&6
4562 echo "configure:4563: checking size of long" >&5
4563
4564 cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <stdio.h>
4568 #include <sys/types.h>
4569 main()
4570 {
4571   FILE *f=fopen("conftestval", "w");
4572   if (!f) exit(1);
4573   fprintf(f, "%d\n", sizeof(long));
4574   exit(0);
4575 }
4576 EOF
4577 if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4578 then
4579   ac_cv_sizeof_long=`cat conftestval`
4580 else
4581   conftest_rc="$?"
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -fr conftest*
4585   ac_cv_sizeof_long=0
4586 fi
4587 rm -fr conftest*
4588 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4589 { test "$extra_verbose" = "yes" && cat << EOF
4590     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4591 EOF
4592 cat >> confdefs.h <<EOF
4593 #define SIZEOF_LONG $ac_cv_sizeof_long
4594 EOF
4595 }
4596
4597
4598 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4599 echo "configure:4600: checking size of long long" >&5
4600
4601 cat > conftest.$ac_ext <<EOF
4602 #line 4603 "configure"
4603 #include "confdefs.h"
4604 #include <stdio.h>
4605 #include <sys/types.h>
4606 main()
4607 {
4608   FILE *f=fopen("conftestval", "w");
4609   if (!f) exit(1);
4610   fprintf(f, "%d\n", sizeof(long long));
4611   exit(0);
4612 }
4613 EOF
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4615 then
4616   ac_cv_sizeof_long_long=`cat conftestval`
4617 else
4618   conftest_rc="$?"
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -fr conftest*
4622   ac_cv_sizeof_long_long=0
4623 fi
4624 rm -fr conftest*
4625 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4626 { test "$extra_verbose" = "yes" && cat << EOF
4627     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4628 EOF
4629 cat >> confdefs.h <<EOF
4630 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4631 EOF
4632 }
4633
4634
4635 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4636 echo "configure:4637: checking size of void *" >&5
4637
4638 cat > conftest.$ac_ext <<EOF
4639 #line 4640 "configure"
4640 #include "confdefs.h"
4641 #include <stdio.h>
4642 #include <sys/types.h>
4643 main()
4644 {
4645   FILE *f=fopen("conftestval", "w");
4646   if (!f) exit(1);
4647   fprintf(f, "%d\n", sizeof(void *));
4648   exit(0);
4649 }
4650 EOF
4651 if { (eval echo configure:4652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4652 then
4653   ac_cv_sizeof_void_p=`cat conftestval`
4654 else
4655   conftest_rc="$?"
4656   echo "configure: failed program was:" >&5
4657   cat conftest.$ac_ext >&5
4658   rm -fr conftest*
4659   ac_cv_sizeof_void_p=0
4660 fi
4661 rm -fr conftest*
4662 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4663 { test "$extra_verbose" = "yes" && cat << EOF
4664     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4665 EOF
4666 cat >> confdefs.h <<EOF
4667 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4668 EOF
4669 }
4670
4671
4672
4673 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4674 echo "configure:4675: checking for long file names" >&5
4675
4676 ac_cv_sys_long_file_names=yes
4677 # Test for long file names in all the places we know might matter:
4678 #      .                the current directory, where building will happen
4679 #      $prefix/lib      where we will be installing things
4680 #      $exec_prefix/lib likewise
4681 # eval it to expand exec_prefix.
4682 #      $TMPDIR          if set, where it might want to write temporary files
4683 # if $TMPDIR is not set:
4684 #      /tmp             where it might want to write temporary files
4685 #      /var/tmp         likewise
4686 #      /usr/tmp         likewise
4687 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4688   ac_tmpdirs="$TMPDIR"
4689 else
4690   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4691 fi
4692 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4693   test -d $ac_dir || continue
4694   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4695   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4696   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4697   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4698   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4699     ac_cv_sys_long_file_names=no
4700     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4701     break
4702   fi
4703   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4704 done
4705
4706 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4707 if test $ac_cv_sys_long_file_names = yes; then
4708   { test "$extra_verbose" = "yes" && cat << \EOF
4709     Defining HAVE_LONG_FILE_NAMES
4710 EOF
4711 cat >> confdefs.h <<\EOF
4712 #define HAVE_LONG_FILE_NAMES 1
4713 EOF
4714 }
4715
4716 fi
4717
4718
4719 echo $ac_n "checking for sin""... $ac_c" 1>&6
4720 echo "configure:4721: checking for sin" >&5
4721
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 /* System header to define __stub macros and hopefully few prototypes,
4726     which can conflict with char sin(); below.  */
4727 #include <assert.h>
4728 /* Override any gcc2 internal prototype to avoid an error.  */
4729 /* We use char because int might match the return type of a gcc2
4730     builtin and then its argument prototype would still apply.  */
4731 char sin();
4732
4733 int main() {
4734
4735 /* The GNU C library defines this for functions which it implements
4736     to always fail with ENOSYS.  Some functions are actually named
4737     something starting with __ and the normal name is an alias.  */
4738 #if defined (__stub_sin) || defined (__stub___sin)
4739 choke me
4740 #else
4741 sin();
4742 #endif
4743
4744 ; return 0; }
4745 EOF
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4747   rm -rf conftest*
4748   eval "ac_cv_func_sin=yes"
4749 else
4750   echo "configure: failed program was:" >&5
4751   cat conftest.$ac_ext >&5
4752   rm -rf conftest*
4753   eval "ac_cv_func_sin=no"
4754 fi
4755 rm -f conftest*
4756
4757 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4758   echo "$ac_t""yes" 1>&6
4759   :
4760 else
4761   echo "$ac_t""no" 1>&6
4762
4763 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4764 echo "configure:4765: checking for sin in -lm" >&5
4765 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4766
4767 xe_check_libs=" -lm "
4768 cat > conftest.$ac_ext <<EOF
4769 #line 4770 "configure"
4770 #include "confdefs.h"
4771 /* Override any gcc2 internal prototype to avoid an error.  */
4772 /* We use char because int might match the return type of a gcc2
4773     builtin and then its argument prototype would still apply.  */
4774 char sin();
4775
4776 int main() {
4777 sin()
4778 ; return 0; }
4779 EOF
4780 if { (eval echo configure:4781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4781   rm -rf conftest*
4782   eval "ac_cv_lib_$ac_lib_var=yes"
4783 else
4784   echo "configure: failed program was:" >&5
4785   cat conftest.$ac_ext >&5
4786   rm -rf conftest*
4787   eval "ac_cv_lib_$ac_lib_var=no"
4788 fi
4789 rm -f conftest*
4790 xe_check_libs=""
4791
4792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4793   echo "$ac_t""yes" 1>&6
4794     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4795     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4796   { test "$extra_verbose" = "yes" && cat << EOF
4797     Defining $ac_tr_lib
4798 EOF
4799 cat >> confdefs.h <<EOF
4800 #define $ac_tr_lib 1
4801 EOF
4802 }
4803
4804   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4805
4806 else
4807   echo "$ac_t""no" 1>&6
4808 fi
4809
4810
4811 fi
4812
4813
4814 { test "$extra_verbose" = "yes" && cat << \EOF
4815     Defining LISP_FLOAT_TYPE
4816 EOF
4817 cat >> confdefs.h <<\EOF
4818 #define LISP_FLOAT_TYPE 1
4819 EOF
4820 }
4821
4822
4823 cat > conftest.$ac_ext <<EOF
4824 #line 4825 "configure"
4825 #include "confdefs.h"
4826 #include <math.h>
4827 int main() {
4828 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4829 ; return 0; }
4830 EOF
4831 if { (eval echo configure:4832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4832   rm -rf conftest*
4833   { test "$extra_verbose" = "yes" && cat << \EOF
4834     Defining HAVE_INVERSE_HYPERBOLIC
4835 EOF
4836 cat >> confdefs.h <<\EOF
4837 #define HAVE_INVERSE_HYPERBOLIC 1
4838 EOF
4839 }
4840
4841 else
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844 fi
4845 rm -f conftest*
4846
4847 echo "checking type of mail spool file locking" 1>&6
4848 echo "configure:4849: checking type of mail spool file locking" >&5
4849 for ac_func in lockf flock
4850 do
4851 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4852 echo "configure:4853: checking for $ac_func" >&5
4853
4854 cat > conftest.$ac_ext <<EOF
4855 #line 4856 "configure"
4856 #include "confdefs.h"
4857 /* System header to define __stub macros and hopefully few prototypes,
4858     which can conflict with char $ac_func(); below.  */
4859 #include <assert.h>
4860 /* Override any gcc2 internal prototype to avoid an error.  */
4861 /* We use char because int might match the return type of a gcc2
4862     builtin and then its argument prototype would still apply.  */
4863 char $ac_func();
4864
4865 int main() {
4866
4867 /* The GNU C library defines this for functions which it implements
4868     to always fail with ENOSYS.  Some functions are actually named
4869     something starting with __ and the normal name is an alias.  */
4870 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4871 choke me
4872 #else
4873 $ac_func();
4874 #endif
4875
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   eval "ac_cv_func_$ac_func=yes"
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_func_$ac_func=no"
4886 fi
4887 rm -f conftest*
4888
4889 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4890   echo "$ac_t""yes" 1>&6
4891     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4892   { test "$extra_verbose" = "yes" && cat << EOF
4893     Defining $ac_tr_func
4894 EOF
4895 cat >> confdefs.h <<EOF
4896 #define $ac_tr_func 1
4897 EOF
4898 }
4899  
4900 else
4901   echo "$ac_t""no" 1>&6
4902 fi
4903 done
4904
4905 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4906 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4907 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4908 if   test -z "$mail_locking"; then
4909   case "$opsys" in cygwin* | mingw*)
4910     mail_locking=pop ;;
4911   esac
4912 fi
4913
4914 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4915     Defining MAIL_LOCK_LOCKF
4916 EOF
4917 cat >> confdefs.h <<\EOF
4918 #define MAIL_LOCK_LOCKF 1
4919 EOF
4920 }
4921
4922 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4923     Defining MAIL_LOCK_FLOCK
4924 EOF
4925 cat >> confdefs.h <<\EOF
4926 #define MAIL_LOCK_FLOCK 1
4927 EOF
4928 }
4929
4930 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4931     Defining MAIL_LOCK_LOCKING
4932 EOF
4933 cat >> confdefs.h <<\EOF
4934 #define MAIL_LOCK_LOCKING 1
4935 EOF
4936 }
4937
4938 elif test "$mail_locking" = "pop"; then
4939   with_pop=yes
4940   mail_locking=
4941 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4942     Defining MAIL_LOCK_DOT
4943 EOF
4944 cat >> confdefs.h <<\EOF
4945 #define MAIL_LOCK_DOT 1
4946 EOF
4947 }
4948
4949 fi
4950 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4951   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4952 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4953   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4954 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4955   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4956
4957 case "$opsys" in decosf*)
4958   
4959 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4960 echo "configure:4961: checking for cma_open in -lpthreads" >&5
4961 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4962
4963 xe_check_libs=" -lpthreads "
4964 cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967 /* Override any gcc2 internal prototype to avoid an error.  */
4968 /* We use char because int might match the return type of a gcc2
4969     builtin and then its argument prototype would still apply.  */
4970 char cma_open();
4971
4972 int main() {
4973 cma_open()
4974 ; return 0; }
4975 EOF
4976 if { (eval echo configure:4977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4977   rm -rf conftest*
4978   eval "ac_cv_lib_$ac_lib_var=yes"
4979 else
4980   echo "configure: failed program was:" >&5
4981   cat conftest.$ac_ext >&5
4982   rm -rf conftest*
4983   eval "ac_cv_lib_$ac_lib_var=no"
4984 fi
4985 rm -f conftest*
4986 xe_check_libs=""
4987
4988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4989   echo "$ac_t""yes" 1>&6
4990     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4992   { test "$extra_verbose" = "yes" && cat << EOF
4993     Defining $ac_tr_lib
4994 EOF
4995 cat >> confdefs.h <<EOF
4996 #define $ac_tr_lib 1
4997 EOF
4998 }
4999
5000   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
5001
5002 else
5003   echo "$ac_t""no" 1>&6
5004 fi
5005
5006
5007   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
5008     c_switch_site="$c_switch_site -threads" ;;
5009 esac
5010
5011
5012 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
5013 echo "configure:5014: checking whether the -xildoff compiler flag is required" >&5
5014 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
5015   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
5016     then echo "$ac_t""no" 1>&6;
5017     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
5018   fi
5019   else echo "$ac_t""no" 1>&6
5020 fi
5021
5022 if test "$opsys" = "sol2"; then
5023   if test "$os_release" -ge 56; then
5024     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
5025 echo "configure:5026: checking for \"-z ignore\" linker flag" >&5
5026     case "`ld -h 2>&1`" in
5027       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5028         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5029       *) echo "$ac_t""no" 1>&6 ;;
5030     esac
5031   fi
5032 fi
5033
5034
5035 echo "checking "for specified window system"" 1>&6
5036 echo "configure:5037: checking "for specified window system"" >&5
5037
5038
5039 GNOME_CONFIG=no
5040 GTK_CONFIG=no
5041
5042 if test "$with_gnome" != "no"; then
5043    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5044 echo "configure:5045: checking for GNOME configuration script" >&5
5045    for possible in gnome-config
5046    do
5047       possible_version=`${possible} --version 2> /dev/null`
5048       if test "x${possible_version}" != "x"; then
5049               GNOME_CONFIG="${possible}"
5050               with_gnome=yes
5051               with_gtk=yes
5052               break
5053       fi
5054    done
5055    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5056 fi
5057
5058 if test "${GNOME_CONFIG}" != "no"; then
5059       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5060       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5061       { test "$extra_verbose" = "yes" && cat << \EOF
5062     Defining HAVE_GNOME
5063 EOF
5064 cat >> confdefs.h <<\EOF
5065 #define HAVE_GNOME 1
5066 EOF
5067 }
5068
5069       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5070       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5071 fi
5072
5073 if test "$with_gtk" != "no";then
5074    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5075 echo "configure:5076: checking for GTK configuration script" >&5
5076    for possible in gtk12-config gtk14-config gtk-config
5077    do
5078       possible_version=`${possible} --version 2> /dev/null`
5079       if test "x${possible_version}" != "x"; then
5080               GTK_CONFIG="${possible}"
5081       fi
5082       case "${possible_version}" in
5083         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5084         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5085         1.2.*)
5086                 with_gtk=yes
5087                 break
5088                 ;;
5089         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5090       esac
5091    done
5092    echo "$ac_t""${GTK_CONFIG}" 1>&6
5093 fi
5094
5095 if test "${GTK_CONFIG}" != "no"; then
5096       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5097 echo "configure:5098: checking gtk version" >&5
5098       GTK_VERSION=`${GTK_CONFIG} --version`
5099       echo "$ac_t""${GTK_VERSION}" 1>&6
5100
5101       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5102 echo "configure:5103: checking gtk libs" >&5
5103       GTK_LIBS=`${GTK_CONFIG} --libs`
5104       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5105       echo "$ac_t""${GTK_LIBS}" 1>&6
5106
5107       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5108 echo "configure:5109: checking gtk cflags" >&5
5109       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5110       if test "$GCC" = "yes"; then
5111         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5112       fi
5113       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5114       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5115
5116       
5117 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5118 echo "configure:5119: checking for main in -lgdk_imlib" >&5
5119 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5120
5121 xe_check_libs=" -lgdk_imlib "
5122 cat > conftest.$ac_ext <<EOF
5123 #line 5124 "configure"
5124 #include "confdefs.h"
5125
5126 int main() {
5127 main()
5128 ; return 0; }
5129 EOF
5130 if { (eval echo configure:5131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5131   rm -rf conftest*
5132   eval "ac_cv_lib_$ac_lib_var=yes"
5133 else
5134   echo "configure: failed program was:" >&5
5135   cat conftest.$ac_ext >&5
5136   rm -rf conftest*
5137   eval "ac_cv_lib_$ac_lib_var=no"
5138 fi
5139 rm -f conftest*
5140 xe_check_libs=""
5141
5142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5143   echo "$ac_t""yes" 1>&6
5144   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5145 else
5146   echo "$ac_t""no" 1>&6
5147 fi
5148
5149
5150       
5151 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5152 echo "configure:5153: checking for Imlib_init in -lImlib" >&5
5153 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5154
5155 xe_check_libs=" -lImlib "
5156 cat > conftest.$ac_ext <<EOF
5157 #line 5158 "configure"
5158 #include "confdefs.h"
5159 /* Override any gcc2 internal prototype to avoid an error.  */
5160 /* We use char because int might match the return type of a gcc2
5161     builtin and then its argument prototype would still apply.  */
5162 char Imlib_init();
5163
5164 int main() {
5165 Imlib_init()
5166 ; return 0; }
5167 EOF
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169   rm -rf conftest*
5170   eval "ac_cv_lib_$ac_lib_var=yes"
5171 else
5172   echo "configure: failed program was:" >&5
5173   cat conftest.$ac_ext >&5
5174   rm -rf conftest*
5175   eval "ac_cv_lib_$ac_lib_var=no"
5176 fi
5177 rm -f conftest*
5178 xe_check_libs=""
5179
5180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5181   echo "$ac_t""yes" 1>&6
5182   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5183 else
5184   echo "$ac_t""no" 1>&6
5185 fi
5186
5187
5188       for ac_func in gdk_imlib_init
5189 do
5190 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5191 echo "configure:5192: checking for $ac_func" >&5
5192
5193 cat > conftest.$ac_ext <<EOF
5194 #line 5195 "configure"
5195 #include "confdefs.h"
5196 /* System header to define __stub macros and hopefully few prototypes,
5197     which can conflict with char $ac_func(); below.  */
5198 #include <assert.h>
5199 /* Override any gcc2 internal prototype to avoid an error.  */
5200 /* We use char because int might match the return type of a gcc2
5201     builtin and then its argument prototype would still apply.  */
5202 char $ac_func();
5203
5204 int main() {
5205
5206 /* The GNU C library defines this for functions which it implements
5207     to always fail with ENOSYS.  Some functions are actually named
5208     something starting with __ and the normal name is an alias.  */
5209 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5210 choke me
5211 #else
5212 $ac_func();
5213 #endif
5214
5215 ; return 0; }
5216 EOF
5217 if { (eval echo configure:5218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5218   rm -rf conftest*
5219   eval "ac_cv_func_$ac_func=yes"
5220 else
5221   echo "configure: failed program was:" >&5
5222   cat conftest.$ac_ext >&5
5223   rm -rf conftest*
5224   eval "ac_cv_func_$ac_func=no"
5225 fi
5226 rm -f conftest*
5227
5228 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5229   echo "$ac_t""yes" 1>&6
5230     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5231   { test "$extra_verbose" = "yes" && cat << EOF
5232     Defining $ac_tr_func
5233 EOF
5234 cat >> confdefs.h <<EOF
5235 #define $ac_tr_func 1
5236 EOF
5237 }
5238  
5239 else
5240   echo "$ac_t""no" 1>&6
5241 fi
5242 done
5243
5244
5245       { test "$extra_verbose" = "yes" && cat << \EOF
5246     Defining HAVE_XPM
5247 EOF
5248 cat >> confdefs.h <<\EOF
5249 #define HAVE_XPM 1
5250 EOF
5251 }
5252
5253       { test "$extra_verbose" = "yes" && cat << \EOF
5254     Defining HAVE_GTK
5255 EOF
5256 cat >> confdefs.h <<\EOF
5257 #define HAVE_GTK 1
5258 EOF
5259 }
5260
5261       
5262
5263       window_system=gtk
5264       with_gtk=yes
5265       with_x11=no
5266
5267       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5268       test "${with_toolbars}" != no && with_toolbars=gtk
5269       test "${with_menubars}" != "no" && with_menubars=gtk
5270       test "${with_dialogs}" != "no" && with_dialogs=gtk
5271       test "${with_widgets}" != "no" && with_widgets=gtk
5272
5273       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5274    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5275  fi
5276       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5277    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5278  fi
5279       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5280    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5281  fi
5282       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5283    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5284  fi
5285
5286             OLD_CFLAGS="${CFLAGS}"
5287       OLD_CPPFLAGS="${CPPFLAGS}"
5288       OLD_LDFLAGS="${LDFLAGS}"
5289       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5290       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5291       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5292       for ac_hdr in glade/glade.h glade.h
5293 do
5294 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5295 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5296 echo "configure:5297: checking for $ac_hdr" >&5
5297
5298 cat > conftest.$ac_ext <<EOF
5299 #line 5300 "configure"
5300 #include "confdefs.h"
5301 #include <$ac_hdr>
5302 EOF
5303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5304 { (eval echo configure:5305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5306 if test -z "$ac_err"; then
5307   rm -rf conftest*
5308   eval "ac_cv_header_$ac_safe=yes"
5309 else
5310   echo "$ac_err" >&5
5311   echo "configure: failed program was:" >&5
5312   cat conftest.$ac_ext >&5
5313   rm -rf conftest*
5314   eval "ac_cv_header_$ac_safe=no"
5315 fi
5316 rm -f conftest*
5317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5318   echo "$ac_t""yes" 1>&6
5319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5320   { test "$extra_verbose" = "yes" && cat << EOF
5321     Defining $ac_tr_hdr
5322 EOF
5323 cat >> confdefs.h <<EOF
5324 #define $ac_tr_hdr 1
5325 EOF
5326 }
5327  
5328 else
5329   echo "$ac_t""no" 1>&6
5330 fi
5331 done
5332
5333       
5334 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5335 echo "configure:5336: checking for main in -lxml" >&5
5336 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5337
5338 xe_check_libs=" -lxml "
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5342
5343 int main() {
5344 main()
5345 ; return 0; }
5346 EOF
5347 if { (eval echo configure:5348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5348   rm -rf conftest*
5349   eval "ac_cv_lib_$ac_lib_var=yes"
5350 else
5351   echo "configure: failed program was:" >&5
5352   cat conftest.$ac_ext >&5
5353   rm -rf conftest*
5354   eval "ac_cv_lib_$ac_lib_var=no"
5355 fi
5356 rm -f conftest*
5357 xe_check_libs=""
5358
5359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5360   echo "$ac_t""yes" 1>&6
5361   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5362 else
5363   echo "$ac_t""no" 1>&6
5364 fi
5365
5366
5367       
5368 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5369 echo "configure:5370: checking for main in -lglade" >&5
5370 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5371
5372 xe_check_libs=" -lglade "
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5376
5377 int main() {
5378 main()
5379 ; return 0; }
5380 EOF
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5382   rm -rf conftest*
5383   eval "ac_cv_lib_$ac_lib_var=yes"
5384 else
5385   echo "configure: failed program was:" >&5
5386   cat conftest.$ac_ext >&5
5387   rm -rf conftest*
5388   eval "ac_cv_lib_$ac_lib_var=no"
5389 fi
5390 rm -f conftest*
5391 xe_check_libs=""
5392
5393 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5394   echo "$ac_t""yes" 1>&6
5395   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399
5400
5401       
5402 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5403 echo "configure:5404: checking for main in -lglade-gnome" >&5
5404 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5405
5406 xe_check_libs=" -lglade-gnome "
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410
5411 int main() {
5412 main()
5413 ; return 0; }
5414 EOF
5415 if { (eval echo configure:5416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5416   rm -rf conftest*
5417   eval "ac_cv_lib_$ac_lib_var=yes"
5418 else
5419   echo "configure: failed program was:" >&5
5420   cat conftest.$ac_ext >&5
5421   rm -rf conftest*
5422   eval "ac_cv_lib_$ac_lib_var=no"
5423 fi
5424 rm -f conftest*
5425 xe_check_libs=""
5426
5427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5428   echo "$ac_t""yes" 1>&6
5429   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5430 else
5431   echo "$ac_t""no" 1>&6
5432 fi
5433
5434
5435       cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 #include <glade/glade-xml.h>
5439 EOF
5440 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5441   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5442   rm -rf conftest*
5443   echo "$ac_t""yes" 1>&6
5444                        { test "$extra_verbose" = "yes" && cat << \EOF
5445     Defining LIBGLADE_XML_TXTDOMAIN = 1
5446 EOF
5447 cat >> confdefs.h <<\EOF
5448 #define LIBGLADE_XML_TXTDOMAIN 1
5449 EOF
5450 }
5451
5452 else
5453   rm -rf conftest*
5454   echo "$ac_t""no" 1>&6
5455 fi
5456 rm -f conftest*
5457
5458       CFLAGS="${OLD_CFLAGS}"
5459       CPPFLAGS="${OLD_CPPFLAGS}"
5460       LDFLAGS="${OLD_LDFLAGS}"
5461 fi
5462
5463
5464 if test "$with_x11" != "no"; then
5465     test "$x_includes $x_libraries" != "NONE NONE" && \
5466    window_system=x11 with_x11=yes
5467
5468         
5469       if test "$x_includes $x_libraries" = "NONE NONE" \
5470     -a -n "$OPENWINHOME" \
5471     -a "$OPENWINHOME" != "/usr/openwin" \
5472     -a -d "$OPENWINHOME"; then
5473       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5474       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5475       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5476   fi
5477
5478   if test "$x_includes" = "NONE"; then
5479                     for dir in "/usr/X11" "/usr/X11R6"; do
5480       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5481     done
5482   fi
5483
5484   if test "$x_libraries" = "NONE"; then
5485     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5486       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5487     done
5488   fi
5489
5490   # If we find X, set shell vars x_includes and x_libraries to the
5491 # paths, otherwise set no_x=yes.
5492 # Uses ac_ vars as temps to allow command line to override cache and checks.
5493 # --without-x overrides everything else, but does not touch the cache.
5494 echo $ac_n "checking for X""... $ac_c" 1>&6
5495 echo "configure:5496: checking for X" >&5
5496
5497 # Check whether --with-x or --without-x was given.
5498 if test "${with_x+set}" = set; then
5499   withval="$with_x"
5500   :
5501 fi
5502
5503 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5504 if test "x$with_x" = xno; then
5505   # The user explicitly disabled X.
5506   have_x=disabled
5507 else
5508   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5509     # Both variables are already set.
5510     have_x=yes
5511   else
5512
5513 # One or both of the vars are not set, and there is no cached value.
5514 ac_x_includes=NO ac_x_libraries=NO
5515 rm -fr conftestdir
5516 if mkdir conftestdir; then
5517   cd conftestdir
5518   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5519   cat > Imakefile <<'EOF'
5520 acfindx:
5521         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5522 EOF
5523   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5524     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5525     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5526     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5527     for ac_extension in a so sl; do
5528       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5529         test -f $ac_im_libdir/libX11.$ac_extension; then
5530         ac_im_usrlibdir=$ac_im_libdir; break
5531       fi
5532     done
5533     # Screen out bogus values from the imake configuration.  They are
5534     # bogus both because they are the default anyway, and because
5535     # using them would break gcc on systems where it needs fixed includes.
5536     case "$ac_im_incroot" in
5537         /usr/include) ;;
5538         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5539     esac
5540     case "$ac_im_usrlibdir" in
5541         /usr/lib | /lib) ;;
5542         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5543     esac
5544   fi
5545   cd ..
5546   rm -fr conftestdir
5547 fi
5548
5549 if test "$ac_x_includes" = NO; then
5550   # Guess where to find include files, by looking for this one X11 .h file.
5551   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5552
5553   # First, try using that file with no special directory specified.
5554 cat > conftest.$ac_ext <<EOF
5555 #line 5556 "configure"
5556 #include "confdefs.h"
5557 #include <$x_direct_test_include>
5558 EOF
5559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5560 { (eval echo configure:5561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5562 if test -z "$ac_err"; then
5563   rm -rf conftest*
5564   # We can compile using X headers with no special include directory.
5565 ac_x_includes=
5566 else
5567   echo "$ac_err" >&5
5568   echo "configure: failed program was:" >&5
5569   cat conftest.$ac_ext >&5
5570   rm -rf conftest*
5571   # Look for the header file in a standard set of common directories.
5572 # Check X11 before X11Rn because it is often a symlink to the current release.
5573   for ac_dir in               \
5574     /usr/X11/include          \
5575     /usr/X11R6/include        \
5576     /usr/X11R5/include        \
5577     /usr/X11R4/include        \
5578                               \
5579     /usr/include/X11          \
5580     /usr/include/X11R6        \
5581     /usr/include/X11R5        \
5582     /usr/include/X11R4        \
5583                               \
5584     /usr/local/X11/include    \
5585     /usr/local/X11R6/include  \
5586     /usr/local/X11R5/include  \
5587     /usr/local/X11R4/include  \
5588                               \
5589     /usr/local/include/X11    \
5590     /usr/local/include/X11R6  \
5591     /usr/local/include/X11R5  \
5592     /usr/local/include/X11R4  \
5593                               \
5594     /usr/X386/include         \
5595     /usr/x386/include         \
5596     /usr/XFree86/include/X11  \
5597                               \
5598     /usr/include              \
5599     /usr/local/include        \
5600     /usr/unsupported/include  \
5601     /usr/athena/include       \
5602     /usr/local/x11r5/include  \
5603     /usr/lpp/Xamples/include  \
5604                               \
5605     /usr/openwin/include      \
5606     /usr/openwin/share/include \
5607     ; \
5608   do
5609     if test -r "$ac_dir/$x_direct_test_include"; then
5610       ac_x_includes=$ac_dir
5611       break
5612     fi
5613   done
5614 fi
5615 rm -f conftest*
5616 fi # $ac_x_includes = NO
5617
5618 if test "$ac_x_libraries" = NO; then
5619   # Check for the libraries.
5620
5621   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5622   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5623
5624   # See if we find them without any special options.
5625   # Don't add to $LIBS permanently.
5626   ac_save_LIBS="$LIBS"
5627   LIBS="-l$x_direct_test_library $LIBS"
5628 cat > conftest.$ac_ext <<EOF
5629 #line 5630 "configure"
5630 #include "confdefs.h"
5631
5632 int main() {
5633 ${x_direct_test_function}()
5634 ; return 0; }
5635 EOF
5636 if { (eval echo configure:5637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5637   rm -rf conftest*
5638   LIBS="$ac_save_LIBS"
5639 # We can link X programs with no special library path.
5640 ac_x_libraries=
5641 else
5642   echo "configure: failed program was:" >&5
5643   cat conftest.$ac_ext >&5
5644   rm -rf conftest*
5645   LIBS="$ac_save_LIBS"
5646 # First see if replacing the include by lib works.
5647 # Check X11 before X11Rn because it is often a symlink to the current release.
5648 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5649     /usr/X11/lib          \
5650     /usr/X11R6/lib        \
5651     /usr/X11R5/lib        \
5652     /usr/X11R4/lib        \
5653                           \
5654     /usr/lib/X11          \
5655     /usr/lib/X11R6        \
5656     /usr/lib/X11R5        \
5657     /usr/lib/X11R4        \
5658                           \
5659     /usr/local/X11/lib    \
5660     /usr/local/X11R6/lib  \
5661     /usr/local/X11R5/lib  \
5662     /usr/local/X11R4/lib  \
5663                           \
5664     /usr/local/lib/X11    \
5665     /usr/local/lib/X11R6  \
5666     /usr/local/lib/X11R5  \
5667     /usr/local/lib/X11R4  \
5668                           \
5669     /usr/X386/lib         \
5670     /usr/x386/lib         \
5671     /usr/XFree86/lib/X11  \
5672                           \
5673     /usr/lib              \
5674     /usr/local/lib        \
5675     /usr/unsupported/lib  \
5676     /usr/athena/lib       \
5677     /usr/local/x11r5/lib  \
5678     /usr/lpp/Xamples/lib  \
5679     /lib/usr/lib/X11      \
5680                           \
5681     /usr/openwin/lib      \
5682     /usr/openwin/share/lib \
5683     ; \
5684 do
5685   for ac_extension in a so sl; do
5686     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5687       ac_x_libraries=$ac_dir
5688       break 2
5689     fi
5690   done
5691 done
5692 fi
5693 rm -f conftest*
5694 fi # $ac_x_libraries = NO
5695
5696 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5697   # Didn't find X anywhere.  Cache the known absence of X.
5698   ac_cv_have_x="have_x=no"
5699 else
5700   # Record where we found X for the cache.
5701   ac_cv_have_x="have_x=yes \
5702                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5703 fi
5704   fi
5705   eval "$ac_cv_have_x"
5706 fi # $with_x != no
5707
5708 if test "$have_x" != yes; then
5709   echo "$ac_t""$have_x" 1>&6
5710   no_x=yes
5711 else
5712   # If each of the values was on the command line, it overrides each guess.
5713   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5714   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5715   # Update the cache value to reflect the command line values.
5716   ac_cv_have_x="have_x=yes \
5717                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5718   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5719 fi
5720
5721 if test "$no_x" = yes; then
5722   # Not all programs may use this symbol, but it does not hurt to define it.
5723   { test "$extra_verbose" = "yes" && cat << \EOF
5724     Defining X_DISPLAY_MISSING
5725 EOF
5726 cat >> confdefs.h <<\EOF
5727 #define X_DISPLAY_MISSING 1
5728 EOF
5729 }
5730
5731   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5732 else
5733   if test -n "$x_includes"; then
5734     X_CFLAGS="$X_CFLAGS -I$x_includes"
5735   fi
5736
5737   # It would also be nice to do this for all -L options, not just this one.
5738   if test -n "$x_libraries"; then
5739     X_LIBS="$X_LIBS -L$x_libraries"
5740     # For Solaris; some versions of Sun CC require a space after -R and
5741     # others require no space.  Words are not sufficient . . . .
5742     case "`(uname -sr) 2>/dev/null`" in
5743     "SunOS 5"*)
5744       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5745 echo "configure:5746: checking whether -R must be followed by a space" >&5
5746       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5747       cat > conftest.$ac_ext <<EOF
5748 #line 5749 "configure"
5749 #include "confdefs.h"
5750
5751 int main() {
5752
5753 ; return 0; }
5754 EOF
5755 if { (eval echo configure:5756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5756   rm -rf conftest*
5757   ac_R_nospace=yes
5758 else
5759   echo "configure: failed program was:" >&5
5760   cat conftest.$ac_ext >&5
5761   rm -rf conftest*
5762   ac_R_nospace=no
5763 fi
5764 rm -f conftest*
5765       if test $ac_R_nospace = yes; then
5766         echo "$ac_t""no" 1>&6
5767         X_LIBS="$X_LIBS -R$x_libraries"
5768       else
5769         LIBS="$ac_xsave_LIBS -R $x_libraries"
5770         cat > conftest.$ac_ext <<EOF
5771 #line 5772 "configure"
5772 #include "confdefs.h"
5773
5774 int main() {
5775
5776 ; return 0; }
5777 EOF
5778 if { (eval echo configure:5779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5779   rm -rf conftest*
5780   ac_R_space=yes
5781 else
5782   echo "configure: failed program was:" >&5
5783   cat conftest.$ac_ext >&5
5784   rm -rf conftest*
5785   ac_R_space=no
5786 fi
5787 rm -f conftest*
5788         if test $ac_R_space = yes; then
5789           echo "$ac_t""yes" 1>&6
5790           X_LIBS="$X_LIBS -R $x_libraries"
5791         else
5792           echo "$ac_t""neither works" 1>&6
5793         fi
5794       fi
5795       LIBS="$ac_xsave_LIBS"
5796     esac
5797   fi
5798
5799   # Check for system-dependent libraries X programs must link with.
5800   # Do this before checking for the system-independent R6 libraries
5801   # (-lICE), since we may need -lsocket or whatever for X linking.
5802
5803   if test "$ISC" = yes; then
5804     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5805   else
5806     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5807     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5808     # the Alpha needs dnet_stub (dnet does not exist).
5809     if test "$with_dnet" = "no" ; then
5810 ac_cv_lib_dnet_dnet_ntoa=no
5811 else
5812
5813 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5814 echo "configure:5815: checking for dnet_ntoa in -ldnet" >&5
5815 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5816
5817 xe_check_libs=" -ldnet "
5818 cat > conftest.$ac_ext <<EOF
5819 #line 5820 "configure"
5820 #include "confdefs.h"
5821 /* Override any gcc2 internal prototype to avoid an error.  */
5822 /* We use char because int might match the return type of a gcc2
5823     builtin and then its argument prototype would still apply.  */
5824 char dnet_ntoa();
5825
5826 int main() {
5827 dnet_ntoa()
5828 ; return 0; }
5829 EOF
5830 if { (eval echo configure:5831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5831   rm -rf conftest*
5832   eval "ac_cv_lib_$ac_lib_var=yes"
5833 else
5834   echo "configure: failed program was:" >&5
5835   cat conftest.$ac_ext >&5
5836   rm -rf conftest*
5837   eval "ac_cv_lib_$ac_lib_var=no"
5838 fi
5839 rm -f conftest*
5840 xe_check_libs=""
5841
5842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5843   echo "$ac_t""yes" 1>&6
5844   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5845 else
5846   echo "$ac_t""no" 1>&6
5847 fi
5848
5849 fi
5850
5851     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5852       
5853 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5854 echo "configure:5855: checking for dnet_ntoa in -ldnet_stub" >&5
5855 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5856
5857 xe_check_libs=" -ldnet_stub "
5858 cat > conftest.$ac_ext <<EOF
5859 #line 5860 "configure"
5860 #include "confdefs.h"
5861 /* Override any gcc2 internal prototype to avoid an error.  */
5862 /* We use char because int might match the return type of a gcc2
5863     builtin and then its argument prototype would still apply.  */
5864 char dnet_ntoa();
5865
5866 int main() {
5867 dnet_ntoa()
5868 ; return 0; }
5869 EOF
5870 if { (eval echo configure:5871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5871   rm -rf conftest*
5872   eval "ac_cv_lib_$ac_lib_var=yes"
5873 else
5874   echo "configure: failed program was:" >&5
5875   cat conftest.$ac_ext >&5
5876   rm -rf conftest*
5877   eval "ac_cv_lib_$ac_lib_var=no"
5878 fi
5879 rm -f conftest*
5880 xe_check_libs=""
5881
5882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5883   echo "$ac_t""yes" 1>&6
5884   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5885 else
5886   echo "$ac_t""no" 1>&6
5887 fi
5888
5889
5890     fi
5891
5892     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5893     # to get the SysV transport functions.
5894     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5895     # needs -lnsl.
5896     # The nsl library prevents programs from opening the X display
5897     # on Irix 5.2, according to dickey@clark.net.
5898     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5899 echo "configure:5900: checking for gethostbyname" >&5
5900
5901 cat > conftest.$ac_ext <<EOF
5902 #line 5903 "configure"
5903 #include "confdefs.h"
5904 /* System header to define __stub macros and hopefully few prototypes,
5905     which can conflict with char gethostbyname(); below.  */
5906 #include <assert.h>
5907 /* Override any gcc2 internal prototype to avoid an error.  */
5908 /* We use char because int might match the return type of a gcc2
5909     builtin and then its argument prototype would still apply.  */
5910 char gethostbyname();
5911
5912 int main() {
5913
5914 /* The GNU C library defines this for functions which it implements
5915     to always fail with ENOSYS.  Some functions are actually named
5916     something starting with __ and the normal name is an alias.  */
5917 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5918 choke me
5919 #else
5920 gethostbyname();
5921 #endif
5922
5923 ; return 0; }
5924 EOF
5925 if { (eval echo configure:5926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5926   rm -rf conftest*
5927   eval "ac_cv_func_gethostbyname=yes"
5928 else
5929   echo "configure: failed program was:" >&5
5930   cat conftest.$ac_ext >&5
5931   rm -rf conftest*
5932   eval "ac_cv_func_gethostbyname=no"
5933 fi
5934 rm -f conftest*
5935
5936 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5937   echo "$ac_t""yes" 1>&6
5938   :
5939 else
5940   echo "$ac_t""no" 1>&6
5941 fi
5942
5943     if test $ac_cv_func_gethostbyname = no; then
5944       
5945 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5946 echo "configure:5947: checking for gethostbyname in -lnsl" >&5
5947 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5948
5949 xe_check_libs=" -lnsl "
5950 cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* Override any gcc2 internal prototype to avoid an error.  */
5954 /* We use char because int might match the return type of a gcc2
5955     builtin and then its argument prototype would still apply.  */
5956 char gethostbyname();
5957
5958 int main() {
5959 gethostbyname()
5960 ; return 0; }
5961 EOF
5962 if { (eval echo configure:5963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5963   rm -rf conftest*
5964   eval "ac_cv_lib_$ac_lib_var=yes"
5965 else
5966   echo "configure: failed program was:" >&5
5967   cat conftest.$ac_ext >&5
5968   rm -rf conftest*
5969   eval "ac_cv_lib_$ac_lib_var=no"
5970 fi
5971 rm -f conftest*
5972 xe_check_libs=""
5973
5974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5975   echo "$ac_t""yes" 1>&6
5976   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5977 else
5978   echo "$ac_t""no" 1>&6
5979 fi
5980
5981
5982     fi
5983
5984     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5985     # socket/setsockopt and other routines are undefined under SCO ODT
5986     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5987     # on later versions), says simon@lia.di.epfl.ch: it contains
5988     # gethostby* variants that don't use the nameserver (or something).
5989     # -lsocket must be given before -lnsl if both are needed.
5990     # We assume that if connect needs -lnsl, so does gethostbyname.
5991     echo $ac_n "checking for connect""... $ac_c" 1>&6
5992 echo "configure:5993: checking for connect" >&5
5993
5994 cat > conftest.$ac_ext <<EOF
5995 #line 5996 "configure"
5996 #include "confdefs.h"
5997 /* System header to define __stub macros and hopefully few prototypes,
5998     which can conflict with char connect(); below.  */
5999 #include <assert.h>
6000 /* Override any gcc2 internal prototype to avoid an error.  */
6001 /* We use char because int might match the return type of a gcc2
6002     builtin and then its argument prototype would still apply.  */
6003 char connect();
6004
6005 int main() {
6006
6007 /* The GNU C library defines this for functions which it implements
6008     to always fail with ENOSYS.  Some functions are actually named
6009     something starting with __ and the normal name is an alias.  */
6010 #if defined (__stub_connect) || defined (__stub___connect)
6011 choke me
6012 #else
6013 connect();
6014 #endif
6015
6016 ; return 0; }
6017 EOF
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6019   rm -rf conftest*
6020   eval "ac_cv_func_connect=yes"
6021 else
6022   echo "configure: failed program was:" >&5
6023   cat conftest.$ac_ext >&5
6024   rm -rf conftest*
6025   eval "ac_cv_func_connect=no"
6026 fi
6027 rm -f conftest*
6028
6029 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6030   echo "$ac_t""yes" 1>&6
6031   :
6032 else
6033   echo "$ac_t""no" 1>&6
6034 fi
6035
6036     if test $ac_cv_func_connect = no; then
6037       
6038 xe_msg_checking="for connect in -lsocket"
6039 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6040 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6041 echo "configure:6042: checking "$xe_msg_checking"" >&5
6042 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6043
6044 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6045 cat > conftest.$ac_ext <<EOF
6046 #line 6047 "configure"
6047 #include "confdefs.h"
6048 /* Override any gcc2 internal prototype to avoid an error.  */
6049 /* We use char because int might match the return type of a gcc2
6050     builtin and then its argument prototype would still apply.  */
6051 char connect();
6052
6053 int main() {
6054 connect()
6055 ; return 0; }
6056 EOF
6057 if { (eval echo configure:6058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6058   rm -rf conftest*
6059   eval "ac_cv_lib_$ac_lib_var=yes"
6060 else
6061   echo "configure: failed program was:" >&5
6062   cat conftest.$ac_ext >&5
6063   rm -rf conftest*
6064   eval "ac_cv_lib_$ac_lib_var=no"
6065 fi
6066 rm -f conftest*
6067 xe_check_libs=""
6068
6069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6070   echo "$ac_t""yes" 1>&6
6071   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6072 else
6073   echo "$ac_t""no" 1>&6
6074 fi
6075
6076
6077     fi
6078
6079     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6080     echo $ac_n "checking for remove""... $ac_c" 1>&6
6081 echo "configure:6082: checking for remove" >&5
6082
6083 cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 /* System header to define __stub macros and hopefully few prototypes,
6087     which can conflict with char remove(); below.  */
6088 #include <assert.h>
6089 /* Override any gcc2 internal prototype to avoid an error.  */
6090 /* We use char because int might match the return type of a gcc2
6091     builtin and then its argument prototype would still apply.  */
6092 char remove();
6093
6094 int main() {
6095
6096 /* The GNU C library defines this for functions which it implements
6097     to always fail with ENOSYS.  Some functions are actually named
6098     something starting with __ and the normal name is an alias.  */
6099 #if defined (__stub_remove) || defined (__stub___remove)
6100 choke me
6101 #else
6102 remove();
6103 #endif
6104
6105 ; return 0; }
6106 EOF
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6108   rm -rf conftest*
6109   eval "ac_cv_func_remove=yes"
6110 else
6111   echo "configure: failed program was:" >&5
6112   cat conftest.$ac_ext >&5
6113   rm -rf conftest*
6114   eval "ac_cv_func_remove=no"
6115 fi
6116 rm -f conftest*
6117
6118 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6119   echo "$ac_t""yes" 1>&6
6120   :
6121 else
6122   echo "$ac_t""no" 1>&6
6123 fi
6124
6125     if test $ac_cv_func_remove = no; then
6126       
6127 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6128 echo "configure:6129: checking for remove in -lposix" >&5
6129 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6130
6131 xe_check_libs=" -lposix "
6132 cat > conftest.$ac_ext <<EOF
6133 #line 6134 "configure"
6134 #include "confdefs.h"
6135 /* Override any gcc2 internal prototype to avoid an error.  */
6136 /* We use char because int might match the return type of a gcc2
6137     builtin and then its argument prototype would still apply.  */
6138 char remove();
6139
6140 int main() {
6141 remove()
6142 ; return 0; }
6143 EOF
6144 if { (eval echo configure:6145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6145   rm -rf conftest*
6146   eval "ac_cv_lib_$ac_lib_var=yes"
6147 else
6148   echo "configure: failed program was:" >&5
6149   cat conftest.$ac_ext >&5
6150   rm -rf conftest*
6151   eval "ac_cv_lib_$ac_lib_var=no"
6152 fi
6153 rm -f conftest*
6154 xe_check_libs=""
6155
6156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6157   echo "$ac_t""yes" 1>&6
6158   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6159 else
6160   echo "$ac_t""no" 1>&6
6161 fi
6162
6163
6164     fi
6165
6166     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6167     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6168 echo "configure:6169: checking for shmat" >&5
6169
6170 cat > conftest.$ac_ext <<EOF
6171 #line 6172 "configure"
6172 #include "confdefs.h"
6173 /* System header to define __stub macros and hopefully few prototypes,
6174     which can conflict with char shmat(); below.  */
6175 #include <assert.h>
6176 /* Override any gcc2 internal prototype to avoid an error.  */
6177 /* We use char because int might match the return type of a gcc2
6178     builtin and then its argument prototype would still apply.  */
6179 char shmat();
6180
6181 int main() {
6182
6183 /* The GNU C library defines this for functions which it implements
6184     to always fail with ENOSYS.  Some functions are actually named
6185     something starting with __ and the normal name is an alias.  */
6186 #if defined (__stub_shmat) || defined (__stub___shmat)
6187 choke me
6188 #else
6189 shmat();
6190 #endif
6191
6192 ; return 0; }
6193 EOF
6194 if { (eval echo configure:6195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6195   rm -rf conftest*
6196   eval "ac_cv_func_shmat=yes"
6197 else
6198   echo "configure: failed program was:" >&5
6199   cat conftest.$ac_ext >&5
6200   rm -rf conftest*
6201   eval "ac_cv_func_shmat=no"
6202 fi
6203 rm -f conftest*
6204
6205 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6206   echo "$ac_t""yes" 1>&6
6207   :
6208 else
6209   echo "$ac_t""no" 1>&6
6210 fi
6211
6212     if test $ac_cv_func_shmat = no; then
6213       
6214 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6215 echo "configure:6216: checking for shmat in -lipc" >&5
6216 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6217
6218 xe_check_libs=" -lipc "
6219 cat > conftest.$ac_ext <<EOF
6220 #line 6221 "configure"
6221 #include "confdefs.h"
6222 /* Override any gcc2 internal prototype to avoid an error.  */
6223 /* We use char because int might match the return type of a gcc2
6224     builtin and then its argument prototype would still apply.  */
6225 char shmat();
6226
6227 int main() {
6228 shmat()
6229 ; return 0; }
6230 EOF
6231 if { (eval echo configure:6232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6232   rm -rf conftest*
6233   eval "ac_cv_lib_$ac_lib_var=yes"
6234 else
6235   echo "configure: failed program was:" >&5
6236   cat conftest.$ac_ext >&5
6237   rm -rf conftest*
6238   eval "ac_cv_lib_$ac_lib_var=no"
6239 fi
6240 rm -f conftest*
6241 xe_check_libs=""
6242
6243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6244   echo "$ac_t""yes" 1>&6
6245   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6246 else
6247   echo "$ac_t""no" 1>&6
6248 fi
6249
6250
6251     fi
6252   fi
6253
6254   # Check for libraries that X11R6 Xt/Xaw programs need.
6255   ac_save_LDFLAGS="$LDFLAGS"
6256   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6257   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6258   # check for ICE first), but we must link in the order -lSM -lICE or
6259   # we get undefined symbols.  So assume we have SM if we have ICE.
6260   # These have to be linked with before -lX11, unlike the other
6261   # libraries we check for below, so use a different variable.
6262   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6263   
6264 xe_msg_checking="for IceConnectionNumber in -lICE"
6265 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6266 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6267 echo "configure:6268: checking "$xe_msg_checking"" >&5
6268 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6269
6270 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6271 cat > conftest.$ac_ext <<EOF
6272 #line 6273 "configure"
6273 #include "confdefs.h"
6274 /* Override any gcc2 internal prototype to avoid an error.  */
6275 /* We use char because int might match the return type of a gcc2
6276     builtin and then its argument prototype would still apply.  */
6277 char IceConnectionNumber();
6278
6279 int main() {
6280 IceConnectionNumber()
6281 ; return 0; }
6282 EOF
6283 if { (eval echo configure:6284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6284   rm -rf conftest*
6285   eval "ac_cv_lib_$ac_lib_var=yes"
6286 else
6287   echo "configure: failed program was:" >&5
6288   cat conftest.$ac_ext >&5
6289   rm -rf conftest*
6290   eval "ac_cv_lib_$ac_lib_var=no"
6291 fi
6292 rm -f conftest*
6293 xe_check_libs=""
6294
6295 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6296   echo "$ac_t""yes" 1>&6
6297   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6298 else
6299   echo "$ac_t""no" 1>&6
6300 fi
6301
6302
6303   LDFLAGS="$ac_save_LDFLAGS"
6304
6305 fi
6306  # Autoconf claims to find X library and include dirs for us.
6307   if test "$no_x" = "yes"
6308   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6309   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6310   fi
6311 fi
6312
6313
6314 if test "$with_x11" = "yes"; then
6315   { test "$extra_verbose" = "yes" && cat << \EOF
6316     Defining HAVE_X_WINDOWS
6317 EOF
6318 cat >> confdefs.h <<\EOF
6319 #define HAVE_X_WINDOWS 1
6320 EOF
6321 }
6322
6323   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6324   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6325
6326       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6327     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6328     if test -d "$lib_dir" -a -d "$inc_dir"; then
6329       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6330         x_libraries="$lib_dir $x_libraries"
6331         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6332       esac
6333       case "$x_includes" in "$inc_dir"* ) ;; *)
6334         x_includes="$inc_dir $x_includes"
6335         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6336       esac
6337       break;       fi
6338   done
6339
6340     for rel in "X11R6" "X11R5" "X11R4"; do
6341     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6342     if test -d "$lib_dir" -a -d "$inc_dir"; then
6343       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6344         x_libraries="$x_libraries $lib_dir"
6345         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6346       esac
6347       case "$x_includes" in "$inc_dir"* ) ;; *)
6348         x_includes="$x_includes $inc_dir"
6349         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6350       esac
6351       break;     fi
6352   done
6353
6354     case "$opsys" in
6355   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 ;;
6356   esac
6357
6358   ld_switch_x_site="$X_LIBS"
6359
6360   
6361 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6362     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6363   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6364   
6365         runpath="" runpath_dirs=""
6366   if test -n "$LD_RUN_PATH"; then
6367     runpath="$LD_RUN_PATH"
6368   elif test "$GCC" = "yes"; then
6369         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6370     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6371     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6372     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6373       case "$arg" in P,* | -L* | -R* )
6374         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6375           {
6376 xe_runpath_dir="$dir"
6377   test "$xe_runpath_dir" != "/lib"     -a \
6378         "$xe_runpath_dir" != "/usr/lib" -a \
6379         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6380   eval "$xe_add_unique_runpath_dir"
6381 }
6382         done ;;
6383       esac
6384     done
6385     ld_switch_run="$ld_switch_run_save"
6386     rm -f conftest*
6387   else
6388         for arg in $ld_switch_site $ld_switch_x_site; do
6389       case "$arg" in -L*) {
6390 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6391   test "$xe_runpath_dir" != "/lib"     -a \
6392         "$xe_runpath_dir" != "/usr/lib" -a \
6393         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6394   eval "$xe_add_unique_runpath_dir"
6395 };; esac
6396     done
6397         if test "$opsys $need_motif" = "sol2 yes"; then
6398       xe_runpath_dir="/opt/SUNWdt/lib";
6399       eval "$xe_add_unique_runpath_dir";
6400     fi
6401   fi 
6402   if test -n "$runpath"; then
6403     ld_switch_run="${dash_r}${runpath}"
6404     
6405 if test "$GCC" = "yes"; then
6406   set x $ld_switch_run; shift; ld_switch_run=""
6407   while test -n "$1"; do
6408     case $1 in
6409       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6410       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6411       -Xlinker* ) ;;
6412       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6413     esac
6414     shift
6415   done
6416 fi
6417     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6418   fi
6419 fi
6420
6421
6422   if test "$extra_verbose" = "yes"; then
6423     echo; echo "X11 compilation variables:"
6424     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6425     echo
6426   fi
6427
6428             bitmapdirs=
6429   if test "$x_includes" != NONE; then
6430     for i in $x_includes; do
6431       if test -d "$i/bitmaps"; then
6432         bitmapdirs="$i/bitmaps:$bitmapdirs"
6433       fi
6434       if test -d "$i/X11/bitmaps"; then
6435         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6436       fi
6437     done
6438     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6439   fi
6440   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6441     Defining BITMAPDIR = "$bitmapdirs"
6442 EOF
6443 cat >> confdefs.h <<EOF
6444 #define BITMAPDIR "$bitmapdirs"
6445 EOF
6446 }
6447
6448
6449     echo "checking for X defines extracted by xmkmf" 1>&6
6450 echo "configure:6451: checking for X defines extracted by xmkmf" >&5
6451   rm -fr conftestdir
6452   if mkdir conftestdir; then
6453     cd conftestdir
6454     cat > Imakefile <<'EOF'
6455 xetest:
6456         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6457 EOF
6458     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6459       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6460       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6461     fi
6462     cd ..
6463     rm -fr conftestdir
6464     for word in $xmkmf_defines; do
6465       case "$word" in 
6466       -D__STDC__*) ;;
6467       -D* )
6468         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6469         case "$word" in
6470           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6471           *     ) val=1 ;;
6472         esac
6473         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6474           if test "$val" = "1"
6475             then { test "$extra_verbose" = "yes" && cat << EOF
6476     Defining $sym
6477 EOF
6478 cat >> confdefs.h <<EOF
6479 #define $sym 1
6480 EOF
6481 }
6482
6483             else { test "$extra_verbose" = "yes" && cat << EOF
6484     Defining $sym = $val
6485 EOF
6486 cat >> confdefs.h <<EOF
6487 #define $sym $val
6488 EOF
6489 }
6490
6491           fi
6492         fi  ;;
6493       esac
6494     done
6495   fi
6496
6497     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6498 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6499 echo "configure:6500: checking for X11/Intrinsic.h" >&5
6500
6501 cat > conftest.$ac_ext <<EOF
6502 #line 6503 "configure"
6503 #include "confdefs.h"
6504 #include <X11/Intrinsic.h>
6505 EOF
6506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6507 { (eval echo configure:6508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6509 if test -z "$ac_err"; then
6510   rm -rf conftest*
6511   eval "ac_cv_header_$ac_safe=yes"
6512 else
6513   echo "$ac_err" >&5
6514   echo "configure: failed program was:" >&5
6515   cat conftest.$ac_ext >&5
6516   rm -rf conftest*
6517   eval "ac_cv_header_$ac_safe=no"
6518 fi
6519 rm -f conftest*
6520 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6521   echo "$ac_t""yes" 1>&6
6522   :
6523 else
6524   echo "$ac_t""no" 1>&6
6525 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6526 fi
6527
6528
6529       
6530 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6531 echo "configure:6532: checking for XOpenDisplay in -lX11" >&5
6532 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6533
6534 xe_check_libs=" -lX11 "
6535 cat > conftest.$ac_ext <<EOF
6536 #line 6537 "configure"
6537 #include "confdefs.h"
6538 /* Override any gcc2 internal prototype to avoid an error.  */
6539 /* We use char because int might match the return type of a gcc2
6540     builtin and then its argument prototype would still apply.  */
6541 char XOpenDisplay();
6542
6543 int main() {
6544 XOpenDisplay()
6545 ; return 0; }
6546 EOF
6547 if { (eval echo configure:6548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6548   rm -rf conftest*
6549   eval "ac_cv_lib_$ac_lib_var=yes"
6550 else
6551   echo "configure: failed program was:" >&5
6552   cat conftest.$ac_ext >&5
6553   rm -rf conftest*
6554   eval "ac_cv_lib_$ac_lib_var=no"
6555 fi
6556 rm -f conftest*
6557 xe_check_libs=""
6558
6559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6560   echo "$ac_t""yes" 1>&6
6561   have_lib_x11=yes
6562 else
6563   echo "$ac_t""no" 1>&6
6564 fi
6565
6566
6567   if test "$have_lib_x11" != "yes"; then
6568     
6569 xe_msg_checking="for XGetFontProperty in -lX11"
6570 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6571 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6572 echo "configure:6573: checking "$xe_msg_checking"" >&5
6573 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6574
6575 xe_check_libs=" -lX11 -b i486-linuxaout"
6576 cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* Override any gcc2 internal prototype to avoid an error.  */
6580 /* We use char because int might match the return type of a gcc2
6581     builtin and then its argument prototype would still apply.  */
6582 char XGetFontProperty();
6583
6584 int main() {
6585 XGetFontProperty()
6586 ; return 0; }
6587 EOF
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=yes"
6591 else
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   eval "ac_cv_lib_$ac_lib_var=no"
6596 fi
6597 rm -f conftest*
6598 xe_check_libs=""
6599
6600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6601   echo "$ac_t""yes" 1>&6
6602   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6603 else
6604   echo "$ac_t""no" 1>&6
6605 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6606 fi
6607
6608
6609   fi
6610   libs_x="-lX11"
6611   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6612
6613     
6614 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6615 echo "configure:6616: checking for XShapeSelectInput in -lXext" >&5
6616 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6617
6618 xe_check_libs=" -lXext "
6619 cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* Override any gcc2 internal prototype to avoid an error.  */
6623 /* We use char because int might match the return type of a gcc2
6624     builtin and then its argument prototype would still apply.  */
6625 char XShapeSelectInput();
6626
6627 int main() {
6628 XShapeSelectInput()
6629 ; return 0; }
6630 EOF
6631 if { (eval echo configure:6632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=yes"
6634 else
6635   echo "configure: failed program was:" >&5
6636   cat conftest.$ac_ext >&5
6637   rm -rf conftest*
6638   eval "ac_cv_lib_$ac_lib_var=no"
6639 fi
6640 rm -f conftest*
6641 xe_check_libs=""
6642
6643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6644   echo "$ac_t""yes" 1>&6
6645   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6646 else
6647   echo "$ac_t""no" 1>&6
6648 fi
6649
6650
6651
6652     
6653 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6654 echo "configure:6655: checking for XtOpenDisplay in -lXt" >&5
6655 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6656
6657 xe_check_libs=" -lXt "
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* Override any gcc2 internal prototype to avoid an error.  */
6662 /* We use char because int might match the return type of a gcc2
6663     builtin and then its argument prototype would still apply.  */
6664 char XtOpenDisplay();
6665
6666 int main() {
6667 XtOpenDisplay()
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6671   rm -rf conftest*
6672   eval "ac_cv_lib_$ac_lib_var=yes"
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   eval "ac_cv_lib_$ac_lib_var=no"
6678 fi
6679 rm -f conftest*
6680 xe_check_libs=""
6681
6682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6683   echo "$ac_t""yes" 1>&6
6684   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6685 else
6686   echo "$ac_t""no" 1>&6
6687 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6688 fi
6689
6690
6691
6692   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6693 echo "configure:6694: checking the version of X11 being used" >&5
6694   cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 #include <X11/Intrinsic.h>
6698     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6699 EOF
6700 if { (eval echo configure:6701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6701 then
6702   ./conftest foobar; x11_release=$?
6703 else
6704   conftest_rc="$?"
6705   echo "configure: failed program was:" >&5
6706   cat conftest.$ac_ext >&5
6707   rm -fr conftest*
6708   x11_release=4
6709 fi
6710 rm -fr conftest*
6711   echo "$ac_t""R${x11_release}" 1>&6
6712   { test "$extra_verbose" = "yes" && cat << EOF
6713     Defining THIS_IS_X11R${x11_release}
6714 EOF
6715 cat >> confdefs.h <<EOF
6716 #define THIS_IS_X11R${x11_release} 1
6717 EOF
6718 }
6719
6720
6721   if test "${x11_release}" = "4"; then
6722     case "$with_widgets" in
6723       "" | "no") with_widgets=no ;;
6724       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6725     esac
6726   fi
6727
6728   for ac_func in XConvertCase
6729 do
6730 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6731 echo "configure:6732: checking for $ac_func" >&5
6732
6733 cat > conftest.$ac_ext <<EOF
6734 #line 6735 "configure"
6735 #include "confdefs.h"
6736 /* System header to define __stub macros and hopefully few prototypes,
6737     which can conflict with char $ac_func(); below.  */
6738 #include <assert.h>
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char $ac_func();
6743
6744 int main() {
6745
6746 /* The GNU C library defines this for functions which it implements
6747     to always fail with ENOSYS.  Some functions are actually named
6748     something starting with __ and the normal name is an alias.  */
6749 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6750 choke me
6751 #else
6752 $ac_func();
6753 #endif
6754
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_func_$ac_func=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_func_$ac_func=no"
6765 fi
6766 rm -f conftest*
6767
6768 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6769   echo "$ac_t""yes" 1>&6
6770     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6771   { test "$extra_verbose" = "yes" && cat << EOF
6772     Defining $ac_tr_func
6773 EOF
6774 cat >> confdefs.h <<EOF
6775 #define $ac_tr_func 1
6776 EOF
6777 }
6778  
6779 else
6780   echo "$ac_t""no" 1>&6
6781 fi
6782 done
6783
6784
6785   for ac_hdr in X11/Xlocale.h
6786 do
6787 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6788 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6789 echo "configure:6790: checking for $ac_hdr" >&5
6790
6791 cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 #include <$ac_hdr>
6795 EOF
6796 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6797 { (eval echo configure:6798: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6798 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6799 if test -z "$ac_err"; then
6800   rm -rf conftest*
6801   eval "ac_cv_header_$ac_safe=yes"
6802 else
6803   echo "$ac_err" >&5
6804   echo "configure: failed program was:" >&5
6805   cat conftest.$ac_ext >&5
6806   rm -rf conftest*
6807   eval "ac_cv_header_$ac_safe=no"
6808 fi
6809 rm -f conftest*
6810 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6811   echo "$ac_t""yes" 1>&6
6812     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6813   { test "$extra_verbose" = "yes" && cat << EOF
6814     Defining $ac_tr_hdr
6815 EOF
6816 cat >> confdefs.h <<EOF
6817 #define $ac_tr_hdr 1
6818 EOF
6819 }
6820  
6821 else
6822   echo "$ac_t""no" 1>&6
6823 fi
6824 done
6825
6826
6827     for ac_func in XRegisterIMInstantiateCallback
6828 do
6829 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6830 echo "configure:6831: checking for $ac_func" >&5
6831
6832 cat > conftest.$ac_ext <<EOF
6833 #line 6834 "configure"
6834 #include "confdefs.h"
6835 /* System header to define __stub macros and hopefully few prototypes,
6836     which can conflict with char $ac_func(); below.  */
6837 #include <assert.h>
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char $ac_func();
6842
6843 int main() {
6844
6845 /* The GNU C library defines this for functions which it implements
6846     to always fail with ENOSYS.  Some functions are actually named
6847     something starting with __ and the normal name is an alias.  */
6848 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6849 choke me
6850 #else
6851 $ac_func();
6852 #endif
6853
6854 ; return 0; }
6855 EOF
6856 if { (eval echo configure:6857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6857   rm -rf conftest*
6858   eval "ac_cv_func_$ac_func=yes"
6859 else
6860   echo "configure: failed program was:" >&5
6861   cat conftest.$ac_ext >&5
6862   rm -rf conftest*
6863   eval "ac_cv_func_$ac_func=no"
6864 fi
6865 rm -f conftest*
6866
6867 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6868   echo "$ac_t""yes" 1>&6
6869     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6870   { test "$extra_verbose" = "yes" && cat << EOF
6871     Defining $ac_tr_func
6872 EOF
6873 cat >> confdefs.h <<EOF
6874 #define $ac_tr_func 1
6875 EOF
6876 }
6877  
6878 else
6879   echo "$ac_t""no" 1>&6
6880 fi
6881 done
6882
6883   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6884 echo "configure:6885: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6885   cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888
6889 #define NeedFunctionPrototypes 1
6890 #include <X11/Xlib.h>
6891 extern Bool XRegisterIMInstantiateCallback(
6892    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6893
6894 int main() {
6895
6896 ; return 0; }
6897 EOF
6898 if { (eval echo configure:6899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6899   rm -rf conftest*
6900   echo "$ac_t""yes" 1>&6
6901 else
6902   echo "configure: failed program was:" >&5
6903   cat conftest.$ac_ext >&5
6904   rm -rf conftest*
6905   echo "$ac_t""no" 1>&6
6906    { test "$extra_verbose" = "yes" && cat << \EOF
6907     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6908 EOF
6909 cat >> confdefs.h <<\EOF
6910 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6911 EOF
6912 }
6913
6914 fi
6915 rm -f conftest*
6916
6917     test -z "$with_xmu" && { 
6918 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6919 echo "configure:6920: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6920 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6921
6922 xe_check_libs=" -lXmu "
6923 cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926 /* Override any gcc2 internal prototype to avoid an error.  */
6927 /* We use char because int might match the return type of a gcc2
6928     builtin and then its argument prototype would still apply.  */
6929 char XmuReadBitmapDataFromFile();
6930
6931 int main() {
6932 XmuReadBitmapDataFromFile()
6933 ; return 0; }
6934 EOF
6935 if { (eval echo configure:6936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6936   rm -rf conftest*
6937   eval "ac_cv_lib_$ac_lib_var=yes"
6938 else
6939   echo "configure: failed program was:" >&5
6940   cat conftest.$ac_ext >&5
6941   rm -rf conftest*
6942   eval "ac_cv_lib_$ac_lib_var=no"
6943 fi
6944 rm -f conftest*
6945 xe_check_libs=""
6946
6947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6948   echo "$ac_t""yes" 1>&6
6949   with_xmu=yes
6950 else
6951   echo "$ac_t""no" 1>&6
6952 with_xmu=no
6953 fi
6954
6955  }
6956   if test "$with_xmu" = "no"; then
6957     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6958    echo "    xemacs will be linked with \"xmu.o\""
6959  fi
6960   else
6961     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6962     { test "$extra_verbose" = "yes" && cat << \EOF
6963     Defining HAVE_XMU
6964 EOF
6965 cat >> confdefs.h <<\EOF
6966 #define HAVE_XMU 1
6967 EOF
6968 }
6969
6970   fi
6971
6972       
6973 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6974 echo "configure:6975: checking for main in -lXbsd" >&5
6975 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6976
6977 xe_check_libs=" -lXbsd "
6978 cat > conftest.$ac_ext <<EOF
6979 #line 6980 "configure"
6980 #include "confdefs.h"
6981
6982 int main() {
6983 main()
6984 ; return 0; }
6985 EOF
6986 if { (eval echo configure:6987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6987   rm -rf conftest*
6988   eval "ac_cv_lib_$ac_lib_var=yes"
6989 else
6990   echo "configure: failed program was:" >&5
6991   cat conftest.$ac_ext >&5
6992   rm -rf conftest*
6993   eval "ac_cv_lib_$ac_lib_var=no"
6994 fi
6995 rm -f conftest*
6996 xe_check_libs=""
6997
6998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6999   echo "$ac_t""yes" 1>&6
7000   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
7001 else
7002   echo "$ac_t""no" 1>&6
7003 fi
7004
7005
7006
7007     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
7008         if test "$GCC" = "yes"; then
7009       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
7010       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
7011     else
7012       case "$CC" in
7013         "xlc" ) CC="xlc_r" ;;
7014         "xlC" ) CC="xlC_r" ;;
7015         "cc"  ) CC="cc_r" ;;
7016       esac
7017     fi
7018   fi
7019
7020 fi 
7021 if test "$with_msw" != "no"; then
7022   echo "checking for MS-Windows" 1>&6
7023 echo "configure:7024: checking for MS-Windows" >&5
7024   
7025 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7026 echo "configure:7027: checking for main in -lgdi32" >&5
7027 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7028
7029 xe_check_libs=" -lgdi32 "
7030 cat > conftest.$ac_ext <<EOF
7031 #line 7032 "configure"
7032 #include "confdefs.h"
7033
7034 int main() {
7035 main()
7036 ; return 0; }
7037 EOF
7038 if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7039   rm -rf conftest*
7040   eval "ac_cv_lib_$ac_lib_var=yes"
7041 else
7042   echo "configure: failed program was:" >&5
7043   cat conftest.$ac_ext >&5
7044   rm -rf conftest*
7045   eval "ac_cv_lib_$ac_lib_var=no"
7046 fi
7047 rm -f conftest*
7048 xe_check_libs=""
7049
7050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7051   echo "$ac_t""yes" 1>&6
7052   with_msw=yes
7053 else
7054   echo "$ac_t""no" 1>&6
7055 fi
7056
7057
7058   if test "$with_msw" = "yes"; then
7059     { test "$extra_verbose" = "yes" && cat << \EOF
7060     Defining HAVE_MS_WINDOWS
7061 EOF
7062 cat >> confdefs.h <<\EOF
7063 #define HAVE_MS_WINDOWS 1
7064 EOF
7065 }
7066
7067
7068         if test "$with_netinstall" = "yes"; then
7069       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7070       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7071       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7072     fi
7073
7074     install_pp="$blddir/lib-src/installexe.sh"
7075     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
7076     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7077     if test "$window_system" != x11; then
7078         window_system=msw
7079         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7080             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7081    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7082  fi
7083         test "$with_menubars"   != "no" && with_menubars=msw \
7084             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7085    echo "    xemacs will be linked with \"menubar-msw.o\""
7086  fi
7087         test "$with_toolbars"   != "no" && with_toolbars=msw \
7088             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7089    echo "    xemacs will be linked with \"toolbar-msw.o\""
7090  fi
7091         test "$with_dialogs"   != "no" && with_dialogs=msw \
7092             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7093    echo "    xemacs will be linked with \"dialog-msw.o\""
7094  fi
7095         test "$with_widgets"   != "no" && with_widgets=msw
7096     else
7097         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7098    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7099  fi
7100         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7101    echo "    xemacs will be linked with \"menubar-msw.o\""
7102  fi
7103         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7104    echo "    xemacs will be linked with \"toolbar-msw.o\""
7105  fi
7106         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7107    echo "    xemacs will be linked with \"dialog-msw.o\""
7108  fi
7109     fi
7110         cat > conftest.$ac_ext <<EOF
7111 #line 7112 "configure"
7112 #include "confdefs.h"
7113 #include <fcntl.h>
7114     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7115 EOF
7116 if { (eval echo configure:7117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7117 then
7118   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7119     Defining HAVE_MSG_SELECT
7120 EOF
7121 cat >> confdefs.h <<\EOF
7122 #define HAVE_MSG_SELECT 1
7123 EOF
7124 }
7125
7126 else
7127   conftest_rc="$?"
7128   echo "configure: failed program was:" >&5
7129   cat conftest.$ac_ext >&5
7130 fi
7131 rm -fr conftest*
7132     with_file_coding=yes
7133     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
7134    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\""
7135  fi
7136   fi
7137 fi
7138
7139
7140
7141 test -z "$window_system" && window_system="none"
7142
7143 if test "$window_system" = "none"; then
7144   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7145   do
7146     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7147        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7148     fi
7149     eval "with_${feature}=no"
7150   done
7151 else
7152   test -z "$with_toolbars" && with_toolbars=yes
7153 fi
7154
7155 if test "$with_msw" != "yes"; then
7156   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7157   do
7158     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7159        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7160     fi
7161     eval "with_${feature}=no"
7162   done
7163 else
7164   :
7165 fi
7166
7167 if test "$with_x11" != "yes"; then
7168             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7169   do
7170     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7171        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7172     fi
7173     eval "with_${feature}=no"
7174   done
7175 fi
7176
7177 if test "$with_x11" = "yes"; then
7178   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7179 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7180 echo "configure:7181: checking for X11/extensions/shape.h" >&5
7181
7182 cat > conftest.$ac_ext <<EOF
7183 #line 7184 "configure"
7184 #include "confdefs.h"
7185 #include <X11/extensions/shape.h>
7186 EOF
7187 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7188 { (eval echo configure:7189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7189 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7190 if test -z "$ac_err"; then
7191   rm -rf conftest*
7192   eval "ac_cv_header_$ac_safe=yes"
7193 else
7194   echo "$ac_err" >&5
7195   echo "configure: failed program was:" >&5
7196   cat conftest.$ac_ext >&5
7197   rm -rf conftest*
7198   eval "ac_cv_header_$ac_safe=no"
7199 fi
7200 rm -f conftest*
7201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7202   echo "$ac_t""yes" 1>&6
7203   
7204    { test "$extra_verbose" = "yes" && cat << \EOF
7205     Defining HAVE_BALLOON_HELP
7206 EOF
7207 cat >> confdefs.h <<\EOF
7208 #define HAVE_BALLOON_HELP 1
7209 EOF
7210 }
7211
7212    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7213    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7214  fi
7215 else
7216   echo "$ac_t""no" 1>&6
7217 fi
7218
7219 fi
7220
7221 bitmapdir=
7222
7223 case "$window_system" in
7224   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7225   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7226   gtk  )
7227        HAVE_X_WINDOWS=no
7228        test "$with_gnome" = "yes" && echo "  Using GNOME."
7229        test "$with_gnome" = "no" && echo "  Using GTK."
7230        ;;
7231   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7232 esac
7233
7234 case "$x_libraries" in *X11R4* )
7235   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7236   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7237 esac
7238
7239 echo "checking for WM_COMMAND option" 1>&6
7240 echo "configure:7241: checking for WM_COMMAND option" >&5;
7241 if test "$with_wmcommand" != "no"; then
7242   { test "$extra_verbose" = "yes" && cat << \EOF
7243     Defining HAVE_WMCOMMAND
7244 EOF
7245 cat >> confdefs.h <<\EOF
7246 #define HAVE_WMCOMMAND 1
7247 EOF
7248 }
7249
7250 fi
7251
7252 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7253 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7254 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7255 echo "configure:7256: checking for X11/Xauth.h" >&5
7256
7257 cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 #include <X11/Xauth.h>
7261 EOF
7262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7263 { (eval echo configure:7264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7265 if test -z "$ac_err"; then
7266   rm -rf conftest*
7267   eval "ac_cv_header_$ac_safe=yes"
7268 else
7269   echo "$ac_err" >&5
7270   echo "configure: failed program was:" >&5
7271   cat conftest.$ac_ext >&5
7272   rm -rf conftest*
7273   eval "ac_cv_header_$ac_safe=no"
7274 fi
7275 rm -f conftest*
7276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7277   echo "$ac_t""yes" 1>&6
7278   :
7279 else
7280   echo "$ac_t""no" 1>&6
7281 with_xauth=no
7282 fi
7283  }
7284 test -z "$with_xauth" && { 
7285 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7286 echo "configure:7287: checking for XauGetAuthByAddr in -lXau" >&5
7287 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7288
7289 xe_check_libs=" -lXau "
7290 cat > conftest.$ac_ext <<EOF
7291 #line 7292 "configure"
7292 #include "confdefs.h"
7293 /* Override any gcc2 internal prototype to avoid an error.  */
7294 /* We use char because int might match the return type of a gcc2
7295     builtin and then its argument prototype would still apply.  */
7296 char XauGetAuthByAddr();
7297
7298 int main() {
7299 XauGetAuthByAddr()
7300 ; return 0; }
7301 EOF
7302 if { (eval echo configure:7303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7303   rm -rf conftest*
7304   eval "ac_cv_lib_$ac_lib_var=yes"
7305 else
7306   echo "configure: failed program was:" >&5
7307   cat conftest.$ac_ext >&5
7308   rm -rf conftest*
7309   eval "ac_cv_lib_$ac_lib_var=no"
7310 fi
7311 rm -f conftest*
7312 xe_check_libs=""
7313
7314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7315   echo "$ac_t""yes" 1>&6
7316   :
7317 else
7318   echo "$ac_t""no" 1>&6
7319 with_xauth=no
7320 fi
7321
7322  }
7323 test -z "$with_xauth" && with_xauth=yes
7324 if test "$with_xauth" = "yes"; then
7325   { test "$extra_verbose" = "yes" && cat << \EOF
7326     Defining HAVE_XAUTH
7327 EOF
7328 cat >> confdefs.h <<\EOF
7329 #define HAVE_XAUTH 1
7330 EOF
7331 }
7332
7333   
7334 T=""
7335 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
7336 libs_xauth="$T"
7337
7338 fi
7339
7340
7341
7342
7343 if test "$with_tooltalk" != "no" ; then
7344       for dir in "" "Tt/" "desktop/" ; do
7345     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7346 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7347 echo "configure:7348: checking for ${dir}tt_c.h" >&5
7348
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 #include <${dir}tt_c.h>
7353 EOF
7354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7355 { (eval echo configure:7356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7357 if test -z "$ac_err"; then
7358   rm -rf conftest*
7359   eval "ac_cv_header_$ac_safe=yes"
7360 else
7361   echo "$ac_err" >&5
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_header_$ac_safe=no"
7366 fi
7367 rm -f conftest*
7368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7369   echo "$ac_t""yes" 1>&6
7370   tt_c_h_file="${dir}tt_c.h"; break
7371 else
7372   echo "$ac_t""no" 1>&6
7373 fi
7374
7375   done
7376   if test -z "$tt_c_h_file"; then
7377     if test "$with_tooltalk" = "yes"; then
7378       (echo "$progname: Usage error:"
7379 echo " " "Unable to find required tooltalk header files."
7380 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7381     fi
7382     with_tooltalk=no
7383   fi
7384 fi
7385 if test "$with_tooltalk" != "no" ; then
7386   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7387     
7388 xe_msg_checking="for tt_message_create in -ltt"
7389 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7390 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7391 echo "configure:7392: checking "$xe_msg_checking"" >&5
7392 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7393
7394 xe_check_libs=" -ltt $extra_libs"
7395 cat > conftest.$ac_ext <<EOF
7396 #line 7397 "configure"
7397 #include "confdefs.h"
7398 /* Override any gcc2 internal prototype to avoid an error.  */
7399 /* We use char because int might match the return type of a gcc2
7400     builtin and then its argument prototype would still apply.  */
7401 char tt_message_create();
7402
7403 int main() {
7404 tt_message_create()
7405 ; return 0; }
7406 EOF
7407 if { (eval echo configure:7408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7408   rm -rf conftest*
7409   eval "ac_cv_lib_$ac_lib_var=yes"
7410 else
7411   echo "configure: failed program was:" >&5
7412   cat conftest.$ac_ext >&5
7413   rm -rf conftest*
7414   eval "ac_cv_lib_$ac_lib_var=no"
7415 fi
7416 rm -f conftest*
7417 xe_check_libs=""
7418
7419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7420   echo "$ac_t""yes" 1>&6
7421   tt_libs="-ltt $extra_libs"; break
7422 else
7423   echo "$ac_t""no" 1>&6
7424 :
7425 fi
7426
7427
7428   done
7429   if test -z "$tt_libs"; then
7430     if test "$with_tooltalk" = "yes"; then
7431       (echo "$progname: Usage error:"
7432 echo " " "Unable to find required tooltalk libraries."
7433 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7434     fi
7435     with_tooltalk=no
7436   fi
7437 fi
7438 test -z "$with_tooltalk" && with_tooltalk=yes
7439 if test "$with_tooltalk" = "yes"; then
7440   { test "$extra_verbose" = "yes" && cat << \EOF
7441     Defining TOOLTALK
7442 EOF
7443 cat >> confdefs.h <<\EOF
7444 #define TOOLTALK 1
7445 EOF
7446 }
7447
7448   { test "$extra_verbose" = "yes" && cat << EOF
7449     Defining TT_C_H_FILE = "$tt_c_h_file"
7450 EOF
7451 cat >> confdefs.h <<EOF
7452 #define TT_C_H_FILE "$tt_c_h_file"
7453 EOF
7454 }
7455
7456   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7457   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7458    echo "    xemacs will be linked with \"tooltalk.o\""
7459  fi
7460 fi
7461
7462 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7463 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7464 echo "configure:7465: checking for Dt/Dt.h" >&5
7465
7466 cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 #include <Dt/Dt.h>
7470 EOF
7471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7472 { (eval echo configure:7473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7474 if test -z "$ac_err"; then
7475   rm -rf conftest*
7476   eval "ac_cv_header_$ac_safe=yes"
7477 else
7478   echo "$ac_err" >&5
7479   echo "configure: failed program was:" >&5
7480   cat conftest.$ac_ext >&5
7481   rm -rf conftest*
7482   eval "ac_cv_header_$ac_safe=no"
7483 fi
7484 rm -f conftest*
7485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7486   echo "$ac_t""yes" 1>&6
7487   :
7488 else
7489   echo "$ac_t""no" 1>&6
7490 with_cde=no
7491 fi
7492  }
7493 test -z "$with_cde" && { 
7494 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7495 echo "configure:7496: checking for DtDndDragStart in -lDtSvc" >&5
7496 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7497
7498 xe_check_libs=" -lDtSvc "
7499 cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7502 /* Override any gcc2 internal prototype to avoid an error.  */
7503 /* We use char because int might match the return type of a gcc2
7504     builtin and then its argument prototype would still apply.  */
7505 char DtDndDragStart();
7506
7507 int main() {
7508 DtDndDragStart()
7509 ; return 0; }
7510 EOF
7511 if { (eval echo configure:7512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7512   rm -rf conftest*
7513   eval "ac_cv_lib_$ac_lib_var=yes"
7514 else
7515   echo "configure: failed program was:" >&5
7516   cat conftest.$ac_ext >&5
7517   rm -rf conftest*
7518   eval "ac_cv_lib_$ac_lib_var=no"
7519 fi
7520 rm -f conftest*
7521 xe_check_libs=""
7522
7523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7524   echo "$ac_t""yes" 1>&6
7525   :
7526 else
7527   echo "$ac_t""no" 1>&6
7528 with_cde=no
7529 fi
7530
7531  }
7532 test -z "$with_cde" && with_cde=yes
7533 if test "$with_dragndrop" = no; then
7534   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7535   with_cde=no
7536 fi
7537 if test "$with_cde" = "yes" ; then
7538   { test "$extra_verbose" = "yes" && cat << \EOF
7539     Defining HAVE_CDE
7540 EOF
7541 cat >> confdefs.h <<\EOF
7542 #define HAVE_CDE 1
7543 EOF
7544 }
7545
7546   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7547   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7548   with_tooltalk=yes # CDE requires Tooltalk
7549   need_motif=yes    # CDE requires Motif
7550 fi
7551
7552 test "$window_system" != "x11" && with_offix=no
7553 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7554   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7555   with_offix=no
7556 fi
7557 if test "$with_dragndrop" = no; then
7558   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7559   with_offix=no
7560 fi
7561 if test "$with_cde" = yes; then
7562   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7563   with_offix=no
7564 fi
7565 test -z "$with_offix" && with_offix=no
7566 if test "$with_offix" = "yes"; then
7567   { test "$extra_verbose" = "yes" && cat << \EOF
7568     Defining HAVE_OFFIX_DND
7569 EOF
7570 cat >> confdefs.h <<\EOF
7571 #define HAVE_OFFIX_DND 1
7572 EOF
7573 }
7574
7575   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7576   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7577 fi
7578 if test "$with_gtk" = "yes"; then
7579    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7580 fi
7581
7582 if test "$with_dragndrop" != "no" ; then
7583   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7584 echo "configure:7585: checking if drag and drop API is needed" >&5
7585   if test -n "$dragndrop_proto" ; then
7586     with_dragndrop=yes
7587     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7588     { test "$extra_verbose" = "yes" && cat << \EOF
7589     Defining HAVE_DRAGNDROP
7590 EOF
7591 cat >> confdefs.h <<\EOF
7592 #define HAVE_DRAGNDROP 1
7593 EOF
7594 }
7595
7596     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7597   else
7598     with_dragndrop=no
7599     echo "$ac_t""no" 1>&6
7600   fi
7601 fi
7602
7603 echo "checking for LDAP" 1>&6
7604 echo "configure:7605: checking for LDAP" >&5
7605 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7606 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7607 echo "configure:7608: checking for ldap.h" >&5
7608
7609 cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 #include <ldap.h>
7613 EOF
7614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7615 { (eval echo configure:7616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7617 if test -z "$ac_err"; then
7618   rm -rf conftest*
7619   eval "ac_cv_header_$ac_safe=yes"
7620 else
7621   echo "$ac_err" >&5
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   eval "ac_cv_header_$ac_safe=no"
7626 fi
7627 rm -f conftest*
7628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7629   echo "$ac_t""yes" 1>&6
7630   :
7631 else
7632   echo "$ac_t""no" 1>&6
7633 with_ldap=no
7634 fi
7635  }
7636 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7637 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7638 echo "configure:7639: checking for lber.h" >&5
7639
7640 cat > conftest.$ac_ext <<EOF
7641 #line 7642 "configure"
7642 #include "confdefs.h"
7643 #include <lber.h>
7644 EOF
7645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7646 { (eval echo configure:7647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7648 if test -z "$ac_err"; then
7649   rm -rf conftest*
7650   eval "ac_cv_header_$ac_safe=yes"
7651 else
7652   echo "$ac_err" >&5
7653   echo "configure: failed program was:" >&5
7654   cat conftest.$ac_ext >&5
7655   rm -rf conftest*
7656   eval "ac_cv_header_$ac_safe=no"
7657 fi
7658 rm -f conftest*
7659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7660   echo "$ac_t""yes" 1>&6
7661   :
7662 else
7663   echo "$ac_t""no" 1>&6
7664 with_ldap=no
7665 fi
7666  }
7667 if test "$with_ldap" != "no"; then
7668   
7669 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7670 echo "configure:7671: checking for ldap_search in -lldap" >&5
7671 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7672
7673 xe_check_libs=" -lldap "
7674 cat > conftest.$ac_ext <<EOF
7675 #line 7676 "configure"
7676 #include "confdefs.h"
7677 /* Override any gcc2 internal prototype to avoid an error.  */
7678 /* We use char because int might match the return type of a gcc2
7679     builtin and then its argument prototype would still apply.  */
7680 char ldap_search();
7681
7682 int main() {
7683 ldap_search()
7684 ; return 0; }
7685 EOF
7686 if { (eval echo configure:7687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=yes"
7689 else
7690   echo "configure: failed program was:" >&5
7691   cat conftest.$ac_ext >&5
7692   rm -rf conftest*
7693   eval "ac_cv_lib_$ac_lib_var=no"
7694 fi
7695 rm -f conftest*
7696 xe_check_libs=""
7697
7698 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7699   echo "$ac_t""yes" 1>&6
7700   with_ldap_nolber=yes
7701 else
7702   echo "$ac_t""no" 1>&6
7703 with_ldap_nolber=no
7704 fi
7705
7706
7707   test "$with_ldap_nolber" = "no" && { 
7708 xe_msg_checking="for ldap_open in -lldap"
7709 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7710 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7711 echo "configure:7712: checking "$xe_msg_checking"" >&5
7712 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7713
7714 xe_check_libs=" -lldap -llber"
7715 cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 /* Override any gcc2 internal prototype to avoid an error.  */
7719 /* We use char because int might match the return type of a gcc2
7720     builtin and then its argument prototype would still apply.  */
7721 char ldap_open();
7722
7723 int main() {
7724 ldap_open()
7725 ; return 0; }
7726 EOF
7727 if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7728   rm -rf conftest*
7729   eval "ac_cv_lib_$ac_lib_var=yes"
7730 else
7731   echo "configure: failed program was:" >&5
7732   cat conftest.$ac_ext >&5
7733   rm -rf conftest*
7734   eval "ac_cv_lib_$ac_lib_var=no"
7735 fi
7736 rm -f conftest*
7737 xe_check_libs=""
7738
7739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7740   echo "$ac_t""yes" 1>&6
7741   with_ldap_lber=yes
7742 else
7743   echo "$ac_t""no" 1>&6
7744 with_ldap_lber=no
7745 fi
7746
7747  }
7748   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7749 xe_msg_checking="for ldap_open in -lldap"
7750 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7751 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7752 echo "configure:7753: checking "$xe_msg_checking"" >&5
7753 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7754
7755 xe_check_libs=" -lldap -llber -lkrb"
7756 cat > conftest.$ac_ext <<EOF
7757 #line 7758 "configure"
7758 #include "confdefs.h"
7759 /* Override any gcc2 internal prototype to avoid an error.  */
7760 /* We use char because int might match the return type of a gcc2
7761     builtin and then its argument prototype would still apply.  */
7762 char ldap_open();
7763
7764 int main() {
7765 ldap_open()
7766 ; return 0; }
7767 EOF
7768 if { (eval echo configure:7769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7769   rm -rf conftest*
7770   eval "ac_cv_lib_$ac_lib_var=yes"
7771 else
7772   echo "configure: failed program was:" >&5
7773   cat conftest.$ac_ext >&5
7774   rm -rf conftest*
7775   eval "ac_cv_lib_$ac_lib_var=no"
7776 fi
7777 rm -f conftest*
7778 xe_check_libs=""
7779
7780 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7781   echo "$ac_t""yes" 1>&6
7782   with_ldap_krb=yes
7783 else
7784   echo "$ac_t""no" 1>&6
7785 with_ldap_krb=no
7786 fi
7787
7788  }
7789   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7790 xe_msg_checking="for ldap_open in -lldap"
7791 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7792 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7793 echo "configure:7794: checking "$xe_msg_checking"" >&5
7794 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7795
7796 xe_check_libs=" -lldap -llber -lkrb -ldes"
7797 cat > conftest.$ac_ext <<EOF
7798 #line 7799 "configure"
7799 #include "confdefs.h"
7800 /* Override any gcc2 internal prototype to avoid an error.  */
7801 /* We use char because int might match the return type of a gcc2
7802     builtin and then its argument prototype would still apply.  */
7803 char ldap_open();
7804
7805 int main() {
7806 ldap_open()
7807 ; return 0; }
7808 EOF
7809 if { (eval echo configure:7810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7810   rm -rf conftest*
7811   eval "ac_cv_lib_$ac_lib_var=yes"
7812 else
7813   echo "configure: failed program was:" >&5
7814   cat conftest.$ac_ext >&5
7815   rm -rf conftest*
7816   eval "ac_cv_lib_$ac_lib_var=no"
7817 fi
7818 rm -f conftest*
7819 xe_check_libs=""
7820
7821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7822   echo "$ac_t""yes" 1>&6
7823   with_ldap_krbdes=yes
7824 else
7825   echo "$ac_t""no" 1>&6
7826 with_ldap_krbdes=no
7827 fi
7828
7829  }
7830   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
7831 fi
7832 if test "$with_ldap" = "yes"; then
7833   { test "$extra_verbose" = "yes" && cat << \EOF
7834     Defining HAVE_LDAP
7835 EOF
7836 cat >> confdefs.h <<\EOF
7837 #define HAVE_LDAP 1
7838 EOF
7839 }
7840
7841   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7842    echo "    xemacs will be linked with \"eldap.o\""
7843  fi
7844   if test "$with_ldap_nolber" = "yes" ; then
7845     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7846   else
7847     if test "$with_ldap_krb" = "yes" ; then
7848       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7849     fi
7850     if test "$with_ldap_krbdes" = "yes" ; then
7851       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7852       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7853     fi
7854     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7855     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7856   fi
7857   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7858 do
7859 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7860 echo "configure:7861: checking for $ac_func" >&5
7861
7862 cat > conftest.$ac_ext <<EOF
7863 #line 7864 "configure"
7864 #include "confdefs.h"
7865 /* System header to define __stub macros and hopefully few prototypes,
7866     which can conflict with char $ac_func(); below.  */
7867 #include <assert.h>
7868 /* Override any gcc2 internal prototype to avoid an error.  */
7869 /* We use char because int might match the return type of a gcc2
7870     builtin and then its argument prototype would still apply.  */
7871 char $ac_func();
7872
7873 int main() {
7874
7875 /* The GNU C library defines this for functions which it implements
7876     to always fail with ENOSYS.  Some functions are actually named
7877     something starting with __ and the normal name is an alias.  */
7878 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7879 choke me
7880 #else
7881 $ac_func();
7882 #endif
7883
7884 ; return 0; }
7885 EOF
7886 if { (eval echo configure:7887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7887   rm -rf conftest*
7888   eval "ac_cv_func_$ac_func=yes"
7889 else
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   eval "ac_cv_func_$ac_func=no"
7894 fi
7895 rm -f conftest*
7896
7897 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7898   echo "$ac_t""yes" 1>&6
7899     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7900   { test "$extra_verbose" = "yes" && cat << EOF
7901     Defining $ac_tr_func
7902 EOF
7903 cat >> confdefs.h <<EOF
7904 #define $ac_tr_func 1
7905 EOF
7906 }
7907  
7908 else
7909   echo "$ac_t""no" 1>&6
7910 fi
7911 done
7912
7913 fi
7914
7915 if test "$with_postgresql" != "no"; then
7916   echo "checking for PostgreSQL" 1>&6
7917 echo "configure:7918: checking for PostgreSQL" >&5
7918
7919   for header_dir in "" "pgsql/" "postgresql/"; do
7920     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7921 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7922 echo "configure:7923: checking for ${header_dir}libpq-fe.h" >&5
7923
7924 cat > conftest.$ac_ext <<EOF
7925 #line 7926 "configure"
7926 #include "confdefs.h"
7927 #include <${header_dir}libpq-fe.h>
7928 EOF
7929 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7930 { (eval echo configure:7931: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7931 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7932 if test -z "$ac_err"; then
7933   rm -rf conftest*
7934   eval "ac_cv_header_$ac_safe=yes"
7935 else
7936   echo "$ac_err" >&5
7937   echo "configure: failed program was:" >&5
7938   cat conftest.$ac_ext >&5
7939   rm -rf conftest*
7940   eval "ac_cv_header_$ac_safe=no"
7941 fi
7942 rm -f conftest*
7943 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7944   echo "$ac_t""yes" 1>&6
7945   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7946 else
7947   echo "$ac_t""no" 1>&6
7948 fi
7949
7950   done
7951
7952   test -n "$libpq_fe_h_file" && { 
7953 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7954 echo "configure:7955: checking for PQconnectdb in -lpq" >&5
7955 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7956
7957 xe_check_libs=" -lpq "
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 /* Override any gcc2 internal prototype to avoid an error.  */
7962 /* We use char because int might match the return type of a gcc2
7963     builtin and then its argument prototype would still apply.  */
7964 char PQconnectdb();
7965
7966 int main() {
7967 PQconnectdb()
7968 ; return 0; }
7969 EOF
7970 if { (eval echo configure:7971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=yes"
7973 else
7974   echo "configure: failed program was:" >&5
7975   cat conftest.$ac_ext >&5
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=no"
7978 fi
7979 rm -f conftest*
7980 xe_check_libs=""
7981
7982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7983   echo "$ac_t""yes" 1>&6
7984   have_libpq=yes
7985 else
7986   echo "$ac_t""no" 1>&6
7987 fi
7988
7989  }
7990
7991   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7992     with_postgresql=yes
7993     { test "$extra_verbose" = "yes" && cat << \EOF
7994     Defining HAVE_POSTGRESQL
7995 EOF
7996 cat >> confdefs.h <<\EOF
7997 #define HAVE_POSTGRESQL 1
7998 EOF
7999 }
8000
8001     
8002 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
8003 echo "configure:8004: checking for PQconnectStart in -lpq" >&5
8004 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
8005
8006 xe_check_libs=" -lpq "
8007 cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* Override any gcc2 internal prototype to avoid an error.  */
8011 /* We use char because int might match the return type of a gcc2
8012     builtin and then its argument prototype would still apply.  */
8013 char PQconnectStart();
8014
8015 int main() {
8016 PQconnectStart()
8017 ; return 0; }
8018 EOF
8019 if { (eval echo configure:8020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8020   rm -rf conftest*
8021   eval "ac_cv_lib_$ac_lib_var=yes"
8022 else
8023   echo "configure: failed program was:" >&5
8024   cat conftest.$ac_ext >&5
8025   rm -rf conftest*
8026   eval "ac_cv_lib_$ac_lib_var=no"
8027 fi
8028 rm -f conftest*
8029 xe_check_libs=""
8030
8031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8032   echo "$ac_t""yes" 1>&6
8033   with_postgresqlv7=yes;
8034                  { test "$extra_verbose" = "yes" && cat << \EOF
8035     Defining HAVE_POSTGRESQLV7
8036 EOF
8037 cat >> confdefs.h <<\EOF
8038 #define HAVE_POSTGRESQLV7 1
8039 EOF
8040 }
8041
8042 else
8043   echo "$ac_t""no" 1>&6
8044 fi
8045
8046
8047     { test "$extra_verbose" = "yes" && cat << EOF
8048     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8049 EOF
8050 cat >> confdefs.h <<EOF
8051 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8052 EOF
8053 }
8054
8055     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8056     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8057    echo "    xemacs will be linked with \"postgresql.o\""
8058  fi
8059   elif test "$with_postgresql" = "yes"; then
8060     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8061   fi
8062 fi
8063
8064
8065 if test "$window_system" != "none"; then
8066   echo "checking for graphics libraries" 1>&6
8067 echo "configure:8068: checking for graphics libraries" >&5
8068
8069       libpath_xpm=
8070   incpath_xpm=
8071   case "$opsys" in 
8072     cygwin*)
8073       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8074       cygwin_top=`eval "dirname ${cygwin_top}"`;
8075       cygwin_top="${cygwin_top}/..";
8076       case "$window_system" in
8077                 x11)  ;;
8078                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8079              incpath_xpm="-I${cygwin_top}/include/noX"
8080               ;;
8081                 gtk)  ;;
8082                 none) ;;
8083                 *)    ;;
8084       esac
8085       ;;
8086         *) ;;
8087   esac
8088     xpm_problem=""
8089   if test -z "$with_xpm"; then
8090     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8091     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8092     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8093 echo "configure:8094: checking for Xpm - no older than 3.4f" >&5
8094     xe_check_libs=-lXpm
8095     cat > conftest.$ac_ext <<EOF
8096 #line 8097 "configure"
8097 #include "confdefs.h"
8098 #define XPM_NUMBERS
8099 #include <X11/xpm.h>
8100     int main(int c, char **v) {
8101     return c == 1 ? 0 :
8102       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8103       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8104 EOF
8105 if { (eval echo configure:8106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8106 then
8107   ./conftest dummy_arg; xpm_status=$?;
8108       if test "$xpm_status" = "0"; then
8109         with_xpm=yes;
8110       else
8111         with_xpm=no;
8112         if test "$xpm_status" = "1"; then
8113           xpm_problem="Xpm library version and header file version don't match!"
8114         elif test "$xpm_status" = "2"; then
8115           xpm_problem="Xpm library version is too old!"
8116         else
8117           xpm_problem="Internal xpm detection logic error!"
8118         fi
8119         echo "
8120 *** WARNING *** $xpm_problem
8121   I'm not touching that with a 10-foot pole!
8122   If you really want to use the installed version of Xpm, rerun
8123   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8124     fi
8125 else
8126   conftest_rc="$?"
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -fr conftest*
8130   with_xpm=no
8131 fi
8132 rm -fr conftest*
8133     xe_check_libs=
8134     echo "$ac_t""$with_xpm" 1>&6
8135   fi
8136   if test "$with_xpm" = "yes"; then
8137                 { test "$extra_verbose" = "yes" && cat << \EOF
8138     Defining HAVE_XPM
8139 EOF
8140 cat >> confdefs.h <<\EOF
8141 #define HAVE_XPM 1
8142 EOF
8143 }
8144
8145     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8146     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8147     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8148     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8149 echo "configure:8150: checking for \"FOR_MSW\" xpm" >&5
8150     xe_check_libs=-lXpm
8151     cat > conftest.$ac_ext <<EOF
8152 #line 8153 "configure"
8153 #include "confdefs.h"
8154
8155 int main() {
8156 XpmCreatePixmapFromData()
8157 ; return 0; }
8158 EOF
8159 if { (eval echo configure:8160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8160   rm -rf conftest*
8161   xpm_for_msw=no
8162 else
8163   echo "configure: failed program was:" >&5
8164   cat conftest.$ac_ext >&5
8165   rm -rf conftest*
8166   xpm_for_msw=yes
8167 fi
8168 rm -f conftest*
8169     xe_check_libs=
8170     echo "$ac_t""$xpm_for_msw" 1>&6
8171     if test "$xpm_for_msw" = "yes"; then
8172       { test "$extra_verbose" = "yes" && cat << \EOF
8173     Defining FOR_MSW
8174 EOF
8175 cat >> confdefs.h <<\EOF
8176 #define FOR_MSW 1
8177 EOF
8178 }
8179
8180     fi
8181   fi
8182
8183     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8184 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8185 echo "configure:8186: checking for compface.h" >&5
8186
8187 cat > conftest.$ac_ext <<EOF
8188 #line 8189 "configure"
8189 #include "confdefs.h"
8190 #include <compface.h>
8191 EOF
8192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8193 { (eval echo configure:8194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8195 if test -z "$ac_err"; then
8196   rm -rf conftest*
8197   eval "ac_cv_header_$ac_safe=yes"
8198 else
8199   echo "$ac_err" >&5
8200   echo "configure: failed program was:" >&5
8201   cat conftest.$ac_ext >&5
8202   rm -rf conftest*
8203   eval "ac_cv_header_$ac_safe=no"
8204 fi
8205 rm -f conftest*
8206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8207   echo "$ac_t""yes" 1>&6
8208   :
8209 else
8210   echo "$ac_t""no" 1>&6
8211 with_xface=no
8212 fi
8213  }
8214   test -z "$with_xface" && { 
8215 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8216 echo "configure:8217: checking for UnGenFace in -lcompface" >&5
8217 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8218
8219 xe_check_libs=" -lcompface "
8220 cat > conftest.$ac_ext <<EOF
8221 #line 8222 "configure"
8222 #include "confdefs.h"
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 /* We use char because int might match the return type of a gcc2
8225     builtin and then its argument prototype would still apply.  */
8226 char UnGenFace();
8227
8228 int main() {
8229 UnGenFace()
8230 ; return 0; }
8231 EOF
8232 if { (eval echo configure:8233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8233   rm -rf conftest*
8234   eval "ac_cv_lib_$ac_lib_var=yes"
8235 else
8236   echo "configure: failed program was:" >&5
8237   cat conftest.$ac_ext >&5
8238   rm -rf conftest*
8239   eval "ac_cv_lib_$ac_lib_var=no"
8240 fi
8241 rm -f conftest*
8242 xe_check_libs=""
8243
8244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8245   echo "$ac_t""yes" 1>&6
8246   : 
8247 else
8248   echo "$ac_t""no" 1>&6
8249 with_xface=no
8250 fi
8251
8252  }
8253   test -z "$with_xface" && with_xface=yes
8254   if test "$with_xface" = "yes"; then
8255     { test "$extra_verbose" = "yes" && cat << \EOF
8256     Defining HAVE_XFACE
8257 EOF
8258 cat >> confdefs.h <<\EOF
8259 #define HAVE_XFACE 1
8260 EOF
8261 }
8262
8263     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8264   fi
8265
8266         if test "$with_gif" != "no"; then
8267     with_gif="yes"
8268     { test "$extra_verbose" = "yes" && cat << \EOF
8269     Defining HAVE_GIF
8270 EOF
8271 cat >> confdefs.h <<\EOF
8272 #define HAVE_GIF 1
8273 EOF
8274 }
8275
8276     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8277    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8278  fi
8279   fi
8280
8281       if test "$with_png $with_tiff" != "no no"; then
8282     
8283 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8284 echo "configure:8285: checking for inflate in -lc" >&5
8285 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8286
8287 xe_check_libs=" -lc "
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 /* We use char because int might match the return type of a gcc2
8293     builtin and then its argument prototype would still apply.  */
8294 char inflate();
8295
8296 int main() {
8297 inflate()
8298 ; return 0; }
8299 EOF
8300 if { (eval echo configure:8301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=yes"
8303 else
8304   echo "configure: failed program was:" >&5
8305   cat conftest.$ac_ext >&5
8306   rm -rf conftest*
8307   eval "ac_cv_lib_$ac_lib_var=no"
8308 fi
8309 rm -f conftest*
8310 xe_check_libs=""
8311
8312 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8313   echo "$ac_t""yes" 1>&6
8314   :
8315 else
8316   echo "$ac_t""no" 1>&6
8317
8318 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8319 echo "configure:8320: checking for inflate in -lz" >&5
8320 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8321
8322 xe_check_libs=" -lz "
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char inflate();
8330
8331 int main() {
8332 inflate()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 xe_check_libs=""
8346
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8348   echo "$ac_t""yes" 1>&6
8349   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8350 else
8351   echo "$ac_t""no" 1>&6
8352
8353 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8354 echo "configure:8355: checking for inflate in -lgz" >&5
8355 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8356
8357 xe_check_libs=" -lgz "
8358 cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 /* Override any gcc2 internal prototype to avoid an error.  */
8362 /* We use char because int might match the return type of a gcc2
8363     builtin and then its argument prototype would still apply.  */
8364 char inflate();
8365
8366 int main() {
8367 inflate()
8368 ; return 0; }
8369 EOF
8370 if { (eval echo configure:8371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8371   rm -rf conftest*
8372   eval "ac_cv_lib_$ac_lib_var=yes"
8373 else
8374   echo "configure: failed program was:" >&5
8375   cat conftest.$ac_ext >&5
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=no"
8378 fi
8379 rm -f conftest*
8380 xe_check_libs=""
8381
8382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8383   echo "$ac_t""yes" 1>&6
8384   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8385 else
8386   echo "$ac_t""no" 1>&6
8387 fi
8388
8389
8390 fi
8391
8392
8393 fi
8394
8395
8396   fi
8397
8398     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8399 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8400 echo "configure:8401: checking for jpeglib.h" >&5
8401
8402 cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 #include <jpeglib.h>
8406 EOF
8407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8408 { (eval echo configure:8409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8410 if test -z "$ac_err"; then
8411   rm -rf conftest*
8412   eval "ac_cv_header_$ac_safe=yes"
8413 else
8414   echo "$ac_err" >&5
8415   echo "configure: failed program was:" >&5
8416   cat conftest.$ac_ext >&5
8417   rm -rf conftest*
8418   eval "ac_cv_header_$ac_safe=no"
8419 fi
8420 rm -f conftest*
8421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8422   echo "$ac_t""yes" 1>&6
8423   :
8424 else
8425   echo "$ac_t""no" 1>&6
8426 with_jpeg=no
8427 fi
8428  }
8429   test -z "$with_jpeg" && { 
8430 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8431 echo "configure:8432: checking for jpeg_destroy_decompress in -ljpeg" >&5
8432 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8433
8434 xe_check_libs=" -ljpeg "
8435 cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438 /* Override any gcc2 internal prototype to avoid an error.  */
8439 /* We use char because int might match the return type of a gcc2
8440     builtin and then its argument prototype would still apply.  */
8441 char jpeg_destroy_decompress();
8442
8443 int main() {
8444 jpeg_destroy_decompress()
8445 ; return 0; }
8446 EOF
8447 if { (eval echo configure:8448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8448   rm -rf conftest*
8449   eval "ac_cv_lib_$ac_lib_var=yes"
8450 else
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   eval "ac_cv_lib_$ac_lib_var=no"
8455 fi
8456 rm -f conftest*
8457 xe_check_libs=""
8458
8459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8460   echo "$ac_t""yes" 1>&6
8461   :
8462 else
8463   echo "$ac_t""no" 1>&6
8464 with_jpeg=no
8465 fi
8466
8467  }
8468   test -z "$with_jpeg" && with_jpeg=yes
8469   if test "$with_jpeg" = "yes"; then
8470     { test "$extra_verbose" = "yes" && cat << \EOF
8471     Defining HAVE_JPEG
8472 EOF
8473 cat >> confdefs.h <<\EOF
8474 #define HAVE_JPEG 1
8475 EOF
8476 }
8477
8478     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8479   fi
8480
8481     png_problem=""
8482   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8483 echo "configure:8484: checking for pow" >&5
8484
8485 cat > conftest.$ac_ext <<EOF
8486 #line 8487 "configure"
8487 #include "confdefs.h"
8488 /* System header to define __stub macros and hopefully few prototypes,
8489     which can conflict with char pow(); below.  */
8490 #include <assert.h>
8491 /* Override any gcc2 internal prototype to avoid an error.  */
8492 /* We use char because int might match the return type of a gcc2
8493     builtin and then its argument prototype would still apply.  */
8494 char pow();
8495
8496 int main() {
8497
8498 /* The GNU C library defines this for functions which it implements
8499     to always fail with ENOSYS.  Some functions are actually named
8500     something starting with __ and the normal name is an alias.  */
8501 #if defined (__stub_pow) || defined (__stub___pow)
8502 choke me
8503 #else
8504 pow();
8505 #endif
8506
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   eval "ac_cv_func_pow=yes"
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_func_pow=no"
8517 fi
8518 rm -f conftest*
8519
8520 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8521   echo "$ac_t""yes" 1>&6
8522   :
8523 else
8524   echo "$ac_t""no" 1>&6
8525 with_png=no
8526 fi
8527  }
8528   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8529 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8530 echo "configure:8531: checking for png.h" >&5
8531
8532 cat > conftest.$ac_ext <<EOF
8533 #line 8534 "configure"
8534 #include "confdefs.h"
8535 #include <png.h>
8536 EOF
8537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8538 { (eval echo configure:8539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8540 if test -z "$ac_err"; then
8541   rm -rf conftest*
8542   eval "ac_cv_header_$ac_safe=yes"
8543 else
8544   echo "$ac_err" >&5
8545   echo "configure: failed program was:" >&5
8546   cat conftest.$ac_ext >&5
8547   rm -rf conftest*
8548   eval "ac_cv_header_$ac_safe=no"
8549 fi
8550 rm -f conftest*
8551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8552   echo "$ac_t""yes" 1>&6
8553   :
8554 else
8555   echo "$ac_t""no" 1>&6
8556 with_png=no
8557 fi
8558  }
8559   test -z "$with_png" && { 
8560 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8561 echo "configure:8562: checking for png_read_image in -lpng" >&5
8562 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8563
8564 xe_check_libs=" -lpng "
8565 cat > conftest.$ac_ext <<EOF
8566 #line 8567 "configure"
8567 #include "confdefs.h"
8568 /* Override any gcc2 internal prototype to avoid an error.  */
8569 /* We use char because int might match the return type of a gcc2
8570     builtin and then its argument prototype would still apply.  */
8571 char png_read_image();
8572
8573 int main() {
8574 png_read_image()
8575 ; return 0; }
8576 EOF
8577 if { (eval echo configure:8578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8578   rm -rf conftest*
8579   eval "ac_cv_lib_$ac_lib_var=yes"
8580 else
8581   echo "configure: failed program was:" >&5
8582   cat conftest.$ac_ext >&5
8583   rm -rf conftest*
8584   eval "ac_cv_lib_$ac_lib_var=no"
8585 fi
8586 rm -f conftest*
8587 xe_check_libs=""
8588
8589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8590   echo "$ac_t""yes" 1>&6
8591   :
8592 else
8593   echo "$ac_t""no" 1>&6
8594 with_png=no
8595 fi
8596
8597  }
8598   if test -z "$with_png"; then
8599     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8600 echo "configure:8601: checking for workable png version information" >&5
8601     xe_check_libs="-lpng -lz"
8602     cat > conftest.$ac_ext <<EOF
8603 #line 8604 "configure"
8604 #include "confdefs.h"
8605 #include <png.h>
8606     int main(int c, char **v) {
8607     if (c == 1) return 0;
8608     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8609     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8610 EOF
8611 if { (eval echo configure:8612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8612 then
8613   ./conftest dummy_arg; png_status=$?;
8614       if test "$png_status" = "0"; then
8615         with_png=yes;
8616       else
8617         with_png=no;
8618         if test "$png_status" = "1"; then
8619           png_problem="PNG library version and header file don't match!"
8620         elif test "$png_status" = "2"; then
8621           png_problem="PNG library version too old (pre 1.0.2)!"
8622         fi
8623         echo "
8624 *** WARNING *** $png_problem
8625   I'm not touching that with a 10-foot pole!
8626   If you really want to use the installed version of libPNG, rerun
8627   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8628     fi
8629 else
8630   conftest_rc="$?"
8631   echo "configure: failed program was:" >&5
8632   cat conftest.$ac_ext >&5
8633   rm -fr conftest*
8634   with_png=no
8635 fi
8636 rm -fr conftest*
8637     xe_check_libs=
8638     echo "$ac_t""$with_png" 1>&6
8639   fi
8640   if test "$with_png" = "yes"; then
8641     { test "$extra_verbose" = "yes" && cat << \EOF
8642     Defining HAVE_PNG
8643 EOF
8644 cat >> confdefs.h <<\EOF
8645 #define HAVE_PNG 1
8646 EOF
8647 }
8648
8649     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8650   fi
8651
8652     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8653 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8654 echo "configure:8655: checking for tiffio.h" >&5
8655
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 #include <tiffio.h>
8660 EOF
8661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8662 { (eval echo configure:8663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8664 if test -z "$ac_err"; then
8665   rm -rf conftest*
8666   eval "ac_cv_header_$ac_safe=yes"
8667 else
8668   echo "$ac_err" >&5
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_header_$ac_safe=no"
8673 fi
8674 rm -f conftest*
8675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8676   echo "$ac_t""yes" 1>&6
8677   :
8678 else
8679   echo "$ac_t""no" 1>&6
8680 with_tiff=no
8681 fi
8682  }
8683   test -z "$with_tiff" && { 
8684 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8685 echo "configure:8686: checking for TIFFClientOpen in -ltiff" >&5
8686 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8687
8688 xe_check_libs=" -ltiff "
8689 cat > conftest.$ac_ext <<EOF
8690 #line 8691 "configure"
8691 #include "confdefs.h"
8692 /* Override any gcc2 internal prototype to avoid an error.  */
8693 /* We use char because int might match the return type of a gcc2
8694     builtin and then its argument prototype would still apply.  */
8695 char TIFFClientOpen();
8696
8697 int main() {
8698 TIFFClientOpen()
8699 ; return 0; }
8700 EOF
8701 if { (eval echo configure:8702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8702   rm -rf conftest*
8703   eval "ac_cv_lib_$ac_lib_var=yes"
8704 else
8705   echo "configure: failed program was:" >&5
8706   cat conftest.$ac_ext >&5
8707   rm -rf conftest*
8708   eval "ac_cv_lib_$ac_lib_var=no"
8709 fi
8710 rm -f conftest*
8711 xe_check_libs=""
8712
8713 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8714   echo "$ac_t""yes" 1>&6
8715   :
8716 else
8717   echo "$ac_t""no" 1>&6
8718 with_tiff=no
8719 fi
8720
8721  }
8722   test -z "$with_tiff" && with_tiff=yes
8723   if test "$with_tiff" = "yes"; then
8724     { test "$extra_verbose" = "yes" && cat << \EOF
8725     Defining HAVE_TIFF
8726 EOF
8727 cat >> confdefs.h <<\EOF
8728 #define HAVE_TIFF 1
8729 EOF
8730 }
8731
8732     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8733   fi
8734 fi
8735
8736
8737 if test "$with_gtk" = "yes"; then
8738     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8739 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8740 echo "configure:8741: checking for compface.h" >&5
8741
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8745 #include <compface.h>
8746 EOF
8747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8748 { (eval echo configure:8749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8750 if test -z "$ac_err"; then
8751   rm -rf conftest*
8752   eval "ac_cv_header_$ac_safe=yes"
8753 else
8754   echo "$ac_err" >&5
8755   echo "configure: failed program was:" >&5
8756   cat conftest.$ac_ext >&5
8757   rm -rf conftest*
8758   eval "ac_cv_header_$ac_safe=no"
8759 fi
8760 rm -f conftest*
8761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8762   echo "$ac_t""yes" 1>&6
8763   :
8764 else
8765   echo "$ac_t""no" 1>&6
8766 with_xface=no
8767 fi
8768  }
8769   test -z "$with_xface" && { 
8770 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8771 echo "configure:8772: checking for UnGenFace in -lcompface" >&5
8772 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8773
8774 xe_check_libs=" -lcompface "
8775 cat > conftest.$ac_ext <<EOF
8776 #line 8777 "configure"
8777 #include "confdefs.h"
8778 /* Override any gcc2 internal prototype to avoid an error.  */
8779 /* We use char because int might match the return type of a gcc2
8780     builtin and then its argument prototype would still apply.  */
8781 char UnGenFace();
8782
8783 int main() {
8784 UnGenFace()
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8788   rm -rf conftest*
8789   eval "ac_cv_lib_$ac_lib_var=yes"
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   eval "ac_cv_lib_$ac_lib_var=no"
8795 fi
8796 rm -f conftest*
8797 xe_check_libs=""
8798
8799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8800   echo "$ac_t""yes" 1>&6
8801   : 
8802 else
8803   echo "$ac_t""no" 1>&6
8804 with_xface=no
8805 fi
8806
8807  }
8808   test -z "$with_xface" && with_xface=yes
8809   if test "$with_xface" = "yes"; then
8810     { test "$extra_verbose" = "yes" && cat << \EOF
8811     Defining HAVE_XFACE
8812 EOF
8813 cat >> confdefs.h <<\EOF
8814 #define HAVE_XFACE 1
8815 EOF
8816 }
8817
8818     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8819   fi
8820 fi
8821
8822
8823
8824 if test "$with_x11" = "yes"; then
8825   echo "checking for X11 graphics libraries" 1>&6
8826 echo "configure:8827: checking for X11 graphics libraries" >&5
8827 fi
8828
8829 case "$with_widgets" in
8830   "yes" | "athena")             detect_athena=yes ;;
8831    *)                           detect_athena=no ;;
8832 esac
8833
8834 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8835   echo "checking for the Athena widgets" 1>&6
8836 echo "configure:8837: checking for the Athena widgets" >&5
8837
8838     case "$with_athena" in
8839         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8840     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8841     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8842     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8843     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8844     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8845   esac
8846
8847     if test "$athena_3d" = "no"; then
8848     
8849 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8850 echo "configure:8851: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8851 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8852
8853 xe_check_libs=" -l$athena_variant "
8854 cat > conftest.$ac_ext <<EOF
8855 #line 8856 "configure"
8856 #include "confdefs.h"
8857 /* Override any gcc2 internal prototype to avoid an error.  */
8858 /* We use char because int might match the return type of a gcc2
8859     builtin and then its argument prototype would still apply.  */
8860 char XawScrollbarSetThumb();
8861
8862 int main() {
8863 XawScrollbarSetThumb()
8864 ; return 0; }
8865 EOF
8866 if { (eval echo configure:8867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8867   rm -rf conftest*
8868   eval "ac_cv_lib_$ac_lib_var=yes"
8869 else
8870   echo "configure: failed program was:" >&5
8871   cat conftest.$ac_ext >&5
8872   rm -rf conftest*
8873   eval "ac_cv_lib_$ac_lib_var=no"
8874 fi
8875 rm -f conftest*
8876 xe_check_libs=""
8877
8878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8879   echo "$ac_t""yes" 1>&6
8880           
8881 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8882 echo "configure:8883: checking for threeDClassRec in -l$athena_variant" >&5
8883 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8884
8885 xe_check_libs=" -l$athena_variant "
8886 cat > conftest.$ac_ext <<EOF
8887 #line 8888 "configure"
8888 #include "confdefs.h"
8889 /* Override any gcc2 internal prototype to avoid an error.  */
8890 /* We use char because int might match the return type of a gcc2
8891     builtin and then its argument prototype would still apply.  */
8892 char threeDClassRec();
8893
8894 int main() {
8895 threeDClassRec()
8896 ; return 0; }
8897 EOF
8898 if { (eval echo configure:8899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8899   rm -rf conftest*
8900   eval "ac_cv_lib_$ac_lib_var=yes"
8901 else
8902   echo "configure: failed program was:" >&5
8903   cat conftest.$ac_ext >&5
8904   rm -rf conftest*
8905   eval "ac_cv_lib_$ac_lib_var=no"
8906 fi
8907 rm -f conftest*
8908 xe_check_libs=""
8909
8910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8911   echo "$ac_t""yes" 1>&6
8912   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8913 else
8914   echo "$ac_t""no" 1>&6
8915 athena_lib=$athena_variant
8916 fi
8917
8918
8919       
8920 else
8921   echo "$ac_t""no" 1>&6
8922 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8923 fi
8924
8925
8926   else
8927         
8928 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8929 echo "configure:8930: checking for threeDClassRec in -l$athena_variant" >&5
8930 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8931
8932 xe_check_libs=" -l$athena_variant "
8933 cat > conftest.$ac_ext <<EOF
8934 #line 8935 "configure"
8935 #include "confdefs.h"
8936 /* Override any gcc2 internal prototype to avoid an error.  */
8937 /* We use char because int might match the return type of a gcc2
8938     builtin and then its argument prototype would still apply.  */
8939 char threeDClassRec();
8940
8941 int main() {
8942 threeDClassRec()
8943 ; return 0; }
8944 EOF
8945 if { (eval echo configure:8946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8946   rm -rf conftest*
8947   eval "ac_cv_lib_$ac_lib_var=yes"
8948 else
8949   echo "configure: failed program was:" >&5
8950   cat conftest.$ac_ext >&5
8951   rm -rf conftest*
8952   eval "ac_cv_lib_$ac_lib_var=no"
8953 fi
8954 rm -f conftest*
8955 xe_check_libs=""
8956
8957 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8958   echo "$ac_t""yes" 1>&6
8959   athena_lib=$athena_variant
8960 else
8961   echo "$ac_t""no" 1>&6
8962 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8963 echo "configure:8964: checking for threeDClassRec in -lXaw" >&5
8964 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8965
8966 xe_check_libs=" -lXaw "
8967 cat > conftest.$ac_ext <<EOF
8968 #line 8969 "configure"
8969 #include "confdefs.h"
8970 /* Override any gcc2 internal prototype to avoid an error.  */
8971 /* We use char because int might match the return type of a gcc2
8972     builtin and then its argument prototype would still apply.  */
8973 char threeDClassRec();
8974
8975 int main() {
8976 threeDClassRec()
8977 ; return 0; }
8978 EOF
8979 if { (eval echo configure:8980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8980   rm -rf conftest*
8981   eval "ac_cv_lib_$ac_lib_var=yes"
8982 else
8983   echo "configure: failed program was:" >&5
8984   cat conftest.$ac_ext >&5
8985   rm -rf conftest*
8986   eval "ac_cv_lib_$ac_lib_var=no"
8987 fi
8988 rm -f conftest*
8989 xe_check_libs=""
8990
8991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8992   echo "$ac_t""yes" 1>&6
8993   athena_lib=Xaw;
8994           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8995         
8996 else
8997   echo "$ac_t""no" 1>&6
8998 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8999 fi
9000
9001
9002 fi
9003
9004
9005   fi
9006
9007     if test "$athena_3d" = "no"; then
9008     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9009 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9010 echo "configure:9011: checking for X11/Xaw/ThreeD.h" >&5
9011
9012 cat > conftest.$ac_ext <<EOF
9013 #line 9014 "configure"
9014 #include "confdefs.h"
9015 #include <X11/Xaw/ThreeD.h>
9016 EOF
9017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9018 { (eval echo configure:9019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9020 if test -z "$ac_err"; then
9021   rm -rf conftest*
9022   eval "ac_cv_header_$ac_safe=yes"
9023 else
9024   echo "$ac_err" >&5
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   eval "ac_cv_header_$ac_safe=no"
9029 fi
9030 rm -f conftest*
9031 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9034 else
9035   echo "$ac_t""no" 1>&6
9036 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9037 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9038 echo "configure:9039: checking for X11/Xaw/XawInit.h" >&5
9039
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 #include <X11/Xaw/XawInit.h>
9044 EOF
9045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9046 { (eval echo configure:9047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9048 if test -z "$ac_err"; then
9049   rm -rf conftest*
9050   eval "ac_cv_header_$ac_safe=yes"
9051 else
9052   echo "$ac_err" >&5
9053   echo "configure: failed program was:" >&5
9054   cat conftest.$ac_ext >&5
9055   rm -rf conftest*
9056   eval "ac_cv_header_$ac_safe=no"
9057 fi
9058 rm -f conftest*
9059 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9060   echo "$ac_t""yes" 1>&6
9061   athena_h_path=X11/Xaw
9062 else
9063   echo "$ac_t""no" 1>&6
9064 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9065 fi
9066
9067 fi
9068
9069   else
9070             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9071 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9072 echo "configure:9073: checking for X11/$athena_variant/XawInit.h" >&5
9073
9074 cat > conftest.$ac_ext <<EOF
9075 #line 9076 "configure"
9076 #include "confdefs.h"
9077 #include <X11/$athena_variant/XawInit.h>
9078 EOF
9079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9080 { (eval echo configure:9081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9082 if test -z "$ac_err"; then
9083   rm -rf conftest*
9084   eval "ac_cv_header_$ac_safe=yes"
9085 else
9086   echo "$ac_err" >&5
9087   echo "configure: failed program was:" >&5
9088   cat conftest.$ac_ext >&5
9089   rm -rf conftest*
9090   eval "ac_cv_header_$ac_safe=no"
9091 fi
9092 rm -f conftest*
9093 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9094   echo "$ac_t""yes" 1>&6
9095   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9096 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9097 echo "configure:9098: checking for X11/$athena_variant/ThreeD.h" >&5
9098
9099 cat > conftest.$ac_ext <<EOF
9100 #line 9101 "configure"
9101 #include "confdefs.h"
9102 #include <X11/$athena_variant/ThreeD.h>
9103 EOF
9104 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9105 { (eval echo configure:9106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9106 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9107 if test -z "$ac_err"; then
9108   rm -rf conftest*
9109   eval "ac_cv_header_$ac_safe=yes"
9110 else
9111   echo "$ac_err" >&5
9112   echo "configure: failed program was:" >&5
9113   cat conftest.$ac_ext >&5
9114   rm -rf conftest*
9115   eval "ac_cv_header_$ac_safe=no"
9116 fi
9117 rm -f conftest*
9118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9119   echo "$ac_t""yes" 1>&6
9120   athena_h_path=X11/$athena_variant
9121 else
9122   echo "$ac_t""no" 1>&6
9123 fi
9124
9125 else
9126   echo "$ac_t""no" 1>&6
9127 fi
9128
9129
9130         if test -z "$athena_h_path"; then
9131       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9132 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9133 echo "configure:9134: checking for $athena_variant/XawInit.h" >&5
9134
9135 cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 #include <$athena_variant/XawInit.h>
9139 EOF
9140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9141 { (eval echo configure:9142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9143 if test -z "$ac_err"; then
9144   rm -rf conftest*
9145   eval "ac_cv_header_$ac_safe=yes"
9146 else
9147   echo "$ac_err" >&5
9148   echo "configure: failed program was:" >&5
9149   cat conftest.$ac_ext >&5
9150   rm -rf conftest*
9151   eval "ac_cv_header_$ac_safe=no"
9152 fi
9153 rm -f conftest*
9154 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9155   echo "$ac_t""yes" 1>&6
9156   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9157 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9158 echo "configure:9159: checking for $athena_variant/ThreeD.h" >&5
9159
9160 cat > conftest.$ac_ext <<EOF
9161 #line 9162 "configure"
9162 #include "confdefs.h"
9163 #include <$athena_variant/ThreeD.h>
9164 EOF
9165 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9166 { (eval echo configure:9167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9167 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9168 if test -z "$ac_err"; then
9169   rm -rf conftest*
9170   eval "ac_cv_header_$ac_safe=yes"
9171 else
9172   echo "$ac_err" >&5
9173   echo "configure: failed program was:" >&5
9174   cat conftest.$ac_ext >&5
9175   rm -rf conftest*
9176   eval "ac_cv_header_$ac_safe=no"
9177 fi
9178 rm -f conftest*
9179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181   athena_h_path=$athena_variant
9182 else
9183   echo "$ac_t""no" 1>&6
9184 fi
9185
9186 else
9187   echo "$ac_t""no" 1>&6
9188 fi
9189
9190     fi
9191
9192         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9193       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9194 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9195 echo "configure:9196: checking for X11/Xaw3d/XawInit.h" >&5
9196
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200 #include <X11/Xaw3d/XawInit.h>
9201 EOF
9202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9203 { (eval echo configure:9204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9205 if test -z "$ac_err"; then
9206   rm -rf conftest*
9207   eval "ac_cv_header_$ac_safe=yes"
9208 else
9209   echo "$ac_err" >&5
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_header_$ac_safe=no"
9214 fi
9215 rm -f conftest*
9216 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9217   echo "$ac_t""yes" 1>&6
9218   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9219 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9220 echo "configure:9221: checking for X11/Xaw3d/ThreeD.h" >&5
9221
9222 cat > conftest.$ac_ext <<EOF
9223 #line 9224 "configure"
9224 #include "confdefs.h"
9225 #include <X11/Xaw3d/ThreeD.h>
9226 EOF
9227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9228 { (eval echo configure:9229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9230 if test -z "$ac_err"; then
9231   rm -rf conftest*
9232   eval "ac_cv_header_$ac_safe=yes"
9233 else
9234   echo "$ac_err" >&5
9235   echo "configure: failed program was:" >&5
9236   cat conftest.$ac_ext >&5
9237   rm -rf conftest*
9238   eval "ac_cv_header_$ac_safe=no"
9239 fi
9240 rm -f conftest*
9241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9242   echo "$ac_t""yes" 1>&6
9243   
9244             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9245             athena_h_path=X11/Xaw3d
9246           
9247 else
9248   echo "$ac_t""no" 1>&6
9249 fi
9250
9251 else
9252   echo "$ac_t""no" 1>&6
9253 fi
9254
9255     fi
9256
9257         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9258       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9259 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9260 echo "configure:9261: checking for Xaw3d/XawInit.h" >&5
9261
9262 cat > conftest.$ac_ext <<EOF
9263 #line 9264 "configure"
9264 #include "confdefs.h"
9265 #include <Xaw3d/XawInit.h>
9266 EOF
9267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9268 { (eval echo configure:9269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9270 if test -z "$ac_err"; then
9271   rm -rf conftest*
9272   eval "ac_cv_header_$ac_safe=yes"
9273 else
9274   echo "$ac_err" >&5
9275   echo "configure: failed program was:" >&5
9276   cat conftest.$ac_ext >&5
9277   rm -rf conftest*
9278   eval "ac_cv_header_$ac_safe=no"
9279 fi
9280 rm -f conftest*
9281 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9282   echo "$ac_t""yes" 1>&6
9283   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9284 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9285 echo "configure:9286: checking for Xaw3d/ThreeD.h" >&5
9286
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290 #include <Xaw3d/ThreeD.h>
9291 EOF
9292 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9293 { (eval echo configure:9294: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9294 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9295 if test -z "$ac_err"; then
9296   rm -rf conftest*
9297   eval "ac_cv_header_$ac_safe=yes"
9298 else
9299   echo "$ac_err" >&5
9300   echo "configure: failed program was:" >&5
9301   cat conftest.$ac_ext >&5
9302   rm -rf conftest*
9303   eval "ac_cv_header_$ac_safe=no"
9304 fi
9305 rm -f conftest*
9306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9307   echo "$ac_t""yes" 1>&6
9308   
9309             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9310             athena_h_path=Xaw3d
9311           
9312 else
9313   echo "$ac_t""no" 1>&6
9314 fi
9315
9316 else
9317   echo "$ac_t""no" 1>&6
9318 fi
9319
9320     fi
9321
9322             if test -z "$athena_h_path"; then
9323       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9324 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9325 echo "configure:9326: checking for X11/Xaw/ThreeD.h" >&5
9326
9327 cat > conftest.$ac_ext <<EOF
9328 #line 9329 "configure"
9329 #include "confdefs.h"
9330 #include <X11/Xaw/ThreeD.h>
9331 EOF
9332 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9333 { (eval echo configure:9334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9334 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9335 if test -z "$ac_err"; then
9336   rm -rf conftest*
9337   eval "ac_cv_header_$ac_safe=yes"
9338 else
9339   echo "$ac_err" >&5
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_header_$ac_safe=no"
9344 fi
9345 rm -f conftest*
9346 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9347   echo "$ac_t""yes" 1>&6
9348   
9349           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9350           athena_h_path=X11/Xaw
9351         
9352 else
9353   echo "$ac_t""no" 1>&6
9354 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9355 fi
9356
9357     fi
9358   fi
9359
9360     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9361     have_xaw=yes
9362   else
9363     have_xaw=no
9364   fi
9365
9366 else
9367   have_xaw=no
9368 fi 
9369 if test "$with_x11" = "yes"; then
9370     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9371 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9372 echo "configure:9373: checking for Xm/Xm.h" >&5
9373
9374 cat > conftest.$ac_ext <<EOF
9375 #line 9376 "configure"
9376 #include "confdefs.h"
9377 #include <Xm/Xm.h>
9378 EOF
9379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9380 { (eval echo configure:9381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9382 if test -z "$ac_err"; then
9383   rm -rf conftest*
9384   eval "ac_cv_header_$ac_safe=yes"
9385 else
9386   echo "$ac_err" >&5
9387   echo "configure: failed program was:" >&5
9388   cat conftest.$ac_ext >&5
9389   rm -rf conftest*
9390   eval "ac_cv_header_$ac_safe=no"
9391 fi
9392 rm -f conftest*
9393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9394   echo "$ac_t""yes" 1>&6
9395   
9396 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9397 echo "configure:9398: checking for XmStringFree in -lXm" >&5
9398 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9399
9400 xe_check_libs=" -lXm "
9401 cat > conftest.$ac_ext <<EOF
9402 #line 9403 "configure"
9403 #include "confdefs.h"
9404 /* Override any gcc2 internal prototype to avoid an error.  */
9405 /* We use char because int might match the return type of a gcc2
9406     builtin and then its argument prototype would still apply.  */
9407 char XmStringFree();
9408
9409 int main() {
9410 XmStringFree()
9411 ; return 0; }
9412 EOF
9413 if { (eval echo configure:9414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9414   rm -rf conftest*
9415   eval "ac_cv_lib_$ac_lib_var=yes"
9416 else
9417   echo "configure: failed program was:" >&5
9418   cat conftest.$ac_ext >&5
9419   rm -rf conftest*
9420   eval "ac_cv_lib_$ac_lib_var=no"
9421 fi
9422 rm -f conftest*
9423 xe_check_libs=""
9424
9425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9426   echo "$ac_t""yes" 1>&6
9427   have_motif=yes
9428 else
9429   echo "$ac_t""no" 1>&6
9430 have_motif=no
9431 fi
9432
9433
9434 else
9435   echo "$ac_t""no" 1>&6
9436 have_motif=no
9437 fi
9438
9439
9440   if test "$have_motif" = "yes"; then
9441         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9442 echo "configure:9443: checking for Lesstif" >&5
9443     cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9446 #include <Xm/Xm.h>
9447 #ifdef LESSTIF_VERSION
9448 yes
9449 #endif
9450
9451 EOF
9452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9453   egrep "yes" >/dev/null 2>&1; then
9454   rm -rf conftest*
9455   have_lesstif=yes
9456 else
9457   rm -rf conftest*
9458   have_lesstif=no
9459 fi
9460 rm -f conftest*
9461
9462   echo "$ac_t""$have_lesstif" 1>&6
9463   fi
9464
9465 fi 
9466
9467 case "$with_menubars" in "" | "yes" | "athena" )
9468   with_menubars="lucid" ;;
9469 esac
9470 case "$with_dialogs" in "" | "yes" | "lucid" )
9471   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9472   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9473   else with_dialogs=no
9474   fi ;;
9475 esac
9476 case "$with_scrollbars" in "" | "yes" )
9477   with_scrollbars="lucid" ;;
9478 esac
9479 case "$with_widgets" in "" | "yes" | "lucid")
9480   if   test "$have_motif" = "yes"; then with_widgets="motif"
9481   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9482   else with_widgets=no
9483   fi ;;
9484 esac
9485
9486 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9487
9488 case "$all_widgets" in
9489   *athena* )
9490     if test "$have_xaw" != "yes"; then
9491       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9492     fi
9493
9494         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9495
9496         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9497
9498                     { test "$extra_verbose" = "yes" && cat << EOF
9499     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9500 EOF
9501 cat >> confdefs.h <<EOF
9502 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9503 EOF
9504 }
9505
9506     { test "$extra_verbose" = "yes" && cat << EOF
9507     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9508 EOF
9509 cat >> confdefs.h <<EOF
9510 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9511 EOF
9512 }
9513
9514     { test "$extra_verbose" = "yes" && cat << EOF
9515     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9516 EOF
9517 cat >> confdefs.h <<EOF
9518 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9519 EOF
9520 }
9521
9522     { test "$extra_verbose" = "yes" && cat << EOF
9523     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9524 EOF
9525 cat >> confdefs.h <<EOF
9526 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9527 EOF
9528 }
9529
9530     { test "$extra_verbose" = "yes" && cat << EOF
9531     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9532 EOF
9533 cat >> confdefs.h <<EOF
9534 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9535 EOF
9536 }
9537
9538     { test "$extra_verbose" = "yes" && cat << EOF
9539     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9540 EOF
9541 cat >> confdefs.h <<EOF
9542 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9543 EOF
9544 }
9545
9546     { test "$extra_verbose" = "yes" && cat << EOF
9547     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9548 EOF
9549 cat >> confdefs.h <<EOF
9550 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9551 EOF
9552 }
9553
9554     { test "$extra_verbose" = "yes" && cat << EOF
9555     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9556 EOF
9557 cat >> confdefs.h <<EOF
9558 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9559 EOF
9560 }
9561
9562     { test "$extra_verbose" = "yes" && cat << EOF
9563     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9564 EOF
9565 cat >> confdefs.h <<EOF
9566 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9567 EOF
9568 }
9569
9570     { test "$extra_verbose" = "yes" && cat << EOF
9571     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9572 EOF
9573 cat >> confdefs.h <<EOF
9574 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9575 EOF
9576 }
9577
9578
9579     { test "$extra_verbose" = "yes" && cat << \EOF
9580     Defining LWLIB_USES_ATHENA
9581 EOF
9582 cat >> confdefs.h <<\EOF
9583 #define LWLIB_USES_ATHENA 1
9584 EOF
9585 }
9586
9587     { test "$extra_verbose" = "yes" && cat << \EOF
9588     Defining NEED_ATHENA
9589 EOF
9590 cat >> confdefs.h <<\EOF
9591 #define NEED_ATHENA 1
9592 EOF
9593 }
9594
9595     need_athena="yes"
9596
9597     if test "$athena_3d" = "yes"; then
9598       { test "$extra_verbose" = "yes" && cat << \EOF
9599     Defining HAVE_ATHENA_3D
9600 EOF
9601 cat >> confdefs.h <<\EOF
9602 #define HAVE_ATHENA_3D 1
9603 EOF
9604 }
9605
9606     fi
9607   ;;
9608 esac
9609
9610 case "$all_widgets" in *motif* )
9611   { test "$extra_verbose" = "yes" && cat << \EOF
9612     Defining LWLIB_USES_MOTIF
9613 EOF
9614 cat >> confdefs.h <<\EOF
9615 #define LWLIB_USES_MOTIF 1
9616 EOF
9617 }
9618
9619   { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining NEED_MOTIF
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define NEED_MOTIF 1
9624 EOF
9625 }
9626
9627   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9628   need_motif=yes ;;
9629 esac
9630
9631 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9632 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9633 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9634 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9635         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9636 case "$with_widgets" in athena* )
9637         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;;
9638 esac
9639 case "$all_widgets" in *lucid* )
9640   { test "$extra_verbose" = "yes" && cat << \EOF
9641     Defining NEED_LUCID
9642 EOF
9643 cat >> confdefs.h <<\EOF
9644 #define NEED_LUCID 1
9645 EOF
9646 }
9647
9648   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9649 esac
9650
9651
9652
9653 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9654     Defining LWLIB_SCROLLBARS_ATHENA
9655 EOF
9656 cat >> confdefs.h <<\EOF
9657 #define LWLIB_SCROLLBARS_ATHENA 1
9658 EOF
9659 }
9660
9661 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9662     Defining LWLIB_DIALOGS_ATHENA
9663 EOF
9664 cat >> confdefs.h <<\EOF
9665 #define LWLIB_DIALOGS_ATHENA 1
9666 EOF
9667 }
9668
9669
9670 if test "$athena_3d" = "yes"; then
9671   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9672     Defining LWLIB_SCROLLBARS_ATHENA3D
9673 EOF
9674 cat >> confdefs.h <<\EOF
9675 #define LWLIB_SCROLLBARS_ATHENA3D 1
9676 EOF
9677 }
9678
9679   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9680     Defining LWLIB_DIALOGS_ATHENA3D
9681 EOF
9682 cat >> confdefs.h <<\EOF
9683 #define LWLIB_DIALOGS_ATHENA3D 1
9684 EOF
9685 }
9686
9687 fi
9688
9689 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9690     Defining LWLIB_WIDGETS_ATHENA
9691 EOF
9692 cat >> confdefs.h <<\EOF
9693 #define LWLIB_WIDGETS_ATHENA 1
9694 EOF
9695 }
9696 ;; esac
9697 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9698         { test "$extra_verbose" = "yes" && cat << \EOF
9699     Defining LWLIB_TABS_LUCID
9700 EOF
9701 cat >> confdefs.h <<\EOF
9702 #define LWLIB_TABS_LUCID 1
9703 EOF
9704 }
9705
9706
9707 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9708     Defining HAVE_MENUBARS
9709 EOF
9710 cat >> confdefs.h <<\EOF
9711 #define HAVE_MENUBARS 1
9712 EOF
9713 }
9714
9715 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9716     Defining HAVE_SCROLLBARS
9717 EOF
9718 cat >> confdefs.h <<\EOF
9719 #define HAVE_SCROLLBARS 1
9720 EOF
9721 }
9722
9723 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9724     Defining HAVE_DIALOGS
9725 EOF
9726 cat >> confdefs.h <<\EOF
9727 #define HAVE_DIALOGS 1
9728 EOF
9729 }
9730
9731 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9732     Defining HAVE_TOOLBARS
9733 EOF
9734 cat >> confdefs.h <<\EOF
9735 #define HAVE_TOOLBARS 1
9736 EOF
9737 }
9738
9739 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9740     Defining HAVE_WIDGETS
9741 EOF
9742 cat >> confdefs.h <<\EOF
9743 #define HAVE_WIDGETS 1
9744 EOF
9745 }
9746
9747
9748 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9749     Defining LWLIB_MENUBARS_LUCID
9750 EOF
9751 cat >> confdefs.h <<\EOF
9752 #define LWLIB_MENUBARS_LUCID 1
9753 EOF
9754 }
9755
9756 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9757     Defining LWLIB_SCROLLBARS_LUCID
9758 EOF
9759 cat >> confdefs.h <<\EOF
9760 #define LWLIB_SCROLLBARS_LUCID 1
9761 EOF
9762 }
9763
9764
9765 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9766     Defining LWLIB_MENUBARS_MOTIF
9767 EOF
9768 cat >> confdefs.h <<\EOF
9769 #define LWLIB_MENUBARS_MOTIF 1
9770 EOF
9771 }
9772
9773 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9774     Defining LWLIB_SCROLLBARS_MOTIF
9775 EOF
9776 cat >> confdefs.h <<\EOF
9777 #define LWLIB_SCROLLBARS_MOTIF 1
9778 EOF
9779 }
9780
9781 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9782     Defining LWLIB_DIALOGS_MOTIF
9783 EOF
9784 cat >> confdefs.h <<\EOF
9785 #define LWLIB_DIALOGS_MOTIF 1
9786 EOF
9787 }
9788
9789 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9790     Defining LWLIB_WIDGETS_MOTIF
9791 EOF
9792 cat >> confdefs.h <<\EOF
9793 #define LWLIB_WIDGETS_MOTIF 1
9794 EOF
9795 }
9796
9797
9798 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9799    echo "    xemacs will be linked with \"menubar.o\""
9800  fi
9801 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9802    echo "    xemacs will be linked with \"scrollbar.o\""
9803  fi
9804 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"dialog.o\""
9806  fi
9807 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9808    echo "    xemacs will be linked with \"toolbar.o\""
9809  fi
9810
9811 if test "$with_gtk" = "yes"; then
9812   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9813    echo "    xemacs will be linked with \"menubar-gtk.o\""
9814  fi
9815   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9816    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9817  fi
9818   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9819    echo "    xemacs will be linked with \"dialog-gtk.o\""
9820  fi
9821   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9822    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9823  fi
9824   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9825    echo "    xemacs will be linked with \"gui-gtk.o\""
9826  fi
9827 fi
9828
9829 if test "$with_x11" = "yes"; then
9830   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9831    echo "    xemacs will be linked with \"menubar-x.o\""
9832  fi
9833   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9834    echo "    xemacs will be linked with \"scrollbar-x.o\""
9835  fi
9836   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9837    echo "    xemacs will be linked with \"dialog-x.o\""
9838  fi
9839   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9840    echo "    xemacs will be linked with \"toolbar-x.o\""
9841  fi
9842   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9843    echo "    xemacs will be linked with \"gui-x.o\""
9844  fi
9845 fi
9846
9847
9848 test -z "$with_mule" && with_mule=no
9849 test -z "$with_file_coding" && with_file_coding=no
9850
9851
9852 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9853   { test "$extra_verbose" = "yes" && cat << \EOF
9854     Defining FILE_CODING
9855 EOF
9856 cat >> confdefs.h <<\EOF
9857 #define FILE_CODING 1
9858 EOF
9859 }
9860
9861   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9862    echo "    xemacs will be linked with \"file-coding.o\""
9863  fi
9864 fi
9865
9866 if test "$with_mule" = "yes" ; then
9867   echo "checking for Mule-related features" 1>&6
9868 echo "configure:9869: checking for Mule-related features" >&5
9869   { test "$extra_verbose" = "yes" && cat << \EOF
9870     Defining MULE
9871 EOF
9872 cat >> confdefs.h <<\EOF
9873 #define MULE 1
9874 EOF
9875 }
9876
9877   { test "$extra_verbose" = "yes" && cat << \EOF
9878     Defining FILE_CODING
9879 EOF
9880 cat >> confdefs.h <<\EOF
9881 #define FILE_CODING 1
9882 EOF
9883 }
9884
9885   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9886    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9887  fi
9888
9889     for ac_hdr in libintl.h
9890 do
9891 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9892 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9893 echo "configure:9894: checking for $ac_hdr" >&5
9894
9895 cat > conftest.$ac_ext <<EOF
9896 #line 9897 "configure"
9897 #include "confdefs.h"
9898 #include <$ac_hdr>
9899 EOF
9900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9901 { (eval echo configure:9902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9903 if test -z "$ac_err"; then
9904   rm -rf conftest*
9905   eval "ac_cv_header_$ac_safe=yes"
9906 else
9907   echo "$ac_err" >&5
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   eval "ac_cv_header_$ac_safe=no"
9912 fi
9913 rm -f conftest*
9914 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9915   echo "$ac_t""yes" 1>&6
9916     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9917   { test "$extra_verbose" = "yes" && cat << EOF
9918     Defining $ac_tr_hdr
9919 EOF
9920 cat >> confdefs.h <<EOF
9921 #define $ac_tr_hdr 1
9922 EOF
9923 }
9924  
9925 else
9926   echo "$ac_t""no" 1>&6
9927 fi
9928 done
9929
9930   
9931 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9932 echo "configure:9933: checking for strerror in -lintl" >&5
9933 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9934
9935 xe_check_libs=" -lintl "
9936 cat > conftest.$ac_ext <<EOF
9937 #line 9938 "configure"
9938 #include "confdefs.h"
9939 /* Override any gcc2 internal prototype to avoid an error.  */
9940 /* We use char because int might match the return type of a gcc2
9941     builtin and then its argument prototype would still apply.  */
9942 char strerror();
9943
9944 int main() {
9945 strerror()
9946 ; return 0; }
9947 EOF
9948 if { (eval echo configure:9949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9949   rm -rf conftest*
9950   eval "ac_cv_lib_$ac_lib_var=yes"
9951 else
9952   echo "configure: failed program was:" >&5
9953   cat conftest.$ac_ext >&5
9954   rm -rf conftest*
9955   eval "ac_cv_lib_$ac_lib_var=no"
9956 fi
9957 rm -f conftest*
9958 xe_check_libs=""
9959
9960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9961   echo "$ac_t""yes" 1>&6
9962     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9964   { test "$extra_verbose" = "yes" && cat << EOF
9965     Defining $ac_tr_lib
9966 EOF
9967 cat >> confdefs.h <<EOF
9968 #define $ac_tr_lib 1
9969 EOF
9970 }
9971
9972   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9973
9974 else
9975   echo "$ac_t""no" 1>&6
9976 fi
9977
9978
9979
9980   echo "checking for Mule input methods" 1>&6
9981 echo "configure:9982: checking for Mule input methods" >&5
9982         case "$with_xim" in "" | "yes" )
9983     echo "checking for XIM" 1>&6
9984 echo "configure:9985: checking for XIM" >&5
9985     
9986 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9987 echo "configure:9988: checking for XOpenIM in -lX11" >&5
9988 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9989
9990 xe_check_libs=" -lX11 "
9991 cat > conftest.$ac_ext <<EOF
9992 #line 9993 "configure"
9993 #include "confdefs.h"
9994 /* Override any gcc2 internal prototype to avoid an error.  */
9995 /* We use char because int might match the return type of a gcc2
9996     builtin and then its argument prototype would still apply.  */
9997 char XOpenIM();
9998
9999 int main() {
10000 XOpenIM()
10001 ; return 0; }
10002 EOF
10003 if { (eval echo configure:10004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10004   rm -rf conftest*
10005   eval "ac_cv_lib_$ac_lib_var=yes"
10006 else
10007   echo "configure: failed program was:" >&5
10008   cat conftest.$ac_ext >&5
10009   rm -rf conftest*
10010   eval "ac_cv_lib_$ac_lib_var=no"
10011 fi
10012 rm -f conftest*
10013 xe_check_libs=""
10014
10015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10016   echo "$ac_t""yes" 1>&6
10017   with_xim=xlib
10018 else
10019   echo "$ac_t""no" 1>&6
10020 with_xim=no
10021 fi
10022
10023
10024         if test "$have_motif $have_lesstif" = "yes no"; then
10025       
10026 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10027 echo "configure:10028: checking for XmImMbLookupString in -lXm" >&5
10028 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10029
10030 xe_check_libs=" -lXm "
10031 cat > conftest.$ac_ext <<EOF
10032 #line 10033 "configure"
10033 #include "confdefs.h"
10034 /* Override any gcc2 internal prototype to avoid an error.  */
10035 /* We use char because int might match the return type of a gcc2
10036     builtin and then its argument prototype would still apply.  */
10037 char XmImMbLookupString();
10038
10039 int main() {
10040 XmImMbLookupString()
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   eval "ac_cv_lib_$ac_lib_var=yes"
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=no"
10051 fi
10052 rm -f conftest*
10053 xe_check_libs=""
10054
10055 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10056   echo "$ac_t""yes" 1>&6
10057   with_xim=motif
10058 else
10059   echo "$ac_t""no" 1>&6
10060 fi
10061
10062
10063     fi ;;
10064   esac
10065   if test "$with_xim" != "no"; then
10066     { test "$extra_verbose" = "yes" && cat << \EOF
10067     Defining HAVE_XIM
10068 EOF
10069 cat >> confdefs.h <<\EOF
10070 #define HAVE_XIM 1
10071 EOF
10072 }
10073
10074     if test "$with_xim" = "xlib"; then
10075       { test "$extra_verbose" = "yes" && cat << \EOF
10076     Defining XIM_XLIB
10077 EOF
10078 cat >> confdefs.h <<\EOF
10079 #define XIM_XLIB 1
10080 EOF
10081 }
10082
10083       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10084    echo "    xemacs will be linked with \"input-method-xlib.o\""
10085  fi
10086     fi
10087     if test "$with_xim" = "motif"; then
10088       { test "$extra_verbose" = "yes" && cat << \EOF
10089     Defining XIM_MOTIF
10090 EOF
10091 cat >> confdefs.h <<\EOF
10092 #define XIM_MOTIF 1
10093 EOF
10094 }
10095
10096       need_motif=yes
10097       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10098    echo "    xemacs will be linked with \"input-method-motif.o\""
10099  fi
10100     fi
10101     if test "$with_xim" = "motif"; then
10102       with_xfs=no
10103     fi
10104   fi
10105
10106     if test "$with_xfs" = "yes" ; then
10107     echo "checking for XFontSet" 1>&6
10108 echo "configure:10109: checking for XFontSet" >&5
10109     
10110 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10111 echo "configure:10112: checking for XmbDrawString in -lX11" >&5
10112 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10113
10114 xe_check_libs=" -lX11 "
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 /* We use char because int might match the return type of a gcc2
10120     builtin and then its argument prototype would still apply.  */
10121 char XmbDrawString();
10122
10123 int main() {
10124 XmbDrawString()
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=yes"
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=no"
10135 fi
10136 rm -f conftest*
10137 xe_check_libs=""
10138
10139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10140   echo "$ac_t""yes" 1>&6
10141   :
10142 else
10143   echo "$ac_t""no" 1>&6
10144 with_xfs=no
10145 fi
10146
10147
10148     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10149       { test "$extra_verbose" = "yes" && cat << \EOF
10150     Defining USE_XFONTSET
10151 EOF
10152 cat >> confdefs.h <<\EOF
10153 #define USE_XFONTSET 1
10154 EOF
10155 }
10156
10157       if test "$with_xim" = "no" ; then
10158         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10159    echo "    xemacs will be linked with \"input-method-xlib.o\""
10160  fi
10161       fi
10162     fi
10163   fi 
10164     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10165   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10166 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10167 echo "configure:10168: checking for wnn/jllib.h" >&5
10168
10169 cat > conftest.$ac_ext <<EOF
10170 #line 10171 "configure"
10171 #include "confdefs.h"
10172 #include <wnn/jllib.h>
10173 EOF
10174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10175 { (eval echo configure:10176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10177 if test -z "$ac_err"; then
10178   rm -rf conftest*
10179   eval "ac_cv_header_$ac_safe=yes"
10180 else
10181   echo "$ac_err" >&5
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_header_$ac_safe=no"
10186 fi
10187 rm -f conftest*
10188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10189   echo "$ac_t""yes" 1>&6
10190   :
10191 else
10192   echo "$ac_t""no" 1>&6
10193 with_wnn=no
10194 fi
10195  }
10196     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10197 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10198 echo "configure:10199: checking for wnn/commonhd.h" >&5
10199
10200 cat > conftest.$ac_ext <<EOF
10201 #line 10202 "configure"
10202 #include "confdefs.h"
10203 #include <wnn/commonhd.h>
10204 EOF
10205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10206 { (eval echo configure:10207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10208 if test -z "$ac_err"; then
10209   rm -rf conftest*
10210   eval "ac_cv_header_$ac_safe=yes"
10211 else
10212   echo "$ac_err" >&5
10213   echo "configure: failed program was:" >&5
10214   cat conftest.$ac_ext >&5
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=no"
10217 fi
10218 rm -f conftest*
10219 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10220   echo "$ac_t""yes" 1>&6
10221   :
10222 else
10223   echo "$ac_t""no" 1>&6
10224 with_wnn=no
10225 fi
10226  }
10227     if test "$with_wnn" != "no"; then
10228     for ac_func in crypt
10229 do
10230 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10231 echo "configure:10232: checking for $ac_func" >&5
10232
10233 cat > conftest.$ac_ext <<EOF
10234 #line 10235 "configure"
10235 #include "confdefs.h"
10236 /* System header to define __stub macros and hopefully few prototypes,
10237     which can conflict with char $ac_func(); below.  */
10238 #include <assert.h>
10239 /* Override any gcc2 internal prototype to avoid an error.  */
10240 /* We use char because int might match the return type of a gcc2
10241     builtin and then its argument prototype would still apply.  */
10242 char $ac_func();
10243
10244 int main() {
10245
10246 /* The GNU C library defines this for functions which it implements
10247     to always fail with ENOSYS.  Some functions are actually named
10248     something starting with __ and the normal name is an alias.  */
10249 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10250 choke me
10251 #else
10252 $ac_func();
10253 #endif
10254
10255 ; return 0; }
10256 EOF
10257 if { (eval echo configure:10258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10258   rm -rf conftest*
10259   eval "ac_cv_func_$ac_func=yes"
10260 else
10261   echo "configure: failed program was:" >&5
10262   cat conftest.$ac_ext >&5
10263   rm -rf conftest*
10264   eval "ac_cv_func_$ac_func=no"
10265 fi
10266 rm -f conftest*
10267
10268 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10269   echo "$ac_t""yes" 1>&6
10270     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10271   { test "$extra_verbose" = "yes" && cat << EOF
10272     Defining $ac_tr_func
10273 EOF
10274 cat >> confdefs.h <<EOF
10275 #define $ac_tr_func 1
10276 EOF
10277 }
10278  
10279 else
10280   echo "$ac_t""no" 1>&6
10281 fi
10282 done
10283
10284     test "$ac_cv_func_crypt" != "yes" && { 
10285 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10286 echo "configure:10287: checking for crypt in -lcrypt" >&5
10287 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10288
10289 xe_check_libs=" -lcrypt "
10290 cat > conftest.$ac_ext <<EOF
10291 #line 10292 "configure"
10292 #include "confdefs.h"
10293 /* Override any gcc2 internal prototype to avoid an error.  */
10294 /* We use char because int might match the return type of a gcc2
10295     builtin and then its argument prototype would still apply.  */
10296 char crypt();
10297
10298 int main() {
10299 crypt()
10300 ; return 0; }
10301 EOF
10302 if { (eval echo configure:10303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10303   rm -rf conftest*
10304   eval "ac_cv_lib_$ac_lib_var=yes"
10305 else
10306   echo "configure: failed program was:" >&5
10307   cat conftest.$ac_ext >&5
10308   rm -rf conftest*
10309   eval "ac_cv_lib_$ac_lib_var=no"
10310 fi
10311 rm -f conftest*
10312 xe_check_libs=""
10313
10314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10315   echo "$ac_t""yes" 1>&6
10316     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10317     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10318   { test "$extra_verbose" = "yes" && cat << EOF
10319     Defining $ac_tr_lib
10320 EOF
10321 cat >> confdefs.h <<EOF
10322 #define $ac_tr_lib 1
10323 EOF
10324 }
10325
10326   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10327
10328 else
10329   echo "$ac_t""no" 1>&6
10330 fi
10331
10332  }
10333   fi
10334     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10335     
10336 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10337 echo "configure:10338: checking for jl_dic_list_e in -lwnn" >&5
10338 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10339
10340 xe_check_libs=" -lwnn "
10341 cat > conftest.$ac_ext <<EOF
10342 #line 10343 "configure"
10343 #include "confdefs.h"
10344 /* Override any gcc2 internal prototype to avoid an error.  */
10345 /* We use char because int might match the return type of a gcc2
10346     builtin and then its argument prototype would still apply.  */
10347 char jl_dic_list_e();
10348
10349 int main() {
10350 jl_dic_list_e()
10351 ; return 0; }
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10354   rm -rf conftest*
10355   eval "ac_cv_lib_$ac_lib_var=yes"
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -rf conftest*
10360   eval "ac_cv_lib_$ac_lib_var=no"
10361 fi
10362 rm -f conftest*
10363 xe_check_libs=""
10364
10365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10366   echo "$ac_t""yes" 1>&6
10367   libwnn=wnn
10368 else
10369   echo "$ac_t""no" 1>&6
10370 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10371 echo "configure:10372: checking for jl_dic_list_e in -lwnn4" >&5
10372 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10373
10374 xe_check_libs=" -lwnn4 "
10375 cat > conftest.$ac_ext <<EOF
10376 #line 10377 "configure"
10377 #include "confdefs.h"
10378 /* Override any gcc2 internal prototype to avoid an error.  */
10379 /* We use char because int might match the return type of a gcc2
10380     builtin and then its argument prototype would still apply.  */
10381 char jl_dic_list_e();
10382
10383 int main() {
10384 jl_dic_list_e()
10385 ; return 0; }
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=yes"
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=no"
10395 fi
10396 rm -f conftest*
10397 xe_check_libs=""
10398
10399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10400   echo "$ac_t""yes" 1>&6
10401   libwnn=wnn4
10402 else
10403   echo "$ac_t""no" 1>&6
10404 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10405 echo "configure:10406: checking for jl_dic_list_e in -lwnn6" >&5
10406 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10407
10408 xe_check_libs=" -lwnn6 "
10409 cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412 /* Override any gcc2 internal prototype to avoid an error.  */
10413 /* We use char because int might match the return type of a gcc2
10414     builtin and then its argument prototype would still apply.  */
10415 char jl_dic_list_e();
10416
10417 int main() {
10418 jl_dic_list_e()
10419 ; return 0; }
10420 EOF
10421 if { (eval echo configure:10422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10422   rm -rf conftest*
10423   eval "ac_cv_lib_$ac_lib_var=yes"
10424 else
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_lib_$ac_lib_var=no"
10429 fi
10430 rm -f conftest*
10431 xe_check_libs=""
10432
10433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10434   echo "$ac_t""yes" 1>&6
10435   libwnn=wnn6
10436 else
10437   echo "$ac_t""no" 1>&6
10438 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10439 echo "configure:10440: checking for dic_list_e in -lwnn6_fromsrc" >&5
10440 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10441
10442 xe_check_libs=" -lwnn6_fromsrc "
10443 cat > conftest.$ac_ext <<EOF
10444 #line 10445 "configure"
10445 #include "confdefs.h"
10446 /* Override any gcc2 internal prototype to avoid an error.  */
10447 /* We use char because int might match the return type of a gcc2
10448     builtin and then its argument prototype would still apply.  */
10449 char dic_list_e();
10450
10451 int main() {
10452 dic_list_e()
10453 ; return 0; }
10454 EOF
10455 if { (eval echo configure:10456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10456   rm -rf conftest*
10457   eval "ac_cv_lib_$ac_lib_var=yes"
10458 else
10459   echo "configure: failed program was:" >&5
10460   cat conftest.$ac_ext >&5
10461   rm -rf conftest*
10462   eval "ac_cv_lib_$ac_lib_var=no"
10463 fi
10464 rm -f conftest*
10465 xe_check_libs=""
10466
10467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10468   echo "$ac_t""yes" 1>&6
10469   libwnn=wnn6_fromsrc
10470 else
10471   echo "$ac_t""no" 1>&6
10472 with_wnn=no
10473 fi
10474
10475
10476 fi
10477
10478
10479 fi
10480
10481
10482 fi
10483
10484
10485   fi
10486   test -z "$with_wnn" && with_wnn=yes
10487   if test "$with_wnn" = "yes"; then
10488     { test "$extra_verbose" = "yes" && cat << \EOF
10489     Defining HAVE_WNN
10490 EOF
10491 cat >> confdefs.h <<\EOF
10492 #define HAVE_WNN 1
10493 EOF
10494 }
10495
10496     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10497     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10498    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10499  fi
10500     if test "$with_wnn6" != "no"; then
10501       
10502 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10503 echo "configure:10504: checking for jl_fi_dic_list in -l$libwnn" >&5
10504 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10505
10506 xe_check_libs=" -l$libwnn "
10507 cat > conftest.$ac_ext <<EOF
10508 #line 10509 "configure"
10509 #include "confdefs.h"
10510 /* Override any gcc2 internal prototype to avoid an error.  */
10511 /* We use char because int might match the return type of a gcc2
10512     builtin and then its argument prototype would still apply.  */
10513 char jl_fi_dic_list();
10514
10515 int main() {
10516 jl_fi_dic_list()
10517 ; return 0; }
10518 EOF
10519 if { (eval echo configure:10520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10520   rm -rf conftest*
10521   eval "ac_cv_lib_$ac_lib_var=yes"
10522 else
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=no"
10527 fi
10528 rm -f conftest*
10529 xe_check_libs=""
10530
10531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10532   echo "$ac_t""yes" 1>&6
10533   with_wnn6=yes
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537
10538
10539       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10540     Defining WNN6
10541 EOF
10542 cat >> confdefs.h <<\EOF
10543 #define WNN6 1
10544 EOF
10545 }
10546
10547     fi
10548   fi
10549
10550     canna_includes_found=no
10551   if test "$with_canna" != "no"; then
10552     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10553 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10554 echo "configure:10555: checking for canna/jrkanji.h" >&5
10555
10556 cat > conftest.$ac_ext <<EOF
10557 #line 10558 "configure"
10558 #include "confdefs.h"
10559 #include <canna/jrkanji.h>
10560 EOF
10561 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10562 { (eval echo configure:10563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10563 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10564 if test -z "$ac_err"; then
10565   rm -rf conftest*
10566   eval "ac_cv_header_$ac_safe=yes"
10567 else
10568   echo "$ac_err" >&5
10569   echo "configure: failed program was:" >&5
10570   cat conftest.$ac_ext >&5
10571   rm -rf conftest*
10572   eval "ac_cv_header_$ac_safe=no"
10573 fi
10574 rm -f conftest*
10575 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10576   echo "$ac_t""yes" 1>&6
10577   canna_includes_found=yes
10578 else
10579   echo "$ac_t""no" 1>&6
10580 fi
10581
10582   fi
10583   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10584       -d "/usr/local/canna/include"; then
10585     save_c_switch_site="$c_switch_site"
10586     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10587     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10588 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10589 echo "configure:10590: checking for canna/jrkanji.h" >&5
10590
10591 cat > conftest.$ac_ext <<EOF
10592 #line 10593 "configure"
10593 #include "confdefs.h"
10594 #include <canna/jrkanji.h>
10595 EOF
10596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10597 { (eval echo configure:10598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10599 if test -z "$ac_err"; then
10600   rm -rf conftest*
10601   eval "ac_cv_header_$ac_safe=yes"
10602 else
10603   echo "$ac_err" >&5
10604   echo "configure: failed program was:" >&5
10605   cat conftest.$ac_ext >&5
10606   rm -rf conftest*
10607   eval "ac_cv_header_$ac_safe=no"
10608 fi
10609 rm -f conftest*
10610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10611   echo "$ac_t""yes" 1>&6
10612   canna_includes_found=yes
10613 else
10614   echo "$ac_t""no" 1>&6
10615 fi
10616
10617     if test "$canna_includes_found" != "yes"; then
10618       c_switch_site="$save_c_switch_site"
10619       with_canna="no"
10620     fi
10621   fi
10622
10623   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10624 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10625 echo "configure:10626: checking for canna/RK.h" >&5
10626
10627 cat > conftest.$ac_ext <<EOF
10628 #line 10629 "configure"
10629 #include "confdefs.h"
10630 #include <canna/RK.h>
10631 EOF
10632 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10633 { (eval echo configure:10634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10634 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10635 if test -z "$ac_err"; then
10636   rm -rf conftest*
10637   eval "ac_cv_header_$ac_safe=yes"
10638 else
10639   echo "$ac_err" >&5
10640   echo "configure: failed program was:" >&5
10641   cat conftest.$ac_ext >&5
10642   rm -rf conftest*
10643   eval "ac_cv_header_$ac_safe=no"
10644 fi
10645 rm -f conftest*
10646 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10647   echo "$ac_t""yes" 1>&6
10648   :
10649 else
10650   echo "$ac_t""no" 1>&6
10651 with_canna=no
10652 fi
10653  }
10654   test -z "$with_canna" && { 
10655 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10656 echo "configure:10657: checking for RkBgnBun in -lRKC" >&5
10657 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10658
10659 xe_check_libs=" -lRKC "
10660 cat > conftest.$ac_ext <<EOF
10661 #line 10662 "configure"
10662 #include "confdefs.h"
10663 /* Override any gcc2 internal prototype to avoid an error.  */
10664 /* We use char because int might match the return type of a gcc2
10665     builtin and then its argument prototype would still apply.  */
10666 char RkBgnBun();
10667
10668 int main() {
10669 RkBgnBun()
10670 ; return 0; }
10671 EOF
10672 if { (eval echo configure:10673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10673   rm -rf conftest*
10674   eval "ac_cv_lib_$ac_lib_var=yes"
10675 else
10676   echo "configure: failed program was:" >&5
10677   cat conftest.$ac_ext >&5
10678   rm -rf conftest*
10679   eval "ac_cv_lib_$ac_lib_var=no"
10680 fi
10681 rm -f conftest*
10682 xe_check_libs=""
10683
10684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10685   echo "$ac_t""yes" 1>&6
10686   :
10687 else
10688   echo "$ac_t""no" 1>&6
10689 with_canna=no
10690 fi
10691
10692  }
10693   test -z "$with_canna" && { 
10694 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10695 echo "configure:10696: checking for jrKanjiControl in -lcanna" >&5
10696 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10697
10698 xe_check_libs=" -lcanna "
10699 cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702 /* Override any gcc2 internal prototype to avoid an error.  */
10703 /* We use char because int might match the return type of a gcc2
10704     builtin and then its argument prototype would still apply.  */
10705 char jrKanjiControl();
10706
10707 int main() {
10708 jrKanjiControl()
10709 ; return 0; }
10710 EOF
10711 if { (eval echo configure:10712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10712   rm -rf conftest*
10713   eval "ac_cv_lib_$ac_lib_var=yes"
10714 else
10715   echo "configure: failed program was:" >&5
10716   cat conftest.$ac_ext >&5
10717   rm -rf conftest*
10718   eval "ac_cv_lib_$ac_lib_var=no"
10719 fi
10720 rm -f conftest*
10721 xe_check_libs=""
10722
10723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10724   echo "$ac_t""yes" 1>&6
10725   :
10726 else
10727   echo "$ac_t""no" 1>&6
10728 with_canna=no
10729 fi
10730
10731  }
10732   test -z "$with_canna" && with_canna=yes
10733   if test "$with_canna" = "yes"; then
10734     { test "$extra_verbose" = "yes" && cat << \EOF
10735     Defining HAVE_CANNA
10736 EOF
10737 cat >> confdefs.h <<\EOF
10738 #define HAVE_CANNA 1
10739 EOF
10740 }
10741
10742     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10743     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10744    echo "    xemacs will be linked with \"mule-canna.o\""
10745  fi
10746   fi
10747
10748 else   for feature in xim canna wnn; do
10749     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10750       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10751     fi
10752     eval "with_${feature}=no"
10753   done
10754 fi 
10755
10756 if test "$need_motif" = "yes" ; then
10757   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10758     
10759 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10760 echo "configure:10761: checking for layout_object_getvalue in -li18n" >&5
10761 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10762
10763 xe_check_libs=" -li18n "
10764 cat > conftest.$ac_ext <<EOF
10765 #line 10766 "configure"
10766 #include "confdefs.h"
10767 /* Override any gcc2 internal prototype to avoid an error.  */
10768 /* We use char because int might match the return type of a gcc2
10769     builtin and then its argument prototype would still apply.  */
10770 char layout_object_getvalue();
10771
10772 int main() {
10773 layout_object_getvalue()
10774 ; return 0; }
10775 EOF
10776 if { (eval echo configure:10777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=yes"
10779 else
10780   echo "configure: failed program was:" >&5
10781   cat conftest.$ac_ext >&5
10782   rm -rf conftest*
10783   eval "ac_cv_lib_$ac_lib_var=no"
10784 fi
10785 rm -f conftest*
10786 xe_check_libs=""
10787
10788 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10789   echo "$ac_t""yes" 1>&6
10790   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10791 else
10792   echo "$ac_t""no" 1>&6
10793 fi
10794
10795
10796   
10797 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10798     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10799   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10800   
10801         runpath="" runpath_dirs=""
10802   if test -n "$LD_RUN_PATH"; then
10803     runpath="$LD_RUN_PATH"
10804   elif test "$GCC" = "yes"; then
10805         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10806     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10807     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10808     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10809       case "$arg" in P,* | -L* | -R* )
10810         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10811           {
10812 xe_runpath_dir="$dir"
10813   test "$xe_runpath_dir" != "/lib"     -a \
10814         "$xe_runpath_dir" != "/usr/lib" -a \
10815         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10816   eval "$xe_add_unique_runpath_dir"
10817 }
10818         done ;;
10819       esac
10820     done
10821     ld_switch_run="$ld_switch_run_save"
10822     rm -f conftest*
10823   else
10824         for arg in $ld_switch_site $ld_switch_x_site; do
10825       case "$arg" in -L*) {
10826 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10827   test "$xe_runpath_dir" != "/lib"     -a \
10828         "$xe_runpath_dir" != "/usr/lib" -a \
10829         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10830   eval "$xe_add_unique_runpath_dir"
10831 };; esac
10832     done
10833         if test "$opsys $need_motif" = "sol2 yes"; then
10834       xe_runpath_dir="/opt/SUNWdt/lib";
10835       eval "$xe_add_unique_runpath_dir";
10836     fi
10837   fi 
10838   if test -n "$runpath"; then
10839     ld_switch_run="${dash_r}${runpath}"
10840     
10841 if test "$GCC" = "yes"; then
10842   set x $ld_switch_run; shift; ld_switch_run=""
10843   while test -n "$1"; do
10844     case $1 in
10845       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10846       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10847       -Xlinker* ) ;;
10848       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10849     esac
10850     shift
10851   done
10852 fi
10853     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10854   fi
10855 fi
10856
10857 fi
10858
10859
10860 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
10861 do
10862 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10863 echo "configure:10864: checking for $ac_func" >&5
10864
10865 cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868 /* System header to define __stub macros and hopefully few prototypes,
10869     which can conflict with char $ac_func(); below.  */
10870 #include <assert.h>
10871 /* Override any gcc2 internal prototype to avoid an error.  */
10872 /* We use char because int might match the return type of a gcc2
10873     builtin and then its argument prototype would still apply.  */
10874 char $ac_func();
10875
10876 int main() {
10877
10878 /* The GNU C library defines this for functions which it implements
10879     to always fail with ENOSYS.  Some functions are actually named
10880     something starting with __ and the normal name is an alias.  */
10881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10882 choke me
10883 #else
10884 $ac_func();
10885 #endif
10886
10887 ; return 0; }
10888 EOF
10889 if { (eval echo configure:10890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10890   rm -rf conftest*
10891   eval "ac_cv_func_$ac_func=yes"
10892 else
10893   echo "configure: failed program was:" >&5
10894   cat conftest.$ac_ext >&5
10895   rm -rf conftest*
10896   eval "ac_cv_func_$ac_func=no"
10897 fi
10898 rm -f conftest*
10899
10900 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10901   echo "$ac_t""yes" 1>&6
10902     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10903   { test "$extra_verbose" = "yes" && cat << EOF
10904     Defining $ac_tr_func
10905 EOF
10906 cat >> confdefs.h <<EOF
10907 #define $ac_tr_func 1
10908 EOF
10909 }
10910  
10911 else
10912   echo "$ac_t""no" 1>&6
10913 fi
10914 done
10915
10916
10917 if test "$ac_cv_func_getaddrinfo" != "no" ; then
10918   case "$opsys" in
10919     hpux11 )
10920       echo "configure: warning: Use of getaddrinfo is disabled for HP-UX 11.XX." 1>&2
10921       ac_cv_func_getaddrinfo=no
10922       ;;
10923   esac
10924 fi
10925
10926
10927 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10928 do
10929 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10930 echo "configure:10931: checking for $ac_func" >&5
10931
10932 cat > conftest.$ac_ext <<EOF
10933 #line 10934 "configure"
10934 #include "confdefs.h"
10935 /* System header to define __stub macros and hopefully few prototypes,
10936     which can conflict with char $ac_func(); below.  */
10937 #include <assert.h>
10938 /* Override any gcc2 internal prototype to avoid an error.  */
10939 /* We use char because int might match the return type of a gcc2
10940     builtin and then its argument prototype would still apply.  */
10941 char $ac_func();
10942
10943 int main() {
10944
10945 /* The GNU C library defines this for functions which it implements
10946     to always fail with ENOSYS.  Some functions are actually named
10947     something starting with __ and the normal name is an alias.  */
10948 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10949 choke me
10950 #else
10951 $ac_func();
10952 #endif
10953
10954 ; return 0; }
10955 EOF
10956 if { (eval echo configure:10957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10957   rm -rf conftest*
10958   eval "ac_cv_func_$ac_func=yes"
10959 else
10960   echo "configure: failed program was:" >&5
10961   cat conftest.$ac_ext >&5
10962   rm -rf conftest*
10963   eval "ac_cv_func_$ac_func=no"
10964 fi
10965 rm -f conftest*
10966
10967 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10970   { test "$extra_verbose" = "yes" && cat << EOF
10971     Defining $ac_tr_func
10972 EOF
10973 cat >> confdefs.h <<EOF
10974 #define $ac_tr_func 1
10975 EOF
10976 }
10977  
10978 else
10979   echo "$ac_t""no" 1>&6
10980 fi
10981 done
10982
10983
10984 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10985 echo "configure:10986: checking for openpty" >&5
10986
10987 cat > conftest.$ac_ext <<EOF
10988 #line 10989 "configure"
10989 #include "confdefs.h"
10990 /* System header to define __stub macros and hopefully few prototypes,
10991     which can conflict with char openpty(); below.  */
10992 #include <assert.h>
10993 /* Override any gcc2 internal prototype to avoid an error.  */
10994 /* We use char because int might match the return type of a gcc2
10995     builtin and then its argument prototype would still apply.  */
10996 char openpty();
10997
10998 int main() {
10999
11000 /* The GNU C library defines this for functions which it implements
11001     to always fail with ENOSYS.  Some functions are actually named
11002     something starting with __ and the normal name is an alias.  */
11003 #if defined (__stub_openpty) || defined (__stub___openpty)
11004 choke me
11005 #else
11006 openpty();
11007 #endif
11008
11009 ; return 0; }
11010 EOF
11011 if { (eval echo configure:11012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11012   rm -rf conftest*
11013   eval "ac_cv_func_openpty=yes"
11014 else
11015   echo "configure: failed program was:" >&5
11016   cat conftest.$ac_ext >&5
11017   rm -rf conftest*
11018   eval "ac_cv_func_openpty=no"
11019 fi
11020 rm -f conftest*
11021
11022 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
11023   echo "$ac_t""yes" 1>&6
11024   have_openpty=yes
11025 else
11026   echo "$ac_t""no" 1>&6
11027
11028   
11029 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11030 echo "configure:11031: checking for openpty in -lutil" >&5
11031 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11032
11033 xe_check_libs=" -lutil "
11034 cat > conftest.$ac_ext <<EOF
11035 #line 11036 "configure"
11036 #include "confdefs.h"
11037 /* Override any gcc2 internal prototype to avoid an error.  */
11038 /* We use char because int might match the return type of a gcc2
11039     builtin and then its argument prototype would still apply.  */
11040 char openpty();
11041
11042 int main() {
11043 openpty()
11044 ; return 0; }
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11047   rm -rf conftest*
11048   eval "ac_cv_lib_$ac_lib_var=yes"
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -rf conftest*
11053   eval "ac_cv_lib_$ac_lib_var=no"
11054 fi
11055 rm -f conftest*
11056 xe_check_libs=""
11057
11058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11059   echo "$ac_t""yes" 1>&6
11060   have_openpty=yes need_libutil=yes
11061 else
11062   echo "$ac_t""no" 1>&6
11063 fi
11064
11065
11066 fi
11067
11068 if test "$have_openpty" = "yes"; then
11069   { test "$extra_verbose" = "yes" && cat << \EOF
11070     Defining HAVE_OPENPTY
11071 EOF
11072 cat >> confdefs.h <<\EOF
11073 #define HAVE_OPENPTY 1
11074 EOF
11075 }
11076
11077   for ac_hdr in pty.h libutil.h util.h
11078 do
11079 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11080 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11081 echo "configure:11082: checking for $ac_hdr" >&5
11082
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 #include <$ac_hdr>
11087 EOF
11088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11089 { (eval echo configure:11090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11091 if test -z "$ac_err"; then
11092   rm -rf conftest*
11093   eval "ac_cv_header_$ac_safe=yes"
11094 else
11095   echo "$ac_err" >&5
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -rf conftest*
11099   eval "ac_cv_header_$ac_safe=no"
11100 fi
11101 rm -f conftest*
11102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11103   echo "$ac_t""yes" 1>&6
11104     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11105   { test "$extra_verbose" = "yes" && cat << EOF
11106     Defining $ac_tr_hdr
11107 EOF
11108 cat >> confdefs.h <<EOF
11109 #define $ac_tr_hdr 1
11110 EOF
11111 }
11112  break
11113 else
11114   echo "$ac_t""no" 1>&6
11115 fi
11116 done
11117
11118   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11119 fi
11120
11121 for ac_hdr in stropts.h
11122 do
11123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11125 echo "configure:11126: checking for $ac_hdr" >&5
11126
11127 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <$ac_hdr>
11131 EOF
11132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11133 { (eval echo configure:11134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11135 if test -z "$ac_err"; then
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=yes"
11138 else
11139   echo "$ac_err" >&5
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=no"
11144 fi
11145 rm -f conftest*
11146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11147   echo "$ac_t""yes" 1>&6
11148     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11149   { test "$extra_verbose" = "yes" && cat << EOF
11150     Defining $ac_tr_hdr
11151 EOF
11152 cat >> confdefs.h <<EOF
11153 #define $ac_tr_hdr 1
11154 EOF
11155 }
11156  
11157 else
11158   echo "$ac_t""no" 1>&6
11159 fi
11160 done
11161
11162 if test "$ac_cv_header_stropts_h" = "yes"; then
11163   for ac_func in isastream
11164 do
11165 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11166 echo "configure:11167: checking for $ac_func" >&5
11167
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 /* System header to define __stub macros and hopefully few prototypes,
11172     which can conflict with char $ac_func(); below.  */
11173 #include <assert.h>
11174 /* Override any gcc2 internal prototype to avoid an error.  */
11175 /* We use char because int might match the return type of a gcc2
11176     builtin and then its argument prototype would still apply.  */
11177 char $ac_func();
11178
11179 int main() {
11180
11181 /* The GNU C library defines this for functions which it implements
11182     to always fail with ENOSYS.  Some functions are actually named
11183     something starting with __ and the normal name is an alias.  */
11184 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11185 choke me
11186 #else
11187 $ac_func();
11188 #endif
11189
11190 ; return 0; }
11191 EOF
11192 if { (eval echo configure:11193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11193   rm -rf conftest*
11194   eval "ac_cv_func_$ac_func=yes"
11195 else
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   eval "ac_cv_func_$ac_func=no"
11200 fi
11201 rm -f conftest*
11202
11203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11206   { test "$extra_verbose" = "yes" && cat << EOF
11207     Defining $ac_tr_func
11208 EOF
11209 cat >> confdefs.h <<EOF
11210 #define $ac_tr_func 1
11211 EOF
11212 }
11213  
11214 else
11215   echo "$ac_t""no" 1>&6
11216 fi
11217 done
11218
11219   for ac_hdr in strtio.h
11220 do
11221 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11222 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11223 echo "configure:11224: checking for $ac_hdr" >&5
11224
11225 cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include <$ac_hdr>
11229 EOF
11230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11231 { (eval echo configure:11232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11233 if test -z "$ac_err"; then
11234   rm -rf conftest*
11235   eval "ac_cv_header_$ac_safe=yes"
11236 else
11237   echo "$ac_err" >&5
11238   echo "configure: failed program was:" >&5
11239   cat conftest.$ac_ext >&5
11240   rm -rf conftest*
11241   eval "ac_cv_header_$ac_safe=no"
11242 fi
11243 rm -f conftest*
11244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11245   echo "$ac_t""yes" 1>&6
11246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11247   { test "$extra_verbose" = "yes" && cat << EOF
11248     Defining $ac_tr_hdr
11249 EOF
11250 cat >> confdefs.h <<EOF
11251 #define $ac_tr_hdr 1
11252 EOF
11253 }
11254  
11255 else
11256   echo "$ac_t""no" 1>&6
11257 fi
11258 done
11259  fi
11260
11261 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11262    echo "    xemacs will be linked with \"realpath.o\""
11263  fi
11264
11265 for ac_func in getloadavg
11266 do
11267 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11268 echo "configure:11269: checking for $ac_func" >&5
11269
11270 cat > conftest.$ac_ext <<EOF
11271 #line 11272 "configure"
11272 #include "confdefs.h"
11273 /* System header to define __stub macros and hopefully few prototypes,
11274     which can conflict with char $ac_func(); below.  */
11275 #include <assert.h>
11276 /* Override any gcc2 internal prototype to avoid an error.  */
11277 /* We use char because int might match the return type of a gcc2
11278     builtin and then its argument prototype would still apply.  */
11279 char $ac_func();
11280
11281 int main() {
11282
11283 /* The GNU C library defines this for functions which it implements
11284     to always fail with ENOSYS.  Some functions are actually named
11285     something starting with __ and the normal name is an alias.  */
11286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11287 choke me
11288 #else
11289 $ac_func();
11290 #endif
11291
11292 ; return 0; }
11293 EOF
11294 if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11295   rm -rf conftest*
11296   eval "ac_cv_func_$ac_func=yes"
11297 else
11298   echo "configure: failed program was:" >&5
11299   cat conftest.$ac_ext >&5
11300   rm -rf conftest*
11301   eval "ac_cv_func_$ac_func=no"
11302 fi
11303 rm -f conftest*
11304
11305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11306   echo "$ac_t""yes" 1>&6
11307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11308   { test "$extra_verbose" = "yes" && cat << EOF
11309     Defining $ac_tr_func
11310 EOF
11311 cat >> confdefs.h <<EOF
11312 #define $ac_tr_func 1
11313 EOF
11314 }
11315  
11316 else
11317   echo "$ac_t""no" 1>&6
11318 fi
11319 done
11320
11321
11322 if test "$ac_cv_func_getloadavg" = "yes"; then
11323         for ac_hdr in sys/loadavg.h
11324 do
11325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11327 echo "configure:11328: checking for $ac_hdr" >&5
11328
11329 cat > conftest.$ac_ext <<EOF
11330 #line 11331 "configure"
11331 #include "confdefs.h"
11332 #include <$ac_hdr>
11333 EOF
11334 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11335 { (eval echo configure:11336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11336 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11337 if test -z "$ac_err"; then
11338   rm -rf conftest*
11339   eval "ac_cv_header_$ac_safe=yes"
11340 else
11341   echo "$ac_err" >&5
11342   echo "configure: failed program was:" >&5
11343   cat conftest.$ac_ext >&5
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=no"
11346 fi
11347 rm -f conftest*
11348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11349   echo "$ac_t""yes" 1>&6
11350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11351   { test "$extra_verbose" = "yes" && cat << EOF
11352     Defining $ac_tr_hdr
11353 EOF
11354 cat >> confdefs.h <<EOF
11355 #define $ac_tr_hdr 1
11356 EOF
11357 }
11358  
11359 else
11360   echo "$ac_t""no" 1>&6
11361 fi
11362 done
11363
11364 else
11365     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11366    echo "    xemacs will be linked with \"getloadavg.o\""
11367  fi
11368
11369     
11370 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11371 echo "configure:11372: checking for kstat_open in -lkstat" >&5
11372 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11373
11374 xe_check_libs=" -lkstat "
11375 cat > conftest.$ac_ext <<EOF
11376 #line 11377 "configure"
11377 #include "confdefs.h"
11378 /* Override any gcc2 internal prototype to avoid an error.  */
11379 /* We use char because int might match the return type of a gcc2
11380     builtin and then its argument prototype would still apply.  */
11381 char kstat_open();
11382
11383 int main() {
11384 kstat_open()
11385 ; return 0; }
11386 EOF
11387 if { (eval echo configure:11388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11388   rm -rf conftest*
11389   eval "ac_cv_lib_$ac_lib_var=yes"
11390 else
11391   echo "configure: failed program was:" >&5
11392   cat conftest.$ac_ext >&5
11393   rm -rf conftest*
11394   eval "ac_cv_lib_$ac_lib_var=no"
11395 fi
11396 rm -f conftest*
11397 xe_check_libs=""
11398
11399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11400   echo "$ac_t""yes" 1>&6
11401     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11402     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11403   { test "$extra_verbose" = "yes" && cat << EOF
11404     Defining $ac_tr_lib
11405 EOF
11406 cat >> confdefs.h <<EOF
11407 #define $ac_tr_lib 1
11408 EOF
11409 }
11410
11411   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11412
11413 else
11414   echo "$ac_t""no" 1>&6
11415 fi
11416
11417
11418   for ac_hdr in kstat.h
11419 do
11420 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11421 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11422 echo "configure:11423: checking for $ac_hdr" >&5
11423
11424 cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <$ac_hdr>
11428 EOF
11429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11430 { (eval echo configure:11431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11432 if test -z "$ac_err"; then
11433   rm -rf conftest*
11434   eval "ac_cv_header_$ac_safe=yes"
11435 else
11436   echo "$ac_err" >&5
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   eval "ac_cv_header_$ac_safe=no"
11441 fi
11442 rm -f conftest*
11443 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11444   echo "$ac_t""yes" 1>&6
11445     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11446   { test "$extra_verbose" = "yes" && cat << EOF
11447     Defining $ac_tr_hdr
11448 EOF
11449 cat >> confdefs.h <<EOF
11450 #define $ac_tr_hdr 1
11451 EOF
11452 }
11453  
11454 else
11455   echo "$ac_t""no" 1>&6
11456 fi
11457 done
11458
11459
11460     
11461 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11462 echo "configure:11463: checking for kvm_read in -lkvm" >&5
11463 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11464
11465 xe_check_libs=" -lkvm "
11466 cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469 /* Override any gcc2 internal prototype to avoid an error.  */
11470 /* We use char because int might match the return type of a gcc2
11471     builtin and then its argument prototype would still apply.  */
11472 char kvm_read();
11473
11474 int main() {
11475 kvm_read()
11476 ; return 0; }
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11479   rm -rf conftest*
11480   eval "ac_cv_lib_$ac_lib_var=yes"
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   eval "ac_cv_lib_$ac_lib_var=no"
11486 fi
11487 rm -f conftest*
11488 xe_check_libs=""
11489
11490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11491   echo "$ac_t""yes" 1>&6
11492     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11493     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11494   { test "$extra_verbose" = "yes" && cat << EOF
11495     Defining $ac_tr_lib
11496 EOF
11497 cat >> confdefs.h <<EOF
11498 #define $ac_tr_lib 1
11499 EOF
11500 }
11501
11502   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11503
11504 else
11505   echo "$ac_t""no" 1>&6
11506 fi
11507
11508
11509 fi
11510
11511 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11512 echo "configure:11513: checking whether netdb declares h_errno" >&5
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <netdb.h>
11517 int main() {
11518 return h_errno;
11519 ; return 0; }
11520 EOF
11521 if { (eval echo configure:11522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11522   rm -rf conftest*
11523   echo "$ac_t""yes" 1>&6
11524    { test "$extra_verbose" = "yes" && cat << \EOF
11525     Defining HAVE_H_ERRNO
11526 EOF
11527 cat >> confdefs.h <<\EOF
11528 #define HAVE_H_ERRNO 1
11529 EOF
11530 }
11531
11532 else
11533   echo "configure: failed program was:" >&5
11534   cat conftest.$ac_ext >&5
11535   rm -rf conftest*
11536   echo "$ac_t""no" 1>&6
11537 fi
11538 rm -f conftest*
11539
11540 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11541 echo "configure:11542: checking for sigsetjmp" >&5
11542 cat > conftest.$ac_ext <<EOF
11543 #line 11544 "configure"
11544 #include "confdefs.h"
11545 #include <setjmp.h>
11546 int main() {
11547 sigjmp_buf bar; sigsetjmp (bar, 0);
11548 ; return 0; }
11549 EOF
11550 if { (eval echo configure:11551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11551   rm -rf conftest*
11552   echo "$ac_t""yes" 1>&6
11553    { test "$extra_verbose" = "yes" && cat << \EOF
11554     Defining HAVE_SIGSETJMP
11555 EOF
11556 cat >> confdefs.h <<\EOF
11557 #define HAVE_SIGSETJMP 1
11558 EOF
11559 }
11560
11561 else
11562   echo "configure: failed program was:" >&5
11563   cat conftest.$ac_ext >&5
11564   rm -rf conftest*
11565   echo "$ac_t""no" 1>&6
11566 fi
11567 rm -f conftest*
11568
11569 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11570 echo "configure:11571: checking whether localtime caches TZ" >&5
11571
11572 if test "$ac_cv_func_tzset" = "yes"; then
11573 cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 #include <time.h>
11577 #if STDC_HEADERS
11578 # include <stdlib.h>
11579 #endif
11580 extern char **environ;
11581 unset_TZ ()
11582 {
11583   char **from, **to;
11584   for (to = from = environ; (*to = *from); from++)
11585     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11586       to++;
11587 }
11588 char TZ_GMT0[] = "TZ=GMT0";
11589 char TZ_PST8[] = "TZ=PST8";
11590 main()
11591 {
11592   time_t now = time ((time_t *) 0);
11593   int hour_GMT0, hour_unset;
11594   if (putenv (TZ_GMT0) != 0)
11595     exit (1);
11596   hour_GMT0 = localtime (&now)->tm_hour;
11597   unset_TZ ();
11598   hour_unset = localtime (&now)->tm_hour;
11599   if (putenv (TZ_PST8) != 0)
11600     exit (1);
11601   if (localtime (&now)->tm_hour == hour_GMT0)
11602     exit (1);
11603   unset_TZ ();
11604   if (localtime (&now)->tm_hour != hour_unset)
11605     exit (1);
11606   exit (0);
11607 }
11608 EOF
11609 if { (eval echo configure:11610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11610 then
11611   emacs_cv_localtime_cache=no
11612 else
11613   conftest_rc="$?"
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -fr conftest*
11617   emacs_cv_localtime_cache=yes
11618 fi
11619 rm -fr conftest*
11620 else
11621         # If we lack tzset, report that localtime does not cache TZ,
11622         # since we can't invalidate the cache if we don't have tzset.
11623         emacs_cv_localtime_cache=no
11624 fi
11625 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11626 if test $emacs_cv_localtime_cache = yes; then
11627   { test "$extra_verbose" = "yes" && cat << \EOF
11628     Defining LOCALTIME_CACHE
11629 EOF
11630 cat >> confdefs.h <<\EOF
11631 #define LOCALTIME_CACHE 1
11632 EOF
11633 }
11634
11635 fi
11636
11637 if test "$HAVE_TIMEVAL" = "yes"; then
11638 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11639 echo "configure:11640: checking whether gettimeofday accepts one or two arguments" >&5
11640 cat > conftest.$ac_ext <<EOF
11641 #line 11642 "configure"
11642 #include "confdefs.h"
11643
11644 #ifdef TIME_WITH_SYS_TIME
11645 #include <sys/time.h>
11646 #include <time.h>
11647 #else
11648 #ifdef HAVE_SYS_TIME_H
11649 #include <sys/time.h>
11650 #else
11651 #include <time.h>
11652 #endif
11653 #endif
11654   
11655 int main() {
11656
11657   struct timeval time;
11658   gettimeofday (&time, 0);
11659
11660 ; return 0; }
11661 EOF
11662 if { (eval echo configure:11663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11663   rm -rf conftest*
11664   echo "$ac_t""two" 1>&6
11665 else
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -rf conftest*
11669   echo "$ac_t""one" 1>&6
11670    { test "$extra_verbose" = "yes" && cat << \EOF
11671     Defining GETTIMEOFDAY_ONE_ARGUMENT
11672 EOF
11673 cat >> confdefs.h <<\EOF
11674 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11675 EOF
11676 }
11677
11678 fi
11679 rm -f conftest*
11680 fi
11681
11682
11683 echo $ac_n "checking for inline""... $ac_c" 1>&6
11684 echo "configure:11685: checking for inline" >&5
11685
11686 ac_cv_c_inline=no
11687 for ac_kw in inline __inline__ __inline; do
11688   cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691
11692 int main() {
11693 } $ac_kw foo() {
11694 ; return 0; }
11695 EOF
11696 if { (eval echo configure:11697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11697   rm -rf conftest*
11698   ac_cv_c_inline=$ac_kw; break
11699 else
11700   echo "configure: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702 fi
11703 rm -f conftest*
11704 done
11705
11706
11707 echo "$ac_t""$ac_cv_c_inline" 1>&6
11708 case "$ac_cv_c_inline" in
11709   inline | yes) ;;
11710   no) { test "$extra_verbose" = "yes" && cat << \EOF
11711     Defining inline = 
11712 EOF
11713 cat >> confdefs.h <<\EOF
11714 #define inline 
11715 EOF
11716 }
11717  ;;
11718   *)  { test "$extra_verbose" = "yes" && cat << EOF
11719     Defining inline = $ac_cv_c_inline
11720 EOF
11721 cat >> confdefs.h <<EOF
11722 #define inline $ac_cv_c_inline
11723 EOF
11724 }
11725  ;;
11726 esac
11727
11728 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11729    echo "    xemacs will be linked with \"inline.o\""
11730  fi
11731
11732
11733 if test "$__DECC" != "yes"; then
11734   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11735 # for constant arguments.  Useless!
11736 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11737 echo "configure:11738: checking for working alloca.h" >&5
11738
11739 cat > conftest.$ac_ext <<EOF
11740 #line 11741 "configure"
11741 #include "confdefs.h"
11742 #include <alloca.h>
11743 int main() {
11744 char *p = alloca(2 * sizeof(int));
11745 ; return 0; }
11746 EOF
11747 if { (eval echo configure:11748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11748   rm -rf conftest*
11749   ac_cv_header_alloca_h=yes
11750 else
11751   echo "configure: failed program was:" >&5
11752   cat conftest.$ac_ext >&5
11753   rm -rf conftest*
11754   ac_cv_header_alloca_h=no
11755 fi
11756 rm -f conftest*
11757
11758 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11759 if test $ac_cv_header_alloca_h = yes; then
11760   { test "$extra_verbose" = "yes" && cat << \EOF
11761     Defining HAVE_ALLOCA_H
11762 EOF
11763 cat >> confdefs.h <<\EOF
11764 #define HAVE_ALLOCA_H 1
11765 EOF
11766 }
11767
11768 fi
11769
11770 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11771 echo "configure:11772: checking for alloca" >&5
11772
11773 cat > conftest.$ac_ext <<EOF
11774 #line 11775 "configure"
11775 #include "confdefs.h"
11776
11777 #ifdef __GNUC__
11778 # define alloca __builtin_alloca
11779 #else
11780 # ifdef _MSC_VER
11781 #  include <malloc.h>
11782 #  define alloca _alloca
11783 # else
11784 #  if HAVE_ALLOCA_H
11785 #   include <alloca.h>
11786 #  else
11787 #   ifdef _AIX
11788  #pragma alloca
11789 #   else
11790 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11791 char *alloca ();
11792 #    endif
11793 #   endif
11794 #  endif
11795 # endif
11796 #endif
11797
11798 int main() {
11799 char *p = (char *) alloca(1);
11800 ; return 0; }
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11803   rm -rf conftest*
11804   ac_cv_func_alloca_works=yes
11805 else
11806   echo "configure: failed program was:" >&5
11807   cat conftest.$ac_ext >&5
11808   rm -rf conftest*
11809   ac_cv_func_alloca_works=no
11810 fi
11811 rm -f conftest*
11812
11813 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11814 if test $ac_cv_func_alloca_works = yes; then
11815   { test "$extra_verbose" = "yes" && cat << \EOF
11816     Defining HAVE_ALLOCA
11817 EOF
11818 cat >> confdefs.h <<\EOF
11819 #define HAVE_ALLOCA 1
11820 EOF
11821 }
11822
11823 fi
11824
11825 if test $ac_cv_func_alloca_works = no; then
11826   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11827   # that cause trouble.  Some versions do not even contain alloca or
11828   # contain a buggy version.  If you still want to use their alloca,
11829   # use ar to extract alloca.o from them instead of compiling alloca.c.
11830   ALLOCA=alloca.${ac_objext}
11831   { test "$extra_verbose" = "yes" && cat << \EOF
11832     Defining C_ALLOCA
11833 EOF
11834 cat >> confdefs.h <<\EOF
11835 #define C_ALLOCA 1
11836 EOF
11837 }
11838
11839
11840 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11841 echo "configure:11842: checking whether alloca needs Cray hooks" >&5
11842
11843 cat > conftest.$ac_ext <<EOF
11844 #line 11845 "configure"
11845 #include "confdefs.h"
11846 #if defined(CRAY) && ! defined(CRAY2)
11847 webecray
11848 #else
11849 wenotbecray
11850 #endif
11851
11852 EOF
11853 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11854   egrep "webecray" >/dev/null 2>&1; then
11855   rm -rf conftest*
11856   ac_cv_os_cray=yes
11857 else
11858   rm -rf conftest*
11859   ac_cv_os_cray=no
11860 fi
11861 rm -f conftest*
11862
11863
11864 echo "$ac_t""$ac_cv_os_cray" 1>&6
11865 if test $ac_cv_os_cray = yes; then
11866 for ac_func in _getb67 GETB67 getb67; do
11867   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11868 echo "configure:11869: checking for $ac_func" >&5
11869
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 /* System header to define __stub macros and hopefully few prototypes,
11874     which can conflict with char $ac_func(); below.  */
11875 #include <assert.h>
11876 /* Override any gcc2 internal prototype to avoid an error.  */
11877 /* We use char because int might match the return type of a gcc2
11878     builtin and then its argument prototype would still apply.  */
11879 char $ac_func();
11880
11881 int main() {
11882
11883 /* The GNU C library defines this for functions which it implements
11884     to always fail with ENOSYS.  Some functions are actually named
11885     something starting with __ and the normal name is an alias.  */
11886 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11887 choke me
11888 #else
11889 $ac_func();
11890 #endif
11891
11892 ; return 0; }
11893 EOF
11894 if { (eval echo configure:11895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11895   rm -rf conftest*
11896   eval "ac_cv_func_$ac_func=yes"
11897 else
11898   echo "configure: failed program was:" >&5
11899   cat conftest.$ac_ext >&5
11900   rm -rf conftest*
11901   eval "ac_cv_func_$ac_func=no"
11902 fi
11903 rm -f conftest*
11904
11905 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11906   echo "$ac_t""yes" 1>&6
11907   { test "$extra_verbose" = "yes" && cat << EOF
11908     Defining CRAY_STACKSEG_END = $ac_func
11909 EOF
11910 cat >> confdefs.h <<EOF
11911 #define CRAY_STACKSEG_END $ac_func
11912 EOF
11913 }
11914
11915   break
11916 else
11917   echo "$ac_t""no" 1>&6
11918 fi
11919
11920 done
11921 fi
11922
11923 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11924 echo "configure:11925: checking stack direction for C alloca" >&5
11925
11926 cat > conftest.$ac_ext <<EOF
11927 #line 11928 "configure"
11928 #include "confdefs.h"
11929 find_stack_direction ()
11930 {
11931   static char *addr = 0;
11932   auto char dummy;
11933   if (addr == 0)
11934     {
11935       addr = &dummy;
11936       return find_stack_direction ();
11937     }
11938   else
11939     return (&dummy > addr) ? 1 : -1;
11940 }
11941 main ()
11942 {
11943   exit (find_stack_direction() < 0);
11944 }
11945 EOF
11946 if { (eval echo configure:11947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11947 then
11948   ac_cv_c_stack_direction=1
11949 else
11950   conftest_rc="$?"
11951   echo "configure: failed program was:" >&5
11952   cat conftest.$ac_ext >&5
11953   rm -fr conftest*
11954   ac_cv_c_stack_direction=-1
11955 fi
11956 rm -fr conftest*
11957
11958 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11959 { test "$extra_verbose" = "yes" && cat << EOF
11960     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11961 EOF
11962 cat >> confdefs.h <<EOF
11963 #define STACK_DIRECTION $ac_cv_c_stack_direction
11964 EOF
11965 }
11966
11967 fi
11968
11969   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11970    echo "    xemacs will be linked with \"$ALLOCA\""
11971  fi
11972 fi
11973
11974 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11975 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11976 echo "configure:11977: checking for vfork.h" >&5
11977
11978 cat > conftest.$ac_ext <<EOF
11979 #line 11980 "configure"
11980 #include "confdefs.h"
11981 #include <vfork.h>
11982 EOF
11983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11984 { (eval echo configure:11985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11986 if test -z "$ac_err"; then
11987   rm -rf conftest*
11988   eval "ac_cv_header_$ac_safe=yes"
11989 else
11990   echo "$ac_err" >&5
11991   echo "configure: failed program was:" >&5
11992   cat conftest.$ac_ext >&5
11993   rm -rf conftest*
11994   eval "ac_cv_header_$ac_safe=no"
11995 fi
11996 rm -f conftest*
11997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11998   echo "$ac_t""yes" 1>&6
11999   { test "$extra_verbose" = "yes" && cat << \EOF
12000     Defining HAVE_VFORK_H
12001 EOF
12002 cat >> confdefs.h <<\EOF
12003 #define HAVE_VFORK_H 1
12004 EOF
12005 }
12006
12007 else
12008   echo "$ac_t""no" 1>&6
12009 fi
12010
12011 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
12012 echo "configure:12013: checking for working vfork" >&5
12013
12014 cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017 /* Thanks to Paul Eggert for this test.  */
12018 #include <stdio.h>
12019 #include <sys/types.h>
12020 #include <sys/stat.h>
12021 #ifdef HAVE_UNISTD_H
12022 #include <unistd.h>
12023 #endif
12024 #ifdef HAVE_VFORK_H
12025 #include <vfork.h>
12026 #endif
12027 /* On some sparc systems, changes by the child to local and incoming
12028    argument registers are propagated back to the parent.
12029    The compiler is told about this with #include <vfork.h>,
12030    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12031    Test for this by using a static variable whose address
12032    is put into a register that is clobbered by the vfork.  */
12033 static
12034 #ifdef __cplusplus
12035 sparc_address_test (int arg)
12036 #else
12037 sparc_address_test (arg) int arg;
12038 #endif
12039 {
12040   static pid_t child;
12041   if (!child) {
12042     child = vfork ();
12043     if (child < 0) {
12044       perror ("vfork");
12045       _exit(2);
12046     }
12047     if (!child) {
12048       arg = getpid();
12049       write(-1, "", 0);
12050       _exit (arg);
12051     }
12052   }
12053 }
12054 main() {
12055   pid_t parent = getpid ();
12056   pid_t child;
12057
12058   sparc_address_test ();
12059
12060   child = vfork ();
12061
12062   if (child == 0) {
12063     /* Here is another test for sparc vfork register problems.
12064        This test uses lots of local variables, at least
12065        as many local variables as main has allocated so far
12066        including compiler temporaries.  4 locals are enough for
12067        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12068        A buggy compiler should reuse the register of parent
12069        for one of the local variables, since it will think that
12070        parent can't possibly be used any more in this routine.
12071        Assigning to the local variable will thus munge parent
12072        in the parent process.  */
12073     pid_t
12074       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12075       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12076     /* Convince the compiler that p..p7 are live; otherwise, it might
12077        use the same hardware register for all 8 local variables.  */
12078     if (p != p1 || p != p2 || p != p3 || p != p4
12079         || p != p5 || p != p6 || p != p7)
12080       _exit(1);
12081
12082     /* On some systems (e.g. IRIX 3.3),
12083        vfork doesn't separate parent from child file descriptors.
12084        If the child closes a descriptor before it execs or exits,
12085        this munges the parent's descriptor as well.
12086        Test for this by closing stdout in the child.  */
12087     _exit(close(fileno(stdout)) != 0);
12088   } else {
12089     int status;
12090     struct stat st;
12091
12092     while (wait(&status) != child)
12093       ;
12094     exit(
12095          /* Was there some problem with vforking?  */
12096          child < 0
12097
12098          /* Did the child fail?  (This shouldn't happen.)  */
12099          || status
12100
12101          /* Did the vfork/compiler bug occur?  */
12102          || parent != getpid()
12103
12104          /* Did the file descriptor bug occur?  */
12105          || fstat(fileno(stdout), &st) != 0
12106          );
12107   }
12108 }
12109 EOF
12110 if { (eval echo configure:12111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12111 then
12112   ac_cv_func_vfork_works=yes
12113 else
12114   conftest_rc="$?"
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -fr conftest*
12118   ac_cv_func_vfork_works=no
12119 fi
12120 rm -fr conftest*
12121
12122 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12123 if test $ac_cv_func_vfork_works = no; then
12124   { test "$extra_verbose" = "yes" && cat << \EOF
12125     Defining vfork = fork
12126 EOF
12127 cat >> confdefs.h <<\EOF
12128 #define vfork fork
12129 EOF
12130 }
12131
12132 fi
12133
12134
12135 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12136 echo "configure:12137: checking for working strcoll" >&5
12137
12138 cat > conftest.$ac_ext <<EOF
12139 #line 12140 "configure"
12140 #include "confdefs.h"
12141 #include <string.h>
12142 main ()
12143 {
12144   exit (strcoll ("abc", "def") >= 0 ||
12145         strcoll ("ABC", "DEF") >= 0 ||
12146         strcoll ("123", "456") >= 0);
12147 }
12148 EOF
12149 if { (eval echo configure:12150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12150 then
12151   ac_cv_func_strcoll_works=yes
12152 else
12153   conftest_rc="$?"
12154   echo "configure: failed program was:" >&5
12155   cat conftest.$ac_ext >&5
12156   rm -fr conftest*
12157   ac_cv_func_strcoll_works=no
12158 fi
12159 rm -fr conftest*
12160
12161 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12162 if test $ac_cv_func_strcoll_works = yes; then
12163   { test "$extra_verbose" = "yes" && cat << \EOF
12164     Defining HAVE_STRCOLL
12165 EOF
12166 cat >> confdefs.h <<\EOF
12167 #define HAVE_STRCOLL 1
12168 EOF
12169 }
12170
12171 fi
12172
12173
12174 for ac_func in getpgrp
12175 do
12176 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12177 echo "configure:12178: checking for $ac_func" >&5
12178
12179 cat > conftest.$ac_ext <<EOF
12180 #line 12181 "configure"
12181 #include "confdefs.h"
12182 /* System header to define __stub macros and hopefully few prototypes,
12183     which can conflict with char $ac_func(); below.  */
12184 #include <assert.h>
12185 /* Override any gcc2 internal prototype to avoid an error.  */
12186 /* We use char because int might match the return type of a gcc2
12187     builtin and then its argument prototype would still apply.  */
12188 char $ac_func();
12189
12190 int main() {
12191
12192 /* The GNU C library defines this for functions which it implements
12193     to always fail with ENOSYS.  Some functions are actually named
12194     something starting with __ and the normal name is an alias.  */
12195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12196 choke me
12197 #else
12198 $ac_func();
12199 #endif
12200
12201 ; return 0; }
12202 EOF
12203 if { (eval echo configure:12204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12204   rm -rf conftest*
12205   eval "ac_cv_func_$ac_func=yes"
12206 else
12207   echo "configure: failed program was:" >&5
12208   cat conftest.$ac_ext >&5
12209   rm -rf conftest*
12210   eval "ac_cv_func_$ac_func=no"
12211 fi
12212 rm -f conftest*
12213
12214 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12215   echo "$ac_t""yes" 1>&6
12216     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12217   { test "$extra_verbose" = "yes" && cat << EOF
12218     Defining $ac_tr_func
12219 EOF
12220 cat >> confdefs.h <<EOF
12221 #define $ac_tr_func 1
12222 EOF
12223 }
12224  
12225 else
12226   echo "$ac_t""no" 1>&6
12227 fi
12228 done
12229
12230 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12231 echo "configure:12232: checking whether getpgrp takes no argument" >&5
12232
12233 cat > conftest.$ac_ext <<EOF
12234 #line 12235 "configure"
12235 #include "confdefs.h"
12236
12237 /*
12238  * If this system has a BSD-style getpgrp(),
12239  * which takes a pid argument, exit unsuccessfully.
12240  *
12241  * Snarfed from Chet Ramey's bash pgrp.c test program
12242  */
12243 #include <stdio.h>
12244 #include <sys/types.h>
12245
12246 int     pid;
12247 int     pg1, pg2, pg3, pg4;
12248 int     ng, np, s, child;
12249
12250 main()
12251 {
12252         pid = getpid();
12253         pg1 = getpgrp(0);
12254         pg2 = getpgrp();
12255         pg3 = getpgrp(pid);
12256         pg4 = getpgrp(1);
12257
12258         /*
12259          * If all of these values are the same, it's pretty sure that
12260          * we're on a system that ignores getpgrp's first argument.
12261          */
12262         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12263                 exit(0);
12264
12265         child = fork();
12266         if (child < 0)
12267                 exit(1);
12268         else if (child == 0) {
12269                 np = getpid();
12270                 /*
12271                  * If this is Sys V, this will not work; pgrp will be
12272                  * set to np because setpgrp just changes a pgrp to be
12273                  * the same as the pid.
12274                  */
12275                 setpgrp(np, pg1);
12276                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12277                 if (ng == pg1) {
12278                         exit(1);
12279                 } else {
12280                         exit(0);
12281                 }
12282         } else {
12283                 wait(&s);
12284                 exit(s>>8);
12285         }
12286 }
12287
12288 EOF
12289 if { (eval echo configure:12290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12290 then
12291   ac_cv_func_getpgrp_void=yes
12292 else
12293   conftest_rc="$?"
12294   echo "configure: failed program was:" >&5
12295   cat conftest.$ac_ext >&5
12296   rm -fr conftest*
12297   ac_cv_func_getpgrp_void=no
12298 fi
12299 rm -fr conftest*
12300
12301
12302 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12303 if test $ac_cv_func_getpgrp_void = yes; then
12304   { test "$extra_verbose" = "yes" && cat << \EOF
12305     Defining GETPGRP_VOID
12306 EOF
12307 cat >> confdefs.h <<\EOF
12308 #define GETPGRP_VOID 1
12309 EOF
12310 }
12311
12312 fi
12313
12314
12315 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12316 echo "configure:12317: checking for working mmap" >&5
12317 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12318 cat > conftest.$ac_ext <<EOF
12319 #line 12320 "configure"
12320 #include "confdefs.h"
12321 #include <stdio.h>
12322 #include <unistd.h>
12323 #include <fcntl.h>
12324 #include <sys/mman.h>
12325
12326 #ifndef MAP_VARIABLE
12327 #define MAP_VARIABLE 0
12328 #endif
12329
12330 #ifndef MAP_FAILED
12331 #define MAP_FAILED -1
12332 #endif
12333
12334 int main (int argc, char *argv[])
12335 {
12336   int fd = -1;
12337   caddr_t p;
12338 #ifndef MAP_ANONYMOUS
12339   fd = open ("/dev/zero", O_RDWR);
12340   if (fd < 0)
12341     return 1;
12342 #define MAP_ANONYMOUS 0
12343 #endif
12344   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12345            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12346            fd, 0) != (void *) MAP_FAILED)
12347     return 0;
12348   perror ("conftest: mmap failed");
12349   return 1;
12350 }
12351 EOF
12352 if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12353 then
12354   have_mmap=yes
12355 else
12356   conftest_rc="$?"
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -fr conftest*
12360   have_mmap=no
12361 fi
12362 rm -fr conftest* ;;
12363 esac
12364 echo "$ac_t""$have_mmap" 1>&6
12365 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12366     Defining HAVE_MMAP
12367 EOF
12368 cat >> confdefs.h <<\EOF
12369 #define HAVE_MMAP 1
12370 EOF
12371 }
12372
12373
12374 case "$opsys" in cygwin*) 
12375         test "$rel_alloc" = "default" && rel_alloc=no ;;
12376 esac
12377 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12378 if test "$rel_alloc $have_mmap" = "default yes"; then
12379   if test "$doug_lea_malloc" = "yes"; then
12380         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12381 echo "configure:12382: checking for M_MMAP_THRESHOLD" >&5
12382     cat > conftest.$ac_ext <<EOF
12383 #line 12384 "configure"
12384 #include "confdefs.h"
12385 #include <malloc.h>
12386 int main() {
12387
12388 #ifndef M_MMAP_THRESHOLD
12389 #error No M_MMAP_THRESHOLD :-(
12390 !@+$%^&*_)(_ - unlikely to compile...
12391 #endif
12392
12393 ; return 0; }
12394 EOF
12395 if { (eval echo configure:12396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12396   rm -rf conftest*
12397   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12398 else
12399   echo "configure: failed program was:" >&5
12400   cat conftest.$ac_ext >&5
12401   rm -rf conftest*
12402   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12403 fi
12404 rm -f conftest*
12405   else
12406     rel_alloc=yes
12407   fi
12408 fi
12409 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12410     Defining REL_ALLOC
12411 EOF
12412 cat >> confdefs.h <<\EOF
12413 #define REL_ALLOC 1
12414 EOF
12415 }
12416
12417
12418 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12419 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12420 echo "configure:12421: checking for termios.h" >&5
12421
12422 cat > conftest.$ac_ext <<EOF
12423 #line 12424 "configure"
12424 #include "confdefs.h"
12425 #include <termios.h>
12426 EOF
12427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12428 { (eval echo configure:12429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12430 if test -z "$ac_err"; then
12431   rm -rf conftest*
12432   eval "ac_cv_header_$ac_safe=yes"
12433 else
12434   echo "$ac_err" >&5
12435   echo "configure: failed program was:" >&5
12436   cat conftest.$ac_ext >&5
12437   rm -rf conftest*
12438   eval "ac_cv_header_$ac_safe=no"
12439 fi
12440 rm -f conftest*
12441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12442   echo "$ac_t""yes" 1>&6
12443   { test "$extra_verbose" = "yes" && cat << \EOF
12444     Defining HAVE_TERMIOS
12445 EOF
12446 cat >> confdefs.h <<\EOF
12447 #define HAVE_TERMIOS 1
12448 EOF
12449 }
12450
12451   { test "$extra_verbose" = "yes" && cat << \EOF
12452     Defining SIGNALS_VIA_CHARACTERS
12453 EOF
12454 cat >> confdefs.h <<\EOF
12455 #define SIGNALS_VIA_CHARACTERS 1
12456 EOF
12457 }
12458
12459   { test "$extra_verbose" = "yes" && cat << \EOF
12460     Defining NO_TERMIO
12461 EOF
12462 cat >> confdefs.h <<\EOF
12463 #define NO_TERMIO 1
12464 EOF
12465 }
12466
12467 else
12468   echo "$ac_t""no" 1>&6
12469 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12470 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12471 echo "configure:12472: checking for termio.h" >&5
12472
12473 cat > conftest.$ac_ext <<EOF
12474 #line 12475 "configure"
12475 #include "confdefs.h"
12476 #include <termio.h>
12477 EOF
12478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12479 { (eval echo configure:12480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12481 if test -z "$ac_err"; then
12482   rm -rf conftest*
12483   eval "ac_cv_header_$ac_safe=yes"
12484 else
12485   echo "$ac_err" >&5
12486   echo "configure: failed program was:" >&5
12487   cat conftest.$ac_ext >&5
12488   rm -rf conftest*
12489   eval "ac_cv_header_$ac_safe=no"
12490 fi
12491 rm -f conftest*
12492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12493   echo "$ac_t""yes" 1>&6
12494   { test "$extra_verbose" = "yes" && cat << \EOF
12495     Defining HAVE_TERMIO
12496 EOF
12497 cat >> confdefs.h <<\EOF
12498 #define HAVE_TERMIO 1
12499 EOF
12500 }
12501
12502 else
12503   echo "$ac_t""no" 1>&6
12504 fi
12505
12506 fi
12507
12508
12509
12510 echo $ac_n "checking for socket""... $ac_c" 1>&6
12511 echo "configure:12512: checking for socket" >&5
12512
12513 cat > conftest.$ac_ext <<EOF
12514 #line 12515 "configure"
12515 #include "confdefs.h"
12516 /* System header to define __stub macros and hopefully few prototypes,
12517     which can conflict with char socket(); below.  */
12518 #include <assert.h>
12519 /* Override any gcc2 internal prototype to avoid an error.  */
12520 /* We use char because int might match the return type of a gcc2
12521     builtin and then its argument prototype would still apply.  */
12522 char socket();
12523
12524 int main() {
12525
12526 /* The GNU C library defines this for functions which it implements
12527     to always fail with ENOSYS.  Some functions are actually named
12528     something starting with __ and the normal name is an alias.  */
12529 #if defined (__stub_socket) || defined (__stub___socket)
12530 choke me
12531 #else
12532 socket();
12533 #endif
12534
12535 ; return 0; }
12536 EOF
12537 if { (eval echo configure:12538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12538   rm -rf conftest*
12539   eval "ac_cv_func_socket=yes"
12540 else
12541   echo "configure: failed program was:" >&5
12542   cat conftest.$ac_ext >&5
12543   rm -rf conftest*
12544   eval "ac_cv_func_socket=no"
12545 fi
12546 rm -f conftest*
12547
12548 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12549   echo "$ac_t""yes" 1>&6
12550   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12551 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12552 echo "configure:12553: checking for netinet/in.h" >&5
12553
12554 cat > conftest.$ac_ext <<EOF
12555 #line 12556 "configure"
12556 #include "confdefs.h"
12557 #include <netinet/in.h>
12558 EOF
12559 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12560 { (eval echo configure:12561: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12561 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12562 if test -z "$ac_err"; then
12563   rm -rf conftest*
12564   eval "ac_cv_header_$ac_safe=yes"
12565 else
12566   echo "$ac_err" >&5
12567   echo "configure: failed program was:" >&5
12568   cat conftest.$ac_ext >&5
12569   rm -rf conftest*
12570   eval "ac_cv_header_$ac_safe=no"
12571 fi
12572 rm -f conftest*
12573 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12574   echo "$ac_t""yes" 1>&6
12575   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12576 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12577 echo "configure:12578: checking for arpa/inet.h" >&5
12578
12579 cat > conftest.$ac_ext <<EOF
12580 #line 12581 "configure"
12581 #include "confdefs.h"
12582 #include <arpa/inet.h>
12583 EOF
12584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12585 { (eval echo configure:12586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12587 if test -z "$ac_err"; then
12588   rm -rf conftest*
12589   eval "ac_cv_header_$ac_safe=yes"
12590 else
12591   echo "$ac_err" >&5
12592   echo "configure: failed program was:" >&5
12593   cat conftest.$ac_ext >&5
12594   rm -rf conftest*
12595   eval "ac_cv_header_$ac_safe=no"
12596 fi
12597 rm -f conftest*
12598 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12599   echo "$ac_t""yes" 1>&6
12600   
12601   { test "$extra_verbose" = "yes" && cat << \EOF
12602     Defining HAVE_SOCKETS
12603 EOF
12604 cat >> confdefs.h <<\EOF
12605 #define HAVE_SOCKETS 1
12606 EOF
12607 }
12608
12609       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12610 echo "configure:12611: checking "for sun_len member in struct sockaddr_un"" >&5
12611       cat > conftest.$ac_ext <<EOF
12612 #line 12613 "configure"
12613 #include "confdefs.h"
12614
12615 #include <sys/types.h>
12616 #include <sys/socket.h>
12617 #include <sys/un.h>
12618       
12619 int main() {
12620 static struct sockaddr_un x; x.sun_len = 1;
12621 ; return 0; }
12622 EOF
12623 if { (eval echo configure:12624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12624   rm -rf conftest*
12625   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12626     Defining HAVE_SOCKADDR_SUN_LEN
12627 EOF
12628 cat >> confdefs.h <<\EOF
12629 #define HAVE_SOCKADDR_SUN_LEN 1
12630 EOF
12631 }
12632
12633 else
12634   echo "configure: failed program was:" >&5
12635   cat conftest.$ac_ext >&5
12636   rm -rf conftest*
12637   echo "$ac_t""no" 1>&6
12638 fi
12639 rm -f conftest*
12640       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12641 echo "configure:12642: checking "for ip_mreq struct in netinet/in.h"" >&5
12642       cat > conftest.$ac_ext <<EOF
12643 #line 12644 "configure"
12644 #include "confdefs.h"
12645
12646 #include <sys/types.h>
12647 #include <netinet/in.h>
12648       
12649 int main() {
12650 static struct ip_mreq x;
12651 ; return 0; }
12652 EOF
12653 if { (eval echo configure:12654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12654   rm -rf conftest*
12655   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12656     Defining HAVE_MULTICAST
12657 EOF
12658 cat >> confdefs.h <<\EOF
12659 #define HAVE_MULTICAST 1
12660 EOF
12661 }
12662
12663 else
12664   echo "configure: failed program was:" >&5
12665   cat conftest.$ac_ext >&5
12666   rm -rf conftest*
12667   echo "$ac_t""no" 1>&6
12668 fi
12669 rm -f conftest*
12670 else
12671   echo "$ac_t""no" 1>&6
12672 fi
12673
12674 else
12675   echo "$ac_t""no" 1>&6
12676 fi
12677
12678 else
12679   echo "$ac_t""no" 1>&6
12680 fi
12681
12682
12683 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12684 echo "configure:12685: checking for msgget" >&5
12685
12686 cat > conftest.$ac_ext <<EOF
12687 #line 12688 "configure"
12688 #include "confdefs.h"
12689 /* System header to define __stub macros and hopefully few prototypes,
12690     which can conflict with char msgget(); below.  */
12691 #include <assert.h>
12692 /* Override any gcc2 internal prototype to avoid an error.  */
12693 /* We use char because int might match the return type of a gcc2
12694     builtin and then its argument prototype would still apply.  */
12695 char msgget();
12696
12697 int main() {
12698
12699 /* The GNU C library defines this for functions which it implements
12700     to always fail with ENOSYS.  Some functions are actually named
12701     something starting with __ and the normal name is an alias.  */
12702 #if defined (__stub_msgget) || defined (__stub___msgget)
12703 choke me
12704 #else
12705 msgget();
12706 #endif
12707
12708 ; return 0; }
12709 EOF
12710 if { (eval echo configure:12711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12711   rm -rf conftest*
12712   eval "ac_cv_func_msgget=yes"
12713 else
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -rf conftest*
12717   eval "ac_cv_func_msgget=no"
12718 fi
12719 rm -f conftest*
12720
12721 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12722   echo "$ac_t""yes" 1>&6
12723   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12724 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12725 echo "configure:12726: checking for sys/ipc.h" >&5
12726
12727 cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 #include <sys/ipc.h>
12731 EOF
12732 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12733 { (eval echo configure:12734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12734 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12735 if test -z "$ac_err"; then
12736   rm -rf conftest*
12737   eval "ac_cv_header_$ac_safe=yes"
12738 else
12739   echo "$ac_err" >&5
12740   echo "configure: failed program was:" >&5
12741   cat conftest.$ac_ext >&5
12742   rm -rf conftest*
12743   eval "ac_cv_header_$ac_safe=no"
12744 fi
12745 rm -f conftest*
12746 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12747   echo "$ac_t""yes" 1>&6
12748   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12749 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12750 echo "configure:12751: checking for sys/msg.h" >&5
12751
12752 cat > conftest.$ac_ext <<EOF
12753 #line 12754 "configure"
12754 #include "confdefs.h"
12755 #include <sys/msg.h>
12756 EOF
12757 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12758 { (eval echo configure:12759: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12759 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12760 if test -z "$ac_err"; then
12761   rm -rf conftest*
12762   eval "ac_cv_header_$ac_safe=yes"
12763 else
12764   echo "$ac_err" >&5
12765   echo "configure: failed program was:" >&5
12766   cat conftest.$ac_ext >&5
12767   rm -rf conftest*
12768   eval "ac_cv_header_$ac_safe=no"
12769 fi
12770 rm -f conftest*
12771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12772   echo "$ac_t""yes" 1>&6
12773   { test "$extra_verbose" = "yes" && cat << \EOF
12774     Defining HAVE_SYSVIPC
12775 EOF
12776 cat >> confdefs.h <<\EOF
12777 #define HAVE_SYSVIPC 1
12778 EOF
12779 }
12780
12781 else
12782   echo "$ac_t""no" 1>&6
12783 fi
12784
12785 else
12786   echo "$ac_t""no" 1>&6
12787 fi
12788
12789 else
12790   echo "$ac_t""no" 1>&6
12791 fi
12792
12793
12794 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12795 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12796 echo "configure:12797: checking for dirent.h" >&5
12797
12798 cat > conftest.$ac_ext <<EOF
12799 #line 12800 "configure"
12800 #include "confdefs.h"
12801 #include <dirent.h>
12802 EOF
12803 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12804 { (eval echo configure:12805: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12805 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12806 if test -z "$ac_err"; then
12807   rm -rf conftest*
12808   eval "ac_cv_header_$ac_safe=yes"
12809 else
12810   echo "$ac_err" >&5
12811   echo "configure: failed program was:" >&5
12812   cat conftest.$ac_ext >&5
12813   rm -rf conftest*
12814   eval "ac_cv_header_$ac_safe=no"
12815 fi
12816 rm -f conftest*
12817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12818   echo "$ac_t""yes" 1>&6
12819   { test "$extra_verbose" = "yes" && cat << \EOF
12820     Defining SYSV_SYSTEM_DIR
12821 EOF
12822 cat >> confdefs.h <<\EOF
12823 #define SYSV_SYSTEM_DIR 1
12824 EOF
12825 }
12826
12827 else
12828   echo "$ac_t""no" 1>&6
12829 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12830 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12831 echo "configure:12832: checking for sys/dir.h" >&5
12832
12833 cat > conftest.$ac_ext <<EOF
12834 #line 12835 "configure"
12835 #include "confdefs.h"
12836 #include <sys/dir.h>
12837 EOF
12838 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12839 { (eval echo configure:12840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12840 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12841 if test -z "$ac_err"; then
12842   rm -rf conftest*
12843   eval "ac_cv_header_$ac_safe=yes"
12844 else
12845   echo "$ac_err" >&5
12846   echo "configure: failed program was:" >&5
12847   cat conftest.$ac_ext >&5
12848   rm -rf conftest*
12849   eval "ac_cv_header_$ac_safe=no"
12850 fi
12851 rm -f conftest*
12852 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12853   echo "$ac_t""yes" 1>&6
12854   :
12855 else
12856   echo "$ac_t""no" 1>&6
12857 { test "$extra_verbose" = "yes" && cat << \EOF
12858     Defining NONSYSTEM_DIR_LIBRARY
12859 EOF
12860 cat >> confdefs.h <<\EOF
12861 #define NONSYSTEM_DIR_LIBRARY 1
12862 EOF
12863 }
12864
12865 fi
12866
12867 fi
12868
12869
12870 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12871 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12872 echo "configure:12873: checking for nlist.h" >&5
12873
12874 cat > conftest.$ac_ext <<EOF
12875 #line 12876 "configure"
12876 #include "confdefs.h"
12877 #include <nlist.h>
12878 EOF
12879 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12880 { (eval echo configure:12881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12881 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12882 if test -z "$ac_err"; then
12883   rm -rf conftest*
12884   eval "ac_cv_header_$ac_safe=yes"
12885 else
12886   echo "$ac_err" >&5
12887   echo "configure: failed program was:" >&5
12888   cat conftest.$ac_ext >&5
12889   rm -rf conftest*
12890   eval "ac_cv_header_$ac_safe=no"
12891 fi
12892 rm -f conftest*
12893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12894   echo "$ac_t""yes" 1>&6
12895   { test "$extra_verbose" = "yes" && cat << \EOF
12896     Defining NLIST_STRUCT
12897 EOF
12898 cat >> confdefs.h <<\EOF
12899 #define NLIST_STRUCT 1
12900 EOF
12901 }
12902
12903 else
12904   echo "$ac_t""no" 1>&6
12905 fi
12906
12907
12908
12909 echo "checking "for sound support"" 1>&6
12910 echo "configure:12911: checking "for sound support"" >&5
12911 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12912
12913 if test "$with_native_sound" != "no"; then
12914     if test -n "$native_sound_lib"; then
12915     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12916 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12917 echo "configure:12918: checking for multimedia/audio_device.h" >&5
12918
12919 cat > conftest.$ac_ext <<EOF
12920 #line 12921 "configure"
12921 #include "confdefs.h"
12922 #include <multimedia/audio_device.h>
12923 EOF
12924 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12925 { (eval echo configure:12926: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12926 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12927 if test -z "$ac_err"; then
12928   rm -rf conftest*
12929   eval "ac_cv_header_$ac_safe=yes"
12930 else
12931   echo "$ac_err" >&5
12932   echo "configure: failed program was:" >&5
12933   cat conftest.$ac_ext >&5
12934   rm -rf conftest*
12935   eval "ac_cv_header_$ac_safe=no"
12936 fi
12937 rm -f conftest*
12938 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12939   echo "$ac_t""yes" 1>&6
12940   sound_found=yes sound_cflags=""
12941       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12942    echo "    xemacs will be linked with \"sunplay.o\""
12943  fi
12944 else
12945   echo "$ac_t""no" 1>&6
12946 fi
12947
12948   fi
12949
12950     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12951     sound_found=yes
12952     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12953    echo "    xemacs will be linked with \"sunplay.o\""
12954  fi
12955     if test -d "/usr/demo/SOUND/include"
12956       then sound_cflags="-I/usr/demo/SOUND/include"
12957       else sound_cflags="-I/usr/demo/SOUND"
12958     fi
12959     if test -z "$native_sound_lib" ; then
12960       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12961         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12962         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12963       fi
12964     fi
12965   fi
12966
12967     if test -z "$sound_found"; then
12968     case "$canonical" in
12969     *-sgi-* )
12970       if test -z "$native_sound_lib"; then
12971         
12972 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12973 echo "configure:12974: checking for ALopenport in -laudio" >&5
12974 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12975
12976 xe_check_libs=" -laudio "
12977 cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 /* Override any gcc2 internal prototype to avoid an error.  */
12981 /* We use char because int might match the return type of a gcc2
12982     builtin and then its argument prototype would still apply.  */
12983 char ALopenport();
12984
12985 int main() {
12986 ALopenport()
12987 ; return 0; }
12988 EOF
12989 if { (eval echo configure:12990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12990   rm -rf conftest*
12991   eval "ac_cv_lib_$ac_lib_var=yes"
12992 else
12993   echo "configure: failed program was:" >&5
12994   cat conftest.$ac_ext >&5
12995   rm -rf conftest*
12996   eval "ac_cv_lib_$ac_lib_var=no"
12997 fi
12998 rm -f conftest*
12999 xe_check_libs=""
13000
13001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13002   echo "$ac_t""yes" 1>&6
13003   native_sound_lib="-laudio"
13004 else
13005   echo "$ac_t""no" 1>&6
13006 fi
13007
13008
13009       fi
13010       if test -n "$native_sound_lib"; then
13011         sound_found=yes sound_cflags=""
13012         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
13013    echo "    xemacs will be linked with \"sgiplay.o\""
13014  fi
13015       fi ;;
13016     hppa*-hp-hpux* )
13017       if test -z "$native_sound_lib"; then
13018         
13019 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
13020 echo "configure:13021: checking for AOpenAudio in -lAlib" >&5
13021 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
13022
13023 xe_check_libs=" -lAlib "
13024 cat > conftest.$ac_ext <<EOF
13025 #line 13026 "configure"
13026 #include "confdefs.h"
13027 /* Override any gcc2 internal prototype to avoid an error.  */
13028 /* We use char because int might match the return type of a gcc2
13029     builtin and then its argument prototype would still apply.  */
13030 char AOpenAudio();
13031
13032 int main() {
13033 AOpenAudio()
13034 ; return 0; }
13035 EOF
13036 if { (eval echo configure:13037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13037   rm -rf conftest*
13038   eval "ac_cv_lib_$ac_lib_var=yes"
13039 else
13040   echo "configure: failed program was:" >&5
13041   cat conftest.$ac_ext >&5
13042   rm -rf conftest*
13043   eval "ac_cv_lib_$ac_lib_var=no"
13044 fi
13045 rm -f conftest*
13046 xe_check_libs=""
13047
13048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13049   echo "$ac_t""yes" 1>&6
13050   native_sound_lib="-lAlib"
13051 else
13052   echo "$ac_t""no" 1>&6
13053 fi
13054
13055
13056       fi
13057       if test -n "$native_sound_lib"; then
13058         sound_found=yes
13059         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13060    echo "    xemacs will be linked with \"hpplay.o\""
13061  fi
13062         if test "$GCC" = "yes" # Kludge city
13063           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13064           else sound_cflags="+e -I/usr/audio/examples"
13065         fi
13066       fi ;;
13067     esac
13068   fi
13069
13070     if test -z "$sound_found"; then
13071     if test "$with_msw" = "yes"; then
13072     sound_found=yes
13073     native_sound_lib=
13074     fi
13075   fi
13076
13077     if test -z "$sound_found"; then
13078     for dir in "machine" "sys" "linux"; do
13079       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13080 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13081 echo "configure:13082: checking for ${dir}/soundcard.h" >&5
13082
13083 cat > conftest.$ac_ext <<EOF
13084 #line 13085 "configure"
13085 #include "confdefs.h"
13086 #include <${dir}/soundcard.h>
13087 EOF
13088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13089 { (eval echo configure:13090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13091 if test -z "$ac_err"; then
13092   rm -rf conftest*
13093   eval "ac_cv_header_$ac_safe=yes"
13094 else
13095   echo "$ac_err" >&5
13096   echo "configure: failed program was:" >&5
13097   cat conftest.$ac_ext >&5
13098   rm -rf conftest*
13099   eval "ac_cv_header_$ac_safe=no"
13100 fi
13101 rm -f conftest*
13102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13103   echo "$ac_t""yes" 1>&6
13104   sound_found=yes
13105        need_miscplay=yes
13106         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13107    echo "    xemacs will be linked with \"linuxplay.o\""
13108  fi
13109         { test "$extra_verbose" = "yes" && cat << EOF
13110     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13111 EOF
13112 cat >> confdefs.h <<EOF
13113 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13114 EOF
13115 }
13116
13117         break
13118 else
13119   echo "$ac_t""no" 1>&6
13120 fi
13121
13122     done
13123   fi
13124
13125   test "$sound_found" = "yes" && with_native_sound=yes
13126 fi
13127
13128 if test "$with_native_sound" = "yes"; then
13129   { test "$extra_verbose" = "yes" && cat << \EOF
13130     Defining HAVE_NATIVE_SOUND
13131 EOF
13132 cat >> confdefs.h <<\EOF
13133 #define HAVE_NATIVE_SOUND 1
13134 EOF
13135 }
13136
13137   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13138 fi
13139
13140 if test "$with_nas_sound" != "no"; then
13141   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13142 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13143 echo "configure:13144: checking for audio/audiolib.h" >&5
13144
13145 cat > conftest.$ac_ext <<EOF
13146 #line 13147 "configure"
13147 #include "confdefs.h"
13148 #include <audio/audiolib.h>
13149 EOF
13150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13151 { (eval echo configure:13152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13153 if test -z "$ac_err"; then
13154   rm -rf conftest*
13155   eval "ac_cv_header_$ac_safe=yes"
13156 else
13157   echo "$ac_err" >&5
13158   echo "configure: failed program was:" >&5
13159   cat conftest.$ac_ext >&5
13160   rm -rf conftest*
13161   eval "ac_cv_header_$ac_safe=no"
13162 fi
13163 rm -f conftest*
13164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13165   echo "$ac_t""yes" 1>&6
13166   
13167     
13168 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13169 echo "configure:13170: checking for AuOpenServer in -laudio" >&5
13170 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13171
13172 xe_check_libs=" -laudio "
13173 cat > conftest.$ac_ext <<EOF
13174 #line 13175 "configure"
13175 #include "confdefs.h"
13176 /* Override any gcc2 internal prototype to avoid an error.  */
13177 /* We use char because int might match the return type of a gcc2
13178     builtin and then its argument prototype would still apply.  */
13179 char AuOpenServer();
13180
13181 int main() {
13182 AuOpenServer()
13183 ; return 0; }
13184 EOF
13185 if { (eval echo configure:13186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13186   rm -rf conftest*
13187   eval "ac_cv_lib_$ac_lib_var=yes"
13188 else
13189   echo "configure: failed program was:" >&5
13190   cat conftest.$ac_ext >&5
13191   rm -rf conftest*
13192   eval "ac_cv_lib_$ac_lib_var=no"
13193 fi
13194 rm -f conftest*
13195 xe_check_libs=""
13196
13197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13198   echo "$ac_t""yes" 1>&6
13199   have_nas_sound=yes
13200 else
13201   echo "$ac_t""no" 1>&6
13202 fi
13203
13204
13205 else
13206   echo "$ac_t""no" 1>&6
13207 fi
13208
13209   if test "$have_nas_sound" = "yes"; then
13210     with_nas_sound=yes
13211     { test "$extra_verbose" = "yes" && cat << \EOF
13212     Defining HAVE_NAS_SOUND
13213 EOF
13214 cat >> confdefs.h <<\EOF
13215 #define HAVE_NAS_SOUND 1
13216 EOF
13217 }
13218
13219     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13220    echo "    xemacs will be linked with \"nas.o\""
13221  fi
13222     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13223             cat > conftest.$ac_ext <<EOF
13224 #line 13225 "configure"
13225 #include "confdefs.h"
13226 #include <audio/Xtutil.h>
13227 EOF
13228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13229   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13230   :
13231 else
13232   rm -rf conftest*
13233   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13234     Defining NAS_NO_ERROR_JUMP
13235 EOF
13236 cat >> confdefs.h <<\EOF
13237 #define NAS_NO_ERROR_JUMP 1
13238 EOF
13239 }
13240
13241 fi
13242 rm -f conftest*
13243
13244   else
13245     test "$with_nas_sound" = "yes" && \
13246       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13247     with_nas_sound=no
13248   fi
13249 fi
13250
13251 if test "$with_esd_sound" != "no"; then
13252   # Extract the first word of "esd-config", so it can be a program name with args.
13253 set dummy esd-config; ac_word=$2
13254 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13255 echo "configure:13256: checking for $ac_word" >&5
13256
13257 if test -n "$have_esd_config"; then
13258   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13259 else
13260   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13261   ac_dummy="$PATH"
13262   for ac_dir in $ac_dummy; do
13263     test -z "$ac_dir" && ac_dir=.
13264     if test -f $ac_dir/$ac_word; then
13265       ac_cv_prog_have_esd_config="yes"
13266       break
13267     fi
13268   done
13269   IFS="$ac_save_ifs"
13270   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13271 fi
13272 have_esd_config="$ac_cv_prog_have_esd_config"
13273 if test -n "$have_esd_config"; then
13274   echo "$ac_t""$have_esd_config" 1>&6
13275 else
13276   echo "$ac_t""no" 1>&6
13277 fi
13278
13279   if test "$have_esd_config" = "yes"; then
13280     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13281     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
13282     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13283     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13284 echo "configure:13285: checking for esd_play_stream" >&5
13285
13286 cat > conftest.$ac_ext <<EOF
13287 #line 13288 "configure"
13288 #include "confdefs.h"
13289 /* System header to define __stub macros and hopefully few prototypes,
13290     which can conflict with char esd_play_stream(); below.  */
13291 #include <assert.h>
13292 /* Override any gcc2 internal prototype to avoid an error.  */
13293 /* We use char because int might match the return type of a gcc2
13294     builtin and then its argument prototype would still apply.  */
13295 char esd_play_stream();
13296
13297 int main() {
13298
13299 /* The GNU C library defines this for functions which it implements
13300     to always fail with ENOSYS.  Some functions are actually named
13301     something starting with __ and the normal name is an alias.  */
13302 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13303 choke me
13304 #else
13305 esd_play_stream();
13306 #endif
13307
13308 ; return 0; }
13309 EOF
13310 if { (eval echo configure:13311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13311   rm -rf conftest*
13312   eval "ac_cv_func_esd_play_stream=yes"
13313 else
13314   echo "configure: failed program was:" >&5
13315   cat conftest.$ac_ext >&5
13316   rm -rf conftest*
13317   eval "ac_cv_func_esd_play_stream=no"
13318 fi
13319 rm -f conftest*
13320
13321 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13322   echo "$ac_t""yes" 1>&6
13323   have_esd_sound=yes
13324 else
13325   echo "$ac_t""no" 1>&6
13326 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13327 fi
13328
13329   fi
13330
13331   if test "$have_esd_sound" = "yes"; then
13332     with_esd_sound=yes
13333     need_miscplay=yes
13334     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13335    echo "    xemacs will be linked with \"esd.o\""
13336  fi
13337     { test "$extra_verbose" = "yes" && cat << \EOF
13338     Defining HAVE_ESD_SOUND
13339 EOF
13340 cat >> confdefs.h <<\EOF
13341 #define HAVE_ESD_SOUND 1
13342 EOF
13343 }
13344
13345   else
13346     test "$with_esd_sound" = "yes" && \
13347       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13348     with_esd_sound=no
13349   fi
13350 fi
13351
13352 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13353    echo "    xemacs will be linked with \"miscplay.o\""
13354  fi
13355
13356
13357 test -z "$with_tty" && with_tty=yes
13358
13359 if test "$with_tty" = "yes"  ; then
13360   echo "checking for TTY-related features" 1>&6
13361 echo "configure:13362: checking for TTY-related features" >&5
13362   { test "$extra_verbose" = "yes" && cat << \EOF
13363     Defining HAVE_TTY
13364 EOF
13365 cat >> confdefs.h <<\EOF
13366 #define HAVE_TTY 1
13367 EOF
13368 }
13369
13370   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
13371    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\""
13372  fi
13373
13374     if test -z "$with_ncurses"; then
13375     
13376 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13377 echo "configure:13378: checking for tgetent in -lncurses" >&5
13378 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13379
13380 xe_check_libs=" -lncurses "
13381 cat > conftest.$ac_ext <<EOF
13382 #line 13383 "configure"
13383 #include "confdefs.h"
13384 /* Override any gcc2 internal prototype to avoid an error.  */
13385 /* We use char because int might match the return type of a gcc2
13386     builtin and then its argument prototype would still apply.  */
13387 char tgetent();
13388
13389 int main() {
13390 tgetent()
13391 ; return 0; }
13392 EOF
13393 if { (eval echo configure:13394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13394   rm -rf conftest*
13395   eval "ac_cv_lib_$ac_lib_var=yes"
13396 else
13397   echo "configure: failed program was:" >&5
13398   cat conftest.$ac_ext >&5
13399   rm -rf conftest*
13400   eval "ac_cv_lib_$ac_lib_var=no"
13401 fi
13402 rm -f conftest*
13403 xe_check_libs=""
13404
13405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13406   echo "$ac_t""yes" 1>&6
13407   with_ncurses=yes
13408 else
13409   echo "$ac_t""no" 1>&6
13410 with_ncurses=no
13411 fi
13412
13413
13414   fi
13415   if test "$with_ncurses" = "yes"; then
13416     { test "$extra_verbose" = "yes" && cat << \EOF
13417     Defining HAVE_NCURSES
13418 EOF
13419 cat >> confdefs.h <<\EOF
13420 #define HAVE_NCURSES 1
13421 EOF
13422 }
13423
13424     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13425 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13426 echo "configure:13427: checking for ncurses/curses.h" >&5
13427
13428 cat > conftest.$ac_ext <<EOF
13429 #line 13430 "configure"
13430 #include "confdefs.h"
13431 #include <ncurses/curses.h>
13432 EOF
13433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13434 { (eval echo configure:13435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13436 if test -z "$ac_err"; then
13437   rm -rf conftest*
13438   eval "ac_cv_header_$ac_safe=yes"
13439 else
13440   echo "$ac_err" >&5
13441   echo "configure: failed program was:" >&5
13442   cat conftest.$ac_ext >&5
13443   rm -rf conftest*
13444   eval "ac_cv_header_$ac_safe=no"
13445 fi
13446 rm -f conftest*
13447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13448   echo "$ac_t""yes" 1>&6
13449   curses_h_file=ncurses/curses.h
13450 else
13451   echo "$ac_t""no" 1>&6
13452 fi
13453
13454     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13455 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13456 echo "configure:13457: checking for ncurses/term.h" >&5
13457
13458 cat > conftest.$ac_ext <<EOF
13459 #line 13460 "configure"
13460 #include "confdefs.h"
13461 #include <ncurses/term.h>
13462 EOF
13463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13464 { (eval echo configure:13465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13466 if test -z "$ac_err"; then
13467   rm -rf conftest*
13468   eval "ac_cv_header_$ac_safe=yes"
13469 else
13470   echo "$ac_err" >&5
13471   echo "configure: failed program was:" >&5
13472   cat conftest.$ac_ext >&5
13473   rm -rf conftest*
13474   eval "ac_cv_header_$ac_safe=no"
13475 fi
13476 rm -f conftest*
13477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13478   echo "$ac_t""yes" 1>&6
13479   term_h_file=ncurses/term.h
13480 else
13481   echo "$ac_t""no" 1>&6
13482 fi
13483
13484     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13485    echo "    xemacs will be linked with \"terminfo.o\""
13486  fi
13487     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13488
13489     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13490                         save_c_switch_site="$c_switch_site"
13491       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13492       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13493 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13494 echo "configure:13495: checking for ncurses/curses.h" >&5
13495
13496 cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 #include <ncurses/curses.h>
13500 EOF
13501 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13502 { (eval echo configure:13503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13503 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13504 if test -z "$ac_err"; then
13505   rm -rf conftest*
13506   eval "ac_cv_header_$ac_safe=yes"
13507 else
13508   echo "$ac_err" >&5
13509   echo "configure: failed program was:" >&5
13510   cat conftest.$ac_ext >&5
13511   rm -rf conftest*
13512   eval "ac_cv_header_$ac_safe=no"
13513 fi
13514 rm -f conftest*
13515 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13516   echo "$ac_t""yes" 1>&6
13517   curses_h_file=ncurses/curses.h
13518 else
13519   echo "$ac_t""no" 1>&6
13520 fi
13521
13522       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13523         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13524         else c_switch_site="$save_c_switch_site"
13525       fi
13526     fi
13527   else         if test "$have_terminfo" = "yes"; then
13528       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13529    echo "    xemacs will be linked with \"terminfo.o\""
13530  fi
13531       if test -n "$libs_termcap"; then
13532         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13533       else
13534         for lib in curses termlib termcap; do
13535           
13536 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13537 echo "configure:13538: checking for tgetent in -l$lib" >&5
13538 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13539
13540 xe_check_libs=" -l$lib "
13541 cat > conftest.$ac_ext <<EOF
13542 #line 13543 "configure"
13543 #include "confdefs.h"
13544 /* Override any gcc2 internal prototype to avoid an error.  */
13545 /* We use char because int might match the return type of a gcc2
13546     builtin and then its argument prototype would still apply.  */
13547 char tgetent();
13548
13549 int main() {
13550 tgetent()
13551 ; return 0; }
13552 EOF
13553 if { (eval echo configure:13554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13554   rm -rf conftest*
13555   eval "ac_cv_lib_$ac_lib_var=yes"
13556 else
13557   echo "configure: failed program was:" >&5
13558   cat conftest.$ac_ext >&5
13559   rm -rf conftest*
13560   eval "ac_cv_lib_$ac_lib_var=no"
13561 fi
13562 rm -f conftest*
13563 xe_check_libs=""
13564
13565 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13566   echo "$ac_t""yes" 1>&6
13567   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13568 else
13569   echo "$ac_t""no" 1>&6
13570 fi
13571
13572
13573         done
13574       fi
13575     else       if test -n "$libs_termcap" -a "$opsys" = "openbsd"; then
13576                                 
13577 echo $ac_n "checking for tgoto in -ltermcap""... $ac_c" 1>&6
13578 echo "configure:13579: checking for tgoto in -ltermcap" >&5
13579 ac_lib_var=`echo termcap'_'tgoto | sed 'y%./+-%__p_%'`
13580
13581 xe_check_libs=" -ltermcap "
13582 cat > conftest.$ac_ext <<EOF
13583 #line 13584 "configure"
13584 #include "confdefs.h"
13585 /* Override any gcc2 internal prototype to avoid an error.  */
13586 /* We use char because int might match the return type of a gcc2
13587     builtin and then its argument prototype would still apply.  */
13588 char tgoto();
13589
13590 int main() {
13591 tgoto()
13592 ; return 0; }
13593 EOF
13594 if { (eval echo configure:13595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13595   rm -rf conftest*
13596   eval "ac_cv_lib_$ac_lib_var=yes"
13597 else
13598   echo "configure: failed program was:" >&5
13599   cat conftest.$ac_ext >&5
13600   rm -rf conftest*
13601   eval "ac_cv_lib_$ac_lib_var=no"
13602 fi
13603 rm -f conftest*
13604 xe_check_libs=""
13605
13606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13607   echo "$ac_t""yes" 1>&6
13608     ac_tr_lib=HAVE_LIB`echo termcap | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13609     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13610   { test "$extra_verbose" = "yes" && cat << EOF
13611     Defining $ac_tr_lib
13612 EOF
13613 cat >> confdefs.h <<EOF
13614 #define $ac_tr_lib 1
13615 EOF
13616 }
13617
13618   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13619
13620 else
13621   echo "$ac_t""no" 1>&6
13622 extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13623    echo "    xemacs will be linked with \"tparam.o\""
13624  fi
13625 fi
13626
13627
13628       else
13629         extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13630    echo "    xemacs will be linked with \"tparam.o\""
13631  fi
13632       fi
13633                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13634       if test -n "$libs_termcap"; then
13635         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13636       else
13637         
13638 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13639 echo "configure:13640: checking for tgetent in -lcurses" >&5
13640 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13641
13642 xe_check_libs=" -lcurses "
13643 cat > conftest.$ac_ext <<EOF
13644 #line 13645 "configure"
13645 #include "confdefs.h"
13646 /* Override any gcc2 internal prototype to avoid an error.  */
13647 /* We use char because int might match the return type of a gcc2
13648     builtin and then its argument prototype would still apply.  */
13649 char tgetent();
13650
13651 int main() {
13652 tgetent()
13653 ; return 0; }
13654 EOF
13655 if { (eval echo configure:13656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13656   rm -rf conftest*
13657   eval "ac_cv_lib_$ac_lib_var=yes"
13658 else
13659   echo "configure: failed program was:" >&5
13660   cat conftest.$ac_ext >&5
13661   rm -rf conftest*
13662   eval "ac_cv_lib_$ac_lib_var=no"
13663 fi
13664 rm -f conftest*
13665 xe_check_libs=""
13666
13667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13668   echo "$ac_t""yes" 1>&6
13669   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13670 else
13671   echo "$ac_t""no" 1>&6
13672 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13673 echo "configure:13674: checking for tgetent in -ltermcap" >&5
13674 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13675
13676 xe_check_libs=" -ltermcap "
13677 cat > conftest.$ac_ext <<EOF
13678 #line 13679 "configure"
13679 #include "confdefs.h"
13680 /* Override any gcc2 internal prototype to avoid an error.  */
13681 /* We use char because int might match the return type of a gcc2
13682     builtin and then its argument prototype would still apply.  */
13683 char tgetent();
13684
13685 int main() {
13686 tgetent()
13687 ; return 0; }
13688 EOF
13689 if { (eval echo configure:13690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13690   rm -rf conftest*
13691   eval "ac_cv_lib_$ac_lib_var=yes"
13692 else
13693   echo "configure: failed program was:" >&5
13694   cat conftest.$ac_ext >&5
13695   rm -rf conftest*
13696   eval "ac_cv_lib_$ac_lib_var=no"
13697 fi
13698 rm -f conftest*
13699 xe_check_libs=""
13700
13701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13702   echo "$ac_t""yes" 1>&6
13703   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13704 else
13705   echo "$ac_t""no" 1>&6
13706 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13707    echo "    xemacs will be linked with \"termcap.o\""
13708  fi
13709 fi
13710
13711
13712 fi
13713
13714
13715       fi
13716     fi
13717   fi
13718   { test "$extra_verbose" = "yes" && cat << EOF
13719     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13720 EOF
13721 cat >> confdefs.h <<EOF
13722 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13723 EOF
13724 }
13725
13726   { test "$extra_verbose" = "yes" && cat << EOF
13727     Defining TERM_H_FILE = "${term_h_file-term.h}"
13728 EOF
13729 cat >> confdefs.h <<EOF
13730 #define TERM_H_FILE "${term_h_file-term.h}"
13731 EOF
13732 }
13733
13734
13735     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13736 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13737 echo "configure:13738: checking for gpm.h" >&5
13738
13739 cat > conftest.$ac_ext <<EOF
13740 #line 13741 "configure"
13741 #include "confdefs.h"
13742 #include <gpm.h>
13743 EOF
13744 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13745 { (eval echo configure:13746: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13746 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13747 if test -z "$ac_err"; then
13748   rm -rf conftest*
13749   eval "ac_cv_header_$ac_safe=yes"
13750 else
13751   echo "$ac_err" >&5
13752   echo "configure: failed program was:" >&5
13753   cat conftest.$ac_ext >&5
13754   rm -rf conftest*
13755   eval "ac_cv_header_$ac_safe=no"
13756 fi
13757 rm -f conftest*
13758 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13759   echo "$ac_t""yes" 1>&6
13760   :
13761 else
13762   echo "$ac_t""no" 1>&6
13763 with_gpm=no
13764 fi
13765  }
13766   test -z "$with_gpm" && { 
13767 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13768 echo "configure:13769: checking for Gpm_Open in -lgpm" >&5
13769 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13770
13771 xe_check_libs=" -lgpm "
13772 cat > conftest.$ac_ext <<EOF
13773 #line 13774 "configure"
13774 #include "confdefs.h"
13775 /* Override any gcc2 internal prototype to avoid an error.  */
13776 /* We use char because int might match the return type of a gcc2
13777     builtin and then its argument prototype would still apply.  */
13778 char Gpm_Open();
13779
13780 int main() {
13781 Gpm_Open()
13782 ; return 0; }
13783 EOF
13784 if { (eval echo configure:13785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13785   rm -rf conftest*
13786   eval "ac_cv_lib_$ac_lib_var=yes"
13787 else
13788   echo "configure: failed program was:" >&5
13789   cat conftest.$ac_ext >&5
13790   rm -rf conftest*
13791   eval "ac_cv_lib_$ac_lib_var=no"
13792 fi
13793 rm -f conftest*
13794 xe_check_libs=""
13795
13796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13797   echo "$ac_t""yes" 1>&6
13798   with_gpm=yes
13799 else
13800   echo "$ac_t""no" 1>&6
13801 with_gpm=no
13802 fi
13803
13804  }
13805   if test "$with_gpm" = "yes"; then
13806     { test "$extra_verbose" = "yes" && cat << \EOF
13807     Defining HAVE_GPM
13808 EOF
13809 cat >> confdefs.h <<\EOF
13810 #define HAVE_GPM 1
13811 EOF
13812 }
13813
13814     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13815    echo "    xemacs will be linked with \"gpmevent.o\""
13816  fi
13817     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13818   fi
13819
13820 else   for feature in ncurses gpm; do
13821     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13822       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13823     fi
13824     eval "with_${feature}=no"
13825   done
13826 fi 
13827 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
13828    echo "    xemacs will be linked with \"event-unixoid.o\""
13829  fi
13830
13831
13832 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13833   != "no no no" && echo "checking for database support" 1>&6
13834 echo "configure:13835: checking for database support" >&5
13835
13836 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13837   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13838 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13839 echo "configure:13840: checking for ndbm.h" >&5
13840
13841 cat > conftest.$ac_ext <<EOF
13842 #line 13843 "configure"
13843 #include "confdefs.h"
13844 #include <ndbm.h>
13845 EOF
13846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13847 { (eval echo configure:13848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13849 if test -z "$ac_err"; then
13850   rm -rf conftest*
13851   eval "ac_cv_header_$ac_safe=yes"
13852 else
13853   echo "$ac_err" >&5
13854   echo "configure: failed program was:" >&5
13855   cat conftest.$ac_ext >&5
13856   rm -rf conftest*
13857   eval "ac_cv_header_$ac_safe=no"
13858 fi
13859 rm -f conftest*
13860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13861   echo "$ac_t""yes" 1>&6
13862   :
13863 else
13864   echo "$ac_t""no" 1>&6
13865
13866     test "$with_database_gdbm" = "yes" -o \
13867          "$with_database_dbm"  = "yes" && \
13868       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13869     with_database_gdbm=no with_database_dbm=no
13870 fi
13871
13872 fi
13873
13874 if test "$with_database_gdbm" != "no"; then
13875   
13876 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13877 echo "configure:13878: checking for dbm_open in -lgdbm" >&5
13878 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13879
13880 xe_check_libs=" -lgdbm "
13881 cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884 /* Override any gcc2 internal prototype to avoid an error.  */
13885 /* We use char because int might match the return type of a gcc2
13886     builtin and then its argument prototype would still apply.  */
13887 char dbm_open();
13888
13889 int main() {
13890 dbm_open()
13891 ; return 0; }
13892 EOF
13893 if { (eval echo configure:13894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13894   rm -rf conftest*
13895   eval "ac_cv_lib_$ac_lib_var=yes"
13896 else
13897   echo "configure: failed program was:" >&5
13898   cat conftest.$ac_ext >&5
13899   rm -rf conftest*
13900   eval "ac_cv_lib_$ac_lib_var=no"
13901 fi
13902 rm -f conftest*
13903 xe_check_libs=""
13904
13905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13906   echo "$ac_t""yes" 1>&6
13907   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13908 else
13909   echo "$ac_t""no" 1>&6
13910 if test "$with_database_gdbm" = "yes"; then
13911      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13912    fi
13913    with_database_gdbm=no
13914 fi
13915
13916
13917 fi
13918
13919 if test "$with_database_dbm" != "no"; then
13920   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13921 echo "configure:13922: checking for dbm_open" >&5
13922
13923 cat > conftest.$ac_ext <<EOF
13924 #line 13925 "configure"
13925 #include "confdefs.h"
13926 /* System header to define __stub macros and hopefully few prototypes,
13927     which can conflict with char dbm_open(); below.  */
13928 #include <assert.h>
13929 /* Override any gcc2 internal prototype to avoid an error.  */
13930 /* We use char because int might match the return type of a gcc2
13931     builtin and then its argument prototype would still apply.  */
13932 char dbm_open();
13933
13934 int main() {
13935
13936 /* The GNU C library defines this for functions which it implements
13937     to always fail with ENOSYS.  Some functions are actually named
13938     something starting with __ and the normal name is an alias.  */
13939 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13940 choke me
13941 #else
13942 dbm_open();
13943 #endif
13944
13945 ; return 0; }
13946 EOF
13947 if { (eval echo configure:13948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13948   rm -rf conftest*
13949   eval "ac_cv_func_dbm_open=yes"
13950 else
13951   echo "configure: failed program was:" >&5
13952   cat conftest.$ac_ext >&5
13953   rm -rf conftest*
13954   eval "ac_cv_func_dbm_open=no"
13955 fi
13956 rm -f conftest*
13957
13958 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13959   echo "$ac_t""yes" 1>&6
13960   with_database_dbm=yes libdbm=
13961 else
13962   echo "$ac_t""no" 1>&6
13963
13964     
13965 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13966 echo "configure:13967: checking for dbm_open in -ldbm" >&5
13967 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13968
13969 xe_check_libs=" -ldbm "
13970 cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 /* Override any gcc2 internal prototype to avoid an error.  */
13974 /* We use char because int might match the return type of a gcc2
13975     builtin and then its argument prototype would still apply.  */
13976 char dbm_open();
13977
13978 int main() {
13979 dbm_open()
13980 ; return 0; }
13981 EOF
13982 if { (eval echo configure:13983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13983   rm -rf conftest*
13984   eval "ac_cv_lib_$ac_lib_var=yes"
13985 else
13986   echo "configure: failed program was:" >&5
13987   cat conftest.$ac_ext >&5
13988   rm -rf conftest*
13989   eval "ac_cv_lib_$ac_lib_var=no"
13990 fi
13991 rm -f conftest*
13992 xe_check_libs=""
13993
13994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13995   echo "$ac_t""yes" 1>&6
13996   with_database_dbm=yes libdbm=-ldbm
13997 else
13998   echo "$ac_t""no" 1>&6
13999 test "$with_database_dbm" = "yes" && \
14000         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
14001       with_database_dbm=no
14002 fi
14003
14004
14005 fi
14006
14007 fi
14008
14009 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
14010 test "$with_database_gdbm" = "yes" -o \
14011      "$with_database_dbm"  = "yes" && \
14012   { test "$extra_verbose" = "yes" && cat << \EOF
14013     Defining HAVE_DBM
14014 EOF
14015 cat >> confdefs.h <<\EOF
14016 #define HAVE_DBM 1
14017 EOF
14018 }
14019
14020
14021 if test "$with_database_berkdb" != "no"; then
14022   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
14023 echo "configure:14024: checking for Berkeley db.h" >&5
14024   for header in "db/db.h" "db.h"; do
14025     cat > conftest.$ac_ext <<EOF
14026 #line 14027 "configure"
14027 #include "confdefs.h"
14028
14029 #include <stdlib.h>
14030 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
14031 #ifdef HAVE_INTTYPES_H
14032 #define __BIT_TYPES_DEFINED__
14033 #include <inttypes.h>
14034 typedef uint8_t  u_int8_t;
14035 typedef uint16_t u_int16_t;
14036 typedef uint32_t u_int32_t;
14037 #ifdef WE_DONT_NEED_QUADS
14038 typedef uint64_t u_int64_t;
14039 #endif
14040 #endif
14041 #endif
14042 #include <$header>
14043
14044 int main() {
14045
14046 ; return 0; }
14047 EOF
14048 if { (eval echo configure:14049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14049   rm -rf conftest*
14050   db_h_file="$header"; break
14051 else
14052   echo "configure: failed program was:" >&5
14053   cat conftest.$ac_ext >&5
14054 fi
14055 rm -f conftest*
14056   done
14057   if test -z "$db_h_file"
14058   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
14059   else echo "$ac_t""$db_h_file" 1>&6
14060   fi
14061
14062   if test "$with_database_berkdb" != "no"; then
14063     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
14064 echo "configure:14065: checking for Berkeley DB version" >&5
14065     cat > conftest.$ac_ext <<EOF
14066 #line 14067 "configure"
14067 #include "confdefs.h"
14068 #include <$db_h_file>
14069 #if DB_VERSION_MAJOR > 1
14070 yes
14071 #endif
14072
14073 EOF
14074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14075   egrep "yes" >/dev/null 2>&1; then
14076   rm -rf conftest*
14077   cat > conftest.$ac_ext <<EOF
14078 #line 14079 "configure"
14079 #include "confdefs.h"
14080 #include <$db_h_file>
14081 #if DB_VERSION_MAJOR > 2
14082 yes
14083 #endif
14084
14085 EOF
14086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14087   egrep "yes" >/dev/null 2>&1; then
14088   rm -rf conftest*
14089   echo "$ac_t""3" 1>&6; dbfunc=db_create
14090 else
14091   rm -rf conftest*
14092   
14093     echo "$ac_t""2" 1>&6; dbfunc=db_open
14094 fi
14095 rm -f conftest*
14096
14097 else
14098   rm -rf conftest*
14099   
14100     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14101 fi
14102 rm -f conftest*
14103
14104     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14105 echo "configure:14106: checking for $dbfunc" >&5
14106
14107 cat > conftest.$ac_ext <<EOF
14108 #line 14109 "configure"
14109 #include "confdefs.h"
14110 /* System header to define __stub macros and hopefully few prototypes,
14111     which can conflict with char $dbfunc(); below.  */
14112 #include <assert.h>
14113 /* Override any gcc2 internal prototype to avoid an error.  */
14114 /* We use char because int might match the return type of a gcc2
14115     builtin and then its argument prototype would still apply.  */
14116 char $dbfunc();
14117
14118 int main() {
14119
14120 /* The GNU C library defines this for functions which it implements
14121     to always fail with ENOSYS.  Some functions are actually named
14122     something starting with __ and the normal name is an alias.  */
14123 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14124 choke me
14125 #else
14126 $dbfunc();
14127 #endif
14128
14129 ; return 0; }
14130 EOF
14131 if { (eval echo configure:14132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14132   rm -rf conftest*
14133   eval "ac_cv_func_$dbfunc=yes"
14134 else
14135   echo "configure: failed program was:" >&5
14136   cat conftest.$ac_ext >&5
14137   rm -rf conftest*
14138   eval "ac_cv_func_$dbfunc=no"
14139 fi
14140 rm -f conftest*
14141
14142 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14143   echo "$ac_t""yes" 1>&6
14144   with_database_berkdb=yes need_libdb=no
14145 else
14146   echo "$ac_t""no" 1>&6
14147
14148     
14149 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14150 echo "configure:14151: checking for $dbfunc in -ldb" >&5
14151 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14152
14153 xe_check_libs=" -ldb "
14154 cat > conftest.$ac_ext <<EOF
14155 #line 14156 "configure"
14156 #include "confdefs.h"
14157 /* Override any gcc2 internal prototype to avoid an error.  */
14158 /* We use char because int might match the return type of a gcc2
14159     builtin and then its argument prototype would still apply.  */
14160 char $dbfunc();
14161
14162 int main() {
14163 $dbfunc()
14164 ; return 0; }
14165 EOF
14166 if { (eval echo configure:14167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14167   rm -rf conftest*
14168   eval "ac_cv_lib_$ac_lib_var=yes"
14169 else
14170   echo "configure: failed program was:" >&5
14171   cat conftest.$ac_ext >&5
14172   rm -rf conftest*
14173   eval "ac_cv_lib_$ac_lib_var=no"
14174 fi
14175 rm -f conftest*
14176 xe_check_libs=""
14177
14178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14179   echo "$ac_t""yes" 1>&6
14180   with_database_berkdb=yes need_libdb=yes
14181 else
14182   echo "$ac_t""no" 1>&6
14183 fi
14184
14185
14186 fi
14187
14188   fi
14189
14190   if test "$with_database_berkdb" = "yes"; then
14191     { test "$extra_verbose" = "yes" && cat << EOF
14192     Defining DB_H_FILE = "$db_h_file"
14193 EOF
14194 cat >> confdefs.h <<EOF
14195 #define DB_H_FILE "$db_h_file"
14196 EOF
14197 }
14198
14199     { test "$extra_verbose" = "yes" && cat << \EOF
14200     Defining HAVE_BERKELEY_DB
14201 EOF
14202 cat >> confdefs.h <<\EOF
14203 #define HAVE_BERKELEY_DB 1
14204 EOF
14205 }
14206
14207     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14208   else with_database_berkdb=no
14209   fi
14210 fi
14211
14212 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14213      != "no no no"; then
14214   { test "$extra_verbose" = "yes" && cat << \EOF
14215     Defining HAVE_DATABASE
14216 EOF
14217 cat >> confdefs.h <<\EOF
14218 #define HAVE_DATABASE 1
14219 EOF
14220 }
14221
14222   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14223    echo "    xemacs will be linked with \"database.o\""
14224  fi
14225 fi
14226
14227 if test "$with_socks" = "yes"; then
14228   
14229 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14230 echo "configure:14231: checking for SOCKSinit in -lsocks" >&5
14231 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14232
14233 xe_check_libs=" -lsocks "
14234 cat > conftest.$ac_ext <<EOF
14235 #line 14236 "configure"
14236 #include "confdefs.h"
14237 /* Override any gcc2 internal prototype to avoid an error.  */
14238 /* We use char because int might match the return type of a gcc2
14239     builtin and then its argument prototype would still apply.  */
14240 char SOCKSinit();
14241
14242 int main() {
14243 SOCKSinit()
14244 ; return 0; }
14245 EOF
14246 if { (eval echo configure:14247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14247   rm -rf conftest*
14248   eval "ac_cv_lib_$ac_lib_var=yes"
14249 else
14250   echo "configure: failed program was:" >&5
14251   cat conftest.$ac_ext >&5
14252   rm -rf conftest*
14253   eval "ac_cv_lib_$ac_lib_var=no"
14254 fi
14255 rm -f conftest*
14256 xe_check_libs=""
14257
14258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14259   echo "$ac_t""yes" 1>&6
14260     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14261     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14262   { test "$extra_verbose" = "yes" && cat << EOF
14263     Defining $ac_tr_lib
14264 EOF
14265 cat >> confdefs.h <<EOF
14266 #define $ac_tr_lib 1
14267 EOF
14268 }
14269
14270   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14271
14272 else
14273   echo "$ac_t""no" 1>&6
14274 fi
14275
14276
14277   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14278     Defining HAVE_SOCKS
14279 EOF
14280 cat >> confdefs.h <<\EOF
14281 #define HAVE_SOCKS 1
14282 EOF
14283 }
14284
14285 fi
14286
14287 if test "$usage_tracking" = "yes"; then
14288   { test "$extra_verbose" = "yes" && cat << \EOF
14289     Defining USAGE_TRACKING
14290 EOF
14291 cat >> confdefs.h <<\EOF
14292 #define USAGE_TRACKING 1
14293 EOF
14294 }
14295
14296   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14297 fi
14298
14299 if test "$with_modules" != "no"; then
14300   echo "checking for module support" 1>&6
14301 echo "configure:14302: checking for module support" >&5
14302
14303     if test "$with_msw" = "yes"; then
14304     have_dl=yes;
14305   else
14306         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14307 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14308 echo "configure:14309: checking for dlfcn.h" >&5
14309
14310 cat > conftest.$ac_ext <<EOF
14311 #line 14312 "configure"
14312 #include "confdefs.h"
14313 #include <dlfcn.h>
14314 EOF
14315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14316 { (eval echo configure:14317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14318 if test -z "$ac_err"; then
14319   rm -rf conftest*
14320   eval "ac_cv_header_$ac_safe=yes"
14321 else
14322   echo "$ac_err" >&5
14323   echo "configure: failed program was:" >&5
14324   cat conftest.$ac_ext >&5
14325   rm -rf conftest*
14326   eval "ac_cv_header_$ac_safe=no"
14327 fi
14328 rm -f conftest*
14329 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14330   echo "$ac_t""yes" 1>&6
14331   
14332       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14333 echo "configure:14334: checking for dlopen in -lc" >&5
14334       cat > conftest.$ac_ext <<EOF
14335 #line 14336 "configure"
14336 #include "confdefs.h"
14337 #include <dlfcn.h>
14338 int main() {
14339         dlopen ("", 0);
14340 ; return 0; }
14341 EOF
14342 if { (eval echo configure:14343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14343   rm -rf conftest*
14344    have_dl=yes 
14345 else
14346   echo "configure: failed program was:" >&5
14347   cat conftest.$ac_ext >&5
14348   rm -rf conftest*
14349   
14350       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14351 echo "configure:14352: checking for dlopen in -ldl" >&5
14352       ac_save_LIBS="$LIBS"
14353       LIBS="-ldl $LIBS"
14354       cat > conftest.$ac_ext <<EOF
14355 #line 14356 "configure"
14356 #include "confdefs.h"
14357 #include <dlfcn.h>
14358 int main() {
14359         dlopen ("", 0);
14360 ; return 0; }
14361 EOF
14362 if { (eval echo configure:14363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14363   rm -rf conftest*
14364    have_dl=yes 
14365 else
14366   echo "configure: failed program was:" >&5
14367   cat conftest.$ac_ext >&5
14368   rm -rf conftest*
14369   LIBS="$ac_save_LIBS"
14370 fi
14371 rm -f conftest*
14372       ac_save_LIBS=
14373 fi
14374 rm -f conftest*
14375 else
14376   echo "$ac_t""no" 1>&6
14377 fi
14378
14379     if test -n "$have_dl"; then
14380       { test "$extra_verbose" = "yes" && cat << \EOF
14381     Defining HAVE_DLOPEN
14382 EOF
14383 cat >> confdefs.h <<\EOF
14384 #define HAVE_DLOPEN 1
14385 EOF
14386 }
14387
14388     else
14389       
14390 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14391 echo "configure:14392: checking for shl_load in -ldld" >&5
14392 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14393
14394 xe_check_libs=" -ldld "
14395 cat > conftest.$ac_ext <<EOF
14396 #line 14397 "configure"
14397 #include "confdefs.h"
14398 /* Override any gcc2 internal prototype to avoid an error.  */
14399 /* We use char because int might match the return type of a gcc2
14400     builtin and then its argument prototype would still apply.  */
14401 char shl_load();
14402
14403 int main() {
14404 shl_load()
14405 ; return 0; }
14406 EOF
14407 if { (eval echo configure:14408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14408   rm -rf conftest*
14409   eval "ac_cv_lib_$ac_lib_var=yes"
14410 else
14411   echo "configure: failed program was:" >&5
14412   cat conftest.$ac_ext >&5
14413   rm -rf conftest*
14414   eval "ac_cv_lib_$ac_lib_var=no"
14415 fi
14416 rm -f conftest*
14417 xe_check_libs=""
14418
14419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14420   echo "$ac_t""yes" 1>&6
14421   libdl=dld have_dl=yes;
14422         { test "$extra_verbose" = "yes" && cat << \EOF
14423     Defining HAVE_SHL_LOAD
14424 EOF
14425 cat >> confdefs.h <<\EOF
14426 #define HAVE_SHL_LOAD 1
14427 EOF
14428 }
14429
14430 else
14431   echo "$ac_t""no" 1>&6
14432
14433 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14434 echo "configure:14435: checking for dld_init in -ldld" >&5
14435 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14436
14437 xe_check_libs=" -ldld "
14438 cat > conftest.$ac_ext <<EOF
14439 #line 14440 "configure"
14440 #include "confdefs.h"
14441 /* Override any gcc2 internal prototype to avoid an error.  */
14442 /* We use char because int might match the return type of a gcc2
14443     builtin and then its argument prototype would still apply.  */
14444 char dld_init();
14445
14446 int main() {
14447 dld_init()
14448 ; return 0; }
14449 EOF
14450 if { (eval echo configure:14451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14451   rm -rf conftest*
14452   eval "ac_cv_lib_$ac_lib_var=yes"
14453 else
14454   echo "configure: failed program was:" >&5
14455   cat conftest.$ac_ext >&5
14456   rm -rf conftest*
14457   eval "ac_cv_lib_$ac_lib_var=no"
14458 fi
14459 rm -f conftest*
14460 xe_check_libs=""
14461
14462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14463   echo "$ac_t""yes" 1>&6
14464   libdl=dld have_dl=yes;
14465         { test "$extra_verbose" = "yes" && cat << \EOF
14466     Defining HAVE_DLD_INIT
14467 EOF
14468 cat >> confdefs.h <<\EOF
14469 #define HAVE_DLD_INIT 1
14470 EOF
14471 }
14472
14473 else
14474   echo "$ac_t""no" 1>&6
14475 fi
14476
14477
14478 fi
14479
14480
14481     fi
14482   fi 
14483   if test -n "$have_dl"; then
14484         
14485 dll_ld=
14486 dll_ldflags=
14487 dll_cflags=
14488 dll_post=
14489 dll_ldo="-o"
14490 ld_dynamic_link_flags=
14491 xehost=$canonical
14492 xealias=$internal_configuration
14493
14494 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14495 echo "configure:14496: checking how to build dynamic libraries for ${xehost}" >&5
14496 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14497 case "$xehost" in
14498 *-*-linux-gnu*) ;;
14499 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14500 esac
14501
14502 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14503 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14504 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14505
14506 case "$xehost_os" in
14507 aix3*)
14508   # AIX sometimes has problems with the GCC collect2 program.  For some
14509   # reason, if we set the COLLECT_NAMES environment variable, the problems
14510   # vanish in a puff of smoke.
14511   if test "${COLLECT_NAMES+set}" != set; then
14512     COLLECT_NAMES=
14513     export COLLECT_NAMES
14514   fi
14515   ;;
14516 esac
14517
14518 # Now see if the compiler is really GCC.
14519 if test "$GCC" = "yes"; then
14520   XEGCC=yes
14521 else
14522   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14523 echo "configure:14524: checking checking whether we are using GNU C" >&5
14524   cat > conftest.$ac_ext <<EOF
14525 #line 14526 "configure"
14526 #include "confdefs.h"
14527
14528 #ifdef __GNUC__
14529   yes;
14530 #endif
14531
14532 EOF
14533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14534   egrep "yes" >/dev/null 2>&1; then
14535   rm -rf conftest*
14536   XEGCC=yes
14537 else
14538   rm -rf conftest*
14539   XEGCC=no
14540 fi
14541 rm -f conftest*
14542
14543   echo "$ac_t""${XEGCC}" 1>&6
14544 fi
14545
14546 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14547 echo "configure:14548: checking how to produce PIC code" >&5
14548 wl=
14549
14550 can_build_shared=yes
14551 if test "$XEGCC" = yes; then
14552   wl='-Wl,'
14553
14554   case "$xehost_os" in
14555   aix[3-9]* | irix[5-9]* | osf[3-9])
14556     # PIC is the default for these OSes.
14557     ;;
14558
14559   os2*)
14560     # We can build DLLs from non-PIC.
14561     ;;
14562   amigaos*)
14563     # FIXME: we need at least 68020 code to build shared libraries, but
14564     # adding the `-m68020' flag to GCC prevents building anything better,
14565     # like `-m68040'.
14566     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14567     ;;
14568   *cygwin* | *mingw* )
14569     # PIC is the default
14570     ;;
14571   *)
14572     dll_cflags='-fPIC'
14573     ;;
14574   esac
14575 else
14576   # PORTME Check for PIC flags for the system compiler.
14577   case "$xehost_os" in
14578   hpux9* | hpux1[0-9]*)
14579     # Is there a better link_static_flag that works with the bundled CC?
14580     wl='-Wl,'
14581     dll_cflags='+Z'
14582     ;;
14583
14584   irix[5-9]*)
14585     wl='-Wl,'
14586     # PIC (with -KPIC) is the default.
14587     ;;
14588
14589   os2*)
14590     # We can build DLLs from non-PIC.
14591     ;;
14592
14593   osf[3-9]*)
14594     # All OSF/1 code is PIC.
14595     wl='-Wl,'
14596     ;;
14597
14598   aix[3-9]*)
14599     # All AIX code is PIC.
14600     wl='-Wl,'
14601     ;;
14602
14603   sco3.2v5*)
14604     dll_cflags='-belf -Kpic'
14605     wl='-Wl,'
14606     ;;
14607
14608   unixware*)
14609     dll_cflags="-KPIC"
14610     wl="-Wl,"
14611     ;;
14612
14613   sysv4*)
14614     dll_cflags="-KPIC"
14615     wl="-Wl,"
14616     ;;
14617
14618   sysv5*)
14619     dll_cflags="-KPIC"
14620     wl="-Wl,"
14621     ;;
14622
14623   solaris2*)
14624     dll_cflags='-KPIC'
14625     wl='-Wl,'
14626     ;;
14627
14628   sunos4*)
14629     dll_cflags='-PIC'
14630     wl='-Qoption ld '
14631     ;;
14632
14633   uts4*)
14634     dll_cflags='-pic'
14635     ;;
14636
14637   *)
14638     can_build_shared=no
14639     ;;
14640   esac
14641 fi
14642
14643 if test -n "$dll_cflags"; then
14644   echo "$ac_t""${dll_cflags}" 1>&6
14645
14646   # Check to make sure the dll_cflags actually works.
14647   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14648 echo "configure:14649: checking if PIC flag ${dll_cflags} really works" >&5
14649   save_CFLAGS="$CFLAGS"
14650   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14651   cat > conftest.$ac_ext <<EOF
14652 #line 14653 "configure"
14653 #include "confdefs.h"
14654
14655 int main() {
14656 int x=0;
14657 ; return 0; }
14658 EOF
14659 if { (eval echo configure:14660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14660   rm -rf conftest*
14661   
14662     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14663     # reports no error.  So, we need to grep stderr for (Bundled).
14664     if grep '(Bundled)' config.log >/dev/null; then
14665       echo "$ac_t""no" 1>&6
14666       can_build_shared=no
14667       dll_cflags=
14668     else
14669       echo "$ac_t""yes" 1>&6
14670     fi
14671 else
14672   echo "configure: failed program was:" >&5
14673   cat conftest.$ac_ext >&5
14674   rm -rf conftest*
14675   echo "$ac_t""no" 1>&6
14676     can_build_shared=no
14677     dll_cflags=
14678 fi
14679 rm -f conftest*
14680   CFLAGS="$save_CFLAGS"
14681 else
14682   echo "$ac_t""none" 1>&6
14683 fi
14684
14685 if test "$can_build_shared" = "yes"; then
14686 cc_produces_so=no
14687 xldf=
14688 xcldf=
14689 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14690 echo "configure:14691: checking if C compiler can produce shared libraries" >&5
14691 if test "$XEGCC" = yes; then
14692   xcldf="-shared"
14693   xldf="-shared"
14694 else # Not using GCC
14695   case "$xehost_os" in
14696     aix[3-9]*)
14697       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14698       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14699       ;;
14700
14701     freebsd2* | netbsd* | openbsd*)
14702       xldf="-Bshareable"
14703       xcldf="${wl}-Bshareable"
14704       ;;
14705
14706     freebsd3*)
14707       xcldf="-shared"
14708       ;;
14709
14710     hpux*)
14711       xldf="-b +s"
14712       xcldf="${wl}-b ${wl}+s"
14713       ;;
14714
14715     irix[5-9]* | osf[3-9]*)
14716       xcldf="${wl}-shared"
14717       xldf="-shared"
14718       ;;
14719
14720     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14721       xcldf="-G"
14722       xldf="-G"
14723       ;;
14724
14725     sunos4*)
14726       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14727       xldf="-assert pure-text -Bstatic"
14728       ;;
14729   esac
14730 fi # End if if we are using gcc
14731
14732 if test -n "$xcldf"; then
14733   save_LDFLAGS=$LDFLAGS
14734   save_LIBS=$LIBS
14735   save_xe_libs=$xe_libs
14736   LDFLAGS="$xcldf $LDFLAGS"
14737   LIBS=
14738   xe_libs=
14739   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14740   cat > conftest.$ac_ext <<EOF
14741 #line 14742 "configure"
14742 #include "confdefs.h"
14743
14744 int main() {
14745 int x=0;
14746 ; return 0; }
14747 EOF
14748 if { (eval echo configure:14749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14749   rm -rf conftest*
14750   cc_produces_so=yes
14751 else
14752   echo "configure: failed program was:" >&5
14753   cat conftest.$ac_ext >&5
14754   rm -rf conftest*
14755   cc_produces_so=no
14756 fi
14757 rm -f conftest*
14758   LDFLAGS=$save_LDFLAGS
14759   LIBS=$save_LIBS
14760   xe_libs=$save_xe_libs
14761   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14762 else
14763   cc_produces_so=no
14764 fi
14765 echo "$ac_t""${cc_produces_so}" 1>&6
14766
14767 LTLD=$LD
14768 if test -z "$LTLD"; then
14769   ac_prog=ld
14770   if test "$XEGCC" = yes; then
14771     # Check if gcc -print-prog-name=ld gives a path.
14772     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14773 echo "configure:14774: checking for ld used by GCC" >&5
14774     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14775     case "$ac_prog" in
14776     # Accept absolute paths.
14777     /*)
14778       if test -z "$LTLD"; then
14779 #        case "$ac_prog" in
14780 #          *gcc-lib*) LTLD="$CC"
14781 #                     ;;
14782 #          *)
14783          LTLD="$ac_prog"
14784 #                     ;;
14785 #        esac
14786       fi
14787       ;;
14788     "")
14789       # If it fails, then pretend we aren't using GCC.
14790       ac_prog=ld
14791       ;;
14792     *)
14793       # If it is relative, then search for the first ld in PATH.
14794       with_gnu_ld=unknown
14795       ;;
14796     esac
14797   else
14798     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14799 echo "configure:14800: checking for GNU ld" >&5
14800   fi
14801
14802   if test -z "$LTLD"; then
14803     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14804     for ac_dir in $PATH; do
14805       test -z "$ac_dir" && ac_dir=.
14806       if test -f "$ac_dir/$ac_prog"; then
14807         LTLD="$ac_dir/$ac_prog"
14808         # Check to see if the program is GNU ld.  I'd rather use --version,
14809         # but apparently some GNU ld's only accept -v.
14810         # Break only if it was the GNU/non-GNU ld that we prefer.
14811         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14812           xe_gnu_ld=yes
14813         else
14814           xe_gnu_ld=no
14815         fi
14816       fi
14817     done
14818     IFS="$ac_save_ifs"
14819   fi
14820
14821   if test -n "$LTLD"; then
14822     echo "$ac_t""${LTLD}" 1>&6
14823   else
14824     echo "$ac_t""no" 1>&6
14825   fi
14826
14827   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14828     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14829     exit 1
14830   fi
14831 fi
14832
14833 ld_dynamic_link_flags=
14834
14835 # Check to see if it really is or isn't GNU ld.
14836 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14837 echo "configure:14838: checking if the linker is GNU ld" >&5
14838 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14839 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14840   xe_gnu_ld=yes
14841 else
14842   xe_gnu_ld=no
14843 fi
14844 echo "$ac_t""${xe_gnu_ld}" 1>&6
14845
14846 case "$xehost_os" in
14847   amigaos* | sunos4*)
14848     # On these operating systems, we should treat GNU ld like the system ld.
14849     gnu_ld_acts_native=yes
14850     ;;
14851   *)
14852     gnu_ld_acts_native=no
14853     ;;
14854 esac
14855
14856 if test "$cc_produces_so" = "yes"; then
14857   dll_ld=$CC
14858   dll_ldflags=$xcldf
14859   can_build_shared=yes
14860   ld_shlibs=yes
14861 else
14862   # OK - only NOW do we futz about with ld.
14863   # See if the linker supports building shared libraries.
14864   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14865 echo "configure:14866: checking whether the linker supports shared libraries" >&5
14866   dll_ld=$CC
14867   dll_ldflags=$LDFLAGS
14868   ld_shlibs=yes
14869   can_build_shared=yes
14870   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14871     # See if GNU ld supports shared libraries.
14872     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14873       dll_ld=$CC
14874       dll_ldflags="-shared"
14875       ld_shlibs=yes
14876     else
14877       ld_shlibs=no
14878     fi
14879   else
14880     # PORTME fill in a description of your system's linker (not GNU ld)
14881     case "$xehost_os" in
14882     aix3*)
14883       dll_ld=$LTLD
14884       dll_ldflags=$xldf
14885       ;;
14886
14887     aix[4-9]*)
14888       dll_ldflags=$xcldf
14889       ;;
14890
14891     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14892     # support.  Future versions do this automatically, but an explicit c++rt0.o
14893     # doesn't break anything, and helps significantly (at the cost of a little
14894     # extra space).
14895     freebsd2.2*)
14896       dll_ld=$LTLD
14897       dll_ldflags=$xldf
14898       dll_post="/usr/lib/c++rt0.o"
14899       ;;
14900
14901     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14902     freebsd2*)
14903       dll_ld=$LTLD
14904       dll_ldflags="-Bshareable"
14905       ;;
14906
14907     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14908     freebsd3*)
14909       dll_ldflags="-shared"
14910       ;;
14911
14912     hpux*)
14913       dll_ld=$LTLD
14914       dll_ldflags=$xldf
14915       ;;
14916
14917     irix[5-9]*)
14918       dll_ld=$LTLD
14919       dll_ldflags=$xldf
14920       ;;
14921
14922     netbsd*)
14923       # Tested with NetBSD 1.2 ld
14924       dll_ld=$LTLD
14925       dll_ldflags=$xldf
14926       ;;
14927
14928     openbsd*)
14929       dll_ld=$LTLD
14930       dll_ldflags=$xldf
14931       ;;
14932
14933     osf3* | osf4*)
14934       dll_ld=$LTLD
14935       dll_ldflags=$xldf
14936       ;;
14937
14938     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14939     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14940       dll_ld=$LTLD
14941       case "$dll_ld" in
14942         *gcc*) dll_ldflags="-shared"
14943                dll_ld=$CC
14944                ;;
14945         *)     dll_ldflags="-G"
14946                ;;
14947       esac
14948       ;;
14949
14950     sunos4*)
14951       if test "$XEGCC" = yes; then
14952         dll_ld=$CC
14953       else
14954         dll_ld=$LTLD
14955       fi
14956       dll_ldflags=$xldf
14957       ;;
14958
14959     uts4*)
14960       dll_ld=$LTLD
14961       dll_ldflags="-G"
14962       ;;
14963
14964     bsdi*)
14965       dll_ldflags="-r"
14966       dll_ld="shlicc2"
14967       ;;
14968
14969     *)
14970       ld_shlibs=no
14971       can_build_shared=no
14972       ;;
14973     esac
14974   fi
14975   echo "$ac_t""${ld_shlibs}" 1>&6
14976   if test "$ld_shlibs" = "no"; then
14977     can_build_shared=no
14978   fi
14979 fi # End of if cc_produces_so = no
14980
14981
14982 if test "$xe_gnu_ld" = yes; then
14983   if test "$ld_shlibs" = yes; then
14984     ld_dynamic_link_flags="${wl}-export-dynamic"
14985   fi
14986 fi
14987
14988 if test -z "$ld_dynamic_link_flags"; then
14989   case "$xehost_os" in
14990   aix[3-9]*)
14991     ld_dynamic_link_flags=
14992     ;;
14993
14994   freebsd2.2*)
14995     ld_dynamic_link_flags=
14996     ;;
14997
14998   freebsd2*)
14999     ld_dynamic_link_flags=
15000     ;;
15001
15002   freebsd3*)
15003     ld_dynamic_link_flags=
15004     ;;
15005
15006   hpux*)
15007     ld_dynamic_link_flags="${wl}-E"
15008     ;;
15009
15010   irix[5-9]*)
15011     ld_dynamic_link_flags=
15012     ;;
15013
15014   netbsd*)
15015     ld_dynamic_link_flags=
15016     ;;
15017
15018   openbsd*)
15019     ld_dynamic_link_flags=
15020     ;;
15021
15022   osf3* | osf4*)
15023     ld_dynamic_link_flags=
15024     ;;
15025
15026   solaris2* | solaris7*)
15027     ld_dynamic_link_flags=
15028     ;;
15029
15030   sco3.2v5* | unixware* | sysv5* | sysv4*)
15031     ld_dynamic_link_flags="${wl}-Bexport"
15032     ;;
15033
15034   sunos4*)
15035     ld_dynamic_link_flags=
15036     ;;
15037
15038   uts4*)
15039     ld_dynamic_link_flags=
15040     ;;
15041
15042   bsdi*)
15043     ld_dynamic_link_flags=
15044     ;;
15045
15046   esac
15047 fi # End of if -z ld_dynamic_link_flags
15048 fi # End of if test "$can_build_shared" = "yes"
15049
15050
15051
15052
15053
15054
15055
15056
15057   fi
15058
15059   if test "$can_build_shared" = "yes"; then
15060     { test "$extra_verbose" = "yes" && cat << \EOF
15061     Defining HAVE_SHLIB
15062 EOF
15063 cat >> confdefs.h <<\EOF
15064 #define HAVE_SHLIB 1
15065 EOF
15066 }
15067
15068     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
15069    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
15070  fi
15071     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
15072     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
15073     for ac_func in dlerror _dlerror
15074 do
15075 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15076 echo "configure:15077: checking for $ac_func" >&5
15077
15078 cat > conftest.$ac_ext <<EOF
15079 #line 15080 "configure"
15080 #include "confdefs.h"
15081 /* System header to define __stub macros and hopefully few prototypes,
15082     which can conflict with char $ac_func(); below.  */
15083 #include <assert.h>
15084 /* Override any gcc2 internal prototype to avoid an error.  */
15085 /* We use char because int might match the return type of a gcc2
15086     builtin and then its argument prototype would still apply.  */
15087 char $ac_func();
15088
15089 int main() {
15090
15091 /* The GNU C library defines this for functions which it implements
15092     to always fail with ENOSYS.  Some functions are actually named
15093     something starting with __ and the normal name is an alias.  */
15094 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15095 choke me
15096 #else
15097 $ac_func();
15098 #endif
15099
15100 ; return 0; }
15101 EOF
15102 if { (eval echo configure:15103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15103   rm -rf conftest*
15104   eval "ac_cv_func_$ac_func=yes"
15105 else
15106   echo "configure: failed program was:" >&5
15107   cat conftest.$ac_ext >&5
15108   rm -rf conftest*
15109   eval "ac_cv_func_$ac_func=no"
15110 fi
15111 rm -f conftest*
15112
15113 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15114   echo "$ac_t""yes" 1>&6
15115     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15116   { test "$extra_verbose" = "yes" && cat << EOF
15117     Defining $ac_tr_func
15118 EOF
15119 cat >> confdefs.h <<EOF
15120 #define $ac_tr_func 1
15121 EOF
15122 }
15123  
15124 else
15125   echo "$ac_t""no" 1>&6
15126 fi
15127 done
15128
15129     with_modules=yes
15130   else
15131     if test "$with_modules" = "yes"; then
15132       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15133     else
15134       echo "configure: warning: "Module support cannot be provided."" 1>&2
15135     fi
15136     with_modules=no
15137   fi
15138 fi
15139
15140 cat > conftest.$ac_ext <<EOF
15141 #line 15142 "configure"
15142 #include "confdefs.h"
15143 int main(int c,char *v[]){return 0;}
15144 EOF
15145 if { (eval echo configure:15146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15146 then
15147   :
15148 else
15149   conftest_rc="$?"
15150   echo "configure: failed program was:" >&5
15151   cat conftest.$ac_ext >&5
15152   rm -fr conftest*
15153   
15154   echo ""
15155   echo "*** PANIC *** The C compiler can no longer build working executables."
15156   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15157   echo "*** PANIC *** The most likely reason for this problem is that configure"
15158   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15159   echo "*** PANIC *** found at run time."
15160   echo "*** PANIC ***"
15161   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15162   echo "*** PANIC *** On other systems, try telling configure where to find the"
15163   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15164   echo "*** PANIC ***"
15165   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15166   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15167   echo "*** PANIC *** on your system.  Don't do that."
15168   exit 1
15169 fi
15170 rm -fr conftest*
15171
15172 if test "$win32_processes" = "yes"; then
15173   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15174    echo "    xemacs will be linked with \"process-nt.o\""
15175  fi
15176 else
15177   { test "$extra_verbose" = "yes" && cat << \EOF
15178     Defining HAVE_UNIX_PROCESSES
15179 EOF
15180 cat >> confdefs.h <<\EOF
15181 #define HAVE_UNIX_PROCESSES 1
15182 EOF
15183 }
15184
15185   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15186    echo "    xemacs will be linked with \"process-unix.o\""
15187  fi
15188 fi
15189
15190
15191
15192 T=""
15193 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15194 CFLAGS="$T"
15195
15196
15197 T=""
15198 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15199 extra_objs="$T"
15200
15201
15202 T=""
15203 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
15204 c_switch_general="$T"
15205
15206
15207 T=""
15208 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
15209 c_switch_window_system="$T"
15210
15211
15212 T=""
15213 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15214 c_switch_all="$T"
15215
15216
15217 T=""
15218 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
15219 ld_switch_general="$T"
15220
15221
15222 T=""
15223 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15224 ld_switch_window_system="$T"
15225
15226
15227 T=""
15228 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15229 ld_switch_all="$T"
15230
15231
15232 T=""
15233 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15234 ld_libs_general="$T"
15235
15236
15237 T=""
15238 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
15239 ld_libs_window_system="$T"
15240
15241
15242 T=""
15243 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15244 ld_libs_all="$T"
15245
15246
15247
15248 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15249 internal_makefile_list="Makefile.in"
15250 SUBDIR_MAKEFILES=''
15251 test -d lock || mkdir lock
15252 for dir in $MAKE_SUBDIR; do
15253   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15254         test -d "$d" || mkdir "$d"; cd "$d"
15255       done ) ;;
15256    * ) test -d "$dir" || mkdir "$dir" ;;
15257   esac
15258   
15259 T=""
15260 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15261 SUBDIR_MAKEFILES="$T"
15262
15263   
15264 T=""
15265 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15266 internal_makefile_list="$T"
15267
15268 done
15269
15270
15271
15272
15273 for dir in src/s src/m; do
15274   if test ! -d "$dir" ; then
15275     echo Making symbolic link to "$srcdir/$dir"
15276     ${LN_S} "$srcdir/$dir" "$dir"
15277   fi
15278 done
15279
15280 if test "$extra_verbose" = "yes"; then
15281   echo ""
15282   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
15283   echo ""
15284 fi
15285
15286
15287 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15288   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15289   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15290 fi
15291
15292 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15293   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15294   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15295 fi
15296
15297 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15298   test "$extra_verbose" = "yes" && echo "creating TAGS"
15299   echo "\f
15300 $srcdir/TAGS,include" > "TAGS"
15301 fi
15302
15303 if test "$__SUNPRO_C" = "yes"; then
15304   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15305   ( echo "# For use with Sun WorkShop's Source browser."
15306     echo "# See sbquery(1) and sbinit(4) for more information"
15307     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15308   ) > .sbinit
15309 fi
15310
15311 rm -f core
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332 PREFIX=$prefix
15333 while true; do
15334   case "$PREFIX" in
15335     *\$* ) eval "PREFIX=$PREFIX" ;;
15336     *) break ;;
15337   esac
15338 done
15339
15340
15341
15342
15343 EXEC_PREFIX=$exec_prefix
15344 while true; do
15345   case "$EXEC_PREFIX" in
15346     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15347     *) break ;;
15348   esac
15349 done
15350
15351
15352
15353
15354 INFODIR=$infodir
15355 while true; do
15356   case "$INFODIR" in
15357     *\$* ) eval "INFODIR=$INFODIR" ;;
15358     *) break ;;
15359   esac
15360 done
15361
15362
15363
15364
15365 INFOPATH=$infopath
15366 while true; do
15367   case "$INFOPATH" in
15368     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15369     *) break ;;
15370   esac
15371 done
15372
15373
15374
15375
15376 PACKAGE_PATH=$package_path
15377 while true; do
15378   case "$PACKAGE_PATH" in
15379     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15380     *) break ;;
15381   esac
15382 done
15383
15384
15385
15386
15387 LISPDIR=$lispdir
15388 while true; do
15389   case "$LISPDIR" in
15390     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15391     *) break ;;
15392   esac
15393 done
15394
15395
15396
15397
15398 MODULEDIR=$moduledir
15399 while true; do
15400   case "$MODULEDIR" in
15401     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15402     *) break ;;
15403   esac
15404 done
15405
15406
15407
15408
15409 SITELISPDIR=$sitelispdir
15410 while true; do
15411   case "$SITELISPDIR" in
15412     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15413     *) break ;;
15414   esac
15415 done
15416
15417
15418
15419
15420 SITEMODULEDIR=$sitemoduledir
15421 while true; do
15422   case "$SITEMODULEDIR" in
15423     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15424     *) break ;;
15425   esac
15426 done
15427
15428
15429
15430
15431 ETCDIR=$etcdir
15432 while true; do
15433   case "$ETCDIR" in
15434     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15435     *) break ;;
15436   esac
15437 done
15438
15439
15440
15441
15442 DOCDIR=$docdir
15443 while true; do
15444   case "$DOCDIR" in
15445     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15446     *) break ;;
15447   esac
15448 done
15449
15450
15451
15452
15453 ARCHLIBDIR=$archlibdir
15454 while true; do
15455   case "$ARCHLIBDIR" in
15456     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15457     *) break ;;
15458   esac
15459 done
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15481
15482
15483
15484
15485
15486
15487
15488 : ${XEMACS_CC:=$CC}
15489
15490
15491 if test "$with_prefix" = "yes"; then
15492   { test "$extra_verbose" = "yes" && cat << \EOF
15493     Defining PREFIX_USER_DEFINED
15494 EOF
15495 cat >> confdefs.h <<\EOF
15496 #define PREFIX_USER_DEFINED 1
15497 EOF
15498 }
15499
15500 fi
15501
15502 if test "$with_site_lisp" = "no"; then
15503   { test "$extra_verbose" = "yes" && cat << \EOF
15504     Defining INHIBIT_SITE_LISP
15505 EOF
15506 cat >> confdefs.h <<\EOF
15507 #define INHIBIT_SITE_LISP 1
15508 EOF
15509 }
15510
15511 fi
15512 if test "$with_site_modules" = "no"; then
15513   { test "$extra_verbose" = "yes" && cat << \EOF
15514     Defining INHIBIT_SITE_MODULES
15515 EOF
15516 cat >> confdefs.h <<\EOF
15517 #define INHIBIT_SITE_MODULES 1
15518 EOF
15519 }
15520
15521 fi
15522
15523
15524 T=""
15525 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15526 ac_configure_args="$T"
15527
15528 { test "$extra_verbose" = "yes" && cat << EOF
15529     Defining EMACS_CONFIGURATION = "$configuration"
15530 EOF
15531 cat >> confdefs.h <<EOF
15532 #define EMACS_CONFIGURATION "$configuration"
15533 EOF
15534 }
15535
15536 { test "$extra_verbose" = "yes" && cat << EOF
15537     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15538 EOF
15539 cat >> confdefs.h <<EOF
15540 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15541 EOF
15542 }
15543
15544
15545
15546 null_string=""
15547 { test "$extra_verbose" = "yes" && cat << EOF
15548     Defining LD_SWITCH_X_SITE = $null_string
15549 EOF
15550 cat >> confdefs.h <<EOF
15551 #define LD_SWITCH_X_SITE $null_string
15552 EOF
15553 }
15554
15555 { test "$extra_verbose" = "yes" && cat << EOF
15556     Defining LD_SWITCH_X_SITE_AUX = $null_string
15557 EOF
15558 cat >> confdefs.h <<EOF
15559 #define LD_SWITCH_X_SITE_AUX $null_string
15560 EOF
15561 }
15562
15563 { test "$extra_verbose" = "yes" && cat << EOF
15564     Defining C_SWITCH_X_SITE = $null_string
15565 EOF
15566 cat >> confdefs.h <<EOF
15567 #define C_SWITCH_X_SITE $null_string
15568 EOF
15569 }
15570
15571 { test "$extra_verbose" = "yes" && cat << EOF
15572     Defining LD_SWITCH_SITE = $null_string
15573 EOF
15574 cat >> confdefs.h <<EOF
15575 #define LD_SWITCH_SITE $null_string
15576 EOF
15577 }
15578
15579 { test "$extra_verbose" = "yes" && cat << EOF
15580     Defining C_SWITCH_SITE = $null_string
15581 EOF
15582 cat >> confdefs.h <<EOF
15583 #define C_SWITCH_SITE $null_string
15584 EOF
15585 }
15586
15587
15588
15589 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15590     Defining GNU_MALLOC
15591 EOF
15592 cat >> confdefs.h <<\EOF
15593 #define GNU_MALLOC 1
15594 EOF
15595 }
15596
15597 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15598     Defining USE_SYSTEM_MALLOC
15599 EOF
15600 cat >> confdefs.h <<\EOF
15601 #define USE_SYSTEM_MALLOC 1
15602 EOF
15603 }
15604
15605 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15606     Defining USE_DEBUG_MALLOC
15607 EOF
15608 cat >> confdefs.h <<\EOF
15609 #define USE_DEBUG_MALLOC 1
15610 EOF
15611 }
15612
15613                                               { test "$extra_verbose" = "yes" && cat << \EOF
15614     Defining USE_SYSTEM_MALLOC
15615 EOF
15616 cat >> confdefs.h <<\EOF
15617 #define USE_SYSTEM_MALLOC 1
15618 EOF
15619 }
15620
15621 fi
15622 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15623     Defining I18N3
15624 EOF
15625 cat >> confdefs.h <<\EOF
15626 #define I18N3 1
15627 EOF
15628 }
15629
15630 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15631     Defining USE_GCC
15632 EOF
15633 cat >> confdefs.h <<\EOF
15634 #define USE_GCC 1
15635 EOF
15636 }
15637
15638 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15639     Defining EXTERNAL_WIDGET
15640 EOF
15641 cat >> confdefs.h <<\EOF
15642 #define EXTERNAL_WIDGET 1
15643 EOF
15644 }
15645
15646 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15647     Defining QUICK_BUILD
15648 EOF
15649 cat >> confdefs.h <<\EOF
15650 #define QUICK_BUILD 1
15651 EOF
15652 }
15653
15654 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15655     Defining PURIFY
15656 EOF
15657 cat >> confdefs.h <<\EOF
15658 #define PURIFY 1
15659 EOF
15660 }
15661
15662 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15663     Defining QUANTIFY
15664 EOF
15665 cat >> confdefs.h <<\EOF
15666 #define QUANTIFY 1
15667 EOF
15668 }
15669
15670 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15671     Defining MAIL_USE_POP
15672 EOF
15673 cat >> confdefs.h <<\EOF
15674 #define MAIL_USE_POP 1
15675 EOF
15676 }
15677
15678 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15679     Defining KERBEROS
15680 EOF
15681 cat >> confdefs.h <<\EOF
15682 #define KERBEROS 1
15683 EOF
15684 }
15685
15686 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15687     Defining HESIOD
15688 EOF
15689 cat >> confdefs.h <<\EOF
15690 #define HESIOD 1
15691 EOF
15692 }
15693
15694 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15695     Defining USE_UNION_TYPE
15696 EOF
15697 cat >> confdefs.h <<\EOF
15698 #define USE_UNION_TYPE 1
15699 EOF
15700 }
15701
15702 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15703     Defining PDUMP
15704 EOF
15705 cat >> confdefs.h <<\EOF
15706 #define PDUMP 1
15707 EOF
15708 }
15709
15710 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15711     Defining IPV6_CANONICALIZE
15712 EOF
15713 cat >> confdefs.h <<\EOF
15714 #define IPV6_CANONICALIZE 1
15715 EOF
15716 }
15717
15718
15719
15720 (
15721 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15722 else
15723   echo "uname -a: `uname -a`"
15724 fi
15725 echo ""
15726 echo "$0 $quoted_arguments"
15727 ) > Installation
15728
15729 if test ! -z ${emacs_beta_version} ; then
15730   if test -z "${emacs_is_beta}" ; then
15731         xemacs_betaname=".${emacs_beta_version}"
15732   else
15733         xemacs_betaname="-b${emacs_beta_version}"
15734   fi
15735 else
15736   xemacs_betaname=""
15737 fi
15738
15739 (
15740 echo "
15741
15742 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15743 "
15744 echo "
15745 Compilation / Installation:"
15746 echo "  Source code location:              $srcdir"
15747 echo "  Installation prefix:               $prefix"
15748 if test -n "$site_includes"; then
15749   echo "  Additional header files:           $site_includes"
15750 fi
15751 if test -n "$site_libraries"; then
15752   echo "  Additional libraries:              $site_libraries"
15753 fi
15754 if test -n "$site_prefixes"; then
15755   echo "  Additional prefixes:               $site_prefixes"
15756 fi
15757 if test -n "$runpath"; then
15758   echo "  Runtime library search path:       $runpath"
15759 fi
15760
15761 if test -n "$opsysfile"
15762 then echo "  Operating system description file: \`$opsysfile'"
15763 else echo "  Not using any operating system description file"
15764 fi
15765 if test -n "$machfile"
15766 then echo "  Machine description file:          \`$machfile'"
15767 else echo "  Not using any machine description file"
15768 fi
15769
15770 echo "  Compiler:                          $CC $CFLAGS"
15771 echo "  Relocating allocator for buffers:  $rel_alloc"
15772 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15773 case "$ld_switch_site" in
15774   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15775     - Consider configuring with --pdump." ;;
15776 esac
15777
15778 echo "
15779 Window System:"
15780 if test "$with_msw" = "yes"; then
15781   echo "  Compiling in support for the Microsoft window system."
15782 fi
15783 if test "$with_x11" = "yes"; then
15784   echo "  Compiling in support for the X window system:"
15785   echo "    - X Windows headers location:                 $x_includes"
15786   echo "    - X Windows libraries location:               $x_libraries"
15787   if test "$with_xauth" != yes; then
15788     echo "    - Xau (X authority) not available."
15789   fi
15790   if test "$with_xmu" != yes; then
15791     echo "    - Xmu library not available; substituting equivalent routines."
15792   fi
15793   if test "$with_wmcommand" != no; then
15794     echo "    - Handling WM_COMMAND properly."
15795   fi
15796 fi
15797 if test "$need_athena" = "yes"; then
15798   echo "  Compiling in support for the Athena widget set:"
15799   echo "    - Athena headers location:                    $athena_h_path"
15800   echo "    - Athena library to link:                     $athena_lib"
15801 fi
15802 case "$with_menubars" in
15803   gtk   ) echo "  Using GTK menubars."   ;;
15804   lucid ) echo "  Using Lucid menubars." ;;
15805   motif ) echo "  Using Motif menubars."
15806           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15807           echo "             We recommend using the Lucid menubar instead."
15808           echo "             Re-run configure with --with-menubars='lucid'." ;;
15809     msw ) echo "  Using MS-Windows menubars." ;;
15810 esac
15811 case "$with_scrollbars" in
15812   gtk    ) echo "  Using GTK scrollbars."        ;;
15813   lucid  ) echo "  Using Lucid scrollbars."      ;;
15814   motif  ) echo "  Using Motif scrollbars."      ;;
15815   athena ) echo "  Using Athena scrollbars."     ;;
15816      msw ) echo "  Using MS-Windows scrollbars." ;;
15817 esac
15818 case "$with_dialogs" in
15819   gtk    ) echo "  Using GTK dialog boxes." ;;
15820   motif  ) echo "  Using Motif dialog boxes."
15821            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15822              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15823              echo "             We recommend using the Athena dialog boxes instead."
15824              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15825              echo "             Read the PROBLEMS file for more information."
15826            fi; fi ;;
15827   athena ) echo "  Using Athena dialog boxes."     ;;
15828      msw ) echo "  Using MS-Windows dialog boxes." ;;
15829 esac
15830 case "$with_widgets" in
15831   gtk    ) echo "  Using GTK native widgets."        ;;
15832   motif  ) echo "  Using Motif native widgets."      ;;
15833   athena ) echo "  Using Athena native widgets."     ;;
15834      msw ) echo "  Using MS-Windows native widgets." ;;
15835 esac
15836 if test "$with_dragndrop" = yes; then
15837   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15838   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15839 fi
15840
15841 echo "
15842 TTY:"
15843 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15844 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15845
15846 echo "
15847 Images:"
15848 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15849 if test "$with_xpm" = yes; then
15850   echo "  Compiling in support for XPM  images."
15851 elif test "$with_x11" = yes; then
15852   echo "  WARNING: -----------------------------------------------------------"
15853   echo "  WARNING: Compiling without XPM image support."
15854   if test "$xpm_problem" != ""; then
15855     echo "  Reason: $xpm_problem"
15856   fi
15857   echo "  WARNING: You should strongly consider installing XPM."
15858   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15859   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15860   echo "  WARNING: -----------------------------------------------------------"
15861 fi
15862 if test "$with_png" = yes; then
15863   echo "  Compiling in support for PNG  images."
15864 elif test "$window_system" != "none"; then
15865   echo "  WARNING: -----------------------------------------------------------"
15866   echo "  WARNING: Compiling without PNG image support."
15867   if test "$png_problem" != ""; then
15868     echo "  Reason: $png_problem"
15869   fi
15870   echo "  WARNING: You should strongly consider installing the PNG libraries."
15871   echo "  WARNING: Otherwise certain images and glyphs may not display."
15872   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15873   echo "  WARNING: -----------------------------------------------------------"
15874 fi
15875 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15876 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15877 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15878
15879 echo "
15880 Sound:"
15881 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15882 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15883 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15884 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15885
15886 echo "
15887 Databases:"
15888 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15889 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15890 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15891 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15892 if test "$with_postgresql" = yes; then
15893   echo "  Compiling in support for PostgreSQL."
15894   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15895   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15896 fi
15897
15898 echo "
15899 Internationalization:"
15900 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15901 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15902 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15903 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15904 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15905 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15906 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15907 if test "$with_wnn" = yes; then
15908   echo "  Compiling in support for the WNN input method on Mule."
15909   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15910 fi
15911 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15912
15913 echo "
15914 Mail:"
15915 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15916 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15917 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15918 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15919
15920 echo "
15921 Other Features:"
15922 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15923 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15924 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15925 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15926 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15927 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15928 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15929 test "$pdump" = yes && echo "  Using the new portable dumper."
15930 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15931 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15932 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15933   != "no no no no no no"; then
15934   echo "  WARNING: ---------------------------------------------------------"
15935   echo "  WARNING: Compiling in support for runtime error checking."
15936   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15937   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15938   echo "  WARNING: ---------------------------------------------------------"
15939 fi
15940 echo ""
15941 ) | tee -a Installation
15942 echo ""
15943
15944
15945 # Remove any trailing slashes in these variables.
15946 test -n "$prefix" &&
15947   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15948 test -n "$exec_prefix" &&
15949   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15950
15951
15952 for file in $internal_makefile_list; do
15953   test "$file" = src/Makefile.in && \
15954     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15955   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15956 done
15957 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15958 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
15959
15960 trap '' 1 2 15
15961
15962 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15963
15964 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15965 # Let make expand exec_prefix.
15966 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15967
15968 # Any assignment to VPATH causes Sun make to only execute
15969 # the first set of double-colon rules, so remove it if not needed.
15970 # If there is a colon in the path, we need to keep it.
15971 if test "x$srcdir" = x.; then
15972   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15973 fi
15974
15975 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15976
15977 DEFS=-DHAVE_CONFIG_H
15978
15979 # Without the "./", some shells look in PATH for config.status.
15980 : ${CONFIG_STATUS=./config.status}
15981
15982 echo creating $CONFIG_STATUS
15983 rm -f $CONFIG_STATUS
15984 cat > $CONFIG_STATUS <<EOF
15985 #! /bin/sh
15986 # Generated automatically by configure.
15987 # Run this file to recreate the current configuration.
15988 # This directory was configured as follows,
15989 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15990 #
15991 # $0 $ac_configure_args
15992 #
15993 # Compiler output produced by configure, useful for debugging
15994 # configure, is in ./config.log if it exists.
15995
15996 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15997 for ac_option
15998 do
15999   case "\$ac_option" in
16000   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16001     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
16002     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
16003   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
16004     echo "$CONFIG_STATUS generated by autoconf version 2.13"
16005     exit 0 ;;
16006   -help | --help | --hel | --he | --h)
16007     echo "\$ac_cs_usage"; exit 0 ;;
16008   *) echo "\$ac_cs_usage"; exit 1 ;;
16009   esac
16010 done
16011
16012 ac_given_srcdir=$srcdir
16013 ac_given_INSTALL="$INSTALL"
16014
16015 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
16016 EOF
16017 cat >> $CONFIG_STATUS <<EOF
16018
16019 # Protect against being on the right side of a sed subst in config.status.
16020 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
16021  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
16022 $ac_vpsub
16023 $extrasub
16024 s%@SHELL@%$SHELL%g
16025 s%@CFLAGS@%$CFLAGS%g
16026 s%@CPPFLAGS@%$CPPFLAGS%g
16027 s%@CXXFLAGS@%$CXXFLAGS%g
16028 s%@FFLAGS@%$FFLAGS%g
16029 s%@DEFS@%$DEFS%g
16030 s%@LDFLAGS@%$LDFLAGS%g
16031 s%@LIBS@%$LIBS%g
16032 s%@exec_prefix@%$exec_prefix%g
16033 s%@prefix@%$prefix%g
16034 s%@program_transform_name@%$program_transform_name%g
16035 s%@bindir@%$bindir%g
16036 s%@sbindir@%$sbindir%g
16037 s%@libexecdir@%$libexecdir%g
16038 s%@datadir@%$datadir%g
16039 s%@sysconfdir@%$sysconfdir%g
16040 s%@sharedstatedir@%$sharedstatedir%g
16041 s%@localstatedir@%$localstatedir%g
16042 s%@libdir@%$libdir%g
16043 s%@includedir@%$includedir%g
16044 s%@oldincludedir@%$oldincludedir%g
16045 s%@infodir@%$infodir%g
16046 s%@mandir@%$mandir%g
16047 s%@LN_S@%$LN_S%g
16048 s%@blddir@%$blddir%g
16049 s%@CC@%$CC%g
16050 s%@CPP@%$CPP%g
16051 s%@start_flags@%$start_flags%g
16052 s%@ld_switch_shared@%$ld_switch_shared%g
16053 s%@start_files@%$start_files%g
16054 s%@ld@%$ld%g
16055 s%@lib_gcc@%$lib_gcc%g
16056 s%@RANLIB@%$RANLIB%g
16057 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
16058 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
16059 s%@INSTALL_DATA@%$INSTALL_DATA%g
16060 s%@YACC@%$YACC%g
16061 s%@SET_MAKE@%$SET_MAKE%g
16062 s%@GTK_CONFIG@%$GTK_CONFIG%g
16063 s%@X_CFLAGS@%$X_CFLAGS%g
16064 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
16065 s%@X_LIBS@%$X_LIBS%g
16066 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
16067 s%@install_pp@%$install_pp%g
16068 s%@libs_xauth@%$libs_xauth%g
16069 s%@dnd_objs@%$dnd_objs%g
16070 s%@lwlib_objs@%$lwlib_objs%g
16071 s%@ALLOCA@%$ALLOCA%g
16072 s%@have_esd_config@%$have_esd_config%g
16073 s%@dll_ld@%$dll_ld%g
16074 s%@dll_cflags@%$dll_cflags%g
16075 s%@dll_ldflags@%$dll_ldflags%g
16076 s%@dll_post@%$dll_post%g
16077 s%@dll_ldo@%$dll_ldo%g
16078 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
16079 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
16080 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16081 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16082 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16083 s%@PROGNAME@%$PROGNAME%g
16084 s%@version@%$version%g
16085 s%@configuration@%$configuration%g
16086 s%@canonical@%$canonical%g
16087 s%@inststaticdir@%$inststaticdir%g
16088 s%@instvardir@%$instvardir%g
16089 s%@srcdir@%$srcdir%g
16090 s%@pkgdir@%$pkgdir%g
16091 s%@statedir@%$statedir%g
16092 s%@extra_includes@%$extra_includes%g
16093 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16094 s%@PREFIX@%$PREFIX%g
16095 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16096 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16097 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16098 s%@INFODIR@%$INFODIR%g
16099 s%@infopath@%$infopath%g
16100 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16101 s%@INFOPATH@%$INFOPATH%g
16102 s%@package_path@%$package_path%g
16103 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16104 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16105 s%@lispdir@%$lispdir%g
16106 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16107 s%@LISPDIR@%$LISPDIR%g
16108 s%@moduledir@%$moduledir%g
16109 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16110 s%@MODULEDIR@%$MODULEDIR%g
16111 s%@sitelispdir@%$sitelispdir%g
16112 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16113 s%@SITELISPDIR@%$SITELISPDIR%g
16114 s%@sitemoduledir@%$sitemoduledir%g
16115 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16116 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16117 s%@etcdir@%$etcdir%g
16118 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16119 s%@ETCDIR@%$ETCDIR%g
16120 s%@docdir@%$docdir%g
16121 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16122 s%@DOCDIR@%$DOCDIR%g
16123 s%@archlibdir@%$archlibdir%g
16124 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16125 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16126 s%@bitmapdir@%$bitmapdir%g
16127 s%@extra_objs@%$extra_objs%g
16128 s%@machfile@%$machfile%g
16129 s%@opsysfile@%$opsysfile%g
16130 s%@c_switch_general@%$c_switch_general%g
16131 s%@c_switch_window_system@%$c_switch_window_system%g
16132 s%@c_switch_all@%$c_switch_all%g
16133 s%@ld_switch_general@%$ld_switch_general%g
16134 s%@ld_switch_window_system@%$ld_switch_window_system%g
16135 s%@ld_switch_all@%$ld_switch_all%g
16136 s%@ld_libs_general@%$ld_libs_general%g
16137 s%@ld_libs_window_system@%$ld_libs_window_system%g
16138 s%@ld_libs_all@%$ld_libs_all%g
16139 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16140 s%@native_sound_lib@%$native_sound_lib%g
16141 s%@sound_cflags@%$sound_cflags%g
16142 s%@dynodump_arch@%$dynodump_arch%g
16143 s%@XEMACS_CC@%$XEMACS_CC%g
16144 s%@internal_makefile_list@%$internal_makefile_list%g
16145
16146 CEOF
16147 EOF
16148
16149 cat >> $CONFIG_STATUS <<\EOF
16150
16151 # Split the substitutions into bite-sized pieces for seds with
16152 # small command number limits, like on Digital OSF/1 and HP-UX.
16153 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16154 ac_file=1 # Number of current file.
16155 ac_beg=1 # First line for current file.
16156 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16157 ac_more_lines=:
16158 ac_sed_cmds=""
16159 while $ac_more_lines; do
16160   if test $ac_beg -gt 1; then
16161     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16162   else
16163     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16164   fi
16165   if test ! -s conftest.s$ac_file; then
16166     ac_more_lines=false
16167     rm -f conftest.s$ac_file
16168   else
16169     if test -z "$ac_sed_cmds"; then
16170       ac_sed_cmds="sed -f conftest.s$ac_file"
16171     else
16172       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16173     fi
16174     ac_file=`expr $ac_file + 1`
16175     ac_beg=$ac_end
16176     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16177   fi
16178 done
16179 if test -z "$ac_sed_cmds"; then
16180   ac_sed_cmds=cat
16181 fi
16182 EOF
16183
16184 cat >> $CONFIG_STATUS <<EOF
16185
16186 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16187 EOF
16188 cat >> $CONFIG_STATUS <<\EOF
16189 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16190   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16191   case "$ac_file" in
16192   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16193        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16194   *) ac_file_in="${ac_file}.in" ;;
16195   esac
16196
16197   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16198
16199   # Remove last slash and all that follows it.  Not all systems have dirname.
16200   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16201   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16202     # The file is in a subdirectory.
16203     test ! -d "$ac_dir" && mkdir "$ac_dir"
16204     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16205     # A "../" for each directory in $ac_dir_suffix.
16206     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16207   else
16208     ac_dir_suffix= ac_dots=
16209   fi
16210
16211   case "$ac_given_srcdir" in
16212   .)  srcdir=.
16213       if test -z "$ac_dots"; then top_srcdir=.
16214       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16215   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16216   *) # Relative path.
16217     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16218     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16219   esac
16220
16221   case "$ac_given_INSTALL" in
16222   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16223   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16224   esac
16225
16226   echo creating "$ac_file"
16227   rm -f "$ac_file"
16228   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16229   case "$ac_file" in
16230   *Makefile*) ac_comsub="1i\\
16231 # $configure_input" ;;
16232   *) ac_comsub= ;;
16233   esac
16234
16235   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16236   sed -e "$ac_comsub
16237 s%@configure_input@%$configure_input%g
16238 s%@srcdir@%$srcdir%g
16239 s%@top_srcdir@%$top_srcdir%g
16240 s%@INSTALL@%$INSTALL%g
16241 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16242 fi; done
16243 rm -f conftest.s*
16244
16245 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16246 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16247 #
16248 # ac_d sets the value in "#define NAME VALUE" lines.
16249 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16250 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16251 ac_dC='\3'
16252 ac_dD='%g'
16253 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16254 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16255 ac_uB='\([      ]\)%\1#\2define\3'
16256 ac_uC=' '
16257 ac_uD='\4%g'
16258 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16259 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16260 ac_eB='$%\1#\2define\3'
16261 ac_eC=' '
16262 ac_eD='%g'
16263
16264 if test "${CONFIG_HEADERS+set}" != set; then
16265 EOF
16266 cat >> $CONFIG_STATUS <<EOF
16267   CONFIG_HEADERS="src/config.h lwlib/config.h"
16268 EOF
16269 cat >> $CONFIG_STATUS <<\EOF
16270 fi
16271 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16272   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16273   case "$ac_file" in
16274   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16275        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16276   *) ac_file_in="${ac_file}.in" ;;
16277   esac
16278
16279   echo creating $ac_file
16280
16281   rm -f conftest.frag conftest.in conftest.out
16282   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16283   cat $ac_file_inputs > conftest.in
16284
16285 EOF
16286
16287 # Transform confdefs.h into a sed script conftest.vals that substitutes
16288 # the proper values into config.h.in to produce config.h.  And first:
16289 # Protect against being on the right side of a sed subst in config.status.
16290 # Protect against being in an unquoted here document in config.status.
16291 rm -f conftest.vals
16292 cat > conftest.hdr <<\EOF
16293 s/[\\&%]/\\&/g
16294 s%[\\$`]%\\&%g
16295 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16296 s%ac_d%ac_u%gp
16297 s%ac_u%ac_e%gp
16298 EOF
16299 sed -n -f conftest.hdr confdefs.h > conftest.vals
16300 rm -f conftest.hdr
16301
16302 # This sed command replaces #undef with comments.  This is necessary, for
16303 # example, in the case of _POSIX_SOURCE, which is predefined and required
16304 # on some systems where configure will not decide to define it.
16305 cat >> conftest.vals <<\EOF
16306 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16307 EOF
16308
16309 # Break up conftest.vals because some shells have a limit on
16310 # the size of here documents, and old seds have small limits too.
16311
16312 rm -f conftest.tail
16313 while :
16314 do
16315   ac_lines=`grep -c . conftest.vals`
16316   # grep -c gives empty output for an empty file on some AIX systems.
16317   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16318   # Write a limited-size here document to conftest.frag.
16319   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16320   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16321   echo 'CEOF
16322   sed -f conftest.frag conftest.in > conftest.out
16323   rm -f conftest.in
16324   mv conftest.out conftest.in
16325 ' >> $CONFIG_STATUS
16326   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16327   rm -f conftest.vals
16328   mv conftest.tail conftest.vals
16329 done
16330 rm -f conftest.vals
16331
16332 cat >> $CONFIG_STATUS <<\EOF
16333   rm -f conftest.frag conftest.h
16334   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16335   cat conftest.in >> conftest.h
16336   rm -f conftest.in
16337   if cmp -s $ac_file conftest.h 2>/dev/null; then
16338     echo "$ac_file is unchanged"
16339     rm -f conftest.h
16340   else
16341     # Remove last slash and all that follows it.  Not all systems have dirname.
16342       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16343       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16344       # The file is in a subdirectory.
16345       test ! -d "$ac_dir" && mkdir "$ac_dir"
16346     fi
16347     rm -f $ac_file
16348     mv conftest.h $ac_file
16349   fi
16350 fi; done
16351
16352 EOF
16353 cat >> $CONFIG_STATUS <<EOF
16354 CPP="$CPP"
16355  top_srcdir="$srcdir"
16356  MAKE_SUBDIR="$MAKE_SUBDIR"
16357
16358 EOF
16359 cat >> $CONFIG_STATUS <<\EOF
16360 for dir in . $MAKE_SUBDIR; do
16361   (
16362     cd $dir
16363     rm -f junk.c
16364     < Makefile.in \
16365       sed -e '/^# Generated/d' \
16366           -e 's%/\*\*/#.*%%' \
16367           -e 's/^ *# */#/' \
16368           -e '/^##/d' \
16369           -e '/^#/ {
16370 p
16371 d
16372 }'        \
16373           -e '/./ {
16374 s/\([\"]\)/\\\1/g
16375 s/^/"/
16376 s/$/"/
16377 }'  > junk.c;
16378
16379
16380
16381     echo creating $dir/Makefile
16382 $CPP -I. -I${top_srcdir}/src  junk.c \
16383   | sed -e 's/^\#.*//'          \
16384         -e 's/^[        ][      ]*$//'\
16385         -e 's/^ /       /'              \
16386         -e '/^[ \f]*$/d' \
16387         -e '/^\"/ {
16388         s/\\\([\"]\)/\1/g
16389         s/^[    ]*\"//
16390         s/\"[   ]*$//
16391 }' > Makefile.new
16392     chmod 444 Makefile.new
16393     mv -f Makefile.new Makefile
16394
16395     echo creating $dir/GNUmakefile
16396 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16397   | sed -e 's/^\#.*//'          \
16398         -e 's/^[        ][      ]*$//'\
16399         -e 's/^ /       /'              \
16400         -e '/^[ \f]*$/d' \
16401         -e '/^\"/ {
16402         s/\\\([\"]\)/\1/g
16403         s/^[    ]*\"//
16404         s/\"[   ]*$//
16405 }' > Makefile.new
16406     chmod 444 Makefile.new
16407     mv -f Makefile.new GNUmakefile
16408
16409     rm -f junk.c
16410   )
16411 done
16412
16413 sed < config.status >> lib-src/config.values \
16414   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16415   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16416   -e 's/^\([^ ]*\) $/\1 ""/' \
16417   -e 's/ 1$/ t/'
16418
16419
16420 exit 0
16421 EOF
16422 chmod +x $CONFIG_STATUS
16423 rm -fr confdefs* $ac_clean_files
16424 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1