Sync up with r21-2-46-utf-2000-0_19-b1.
[chise/xemacs-chise.git] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 native_sound_lib=''
251 with_gtk='no'
252 with_gnome='no'
253 use_assertions="yes"
254 with_toolbars=""
255 with_tty=""
256 use_union_type="no"
257 with_dnet=""
258 pdump="no"
259 with_dragndrop="no"
260
261
262
263
264 arguments="$@"
265
266 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
267 quoted_arguments=
268 for i in "$@"; do
269    case "$i" in
270    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
271    | --no-cr | --no-c) ;;
272    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
274    *)
275    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
276    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
277    esac
278 done
279
280 while test $# != 0; do
281   arg="$1"; shift
282   case "$arg" in
283     --no-create|--no-recursion) ;;
284         -* )
285             case "$arg" in
286         -*=*)
287           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
288           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
289           valomitted=no
290         ;;
291                                                                           -*)
292                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
293           val="yes" valomitted=yes
294         ;;
295       esac
296
297             optname="$opt"
298       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
299
300             case "${valomitted}-${opt}" in yes-without_* )
301         opt=`echo $opt | sed 's/without/with/'`
302         valomitted="no" val="no" ;;
303       esac
304
305             case "$opt" in
306
307         with_site_lisp  | \
308         with_prefix     | \
309         with_site_modules | \
310         with_x          | \
311         with_x11        | \
312         with_gtk        | \
313         with_gnome      | \
314         with_msw        | \
315         with_gcc        | \
316         dynamic         | \
317         with_ncurses    | \
318         with_dnet       | \
319         with_socks      | \
320         with_dragndrop  | \
321         with_cde        | \
322         with_offix      | \
323         with_gpm        | \
324         with_xpm        | \
325         with_xface      | \
326         with_gif        | \
327         with_jpeg       | \
328         with_png        | \
329         with_tiff       | \
330         with_wmcommand  | \
331         with_xmu        | \
332         with_purify     | \
333         with_quantify   | \
334         with_toolbars   | \
335         with_tty        | \
336         with_xfs        | \
337         with_i18n3      | \
338         with_mule       | \
339         with_utf_2000   | \
340         with_text_coding| \
341         with_file_coding| \
342         with_canna      | \
343         with_wnn        | \
344         with_wnn6       | \
345         with_workshop   | \
346         with_sparcworks | \
347         with_tooltalk   | \
348         with_ldap       | \
349         with_postgresql | \
350         with_pop        | \
351         with_kerberos   | \
352         with_hesiod     | \
353         with_dnet       | \
354         with_infodock   | \
355         with_netinstall   | \
356         external_widget | \
357         verbose         | \
358         extra_verbose   | \
359         usage_tracking  | \
360         use_union_type  | \
361         pdump           | \
362         debug           | \
363         use_assertions  | \
364         memory_usage_stats | \
365         with_clash_detection | \
366         with_modules | \
367         quick_build )
368                   case "$val" in
369             y | ye | yes )      val=yes ;;
370             n | no )            val=no  ;;
371             * ) (echo "$progname: Usage error:"
372 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
373 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
374           esac
375           eval "$opt=\"$val\"" ;;
376
377
378                         srcdir          | \
379         compiler        | \
380         cflags          | \
381         cpp             | \
382         cppflags        | \
383         libs            | \
384         ldflags         | \
385         cache_file      | \
386         native_sound_lib| \
387         site_lisp       | \
388         x_includes      | \
389         x_libraries     | \
390         site_includes   | \
391         site_libraries  | \
392         site_prefixes   | \
393         site_runtime_libraries )
394                   if test "$valomitted" = "yes" ; then
395                     if test "$#" = 0 ; then
396               (echo "$progname: Usage error:"
397 echo " " "The \`--$optname' option requires a value."
398 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
399             fi
400             val="$1"; shift
401           fi
402           eval "$opt=\"$val\""
403         ;;
404
405                 rel_alloc | \
406         with_dlmalloc | \
407         with_debug_malloc  | use_debug_malloc | \
408         with_system_malloc | use_system_malloc )
409           case "$val" in
410             y | ye | yes )      val=yes ;;
411             n | no )            val=no  ;;
412             d | de | def | defa | defau | defaul | default ) val=default ;;
413             * ) (echo "$progname: Usage error:"
414 echo " " "The \`--$optname' option requires one of these values:
415   \`yes', \`no', or \`default'."
416 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
417           esac
418           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
419           eval "$opt=\"$val\""
420         ;;
421
422                 "with_database" )
423           with_database_berkdb=no
424           with_database_dbm=no
425           with_database_gdbm=no
426           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
427             case "$x" in
428               no ) ;;
429               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
430               d | db | dbm )                               with_database_dbm=yes    ;;
431               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
432               * ) (echo "$progname: Usage error:"
433 echo " " "The \`--$optname' option value
434   must be either \`no' or a comma-separated list
435   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
436 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
437             esac
438           done
439           if test "$with_database_dbm"  = "yes" -a \
440                   "$with_database_gdbm" = "yes"; then
441           (echo "$progname: Usage error:"
442 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
443   with the \`--$optname' option."
444 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
445           fi
446         ;;
447
448                 "with_sound" )
449                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
450             case "$x" in
451                       n | no | non | none ) new_sdefault=no ;;
452               a | al | all | both ) new_sdefault=yes ;;
453
454               native )       with_native_sound=yes ;;
455               nonative )     with_native_sound=no ;;
456
457               nas )          with_nas_sound=yes ;;
458               nonas )        with_nas_sound=no ;;
459
460               esd )          with_esd_sound=yes ;;
461               noesd )        with_esd_sound=no ;;
462
463               * ) bogus_sound=yes ;;
464             esac
465             if test "$bogus_sound" -o \
466                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
467                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
468                 (echo "$progname: Usage error:"
469 echo " " "Valid types for the \`--$optname' option are:
470   $types.
471 The default is to autodetect all sound support."
472 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
473             elif test -n "$new_sdefault" ; then
474                 with_native_sound=$new_sdefault
475                 with_nas_sound=$new_sdefault
476                 with_esd_sound=$new_sdefault
477                 new_sdefault=   # reset this
478             fi
479             sound_notfirst=true
480           done
481         ;;
482
483                         "with_athena" )
484           case "$val" in
485             xa | xaw )                    val=xaw    ;;
486             3 | 3d | xaw3d )              val=3d     ;;
487                         ne | nex | next | naxtaw)     val=next   ;;
488                         9 | 95 | xaw95 )              val=95     ;;
489             xp | xpm | xawxpm )           val=xpm    ;;
490             * ) (echo "$progname: Usage error:"
491 echo " " "The \`--$optname' option must have one of these values:
492   \`xaw', \`3d', \`next', \`95', or \`xpm'."
493 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
494           esac
495           eval "$opt=\"$val\""
496         ;;
497
498                 "with_xim" )
499           case "$val" in
500             y | ye | yes )                val=yes   ;;
501             n | no | non | none )         val=no    ;;
502             x | xl | xli | xlib )         val=xlib  ;;
503             m | mo | mot | moti | motif ) val=motif ;;
504             * ) (echo "$progname: Usage error:"
505 echo " " "The \`--$optname' option must have one of these values:
506   \`motif', \`xlib', \`yes', or \`no'."
507 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
508           esac
509           eval "$opt=\"$val\""
510         ;;
511
512                 "mail_locking" )
513           case "$val" in
514             lockf )     val=lockf ;;
515             flock )     val=flock ;;
516             file | dot ) val=file  ;;
517             locking )   val=locking  ;;
518             * ) (echo "$progname: Usage error:"
519 echo " " "The \`--$optname' option must have one of these values:
520   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
521 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
522           esac
523           eval "$opt=\"$val\""
524         ;;
525
526                 "error_checking" )
527                           
528           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
529             case "$x" in
530                       n | no | non | none ) new_default=no ;;
531               a | al | all )        new_default=yes ;;
532
533               extents )       error_check_extents=yes ;;
534               noextents )     error_check_extents=no ;;
535
536               typecheck )     error_check_typecheck=yes ;;
537               notypecheck )   error_check_typecheck=no ;;
538
539               bufpos )        error_check_bufpos=yes ;;
540               nobufpos )      error_check_bufpos=no ;;
541
542               gc )            error_check_gc=yes ;;
543               nogc )          error_check_gc=no ;;
544
545               malloc )        error_check_malloc=yes ;;
546               nomalloc )      error_check_malloc=no ;;
547
548               byte_code )     error_check_byte_code=yes ;;
549               nobyte_code )   error_check_byte_code=no ;;
550
551               glyphs )     error_check_glyphs=yes ;;
552               noglyphs )   error_check_glyphs=no ;;
553
554               * ) bogus_error_check=yes ;;
555             esac
556             if test "$bogus_error_check" -o \
557                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
558                 if test "$error_check_default" = yes ; then
559                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
560                 else
561                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
562                 fi
563                 (echo "$progname: Usage error:"
564 echo " " "Valid types for the \`--$optname' option are:
565   $types."
566 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
567             elif test -n "$new_default" ; then
568                 error_check_extents=$new_default
569                 error_check_typecheck=$new_default
570                 error_check_bufpos=$new_default
571                 error_check_gc=$new_default
572                 error_check_malloc=$new_default
573                 error_check_byte_code=$new_default
574                 error_check_glyphs=$new_default
575                 new_default=    # reset this
576             fi
577             echeck_notfirst=true
578           done
579         ;;
580
581                                 
582                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
583         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
584         archlibdir | docdir | package_path )
585                    if test "$valomitted" = "yes"; then
586              if test "$#" = 0; then
587                  (echo "$progname: Usage error:"
588 echo " " "The \`--$optname' option requires a value."
589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
590              fi
591              val="$1"; shift
592            fi
593            eval "$opt=\"$val\""
594
595                            case "$opt" in
596                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining EXEC_PREFIX_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define EXEC_PREFIX_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining LISPDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define LISPDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining SITELISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define SITELISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining MODULEDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define MODULEDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining ETCDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define ETCDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining INFODIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define INFODIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFOPATH_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFOPATH_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining PACKAGE_PATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define PACKAGE_PATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              datadir )
661                 { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining INFODIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define INFODIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining LISPDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define LISPDIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining MODULEDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define MODULEDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining ETCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define ETCDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining DOCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define DOCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining ARCHLIBDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define ARCHLIBDIR_USER_DEFINED 1
706 EOF
707 }
708  ;;
709              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining DOCDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define DOCDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining ARCHLIBDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define ARCHLIBDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725            esac
726         ;;
727
728                 "no_create" ) ;;
729
730                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
731
732                 "with_menubars"   | \
733         "with_scrollbars" | \
734         "with_dialogs"    | \
735         "with_widgets" )
736           case "$val" in
737             l | lu | luc | luci | lucid )               val=lucid  ;;
738             m | mo | mot | moti | motif )               val=motif  ;;
739             a | at | ath | athe | athen | athena )      val=athena ;;
740             n | no | non | none )                       val=no     ;;
741             y | ye | yes )                              val=yes    ;;
742             g | gt | gtk )                              val=gtk    ;;
743             m | ms | msw )                              val=msw    ;;
744             * ) (echo "$progname: Usage error:"
745 echo " " "The \`--$optname' option must have one of these values:
746   \`gtk\', \`lucid', \`motif', \`athena', \`yes', or \`no'."
747 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
748           esac
749           eval "$opt=\"$val\""
750         ;;
751
752                 "use_minimal_tagbits" | \
753         "use_indexed_lrecord_implementation" | \
754         "run_in_place"  | \
755         "const_is_losing" | \
756         "with_gnu_make" )
757           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
758         ;;
759
760                 * ) (echo "$progname: Usage error:"
761 echo " " "Unrecognized option: $arg"
762 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
763
764       esac
765     ;;
766
767         *-*-*) configuration="$arg" ;;
768
769         *) (echo "$progname: Usage error:"
770 echo " " "Unrecognized argument: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773   esac
774 done
775
776
777 test -n "$cpp"      && CPP="$cpp"
778 test -n "$cppflags" && CPPFLAGS="$cppflags"
779 test -n "$libs"     && LIBS="$libs"
780 test -n "$ldflags"  && LDFLAGS="$ldflags"
781
782 eval set x "$quoted_arguments"; shift
783
784 test "$extra_verbose" = "yes" && verbose=yes
785
786 test -n "$with_x" && with_x11="$with_x"
787
788 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
789   test "$with_system_malloc" = "default" && with_system_malloc=yes
790 fi
791
792
793
794 if test "$with_cde $with_tooltalk" = "yes no"; then
795   (echo "$progname: Usage error:"
796 echo " " "--with-cde requires --with-tooltalk"
797 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
798 elif test "$with_tooltalk" = "no" ; then with_cde=no
799 elif test "$with_cde" = "yes"; then with_tooltalk=yes
800 fi
801
802
803 case "$srcdir" in
804
805     "" )
806     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
807       if test -f "$dir/src/lisp.h" -a \
808               -f "$dir/lisp/version.el" ; then
809         srcdir="$dir"
810         break
811       fi
812     done
813     if test -z "$srcdir" ; then
814       (echo "$progname: Usage error:"
815 echo " " "Neither the current directory nor its parent seem to
816   contain the XEmacs sources.  If you do not want to build XEmacs in its
817   source tree, you should run \`$progname' in the directory in which
818   you wish to build XEmacs, using the \`--srcdir' option to say where the
819   sources may be found."
820 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
821     fi
822   ;;
823
824     * )
825     if test ! -f "$srcdir/src/lisp.h" -o \
826             ! -f "$srcdir/lisp/version.el" ; then
827       (echo "$progname: Usage error:"
828 echo " " "The directory specified with the \`--srcdir' option,
829   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
830   either run the \`$progname' script at the top of the XEmacs source
831   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833     fi
834   ;;
835 esac
836
837 if test -z "$configuration"; then
838     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
839   if test -z "$configuration"; then
840     (echo "$progname: Usage error:"
841 echo " " "XEmacs has not been ported to this host type.
842 Try explicitly specifying the CONFIGURATION when rerunning configure."
843 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
844   fi
845 fi
846
847 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
848 echo "configure:849: checking whether ln -s works" >&5
849
850 rm -f conftestdata
851 if ln -s X conftestdata 2>/dev/null
852 then
853   rm -f conftestdata
854   ac_cv_prog_LN_S="ln -s"
855 else
856   ac_cv_prog_LN_S=ln
857 fi
858 LN_S="$ac_cv_prog_LN_S"
859 if test "$ac_cv_prog_LN_S" = "ln -s"; then
860   echo "$ac_t""yes" 1>&6
861 else
862   echo "$ac_t""no" 1>&6
863 fi
864
865
866 for dir in lisp etc man info tests; do
867   if test ! -d "$dir" ; then
868     echo Making symbolic link to "$srcdir/$dir"
869     ${LN_S} "$srcdir/$dir" "$dir"
870   fi
871 done
872
873
874 absolute_pwd="`pwd`";
875 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
876 then blddir="$PWD"
877 else blddir="$absolute_pwd"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   blddir=`echo "$blddir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi
882 fi
883
884
885 case "$srcdir" in
886   /* ) ;;
887   .  ) srcdir="$blddir" ;;
888   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
889   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
890   srcdir=`echo "$srcdir" | \
891    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
892 fi ;;
893 esac
894
895 if test `pwd` != `sh -c cd $srcdir && pwd`  \
896    && test -f "$srcdir/src/config.h"; then
897   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
898    echo "   as a build directory right now; it has been configured in its own"
899    echo "   right.  To configure in another directory as well, you MUST"
900    echo "   use GNU make.  If you do not have GNU make, then you must"
901    echo "   now do \`make distclean' in $srcdir,"
902    echo "   and then run $progname again.") >&2
903   extrasub='/^VPATH[     ]*=/c\
904 vpath %.c $(srcdir)\
905 vpath %.h $(srcdir)\
906 vpath %.y $(srcdir)\
907 vpath %.l $(srcdir)\
908 vpath %.s $(srcdir)\
909 vpath %.in $(srcdir)'
910 fi
911
912 . "$srcdir/version.sh" || exit 1;
913 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
914 : "${extra_verbose=$beta}"
915 version="${emacs_major_version}.${emacs_minor_version}"
916 { test "$extra_verbose" = "yes" && cat << EOF
917     Defining EMACS_MAJOR_VERSION = $emacs_major_version
918 EOF
919 cat >> confdefs.h <<EOF
920 #define EMACS_MAJOR_VERSION $emacs_major_version
921 EOF
922 }
923
924 { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_MINOR_VERSION = $emacs_minor_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_MINOR_VERSION $emacs_minor_version
929 EOF
930 }
931
932 if test -n "$emacs_beta_version" ; then
933   if test "$beta" = "yes"; then
934         version="${version}-b${emacs_beta_version}"
935         { test "$extra_verbose" = "yes" && cat << EOF
936     Defining EMACS_BETA_VERSION = $emacs_beta_version
937 EOF
938 cat >> confdefs.h <<EOF
939 #define EMACS_BETA_VERSION $emacs_beta_version
940 EOF
941 }
942
943   else
944         version="${version}.${emacs_beta_version}"
945         { test "$extra_verbose" = "yes" && cat << EOF
946     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define EMACS_PATCH_LEVEL $emacs_beta_version
950 EOF
951 }
952
953   fi
954 fi
955 { test "$extra_verbose" = "yes" && cat << EOF
956     Defining XEMACS_CODENAME = "$xemacs_codename"
957 EOF
958 cat >> confdefs.h <<EOF
959 #define XEMACS_CODENAME "$xemacs_codename"
960 EOF
961 }
962
963 { test "$extra_verbose" = "yes" && cat << EOF
964     Defining EMACS_VERSION = "$version"
965 EOF
966 cat >> confdefs.h <<EOF
967 #define EMACS_VERSION "$version"
968 EOF
969 }
970
971
972 if test "$with_infodock" = "yes"; then
973   if test ! -f ../../ID-INSTALL; then
974     echo "Cannot build InfoDock without InfoDock sources"
975     with_infodock=no
976   fi
977 fi
978
979 if test "$with_infodock" = "yes"; then
980       { test "$extra_verbose" = "yes" && cat << EOF
981     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
982 EOF
983 cat >> confdefs.h <<EOF
984 #define INFODOCK_MAJOR_VERSION $infodock_major_version
985 EOF
986 }
987
988   { test "$extra_verbose" = "yes" && cat << EOF
989     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
990 EOF
991 cat >> confdefs.h <<EOF
992 #define INFODOCK_MINOR_VERSION $infodock_minor_version
993 EOF
994 }
995
996   { test "$extra_verbose" = "yes" && cat << EOF
997     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
998 EOF
999 cat >> confdefs.h <<EOF
1000 #define INFODOCK_BUILD_VERSION $infodock_build_version
1001 EOF
1002 }
1003
1004   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1005   PROGNAME=infodock
1006   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1007 else
1008   PROGNAME=xemacs
1009 fi
1010
1011 { test "$extra_verbose" = "yes" && cat << EOF
1012     Defining EMACS_PROGNAME = "$PROGNAME"
1013 EOF
1014 cat >> confdefs.h <<EOF
1015 #define EMACS_PROGNAME "$PROGNAME"
1016 EOF
1017 }
1018
1019
1020 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1021 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1022     Defining ERROR_CHECK_EXTENTS
1023 EOF
1024 cat >> confdefs.h <<\EOF
1025 #define ERROR_CHECK_EXTENTS 1
1026 EOF
1027 }
1028
1029 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1030     Defining ERROR_CHECK_TYPECHECK
1031 EOF
1032 cat >> confdefs.h <<\EOF
1033 #define ERROR_CHECK_TYPECHECK 1
1034 EOF
1035 }
1036
1037 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1038     Defining ERROR_CHECK_BUFPOS
1039 EOF
1040 cat >> confdefs.h <<\EOF
1041 #define ERROR_CHECK_BUFPOS 1
1042 EOF
1043 }
1044
1045 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining ERROR_CHECK_GC
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define ERROR_CHECK_GC 1
1050 EOF
1051 }
1052
1053 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining ERROR_CHECK_MALLOC
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define ERROR_CHECK_MALLOC 1
1058 EOF
1059 }
1060
1061 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1062     Defining ERROR_CHECK_BYTE_CODE
1063 EOF
1064 cat >> confdefs.h <<\EOF
1065 #define ERROR_CHECK_BYTE_CODE 1
1066 EOF
1067 }
1068
1069 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1070     Defining ERROR_CHECK_GLYPHS
1071 EOF
1072 cat >> confdefs.h <<\EOF
1073 #define ERROR_CHECK_GLYPHS 1
1074 EOF
1075 }
1076
1077 if test "${debug:=$beta}" = "yes"; then
1078   use_assertions=yes memory_usage_stats=yes
1079   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1080    echo "    xemacs will be linked with \"debug.o\""
1081  fi
1082   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1083    echo "    xemacs will be linked with \"tests.o\""
1084  fi
1085   { test "$extra_verbose" = "yes" && cat << \EOF
1086     Defining DEBUG_XEMACS
1087 EOF
1088 cat >> confdefs.h <<\EOF
1089 #define DEBUG_XEMACS 1
1090 EOF
1091 }
1092
1093 fi
1094 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining USE_ASSERTIONS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define USE_ASSERTIONS 1
1099 EOF
1100 }
1101
1102 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1103     Defining MEMORY_USAGE_STATS
1104 EOF
1105 cat >> confdefs.h <<\EOF
1106 #define MEMORY_USAGE_STATS 1
1107 EOF
1108 }
1109
1110
1111
1112 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1113 echo "configure:1114: checking "host system type"" >&5
1114 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1115 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1116 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1117 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1118 echo "$ac_t""$configuration" 1>&6
1119
1120
1121
1122
1123
1124 machine='' opsys=''
1125
1126 case "$canonical" in
1127   sparc-*-*        ) machine=sparc ;;
1128   alpha*-*-*       ) machine=alpha ;;
1129   vax-*-*          ) machine=vax ;;
1130   mips-dec-*       ) machine=pmax ;;
1131   mips-sgi-irix6*  ) machine=iris6d ;;
1132   mips-sgi-*       ) machine=iris4d ;;
1133   mips*-linux      ) machine=mips ;;
1134   romp-ibm-*       ) machine=ibmrt ;;
1135   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1136   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1137   powerpc*-*       ) machine=powerpc ;;
1138   hppa-*-*         ) machine=hp800 ;;
1139   m88k-dg-*        ) machine=aviion ;;
1140   m68*-sony-*      ) machine=news ;;
1141   mips-sony-*      ) machine=news-risc ;;
1142   clipper-*        ) machine=clipper ;;
1143   arm*             ) machine=arm ;;
1144   ns32k-*          ) machine=ns32000 ;;
1145 esac
1146
1147 case "$canonical" in
1148   *-*-linux*    ) opsys=linux ;;
1149   *-*-netbsd*   ) opsys=netbsd ;;
1150   *-*-openbsd*  ) opsys=openbsd ;;
1151   *-*-nextstep* ) opsys=nextstep ;;
1152   *-*-vms       ) opsys=vms ;;
1153
1154     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1155   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1156   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1157   *-dec-osf3*                ) opsys=decosf3-1 ;;
1158   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1159
1160     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1161   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1162   *-*-ultrix* )         opsys=ultrix4-3 ;;
1163
1164     *-*-aix3.1*  ) opsys=aix3-1 ;;
1165   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1166   *-*-aix3*    ) opsys=aix3-2   ;;
1167   *-*-aix4.0*  ) opsys=aix4     ;;
1168   *-*-aix4.1*  ) opsys=aix4-1   ;;
1169   *-*-aix4*    ) opsys=aix4-2   ;;
1170
1171     *-gnu* )                    opsys=gnu    ;;
1172   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1173   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1174   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1175   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1176   *-*-aos*   )                  opsys=bsd4-3 ;;
1177   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1178   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1179   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1180   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1181   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1182   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1183         if test -z "$NON_GNU_CPP" ; then
1184           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1185             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1186           done
1187         fi
1188         opsys=usg5-4-2 ;;
1189     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1190     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1191 esac
1192
1193 case "$canonical" in
1194
1195     *-*-netbsd* )
1196     case "$canonical" in
1197       i[3-9]86-*-netbsd*) machine=intel386 ;;
1198       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1199                                             machine=hp9000s300 ;;
1200       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1201       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1202     esac
1203   ;;
1204
1205     *-*-openbsd* )
1206     case "${canonical}" in
1207       i386-*-openbsd*)          machine=intel386 ;;
1208       m68k-*-openbsd*)          machine=hp9000s300 ;;
1209       mipsel-*-openbsd*)        machine=pmax ;;
1210      esac
1211    ;;
1212
1213     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1214   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1215
1216     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1217   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1218
1219     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1220
1221     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1222
1223     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1224
1225     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1226
1227     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1228
1229     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1230   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1231   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1232
1233   
1234     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1235
1236     *-convex-bsd* | *-convex-convexos* )
1237     machine=convex opsys=bsd4-3
1238     NON_GNU_CPP="cc -E -P"
1239   ;;
1240
1241     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1242
1243     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1244   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1245   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1246   m88k-dg-dgux*                           ) opsys=dgux     ;;
1247
1248     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1249   m88k-motorola-sysv4* )
1250                     machine=delta88k opsys=usg5-4-2
1251   ;;
1252   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1253
1254     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1255   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1256
1257     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1258
1259     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1260   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1261   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1262
1263       m88k-harris-cxux* )
1264         case "`uname -r`" in
1265        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1266        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1267     esac
1268     NON_GNU_CPP="/lib/cpp"
1269   ;;
1270     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1271     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1272
1273     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1274
1275     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1276
1277     *-hp-hpux* )
1278         case "$canonical" in
1279       m68*  ) machine=hp9000s300 ;;
1280       hppa* ) machine=hp800      ;;
1281     esac
1282
1283     case "$canonical" in
1284       *-hp-hpux7*  )  opsys=hpux   ;;
1285       *-hp-hpux8*  )  opsys=hpux8  ;;
1286       *-hp-hpux9*  )  opsys=hpux9  ;;
1287       *-hp-hpux10* )  opsys=hpux10 ;;
1288       *-hp-hpux11* )  opsys=hpux11 ;;
1289       *            )  opsys=hpux   ;;
1290     esac
1291
1292         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1293    echo "    xemacs will be linked with \"strcat.o\""
1294  fi ;; esac
1295
1296     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1297         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1298     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1299
1300     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1301   ;;
1302
1303     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1304   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1305
1306     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1307   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1308   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1309   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1310   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1311   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1312
1313     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1314   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1315
1316     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1317
1318     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1319
1320     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1321
1322     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1323
1324       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1325
1326     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1327
1328     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1329
1330     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1331
1332     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1333
1334         mips-mips-usg* ) machine=mips4 ;;
1335   mips-mips-riscos4 )
1336     machine=mips4
1337     NON_GNU_CC="cc -systype bsd43"
1338     NON_GNU_CPP="cc -systype bsd43 -E"
1339     case "$canonical" in
1340       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1341       mips-mips-riscos5* ) opsys=riscos5 ;;
1342     esac
1343   ;;
1344   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1345   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1346
1347     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1348
1349     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1350
1351     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1352   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1353
1354     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1355
1356     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1357
1358     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1359
1360     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1361
1362     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1363   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1364
1365     mips-siemens-sysv* | mips-sni-sysv*)
1366     machine=mips-siemens opsys=usg5-4
1367     NON_GNU_CC=/usr/ccs/bin/cc
1368     NON_GNU_CPP=/usr/ccs/lib/cpp
1369   ;;
1370
1371     mips-nec-sysv*)
1372     machine=mips-nec
1373     NON_GNU_CC=/usr/ccs/bin/cc
1374     NON_GNU_CPP=/usr/ccs/lib/cpp
1375   ;;
1376
1377       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1378   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1379     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1380   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1381   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1382   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1383   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1384   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1385   mips-sgi-irix*      ) opsys=irix5-0 ;;
1386
1387     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1388   *-sony-news* ) opsys=newsos5 ;;
1389
1390     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1391
1392     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1393         case "$canonical" in
1394       m68*-sunos1* )             machine=sun1     ;;
1395       m68*-sunos2* )             machine=sun2     ;;
1396       m68* )                     machine=sun3     ;;
1397       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1398       i*86-*-* )                 machine=intel386 ;;
1399       rs6000* )                  machine=rs6000   ;;
1400     esac
1401
1402         case "$canonical" in *-sunos5*)
1403       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1404     esac
1405
1406                     case "$canonical" in
1407       *-sunos4* )
1408         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1409         : ;;
1410       *-solaris2* )
1411         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1412         RANLIB=':' ;;
1413     esac
1414
1415     case "$canonical" in
1416       *-solaris*          )
1417         opsys=sol2
1418         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1419         { test "$extra_verbose" = "yes" && cat << EOF
1420     Defining OS_RELEASE = $os_release
1421 EOF
1422 cat >> confdefs.h <<EOF
1423 #define OS_RELEASE $os_release
1424 EOF
1425 }
1426  ;;
1427
1428             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1429       *-sunos4.0*         ) opsys=sunos4-0      ;;
1430       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1431       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1432       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1433       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1434       *-mach*             ) opsys=mach-bsd4-3   ;;
1435       *                   ) opsys=bsd4-2        ;;
1436     esac
1437
1438     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1439
1440         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1441   ;;
1442
1443     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1444
1445     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1446   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1447
1448     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1449
1450     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1451
1452     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1453       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1454
1455     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1456
1457     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1458
1459     vax-dec-* )
1460     case "$canonical" in
1461       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1462       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1463       *-mach* )                         opsys=mach-bsd4-3 ;;
1464     esac
1465   ;;
1466
1467     ns16k-whitechapel-* ) machine=mg1 ;;
1468
1469     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1470
1471     i[3-9]86-*-* )
1472     machine=intel386
1473     case "$canonical" in
1474       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1475       *-isc2.2* )               opsys=isc2-2 ;;
1476       *-isc4.0* )               opsys=isc4-0 ;;
1477       *-isc4.* )                opsys=isc4-1
1478                                 GCC_TEST_OPTIONS=-posix
1479                                 NON_GCC_TEST_OPTIONS=-Xp
1480                                 ;;
1481       *-isc* )                  opsys=isc3-0 ;;
1482       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1483       *-esix* )                 opsys=esix ;;
1484       *-mach* )                 opsys=mach-bsd4-3 ;;
1485       *-xenix* )                opsys=xenix ;;
1486       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1487       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1488       *-bsdi4* )                opsys=bsdos4 ;;
1489       *-bsdi3* )                opsys=bsdos3 ;;
1490       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1491       *-bsdi2* )                opsys=bsdos2 ;;
1492       *-sco3.2v5* )             opsys=sco5 ;;
1493       *-sysv5* )                opsys=sco7 ;;
1494       *-386bsd* )               opsys=386bsd ;;
1495       *-freebsd* )              opsys=freebsd ;;
1496       *-nextstep* )             opsys=nextstep ;;
1497       *-pc-cygwin* )            opsys=cygwin32 ;;
1498       *-pc-mingw* )             opsys=mingw32 ;
1499                                 test -z "$with_tty" && with_tty="no";;
1500           esac
1501   ;;
1502
1503     m68k-*-linux* ) machine=m68k opsys=linux ;;
1504
1505 esac
1506
1507 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1508 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1509
1510 if test -r "${srcdir}/src/m/${machine}.h"; then
1511   machfile="m/${machine}.h"
1512   { test "$extra_verbose" = "yes" && cat << EOF
1513     Defining config_machfile = "$machfile"
1514 EOF
1515 cat >> confdefs.h <<EOF
1516 #define config_machfile "$machfile"
1517 EOF
1518 }
1519
1520 else
1521   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1522   echo "Using configure-time autodetection only."
1523 fi
1524
1525 if test -r "${srcdir}/src/s/${opsys}.h"; then
1526   opsysfile="s/${opsys}.h"
1527   { test "$extra_verbose" = "yes" && cat << EOF
1528     Defining config_opsysfile = "$opsysfile"
1529 EOF
1530 cat >> confdefs.h <<EOF
1531 #define config_opsysfile "$opsysfile"
1532 EOF
1533 }
1534
1535 else
1536   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1537   echo "Using configure-time autodetection only."
1538 fi
1539
1540
1541 if test -z "$dynamic"; then
1542   case "$opsys" in
1543     hpux* | sunos4* ) dynamic=no ;;
1544     *) dynamic=yes ;;
1545   esac
1546 fi
1547 if test "$dynamic" = "yes"; then
1548   case "$opsys" in
1549     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1550     decosf* ) ld_call_shared="-call_shared" ;;
1551   esac
1552 else   case "$opsys" in
1553     sol2 )
1554       echo "Static linking is not supported on Solaris 2."
1555       echo "Rerun configure without specifying --dynamic=no."
1556       exit 1 ;;
1557     linux   ) ld_call_shared="-Bstatic" ;;
1558     decosf* ) ld_call_shared="-non_shared" ;;
1559   esac
1560 fi
1561
1562 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1563
1564 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1565 { test "$extra_verbose" = "yes" && cat << EOF
1566     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1567 EOF
1568 cat >> confdefs.h <<EOF
1569 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1570 EOF
1571 }
1572
1573
1574
1575 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1576 if test "$with_workshop $with_tooltalk" = "yes no"; then
1577   (echo "$progname: Usage error:"
1578 echo " " "--with-workshop requires --with-tooltalk"
1579 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1580 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1581 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1582 fi
1583
1584 if test "$with_workshop" = "yes"; then
1585   { test "$extra_verbose" = "yes" && cat << \EOF
1586     Defining SUNPRO
1587 EOF
1588 cat >> confdefs.h <<\EOF
1589 #define SUNPRO 1
1590 EOF
1591 }
1592
1593   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1594    echo "    xemacs will be linked with \"sunpro.o\""
1595  fi
1596 fi
1597
1598 if test "$with_clash_detection" != "no"; then
1599   { test "$extra_verbose" = "yes" && cat << \EOF
1600     Defining CLASH_DETECTION
1601 EOF
1602 cat >> confdefs.h <<\EOF
1603 #define CLASH_DETECTION 1
1604 EOF
1605 }
1606
1607   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1608    echo "    xemacs will be linked with \"filelock.o\""
1609  fi
1610 fi
1611
1612 test -n "$compiler" && CC="$compiler"
1613 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1614 fi
1615
1616 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1617 if test "${CFLAGS-unset}" != unset
1618   then cflags_specified=yes;
1619   else cflags_specified=no;
1620 fi
1621
1622 xe_save_CFLAGS="$CFLAGS"
1623
1624 # Extract the first word of "gcc", so it can be a program name with args.
1625 set dummy gcc; ac_word=$2
1626 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1627 echo "configure:1628: checking for $ac_word" >&5
1628
1629 if test -n "$CC"; then
1630   ac_cv_prog_CC="$CC" # Let the user override the test.
1631 else
1632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1633   ac_dummy="$PATH"
1634   for ac_dir in $ac_dummy; do
1635     test -z "$ac_dir" && ac_dir=.
1636     if test -f $ac_dir/$ac_word; then
1637       ac_cv_prog_CC="gcc"
1638       break
1639     fi
1640   done
1641   IFS="$ac_save_ifs"
1642 fi
1643 CC="$ac_cv_prog_CC"
1644 if test -n "$CC"; then
1645   echo "$ac_t""$CC" 1>&6
1646 else
1647   echo "$ac_t""no" 1>&6
1648 fi
1649
1650 if test -z "$CC"; then
1651   # Extract the first word of "cc", so it can be a program name with args.
1652 set dummy cc; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655
1656 if test -n "$CC"; then
1657   ac_cv_prog_CC="$CC" # Let the user override the test.
1658 else
1659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1660   ac_prog_rejected=no
1661   ac_dummy="$PATH"
1662   for ac_dir in $ac_dummy; do
1663     test -z "$ac_dir" && ac_dir=.
1664     if test -f $ac_dir/$ac_word; then
1665       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1666         ac_prog_rejected=yes
1667         continue
1668       fi
1669       ac_cv_prog_CC="cc"
1670       break
1671     fi
1672   done
1673   IFS="$ac_save_ifs"
1674 if test $ac_prog_rejected = yes; then
1675   # We found a bogon in the path, so make sure we never use it.
1676   set dummy $ac_cv_prog_CC
1677   shift
1678   if test $# -gt 0; then
1679     # We chose a different compiler from the bogus one.
1680     # However, it has the same basename, so the bogon will be chosen
1681     # first if we set CC to just the basename; use the full file name.
1682     shift
1683     set dummy "$ac_dir/$ac_word" "$@"
1684     shift
1685     ac_cv_prog_CC="$@"
1686   fi
1687 fi
1688 fi
1689 CC="$ac_cv_prog_CC"
1690 if test -n "$CC"; then
1691   echo "$ac_t""$CC" 1>&6
1692 else
1693   echo "$ac_t""no" 1>&6
1694 fi
1695
1696   if test -z "$CC"; then
1697     case "`uname -s`" in
1698     *win32* | *WIN32*)
1699       # Extract the first word of "cl", so it can be a program name with args.
1700 set dummy cl; ac_word=$2
1701 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1702 echo "configure:1703: checking for $ac_word" >&5
1703
1704 if test -n "$CC"; then
1705   ac_cv_prog_CC="$CC" # Let the user override the test.
1706 else
1707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1708   ac_dummy="$PATH"
1709   for ac_dir in $ac_dummy; do
1710     test -z "$ac_dir" && ac_dir=.
1711     if test -f $ac_dir/$ac_word; then
1712       ac_cv_prog_CC="cl"
1713       break
1714     fi
1715   done
1716   IFS="$ac_save_ifs"
1717 fi
1718 CC="$ac_cv_prog_CC"
1719 if test -n "$CC"; then
1720   echo "$ac_t""$CC" 1>&6
1721 else
1722   echo "$ac_t""no" 1>&6
1723 fi
1724  ;;
1725     esac
1726   fi
1727   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1728 fi
1729
1730 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1731 echo "configure:1732: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1732
1733 ac_ext=c
1734 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1735 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1736 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'
1737 ac_cpp='$CPP '"$xe_cppflags"
1738 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1739 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1740 cross_compiling=no
1741
1742 cat > conftest.$ac_ext << EOF
1743
1744 #line 1745 "configure"
1745 #include "confdefs.h"
1746
1747 main(){return(0);}
1748 EOF
1749 if { (eval echo configure:1750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1750   ac_cv_prog_cc_works=yes
1751   # If we can't run a trivial program, we are probably using a cross compiler.
1752   if (./conftest; exit) 2>/dev/null; then
1753     ac_cv_prog_cc_cross=no
1754   else
1755     ac_cv_prog_cc_cross=yes
1756   fi
1757 else
1758   echo "configure: failed program was:" >&5
1759   cat conftest.$ac_ext >&5
1760   ac_cv_prog_cc_works=no
1761 fi
1762 rm -fr conftest*
1763 ac_ext=c
1764 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1765 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1766 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'
1767 ac_cpp='$CPP '"$xe_cppflags"
1768 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1769 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1770 cross_compiling=no
1771
1772 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1773 if test $ac_cv_prog_cc_works = no; then
1774   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1775 fi
1776 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1777 echo "configure:1778: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1778 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1779 cross_compiling=$ac_cv_prog_cc_cross
1780
1781 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1782 echo "configure:1783: checking whether we are using GNU C" >&5
1783
1784 cat > conftest.c <<EOF
1785 #ifdef __GNUC__
1786   yes;
1787 #endif
1788 EOF
1789 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1790: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1790   ac_cv_prog_gcc=yes
1791 else
1792   ac_cv_prog_gcc=no
1793 fi
1794
1795 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1796
1797 if test $ac_cv_prog_gcc = yes; then
1798   GCC=yes
1799 else
1800   GCC=
1801 fi
1802
1803 ac_test_CFLAGS="${CFLAGS+set}"
1804 ac_save_CFLAGS="$CFLAGS"
1805 CFLAGS=
1806 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1807 echo "configure:1808: checking whether ${CC-cc} accepts -g" >&5
1808
1809 echo 'void f(){}' > conftest.c
1810 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1811   ac_cv_prog_cc_g=yes
1812 else
1813   ac_cv_prog_cc_g=no
1814 fi
1815 rm -f conftest*
1816
1817
1818 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1819 if test "$ac_test_CFLAGS" = set; then
1820   CFLAGS="$ac_save_CFLAGS"
1821 elif test $ac_cv_prog_cc_g = yes; then
1822   if test "$GCC" = yes; then
1823     CFLAGS="-g -O2"
1824   else
1825     CFLAGS="-g"
1826   fi
1827 else
1828   if test "$GCC" = yes; then
1829     CFLAGS="-O2"
1830   else
1831     CFLAGS=
1832   fi
1833 fi
1834  
1835 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1836   CC=${NON_GNU_CC-cc}
1837   # Extract the first word of "gcc", so it can be a program name with args.
1838 set dummy gcc; ac_word=$2
1839 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1840 echo "configure:1841: checking for $ac_word" >&5
1841
1842 if test -n "$CC"; then
1843   ac_cv_prog_CC="$CC" # Let the user override the test.
1844 else
1845   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1846   ac_dummy="$PATH"
1847   for ac_dir in $ac_dummy; do
1848     test -z "$ac_dir" && ac_dir=.
1849     if test -f $ac_dir/$ac_word; then
1850       ac_cv_prog_CC="gcc"
1851       break
1852     fi
1853   done
1854   IFS="$ac_save_ifs"
1855 fi
1856 CC="$ac_cv_prog_CC"
1857 if test -n "$CC"; then
1858   echo "$ac_t""$CC" 1>&6
1859 else
1860   echo "$ac_t""no" 1>&6
1861 fi
1862
1863 if test -z "$CC"; then
1864   # Extract the first word of "cc", so it can be a program name with args.
1865 set dummy cc; ac_word=$2
1866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1867 echo "configure:1868: checking for $ac_word" >&5
1868
1869 if test -n "$CC"; then
1870   ac_cv_prog_CC="$CC" # Let the user override the test.
1871 else
1872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1873   ac_prog_rejected=no
1874   ac_dummy="$PATH"
1875   for ac_dir in $ac_dummy; do
1876     test -z "$ac_dir" && ac_dir=.
1877     if test -f $ac_dir/$ac_word; then
1878       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1879         ac_prog_rejected=yes
1880         continue
1881       fi
1882       ac_cv_prog_CC="cc"
1883       break
1884     fi
1885   done
1886   IFS="$ac_save_ifs"
1887 if test $ac_prog_rejected = yes; then
1888   # We found a bogon in the path, so make sure we never use it.
1889   set dummy $ac_cv_prog_CC
1890   shift
1891   if test $# -gt 0; then
1892     # We chose a different compiler from the bogus one.
1893     # However, it has the same basename, so the bogon will be chosen
1894     # first if we set CC to just the basename; use the full file name.
1895     shift
1896     set dummy "$ac_dir/$ac_word" "$@"
1897     shift
1898     ac_cv_prog_CC="$@"
1899   fi
1900 fi
1901 fi
1902 CC="$ac_cv_prog_CC"
1903 if test -n "$CC"; then
1904   echo "$ac_t""$CC" 1>&6
1905 else
1906   echo "$ac_t""no" 1>&6
1907 fi
1908
1909   if test -z "$CC"; then
1910     case "`uname -s`" in
1911     *win32* | *WIN32*)
1912       # Extract the first word of "cl", so it can be a program name with args.
1913 set dummy cl; ac_word=$2
1914 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1915 echo "configure:1916: checking for $ac_word" >&5
1916
1917 if test -n "$CC"; then
1918   ac_cv_prog_CC="$CC" # Let the user override the test.
1919 else
1920   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1921   ac_dummy="$PATH"
1922   for ac_dir in $ac_dummy; do
1923     test -z "$ac_dir" && ac_dir=.
1924     if test -f $ac_dir/$ac_word; then
1925       ac_cv_prog_CC="cl"
1926       break
1927     fi
1928   done
1929   IFS="$ac_save_ifs"
1930 fi
1931 CC="$ac_cv_prog_CC"
1932 if test -n "$CC"; then
1933   echo "$ac_t""$CC" 1>&6
1934 else
1935   echo "$ac_t""no" 1>&6
1936 fi
1937  ;;
1938     esac
1939   fi
1940   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1941 fi
1942
1943 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1944 echo "configure:1945: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1945
1946 ac_ext=c
1947 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1948 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1949 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'
1950 ac_cpp='$CPP '"$xe_cppflags"
1951 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1952 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1953 cross_compiling=no
1954
1955 cat > conftest.$ac_ext << EOF
1956
1957 #line 1958 "configure"
1958 #include "confdefs.h"
1959
1960 main(){return(0);}
1961 EOF
1962 if { (eval echo configure:1963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1963   ac_cv_prog_cc_works=yes
1964   # If we can't run a trivial program, we are probably using a cross compiler.
1965   if (./conftest; exit) 2>/dev/null; then
1966     ac_cv_prog_cc_cross=no
1967   else
1968     ac_cv_prog_cc_cross=yes
1969   fi
1970 else
1971   echo "configure: failed program was:" >&5
1972   cat conftest.$ac_ext >&5
1973   ac_cv_prog_cc_works=no
1974 fi
1975 rm -fr conftest*
1976 ac_ext=c
1977 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1978 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1979 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'
1980 ac_cpp='$CPP '"$xe_cppflags"
1981 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1982 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1983 cross_compiling=no
1984
1985 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1986 if test $ac_cv_prog_cc_works = no; then
1987   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1988 fi
1989 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1990 echo "configure:1991: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1991 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1992 cross_compiling=$ac_cv_prog_cc_cross
1993
1994 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1995 echo "configure:1996: checking whether we are using GNU C" >&5
1996
1997 cat > conftest.c <<EOF
1998 #ifdef __GNUC__
1999   yes;
2000 #endif
2001 EOF
2002 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2003   ac_cv_prog_gcc=yes
2004 else
2005   ac_cv_prog_gcc=no
2006 fi
2007
2008 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2009
2010 if test $ac_cv_prog_gcc = yes; then
2011   GCC=yes
2012 else
2013   GCC=
2014 fi
2015
2016 ac_test_CFLAGS="${CFLAGS+set}"
2017 ac_save_CFLAGS="$CFLAGS"
2018 CFLAGS=
2019 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2020 echo "configure:2021: checking whether ${CC-cc} accepts -g" >&5
2021
2022 echo 'void f(){}' > conftest.c
2023 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2024   ac_cv_prog_cc_g=yes
2025 else
2026   ac_cv_prog_cc_g=no
2027 fi
2028 rm -f conftest*
2029
2030
2031 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2032 if test "$ac_test_CFLAGS" = set; then
2033   CFLAGS="$ac_save_CFLAGS"
2034 elif test $ac_cv_prog_cc_g = yes; then
2035   if test "$GCC" = yes; then
2036     CFLAGS="-g -O2"
2037   else
2038     CFLAGS="-g"
2039   fi
2040 else
2041   if test "$GCC" = yes; then
2042     CFLAGS="-O2"
2043   else
2044     CFLAGS=
2045   fi
2046 fi
2047
2048 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2049   CC=gcc
2050   # Extract the first word of "gcc", so it can be a program name with args.
2051 set dummy gcc; ac_word=$2
2052 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2053 echo "configure:2054: checking for $ac_word" >&5
2054
2055 if test -n "$CC"; then
2056   ac_cv_prog_CC="$CC" # Let the user override the test.
2057 else
2058   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2059   ac_dummy="$PATH"
2060   for ac_dir in $ac_dummy; do
2061     test -z "$ac_dir" && ac_dir=.
2062     if test -f $ac_dir/$ac_word; then
2063       ac_cv_prog_CC="gcc"
2064       break
2065     fi
2066   done
2067   IFS="$ac_save_ifs"
2068 fi
2069 CC="$ac_cv_prog_CC"
2070 if test -n "$CC"; then
2071   echo "$ac_t""$CC" 1>&6
2072 else
2073   echo "$ac_t""no" 1>&6
2074 fi
2075
2076 if test -z "$CC"; then
2077   # Extract the first word of "cc", so it can be a program name with args.
2078 set dummy cc; ac_word=$2
2079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_word" >&5
2081
2082 if test -n "$CC"; then
2083   ac_cv_prog_CC="$CC" # Let the user override the test.
2084 else
2085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2086   ac_prog_rejected=no
2087   ac_dummy="$PATH"
2088   for ac_dir in $ac_dummy; do
2089     test -z "$ac_dir" && ac_dir=.
2090     if test -f $ac_dir/$ac_word; then
2091       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2092         ac_prog_rejected=yes
2093         continue
2094       fi
2095       ac_cv_prog_CC="cc"
2096       break
2097     fi
2098   done
2099   IFS="$ac_save_ifs"
2100 if test $ac_prog_rejected = yes; then
2101   # We found a bogon in the path, so make sure we never use it.
2102   set dummy $ac_cv_prog_CC
2103   shift
2104   if test $# -gt 0; then
2105     # We chose a different compiler from the bogus one.
2106     # However, it has the same basename, so the bogon will be chosen
2107     # first if we set CC to just the basename; use the full file name.
2108     shift
2109     set dummy "$ac_dir/$ac_word" "$@"
2110     shift
2111     ac_cv_prog_CC="$@"
2112   fi
2113 fi
2114 fi
2115 CC="$ac_cv_prog_CC"
2116 if test -n "$CC"; then
2117   echo "$ac_t""$CC" 1>&6
2118 else
2119   echo "$ac_t""no" 1>&6
2120 fi
2121
2122   if test -z "$CC"; then
2123     case "`uname -s`" in
2124     *win32* | *WIN32*)
2125       # Extract the first word of "cl", so it can be a program name with args.
2126 set dummy cl; ac_word=$2
2127 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2128 echo "configure:2129: checking for $ac_word" >&5
2129
2130 if test -n "$CC"; then
2131   ac_cv_prog_CC="$CC" # Let the user override the test.
2132 else
2133   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2134   ac_dummy="$PATH"
2135   for ac_dir in $ac_dummy; do
2136     test -z "$ac_dir" && ac_dir=.
2137     if test -f $ac_dir/$ac_word; then
2138       ac_cv_prog_CC="cl"
2139       break
2140     fi
2141   done
2142   IFS="$ac_save_ifs"
2143 fi
2144 CC="$ac_cv_prog_CC"
2145 if test -n "$CC"; then
2146   echo "$ac_t""$CC" 1>&6
2147 else
2148   echo "$ac_t""no" 1>&6
2149 fi
2150  ;;
2151     esac
2152   fi
2153   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2154 fi
2155
2156 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2157 echo "configure:2158: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2158
2159 ac_ext=c
2160 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2161 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2162 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'
2163 ac_cpp='$CPP '"$xe_cppflags"
2164 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2165 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2166 cross_compiling=no
2167
2168 cat > conftest.$ac_ext << EOF
2169
2170 #line 2171 "configure"
2171 #include "confdefs.h"
2172
2173 main(){return(0);}
2174 EOF
2175 if { (eval echo configure:2176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2176   ac_cv_prog_cc_works=yes
2177   # If we can't run a trivial program, we are probably using a cross compiler.
2178   if (./conftest; exit) 2>/dev/null; then
2179     ac_cv_prog_cc_cross=no
2180   else
2181     ac_cv_prog_cc_cross=yes
2182   fi
2183 else
2184   echo "configure: failed program was:" >&5
2185   cat conftest.$ac_ext >&5
2186   ac_cv_prog_cc_works=no
2187 fi
2188 rm -fr conftest*
2189 ac_ext=c
2190 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2191 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2192 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'
2193 ac_cpp='$CPP '"$xe_cppflags"
2194 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2195 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2196 cross_compiling=no
2197
2198 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2199 if test $ac_cv_prog_cc_works = no; then
2200   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2201 fi
2202 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2203 echo "configure:2204: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2204 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2205 cross_compiling=$ac_cv_prog_cc_cross
2206
2207 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2208 echo "configure:2209: checking whether we are using GNU C" >&5
2209
2210 cat > conftest.c <<EOF
2211 #ifdef __GNUC__
2212   yes;
2213 #endif
2214 EOF
2215 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2216   ac_cv_prog_gcc=yes
2217 else
2218   ac_cv_prog_gcc=no
2219 fi
2220
2221 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2222
2223 if test $ac_cv_prog_gcc = yes; then
2224   GCC=yes
2225 else
2226   GCC=
2227 fi
2228
2229 ac_test_CFLAGS="${CFLAGS+set}"
2230 ac_save_CFLAGS="$CFLAGS"
2231 CFLAGS=
2232 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2233 echo "configure:2234: checking whether ${CC-cc} accepts -g" >&5
2234
2235 echo 'void f(){}' > conftest.c
2236 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2237   ac_cv_prog_cc_g=yes
2238 else
2239   ac_cv_prog_cc_g=no
2240 fi
2241 rm -f conftest*
2242
2243
2244 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2245 if test "$ac_test_CFLAGS" = set; then
2246   CFLAGS="$ac_save_CFLAGS"
2247 elif test $ac_cv_prog_cc_g = yes; then
2248   if test "$GCC" = yes; then
2249     CFLAGS="-g -O2"
2250   else
2251     CFLAGS="-g"
2252   fi
2253 else
2254   if test "$GCC" = yes; then
2255     CFLAGS="-O2"
2256   else
2257     CFLAGS=
2258   fi
2259 fi
2260
2261 fi
2262 CFLAGS="$xe_save_CFLAGS"
2263
2264
2265 test -n "$CPP" -a -d "$CPP" && CPP=
2266
2267 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2268
2269 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2270 echo "configure:2271: checking how to run the C preprocessor" >&5
2271 # On Suns, sometimes $CPP names a directory.
2272 if test -n "$CPP" && test -d "$CPP"; then
2273   CPP=
2274 fi
2275 if test -z "$CPP"; then
2276
2277   # This must be in double quotes, not single quotes, because CPP may get
2278   # substituted into the Makefile and "${CC-cc}" will confuse make.
2279   CPP="${CC-cc} -E"
2280   # On the NeXT, cc -E runs the code through the compiler's parser,
2281   # not just through cpp.
2282   cat > conftest.$ac_ext <<EOF
2283 #line 2284 "configure"
2284 #include "confdefs.h"
2285 #include <assert.h>
2286 Syntax Error
2287 EOF
2288 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2289 { (eval echo configure:2290: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2290 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2291 if test -z "$ac_err"; then
2292   :
2293 else
2294   echo "$ac_err" >&5
2295   echo "configure: failed program was:" >&5
2296   cat conftest.$ac_ext >&5
2297   rm -rf conftest*
2298   CPP="${CC-cc} -E -traditional-cpp"
2299   cat > conftest.$ac_ext <<EOF
2300 #line 2301 "configure"
2301 #include "confdefs.h"
2302 #include <assert.h>
2303 Syntax Error
2304 EOF
2305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2306 { (eval echo configure:2307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2308 if test -z "$ac_err"; then
2309   :
2310 else
2311   echo "$ac_err" >&5
2312   echo "configure: failed program was:" >&5
2313   cat conftest.$ac_ext >&5
2314   rm -rf conftest*
2315   CPP="${CC-cc} -nologo -E"
2316   cat > conftest.$ac_ext <<EOF
2317 #line 2318 "configure"
2318 #include "confdefs.h"
2319 #include <assert.h>
2320 Syntax Error
2321 EOF
2322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2323 { (eval echo configure:2324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2325 if test -z "$ac_err"; then
2326   :
2327 else
2328   echo "$ac_err" >&5
2329   echo "configure: failed program was:" >&5
2330   cat conftest.$ac_ext >&5
2331   rm -rf conftest*
2332   CPP=/lib/cpp
2333 fi
2334 rm -f conftest*
2335 fi
2336 rm -f conftest*
2337 fi
2338 rm -f conftest*
2339   ac_cv_prog_CPP="$CPP"
2340   CPP="$ac_cv_prog_CPP"
2341 else
2342   ac_cv_prog_CPP="$CPP"
2343 fi
2344 echo "$ac_t""$CPP" 1>&6
2345
2346
2347
2348 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2349 echo "configure:2350: checking for AIX" >&5
2350 cat > conftest.$ac_ext <<EOF
2351 #line 2352 "configure"
2352 #include "confdefs.h"
2353 #ifdef _AIX
2354   yes
2355 #endif
2356
2357 EOF
2358 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2359   egrep "yes" >/dev/null 2>&1; then
2360   rm -rf conftest*
2361   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2362     Defining _ALL_SOURCE
2363 EOF
2364 cat >> confdefs.h <<\EOF
2365 #define _ALL_SOURCE 1
2366 EOF
2367 }
2368
2369 else
2370   rm -rf conftest*
2371   echo "$ac_t""no" 1>&6
2372 fi
2373 rm -f conftest*
2374
2375  
2376
2377 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2378 echo "configure:2379: checking for GNU libc" >&5
2379 cat > conftest.$ac_ext <<EOF
2380 #line 2381 "configure"
2381 #include "confdefs.h"
2382 #include <features.h>
2383 int main() {
2384
2385 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2386 #error Not a GNU libc system :-(
2387 ******* ======= ******** &&&&&&&&
2388 #endif
2389
2390 ; return 0; }
2391 EOF
2392 if { (eval echo configure:2393: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2393   rm -rf conftest*
2394   have_glibc=yes
2395 else
2396   echo "configure: failed program was:" >&5
2397   cat conftest.$ac_ext >&5
2398   rm -rf conftest*
2399   have_glibc=no
2400 fi
2401 rm -f conftest*
2402 echo "$ac_t""$have_glibc" 1>&6
2403 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2404     Defining _GNU_SOURCE
2405 EOF
2406 cat >> confdefs.h <<\EOF
2407 #define _GNU_SOURCE 1
2408 EOF
2409 }
2410
2411
2412 case "$opsys" in
2413   sol2)
2414    { test "$extra_verbose" = "yes" && cat << \EOF
2415     Defining __EXTENSIONS__
2416 EOF
2417 cat >> confdefs.h <<\EOF
2418 #define __EXTENSIONS__ 1
2419 EOF
2420 }
2421
2422       if test "$os_release" -ge 55; then
2423      { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining _XOPEN_SOURCE = 500
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define _XOPEN_SOURCE 500
2428 EOF
2429 }
2430
2431      { test "$extra_verbose" = "yes" && cat << \EOF
2432     Defining _XOPEN_SOURCE_EXTENDED
2433 EOF
2434 cat >> confdefs.h <<\EOF
2435 #define _XOPEN_SOURCE_EXTENDED 1
2436 EOF
2437 }
2438
2439    fi ;;
2440   linux)
2441     { test "$extra_verbose" = "yes" && cat << \EOF
2442     Defining _POSIX_C_SOURCE = 199506L
2443 EOF
2444 cat >> confdefs.h <<\EOF
2445 #define _POSIX_C_SOURCE 199506L
2446 EOF
2447 }
2448
2449     { test "$extra_verbose" = "yes" && cat << \EOF
2450     Defining _XOPEN_SOURCE = 500
2451 EOF
2452 cat >> confdefs.h <<\EOF
2453 #define _XOPEN_SOURCE 500
2454 EOF
2455 }
2456
2457     { test "$extra_verbose" = "yes" && cat << \EOF
2458     Defining _XOPEN_SOURCE_EXTENDED
2459 EOF
2460 cat >> confdefs.h <<\EOF
2461 #define _XOPEN_SOURCE_EXTENDED 1
2462 EOF
2463 }
2464
2465     ;;
2466 esac
2467
2468 cat > conftest.$ac_ext <<EOF
2469 #line 2470 "configure"
2470 #include "confdefs.h"
2471 int main () {
2472 #if defined __SUNPRO_C
2473 return 11;
2474 #elif defined __DECC
2475 return 12;
2476 #elif defined __USLC__ && defined __SCO_VERSION__
2477 return 13;
2478 #else
2479 return 0;
2480 #endif
2481 }
2482 EOF
2483 if { (eval echo configure:2484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2484 then
2485   :
2486 else
2487   conftest_rc="$?"
2488   echo "configure: failed program was:" >&5
2489   cat conftest.$ac_ext >&5
2490   rm -fr conftest*
2491   case "$conftest_rc" in
2492   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2493   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2494   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2495 esac
2496 fi
2497 rm -fr conftest*
2498
2499
2500
2501
2502 echo "Extracting information from the machine- and system-dependent headers..."
2503
2504 tempcname="conftest.c"
2505
2506
2507
2508 cat > $tempcname < confdefs.h
2509 cat >> $tempcname <<EOF
2510 #define NOT_C_CODE
2511 #define C_SWITCH_SITE
2512 #define C_SWITCH_X_SITE
2513 #define LD_SWITCH_SITE
2514 #define LD_SWITCH_X_SITE
2515 #define LD_SWITCH_X_SITE_AUX
2516 #define OS_RELEASE $os_release
2517
2518 #ifdef config_opsysfile
2519 #include "$srcdir/src/$opsysfile"
2520 #endif
2521
2522 #ifdef config_machfile
2523 #include "$srcdir/src/$machfile"
2524 #endif
2525
2526 #ifndef LIBS_MACHINE
2527 #define LIBS_MACHINE
2528 #endif
2529 configure___ libs_machine=LIBS_MACHINE
2530
2531 #ifndef LIBS_SYSTEM
2532 #define LIBS_SYSTEM
2533 #endif
2534 configure___ libs_system=LIBS_SYSTEM
2535
2536 #ifndef LIBS_TERMCAP
2537 #define LIBS_TERMCAP
2538 #endif
2539 configure___ libs_termcap=LIBS_TERMCAP
2540
2541 #ifndef LIB_STANDARD
2542 #define LIB_STANDARD
2543 #endif
2544 configure___ libs_standard=LIB_STANDARD
2545
2546
2547 #ifndef OBJECTS_MACHINE
2548 #define OBJECTS_MACHINE
2549 #endif
2550 configure___ objects_machine=OBJECTS_MACHINE
2551
2552 #ifndef OBJECTS_SYSTEM
2553 #define OBJECTS_SYSTEM
2554 #endif
2555 configure___ objects_system=OBJECTS_SYSTEM
2556
2557
2558 #ifndef C_SWITCH_MACHINE
2559 #define C_SWITCH_MACHINE
2560 #endif
2561 configure___ c_switch_machine=C_SWITCH_MACHINE
2562
2563 #ifndef C_SWITCH_SYSTEM
2564 #define C_SWITCH_SYSTEM
2565 #endif
2566 configure___ c_switch_system=C_SWITCH_SYSTEM
2567
2568
2569 #ifndef LD_SWITCH_MACHINE
2570 #define LD_SWITCH_MACHINE
2571 #endif
2572 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2573
2574 #ifndef LD_SWITCH_SYSTEM
2575 #define LD_SWITCH_SYSTEM
2576 #endif
2577 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2578
2579
2580 #ifndef UNEXEC
2581 #define UNEXEC "unexec.o"
2582 #endif
2583 configure___ unexec=UNEXEC
2584
2585
2586 #ifndef LD_SWITCH_SHARED
2587 #define LD_SWITCH_SHARED "-c"
2588 #endif
2589 configure___ ld_switch_shared=LD_SWITCH_SHARED
2590
2591
2592 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2593 configure___ ordinary_ld=ORDINARY_LD
2594
2595 #ifdef ORDINARY_LINK
2596 #define LD ORDINARY_LD
2597 #else /* no ORDINARY LINK */
2598 #ifdef COFF_ENCAPSULATE
2599 #define LD "\$(CC) -nostdlib"
2600 #else /* not COFF_ENCAPSULATE */
2601 #ifdef LINKER
2602 #define LD LINKER
2603 #else /* ! defined (LINKER) */
2604 #define LD "ld"
2605 #endif /* ! defined (LINKER) */
2606 #endif /* ! defined (COFF_ENCAPSULATE) */
2607 #endif /* not ORDINARY_LINK */
2608 configure___ ld=LD
2609
2610 #ifndef LIB_GCC
2611 #define LIB_GCC
2612 #endif
2613 configure___ lib_gcc=LIB_GCC
2614
2615 #ifndef LD_TEXT_START_ADDR
2616 #define LD_TEXT_START_ADDR
2617 #endif
2618 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2619
2620
2621 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2622 #ifdef NO_REMAP
2623 #ifdef COFF_ENCAPSULATE
2624 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2625 #else /* ! defined (COFF_ENCAPSULATE) */
2626 #define START_FILES "pre-crt0.o /lib/crt0.o"
2627 #endif /* ! defined (COFF_ENCAPSULATE) */
2628 #else /* ! defined (NO_REMAP) */
2629 #define START_FILES "ecrt0.o"
2630 #endif /* ! defined (NO_REMAP) */
2631 #endif /* no ORDINARY_LINK */
2632 #ifndef START_FILES
2633 #define START_FILES
2634 #endif
2635 configure___ start_files=START_FILES
2636
2637 #ifdef ORDINARY_LINK
2638 configure___ ordinary_link=yes
2639 #else
2640 configure___ ordinary_link=no
2641 #endif
2642
2643 #ifdef SYSTEM_MALLOC
2644 configure___ system_malloc=yes
2645 #else
2646 configure___ system_malloc=no
2647 #endif
2648
2649 #ifdef TERMINFO
2650 configure___ have_terminfo=yes
2651 #else
2652 configure___ have_terminfo=no
2653 #endif
2654
2655 #ifdef MAIL_USE_FLOCK
2656 configure___ mail_use_flock=yes
2657 #else
2658 configure___ mail_use_flock=no
2659 #endif
2660
2661 #ifdef MAIL_USE_LOCKF
2662 configure___ mail_use_lockf=yes
2663 #else
2664 configure___ mail_use_lockf=no
2665 #endif
2666
2667 #ifdef MAIL_USE_LOCKING
2668 configure___ mail_use_locking=yes
2669 #else
2670 configure___ mail_use_locking=no
2671 #endif
2672
2673 #ifdef HAVE_WIN32_PROCESSES
2674 configure___ win32_processes=yes
2675 #else
2676 configure___ win32_processes=no
2677 #endif
2678
2679 EOF
2680
2681 CPP=`eval "echo $CPP $CPPFLAGS"`
2682 eval `$CPP -Isrc $tempcname \
2683         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2684
2685 rm $tempcname
2686
2687 if test "$pdump" = "yes"; then
2688   ordinary_link="yes"
2689   ld="${ordinary_ld}"
2690   start_files=
2691   libs_standard=
2692   unexec=
2693   lib_gcc=
2694 fi
2695
2696 test "$extra_verbose" = "yes" && \
2697   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 ""
2698
2699 case "$opsys" in mingw* | cygwin*)
2700   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2701   cygwin_include=`eval "dirname $cygwin_include"` ;
2702   cygwin_include="-I$cygwin_include/../include" ;
2703   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2704   case "$opsys" in mingw*)
2705     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2706   esac
2707   ;;
2708 esac
2709
2710 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2711
2712
2713 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2714
2715 if test "$__USLC__" = yes; then
2716   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2717 echo "configure:2718: checking for whether the -Kalloca compiler flag is needed" >&5
2718   need_kalloca=no
2719   cat > conftest.$ac_ext <<EOF
2720 #line 2721 "configure"
2721 #include "confdefs.h"
2722
2723 int main() {
2724 void *x = alloca(4);
2725 ; return 0; }
2726 EOF
2727 if { (eval echo configure:2728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2728   rm -rf conftest*
2729   :
2730 else
2731   echo "configure: failed program was:" >&5
2732   cat conftest.$ac_ext >&5
2733   rm -rf conftest*
2734   
2735     xe_save_c_switch_system="$c_switch_system"
2736     c_switch_system="$c_switch_system -Kalloca"
2737     cat > conftest.$ac_ext <<EOF
2738 #line 2739 "configure"
2739 #include "confdefs.h"
2740
2741 int main() {
2742 void *x = alloca(4);
2743 ; return 0; }
2744 EOF
2745 if { (eval echo configure:2746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2746   rm -rf conftest*
2747    need_kalloca=yes 
2748 else
2749   echo "configure: failed program was:" >&5
2750   cat conftest.$ac_ext >&5
2751 fi
2752 rm -f conftest*
2753     c_switch_system="$xe_save_c_switch_system"
2754 fi
2755 rm -f conftest*
2756   echo "$ac_t""$need_kalloca" 1>&6
2757   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
2758 fi
2759
2760 if test "$cflags_specified" = "no"; then
2761       if   test "$GCC" = "yes"; then
2762     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2763             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2764               elif test "$__SUNPRO_C" = "yes"; then
2765     case "$opsys" in
2766       sol2    ) CFLAGS="-v -xO4" ;;
2767       sunos4* ) CFLAGS="-xO2";;
2768     esac
2769   elif test "$__DECC" = "yes"; then
2770     CFLAGS="-O3"
2771   elif test "$CC" = "xlc"; then
2772     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2773     else
2774     CFLAGS="-O" ;  fi
2775 fi
2776
2777 if test "$GCC" = "yes"; then
2778 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2779 echo "configure:2780: checking for buggy gcc versions" >&5
2780 GCC_VERSION=`$CC --version`
2781 case `uname -s`:`uname -m`:$GCC_VERSION in
2782                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2783                         case "$CFLAGS" in
2784             *-O2*|*-O3*)
2785                 case "$CFLAGS" in
2786                     *-fno-schedule-insns*) ;;
2787                     *)
2788                         echo "$ac_t""yes" 1>&6
2789                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2790                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2791                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2792                         ;;
2793                 esac
2794                 ;;
2795         esac
2796         ;;
2797                     Linux:alpha:egcs-2.91.*)
2798         echo "$ac_t""yes" 1>&6
2799         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2800         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2801         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2802         ;;
2803     *:i*86*:2.7.2*)
2804         case "$CFLAGS" in
2805             *-O2*|*-O3*)
2806                 case "$GCC_VERSION" in
2807                     2.7.2)
2808                         case "$CFLAGS" in
2809                             *-fno-strength-reduce*) ;;
2810                             *)
2811                                 echo "$ac_t""yes" 1>&6
2812                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2813                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2814                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2815                                 ;;
2816                         esac
2817                         ;;
2818                 esac
2819                 case "$CFLAGS" in
2820                  *-fno-caller-saves*) ;;
2821                  *)
2822                     echo "$ac_t""yes" 1>&6
2823                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2824                     echo "configure: warning: -fno-caller-saves." 1>&2
2825                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2826                     ;;
2827                 esac
2828                 ;;
2829         esac
2830         ;;
2831 esac
2832 echo "$ac_t""no" 1>&6
2833 fi
2834
2835
2836 if test "$GCC" = "yes"; then
2837   set x $ld_switch_system; shift; ld_switch_system=""
2838   while test -n "$1"; do
2839     case $1 in
2840       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2841       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2842       -Xlinker* ) ;;
2843       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2844     esac
2845     shift
2846   done
2847 fi
2848
2849 if test "$GCC" = "yes"; then
2850   set x $ld_switch_machine; shift; ld_switch_machine=""
2851   while test -n "$1"; do
2852     case $1 in
2853       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2854       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2855       -Xlinker* ) ;;
2856       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2857     esac
2858     shift
2859   done
2860 fi
2861
2862 if test "$GCC" = "yes"; then
2863   set x $LDFLAGS; shift; LDFLAGS=""
2864   while test -n "$1"; do
2865     case $1 in
2866       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2867       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2868       -Xlinker* ) ;;
2869       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2870     esac
2871     shift
2872   done
2873 fi
2874
2875 if test "$GCC" = "yes"; then
2876   set x $ld_call_shared; shift; ld_call_shared=""
2877   while test -n "$1"; do
2878     case $1 in
2879       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2880       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2881       -Xlinker* ) ;;
2882       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2883     esac
2884     shift
2885   done
2886 fi
2887
2888 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2889    echo "    xemacs will be linked with \"$objects_machine\""
2890  fi
2891 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2892    echo "    xemacs will be linked with \"$objects_system\""
2893  fi
2894 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2895    echo "    xemacs will be linked with \"$unexec\""
2896  fi
2897 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2898    echo "    xemacs will be linked with \"dumper.o\""
2899  fi
2900
2901 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2902 echo "configure:2903: checking for dynodump" >&5
2903 if test "$unexec" != "unexsol2.o"; then
2904   echo "$ac_t""no" 1>&6
2905 else
2906   echo "$ac_t""yes" 1>&6
2907   { test "$extra_verbose" = "yes" && cat << \EOF
2908     Defining DYNODUMP
2909 EOF
2910 cat >> confdefs.h <<\EOF
2911 #define DYNODUMP 1
2912 EOF
2913 }
2914
2915   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2916   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2917   case "$machine" in
2918     sparc   ) dynodump_arch=sparc ;;
2919     *86*    ) dynodump_arch=i386  ;;
2920     powerpc ) dynodump_arch=ppc   ;;
2921   esac
2922     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
2923 fi
2924
2925
2926 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2927
2928 if test "$unexec" = "unexaix.o"; then
2929   if   test "$dynamic" = "no"; then
2930   start_flags="-Wl,-bnso,-bnodelcsect"
2931   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2932   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2933     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2934   done
2935   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2936     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2937   done
2938   
2939 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2940 echo "configure:2941: checking for terminateAndUnload in -lC" >&5
2941 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2942
2943 xe_check_libs=" -lC "
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2947 /* Override any gcc2 internal prototype to avoid an error.  */
2948 /* We use char because int might match the return type of a gcc2
2949     builtin and then its argument prototype would still apply.  */
2950 char terminateAndUnload();
2951
2952 int main() {
2953 terminateAndUnload()
2954 ; return 0; }
2955 EOF
2956 if { (eval echo configure:2957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2957   rm -rf conftest*
2958   eval "ac_cv_lib_$ac_lib_var=yes"
2959 else
2960   echo "configure: failed program was:" >&5
2961   cat conftest.$ac_ext >&5
2962   rm -rf conftest*
2963   eval "ac_cv_lib_$ac_lib_var=no"
2964 fi
2965 rm -f conftest*
2966 xe_check_libs=""
2967
2968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2969   echo "$ac_t""yes" 1>&6
2970   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975
2976   fi
2977 elif test -n "$ld_text_start_addr"; then
2978   start_flags="-T $ld_text_start_addr -e __start"
2979 fi
2980
2981
2982
2983
2984 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2985  test -z "$linker" &&  linker='$(CC) -nostdlib'
2986  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2987 fi
2988 test "$GCC" != "yes" && lib_gcc=
2989
2990
2991
2992
2993
2994 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2995 if test -n "$site_libraries"; then
2996   for arg in $site_libraries; do
2997     case "$arg" in
2998      -* ) ;;
2999      * ) test -d "$arg" || \
3000            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3001        arg="-L${arg}" ;;
3002     esac
3003     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3004   done
3005 fi
3006
3007 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3008 if test -n "$site_includes"; then
3009   for arg in $site_includes; do
3010     case "$arg" in
3011       -* ) ;;
3012       * ) test -d "$arg" || \
3013            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3014       arg="-I${arg}" ;;
3015     esac
3016     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3017   done
3018 fi
3019
3020 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3021 if test -n "$site_prefixes"; then
3022   for dir in $site_prefixes; do
3023     lib_dir="${dir}/lib"
3024     inc_dir="${dir}/include"
3025     if test ! -d "$dir"; then
3026       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3027     elif test ! -d "$lib_dir"; then
3028       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3029     else
3030       if test -d "$inc_dir"; then
3031         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
3032       fi
3033       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
3034     fi
3035   done
3036 fi
3037
3038
3039 for dir in "/usr/ccs/lib"; do
3040   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
3041 done
3042
3043 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3044 if test -n "$site_runtime_libraries"; then
3045   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3046   export LD_RUN_PATH
3047 fi
3048
3049
3050
3051
3052
3053 if test -n "$add_runtime_path"; then :;
3054 elif test "$dynamic" = "no"; then add_runtime_path=no
3055 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3056 else case "$opsys" in
3057        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3058        * ) add_runtime_path=no ;;
3059      esac
3060 fi
3061
3062 if test "$add_runtime_path" = "yes"; then
3063       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3064 echo "configure:3065: checking "for runtime libraries flag"" >&5
3065   case "$opsys" in
3066     sol2 ) dash_r="-R" ;;
3067     decosf* | linux* | irix*) dash_r="-rpath " ;;
3068     *)
3069       dash_r=""
3070       for try_dash_r in "-R" "-R " "-rpath "; do
3071         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3072         
3073 if test "$GCC" = "yes"; then
3074   set x $xe_check_libs; shift; xe_check_libs=""
3075   while test -n "$1"; do
3076     case $1 in
3077       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3078       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3079       -Xlinker* ) ;;
3080       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3081     esac
3082     shift
3083   done
3084 fi
3085         cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088
3089 int main() {
3090
3091 ; return 0; }
3092 EOF
3093 if { (eval echo configure:3094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3094   rm -rf conftest*
3095   dash_r="$try_dash_r"
3096 else
3097   echo "configure: failed program was:" >&5
3098   cat conftest.$ac_ext >&5
3099 fi
3100 rm -f conftest*
3101         xe_check_libs=""
3102         test -n "$dash_r" && break
3103       done ;;
3104   esac
3105   if test -n "$dash_r";
3106     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3107     else echo "$ac_t""NONE" 1>&6
3108   fi
3109 fi
3110
3111 xe_add_unique_runpath_dir='
3112   xe_add_p=yes
3113   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3114   done
3115   if test "$xe_add_p" = "yes"; then
3116     test -n "$runpath" && runpath="${runpath}:"
3117     runpath="${runpath}${xe_runpath_dir}"
3118     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3119   fi'
3120
3121
3122
3123
3124 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3125     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3126   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3127   
3128         runpath="" runpath_dirs=""
3129   if test -n "$LD_RUN_PATH"; then
3130     runpath="$LD_RUN_PATH"
3131   elif test "$GCC" = "yes"; then
3132         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3133     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3134     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3135     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3136       case "$arg" in P,* | -L* | -R* )
3137         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3138           {
3139 xe_runpath_dir="$dir"
3140   test "$xe_runpath_dir" != "/lib"     -a \
3141         "$xe_runpath_dir" != "/usr/lib" -a \
3142         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3143   eval "$xe_add_unique_runpath_dir"
3144 }
3145         done ;;
3146       esac
3147     done
3148     ld_switch_run="$ld_switch_run_save"
3149     rm -f conftest*
3150   else
3151         for arg in $ld_switch_site $ld_switch_x_site; do
3152       case "$arg" in -L*) {
3153 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3154   test "$xe_runpath_dir" != "/lib"     -a \
3155         "$xe_runpath_dir" != "/usr/lib" -a \
3156         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3157   eval "$xe_add_unique_runpath_dir"
3158 };; esac
3159     done
3160         if test "$opsys $need_motif" = "sol2 yes"; then
3161       xe_runpath_dir="/opt/SUNWdt/lib";
3162       eval "$xe_add_unique_runpath_dir";
3163     fi
3164   fi 
3165   if test -n "$runpath"; then
3166     ld_switch_run="${dash_r}${runpath}"
3167     
3168 if test "$GCC" = "yes"; then
3169   set x $ld_switch_run; shift; ld_switch_run=""
3170   while test -n "$1"; do
3171     case $1 in
3172       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3173       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3174       -Xlinker* ) ;;
3175       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3176     esac
3177     shift
3178   done
3179 fi
3180     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3181   fi
3182 fi
3183
3184
3185
3186 GNU_MALLOC=yes
3187 if test "$with_dlmalloc" != "no"; then
3188         doug_lea_malloc=yes
3189 else
3190         doug_lea_malloc=no
3191 fi
3192 after_morecore_hook_exists=yes
3193 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3194 echo "configure:3195: checking for malloc_set_state" >&5
3195
3196 cat > conftest.$ac_ext <<EOF
3197 #line 3198 "configure"
3198 #include "confdefs.h"
3199 /* System header to define __stub macros and hopefully few prototypes,
3200     which can conflict with char malloc_set_state(); below.  */
3201 #include <assert.h>
3202 /* Override any gcc2 internal prototype to avoid an error.  */
3203 /* We use char because int might match the return type of a gcc2
3204     builtin and then its argument prototype would still apply.  */
3205 char malloc_set_state();
3206
3207 int main() {
3208
3209 /* The GNU C library defines this for functions which it implements
3210     to always fail with ENOSYS.  Some functions are actually named
3211     something starting with __ and the normal name is an alias.  */
3212 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3213 choke me
3214 #else
3215 malloc_set_state();
3216 #endif
3217
3218 ; return 0; }
3219 EOF
3220 if { (eval echo configure:3221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3221   rm -rf conftest*
3222   eval "ac_cv_func_malloc_set_state=yes"
3223 else
3224   echo "configure: failed program was:" >&5
3225   cat conftest.$ac_ext >&5
3226   rm -rf conftest*
3227   eval "ac_cv_func_malloc_set_state=no"
3228 fi
3229 rm -f conftest*
3230
3231 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3232   echo "$ac_t""yes" 1>&6
3233   :
3234 else
3235   echo "$ac_t""no" 1>&6
3236 doug_lea_malloc=no
3237 fi
3238
3239 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3240 echo "configure:3241: checking whether __after_morecore_hook exists" >&5
3241 cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244 extern void (* __after_morecore_hook)();
3245 int main() {
3246 __after_morecore_hook = 0
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3250   rm -rf conftest*
3251   echo "$ac_t""yes" 1>&6
3252 else
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   echo "$ac_t""no" 1>&6
3257    after_morecore_hook_exists=no
3258 fi
3259 rm -f conftest*
3260 if test "$system_malloc" = "yes" ; then
3261   GNU_MALLOC=no
3262   GNU_MALLOC_reason="
3263     - The GNU allocators don't work with this system configuration."
3264 elif test "$with_system_malloc" = "yes" ; then
3265   GNU_MALLOC=no
3266   GNU_MALLOC_reason="
3267     - User chose not to use GNU allocators."
3268 elif test "$with_debug_malloc" = "yes" ; then
3269   GNU_MALLOC=no
3270   GNU_MALLOC_reason="
3271     - User chose to use Debugging Malloc."
3272 fi
3273
3274 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3275   GNU_MALLOC_reason="
3276     - Using Doug Lea's new malloc from the GNU C Library."
3277   { test "$extra_verbose" = "yes" && cat << \EOF
3278     Defining DOUG_LEA_MALLOC
3279 EOF
3280 cat >> confdefs.h <<\EOF
3281 #define DOUG_LEA_MALLOC 1
3282 EOF
3283 }
3284
3285   if test "$after_morecore_hook_exists" = "no" ; then
3286     GNU_MALLOC_reason="
3287     - Using Doug Lea's new malloc from the Linux C Library."
3288     { test "$extra_verbose" = "yes" && cat << \EOF
3289     Defining _NO_MALLOC_WARNING_
3290 EOF
3291 cat >> confdefs.h <<\EOF
3292 #define _NO_MALLOC_WARNING_ 1
3293 EOF
3294 }
3295
3296   fi
3297 fi
3298
3299
3300
3301
3302 # Extract the first word of "ranlib", so it can be a program name with args.
3303 set dummy ranlib; ac_word=$2
3304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3305 echo "configure:3306: checking for $ac_word" >&5
3306
3307 if test -n "$RANLIB"; then
3308   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3309 else
3310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3311   ac_dummy="$PATH"
3312   for ac_dir in $ac_dummy; do
3313     test -z "$ac_dir" && ac_dir=.
3314     if test -f $ac_dir/$ac_word; then
3315       ac_cv_prog_RANLIB="ranlib"
3316       break
3317     fi
3318   done
3319   IFS="$ac_save_ifs"
3320   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3321 fi
3322 RANLIB="$ac_cv_prog_RANLIB"
3323 if test -n "$RANLIB"; then
3324   echo "$ac_t""$RANLIB" 1>&6
3325 else
3326   echo "$ac_t""no" 1>&6
3327 fi
3328
3329 ac_aux_dir=
3330 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3331   if test -f $ac_dir/install-sh; then
3332     ac_aux_dir=$ac_dir
3333     ac_install_sh="$ac_aux_dir/install-sh -c"
3334     break
3335   elif test -f $ac_dir/install.sh; then
3336     ac_aux_dir=$ac_dir
3337     ac_install_sh="$ac_aux_dir/install.sh -c"
3338     break
3339   fi
3340 done
3341 if test -z "$ac_aux_dir"; then
3342   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3343 fi
3344 ac_config_guess=$ac_aux_dir/config.guess
3345 ac_config_sub=$ac_aux_dir/config.sub
3346 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3347
3348 # Find a good install program.  We prefer a C program (faster),
3349 # so one script is as good as another.  But avoid the broken or
3350 # incompatible versions:
3351 # SysV /etc/install, /usr/sbin/install
3352 # SunOS /usr/etc/install
3353 # IRIX /sbin/install
3354 # AIX /bin/install
3355 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3356 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3357 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3358 # ./install, which can be erroneously created by make from ./install.sh.
3359 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3360 echo "configure:3361: checking for a BSD compatible install" >&5
3361 if test -z "$INSTALL"; then
3362
3363   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3364   for ac_dir in $PATH; do
3365     # Account for people who put trailing slashes in PATH elements.
3366     case "$ac_dir/" in
3367     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3368     *)
3369       # OSF1 and SCO ODT 3.0 have their own names for install.
3370       # Don't use installbsd from OSF since it installs stuff as root
3371       # by default.
3372       for ac_prog in ginstall scoinst install; do
3373         if test -f $ac_dir/$ac_prog; then
3374           if test $ac_prog = install &&
3375             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3376             # AIX install.  It has an incompatible calling convention.
3377             :
3378           else
3379             ac_cv_path_install="$ac_dir/$ac_prog -c"
3380             break 2
3381           fi
3382         fi
3383       done
3384       ;;
3385     esac
3386   done
3387   IFS="$ac_save_IFS"
3388
3389   if test "${ac_cv_path_install+set}" = set; then
3390     INSTALL="$ac_cv_path_install"
3391   else
3392     # As a last resort, use the slow shell script.  We don't cache a
3393     # path for INSTALL within a source directory, because that will
3394     # break other packages using the cache if that directory is
3395     # removed, or if the path is relative.
3396     INSTALL="$ac_install_sh"
3397   fi
3398 fi
3399 echo "$ac_t""$INSTALL" 1>&6
3400
3401 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3402 # It thinks the first close brace ends the variable substitution.
3403 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3404
3405 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3406
3407 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3408
3409 for ac_prog in 'bison -y' byacc
3410 do
3411 # Extract the first word of "$ac_prog", so it can be a program name with args.
3412 set dummy $ac_prog; ac_word=$2
3413 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3414 echo "configure:3415: checking for $ac_word" >&5
3415
3416 if test -n "$YACC"; then
3417   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3418 else
3419   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3420   ac_dummy="$PATH"
3421   for ac_dir in $ac_dummy; do
3422     test -z "$ac_dir" && ac_dir=.
3423     if test -f $ac_dir/$ac_word; then
3424       ac_cv_prog_YACC="$ac_prog"
3425       break
3426     fi
3427   done
3428   IFS="$ac_save_ifs"
3429 fi
3430 YACC="$ac_cv_prog_YACC"
3431 if test -n "$YACC"; then
3432   echo "$ac_t""$YACC" 1>&6
3433 else
3434   echo "$ac_t""no" 1>&6
3435 fi
3436
3437 test -n "$YACC" && break
3438 done
3439 test -n "$YACC" || YACC="yacc"
3440
3441
3442 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 
3443 do
3444 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3445 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3446 echo "configure:3447: checking for $ac_hdr" >&5
3447
3448 cat > conftest.$ac_ext <<EOF
3449 #line 3450 "configure"
3450 #include "confdefs.h"
3451 #include <$ac_hdr>
3452 EOF
3453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3454 { (eval echo configure:3455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3456 if test -z "$ac_err"; then
3457   rm -rf conftest*
3458   eval "ac_cv_header_$ac_safe=yes"
3459 else
3460   echo "$ac_err" >&5
3461   echo "configure: failed program was:" >&5
3462   cat conftest.$ac_ext >&5
3463   rm -rf conftest*
3464   eval "ac_cv_header_$ac_safe=no"
3465 fi
3466 rm -f conftest*
3467 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3468   echo "$ac_t""yes" 1>&6
3469     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3470   { test "$extra_verbose" = "yes" && cat << EOF
3471     Defining $ac_tr_hdr
3472 EOF
3473 cat >> confdefs.h <<EOF
3474 #define $ac_tr_hdr 1
3475 EOF
3476 }
3477  
3478 else
3479   echo "$ac_t""no" 1>&6
3480 fi
3481 done
3482
3483 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3484 echo "configure:3485: checking for sys/wait.h that is POSIX.1 compatible" >&5
3485
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 #include <sys/types.h>
3490 #include <sys/wait.h>
3491 #ifndef WEXITSTATUS
3492 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3493 #endif
3494 #ifndef WIFEXITED
3495 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3496 #endif
3497 int main() {
3498 int s;
3499 wait (&s);
3500 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3501 ; return 0; }
3502 EOF
3503 if { (eval echo configure:3504: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3504   rm -rf conftest*
3505   ac_cv_header_sys_wait_h=yes
3506 else
3507   echo "configure: failed program was:" >&5
3508   cat conftest.$ac_ext >&5
3509   rm -rf conftest*
3510   ac_cv_header_sys_wait_h=no
3511 fi
3512 rm -f conftest*
3513
3514 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3515 if test $ac_cv_header_sys_wait_h = yes; then
3516   { test "$extra_verbose" = "yes" && cat << \EOF
3517     Defining HAVE_SYS_WAIT_H
3518 EOF
3519 cat >> confdefs.h <<\EOF
3520 #define HAVE_SYS_WAIT_H 1
3521 EOF
3522 }
3523
3524 fi
3525
3526 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3527 echo "configure:3528: checking for ANSI C header files" >&5
3528
3529 cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 #include <stdlib.h>
3533 #include <stdarg.h>
3534 #include <string.h>
3535 #include <float.h>
3536 EOF
3537 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3538 { (eval echo configure:3539: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3539 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3540 if test -z "$ac_err"; then
3541   rm -rf conftest*
3542   ac_cv_header_stdc=yes
3543 else
3544   echo "$ac_err" >&5
3545   echo "configure: failed program was:" >&5
3546   cat conftest.$ac_ext >&5
3547   rm -rf conftest*
3548   ac_cv_header_stdc=no
3549 fi
3550 rm -f conftest*
3551
3552 if test $ac_cv_header_stdc = yes; then
3553   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3554 cat > conftest.$ac_ext <<EOF
3555 #line 3556 "configure"
3556 #include "confdefs.h"
3557 #include <string.h>
3558 EOF
3559 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3560   egrep "memchr" >/dev/null 2>&1; then
3561   :
3562 else
3563   rm -rf conftest*
3564   ac_cv_header_stdc=no
3565 fi
3566 rm -f conftest*
3567
3568 fi
3569
3570 if test $ac_cv_header_stdc = yes; then
3571   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3572 cat > conftest.$ac_ext <<EOF
3573 #line 3574 "configure"
3574 #include "confdefs.h"
3575 #include <stdlib.h>
3576 EOF
3577 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3578   egrep "free" >/dev/null 2>&1; then
3579   :
3580 else
3581   rm -rf conftest*
3582   ac_cv_header_stdc=no
3583 fi
3584 rm -f conftest*
3585
3586 fi
3587
3588 if test $ac_cv_header_stdc = yes; then
3589   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3593 #include <ctype.h>
3594 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3595 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3596 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3597 int main () { int i; for (i = 0; i < 256; i++)
3598 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3599 exit (0); }
3600
3601 EOF
3602 if { (eval echo configure:3603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3603 then
3604   :
3605 else
3606   conftest_rc="$?"
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -fr conftest*
3610   ac_cv_header_stdc=no
3611 fi
3612 rm -fr conftest*
3613 fi
3614
3615 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3616 if test $ac_cv_header_stdc = yes; then
3617   { test "$extra_verbose" = "yes" && cat << \EOF
3618     Defining STDC_HEADERS
3619 EOF
3620 cat >> confdefs.h <<\EOF
3621 #define STDC_HEADERS 1
3622 EOF
3623 }
3624
3625 fi
3626
3627 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3628 echo "configure:3629: checking whether time.h and sys/time.h may both be included" >&5
3629
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3633 #include <sys/types.h>
3634 #include <sys/time.h>
3635 #include <time.h>
3636 int main() {
3637 struct tm *tp;
3638 ; return 0; }
3639 EOF
3640 if { (eval echo configure:3641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3641   rm -rf conftest*
3642   ac_cv_header_time=yes
3643 else
3644   echo "configure: failed program was:" >&5
3645   cat conftest.$ac_ext >&5
3646   rm -rf conftest*
3647   ac_cv_header_time=no
3648 fi
3649 rm -f conftest*
3650
3651 echo "$ac_t""$ac_cv_header_time" 1>&6
3652 if test $ac_cv_header_time = yes; then
3653   { test "$extra_verbose" = "yes" && cat << \EOF
3654     Defining TIME_WITH_SYS_TIME
3655 EOF
3656 cat >> confdefs.h <<\EOF
3657 #define TIME_WITH_SYS_TIME 1
3658 EOF
3659 }
3660
3661 fi
3662
3663 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3664 echo "configure:3665: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3665
3666 cat > conftest.$ac_ext <<EOF
3667 #line 3668 "configure"
3668 #include "confdefs.h"
3669 #include <sys/types.h>
3670 #include <signal.h>
3671 /* NetBSD declares sys_siglist in unistd.h.  */
3672 #ifdef HAVE_UNISTD_H
3673 #include <unistd.h>
3674 #endif
3675 int main() {
3676 char *msg = *(sys_siglist + 1);
3677 ; return 0; }
3678 EOF
3679 if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3680   rm -rf conftest*
3681   ac_cv_decl_sys_siglist=yes
3682 else
3683   echo "configure: failed program was:" >&5
3684   cat conftest.$ac_ext >&5
3685   rm -rf conftest*
3686   ac_cv_decl_sys_siglist=no
3687 fi
3688 rm -f conftest*
3689
3690 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3691 if test $ac_cv_decl_sys_siglist = yes; then
3692   { test "$extra_verbose" = "yes" && cat << \EOF
3693     Defining SYS_SIGLIST_DECLARED
3694 EOF
3695 cat >> confdefs.h <<\EOF
3696 #define SYS_SIGLIST_DECLARED 1
3697 EOF
3698 }
3699
3700 fi
3701
3702
3703
3704 echo $ac_n "checking for utime""... $ac_c" 1>&6
3705 echo "configure:3706: checking for utime" >&5
3706 cat > conftest.$ac_ext <<EOF
3707 #line 3708 "configure"
3708 #include "confdefs.h"
3709 #include <sys/types.h>
3710 #include <utime.h>
3711 int main() {
3712 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3713 ; return 0; }
3714 EOF
3715 if { (eval echo configure:3716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3716   rm -rf conftest*
3717   echo "$ac_t""yes" 1>&6
3718    { test "$extra_verbose" = "yes" && cat << \EOF
3719     Defining HAVE_UTIME
3720 EOF
3721 cat >> confdefs.h <<\EOF
3722 #define HAVE_UTIME 1
3723 EOF
3724 }
3725
3726 else
3727   echo "configure: failed program was:" >&5
3728   cat conftest.$ac_ext >&5
3729   rm -rf conftest*
3730   echo "$ac_t""no" 1>&6
3731       for ac_func in utimes
3732 do
3733 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3734 echo "configure:3735: checking for $ac_func" >&5
3735
3736 cat > conftest.$ac_ext <<EOF
3737 #line 3738 "configure"
3738 #include "confdefs.h"
3739 /* System header to define __stub macros and hopefully few prototypes,
3740     which can conflict with char $ac_func(); below.  */
3741 #include <assert.h>
3742 /* Override any gcc2 internal prototype to avoid an error.  */
3743 /* We use char because int might match the return type of a gcc2
3744     builtin and then its argument prototype would still apply.  */
3745 char $ac_func();
3746
3747 int main() {
3748
3749 /* The GNU C library defines this for functions which it implements
3750     to always fail with ENOSYS.  Some functions are actually named
3751     something starting with __ and the normal name is an alias.  */
3752 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3753 choke me
3754 #else
3755 $ac_func();
3756 #endif
3757
3758 ; return 0; }
3759 EOF
3760 if { (eval echo configure:3761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3761   rm -rf conftest*
3762   eval "ac_cv_func_$ac_func=yes"
3763 else
3764   echo "configure: failed program was:" >&5
3765   cat conftest.$ac_ext >&5
3766   rm -rf conftest*
3767   eval "ac_cv_func_$ac_func=no"
3768 fi
3769 rm -f conftest*
3770
3771 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3772   echo "$ac_t""yes" 1>&6
3773     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3774   { test "$extra_verbose" = "yes" && cat << EOF
3775     Defining $ac_tr_func
3776 EOF
3777 cat >> confdefs.h <<EOF
3778 #define $ac_tr_func 1
3779 EOF
3780 }
3781  
3782 else
3783   echo "$ac_t""no" 1>&6
3784 fi
3785 done
3786
3787 fi
3788 rm -f conftest*
3789
3790
3791 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3792 echo "configure:3793: checking return type of signal handlers" >&5
3793
3794 cat > conftest.$ac_ext <<EOF
3795 #line 3796 "configure"
3796 #include "confdefs.h"
3797 #include <sys/types.h>
3798 #include <signal.h>
3799 #ifdef signal
3800 #undef signal
3801 #endif
3802 #ifdef __cplusplus
3803 extern "C" void (*signal (int, void (*)(int)))(int);
3804 #else
3805 void (*signal ()) ();
3806 #endif
3807
3808 int main() {
3809 int i;
3810 ; return 0; }
3811 EOF
3812 if { (eval echo configure:3813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3813   rm -rf conftest*
3814   ac_cv_type_signal=void
3815 else
3816   echo "configure: failed program was:" >&5
3817   cat conftest.$ac_ext >&5
3818   rm -rf conftest*
3819   ac_cv_type_signal=int
3820 fi
3821 rm -f conftest*
3822
3823 echo "$ac_t""$ac_cv_type_signal" 1>&6
3824 { test "$extra_verbose" = "yes" && cat << EOF
3825     Defining RETSIGTYPE = $ac_cv_type_signal
3826 EOF
3827 cat >> confdefs.h <<EOF
3828 #define RETSIGTYPE $ac_cv_type_signal
3829 EOF
3830 }
3831
3832
3833 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3834 echo "configure:3835: checking for size_t" >&5
3835
3836 cat > conftest.$ac_ext <<EOF
3837 #line 3838 "configure"
3838 #include "confdefs.h"
3839 #include <sys/types.h>
3840 #if STDC_HEADERS
3841 #include <stdlib.h>
3842 #include <stddef.h>
3843 #endif
3844 EOF
3845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3846   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3847   rm -rf conftest*
3848   ac_cv_type_size_t=yes
3849 else
3850   rm -rf conftest*
3851   ac_cv_type_size_t=no
3852 fi
3853 rm -f conftest*
3854
3855 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3856 if test $ac_cv_type_size_t = no; then
3857   { test "$extra_verbose" = "yes" && cat << \EOF
3858     Defining size_t = unsigned
3859 EOF
3860 cat >> confdefs.h <<\EOF
3861 #define size_t unsigned
3862 EOF
3863 }
3864
3865 fi
3866
3867 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3868 echo "configure:3869: checking for pid_t" >&5
3869
3870 cat > conftest.$ac_ext <<EOF
3871 #line 3872 "configure"
3872 #include "confdefs.h"
3873 #include <sys/types.h>
3874 #if STDC_HEADERS
3875 #include <stdlib.h>
3876 #include <stddef.h>
3877 #endif
3878 EOF
3879 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3880   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3881   rm -rf conftest*
3882   ac_cv_type_pid_t=yes
3883 else
3884   rm -rf conftest*
3885   ac_cv_type_pid_t=no
3886 fi
3887 rm -f conftest*
3888
3889 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3890 if test $ac_cv_type_pid_t = no; then
3891   { test "$extra_verbose" = "yes" && cat << \EOF
3892     Defining pid_t = int
3893 EOF
3894 cat >> confdefs.h <<\EOF
3895 #define pid_t int
3896 EOF
3897 }
3898
3899 fi
3900
3901 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3902 echo "configure:3903: checking for uid_t in sys/types.h" >&5
3903
3904 cat > conftest.$ac_ext <<EOF
3905 #line 3906 "configure"
3906 #include "confdefs.h"
3907 #include <sys/types.h>
3908 EOF
3909 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3910   egrep "uid_t" >/dev/null 2>&1; then
3911   rm -rf conftest*
3912   ac_cv_type_uid_t=yes
3913 else
3914   rm -rf conftest*
3915   ac_cv_type_uid_t=no
3916 fi
3917 rm -f conftest*
3918
3919
3920 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3921 if test $ac_cv_type_uid_t = no; then
3922   { test "$extra_verbose" = "yes" && cat << \EOF
3923     Defining uid_t = int
3924 EOF
3925 cat >> confdefs.h <<\EOF
3926 #define uid_t int
3927 EOF
3928 }
3929
3930   { test "$extra_verbose" = "yes" && cat << \EOF
3931     Defining gid_t = int
3932 EOF
3933 cat >> confdefs.h <<\EOF
3934 #define gid_t int
3935 EOF
3936 }
3937
3938 fi
3939
3940 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3941 echo "configure:3942: checking for mode_t" >&5
3942
3943 cat > conftest.$ac_ext <<EOF
3944 #line 3945 "configure"
3945 #include "confdefs.h"
3946 #include <sys/types.h>
3947 #if STDC_HEADERS
3948 #include <stdlib.h>
3949 #include <stddef.h>
3950 #endif
3951 EOF
3952 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3953   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3954   rm -rf conftest*
3955   ac_cv_type_mode_t=yes
3956 else
3957   rm -rf conftest*
3958   ac_cv_type_mode_t=no
3959 fi
3960 rm -f conftest*
3961
3962 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3963 if test $ac_cv_type_mode_t = no; then
3964   { test "$extra_verbose" = "yes" && cat << \EOF
3965     Defining mode_t = int
3966 EOF
3967 cat >> confdefs.h <<\EOF
3968 #define mode_t int
3969 EOF
3970 }
3971
3972 fi
3973
3974 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3975 echo "configure:3976: checking for off_t" >&5
3976
3977 cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 #include <sys/types.h>
3981 #if STDC_HEADERS
3982 #include <stdlib.h>
3983 #include <stddef.h>
3984 #endif
3985 EOF
3986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3987   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3988   rm -rf conftest*
3989   ac_cv_type_off_t=yes
3990 else
3991   rm -rf conftest*
3992   ac_cv_type_off_t=no
3993 fi
3994 rm -f conftest*
3995
3996 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3997 if test $ac_cv_type_off_t = no; then
3998   { test "$extra_verbose" = "yes" && cat << \EOF
3999     Defining off_t = long
4000 EOF
4001 cat >> confdefs.h <<\EOF
4002 #define off_t long
4003 EOF
4004 }
4005
4006 fi
4007
4008 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4009 echo "configure:4010: checking for ssize_t" >&5
4010
4011 cat > conftest.$ac_ext <<EOF
4012 #line 4013 "configure"
4013 #include "confdefs.h"
4014 #include <sys/types.h>
4015 #if STDC_HEADERS
4016 #include <stdlib.h>
4017 #include <stddef.h>
4018 #endif
4019 EOF
4020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4021   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4022   rm -rf conftest*
4023   ac_cv_type_ssize_t=yes
4024 else
4025   rm -rf conftest*
4026   ac_cv_type_ssize_t=no
4027 fi
4028 rm -f conftest*
4029
4030 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4031 if test $ac_cv_type_ssize_t = no; then
4032   { test "$extra_verbose" = "yes" && cat << \EOF
4033     Defining ssize_t = int
4034 EOF
4035 cat >> confdefs.h <<\EOF
4036 #define ssize_t int
4037 EOF
4038 }
4039
4040 fi
4041
4042
4043 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4044 echo "configure:4045: checking for socklen_t" >&5
4045 cat > conftest.$ac_ext <<EOF
4046 #line 4047 "configure"
4047 #include "confdefs.h"
4048 #include <sys/socket.h>
4049 socklen_t x;
4050
4051 int main() {
4052
4053 ; return 0; }
4054 EOF
4055 if { (eval echo configure:4056: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4056   rm -rf conftest*
4057   echo "$ac_t""yes" 1>&6
4058 else
4059   echo "configure: failed program was:" >&5
4060   cat conftest.$ac_ext >&5
4061   rm -rf conftest*
4062   
4063 cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 #include <sys/socket.h>
4067 int accept (int, struct sockaddr *, size_t *);
4068
4069 int main() {
4070
4071 ; return 0; }
4072 EOF
4073 if { (eval echo configure:4074: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4074   rm -rf conftest*
4075   
4076 echo "$ac_t""size_t" 1>&6
4077 { test "$extra_verbose" = "yes" && cat << \EOF
4078     Defining socklen_t = size_t
4079 EOF
4080 cat >> confdefs.h <<\EOF
4081 #define socklen_t size_t
4082 EOF
4083 }
4084
4085 else
4086   echo "configure: failed program was:" >&5
4087   cat conftest.$ac_ext >&5
4088   rm -rf conftest*
4089   
4090 echo "$ac_t""int" 1>&6
4091 { test "$extra_verbose" = "yes" && cat << \EOF
4092     Defining socklen_t = int
4093 EOF
4094 cat >> confdefs.h <<\EOF
4095 #define socklen_t int
4096 EOF
4097 }
4098
4099 fi
4100 rm -f conftest*
4101 fi
4102 rm -f conftest*
4103
4104 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4105 echo "configure:4106: checking for struct timeval" >&5
4106 cat > conftest.$ac_ext <<EOF
4107 #line 4108 "configure"
4108 #include "confdefs.h"
4109 #ifdef TIME_WITH_SYS_TIME
4110 #include <sys/time.h>
4111 #include <time.h>
4112 #else
4113 #ifdef HAVE_SYS_TIME_H
4114 #include <sys/time.h>
4115 #else
4116 #include <time.h>
4117 #endif
4118 #endif
4119 int main() {
4120 static struct timeval x; x.tv_sec = x.tv_usec;
4121 ; return 0; }
4122 EOF
4123 if { (eval echo configure:4124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4124   rm -rf conftest*
4125   echo "$ac_t""yes" 1>&6
4126   HAVE_TIMEVAL=yes
4127   { test "$extra_verbose" = "yes" && cat << \EOF
4128     Defining HAVE_TIMEVAL
4129 EOF
4130 cat >> confdefs.h <<\EOF
4131 #define HAVE_TIMEVAL 1
4132 EOF
4133 }
4134
4135 else
4136   echo "configure: failed program was:" >&5
4137   cat conftest.$ac_ext >&5
4138   rm -rf conftest*
4139   echo "$ac_t""no" 1>&6
4140    HAVE_TIMEVAL=no
4141 fi
4142 rm -f conftest*
4143
4144 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4145 echo "configure:4146: checking whether struct tm is in sys/time.h or time.h" >&5
4146
4147 cat > conftest.$ac_ext <<EOF
4148 #line 4149 "configure"
4149 #include "confdefs.h"
4150 #include <sys/types.h>
4151 #include <time.h>
4152 int main() {
4153 struct tm *tp; tp->tm_sec;
4154 ; return 0; }
4155 EOF
4156 if { (eval echo configure:4157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4157   rm -rf conftest*
4158   ac_cv_struct_tm=time.h
4159 else
4160   echo "configure: failed program was:" >&5
4161   cat conftest.$ac_ext >&5
4162   rm -rf conftest*
4163   ac_cv_struct_tm=sys/time.h
4164 fi
4165 rm -f conftest*
4166
4167 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4168 if test $ac_cv_struct_tm = sys/time.h; then
4169   { test "$extra_verbose" = "yes" && cat << \EOF
4170     Defining TM_IN_SYS_TIME
4171 EOF
4172 cat >> confdefs.h <<\EOF
4173 #define TM_IN_SYS_TIME 1
4174 EOF
4175 }
4176
4177 fi
4178
4179 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4180 echo "configure:4181: checking for tm_zone in struct tm" >&5
4181
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4185 #include <sys/types.h>
4186 #include <$ac_cv_struct_tm>
4187 int main() {
4188 struct tm tm; tm.tm_zone;
4189 ; return 0; }
4190 EOF
4191 if { (eval echo configure:4192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4192   rm -rf conftest*
4193   ac_cv_struct_tm_zone=yes
4194 else
4195   echo "configure: failed program was:" >&5
4196   cat conftest.$ac_ext >&5
4197   rm -rf conftest*
4198   ac_cv_struct_tm_zone=no
4199 fi
4200 rm -f conftest*
4201
4202 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4203 if test "$ac_cv_struct_tm_zone" = yes; then
4204   { test "$extra_verbose" = "yes" && cat << \EOF
4205     Defining HAVE_TM_ZONE
4206 EOF
4207 cat >> confdefs.h <<\EOF
4208 #define HAVE_TM_ZONE 1
4209 EOF
4210 }
4211
4212 else
4213   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4214 echo "configure:4215: checking for tzname" >&5
4215
4216 cat > conftest.$ac_ext <<EOF
4217 #line 4218 "configure"
4218 #include "confdefs.h"
4219 #include <time.h>
4220 #ifndef tzname /* For SGI.  */
4221 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4222 #endif
4223 int main() {
4224 atoi(*tzname);
4225 ; return 0; }
4226 EOF
4227 if { (eval echo configure:4228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4228   rm -rf conftest*
4229   ac_cv_var_tzname=yes
4230 else
4231   echo "configure: failed program was:" >&5
4232   cat conftest.$ac_ext >&5
4233   rm -rf conftest*
4234   ac_cv_var_tzname=no
4235 fi
4236 rm -f conftest*
4237
4238 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4239   if test $ac_cv_var_tzname = yes; then
4240     { test "$extra_verbose" = "yes" && cat << \EOF
4241     Defining HAVE_TZNAME
4242 EOF
4243 cat >> confdefs.h <<\EOF
4244 #define HAVE_TZNAME 1
4245 EOF
4246 }
4247
4248   fi
4249 fi
4250
4251
4252 echo $ac_n "checking for working const""... $ac_c" 1>&6
4253 echo "configure:4254: checking for working const" >&5
4254
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258
4259 int main() {
4260
4261 /* Ultrix mips cc rejects this.  */
4262 typedef int charset[2]; const charset x;
4263 /* SunOS 4.1.1 cc rejects this.  */
4264 char const *const *ccp;
4265 char **p;
4266 /* NEC SVR4.0.2 mips cc rejects this.  */
4267 struct point {int x, y;};
4268 static struct point const zero = {0,0};
4269 /* AIX XL C 1.02.0.0 rejects this.
4270    It does not let you subtract one const X* pointer from another in an arm
4271    of an if-expression whose if-part is not a constant expression */
4272 const char *g = "string";
4273 ccp = &g + (g ? g-g : 0);
4274 /* HPUX 7.0 cc rejects these. */
4275 ++ccp;
4276 p = (char**) ccp;
4277 ccp = (char const *const *) p;
4278 { /* SCO 3.2v4 cc rejects this.  */
4279   char *t;
4280   char const *s = 0 ? (char *) 0 : (char const *) 0;
4281
4282   *t++ = 0;
4283 }
4284 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4285   int x[] = {25, 17};
4286   const int *foo = &x[0];
4287   ++foo;
4288 }
4289 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4290   typedef const int *iptr;
4291   iptr p = 0;
4292   ++p;
4293 }
4294 { /* AIX XL C 1.02.0.0 rejects this saying
4295      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4296   struct s { int j; const int *ap[3]; };
4297   struct s *b; b->j = 5;
4298 }
4299 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4300   const int foo = 10;
4301 }
4302
4303 ; return 0; }
4304 EOF
4305 if { (eval echo configure:4306: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4306   rm -rf conftest*
4307   ac_cv_c_const=yes
4308 else
4309   echo "configure: failed program was:" >&5
4310   cat conftest.$ac_ext >&5
4311   rm -rf conftest*
4312   ac_cv_c_const=no
4313 fi
4314 rm -f conftest*
4315
4316 echo "$ac_t""$ac_cv_c_const" 1>&6
4317 if test $ac_cv_c_const = no; then
4318   { test "$extra_verbose" = "yes" && cat << \EOF
4319     Defining const = 
4320 EOF
4321 cat >> confdefs.h <<\EOF
4322 #define const 
4323 EOF
4324 }
4325
4326 fi
4327
4328
4329 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4330 echo "configure:4331: checking whether ${MAKE-make} sets \${MAKE}" >&5
4331 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4332
4333 cat > conftestmake <<\EOF
4334 all:
4335         @echo 'ac_maketemp="${MAKE}"'
4336 EOF
4337 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4338 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4339 if test -n "$ac_maketemp"; then
4340   eval ac_cv_prog_make_${ac_make}_set=yes
4341 else
4342   eval ac_cv_prog_make_${ac_make}_set=no
4343 fi
4344 rm -f conftestmake
4345 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4346   echo "$ac_t""yes" 1>&6
4347   SET_MAKE=
4348 else
4349   echo "$ac_t""no" 1>&6
4350   SET_MAKE="MAKE=${MAKE-make}"
4351 fi
4352
4353
4354 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4355 echo "configure:4356: checking whether byte ordering is bigendian" >&5
4356
4357 ac_cv_c_bigendian=unknown
4358 # See if sys/param.h defines the BYTE_ORDER macro.
4359 cat > conftest.$ac_ext <<EOF
4360 #line 4361 "configure"
4361 #include "confdefs.h"
4362 #include <sys/types.h>
4363 #include <sys/param.h>
4364 int main() {
4365
4366 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4367  bogus endian macros
4368 #endif
4369 ; return 0; }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4372   rm -rf conftest*
4373   # It does; now see whether it defined to BIG_ENDIAN or not.
4374 cat > conftest.$ac_ext <<EOF
4375 #line 4376 "configure"
4376 #include "confdefs.h"
4377 #include <sys/types.h>
4378 #include <sys/param.h>
4379 int main() {
4380
4381 #if BYTE_ORDER != BIG_ENDIAN
4382  not big endian
4383 #endif
4384 ; return 0; }
4385 EOF
4386 if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4387   rm -rf conftest*
4388   ac_cv_c_bigendian=yes
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392   rm -rf conftest*
4393   ac_cv_c_bigendian=no
4394 fi
4395 rm -f conftest*
4396 else
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399 fi
4400 rm -f conftest*
4401 if test $ac_cv_c_bigendian = unknown; then
4402 cat > conftest.$ac_ext <<EOF
4403 #line 4404 "configure"
4404 #include "confdefs.h"
4405 main () {
4406   /* Are we little or big endian?  From Harbison&Steele.  */
4407   union
4408   {
4409     long l;
4410     char c[sizeof (long)];
4411   } u;
4412   u.l = 1;
4413   exit (u.c[sizeof (long) - 1] == 1);
4414 }
4415 EOF
4416 if { (eval echo configure:4417: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4417 then
4418   ac_cv_c_bigendian=no
4419 else
4420   conftest_rc="$?"
4421   echo "configure: failed program was:" >&5
4422   cat conftest.$ac_ext >&5
4423   rm -fr conftest*
4424   ac_cv_c_bigendian=yes
4425 fi
4426 rm -fr conftest*
4427 fi
4428
4429 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4430 if test $ac_cv_c_bigendian = yes; then
4431   { test "$extra_verbose" = "yes" && cat << \EOF
4432     Defining WORDS_BIGENDIAN
4433 EOF
4434 cat >> confdefs.h <<\EOF
4435 #define WORDS_BIGENDIAN 1
4436 EOF
4437 }
4438
4439 fi
4440
4441
4442 echo $ac_n "checking size of short""... $ac_c" 1>&6
4443 echo "configure:4444: checking size of short" >&5
4444
4445 cat > conftest.$ac_ext <<EOF
4446 #line 4447 "configure"
4447 #include "confdefs.h"
4448 #include <stdio.h>
4449 #include <sys/types.h>
4450 main()
4451 {
4452   FILE *f=fopen("conftestval", "w");
4453   if (!f) exit(1);
4454   fprintf(f, "%d\n", sizeof(short));
4455   exit(0);
4456 }
4457 EOF
4458 if { (eval echo configure:4459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4459 then
4460   ac_cv_sizeof_short=`cat conftestval`
4461 else
4462   conftest_rc="$?"
4463   echo "configure: failed program was:" >&5
4464   cat conftest.$ac_ext >&5
4465   rm -fr conftest*
4466   ac_cv_sizeof_short=0
4467 fi
4468 rm -fr conftest*
4469 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4470 { test "$extra_verbose" = "yes" && cat << EOF
4471     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4472 EOF
4473 cat >> confdefs.h <<EOF
4474 #define SIZEOF_SHORT $ac_cv_sizeof_short
4475 EOF
4476 }
4477
4478
4479 if test "$ac_cv_sizeof_short" = 0; then
4480   echo ""
4481   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4482   echo "*** PANIC *** Please examine config.log for compilation errors."
4483   exit 1
4484 fi
4485 echo $ac_n "checking size of int""... $ac_c" 1>&6
4486 echo "configure:4487: checking size of int" >&5
4487
4488 cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491 #include <stdio.h>
4492 #include <sys/types.h>
4493 main()
4494 {
4495   FILE *f=fopen("conftestval", "w");
4496   if (!f) exit(1);
4497   fprintf(f, "%d\n", sizeof(int));
4498   exit(0);
4499 }
4500 EOF
4501 if { (eval echo configure:4502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4502 then
4503   ac_cv_sizeof_int=`cat conftestval`
4504 else
4505   conftest_rc="$?"
4506   echo "configure: failed program was:" >&5
4507   cat conftest.$ac_ext >&5
4508   rm -fr conftest*
4509   ac_cv_sizeof_int=0
4510 fi
4511 rm -fr conftest*
4512 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4513 { test "$extra_verbose" = "yes" && cat << EOF
4514     Defining SIZEOF_INT = $ac_cv_sizeof_int
4515 EOF
4516 cat >> confdefs.h <<EOF
4517 #define SIZEOF_INT $ac_cv_sizeof_int
4518 EOF
4519 }
4520
4521
4522 echo $ac_n "checking size of long""... $ac_c" 1>&6
4523 echo "configure:4524: checking size of long" >&5
4524
4525 cat > conftest.$ac_ext <<EOF
4526 #line 4527 "configure"
4527 #include "confdefs.h"
4528 #include <stdio.h>
4529 #include <sys/types.h>
4530 main()
4531 {
4532   FILE *f=fopen("conftestval", "w");
4533   if (!f) exit(1);
4534   fprintf(f, "%d\n", sizeof(long));
4535   exit(0);
4536 }
4537 EOF
4538 if { (eval echo configure:4539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4539 then
4540   ac_cv_sizeof_long=`cat conftestval`
4541 else
4542   conftest_rc="$?"
4543   echo "configure: failed program was:" >&5
4544   cat conftest.$ac_ext >&5
4545   rm -fr conftest*
4546   ac_cv_sizeof_long=0
4547 fi
4548 rm -fr conftest*
4549 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4550 { test "$extra_verbose" = "yes" && cat << EOF
4551     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4552 EOF
4553 cat >> confdefs.h <<EOF
4554 #define SIZEOF_LONG $ac_cv_sizeof_long
4555 EOF
4556 }
4557
4558
4559 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4560 echo "configure:4561: checking size of long long" >&5
4561
4562 cat > conftest.$ac_ext <<EOF
4563 #line 4564 "configure"
4564 #include "confdefs.h"
4565 #include <stdio.h>
4566 #include <sys/types.h>
4567 main()
4568 {
4569   FILE *f=fopen("conftestval", "w");
4570   if (!f) exit(1);
4571   fprintf(f, "%d\n", sizeof(long long));
4572   exit(0);
4573 }
4574 EOF
4575 if { (eval echo configure:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4576 then
4577   ac_cv_sizeof_long_long=`cat conftestval`
4578 else
4579   conftest_rc="$?"
4580   echo "configure: failed program was:" >&5
4581   cat conftest.$ac_ext >&5
4582   rm -fr conftest*
4583   ac_cv_sizeof_long_long=0
4584 fi
4585 rm -fr conftest*
4586 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4587 { test "$extra_verbose" = "yes" && cat << EOF
4588     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4589 EOF
4590 cat >> confdefs.h <<EOF
4591 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4592 EOF
4593 }
4594
4595
4596 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4597 echo "configure:4598: checking size of void *" >&5
4598
4599 cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602 #include <stdio.h>
4603 #include <sys/types.h>
4604 main()
4605 {
4606   FILE *f=fopen("conftestval", "w");
4607   if (!f) exit(1);
4608   fprintf(f, "%d\n", sizeof(void *));
4609   exit(0);
4610 }
4611 EOF
4612 if { (eval echo configure:4613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4613 then
4614   ac_cv_sizeof_void_p=`cat conftestval`
4615 else
4616   conftest_rc="$?"
4617   echo "configure: failed program was:" >&5
4618   cat conftest.$ac_ext >&5
4619   rm -fr conftest*
4620   ac_cv_sizeof_void_p=0
4621 fi
4622 rm -fr conftest*
4623 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4624 { test "$extra_verbose" = "yes" && cat << EOF
4625     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4626 EOF
4627 cat >> confdefs.h <<EOF
4628 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4629 EOF
4630 }
4631
4632
4633
4634 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4635 echo "configure:4636: checking for long file names" >&5
4636
4637 ac_cv_sys_long_file_names=yes
4638 # Test for long file names in all the places we know might matter:
4639 #      .                the current directory, where building will happen
4640 #      $prefix/lib      where we will be installing things
4641 #      $exec_prefix/lib likewise
4642 # eval it to expand exec_prefix.
4643 #      $TMPDIR          if set, where it might want to write temporary files
4644 # if $TMPDIR is not set:
4645 #      /tmp             where it might want to write temporary files
4646 #      /var/tmp         likewise
4647 #      /usr/tmp         likewise
4648 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4649   ac_tmpdirs="$TMPDIR"
4650 else
4651   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4652 fi
4653 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4654   test -d $ac_dir || continue
4655   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4656   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4657   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4658   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4659   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4660     ac_cv_sys_long_file_names=no
4661     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4662     break
4663   fi
4664   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4665 done
4666
4667 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4668 if test $ac_cv_sys_long_file_names = yes; then
4669   { test "$extra_verbose" = "yes" && cat << \EOF
4670     Defining HAVE_LONG_FILE_NAMES
4671 EOF
4672 cat >> confdefs.h <<\EOF
4673 #define HAVE_LONG_FILE_NAMES 1
4674 EOF
4675 }
4676
4677 fi
4678
4679
4680 echo $ac_n "checking for sin""... $ac_c" 1>&6
4681 echo "configure:4682: checking for sin" >&5
4682
4683 cat > conftest.$ac_ext <<EOF
4684 #line 4685 "configure"
4685 #include "confdefs.h"
4686 /* System header to define __stub macros and hopefully few prototypes,
4687     which can conflict with char sin(); below.  */
4688 #include <assert.h>
4689 /* Override any gcc2 internal prototype to avoid an error.  */
4690 /* We use char because int might match the return type of a gcc2
4691     builtin and then its argument prototype would still apply.  */
4692 char sin();
4693
4694 int main() {
4695
4696 /* The GNU C library defines this for functions which it implements
4697     to always fail with ENOSYS.  Some functions are actually named
4698     something starting with __ and the normal name is an alias.  */
4699 #if defined (__stub_sin) || defined (__stub___sin)
4700 choke me
4701 #else
4702 sin();
4703 #endif
4704
4705 ; return 0; }
4706 EOF
4707 if { (eval echo configure:4708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4708   rm -rf conftest*
4709   eval "ac_cv_func_sin=yes"
4710 else
4711   echo "configure: failed program was:" >&5
4712   cat conftest.$ac_ext >&5
4713   rm -rf conftest*
4714   eval "ac_cv_func_sin=no"
4715 fi
4716 rm -f conftest*
4717
4718 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4719   echo "$ac_t""yes" 1>&6
4720   :
4721 else
4722   echo "$ac_t""no" 1>&6
4723
4724 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4725 echo "configure:4726: checking for sin in -lm" >&5
4726 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4727
4728 xe_check_libs=" -lm "
4729 cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732 /* Override any gcc2 internal prototype to avoid an error.  */
4733 /* We use char because int might match the return type of a gcc2
4734     builtin and then its argument prototype would still apply.  */
4735 char sin();
4736
4737 int main() {
4738 sin()
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   eval "ac_cv_lib_$ac_lib_var=yes"
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   eval "ac_cv_lib_$ac_lib_var=no"
4749 fi
4750 rm -f conftest*
4751 xe_check_libs=""
4752
4753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4754   echo "$ac_t""yes" 1>&6
4755     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4756     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4757   { test "$extra_verbose" = "yes" && cat << EOF
4758     Defining $ac_tr_lib
4759 EOF
4760 cat >> confdefs.h <<EOF
4761 #define $ac_tr_lib 1
4762 EOF
4763 }
4764
4765   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4766
4767 else
4768   echo "$ac_t""no" 1>&6
4769 fi
4770
4771
4772 fi
4773
4774
4775 { test "$extra_verbose" = "yes" && cat << \EOF
4776     Defining LISP_FLOAT_TYPE
4777 EOF
4778 cat >> confdefs.h <<\EOF
4779 #define LISP_FLOAT_TYPE 1
4780 EOF
4781 }
4782
4783
4784 cat > conftest.$ac_ext <<EOF
4785 #line 4786 "configure"
4786 #include "confdefs.h"
4787 #include <math.h>
4788 int main() {
4789 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4790 ; return 0; }
4791 EOF
4792 if { (eval echo configure:4793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4793   rm -rf conftest*
4794   { test "$extra_verbose" = "yes" && cat << \EOF
4795     Defining HAVE_INVERSE_HYPERBOLIC
4796 EOF
4797 cat >> confdefs.h <<\EOF
4798 #define HAVE_INVERSE_HYPERBOLIC 1
4799 EOF
4800 }
4801
4802 else
4803   echo "configure: failed program was:" >&5
4804   cat conftest.$ac_ext >&5
4805 fi
4806 rm -f conftest*
4807
4808 echo "checking type of mail spool file locking" 1>&6
4809 echo "configure:4810: checking type of mail spool file locking" >&5
4810 for ac_func in lockf flock
4811 do
4812 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4813 echo "configure:4814: checking for $ac_func" >&5
4814
4815 cat > conftest.$ac_ext <<EOF
4816 #line 4817 "configure"
4817 #include "confdefs.h"
4818 /* System header to define __stub macros and hopefully few prototypes,
4819     which can conflict with char $ac_func(); below.  */
4820 #include <assert.h>
4821 /* Override any gcc2 internal prototype to avoid an error.  */
4822 /* We use char because int might match the return type of a gcc2
4823     builtin and then its argument prototype would still apply.  */
4824 char $ac_func();
4825
4826 int main() {
4827
4828 /* The GNU C library defines this for functions which it implements
4829     to always fail with ENOSYS.  Some functions are actually named
4830     something starting with __ and the normal name is an alias.  */
4831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4832 choke me
4833 #else
4834 $ac_func();
4835 #endif
4836
4837 ; return 0; }
4838 EOF
4839 if { (eval echo configure:4840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4840   rm -rf conftest*
4841   eval "ac_cv_func_$ac_func=yes"
4842 else
4843   echo "configure: failed program was:" >&5
4844   cat conftest.$ac_ext >&5
4845   rm -rf conftest*
4846   eval "ac_cv_func_$ac_func=no"
4847 fi
4848 rm -f conftest*
4849
4850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4851   echo "$ac_t""yes" 1>&6
4852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4853   { test "$extra_verbose" = "yes" && cat << EOF
4854     Defining $ac_tr_func
4855 EOF
4856 cat >> confdefs.h <<EOF
4857 #define $ac_tr_func 1
4858 EOF
4859 }
4860  
4861 else
4862   echo "$ac_t""no" 1>&6
4863 fi
4864 done
4865
4866 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4867 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4868 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4869 if   test -z "$mail_locking"; then
4870   case "$opsys" in cygwin* | mingw*)
4871     mail_locking=pop ;;
4872   esac
4873 fi
4874
4875 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4876     Defining MAIL_LOCK_LOCKF
4877 EOF
4878 cat >> confdefs.h <<\EOF
4879 #define MAIL_LOCK_LOCKF 1
4880 EOF
4881 }
4882
4883 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4884     Defining MAIL_LOCK_FLOCK
4885 EOF
4886 cat >> confdefs.h <<\EOF
4887 #define MAIL_LOCK_FLOCK 1
4888 EOF
4889 }
4890
4891 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4892     Defining MAIL_LOCK_LOCKING
4893 EOF
4894 cat >> confdefs.h <<\EOF
4895 #define MAIL_LOCK_LOCKING 1
4896 EOF
4897 }
4898
4899 elif test "$mail_locking" = "pop"; then
4900   with_pop=yes
4901   mail_locking=
4902 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4903     Defining MAIL_LOCK_DOT
4904 EOF
4905 cat >> confdefs.h <<\EOF
4906 #define MAIL_LOCK_DOT 1
4907 EOF
4908 }
4909
4910 fi
4911 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4912   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4913 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4914   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4915 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4916   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4917
4918 case "$opsys" in decosf*)
4919   
4920 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4921 echo "configure:4922: checking for cma_open in -lpthreads" >&5
4922 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4923
4924 xe_check_libs=" -lpthreads "
4925 cat > conftest.$ac_ext <<EOF
4926 #line 4927 "configure"
4927 #include "confdefs.h"
4928 /* Override any gcc2 internal prototype to avoid an error.  */
4929 /* We use char because int might match the return type of a gcc2
4930     builtin and then its argument prototype would still apply.  */
4931 char cma_open();
4932
4933 int main() {
4934 cma_open()
4935 ; return 0; }
4936 EOF
4937 if { (eval echo configure:4938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4938   rm -rf conftest*
4939   eval "ac_cv_lib_$ac_lib_var=yes"
4940 else
4941   echo "configure: failed program was:" >&5
4942   cat conftest.$ac_ext >&5
4943   rm -rf conftest*
4944   eval "ac_cv_lib_$ac_lib_var=no"
4945 fi
4946 rm -f conftest*
4947 xe_check_libs=""
4948
4949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4950   echo "$ac_t""yes" 1>&6
4951     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4952     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4953   { test "$extra_verbose" = "yes" && cat << EOF
4954     Defining $ac_tr_lib
4955 EOF
4956 cat >> confdefs.h <<EOF
4957 #define $ac_tr_lib 1
4958 EOF
4959 }
4960
4961   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4962
4963 else
4964   echo "$ac_t""no" 1>&6
4965 fi
4966
4967
4968   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4969     c_switch_site="$c_switch_site -threads" ;;
4970 esac
4971
4972 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4973 echo "configure:4974: checking whether the -xildoff compiler flag is required" >&5
4974 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4975   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4976     then echo "$ac_t""no" 1>&6;
4977     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
4978   fi
4979   else echo "$ac_t""no" 1>&6
4980 fi
4981
4982 if test "$opsys" = "sol2"; then
4983   if test "$os_release" -ge 56; then
4984     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4985 echo "configure:4986: checking for \"-z ignore\" linker flag" >&5
4986     case "`ld -h 2>&1`" in
4987       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4988         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4989       *) echo "$ac_t""no" 1>&6 ;;
4990     esac
4991   fi
4992 fi
4993
4994
4995 echo "checking "for specified window system"" 1>&6
4996 echo "configure:4997: checking "for specified window system"" >&5
4997
4998
4999 GNOME_CONFIG=no
5000 GTK_CONFIG=no
5001
5002 if test "$with_gnome" != "no"; then
5003    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5004 echo "configure:5005: checking for GNOME configuration script" >&5
5005    for possible in gnome-config
5006    do
5007       possible_version=`${possible} --version 2> /dev/null`
5008       if test "x${possible_version}" != "x"; then
5009               GNOME_CONFIG="${possible}"
5010               with_gnome=yes
5011               with_gtk=yes
5012               break
5013       fi
5014    done
5015    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5016 fi
5017
5018 if test "${GNOME_CONFIG}" != "no"; then
5019       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5020       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5021       { test "$extra_verbose" = "yes" && cat << \EOF
5022     Defining HAVE_GNOME
5023 EOF
5024 cat >> confdefs.h <<\EOF
5025 #define HAVE_GNOME 1
5026 EOF
5027 }
5028
5029       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5030       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5031 fi
5032
5033 if test "$with_gtk" != "no";then
5034    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5035 echo "configure:5036: checking for GTK configuration script" >&5
5036    for possible in gtk12-config gtk14-config gtk-config
5037    do
5038       possible_version=`${possible} --version 2> /dev/null`
5039       if test "x${possible_version}" != "x"; then
5040               GTK_CONFIG="${possible}"
5041       fi
5042       case "${possible_version}" in
5043         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5044         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5045         1.2.*)
5046                 with_gtk=yes
5047                 break
5048                 ;;
5049         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5050       esac
5051    done
5052    echo "$ac_t""${GTK_CONFIG}" 1>&6
5053 fi
5054
5055 if test "${GTK_CONFIG}" != "no"; then
5056       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5057 echo "configure:5058: checking gtk version" >&5
5058       GTK_VERSION=`${GTK_CONFIG} --version`
5059       echo "$ac_t""${GTK_VERSION}" 1>&6
5060
5061       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5062 echo "configure:5063: checking gtk libs" >&5
5063       GTK_LIBS=`${GTK_CONFIG} --libs`
5064       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5065       echo "$ac_t""${GTK_LIBS}" 1>&6
5066
5067       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5068 echo "configure:5069: checking gtk cflags" >&5
5069       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5070       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5071       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5072
5073       
5074 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5075 echo "configure:5076: checking for main in -lgdk_imlib" >&5
5076 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5077
5078 xe_check_libs=" -lgdk_imlib "
5079 cat > conftest.$ac_ext <<EOF
5080 #line 5081 "configure"
5081 #include "confdefs.h"
5082
5083 int main() {
5084 main()
5085 ; return 0; }
5086 EOF
5087 if { (eval echo configure:5088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5088   rm -rf conftest*
5089   eval "ac_cv_lib_$ac_lib_var=yes"
5090 else
5091   echo "configure: failed program was:" >&5
5092   cat conftest.$ac_ext >&5
5093   rm -rf conftest*
5094   eval "ac_cv_lib_$ac_lib_var=no"
5095 fi
5096 rm -f conftest*
5097 xe_check_libs=""
5098
5099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5100   echo "$ac_t""yes" 1>&6
5101   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5102 else
5103   echo "$ac_t""no" 1>&6
5104 fi
5105
5106
5107       
5108 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5109 echo "configure:5110: checking for Imlib_init in -lImlib" >&5
5110 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5111
5112 xe_check_libs=" -lImlib "
5113 cat > conftest.$ac_ext <<EOF
5114 #line 5115 "configure"
5115 #include "confdefs.h"
5116 /* Override any gcc2 internal prototype to avoid an error.  */
5117 /* We use char because int might match the return type of a gcc2
5118     builtin and then its argument prototype would still apply.  */
5119 char Imlib_init();
5120
5121 int main() {
5122 Imlib_init()
5123 ; return 0; }
5124 EOF
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5126   rm -rf conftest*
5127   eval "ac_cv_lib_$ac_lib_var=yes"
5128 else
5129   echo "configure: failed program was:" >&5
5130   cat conftest.$ac_ext >&5
5131   rm -rf conftest*
5132   eval "ac_cv_lib_$ac_lib_var=no"
5133 fi
5134 rm -f conftest*
5135 xe_check_libs=""
5136
5137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5138   echo "$ac_t""yes" 1>&6
5139   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5140 else
5141   echo "$ac_t""no" 1>&6
5142 fi
5143
5144
5145       for ac_func in gdk_imlib_init
5146 do
5147 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5148 echo "configure:5149: checking for $ac_func" >&5
5149
5150 cat > conftest.$ac_ext <<EOF
5151 #line 5152 "configure"
5152 #include "confdefs.h"
5153 /* System header to define __stub macros and hopefully few prototypes,
5154     which can conflict with char $ac_func(); below.  */
5155 #include <assert.h>
5156 /* Override any gcc2 internal prototype to avoid an error.  */
5157 /* We use char because int might match the return type of a gcc2
5158     builtin and then its argument prototype would still apply.  */
5159 char $ac_func();
5160
5161 int main() {
5162
5163 /* The GNU C library defines this for functions which it implements
5164     to always fail with ENOSYS.  Some functions are actually named
5165     something starting with __ and the normal name is an alias.  */
5166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5167 choke me
5168 #else
5169 $ac_func();
5170 #endif
5171
5172 ; return 0; }
5173 EOF
5174 if { (eval echo configure:5175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5175   rm -rf conftest*
5176   eval "ac_cv_func_$ac_func=yes"
5177 else
5178   echo "configure: failed program was:" >&5
5179   cat conftest.$ac_ext >&5
5180   rm -rf conftest*
5181   eval "ac_cv_func_$ac_func=no"
5182 fi
5183 rm -f conftest*
5184
5185 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5186   echo "$ac_t""yes" 1>&6
5187     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5188   { test "$extra_verbose" = "yes" && cat << EOF
5189     Defining $ac_tr_func
5190 EOF
5191 cat >> confdefs.h <<EOF
5192 #define $ac_tr_func 1
5193 EOF
5194 }
5195  
5196 else
5197   echo "$ac_t""no" 1>&6
5198 fi
5199 done
5200
5201
5202       { test "$extra_verbose" = "yes" && cat << \EOF
5203     Defining HAVE_XPM
5204 EOF
5205 cat >> confdefs.h <<\EOF
5206 #define HAVE_XPM 1
5207 EOF
5208 }
5209
5210       { test "$extra_verbose" = "yes" && cat << \EOF
5211     Defining HAVE_GTK
5212 EOF
5213 cat >> confdefs.h <<\EOF
5214 #define HAVE_GTK 1
5215 EOF
5216 }
5217
5218       
5219
5220       window_system=gtk
5221       with_gtk=yes
5222       with_x11=no
5223
5224       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5225       test "${with_toolbars}" != no && with_toolbars=gtk
5226       test "${with_menubars}" != "no" && with_menubars=gtk
5227       test "${with_dialogs}" != "no" && with_dialogs=gtk
5228       test "${with_widgets}" != "no" && with_widgets=gtk
5229
5230       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5231    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5232  fi
5233       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5234    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5235  fi
5236       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5237    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5238  fi
5239       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5240    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5241  fi
5242
5243             OLD_CFLAGS="${CFLAGS}"
5244       OLD_LDFLAGS="${LDFLAGS}"
5245       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5246       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5247       for ac_hdr in glade/glade.h glade.h
5248 do
5249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5251 echo "configure:5252: checking for $ac_hdr" >&5
5252
5253 cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256 #include <$ac_hdr>
5257 EOF
5258 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5259 { (eval echo configure:5260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5260 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5261 if test -z "$ac_err"; then
5262   rm -rf conftest*
5263   eval "ac_cv_header_$ac_safe=yes"
5264 else
5265   echo "$ac_err" >&5
5266   echo "configure: failed program was:" >&5
5267   cat conftest.$ac_ext >&5
5268   rm -rf conftest*
5269   eval "ac_cv_header_$ac_safe=no"
5270 fi
5271 rm -f conftest*
5272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5273   echo "$ac_t""yes" 1>&6
5274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5275   { test "$extra_verbose" = "yes" && cat << EOF
5276     Defining $ac_tr_hdr
5277 EOF
5278 cat >> confdefs.h <<EOF
5279 #define $ac_tr_hdr 1
5280 EOF
5281 }
5282  
5283 else
5284   echo "$ac_t""no" 1>&6
5285 fi
5286 done
5287
5288       
5289 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5290 echo "configure:5291: checking for main in -lxml" >&5
5291 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5292
5293 xe_check_libs=" -lxml "
5294 cat > conftest.$ac_ext <<EOF
5295 #line 5296 "configure"
5296 #include "confdefs.h"
5297
5298 int main() {
5299 main()
5300 ; return 0; }
5301 EOF
5302 if { (eval echo configure:5303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5303   rm -rf conftest*
5304   eval "ac_cv_lib_$ac_lib_var=yes"
5305 else
5306   echo "configure: failed program was:" >&5
5307   cat conftest.$ac_ext >&5
5308   rm -rf conftest*
5309   eval "ac_cv_lib_$ac_lib_var=no"
5310 fi
5311 rm -f conftest*
5312 xe_check_libs=""
5313
5314 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5315   echo "$ac_t""yes" 1>&6
5316   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5317 else
5318   echo "$ac_t""no" 1>&6
5319 fi
5320
5321
5322       
5323 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5324 echo "configure:5325: checking for main in -lglade" >&5
5325 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5326
5327 xe_check_libs=" -lglade "
5328 cat > conftest.$ac_ext <<EOF
5329 #line 5330 "configure"
5330 #include "confdefs.h"
5331
5332 int main() {
5333 main()
5334 ; return 0; }
5335 EOF
5336 if { (eval echo configure:5337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5337   rm -rf conftest*
5338   eval "ac_cv_lib_$ac_lib_var=yes"
5339 else
5340   echo "configure: failed program was:" >&5
5341   cat conftest.$ac_ext >&5
5342   rm -rf conftest*
5343   eval "ac_cv_lib_$ac_lib_var=no"
5344 fi
5345 rm -f conftest*
5346 xe_check_libs=""
5347
5348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5349   echo "$ac_t""yes" 1>&6
5350   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5351 else
5352   echo "$ac_t""no" 1>&6
5353 fi
5354
5355
5356       
5357 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5358 echo "configure:5359: checking for main in -lglade-gnome" >&5
5359 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5360
5361 xe_check_libs=" -lglade-gnome "
5362 cat > conftest.$ac_ext <<EOF
5363 #line 5364 "configure"
5364 #include "confdefs.h"
5365
5366 int main() {
5367 main()
5368 ; return 0; }
5369 EOF
5370 if { (eval echo configure:5371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5371   rm -rf conftest*
5372   eval "ac_cv_lib_$ac_lib_var=yes"
5373 else
5374   echo "configure: failed program was:" >&5
5375   cat conftest.$ac_ext >&5
5376   rm -rf conftest*
5377   eval "ac_cv_lib_$ac_lib_var=no"
5378 fi
5379 rm -f conftest*
5380 xe_check_libs=""
5381
5382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5383   echo "$ac_t""yes" 1>&6
5384   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5385 else
5386   echo "$ac_t""no" 1>&6
5387 fi
5388
5389
5390       cat > conftest.$ac_ext <<EOF
5391 #line 5392 "configure"
5392 #include "confdefs.h"
5393 #include <glade/glade-xml.h>
5394 EOF
5395 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5396   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5397   rm -rf conftest*
5398   echo "$ac_t""yes" 1>&6
5399                        { test "$extra_verbose" = "yes" && cat << \EOF
5400     Defining LIBGLADE_XML_TXTDOMAIN = 1
5401 EOF
5402 cat >> confdefs.h <<\EOF
5403 #define LIBGLADE_XML_TXTDOMAIN 1
5404 EOF
5405 }
5406
5407 else
5408   rm -rf conftest*
5409   echo "$ac_t""no" 1>&6
5410 fi
5411 rm -f conftest*
5412
5413       CFLAGS="${OLD_CFLAGS}"
5414       LDFLAGS="${OLD_LDFLAGS}"
5415 fi
5416
5417
5418 if test "$with_x11" != "no"; then
5419     test "$x_includes $x_libraries" != "NONE NONE" && \
5420    window_system=x11 with_x11=yes
5421
5422         
5423       if test "$x_includes $x_libraries" = "NONE NONE" \
5424     -a -n "$OPENWINHOME" \
5425     -a "$OPENWINHOME" != "/usr/openwin" \
5426     -a -d "$OPENWINHOME"; then
5427       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5428       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5429       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5430   fi
5431
5432   if test "$x_includes" = "NONE"; then
5433                     for dir in "/usr/X11" "/usr/X11R6"; do
5434       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5435     done
5436   fi
5437
5438   if test "$x_libraries" = "NONE"; then
5439     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5440       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5441     done
5442   fi
5443
5444   # If we find X, set shell vars x_includes and x_libraries to the
5445 # paths, otherwise set no_x=yes.
5446 # Uses ac_ vars as temps to allow command line to override cache and checks.
5447 # --without-x overrides everything else, but does not touch the cache.
5448 echo $ac_n "checking for X""... $ac_c" 1>&6
5449 echo "configure:5450: checking for X" >&5
5450
5451 # Check whether --with-x or --without-x was given.
5452 if test "${with_x+set}" = set; then
5453   withval="$with_x"
5454   :
5455 fi
5456
5457 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5458 if test "x$with_x" = xno; then
5459   # The user explicitly disabled X.
5460   have_x=disabled
5461 else
5462   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5463     # Both variables are already set.
5464     have_x=yes
5465   else
5466
5467 # One or both of the vars are not set, and there is no cached value.
5468 ac_x_includes=NO ac_x_libraries=NO
5469 rm -fr conftestdir
5470 if mkdir conftestdir; then
5471   cd conftestdir
5472   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5473   cat > Imakefile <<'EOF'
5474 acfindx:
5475         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5476 EOF
5477   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5478     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5479     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5480     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5481     for ac_extension in a so sl; do
5482       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5483         test -f $ac_im_libdir/libX11.$ac_extension; then
5484         ac_im_usrlibdir=$ac_im_libdir; break
5485       fi
5486     done
5487     # Screen out bogus values from the imake configuration.  They are
5488     # bogus both because they are the default anyway, and because
5489     # using them would break gcc on systems where it needs fixed includes.
5490     case "$ac_im_incroot" in
5491         /usr/include) ;;
5492         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5493     esac
5494     case "$ac_im_usrlibdir" in
5495         /usr/lib | /lib) ;;
5496         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5497     esac
5498   fi
5499   cd ..
5500   rm -fr conftestdir
5501 fi
5502
5503 if test "$ac_x_includes" = NO; then
5504   # Guess where to find include files, by looking for this one X11 .h file.
5505   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5506
5507   # First, try using that file with no special directory specified.
5508 cat > conftest.$ac_ext <<EOF
5509 #line 5510 "configure"
5510 #include "confdefs.h"
5511 #include <$x_direct_test_include>
5512 EOF
5513 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5514 { (eval echo configure:5515: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5515 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5516 if test -z "$ac_err"; then
5517   rm -rf conftest*
5518   # We can compile using X headers with no special include directory.
5519 ac_x_includes=
5520 else
5521   echo "$ac_err" >&5
5522   echo "configure: failed program was:" >&5
5523   cat conftest.$ac_ext >&5
5524   rm -rf conftest*
5525   # Look for the header file in a standard set of common directories.
5526 # Check X11 before X11Rn because it is often a symlink to the current release.
5527   for ac_dir in               \
5528     /usr/X11/include          \
5529     /usr/X11R6/include        \
5530     /usr/X11R5/include        \
5531     /usr/X11R4/include        \
5532                               \
5533     /usr/include/X11          \
5534     /usr/include/X11R6        \
5535     /usr/include/X11R5        \
5536     /usr/include/X11R4        \
5537                               \
5538     /usr/local/X11/include    \
5539     /usr/local/X11R6/include  \
5540     /usr/local/X11R5/include  \
5541     /usr/local/X11R4/include  \
5542                               \
5543     /usr/local/include/X11    \
5544     /usr/local/include/X11R6  \
5545     /usr/local/include/X11R5  \
5546     /usr/local/include/X11R4  \
5547                               \
5548     /usr/X386/include         \
5549     /usr/x386/include         \
5550     /usr/XFree86/include/X11  \
5551                               \
5552     /usr/include              \
5553     /usr/local/include        \
5554     /usr/unsupported/include  \
5555     /usr/athena/include       \
5556     /usr/local/x11r5/include  \
5557     /usr/lpp/Xamples/include  \
5558                               \
5559     /usr/openwin/include      \
5560     /usr/openwin/share/include \
5561     ; \
5562   do
5563     if test -r "$ac_dir/$x_direct_test_include"; then
5564       ac_x_includes=$ac_dir
5565       break
5566     fi
5567   done
5568 fi
5569 rm -f conftest*
5570 fi # $ac_x_includes = NO
5571
5572 if test "$ac_x_libraries" = NO; then
5573   # Check for the libraries.
5574
5575   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5576   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5577
5578   # See if we find them without any special options.
5579   # Don't add to $LIBS permanently.
5580   ac_save_LIBS="$LIBS"
5581   LIBS="-l$x_direct_test_library $LIBS"
5582 cat > conftest.$ac_ext <<EOF
5583 #line 5584 "configure"
5584 #include "confdefs.h"
5585
5586 int main() {
5587 ${x_direct_test_function}()
5588 ; return 0; }
5589 EOF
5590 if { (eval echo configure:5591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5591   rm -rf conftest*
5592   LIBS="$ac_save_LIBS"
5593 # We can link X programs with no special library path.
5594 ac_x_libraries=
5595 else
5596   echo "configure: failed program was:" >&5
5597   cat conftest.$ac_ext >&5
5598   rm -rf conftest*
5599   LIBS="$ac_save_LIBS"
5600 # First see if replacing the include by lib works.
5601 # Check X11 before X11Rn because it is often a symlink to the current release.
5602 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5603     /usr/X11/lib          \
5604     /usr/X11R6/lib        \
5605     /usr/X11R5/lib        \
5606     /usr/X11R4/lib        \
5607                           \
5608     /usr/lib/X11          \
5609     /usr/lib/X11R6        \
5610     /usr/lib/X11R5        \
5611     /usr/lib/X11R4        \
5612                           \
5613     /usr/local/X11/lib    \
5614     /usr/local/X11R6/lib  \
5615     /usr/local/X11R5/lib  \
5616     /usr/local/X11R4/lib  \
5617                           \
5618     /usr/local/lib/X11    \
5619     /usr/local/lib/X11R6  \
5620     /usr/local/lib/X11R5  \
5621     /usr/local/lib/X11R4  \
5622                           \
5623     /usr/X386/lib         \
5624     /usr/x386/lib         \
5625     /usr/XFree86/lib/X11  \
5626                           \
5627     /usr/lib              \
5628     /usr/local/lib        \
5629     /usr/unsupported/lib  \
5630     /usr/athena/lib       \
5631     /usr/local/x11r5/lib  \
5632     /usr/lpp/Xamples/lib  \
5633     /lib/usr/lib/X11      \
5634                           \
5635     /usr/openwin/lib      \
5636     /usr/openwin/share/lib \
5637     ; \
5638 do
5639   for ac_extension in a so sl; do
5640     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5641       ac_x_libraries=$ac_dir
5642       break 2
5643     fi
5644   done
5645 done
5646 fi
5647 rm -f conftest*
5648 fi # $ac_x_libraries = NO
5649
5650 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5651   # Didn't find X anywhere.  Cache the known absence of X.
5652   ac_cv_have_x="have_x=no"
5653 else
5654   # Record where we found X for the cache.
5655   ac_cv_have_x="have_x=yes \
5656                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5657 fi
5658   fi
5659   eval "$ac_cv_have_x"
5660 fi # $with_x != no
5661
5662 if test "$have_x" != yes; then
5663   echo "$ac_t""$have_x" 1>&6
5664   no_x=yes
5665 else
5666   # If each of the values was on the command line, it overrides each guess.
5667   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5668   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5669   # Update the cache value to reflect the command line values.
5670   ac_cv_have_x="have_x=yes \
5671                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5672   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5673 fi
5674
5675 if test "$no_x" = yes; then
5676   # Not all programs may use this symbol, but it does not hurt to define it.
5677   { test "$extra_verbose" = "yes" && cat << \EOF
5678     Defining X_DISPLAY_MISSING
5679 EOF
5680 cat >> confdefs.h <<\EOF
5681 #define X_DISPLAY_MISSING 1
5682 EOF
5683 }
5684
5685   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5686 else
5687   if test -n "$x_includes"; then
5688     X_CFLAGS="$X_CFLAGS -I$x_includes"
5689   fi
5690
5691   # It would also be nice to do this for all -L options, not just this one.
5692   if test -n "$x_libraries"; then
5693     X_LIBS="$X_LIBS -L$x_libraries"
5694     # For Solaris; some versions of Sun CC require a space after -R and
5695     # others require no space.  Words are not sufficient . . . .
5696     case "`(uname -sr) 2>/dev/null`" in
5697     "SunOS 5"*)
5698       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5699 echo "configure:5700: checking whether -R must be followed by a space" >&5
5700       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5701       cat > conftest.$ac_ext <<EOF
5702 #line 5703 "configure"
5703 #include "confdefs.h"
5704
5705 int main() {
5706
5707 ; return 0; }
5708 EOF
5709 if { (eval echo configure:5710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5710   rm -rf conftest*
5711   ac_R_nospace=yes
5712 else
5713   echo "configure: failed program was:" >&5
5714   cat conftest.$ac_ext >&5
5715   rm -rf conftest*
5716   ac_R_nospace=no
5717 fi
5718 rm -f conftest*
5719       if test $ac_R_nospace = yes; then
5720         echo "$ac_t""no" 1>&6
5721         X_LIBS="$X_LIBS -R$x_libraries"
5722       else
5723         LIBS="$ac_xsave_LIBS -R $x_libraries"
5724         cat > conftest.$ac_ext <<EOF
5725 #line 5726 "configure"
5726 #include "confdefs.h"
5727
5728 int main() {
5729
5730 ; return 0; }
5731 EOF
5732 if { (eval echo configure:5733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5733   rm -rf conftest*
5734   ac_R_space=yes
5735 else
5736   echo "configure: failed program was:" >&5
5737   cat conftest.$ac_ext >&5
5738   rm -rf conftest*
5739   ac_R_space=no
5740 fi
5741 rm -f conftest*
5742         if test $ac_R_space = yes; then
5743           echo "$ac_t""yes" 1>&6
5744           X_LIBS="$X_LIBS -R $x_libraries"
5745         else
5746           echo "$ac_t""neither works" 1>&6
5747         fi
5748       fi
5749       LIBS="$ac_xsave_LIBS"
5750     esac
5751   fi
5752
5753   # Check for system-dependent libraries X programs must link with.
5754   # Do this before checking for the system-independent R6 libraries
5755   # (-lICE), since we may need -lsocket or whatever for X linking.
5756
5757   if test "$ISC" = yes; then
5758     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5759   else
5760     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5761     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5762     # the Alpha needs dnet_stub (dnet does not exist).
5763     if test "$with_dnet" = "no" ; then
5764 ac_cv_lib_dnet_dnet_ntoa=no
5765 else
5766
5767 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5768 echo "configure:5769: checking for dnet_ntoa in -ldnet" >&5
5769 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5770
5771 xe_check_libs=" -ldnet "
5772 cat > conftest.$ac_ext <<EOF
5773 #line 5774 "configure"
5774 #include "confdefs.h"
5775 /* Override any gcc2 internal prototype to avoid an error.  */
5776 /* We use char because int might match the return type of a gcc2
5777     builtin and then its argument prototype would still apply.  */
5778 char dnet_ntoa();
5779
5780 int main() {
5781 dnet_ntoa()
5782 ; return 0; }
5783 EOF
5784 if { (eval echo configure:5785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5785   rm -rf conftest*
5786   eval "ac_cv_lib_$ac_lib_var=yes"
5787 else
5788   echo "configure: failed program was:" >&5
5789   cat conftest.$ac_ext >&5
5790   rm -rf conftest*
5791   eval "ac_cv_lib_$ac_lib_var=no"
5792 fi
5793 rm -f conftest*
5794 xe_check_libs=""
5795
5796 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5797   echo "$ac_t""yes" 1>&6
5798   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5799 else
5800   echo "$ac_t""no" 1>&6
5801 fi
5802
5803 fi
5804
5805     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5806       
5807 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5808 echo "configure:5809: checking for dnet_ntoa in -ldnet_stub" >&5
5809 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5810
5811 xe_check_libs=" -ldnet_stub "
5812 cat > conftest.$ac_ext <<EOF
5813 #line 5814 "configure"
5814 #include "confdefs.h"
5815 /* Override any gcc2 internal prototype to avoid an error.  */
5816 /* We use char because int might match the return type of a gcc2
5817     builtin and then its argument prototype would still apply.  */
5818 char dnet_ntoa();
5819
5820 int main() {
5821 dnet_ntoa()
5822 ; return 0; }
5823 EOF
5824 if { (eval echo configure:5825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5825   rm -rf conftest*
5826   eval "ac_cv_lib_$ac_lib_var=yes"
5827 else
5828   echo "configure: failed program was:" >&5
5829   cat conftest.$ac_ext >&5
5830   rm -rf conftest*
5831   eval "ac_cv_lib_$ac_lib_var=no"
5832 fi
5833 rm -f conftest*
5834 xe_check_libs=""
5835
5836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5837   echo "$ac_t""yes" 1>&6
5838   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5839 else
5840   echo "$ac_t""no" 1>&6
5841 fi
5842
5843
5844     fi
5845
5846     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5847     # to get the SysV transport functions.
5848     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5849     # needs -lnsl.
5850     # The nsl library prevents programs from opening the X display
5851     # on Irix 5.2, according to dickey@clark.net.
5852     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5853 echo "configure:5854: checking for gethostbyname" >&5
5854
5855 cat > conftest.$ac_ext <<EOF
5856 #line 5857 "configure"
5857 #include "confdefs.h"
5858 /* System header to define __stub macros and hopefully few prototypes,
5859     which can conflict with char gethostbyname(); below.  */
5860 #include <assert.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 gethostbyname();
5865
5866 int main() {
5867
5868 /* The GNU C library defines this for functions which it implements
5869     to always fail with ENOSYS.  Some functions are actually named
5870     something starting with __ and the normal name is an alias.  */
5871 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5872 choke me
5873 #else
5874 gethostbyname();
5875 #endif
5876
5877 ; return 0; }
5878 EOF
5879 if { (eval echo configure:5880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5880   rm -rf conftest*
5881   eval "ac_cv_func_gethostbyname=yes"
5882 else
5883   echo "configure: failed program was:" >&5
5884   cat conftest.$ac_ext >&5
5885   rm -rf conftest*
5886   eval "ac_cv_func_gethostbyname=no"
5887 fi
5888 rm -f conftest*
5889
5890 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5891   echo "$ac_t""yes" 1>&6
5892   :
5893 else
5894   echo "$ac_t""no" 1>&6
5895 fi
5896
5897     if test $ac_cv_func_gethostbyname = no; then
5898       
5899 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5900 echo "configure:5901: checking for gethostbyname in -lnsl" >&5
5901 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5902
5903 xe_check_libs=" -lnsl "
5904 cat > conftest.$ac_ext <<EOF
5905 #line 5906 "configure"
5906 #include "confdefs.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 gethostbyname()
5914 ; return 0; }
5915 EOF
5916 if { (eval echo configure:5917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5917   rm -rf conftest*
5918   eval "ac_cv_lib_$ac_lib_var=yes"
5919 else
5920   echo "configure: failed program was:" >&5
5921   cat conftest.$ac_ext >&5
5922   rm -rf conftest*
5923   eval "ac_cv_lib_$ac_lib_var=no"
5924 fi
5925 rm -f conftest*
5926 xe_check_libs=""
5927
5928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5929   echo "$ac_t""yes" 1>&6
5930   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5931 else
5932   echo "$ac_t""no" 1>&6
5933 fi
5934
5935
5936     fi
5937
5938     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5939     # socket/setsockopt and other routines are undefined under SCO ODT
5940     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5941     # on later versions), says simon@lia.di.epfl.ch: it contains
5942     # gethostby* variants that don't use the nameserver (or something).
5943     # -lsocket must be given before -lnsl if both are needed.
5944     # We assume that if connect needs -lnsl, so does gethostbyname.
5945     echo $ac_n "checking for connect""... $ac_c" 1>&6
5946 echo "configure:5947: checking for connect" >&5
5947
5948 cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5951 /* System header to define __stub macros and hopefully few prototypes,
5952     which can conflict with char connect(); below.  */
5953 #include <assert.h>
5954 /* Override any gcc2 internal prototype to avoid an error.  */
5955 /* We use char because int might match the return type of a gcc2
5956     builtin and then its argument prototype would still apply.  */
5957 char connect();
5958
5959 int main() {
5960
5961 /* The GNU C library defines this for functions which it implements
5962     to always fail with ENOSYS.  Some functions are actually named
5963     something starting with __ and the normal name is an alias.  */
5964 #if defined (__stub_connect) || defined (__stub___connect)
5965 choke me
5966 #else
5967 connect();
5968 #endif
5969
5970 ; return 0; }
5971 EOF
5972 if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5973   rm -rf conftest*
5974   eval "ac_cv_func_connect=yes"
5975 else
5976   echo "configure: failed program was:" >&5
5977   cat conftest.$ac_ext >&5
5978   rm -rf conftest*
5979   eval "ac_cv_func_connect=no"
5980 fi
5981 rm -f conftest*
5982
5983 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5984   echo "$ac_t""yes" 1>&6
5985   :
5986 else
5987   echo "$ac_t""no" 1>&6
5988 fi
5989
5990     if test $ac_cv_func_connect = no; then
5991       
5992 xe_msg_checking="for connect in -lsocket"
5993 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5994 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5995 echo "configure:5996: checking "$xe_msg_checking"" >&5
5996 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5997
5998 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5999 cat > conftest.$ac_ext <<EOF
6000 #line 6001 "configure"
6001 #include "confdefs.h"
6002 /* Override any gcc2 internal prototype to avoid an error.  */
6003 /* We use char because int might match the return type of a gcc2
6004     builtin and then its argument prototype would still apply.  */
6005 char connect();
6006
6007 int main() {
6008 connect()
6009 ; return 0; }
6010 EOF
6011 if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6012   rm -rf conftest*
6013   eval "ac_cv_lib_$ac_lib_var=yes"
6014 else
6015   echo "configure: failed program was:" >&5
6016   cat conftest.$ac_ext >&5
6017   rm -rf conftest*
6018   eval "ac_cv_lib_$ac_lib_var=no"
6019 fi
6020 rm -f conftest*
6021 xe_check_libs=""
6022
6023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6024   echo "$ac_t""yes" 1>&6
6025   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6026 else
6027   echo "$ac_t""no" 1>&6
6028 fi
6029
6030
6031     fi
6032
6033     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6034     echo $ac_n "checking for remove""... $ac_c" 1>&6
6035 echo "configure:6036: checking for remove" >&5
6036
6037 cat > conftest.$ac_ext <<EOF
6038 #line 6039 "configure"
6039 #include "confdefs.h"
6040 /* System header to define __stub macros and hopefully few prototypes,
6041     which can conflict with char remove(); below.  */
6042 #include <assert.h>
6043 /* Override any gcc2 internal prototype to avoid an error.  */
6044 /* We use char because int might match the return type of a gcc2
6045     builtin and then its argument prototype would still apply.  */
6046 char remove();
6047
6048 int main() {
6049
6050 /* The GNU C library defines this for functions which it implements
6051     to always fail with ENOSYS.  Some functions are actually named
6052     something starting with __ and the normal name is an alias.  */
6053 #if defined (__stub_remove) || defined (__stub___remove)
6054 choke me
6055 #else
6056 remove();
6057 #endif
6058
6059 ; return 0; }
6060 EOF
6061 if { (eval echo configure:6062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062   rm -rf conftest*
6063   eval "ac_cv_func_remove=yes"
6064 else
6065   echo "configure: failed program was:" >&5
6066   cat conftest.$ac_ext >&5
6067   rm -rf conftest*
6068   eval "ac_cv_func_remove=no"
6069 fi
6070 rm -f conftest*
6071
6072 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6073   echo "$ac_t""yes" 1>&6
6074   :
6075 else
6076   echo "$ac_t""no" 1>&6
6077 fi
6078
6079     if test $ac_cv_func_remove = no; then
6080       
6081 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6082 echo "configure:6083: checking for remove in -lposix" >&5
6083 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6084
6085 xe_check_libs=" -lposix "
6086 cat > conftest.$ac_ext <<EOF
6087 #line 6088 "configure"
6088 #include "confdefs.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 remove()
6096 ; return 0; }
6097 EOF
6098 if { (eval echo configure:6099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6099   rm -rf conftest*
6100   eval "ac_cv_lib_$ac_lib_var=yes"
6101 else
6102   echo "configure: failed program was:" >&5
6103   cat conftest.$ac_ext >&5
6104   rm -rf conftest*
6105   eval "ac_cv_lib_$ac_lib_var=no"
6106 fi
6107 rm -f conftest*
6108 xe_check_libs=""
6109
6110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6111   echo "$ac_t""yes" 1>&6
6112   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6113 else
6114   echo "$ac_t""no" 1>&6
6115 fi
6116
6117
6118     fi
6119
6120     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6121     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6122 echo "configure:6123: checking for shmat" >&5
6123
6124 cat > conftest.$ac_ext <<EOF
6125 #line 6126 "configure"
6126 #include "confdefs.h"
6127 /* System header to define __stub macros and hopefully few prototypes,
6128     which can conflict with char shmat(); below.  */
6129 #include <assert.h>
6130 /* Override any gcc2 internal prototype to avoid an error.  */
6131 /* We use char because int might match the return type of a gcc2
6132     builtin and then its argument prototype would still apply.  */
6133 char shmat();
6134
6135 int main() {
6136
6137 /* The GNU C library defines this for functions which it implements
6138     to always fail with ENOSYS.  Some functions are actually named
6139     something starting with __ and the normal name is an alias.  */
6140 #if defined (__stub_shmat) || defined (__stub___shmat)
6141 choke me
6142 #else
6143 shmat();
6144 #endif
6145
6146 ; return 0; }
6147 EOF
6148 if { (eval echo configure:6149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6149   rm -rf conftest*
6150   eval "ac_cv_func_shmat=yes"
6151 else
6152   echo "configure: failed program was:" >&5
6153   cat conftest.$ac_ext >&5
6154   rm -rf conftest*
6155   eval "ac_cv_func_shmat=no"
6156 fi
6157 rm -f conftest*
6158
6159 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6160   echo "$ac_t""yes" 1>&6
6161   :
6162 else
6163   echo "$ac_t""no" 1>&6
6164 fi
6165
6166     if test $ac_cv_func_shmat = no; then
6167       
6168 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6169 echo "configure:6170: checking for shmat in -lipc" >&5
6170 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6171
6172 xe_check_libs=" -lipc "
6173 cat > conftest.$ac_ext <<EOF
6174 #line 6175 "configure"
6175 #include "confdefs.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 shmat()
6183 ; return 0; }
6184 EOF
6185 if { (eval echo configure:6186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6186   rm -rf conftest*
6187   eval "ac_cv_lib_$ac_lib_var=yes"
6188 else
6189   echo "configure: failed program was:" >&5
6190   cat conftest.$ac_ext >&5
6191   rm -rf conftest*
6192   eval "ac_cv_lib_$ac_lib_var=no"
6193 fi
6194 rm -f conftest*
6195 xe_check_libs=""
6196
6197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6198   echo "$ac_t""yes" 1>&6
6199   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6200 else
6201   echo "$ac_t""no" 1>&6
6202 fi
6203
6204
6205     fi
6206   fi
6207
6208   # Check for libraries that X11R6 Xt/Xaw programs need.
6209   ac_save_LDFLAGS="$LDFLAGS"
6210   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6211   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6212   # check for ICE first), but we must link in the order -lSM -lICE or
6213   # we get undefined symbols.  So assume we have SM if we have ICE.
6214   # These have to be linked with before -lX11, unlike the other
6215   # libraries we check for below, so use a different variable.
6216   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6217   
6218 xe_msg_checking="for IceConnectionNumber in -lICE"
6219 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6220 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6221 echo "configure:6222: checking "$xe_msg_checking"" >&5
6222 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6223
6224 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6225 cat > conftest.$ac_ext <<EOF
6226 #line 6227 "configure"
6227 #include "confdefs.h"
6228 /* Override any gcc2 internal prototype to avoid an error.  */
6229 /* We use char because int might match the return type of a gcc2
6230     builtin and then its argument prototype would still apply.  */
6231 char IceConnectionNumber();
6232
6233 int main() {
6234 IceConnectionNumber()
6235 ; return 0; }
6236 EOF
6237 if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6238   rm -rf conftest*
6239   eval "ac_cv_lib_$ac_lib_var=yes"
6240 else
6241   echo "configure: failed program was:" >&5
6242   cat conftest.$ac_ext >&5
6243   rm -rf conftest*
6244   eval "ac_cv_lib_$ac_lib_var=no"
6245 fi
6246 rm -f conftest*
6247 xe_check_libs=""
6248
6249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6250   echo "$ac_t""yes" 1>&6
6251   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6252 else
6253   echo "$ac_t""no" 1>&6
6254 fi
6255
6256
6257   LDFLAGS="$ac_save_LDFLAGS"
6258
6259 fi
6260  # Autoconf claims to find X library and include dirs for us.
6261   if test "$no_x" = "yes"
6262   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6263   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6264   fi
6265 fi
6266
6267
6268 if test "$with_x11" = "yes"; then
6269   { test "$extra_verbose" = "yes" && cat << \EOF
6270     Defining HAVE_X_WINDOWS
6271 EOF
6272 cat >> confdefs.h <<\EOF
6273 #define HAVE_X_WINDOWS 1
6274 EOF
6275 }
6276
6277   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6278   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6279
6280       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6281     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6282     if test -d "$lib_dir" -a -d "$inc_dir"; then
6283       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6284         x_libraries="$lib_dir $x_libraries"
6285         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6286       esac
6287       case "$x_includes" in "$inc_dir"* ) ;; *)
6288         x_includes="$inc_dir $x_includes"
6289         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6290       esac
6291       break;       fi
6292   done
6293
6294     for rel in "X11R6" "X11R5" "X11R4"; do
6295     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6296     if test -d "$lib_dir" -a -d "$inc_dir"; then
6297       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6298         x_libraries="$x_libraries $lib_dir"
6299         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6300       esac
6301       case "$x_includes" in "$inc_dir"* ) ;; *)
6302         x_includes="$x_includes $inc_dir"
6303         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6304       esac
6305       break;     fi
6306   done
6307
6308     case "$opsys" in
6309   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 ;;
6310   esac
6311
6312   ld_switch_x_site="$X_LIBS"
6313
6314   
6315 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6316     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6317   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6318   
6319         runpath="" runpath_dirs=""
6320   if test -n "$LD_RUN_PATH"; then
6321     runpath="$LD_RUN_PATH"
6322   elif test "$GCC" = "yes"; then
6323         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6324     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6325     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6326     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6327       case "$arg" in P,* | -L* | -R* )
6328         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6329           {
6330 xe_runpath_dir="$dir"
6331   test "$xe_runpath_dir" != "/lib"     -a \
6332         "$xe_runpath_dir" != "/usr/lib" -a \
6333         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6334   eval "$xe_add_unique_runpath_dir"
6335 }
6336         done ;;
6337       esac
6338     done
6339     ld_switch_run="$ld_switch_run_save"
6340     rm -f conftest*
6341   else
6342         for arg in $ld_switch_site $ld_switch_x_site; do
6343       case "$arg" in -L*) {
6344 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6345   test "$xe_runpath_dir" != "/lib"     -a \
6346         "$xe_runpath_dir" != "/usr/lib" -a \
6347         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6348   eval "$xe_add_unique_runpath_dir"
6349 };; esac
6350     done
6351         if test "$opsys $need_motif" = "sol2 yes"; then
6352       xe_runpath_dir="/opt/SUNWdt/lib";
6353       eval "$xe_add_unique_runpath_dir";
6354     fi
6355   fi 
6356   if test -n "$runpath"; then
6357     ld_switch_run="${dash_r}${runpath}"
6358     
6359 if test "$GCC" = "yes"; then
6360   set x $ld_switch_run; shift; ld_switch_run=""
6361   while test -n "$1"; do
6362     case $1 in
6363       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6364       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6365       -Xlinker* ) ;;
6366       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6367     esac
6368     shift
6369   done
6370 fi
6371     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6372   fi
6373 fi
6374
6375
6376   if test "$extra_verbose" = "yes"; then
6377     echo; echo "X11 compilation variables:"
6378     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6379     echo
6380   fi
6381
6382             bitmapdirs=
6383   if test "$x_includes" != NONE; then
6384     for i in $x_includes; do
6385       if test -d "$i/bitmaps"; then
6386         bitmapdirs="$i/bitmaps:$bitmapdirs"
6387       fi
6388       if test -d "$i/X11/bitmaps"; then
6389         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6390       fi
6391     done
6392     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6393   fi
6394   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6395     Defining BITMAPDIR = "$bitmapdirs"
6396 EOF
6397 cat >> confdefs.h <<EOF
6398 #define BITMAPDIR "$bitmapdirs"
6399 EOF
6400 }
6401
6402
6403     echo "checking for X defines extracted by xmkmf" 1>&6
6404 echo "configure:6405: checking for X defines extracted by xmkmf" >&5
6405   rm -fr conftestdir
6406   if mkdir conftestdir; then
6407     cd conftestdir
6408     cat > Imakefile <<'EOF'
6409 xetest:
6410         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6411 EOF
6412     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6413       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6414       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6415     fi
6416     cd ..
6417     rm -fr conftestdir
6418     for word in $xmkmf_defines; do
6419       case "$word" in -D* )
6420         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6421         case "$word" in
6422           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6423           *     ) val=1 ;;
6424         esac
6425         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6426           if test "$val" = "1"
6427             then { test "$extra_verbose" = "yes" && cat << EOF
6428     Defining $sym
6429 EOF
6430 cat >> confdefs.h <<EOF
6431 #define $sym 1
6432 EOF
6433 }
6434
6435             else { test "$extra_verbose" = "yes" && cat << EOF
6436     Defining $sym = $val
6437 EOF
6438 cat >> confdefs.h <<EOF
6439 #define $sym $val
6440 EOF
6441 }
6442
6443           fi
6444         fi  ;;
6445       esac
6446     done
6447   fi
6448
6449     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6450 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6451 echo "configure:6452: checking for X11/Intrinsic.h" >&5
6452
6453 cat > conftest.$ac_ext <<EOF
6454 #line 6455 "configure"
6455 #include "confdefs.h"
6456 #include <X11/Intrinsic.h>
6457 EOF
6458 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6459 { (eval echo configure:6460: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6460 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6461 if test -z "$ac_err"; then
6462   rm -rf conftest*
6463   eval "ac_cv_header_$ac_safe=yes"
6464 else
6465   echo "$ac_err" >&5
6466   echo "configure: failed program was:" >&5
6467   cat conftest.$ac_ext >&5
6468   rm -rf conftest*
6469   eval "ac_cv_header_$ac_safe=no"
6470 fi
6471 rm -f conftest*
6472 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6473   echo "$ac_t""yes" 1>&6
6474   :
6475 else
6476   echo "$ac_t""no" 1>&6
6477 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6478 fi
6479
6480
6481       
6482 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6483 echo "configure:6484: checking for XOpenDisplay in -lX11" >&5
6484 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6485
6486 xe_check_libs=" -lX11 "
6487 cat > conftest.$ac_ext <<EOF
6488 #line 6489 "configure"
6489 #include "confdefs.h"
6490 /* Override any gcc2 internal prototype to avoid an error.  */
6491 /* We use char because int might match the return type of a gcc2
6492     builtin and then its argument prototype would still apply.  */
6493 char XOpenDisplay();
6494
6495 int main() {
6496 XOpenDisplay()
6497 ; return 0; }
6498 EOF
6499 if { (eval echo configure:6500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6500   rm -rf conftest*
6501   eval "ac_cv_lib_$ac_lib_var=yes"
6502 else
6503   echo "configure: failed program was:" >&5
6504   cat conftest.$ac_ext >&5
6505   rm -rf conftest*
6506   eval "ac_cv_lib_$ac_lib_var=no"
6507 fi
6508 rm -f conftest*
6509 xe_check_libs=""
6510
6511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6512   echo "$ac_t""yes" 1>&6
6513   have_lib_x11=yes
6514 else
6515   echo "$ac_t""no" 1>&6
6516 fi
6517
6518
6519   if test "$have_lib_x11" != "yes"; then
6520     
6521 xe_msg_checking="for XGetFontProperty in -lX11"
6522 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6523 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6524 echo "configure:6525: checking "$xe_msg_checking"" >&5
6525 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6526
6527 xe_check_libs=" -lX11 -b i486-linuxaout"
6528 cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 /* Override any gcc2 internal prototype to avoid an error.  */
6532 /* We use char because int might match the return type of a gcc2
6533     builtin and then its argument prototype would still apply.  */
6534 char XGetFontProperty();
6535
6536 int main() {
6537 XGetFontProperty()
6538 ; return 0; }
6539 EOF
6540 if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6541   rm -rf conftest*
6542   eval "ac_cv_lib_$ac_lib_var=yes"
6543 else
6544   echo "configure: failed program was:" >&5
6545   cat conftest.$ac_ext >&5
6546   rm -rf conftest*
6547   eval "ac_cv_lib_$ac_lib_var=no"
6548 fi
6549 rm -f conftest*
6550 xe_check_libs=""
6551
6552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6553   echo "$ac_t""yes" 1>&6
6554   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6555 else
6556   echo "$ac_t""no" 1>&6
6557 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6558 fi
6559
6560
6561   fi
6562   libs_x="-lX11"
6563   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6564
6565     
6566 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6567 echo "configure:6568: checking for XShapeSelectInput in -lXext" >&5
6568 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6569
6570 xe_check_libs=" -lXext "
6571 cat > conftest.$ac_ext <<EOF
6572 #line 6573 "configure"
6573 #include "confdefs.h"
6574 /* Override any gcc2 internal prototype to avoid an error.  */
6575 /* We use char because int might match the return type of a gcc2
6576     builtin and then its argument prototype would still apply.  */
6577 char XShapeSelectInput();
6578
6579 int main() {
6580 XShapeSelectInput()
6581 ; return 0; }
6582 EOF
6583 if { (eval echo configure:6584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6584   rm -rf conftest*
6585   eval "ac_cv_lib_$ac_lib_var=yes"
6586 else
6587   echo "configure: failed program was:" >&5
6588   cat conftest.$ac_ext >&5
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=no"
6591 fi
6592 rm -f conftest*
6593 xe_check_libs=""
6594
6595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6596   echo "$ac_t""yes" 1>&6
6597   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6598 else
6599   echo "$ac_t""no" 1>&6
6600 fi
6601
6602
6603
6604     
6605 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6606 echo "configure:6607: checking for XtOpenDisplay in -lXt" >&5
6607 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6608
6609 xe_check_libs=" -lXt "
6610 cat > conftest.$ac_ext <<EOF
6611 #line 6612 "configure"
6612 #include "confdefs.h"
6613 /* Override any gcc2 internal prototype to avoid an error.  */
6614 /* We use char because int might match the return type of a gcc2
6615     builtin and then its argument prototype would still apply.  */
6616 char XtOpenDisplay();
6617
6618 int main() {
6619 XtOpenDisplay()
6620 ; return 0; }
6621 EOF
6622 if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6623   rm -rf conftest*
6624   eval "ac_cv_lib_$ac_lib_var=yes"
6625 else
6626   echo "configure: failed program was:" >&5
6627   cat conftest.$ac_ext >&5
6628   rm -rf conftest*
6629   eval "ac_cv_lib_$ac_lib_var=no"
6630 fi
6631 rm -f conftest*
6632 xe_check_libs=""
6633
6634 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6635   echo "$ac_t""yes" 1>&6
6636   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6637 else
6638   echo "$ac_t""no" 1>&6
6639 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6640 fi
6641
6642
6643
6644   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6645 echo "configure:6646: checking the version of X11 being used" >&5
6646   cat > conftest.$ac_ext <<EOF
6647 #line 6648 "configure"
6648 #include "confdefs.h"
6649 #include <X11/Intrinsic.h>
6650     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6651 EOF
6652 if { (eval echo configure:6653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6653 then
6654   ./conftest foobar; x11_release=$?
6655 else
6656   conftest_rc="$?"
6657   echo "configure: failed program was:" >&5
6658   cat conftest.$ac_ext >&5
6659   rm -fr conftest*
6660   x11_release=4
6661 fi
6662 rm -fr conftest*
6663   echo "$ac_t""R${x11_release}" 1>&6
6664   { test "$extra_verbose" = "yes" && cat << EOF
6665     Defining THIS_IS_X11R${x11_release}
6666 EOF
6667 cat >> confdefs.h <<EOF
6668 #define THIS_IS_X11R${x11_release} 1
6669 EOF
6670 }
6671
6672
6673   if test "${x11_release}" = "4"; then
6674     case "$with_widgets" in
6675       "" | "no") with_widgets=no ;;
6676       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6677     esac
6678   fi
6679
6680   for ac_func in XConvertCase
6681 do
6682 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6683 echo "configure:6684: checking for $ac_func" >&5
6684
6685 cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 /* System header to define __stub macros and hopefully few prototypes,
6689     which can conflict with char $ac_func(); below.  */
6690 #include <assert.h>
6691 /* Override any gcc2 internal prototype to avoid an error.  */
6692 /* We use char because int might match the return type of a gcc2
6693     builtin and then its argument prototype would still apply.  */
6694 char $ac_func();
6695
6696 int main() {
6697
6698 /* The GNU C library defines this for functions which it implements
6699     to always fail with ENOSYS.  Some functions are actually named
6700     something starting with __ and the normal name is an alias.  */
6701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6702 choke me
6703 #else
6704 $ac_func();
6705 #endif
6706
6707 ; return 0; }
6708 EOF
6709 if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6710   rm -rf conftest*
6711   eval "ac_cv_func_$ac_func=yes"
6712 else
6713   echo "configure: failed program was:" >&5
6714   cat conftest.$ac_ext >&5
6715   rm -rf conftest*
6716   eval "ac_cv_func_$ac_func=no"
6717 fi
6718 rm -f conftest*
6719
6720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6721   echo "$ac_t""yes" 1>&6
6722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6723   { test "$extra_verbose" = "yes" && cat << EOF
6724     Defining $ac_tr_func
6725 EOF
6726 cat >> confdefs.h <<EOF
6727 #define $ac_tr_func 1
6728 EOF
6729 }
6730  
6731 else
6732   echo "$ac_t""no" 1>&6
6733 fi
6734 done
6735
6736
6737   for ac_hdr in X11/Xlocale.h
6738 do
6739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6741 echo "configure:6742: checking for $ac_hdr" >&5
6742
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 #include <$ac_hdr>
6747 EOF
6748 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6749 { (eval echo configure:6750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6750 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6751 if test -z "$ac_err"; then
6752   rm -rf conftest*
6753   eval "ac_cv_header_$ac_safe=yes"
6754 else
6755   echo "$ac_err" >&5
6756   echo "configure: failed program was:" >&5
6757   cat conftest.$ac_ext >&5
6758   rm -rf conftest*
6759   eval "ac_cv_header_$ac_safe=no"
6760 fi
6761 rm -f conftest*
6762 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6763   echo "$ac_t""yes" 1>&6
6764     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6765   { test "$extra_verbose" = "yes" && cat << EOF
6766     Defining $ac_tr_hdr
6767 EOF
6768 cat >> confdefs.h <<EOF
6769 #define $ac_tr_hdr 1
6770 EOF
6771 }
6772  
6773 else
6774   echo "$ac_t""no" 1>&6
6775 fi
6776 done
6777
6778
6779     for ac_func in XRegisterIMInstantiateCallback
6780 do
6781 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6782 echo "configure:6783: checking for $ac_func" >&5
6783
6784 cat > conftest.$ac_ext <<EOF
6785 #line 6786 "configure"
6786 #include "confdefs.h"
6787 /* System header to define __stub macros and hopefully few prototypes,
6788     which can conflict with char $ac_func(); below.  */
6789 #include <assert.h>
6790 /* Override any gcc2 internal prototype to avoid an error.  */
6791 /* We use char because int might match the return type of a gcc2
6792     builtin and then its argument prototype would still apply.  */
6793 char $ac_func();
6794
6795 int main() {
6796
6797 /* The GNU C library defines this for functions which it implements
6798     to always fail with ENOSYS.  Some functions are actually named
6799     something starting with __ and the normal name is an alias.  */
6800 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6801 choke me
6802 #else
6803 $ac_func();
6804 #endif
6805
6806 ; return 0; }
6807 EOF
6808 if { (eval echo configure:6809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6809   rm -rf conftest*
6810   eval "ac_cv_func_$ac_func=yes"
6811 else
6812   echo "configure: failed program was:" >&5
6813   cat conftest.$ac_ext >&5
6814   rm -rf conftest*
6815   eval "ac_cv_func_$ac_func=no"
6816 fi
6817 rm -f conftest*
6818
6819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6820   echo "$ac_t""yes" 1>&6
6821     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6822   { test "$extra_verbose" = "yes" && cat << EOF
6823     Defining $ac_tr_func
6824 EOF
6825 cat >> confdefs.h <<EOF
6826 #define $ac_tr_func 1
6827 EOF
6828 }
6829  
6830 else
6831   echo "$ac_t""no" 1>&6
6832 fi
6833 done
6834
6835   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6836 echo "configure:6837: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6837   cat > conftest.$ac_ext <<EOF
6838 #line 6839 "configure"
6839 #include "confdefs.h"
6840
6841 #define NeedFunctionPrototypes 1
6842 #include <X11/Xlib.h>
6843 extern Bool XRegisterIMInstantiateCallback(
6844    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6845
6846 int main() {
6847
6848 ; return 0; }
6849 EOF
6850 if { (eval echo configure:6851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6851   rm -rf conftest*
6852   echo "$ac_t""yes" 1>&6
6853 else
6854   echo "configure: failed program was:" >&5
6855   cat conftest.$ac_ext >&5
6856   rm -rf conftest*
6857   echo "$ac_t""no" 1>&6
6858    { test "$extra_verbose" = "yes" && cat << \EOF
6859     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6860 EOF
6861 cat >> confdefs.h <<\EOF
6862 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6863 EOF
6864 }
6865
6866 fi
6867 rm -f conftest*
6868
6869     test -z "$with_xmu" && { 
6870 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6871 echo "configure:6872: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6872 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6873
6874 xe_check_libs=" -lXmu "
6875 cat > conftest.$ac_ext <<EOF
6876 #line 6877 "configure"
6877 #include "confdefs.h"
6878 /* Override any gcc2 internal prototype to avoid an error.  */
6879 /* We use char because int might match the return type of a gcc2
6880     builtin and then its argument prototype would still apply.  */
6881 char XmuReadBitmapDataFromFile();
6882
6883 int main() {
6884 XmuReadBitmapDataFromFile()
6885 ; return 0; }
6886 EOF
6887 if { (eval echo configure:6888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6888   rm -rf conftest*
6889   eval "ac_cv_lib_$ac_lib_var=yes"
6890 else
6891   echo "configure: failed program was:" >&5
6892   cat conftest.$ac_ext >&5
6893   rm -rf conftest*
6894   eval "ac_cv_lib_$ac_lib_var=no"
6895 fi
6896 rm -f conftest*
6897 xe_check_libs=""
6898
6899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6900   echo "$ac_t""yes" 1>&6
6901   with_xmu=yes
6902 else
6903   echo "$ac_t""no" 1>&6
6904 with_xmu=no
6905 fi
6906
6907  }
6908   if test "$with_xmu" = "no"; then
6909     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6910    echo "    xemacs will be linked with \"xmu.o\""
6911  fi
6912   else
6913     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6914     { test "$extra_verbose" = "yes" && cat << \EOF
6915     Defining HAVE_XMU
6916 EOF
6917 cat >> confdefs.h <<\EOF
6918 #define HAVE_XMU 1
6919 EOF
6920 }
6921
6922   fi
6923
6924       
6925 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6926 echo "configure:6927: checking for main in -lXbsd" >&5
6927 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6928
6929 xe_check_libs=" -lXbsd "
6930 cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933
6934 int main() {
6935 main()
6936 ; return 0; }
6937 EOF
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6939   rm -rf conftest*
6940   eval "ac_cv_lib_$ac_lib_var=yes"
6941 else
6942   echo "configure: failed program was:" >&5
6943   cat conftest.$ac_ext >&5
6944   rm -rf conftest*
6945   eval "ac_cv_lib_$ac_lib_var=no"
6946 fi
6947 rm -f conftest*
6948 xe_check_libs=""
6949
6950 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6951   echo "$ac_t""yes" 1>&6
6952   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6953 else
6954   echo "$ac_t""no" 1>&6
6955 fi
6956
6957
6958
6959     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6960         if test "$GCC" = "yes"; then
6961       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6962       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6963     else
6964       case "$CC" in
6965         "xlc" ) CC="xlc_r" ;;
6966         "xlC" ) CC="xlC_r" ;;
6967         "cc"  ) CC="cc_r" ;;
6968       esac
6969     fi
6970   fi
6971
6972 fi 
6973 if test "$with_msw" != "no"; then
6974   echo "checking for MS-Windows" 1>&6
6975 echo "configure:6976: checking for MS-Windows" >&5
6976   
6977 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6978 echo "configure:6979: checking for main in -lgdi32" >&5
6979 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6980
6981 xe_check_libs=" -lgdi32 "
6982 cat > conftest.$ac_ext <<EOF
6983 #line 6984 "configure"
6984 #include "confdefs.h"
6985
6986 int main() {
6987 main()
6988 ; return 0; }
6989 EOF
6990 if { (eval echo configure:6991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6991   rm -rf conftest*
6992   eval "ac_cv_lib_$ac_lib_var=yes"
6993 else
6994   echo "configure: failed program was:" >&5
6995   cat conftest.$ac_ext >&5
6996   rm -rf conftest*
6997   eval "ac_cv_lib_$ac_lib_var=no"
6998 fi
6999 rm -f conftest*
7000 xe_check_libs=""
7001
7002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7003   echo "$ac_t""yes" 1>&6
7004   with_msw=yes
7005 else
7006   echo "$ac_t""no" 1>&6
7007 fi
7008
7009
7010   if test "$with_msw" = "yes"; then
7011     { test "$extra_verbose" = "yes" && cat << \EOF
7012     Defining HAVE_MS_WINDOWS
7013 EOF
7014 cat >> confdefs.h <<\EOF
7015 #define HAVE_MS_WINDOWS 1
7016 EOF
7017 }
7018
7019
7020         if test "$with_netinstall" = "yes"; then
7021       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7022       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7023       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7024     fi
7025
7026     install_pp="$blddir/lib-src/installexe.sh"
7027     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
7028     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7029     if test "$window_system" != x11; then
7030         window_system=msw
7031         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7032             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7033    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7034  fi
7035         test "$with_menubars"   != "no" && with_menubars=msw \
7036             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7037    echo "    xemacs will be linked with \"menubar-msw.o\""
7038  fi
7039         test "$with_toolbars"   != "no" && with_toolbars=msw \
7040             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7041    echo "    xemacs will be linked with \"toolbar-msw.o\""
7042  fi
7043         test "$with_dialogs"   != "no" && with_dialogs=msw \
7044             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7045    echo "    xemacs will be linked with \"dialog-msw.o\""
7046  fi
7047         test "$with_widgets"   != "no" && with_widgets=msw
7048     else
7049         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7050    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7051  fi
7052         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7053    echo "    xemacs will be linked with \"menubar-msw.o\""
7054  fi
7055         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7056    echo "    xemacs will be linked with \"toolbar-msw.o\""
7057  fi
7058         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7059    echo "    xemacs will be linked with \"dialog-msw.o\""
7060  fi
7061     fi
7062         cat > conftest.$ac_ext <<EOF
7063 #line 7064 "configure"
7064 #include "confdefs.h"
7065 #include <fcntl.h>
7066     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7067 EOF
7068 if { (eval echo configure:7069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7069 then
7070   { test "$extra_verbose" = "yes" && cat << \EOF
7071     Defining HAVE_MSG_SELECT
7072 EOF
7073 cat >> confdefs.h <<\EOF
7074 #define HAVE_MSG_SELECT 1
7075 EOF
7076 }
7077
7078 else
7079   conftest_rc="$?"
7080   echo "configure: failed program was:" >&5
7081   cat conftest.$ac_ext >&5
7082 fi
7083 rm -fr conftest*
7084     with_file_coding=yes
7085     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
7086    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\""
7087  fi
7088   fi
7089 fi
7090
7091
7092
7093 test -z "$window_system" && window_system="none"
7094
7095 if test "$window_system" = "none"; then
7096   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7097   do
7098     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7099        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7100     fi
7101     eval "with_${feature}=no"
7102   done
7103 else
7104   test -z "$with_toolbars" && with_toolbars=yes
7105 fi
7106
7107 if test "$with_msw" != "yes"; then
7108   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7109   do
7110     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7111        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7112     fi
7113     eval "with_${feature}=no"
7114   done
7115 else
7116   :
7117 fi
7118
7119 if test "$with_x11" != "yes"; then
7120             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7121   do
7122     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7123        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7124     fi
7125     eval "with_${feature}=no"
7126   done
7127 fi
7128
7129 if test "$with_x11" = "yes"; then
7130   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7131 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7132 echo "configure:7133: checking for X11/extensions/shape.h" >&5
7133
7134 cat > conftest.$ac_ext <<EOF
7135 #line 7136 "configure"
7136 #include "confdefs.h"
7137 #include <X11/extensions/shape.h>
7138 EOF
7139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7140 { (eval echo configure:7141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7142 if test -z "$ac_err"; then
7143   rm -rf conftest*
7144   eval "ac_cv_header_$ac_safe=yes"
7145 else
7146   echo "$ac_err" >&5
7147   echo "configure: failed program was:" >&5
7148   cat conftest.$ac_ext >&5
7149   rm -rf conftest*
7150   eval "ac_cv_header_$ac_safe=no"
7151 fi
7152 rm -f conftest*
7153 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7154   echo "$ac_t""yes" 1>&6
7155   
7156    { test "$extra_verbose" = "yes" && cat << \EOF
7157     Defining HAVE_BALLOON_HELP
7158 EOF
7159 cat >> confdefs.h <<\EOF
7160 #define HAVE_BALLOON_HELP 1
7161 EOF
7162 }
7163
7164    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7165    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7166  fi
7167 else
7168   echo "$ac_t""no" 1>&6
7169 fi
7170
7171 fi
7172
7173 bitmapdir=
7174
7175 case "$window_system" in
7176   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7177   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7178   gtk  )
7179        HAVE_X_WINDOWS=no
7180        test "$with_gnome" = "yes" && echo "  Using GNOME."
7181        test "$with_gnome" = "no" && echo "  Using GTK."
7182        ;;
7183   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7184 esac
7185
7186 case "$x_libraries" in *X11R4* )
7187   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7188   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7189 esac
7190
7191 echo "checking for WM_COMMAND option" 1>&6
7192 echo "configure:7193: checking for WM_COMMAND option" >&5;
7193 if test "$with_wmcommand" != "no"; then
7194   { test "$extra_verbose" = "yes" && cat << \EOF
7195     Defining HAVE_WMCOMMAND
7196 EOF
7197 cat >> confdefs.h <<\EOF
7198 #define HAVE_WMCOMMAND 1
7199 EOF
7200 }
7201
7202 fi
7203
7204 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7205 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7206 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7207 echo "configure:7208: checking for X11/Xauth.h" >&5
7208
7209 cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 #include <X11/Xauth.h>
7213 EOF
7214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7215 { (eval echo configure:7216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7217 if test -z "$ac_err"; then
7218   rm -rf conftest*
7219   eval "ac_cv_header_$ac_safe=yes"
7220 else
7221   echo "$ac_err" >&5
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_header_$ac_safe=no"
7226 fi
7227 rm -f conftest*
7228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7229   echo "$ac_t""yes" 1>&6
7230   :
7231 else
7232   echo "$ac_t""no" 1>&6
7233 with_xauth=no
7234 fi
7235  }
7236 test -z "$with_xauth" && { 
7237 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7238 echo "configure:7239: checking for XauGetAuthByAddr in -lXau" >&5
7239 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7240
7241 xe_check_libs=" -lXau "
7242 cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* Override any gcc2 internal prototype to avoid an error.  */
7246 /* We use char because int might match the return type of a gcc2
7247     builtin and then its argument prototype would still apply.  */
7248 char XauGetAuthByAddr();
7249
7250 int main() {
7251 XauGetAuthByAddr()
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=yes"
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   eval "ac_cv_lib_$ac_lib_var=no"
7262 fi
7263 rm -f conftest*
7264 xe_check_libs=""
7265
7266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7267   echo "$ac_t""yes" 1>&6
7268   :
7269 else
7270   echo "$ac_t""no" 1>&6
7271 with_xauth=no
7272 fi
7273
7274  }
7275 test -z "$with_xauth" && with_xauth=yes
7276 if test "$with_xauth" = "yes"; then
7277   { test "$extra_verbose" = "yes" && cat << \EOF
7278     Defining HAVE_XAUTH
7279 EOF
7280 cat >> confdefs.h <<\EOF
7281 #define HAVE_XAUTH 1
7282 EOF
7283 }
7284
7285   
7286 T=""
7287 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
7288 libs_xauth="$T"
7289
7290 fi
7291
7292
7293
7294
7295 if test "$with_tooltalk" != "no" ; then
7296       for dir in "" "Tt/" "desktop/" ; do
7297     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7298 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7299 echo "configure:7300: checking for ${dir}tt_c.h" >&5
7300
7301 cat > conftest.$ac_ext <<EOF
7302 #line 7303 "configure"
7303 #include "confdefs.h"
7304 #include <${dir}tt_c.h>
7305 EOF
7306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7307 { (eval echo configure:7308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7309 if test -z "$ac_err"; then
7310   rm -rf conftest*
7311   eval "ac_cv_header_$ac_safe=yes"
7312 else
7313   echo "$ac_err" >&5
7314   echo "configure: failed program was:" >&5
7315   cat conftest.$ac_ext >&5
7316   rm -rf conftest*
7317   eval "ac_cv_header_$ac_safe=no"
7318 fi
7319 rm -f conftest*
7320 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7321   echo "$ac_t""yes" 1>&6
7322   tt_c_h_file="${dir}tt_c.h"; break
7323 else
7324   echo "$ac_t""no" 1>&6
7325 fi
7326
7327   done
7328   if test -z "$tt_c_h_file"; then
7329     if test "$with_tooltalk" = "yes"; then
7330       (echo "$progname: Usage error:"
7331 echo " " "Unable to find required tooltalk header files."
7332 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7333     fi
7334     with_tooltalk=no
7335   fi
7336 fi
7337 if test "$with_tooltalk" != "no" ; then
7338   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7339     
7340 xe_msg_checking="for tt_message_create in -ltt"
7341 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7342 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7343 echo "configure:7344: checking "$xe_msg_checking"" >&5
7344 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7345
7346 xe_check_libs=" -ltt $extra_libs"
7347 cat > conftest.$ac_ext <<EOF
7348 #line 7349 "configure"
7349 #include "confdefs.h"
7350 /* Override any gcc2 internal prototype to avoid an error.  */
7351 /* We use char because int might match the return type of a gcc2
7352     builtin and then its argument prototype would still apply.  */
7353 char tt_message_create();
7354
7355 int main() {
7356 tt_message_create()
7357 ; return 0; }
7358 EOF
7359 if { (eval echo configure:7360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7360   rm -rf conftest*
7361   eval "ac_cv_lib_$ac_lib_var=yes"
7362 else
7363   echo "configure: failed program was:" >&5
7364   cat conftest.$ac_ext >&5
7365   rm -rf conftest*
7366   eval "ac_cv_lib_$ac_lib_var=no"
7367 fi
7368 rm -f conftest*
7369 xe_check_libs=""
7370
7371 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7372   echo "$ac_t""yes" 1>&6
7373   tt_libs="-ltt $extra_libs"; break
7374 else
7375   echo "$ac_t""no" 1>&6
7376 :
7377 fi
7378
7379
7380   done
7381   if test -z "$tt_libs"; then
7382     if test "$with_tooltalk" = "yes"; then
7383       (echo "$progname: Usage error:"
7384 echo " " "Unable to find required tooltalk libraries."
7385 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7386     fi
7387     with_tooltalk=no
7388   fi
7389 fi
7390 test -z "$with_tooltalk" && with_tooltalk=yes
7391 if test "$with_tooltalk" = "yes"; then
7392   { test "$extra_verbose" = "yes" && cat << \EOF
7393     Defining TOOLTALK
7394 EOF
7395 cat >> confdefs.h <<\EOF
7396 #define TOOLTALK 1
7397 EOF
7398 }
7399
7400   { test "$extra_verbose" = "yes" && cat << EOF
7401     Defining TT_C_H_FILE = "$tt_c_h_file"
7402 EOF
7403 cat >> confdefs.h <<EOF
7404 #define TT_C_H_FILE "$tt_c_h_file"
7405 EOF
7406 }
7407
7408   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7409   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7410    echo "    xemacs will be linked with \"tooltalk.o\""
7411  fi
7412 fi
7413
7414 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7415 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7416 echo "configure:7417: checking for Dt/Dt.h" >&5
7417
7418 cat > conftest.$ac_ext <<EOF
7419 #line 7420 "configure"
7420 #include "confdefs.h"
7421 #include <Dt/Dt.h>
7422 EOF
7423 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7424 { (eval echo configure:7425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7425 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7426 if test -z "$ac_err"; then
7427   rm -rf conftest*
7428   eval "ac_cv_header_$ac_safe=yes"
7429 else
7430   echo "$ac_err" >&5
7431   echo "configure: failed program was:" >&5
7432   cat conftest.$ac_ext >&5
7433   rm -rf conftest*
7434   eval "ac_cv_header_$ac_safe=no"
7435 fi
7436 rm -f conftest*
7437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7438   echo "$ac_t""yes" 1>&6
7439   :
7440 else
7441   echo "$ac_t""no" 1>&6
7442 with_cde=no
7443 fi
7444  }
7445 test -z "$with_cde" && { 
7446 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7447 echo "configure:7448: checking for DtDndDragStart in -lDtSvc" >&5
7448 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7449
7450 xe_check_libs=" -lDtSvc "
7451 cat > conftest.$ac_ext <<EOF
7452 #line 7453 "configure"
7453 #include "confdefs.h"
7454 /* Override any gcc2 internal prototype to avoid an error.  */
7455 /* We use char because int might match the return type of a gcc2
7456     builtin and then its argument prototype would still apply.  */
7457 char DtDndDragStart();
7458
7459 int main() {
7460 DtDndDragStart()
7461 ; return 0; }
7462 EOF
7463 if { (eval echo configure:7464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7464   rm -rf conftest*
7465   eval "ac_cv_lib_$ac_lib_var=yes"
7466 else
7467   echo "configure: failed program was:" >&5
7468   cat conftest.$ac_ext >&5
7469   rm -rf conftest*
7470   eval "ac_cv_lib_$ac_lib_var=no"
7471 fi
7472 rm -f conftest*
7473 xe_check_libs=""
7474
7475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7476   echo "$ac_t""yes" 1>&6
7477   :
7478 else
7479   echo "$ac_t""no" 1>&6
7480 with_cde=no
7481 fi
7482
7483  }
7484 test -z "$with_cde" && with_cde=yes
7485 if test "$with_dragndrop" = no; then
7486   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7487   with_cde=no
7488 fi
7489 if test "$with_cde" = "yes" ; then
7490   { test "$extra_verbose" = "yes" && cat << \EOF
7491     Defining HAVE_CDE
7492 EOF
7493 cat >> confdefs.h <<\EOF
7494 #define HAVE_CDE 1
7495 EOF
7496 }
7497
7498   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7499   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7500   with_tooltalk=yes # CDE requires Tooltalk
7501   need_motif=yes    # CDE requires Motif
7502 fi
7503
7504 test "$window_system" != "x11" && with_offix=no
7505 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7506   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7507   with_offix=no
7508 fi
7509 if test "$with_dragndrop" = no; then
7510   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7511   with_offix=no
7512 fi
7513 if test "$with_cde" = yes; then
7514   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7515   with_offix=no
7516 fi
7517 test -z "$with_offix" && with_offix=no
7518 if test "$with_offix" = "yes"; then
7519   { test "$extra_verbose" = "yes" && cat << \EOF
7520     Defining HAVE_OFFIX_DND
7521 EOF
7522 cat >> confdefs.h <<\EOF
7523 #define HAVE_OFFIX_DND 1
7524 EOF
7525 }
7526
7527   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7528   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7529 fi
7530 if test "$with_gtk" = "yes"; then
7531    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7532 fi
7533
7534 if test "$with_dragndrop" != "no" ; then
7535   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7536 echo "configure:7537: checking if drag and drop API is needed" >&5
7537   if test -n "$dragndrop_proto" ; then
7538     with_dragndrop=yes
7539     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7540     { test "$extra_verbose" = "yes" && cat << \EOF
7541     Defining HAVE_DRAGNDROP
7542 EOF
7543 cat >> confdefs.h <<\EOF
7544 #define HAVE_DRAGNDROP 1
7545 EOF
7546 }
7547
7548     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7549   else
7550     with_dragndrop=no
7551     echo "$ac_t""no" 1>&6
7552   fi
7553 fi
7554
7555 echo "checking for LDAP" 1>&6
7556 echo "configure:7557: checking for LDAP" >&5
7557 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7558 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7559 echo "configure:7560: checking for ldap.h" >&5
7560
7561 cat > conftest.$ac_ext <<EOF
7562 #line 7563 "configure"
7563 #include "confdefs.h"
7564 #include <ldap.h>
7565 EOF
7566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7567 { (eval echo configure:7568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7569 if test -z "$ac_err"; then
7570   rm -rf conftest*
7571   eval "ac_cv_header_$ac_safe=yes"
7572 else
7573   echo "$ac_err" >&5
7574   echo "configure: failed program was:" >&5
7575   cat conftest.$ac_ext >&5
7576   rm -rf conftest*
7577   eval "ac_cv_header_$ac_safe=no"
7578 fi
7579 rm -f conftest*
7580 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7581   echo "$ac_t""yes" 1>&6
7582   :
7583 else
7584   echo "$ac_t""no" 1>&6
7585 with_ldap=no
7586 fi
7587  }
7588 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7589 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7590 echo "configure:7591: checking for lber.h" >&5
7591
7592 cat > conftest.$ac_ext <<EOF
7593 #line 7594 "configure"
7594 #include "confdefs.h"
7595 #include <lber.h>
7596 EOF
7597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7598 { (eval echo configure:7599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7600 if test -z "$ac_err"; then
7601   rm -rf conftest*
7602   eval "ac_cv_header_$ac_safe=yes"
7603 else
7604   echo "$ac_err" >&5
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   eval "ac_cv_header_$ac_safe=no"
7609 fi
7610 rm -f conftest*
7611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7612   echo "$ac_t""yes" 1>&6
7613   :
7614 else
7615   echo "$ac_t""no" 1>&6
7616 with_ldap=no
7617 fi
7618  }
7619 if test "$with_ldap" != "no"; then
7620   
7621 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7622 echo "configure:7623: checking for ldap_search in -lldap" >&5
7623 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7624
7625 xe_check_libs=" -lldap "
7626 cat > conftest.$ac_ext <<EOF
7627 #line 7628 "configure"
7628 #include "confdefs.h"
7629 /* Override any gcc2 internal prototype to avoid an error.  */
7630 /* We use char because int might match the return type of a gcc2
7631     builtin and then its argument prototype would still apply.  */
7632 char ldap_search();
7633
7634 int main() {
7635 ldap_search()
7636 ; return 0; }
7637 EOF
7638 if { (eval echo configure:7639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7639   rm -rf conftest*
7640   eval "ac_cv_lib_$ac_lib_var=yes"
7641 else
7642   echo "configure: failed program was:" >&5
7643   cat conftest.$ac_ext >&5
7644   rm -rf conftest*
7645   eval "ac_cv_lib_$ac_lib_var=no"
7646 fi
7647 rm -f conftest*
7648 xe_check_libs=""
7649
7650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7651   echo "$ac_t""yes" 1>&6
7652   with_ldap_nolber=yes
7653 else
7654   echo "$ac_t""no" 1>&6
7655 with_ldap_nolber=no
7656 fi
7657
7658
7659   test "$with_ldap_nolber" = "no" && { 
7660 xe_msg_checking="for ldap_open in -lldap"
7661 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7662 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7663 echo "configure:7664: checking "$xe_msg_checking"" >&5
7664 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7665
7666 xe_check_libs=" -lldap -llber"
7667 cat > conftest.$ac_ext <<EOF
7668 #line 7669 "configure"
7669 #include "confdefs.h"
7670 /* Override any gcc2 internal prototype to avoid an error.  */
7671 /* We use char because int might match the return type of a gcc2
7672     builtin and then its argument prototype would still apply.  */
7673 char ldap_open();
7674
7675 int main() {
7676 ldap_open()
7677 ; return 0; }
7678 EOF
7679 if { (eval echo configure:7680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7680   rm -rf conftest*
7681   eval "ac_cv_lib_$ac_lib_var=yes"
7682 else
7683   echo "configure: failed program was:" >&5
7684   cat conftest.$ac_ext >&5
7685   rm -rf conftest*
7686   eval "ac_cv_lib_$ac_lib_var=no"
7687 fi
7688 rm -f conftest*
7689 xe_check_libs=""
7690
7691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7692   echo "$ac_t""yes" 1>&6
7693   with_ldap_lber=yes
7694 else
7695   echo "$ac_t""no" 1>&6
7696 with_ldap_lber=no
7697 fi
7698
7699  }
7700   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7701 xe_msg_checking="for ldap_open in -lldap"
7702 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7703 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7704 echo "configure:7705: checking "$xe_msg_checking"" >&5
7705 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7706
7707 xe_check_libs=" -lldap -llber -lkrb"
7708 cat > conftest.$ac_ext <<EOF
7709 #line 7710 "configure"
7710 #include "confdefs.h"
7711 /* Override any gcc2 internal prototype to avoid an error.  */
7712 /* We use char because int might match the return type of a gcc2
7713     builtin and then its argument prototype would still apply.  */
7714 char ldap_open();
7715
7716 int main() {
7717 ldap_open()
7718 ; return 0; }
7719 EOF
7720 if { (eval echo configure:7721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7721   rm -rf conftest*
7722   eval "ac_cv_lib_$ac_lib_var=yes"
7723 else
7724   echo "configure: failed program was:" >&5
7725   cat conftest.$ac_ext >&5
7726   rm -rf conftest*
7727   eval "ac_cv_lib_$ac_lib_var=no"
7728 fi
7729 rm -f conftest*
7730 xe_check_libs=""
7731
7732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7733   echo "$ac_t""yes" 1>&6
7734   with_ldap_krb=yes
7735 else
7736   echo "$ac_t""no" 1>&6
7737 with_ldap_krb=no
7738 fi
7739
7740  }
7741   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7742 xe_msg_checking="for ldap_open in -lldap"
7743 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7744 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7745 echo "configure:7746: checking "$xe_msg_checking"" >&5
7746 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7747
7748 xe_check_libs=" -lldap -llber -lkrb -ldes"
7749 cat > conftest.$ac_ext <<EOF
7750 #line 7751 "configure"
7751 #include "confdefs.h"
7752 /* Override any gcc2 internal prototype to avoid an error.  */
7753 /* We use char because int might match the return type of a gcc2
7754     builtin and then its argument prototype would still apply.  */
7755 char ldap_open();
7756
7757 int main() {
7758 ldap_open()
7759 ; return 0; }
7760 EOF
7761 if { (eval echo configure:7762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7762   rm -rf conftest*
7763   eval "ac_cv_lib_$ac_lib_var=yes"
7764 else
7765   echo "configure: failed program was:" >&5
7766   cat conftest.$ac_ext >&5
7767   rm -rf conftest*
7768   eval "ac_cv_lib_$ac_lib_var=no"
7769 fi
7770 rm -f conftest*
7771 xe_check_libs=""
7772
7773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7774   echo "$ac_t""yes" 1>&6
7775   with_ldap_krbdes=yes
7776 else
7777   echo "$ac_t""no" 1>&6
7778 with_ldap_krbdes=no
7779 fi
7780
7781  }
7782   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
7783 fi
7784 if test "$with_ldap" = "yes"; then
7785   { test "$extra_verbose" = "yes" && cat << \EOF
7786     Defining HAVE_LDAP
7787 EOF
7788 cat >> confdefs.h <<\EOF
7789 #define HAVE_LDAP 1
7790 EOF
7791 }
7792
7793   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7794    echo "    xemacs will be linked with \"eldap.o\""
7795  fi
7796   if test "$with_ldap_nolber" = "yes" ; then
7797     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7798   else
7799     if test "$with_ldap_krb" = "yes" ; then
7800       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7801     fi
7802     if test "$with_ldap_krbdes" = "yes" ; then
7803       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7804       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7805     fi
7806     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7807     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7808   fi
7809   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7810 do
7811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7812 echo "configure:7813: checking for $ac_func" >&5
7813
7814 cat > conftest.$ac_ext <<EOF
7815 #line 7816 "configure"
7816 #include "confdefs.h"
7817 /* System header to define __stub macros and hopefully few prototypes,
7818     which can conflict with char $ac_func(); below.  */
7819 #include <assert.h>
7820 /* Override any gcc2 internal prototype to avoid an error.  */
7821 /* We use char because int might match the return type of a gcc2
7822     builtin and then its argument prototype would still apply.  */
7823 char $ac_func();
7824
7825 int main() {
7826
7827 /* The GNU C library defines this for functions which it implements
7828     to always fail with ENOSYS.  Some functions are actually named
7829     something starting with __ and the normal name is an alias.  */
7830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7831 choke me
7832 #else
7833 $ac_func();
7834 #endif
7835
7836 ; return 0; }
7837 EOF
7838 if { (eval echo configure:7839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7839   rm -rf conftest*
7840   eval "ac_cv_func_$ac_func=yes"
7841 else
7842   echo "configure: failed program was:" >&5
7843   cat conftest.$ac_ext >&5
7844   rm -rf conftest*
7845   eval "ac_cv_func_$ac_func=no"
7846 fi
7847 rm -f conftest*
7848
7849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7850   echo "$ac_t""yes" 1>&6
7851     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7852   { test "$extra_verbose" = "yes" && cat << EOF
7853     Defining $ac_tr_func
7854 EOF
7855 cat >> confdefs.h <<EOF
7856 #define $ac_tr_func 1
7857 EOF
7858 }
7859  
7860 else
7861   echo "$ac_t""no" 1>&6
7862 fi
7863 done
7864
7865 fi
7866
7867 if test "$with_postgresql" != "no"; then
7868   echo "checking for PostgreSQL" 1>&6
7869 echo "configure:7870: checking for PostgreSQL" >&5
7870
7871   for header_dir in "" "pgsql/" "postgresql/"; do
7872     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7873 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7874 echo "configure:7875: checking for ${header_dir}libpq-fe.h" >&5
7875
7876 cat > conftest.$ac_ext <<EOF
7877 #line 7878 "configure"
7878 #include "confdefs.h"
7879 #include <${header_dir}libpq-fe.h>
7880 EOF
7881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7882 { (eval echo configure:7883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7884 if test -z "$ac_err"; then
7885   rm -rf conftest*
7886   eval "ac_cv_header_$ac_safe=yes"
7887 else
7888   echo "$ac_err" >&5
7889   echo "configure: failed program was:" >&5
7890   cat conftest.$ac_ext >&5
7891   rm -rf conftest*
7892   eval "ac_cv_header_$ac_safe=no"
7893 fi
7894 rm -f conftest*
7895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7896   echo "$ac_t""yes" 1>&6
7897   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7898 else
7899   echo "$ac_t""no" 1>&6
7900 fi
7901
7902   done
7903
7904   test -n "$libpq_fe_h_file" && { 
7905 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7906 echo "configure:7907: checking for PQconnectdb in -lpq" >&5
7907 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7908
7909 xe_check_libs=" -lpq "
7910 cat > conftest.$ac_ext <<EOF
7911 #line 7912 "configure"
7912 #include "confdefs.h"
7913 /* Override any gcc2 internal prototype to avoid an error.  */
7914 /* We use char because int might match the return type of a gcc2
7915     builtin and then its argument prototype would still apply.  */
7916 char PQconnectdb();
7917
7918 int main() {
7919 PQconnectdb()
7920 ; return 0; }
7921 EOF
7922 if { (eval echo configure:7923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7923   rm -rf conftest*
7924   eval "ac_cv_lib_$ac_lib_var=yes"
7925 else
7926   echo "configure: failed program was:" >&5
7927   cat conftest.$ac_ext >&5
7928   rm -rf conftest*
7929   eval "ac_cv_lib_$ac_lib_var=no"
7930 fi
7931 rm -f conftest*
7932 xe_check_libs=""
7933
7934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7935   echo "$ac_t""yes" 1>&6
7936   have_libpq=yes
7937 else
7938   echo "$ac_t""no" 1>&6
7939 fi
7940
7941  }
7942
7943   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7944     with_postgresql=yes
7945     { test "$extra_verbose" = "yes" && cat << \EOF
7946     Defining HAVE_POSTGRESQL
7947 EOF
7948 cat >> confdefs.h <<\EOF
7949 #define HAVE_POSTGRESQL 1
7950 EOF
7951 }
7952
7953     
7954 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7955 echo "configure:7956: checking for PQconnectStart in -lpq" >&5
7956 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7957
7958 xe_check_libs=" -lpq "
7959 cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962 /* Override any gcc2 internal prototype to avoid an error.  */
7963 /* We use char because int might match the return type of a gcc2
7964     builtin and then its argument prototype would still apply.  */
7965 char PQconnectStart();
7966
7967 int main() {
7968 PQconnectStart()
7969 ; return 0; }
7970 EOF
7971 if { (eval echo configure:7972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7972   rm -rf conftest*
7973   eval "ac_cv_lib_$ac_lib_var=yes"
7974 else
7975   echo "configure: failed program was:" >&5
7976   cat conftest.$ac_ext >&5
7977   rm -rf conftest*
7978   eval "ac_cv_lib_$ac_lib_var=no"
7979 fi
7980 rm -f conftest*
7981 xe_check_libs=""
7982
7983 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7984   echo "$ac_t""yes" 1>&6
7985   with_postgresqlv7=yes;
7986                  { test "$extra_verbose" = "yes" && cat << \EOF
7987     Defining HAVE_POSTGRESQLV7
7988 EOF
7989 cat >> confdefs.h <<\EOF
7990 #define HAVE_POSTGRESQLV7 1
7991 EOF
7992 }
7993
7994 else
7995   echo "$ac_t""no" 1>&6
7996 fi
7997
7998
7999     { test "$extra_verbose" = "yes" && cat << EOF
8000     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8001 EOF
8002 cat >> confdefs.h <<EOF
8003 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8004 EOF
8005 }
8006
8007     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8008     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8009    echo "    xemacs will be linked with \"postgresql.o\""
8010  fi
8011   elif test "$with_postgresql" = "yes"; then
8012     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8013   fi
8014 fi
8015
8016
8017 if test "$window_system" != "none"; then
8018   echo "checking for graphics libraries" 1>&6
8019 echo "configure:8020: checking for graphics libraries" >&5
8020
8021     xpm_problem=""
8022   if test -z "$with_xpm"; then
8023     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8024 echo "configure:8025: checking for Xpm - no older than 3.4f" >&5
8025     xe_check_libs=-lXpm
8026     cat > conftest.$ac_ext <<EOF
8027 #line 8028 "configure"
8028 #include "confdefs.h"
8029 #define XPM_NUMBERS
8030 #include <X11/xpm.h>
8031     int main(int c, char **v) {
8032     return c == 1 ? 0 :
8033       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8034       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8035 EOF
8036 if { (eval echo configure:8037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8037 then
8038   ./conftest dummy_arg; xpm_status=$?;
8039       if test "$xpm_status" = "0"; then
8040         with_xpm=yes;
8041       else
8042         with_xpm=no;
8043         if test "$xpm_status" = "1"; then
8044           xpm_problem="Xpm library version and header file version don't match!"
8045         elif test "$xpm_status" = "2"; then
8046           xpm_problem="Xpm library version is too old!"
8047         else
8048           xpm_problem="Internal xpm detection logic error!"
8049         fi
8050         echo "
8051 *** WARNING *** $xpm_problem
8052   I'm not touching that with a 10-foot pole!
8053   If you really want to use the installed version of Xpm, rerun
8054   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8055     fi
8056 else
8057   conftest_rc="$?"
8058   echo "configure: failed program was:" >&5
8059   cat conftest.$ac_ext >&5
8060   rm -fr conftest*
8061   with_xpm=no
8062 fi
8063 rm -fr conftest*
8064     xe_check_libs=
8065     echo "$ac_t""$with_xpm" 1>&6
8066   fi
8067   if test "$with_xpm" = "yes"; then
8068                 { test "$extra_verbose" = "yes" && cat << \EOF
8069     Defining HAVE_XPM
8070 EOF
8071 cat >> confdefs.h <<\EOF
8072 #define HAVE_XPM 1
8073 EOF
8074 }
8075
8076     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8077     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8078 echo "configure:8079: checking for \"FOR_MSW\" xpm" >&5
8079     xe_check_libs=-lXpm
8080     cat > conftest.$ac_ext <<EOF
8081 #line 8082 "configure"
8082 #include "confdefs.h"
8083
8084 int main() {
8085 XpmCreatePixmapFromData()
8086 ; return 0; }
8087 EOF
8088 if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8089   rm -rf conftest*
8090   xpm_for_msw=no
8091 else
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   xpm_for_msw=yes
8096 fi
8097 rm -f conftest*
8098     xe_check_libs=
8099     echo "$ac_t""$xpm_for_msw" 1>&6
8100     if test "$xpm_for_msw" = "yes"; then
8101       { test "$extra_verbose" = "yes" && cat << \EOF
8102     Defining FOR_MSW
8103 EOF
8104 cat >> confdefs.h <<\EOF
8105 #define FOR_MSW 1
8106 EOF
8107 }
8108
8109     fi
8110   fi
8111
8112     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8113 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8114 echo "configure:8115: checking for compface.h" >&5
8115
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 #include <compface.h>
8120 EOF
8121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8122 { (eval echo configure:8123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8124 if test -z "$ac_err"; then
8125   rm -rf conftest*
8126   eval "ac_cv_header_$ac_safe=yes"
8127 else
8128   echo "$ac_err" >&5
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   eval "ac_cv_header_$ac_safe=no"
8133 fi
8134 rm -f conftest*
8135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8136   echo "$ac_t""yes" 1>&6
8137   :
8138 else
8139   echo "$ac_t""no" 1>&6
8140 with_xface=no
8141 fi
8142  }
8143   test -z "$with_xface" && { 
8144 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8145 echo "configure:8146: checking for UnGenFace in -lcompface" >&5
8146 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8147
8148 xe_check_libs=" -lcompface "
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error.  */
8153 /* We use char because int might match the return type of a gcc2
8154     builtin and then its argument prototype would still apply.  */
8155 char UnGenFace();
8156
8157 int main() {
8158 UnGenFace()
8159 ; return 0; }
8160 EOF
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8162   rm -rf conftest*
8163   eval "ac_cv_lib_$ac_lib_var=yes"
8164 else
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=no"
8169 fi
8170 rm -f conftest*
8171 xe_check_libs=""
8172
8173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8174   echo "$ac_t""yes" 1>&6
8175   : 
8176 else
8177   echo "$ac_t""no" 1>&6
8178 with_xface=no
8179 fi
8180
8181  }
8182   test -z "$with_xface" && with_xface=yes
8183   if test "$with_xface" = "yes"; then
8184     { test "$extra_verbose" = "yes" && cat << \EOF
8185     Defining HAVE_XFACE
8186 EOF
8187 cat >> confdefs.h <<\EOF
8188 #define HAVE_XFACE 1
8189 EOF
8190 }
8191
8192     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8193   fi
8194
8195         if test "$with_gif" != "no"; then
8196     with_gif="yes"
8197     { test "$extra_verbose" = "yes" && cat << \EOF
8198     Defining HAVE_GIF
8199 EOF
8200 cat >> confdefs.h <<\EOF
8201 #define HAVE_GIF 1
8202 EOF
8203 }
8204
8205     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8206    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8207  fi
8208   fi
8209
8210       if test "$with_png $with_tiff" != "no no"; then
8211     
8212 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8213 echo "configure:8214: checking for inflate in -lc" >&5
8214 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8215
8216 xe_check_libs=" -lc "
8217 cat > conftest.$ac_ext <<EOF
8218 #line 8219 "configure"
8219 #include "confdefs.h"
8220 /* Override any gcc2 internal prototype to avoid an error.  */
8221 /* We use char because int might match the return type of a gcc2
8222     builtin and then its argument prototype would still apply.  */
8223 char inflate();
8224
8225 int main() {
8226 inflate()
8227 ; return 0; }
8228 EOF
8229 if { (eval echo configure:8230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8230   rm -rf conftest*
8231   eval "ac_cv_lib_$ac_lib_var=yes"
8232 else
8233   echo "configure: failed program was:" >&5
8234   cat conftest.$ac_ext >&5
8235   rm -rf conftest*
8236   eval "ac_cv_lib_$ac_lib_var=no"
8237 fi
8238 rm -f conftest*
8239 xe_check_libs=""
8240
8241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8242   echo "$ac_t""yes" 1>&6
8243   :
8244 else
8245   echo "$ac_t""no" 1>&6
8246
8247 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8248 echo "configure:8249: checking for inflate in -lz" >&5
8249 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8250
8251 xe_check_libs=" -lz "
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 /* Override any gcc2 internal prototype to avoid an error.  */
8256 /* We use char because int might match the return type of a gcc2
8257     builtin and then its argument prototype would still apply.  */
8258 char inflate();
8259
8260 int main() {
8261 inflate()
8262 ; return 0; }
8263 EOF
8264 if { (eval echo configure:8265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8265   rm -rf conftest*
8266   eval "ac_cv_lib_$ac_lib_var=yes"
8267 else
8268   echo "configure: failed program was:" >&5
8269   cat conftest.$ac_ext >&5
8270   rm -rf conftest*
8271   eval "ac_cv_lib_$ac_lib_var=no"
8272 fi
8273 rm -f conftest*
8274 xe_check_libs=""
8275
8276 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8277   echo "$ac_t""yes" 1>&6
8278   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8279 else
8280   echo "$ac_t""no" 1>&6
8281
8282 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8283 echo "configure:8284: checking for inflate in -lgz" >&5
8284 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8285
8286 xe_check_libs=" -lgz "
8287 cat > conftest.$ac_ext <<EOF
8288 #line 8289 "configure"
8289 #include "confdefs.h"
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 /* We use char because int might match the return type of a gcc2
8292     builtin and then its argument prototype would still apply.  */
8293 char inflate();
8294
8295 int main() {
8296 inflate()
8297 ; return 0; }
8298 EOF
8299 if { (eval echo configure:8300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8300   rm -rf conftest*
8301   eval "ac_cv_lib_$ac_lib_var=yes"
8302 else
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -rf conftest*
8306   eval "ac_cv_lib_$ac_lib_var=no"
8307 fi
8308 rm -f conftest*
8309 xe_check_libs=""
8310
8311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8312   echo "$ac_t""yes" 1>&6
8313   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8314 else
8315   echo "$ac_t""no" 1>&6
8316 fi
8317
8318
8319 fi
8320
8321
8322 fi
8323
8324
8325   fi
8326
8327     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8328 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8329 echo "configure:8330: checking for jpeglib.h" >&5
8330
8331 cat > conftest.$ac_ext <<EOF
8332 #line 8333 "configure"
8333 #include "confdefs.h"
8334 #include <jpeglib.h>
8335 EOF
8336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8337 { (eval echo configure:8338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8339 if test -z "$ac_err"; then
8340   rm -rf conftest*
8341   eval "ac_cv_header_$ac_safe=yes"
8342 else
8343   echo "$ac_err" >&5
8344   echo "configure: failed program was:" >&5
8345   cat conftest.$ac_ext >&5
8346   rm -rf conftest*
8347   eval "ac_cv_header_$ac_safe=no"
8348 fi
8349 rm -f conftest*
8350 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8351   echo "$ac_t""yes" 1>&6
8352   :
8353 else
8354   echo "$ac_t""no" 1>&6
8355 with_jpeg=no
8356 fi
8357  }
8358   test -z "$with_jpeg" && { 
8359 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8360 echo "configure:8361: checking for jpeg_destroy_decompress in -ljpeg" >&5
8361 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8362
8363 xe_check_libs=" -ljpeg "
8364 cat > conftest.$ac_ext <<EOF
8365 #line 8366 "configure"
8366 #include "confdefs.h"
8367 /* Override any gcc2 internal prototype to avoid an error.  */
8368 /* We use char because int might match the return type of a gcc2
8369     builtin and then its argument prototype would still apply.  */
8370 char jpeg_destroy_decompress();
8371
8372 int main() {
8373 jpeg_destroy_decompress()
8374 ; return 0; }
8375 EOF
8376 if { (eval echo configure:8377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8377   rm -rf conftest*
8378   eval "ac_cv_lib_$ac_lib_var=yes"
8379 else
8380   echo "configure: failed program was:" >&5
8381   cat conftest.$ac_ext >&5
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=no"
8384 fi
8385 rm -f conftest*
8386 xe_check_libs=""
8387
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8389   echo "$ac_t""yes" 1>&6
8390   :
8391 else
8392   echo "$ac_t""no" 1>&6
8393 with_jpeg=no
8394 fi
8395
8396  }
8397   test -z "$with_jpeg" && with_jpeg=yes
8398   if test "$with_jpeg" = "yes"; then
8399     { test "$extra_verbose" = "yes" && cat << \EOF
8400     Defining HAVE_JPEG
8401 EOF
8402 cat >> confdefs.h <<\EOF
8403 #define HAVE_JPEG 1
8404 EOF
8405 }
8406
8407     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8408   fi
8409
8410     png_problem=""
8411   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8412 echo "configure:8413: checking for pow" >&5
8413
8414 cat > conftest.$ac_ext <<EOF
8415 #line 8416 "configure"
8416 #include "confdefs.h"
8417 /* System header to define __stub macros and hopefully few prototypes,
8418     which can conflict with char pow(); below.  */
8419 #include <assert.h>
8420 /* Override any gcc2 internal prototype to avoid an error.  */
8421 /* We use char because int might match the return type of a gcc2
8422     builtin and then its argument prototype would still apply.  */
8423 char pow();
8424
8425 int main() {
8426
8427 /* The GNU C library defines this for functions which it implements
8428     to always fail with ENOSYS.  Some functions are actually named
8429     something starting with __ and the normal name is an alias.  */
8430 #if defined (__stub_pow) || defined (__stub___pow)
8431 choke me
8432 #else
8433 pow();
8434 #endif
8435
8436 ; return 0; }
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8439   rm -rf conftest*
8440   eval "ac_cv_func_pow=yes"
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_func_pow=no"
8446 fi
8447 rm -f conftest*
8448
8449 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8450   echo "$ac_t""yes" 1>&6
8451   :
8452 else
8453   echo "$ac_t""no" 1>&6
8454 with_png=no
8455 fi
8456  }
8457   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8458 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8459 echo "configure:8460: checking for png.h" >&5
8460
8461 cat > conftest.$ac_ext <<EOF
8462 #line 8463 "configure"
8463 #include "confdefs.h"
8464 #include <png.h>
8465 EOF
8466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8467 { (eval echo configure:8468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8469 if test -z "$ac_err"; then
8470   rm -rf conftest*
8471   eval "ac_cv_header_$ac_safe=yes"
8472 else
8473   echo "$ac_err" >&5
8474   echo "configure: failed program was:" >&5
8475   cat conftest.$ac_ext >&5
8476   rm -rf conftest*
8477   eval "ac_cv_header_$ac_safe=no"
8478 fi
8479 rm -f conftest*
8480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8481   echo "$ac_t""yes" 1>&6
8482   :
8483 else
8484   echo "$ac_t""no" 1>&6
8485 with_png=no
8486 fi
8487  }
8488   test -z "$with_png" && { 
8489 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8490 echo "configure:8491: checking for png_read_image in -lpng" >&5
8491 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8492
8493 xe_check_libs=" -lpng "
8494 cat > conftest.$ac_ext <<EOF
8495 #line 8496 "configure"
8496 #include "confdefs.h"
8497 /* Override any gcc2 internal prototype to avoid an error.  */
8498 /* We use char because int might match the return type of a gcc2
8499     builtin and then its argument prototype would still apply.  */
8500 char png_read_image();
8501
8502 int main() {
8503 png_read_image()
8504 ; return 0; }
8505 EOF
8506 if { (eval echo configure:8507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8507   rm -rf conftest*
8508   eval "ac_cv_lib_$ac_lib_var=yes"
8509 else
8510   echo "configure: failed program was:" >&5
8511   cat conftest.$ac_ext >&5
8512   rm -rf conftest*
8513   eval "ac_cv_lib_$ac_lib_var=no"
8514 fi
8515 rm -f conftest*
8516 xe_check_libs=""
8517
8518 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8519   echo "$ac_t""yes" 1>&6
8520   :
8521 else
8522   echo "$ac_t""no" 1>&6
8523 with_png=no
8524 fi
8525
8526  }
8527   if test -z "$with_png"; then
8528     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8529 echo "configure:8530: checking for workable png version information" >&5
8530     xe_check_libs="-lpng -lz"
8531     cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8534 #include <png.h>
8535     int main(int c, char **v) {
8536     if (c == 1) return 0;
8537     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8538     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8539 EOF
8540 if { (eval echo configure:8541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8541 then
8542   ./conftest dummy_arg; png_status=$?;
8543       if test "$png_status" = "0"; then
8544         with_png=yes;
8545       else
8546         with_png=no;
8547         if test "$png_status" = "1"; then
8548           png_problem="PNG library version and header file don't match!"
8549         elif test "$png_status" = "2"; then
8550           png_problem="PNG library version too old (pre 1.0.2)!"
8551         fi
8552         echo "
8553 *** WARNING *** $png_problem
8554   I'm not touching that with a 10-foot pole!
8555   If you really want to use the installed version of libPNG, rerun
8556   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8557     fi
8558 else
8559   conftest_rc="$?"
8560   echo "configure: failed program was:" >&5
8561   cat conftest.$ac_ext >&5
8562   rm -fr conftest*
8563   with_png=no
8564 fi
8565 rm -fr conftest*
8566     xe_check_libs=
8567     echo "$ac_t""$with_png" 1>&6
8568   fi
8569   if test "$with_png" = "yes"; then
8570     { test "$extra_verbose" = "yes" && cat << \EOF
8571     Defining HAVE_PNG
8572 EOF
8573 cat >> confdefs.h <<\EOF
8574 #define HAVE_PNG 1
8575 EOF
8576 }
8577
8578     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8579   fi
8580
8581     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8582 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8583 echo "configure:8584: checking for tiffio.h" >&5
8584
8585 cat > conftest.$ac_ext <<EOF
8586 #line 8587 "configure"
8587 #include "confdefs.h"
8588 #include <tiffio.h>
8589 EOF
8590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8591 { (eval echo configure:8592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8593 if test -z "$ac_err"; then
8594   rm -rf conftest*
8595   eval "ac_cv_header_$ac_safe=yes"
8596 else
8597   echo "$ac_err" >&5
8598   echo "configure: failed program was:" >&5
8599   cat conftest.$ac_ext >&5
8600   rm -rf conftest*
8601   eval "ac_cv_header_$ac_safe=no"
8602 fi
8603 rm -f conftest*
8604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8605   echo "$ac_t""yes" 1>&6
8606   :
8607 else
8608   echo "$ac_t""no" 1>&6
8609 with_tiff=no
8610 fi
8611  }
8612   test -z "$with_tiff" && { 
8613 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8614 echo "configure:8615: checking for TIFFClientOpen in -ltiff" >&5
8615 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8616
8617 xe_check_libs=" -ltiff "
8618 cat > conftest.$ac_ext <<EOF
8619 #line 8620 "configure"
8620 #include "confdefs.h"
8621 /* Override any gcc2 internal prototype to avoid an error.  */
8622 /* We use char because int might match the return type of a gcc2
8623     builtin and then its argument prototype would still apply.  */
8624 char TIFFClientOpen();
8625
8626 int main() {
8627 TIFFClientOpen()
8628 ; return 0; }
8629 EOF
8630 if { (eval echo configure:8631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8631   rm -rf conftest*
8632   eval "ac_cv_lib_$ac_lib_var=yes"
8633 else
8634   echo "configure: failed program was:" >&5
8635   cat conftest.$ac_ext >&5
8636   rm -rf conftest*
8637   eval "ac_cv_lib_$ac_lib_var=no"
8638 fi
8639 rm -f conftest*
8640 xe_check_libs=""
8641
8642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8643   echo "$ac_t""yes" 1>&6
8644   :
8645 else
8646   echo "$ac_t""no" 1>&6
8647 with_tiff=no
8648 fi
8649
8650  }
8651   test -z "$with_tiff" && with_tiff=yes
8652   if test "$with_tiff" = "yes"; then
8653     { test "$extra_verbose" = "yes" && cat << \EOF
8654     Defining HAVE_TIFF
8655 EOF
8656 cat >> confdefs.h <<\EOF
8657 #define HAVE_TIFF 1
8658 EOF
8659 }
8660
8661     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8662   fi
8663 fi
8664
8665
8666 if test "$with_gtk" = "yes"; then
8667     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8668 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8669 echo "configure:8670: checking for compface.h" >&5
8670
8671 cat > conftest.$ac_ext <<EOF
8672 #line 8673 "configure"
8673 #include "confdefs.h"
8674 #include <compface.h>
8675 EOF
8676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8677 { (eval echo configure:8678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8679 if test -z "$ac_err"; then
8680   rm -rf conftest*
8681   eval "ac_cv_header_$ac_safe=yes"
8682 else
8683   echo "$ac_err" >&5
8684   echo "configure: failed program was:" >&5
8685   cat conftest.$ac_ext >&5
8686   rm -rf conftest*
8687   eval "ac_cv_header_$ac_safe=no"
8688 fi
8689 rm -f conftest*
8690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8691   echo "$ac_t""yes" 1>&6
8692   :
8693 else
8694   echo "$ac_t""no" 1>&6
8695 with_xface=no
8696 fi
8697  }
8698   test -z "$with_xface" && { 
8699 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8700 echo "configure:8701: checking for UnGenFace in -lcompface" >&5
8701 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8702
8703 xe_check_libs=" -lcompface "
8704 cat > conftest.$ac_ext <<EOF
8705 #line 8706 "configure"
8706 #include "confdefs.h"
8707 /* Override any gcc2 internal prototype to avoid an error.  */
8708 /* We use char because int might match the return type of a gcc2
8709     builtin and then its argument prototype would still apply.  */
8710 char UnGenFace();
8711
8712 int main() {
8713 UnGenFace()
8714 ; return 0; }
8715 EOF
8716 if { (eval echo configure:8717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8717   rm -rf conftest*
8718   eval "ac_cv_lib_$ac_lib_var=yes"
8719 else
8720   echo "configure: failed program was:" >&5
8721   cat conftest.$ac_ext >&5
8722   rm -rf conftest*
8723   eval "ac_cv_lib_$ac_lib_var=no"
8724 fi
8725 rm -f conftest*
8726 xe_check_libs=""
8727
8728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8729   echo "$ac_t""yes" 1>&6
8730   : 
8731 else
8732   echo "$ac_t""no" 1>&6
8733 with_xface=no
8734 fi
8735
8736  }
8737   test -z "$with_xface" && with_xface=yes
8738   if test "$with_xface" = "yes"; then
8739     { test "$extra_verbose" = "yes" && cat << \EOF
8740     Defining HAVE_XFACE
8741 EOF
8742 cat >> confdefs.h <<\EOF
8743 #define HAVE_XFACE 1
8744 EOF
8745 }
8746
8747     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8748   fi
8749 fi
8750
8751
8752
8753 if test "$with_x11" = "yes"; then
8754
8755   echo "checking for X11 graphics libraries" 1>&6
8756 echo "configure:8757: checking for X11 graphics libraries" >&5
8757
8758   echo "checking for the Athena widgets" 1>&6
8759 echo "configure:8760: checking for the Athena widgets" >&5
8760
8761     case "$with_athena" in
8762         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8763     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8764     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8765     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8766     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8767     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8768   esac
8769
8770     if test "$athena_3d" = "no"; then
8771     
8772 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8773 echo "configure:8774: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8774 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8775
8776 xe_check_libs=" -l$athena_variant "
8777 cat > conftest.$ac_ext <<EOF
8778 #line 8779 "configure"
8779 #include "confdefs.h"
8780 /* Override any gcc2 internal prototype to avoid an error.  */
8781 /* We use char because int might match the return type of a gcc2
8782     builtin and then its argument prototype would still apply.  */
8783 char XawScrollbarSetThumb();
8784
8785 int main() {
8786 XawScrollbarSetThumb()
8787 ; return 0; }
8788 EOF
8789 if { (eval echo configure:8790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8790   rm -rf conftest*
8791   eval "ac_cv_lib_$ac_lib_var=yes"
8792 else
8793   echo "configure: failed program was:" >&5
8794   cat conftest.$ac_ext >&5
8795   rm -rf conftest*
8796   eval "ac_cv_lib_$ac_lib_var=no"
8797 fi
8798 rm -f conftest*
8799 xe_check_libs=""
8800
8801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8802   echo "$ac_t""yes" 1>&6
8803           
8804 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8805 echo "configure:8806: checking for threeDClassRec in -l$athena_variant" >&5
8806 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8807
8808 xe_check_libs=" -l$athena_variant "
8809 cat > conftest.$ac_ext <<EOF
8810 #line 8811 "configure"
8811 #include "confdefs.h"
8812 /* Override any gcc2 internal prototype to avoid an error.  */
8813 /* We use char because int might match the return type of a gcc2
8814     builtin and then its argument prototype would still apply.  */
8815 char threeDClassRec();
8816
8817 int main() {
8818 threeDClassRec()
8819 ; return 0; }
8820 EOF
8821 if { (eval echo configure:8822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8822   rm -rf conftest*
8823   eval "ac_cv_lib_$ac_lib_var=yes"
8824 else
8825   echo "configure: failed program was:" >&5
8826   cat conftest.$ac_ext >&5
8827   rm -rf conftest*
8828   eval "ac_cv_lib_$ac_lib_var=no"
8829 fi
8830 rm -f conftest*
8831 xe_check_libs=""
8832
8833 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8834   echo "$ac_t""yes" 1>&6
8835   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8836 else
8837   echo "$ac_t""no" 1>&6
8838 athena_lib=$athena_variant
8839 fi
8840
8841
8842       
8843 else
8844   echo "$ac_t""no" 1>&6
8845 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8846 fi
8847
8848
8849   else
8850         
8851 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8852 echo "configure:8853: checking for threeDClassRec in -l$athena_variant" >&5
8853 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8854
8855 xe_check_libs=" -l$athena_variant "
8856 cat > conftest.$ac_ext <<EOF
8857 #line 8858 "configure"
8858 #include "confdefs.h"
8859 /* Override any gcc2 internal prototype to avoid an error.  */
8860 /* We use char because int might match the return type of a gcc2
8861     builtin and then its argument prototype would still apply.  */
8862 char threeDClassRec();
8863
8864 int main() {
8865 threeDClassRec()
8866 ; return 0; }
8867 EOF
8868 if { (eval echo configure:8869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8869   rm -rf conftest*
8870   eval "ac_cv_lib_$ac_lib_var=yes"
8871 else
8872   echo "configure: failed program was:" >&5
8873   cat conftest.$ac_ext >&5
8874   rm -rf conftest*
8875   eval "ac_cv_lib_$ac_lib_var=no"
8876 fi
8877 rm -f conftest*
8878 xe_check_libs=""
8879
8880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8881   echo "$ac_t""yes" 1>&6
8882   athena_lib=$athena_variant
8883 else
8884   echo "$ac_t""no" 1>&6
8885 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8886 echo "configure:8887: checking for threeDClassRec in -lXaw" >&5
8887 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8888
8889 xe_check_libs=" -lXaw "
8890 cat > conftest.$ac_ext <<EOF
8891 #line 8892 "configure"
8892 #include "confdefs.h"
8893 /* Override any gcc2 internal prototype to avoid an error.  */
8894 /* We use char because int might match the return type of a gcc2
8895     builtin and then its argument prototype would still apply.  */
8896 char threeDClassRec();
8897
8898 int main() {
8899 threeDClassRec()
8900 ; return 0; }
8901 EOF
8902 if { (eval echo configure:8903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8903   rm -rf conftest*
8904   eval "ac_cv_lib_$ac_lib_var=yes"
8905 else
8906   echo "configure: failed program was:" >&5
8907   cat conftest.$ac_ext >&5
8908   rm -rf conftest*
8909   eval "ac_cv_lib_$ac_lib_var=no"
8910 fi
8911 rm -f conftest*
8912 xe_check_libs=""
8913
8914 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8915   echo "$ac_t""yes" 1>&6
8916   athena_lib=Xaw;
8917           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8918         
8919 else
8920   echo "$ac_t""no" 1>&6
8921 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8922 fi
8923
8924
8925 fi
8926
8927
8928   fi
8929
8930     if test "$athena_3d" = "no"; then
8931     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8932 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8933 echo "configure:8934: checking for X11/Xaw/ThreeD.h" >&5
8934
8935 cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 #include <X11/Xaw/ThreeD.h>
8939 EOF
8940 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8941 { (eval echo configure:8942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8942 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8943 if test -z "$ac_err"; then
8944   rm -rf conftest*
8945   eval "ac_cv_header_$ac_safe=yes"
8946 else
8947   echo "$ac_err" >&5
8948   echo "configure: failed program was:" >&5
8949   cat conftest.$ac_ext >&5
8950   rm -rf conftest*
8951   eval "ac_cv_header_$ac_safe=no"
8952 fi
8953 rm -f conftest*
8954 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8955   echo "$ac_t""yes" 1>&6
8956   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8957 else
8958   echo "$ac_t""no" 1>&6
8959 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8960 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8961 echo "configure:8962: checking for X11/Xaw/XawInit.h" >&5
8962
8963 cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 #include <X11/Xaw/XawInit.h>
8967 EOF
8968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8969 { (eval echo configure:8970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8971 if test -z "$ac_err"; then
8972   rm -rf conftest*
8973   eval "ac_cv_header_$ac_safe=yes"
8974 else
8975   echo "$ac_err" >&5
8976   echo "configure: failed program was:" >&5
8977   cat conftest.$ac_ext >&5
8978   rm -rf conftest*
8979   eval "ac_cv_header_$ac_safe=no"
8980 fi
8981 rm -f conftest*
8982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8983   echo "$ac_t""yes" 1>&6
8984   athena_h_path=X11/Xaw
8985 else
8986   echo "$ac_t""no" 1>&6
8987 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8988 fi
8989
8990 fi
8991
8992   else
8993             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8994 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8995 echo "configure:8996: checking for X11/$athena_variant/XawInit.h" >&5
8996
8997 cat > conftest.$ac_ext <<EOF
8998 #line 8999 "configure"
8999 #include "confdefs.h"
9000 #include <X11/$athena_variant/XawInit.h>
9001 EOF
9002 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9003 { (eval echo configure:9004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9004 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9005 if test -z "$ac_err"; then
9006   rm -rf conftest*
9007   eval "ac_cv_header_$ac_safe=yes"
9008 else
9009   echo "$ac_err" >&5
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_header_$ac_safe=no"
9014 fi
9015 rm -f conftest*
9016 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9017   echo "$ac_t""yes" 1>&6
9018   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9019 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9020 echo "configure:9021: checking for X11/$athena_variant/ThreeD.h" >&5
9021
9022 cat > conftest.$ac_ext <<EOF
9023 #line 9024 "configure"
9024 #include "confdefs.h"
9025 #include <X11/$athena_variant/ThreeD.h>
9026 EOF
9027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9028 { (eval echo configure:9029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9029 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9030 if test -z "$ac_err"; then
9031   rm -rf conftest*
9032   eval "ac_cv_header_$ac_safe=yes"
9033 else
9034   echo "$ac_err" >&5
9035   echo "configure: failed program was:" >&5
9036   cat conftest.$ac_ext >&5
9037   rm -rf conftest*
9038   eval "ac_cv_header_$ac_safe=no"
9039 fi
9040 rm -f conftest*
9041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9042   echo "$ac_t""yes" 1>&6
9043   athena_h_path=X11/$athena_variant
9044 else
9045   echo "$ac_t""no" 1>&6
9046 fi
9047
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051
9052
9053         if test -z "$athena_h_path"; then
9054       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9055 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9056 echo "configure:9057: checking for $athena_variant/XawInit.h" >&5
9057
9058 cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061 #include <$athena_variant/XawInit.h>
9062 EOF
9063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9064 { (eval echo configure:9065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9066 if test -z "$ac_err"; then
9067   rm -rf conftest*
9068   eval "ac_cv_header_$ac_safe=yes"
9069 else
9070   echo "$ac_err" >&5
9071   echo "configure: failed program was:" >&5
9072   cat conftest.$ac_ext >&5
9073   rm -rf conftest*
9074   eval "ac_cv_header_$ac_safe=no"
9075 fi
9076 rm -f conftest*
9077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9078   echo "$ac_t""yes" 1>&6
9079   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9080 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9081 echo "configure:9082: checking for $athena_variant/ThreeD.h" >&5
9082
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 #include <$athena_variant/ThreeD.h>
9087 EOF
9088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9089 { (eval echo configure:9090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9091 if test -z "$ac_err"; then
9092   rm -rf conftest*
9093   eval "ac_cv_header_$ac_safe=yes"
9094 else
9095   echo "$ac_err" >&5
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_header_$ac_safe=no"
9100 fi
9101 rm -f conftest*
9102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104   athena_h_path=$athena_variant
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109 else
9110   echo "$ac_t""no" 1>&6
9111 fi
9112
9113     fi
9114
9115         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9116       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9117 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9118 echo "configure:9119: checking for X11/Xaw3d/XawInit.h" >&5
9119
9120 cat > conftest.$ac_ext <<EOF
9121 #line 9122 "configure"
9122 #include "confdefs.h"
9123 #include <X11/Xaw3d/XawInit.h>
9124 EOF
9125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9126 { (eval echo configure:9127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9128 if test -z "$ac_err"; then
9129   rm -rf conftest*
9130   eval "ac_cv_header_$ac_safe=yes"
9131 else
9132   echo "$ac_err" >&5
9133   echo "configure: failed program was:" >&5
9134   cat conftest.$ac_ext >&5
9135   rm -rf conftest*
9136   eval "ac_cv_header_$ac_safe=no"
9137 fi
9138 rm -f conftest*
9139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9140   echo "$ac_t""yes" 1>&6
9141   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9142 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9143 echo "configure:9144: checking for X11/Xaw3d/ThreeD.h" >&5
9144
9145 cat > conftest.$ac_ext <<EOF
9146 #line 9147 "configure"
9147 #include "confdefs.h"
9148 #include <X11/Xaw3d/ThreeD.h>
9149 EOF
9150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9151 { (eval echo configure:9152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9153 if test -z "$ac_err"; then
9154   rm -rf conftest*
9155   eval "ac_cv_header_$ac_safe=yes"
9156 else
9157   echo "$ac_err" >&5
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_header_$ac_safe=no"
9162 fi
9163 rm -f conftest*
9164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9165   echo "$ac_t""yes" 1>&6
9166   
9167             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9168             athena_h_path=X11/Xaw3d
9169           
9170 else
9171   echo "$ac_t""no" 1>&6
9172 fi
9173
9174 else
9175   echo "$ac_t""no" 1>&6
9176 fi
9177
9178     fi
9179
9180         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9181       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9182 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9183 echo "configure:9184: checking for Xaw3d/XawInit.h" >&5
9184
9185 cat > conftest.$ac_ext <<EOF
9186 #line 9187 "configure"
9187 #include "confdefs.h"
9188 #include <Xaw3d/XawInit.h>
9189 EOF
9190 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9191 { (eval echo configure:9192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9192 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9193 if test -z "$ac_err"; then
9194   rm -rf conftest*
9195   eval "ac_cv_header_$ac_safe=yes"
9196 else
9197   echo "$ac_err" >&5
9198   echo "configure: failed program was:" >&5
9199   cat conftest.$ac_ext >&5
9200   rm -rf conftest*
9201   eval "ac_cv_header_$ac_safe=no"
9202 fi
9203 rm -f conftest*
9204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9207 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9208 echo "configure:9209: checking for Xaw3d/ThreeD.h" >&5
9209
9210 cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213 #include <Xaw3d/ThreeD.h>
9214 EOF
9215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9216 { (eval echo configure:9217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9217 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9218 if test -z "$ac_err"; then
9219   rm -rf conftest*
9220   eval "ac_cv_header_$ac_safe=yes"
9221 else
9222   echo "$ac_err" >&5
9223   echo "configure: failed program was:" >&5
9224   cat conftest.$ac_ext >&5
9225   rm -rf conftest*
9226   eval "ac_cv_header_$ac_safe=no"
9227 fi
9228 rm -f conftest*
9229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9230   echo "$ac_t""yes" 1>&6
9231   
9232             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9233             athena_h_path=Xaw3d
9234           
9235 else
9236   echo "$ac_t""no" 1>&6
9237 fi
9238
9239 else
9240   echo "$ac_t""no" 1>&6
9241 fi
9242
9243     fi
9244
9245             if test -z "$athena_h_path"; then
9246       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9247 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9248 echo "configure:9249: checking for X11/Xaw/ThreeD.h" >&5
9249
9250 cat > conftest.$ac_ext <<EOF
9251 #line 9252 "configure"
9252 #include "confdefs.h"
9253 #include <X11/Xaw/ThreeD.h>
9254 EOF
9255 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9256 { (eval echo configure:9257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9257 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9258 if test -z "$ac_err"; then
9259   rm -rf conftest*
9260   eval "ac_cv_header_$ac_safe=yes"
9261 else
9262   echo "$ac_err" >&5
9263   echo "configure: failed program was:" >&5
9264   cat conftest.$ac_ext >&5
9265   rm -rf conftest*
9266   eval "ac_cv_header_$ac_safe=no"
9267 fi
9268 rm -f conftest*
9269 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9270   echo "$ac_t""yes" 1>&6
9271   
9272           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9273           athena_h_path=X11/Xaw
9274         
9275 else
9276   echo "$ac_t""no" 1>&6
9277 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9278 fi
9279
9280     fi
9281   fi
9282
9283     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9284     have_xaw=yes
9285   else
9286     have_xaw=no
9287   fi
9288
9289     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9290 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9291 echo "configure:9292: checking for Xm/Xm.h" >&5
9292
9293 cat > conftest.$ac_ext <<EOF
9294 #line 9295 "configure"
9295 #include "confdefs.h"
9296 #include <Xm/Xm.h>
9297 EOF
9298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9299 { (eval echo configure:9300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9301 if test -z "$ac_err"; then
9302   rm -rf conftest*
9303   eval "ac_cv_header_$ac_safe=yes"
9304 else
9305   echo "$ac_err" >&5
9306   echo "configure: failed program was:" >&5
9307   cat conftest.$ac_ext >&5
9308   rm -rf conftest*
9309   eval "ac_cv_header_$ac_safe=no"
9310 fi
9311 rm -f conftest*
9312 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9313   echo "$ac_t""yes" 1>&6
9314   
9315 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9316 echo "configure:9317: checking for XmStringFree in -lXm" >&5
9317 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9318
9319 xe_check_libs=" -lXm "
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323 /* Override any gcc2 internal prototype to avoid an error.  */
9324 /* We use char because int might match the return type of a gcc2
9325     builtin and then its argument prototype would still apply.  */
9326 char XmStringFree();
9327
9328 int main() {
9329 XmStringFree()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 xe_check_libs=""
9343
9344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9345   echo "$ac_t""yes" 1>&6
9346   have_motif=yes
9347 else
9348   echo "$ac_t""no" 1>&6
9349 have_motif=no
9350 fi
9351
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 have_motif=no
9356 fi
9357
9358
9359   if test "$have_motif" = "yes"; then
9360         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9361 echo "configure:9362: checking for Lesstif" >&5
9362     cat > conftest.$ac_ext <<EOF
9363 #line 9364 "configure"
9364 #include "confdefs.h"
9365 #include <Xm/Xm.h>
9366 #ifdef LESSTIF_VERSION
9367 yes
9368 #endif
9369
9370 EOF
9371 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9372   egrep "yes" >/dev/null 2>&1; then
9373   rm -rf conftest*
9374   have_lesstif=yes
9375 else
9376   rm -rf conftest*
9377   have_lesstif=no
9378 fi
9379 rm -f conftest*
9380
9381   echo "$ac_t""$have_lesstif" 1>&6
9382   fi
9383
9384 fi 
9385
9386 case "$with_menubars" in "" | "yes" | "athena" )
9387   with_menubars="lucid" ;;
9388 esac
9389 case "$with_dialogs" in "" | "yes" | "lucid" )
9390   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9391   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9392   else with_dialogs=no
9393   fi ;;
9394 esac
9395 case "$with_scrollbars" in "" | "yes" )
9396   with_scrollbars="lucid" ;;
9397 esac
9398 case "$with_widgets" in "" | "yes" | "lucid")
9399   if   test "$have_motif" = "yes"; then with_widgets="motif"
9400   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9401   else with_widgets=no
9402   fi ;;
9403 esac
9404
9405 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9406
9407 case "$all_widgets" in
9408   *athena* )
9409     if test "$have_xaw" != "yes"; then
9410       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9411     fi
9412
9413         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9414
9415         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9416
9417                     { test "$extra_verbose" = "yes" && cat << EOF
9418     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9419 EOF
9420 cat >> confdefs.h <<EOF
9421 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9422 EOF
9423 }
9424
9425     { test "$extra_verbose" = "yes" && cat << EOF
9426     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9427 EOF
9428 cat >> confdefs.h <<EOF
9429 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9430 EOF
9431 }
9432
9433     { test "$extra_verbose" = "yes" && cat << EOF
9434     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9435 EOF
9436 cat >> confdefs.h <<EOF
9437 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9438 EOF
9439 }
9440
9441     { test "$extra_verbose" = "yes" && cat << EOF
9442     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9443 EOF
9444 cat >> confdefs.h <<EOF
9445 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9446 EOF
9447 }
9448
9449     { test "$extra_verbose" = "yes" && cat << EOF
9450     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9451 EOF
9452 cat >> confdefs.h <<EOF
9453 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9454 EOF
9455 }
9456
9457     { test "$extra_verbose" = "yes" && cat << EOF
9458     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9459 EOF
9460 cat >> confdefs.h <<EOF
9461 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9462 EOF
9463 }
9464
9465     { test "$extra_verbose" = "yes" && cat << EOF
9466     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9467 EOF
9468 cat >> confdefs.h <<EOF
9469 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9470 EOF
9471 }
9472
9473     { test "$extra_verbose" = "yes" && cat << EOF
9474     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9475 EOF
9476 cat >> confdefs.h <<EOF
9477 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9478 EOF
9479 }
9480
9481     { test "$extra_verbose" = "yes" && cat << EOF
9482     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9483 EOF
9484 cat >> confdefs.h <<EOF
9485 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9486 EOF
9487 }
9488
9489     { test "$extra_verbose" = "yes" && cat << EOF
9490     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9491 EOF
9492 cat >> confdefs.h <<EOF
9493 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9494 EOF
9495 }
9496
9497
9498     { test "$extra_verbose" = "yes" && cat << \EOF
9499     Defining LWLIB_USES_ATHENA
9500 EOF
9501 cat >> confdefs.h <<\EOF
9502 #define LWLIB_USES_ATHENA 1
9503 EOF
9504 }
9505
9506     { test "$extra_verbose" = "yes" && cat << \EOF
9507     Defining NEED_ATHENA
9508 EOF
9509 cat >> confdefs.h <<\EOF
9510 #define NEED_ATHENA 1
9511 EOF
9512 }
9513
9514     need_athena="yes"
9515
9516     if test "$athena_3d" = "yes"; then
9517       { test "$extra_verbose" = "yes" && cat << \EOF
9518     Defining HAVE_ATHENA_3D
9519 EOF
9520 cat >> confdefs.h <<\EOF
9521 #define HAVE_ATHENA_3D 1
9522 EOF
9523 }
9524
9525     fi
9526   ;;
9527 esac
9528
9529 case "$all_widgets" in *motif* )
9530   { test "$extra_verbose" = "yes" && cat << \EOF
9531     Defining LWLIB_USES_MOTIF
9532 EOF
9533 cat >> confdefs.h <<\EOF
9534 #define LWLIB_USES_MOTIF 1
9535 EOF
9536 }
9537
9538   { test "$extra_verbose" = "yes" && cat << \EOF
9539     Defining NEED_MOTIF
9540 EOF
9541 cat >> confdefs.h <<\EOF
9542 #define NEED_MOTIF 1
9543 EOF
9544 }
9545
9546   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9547   need_motif=yes ;;
9548 esac
9549
9550 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9551 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9552 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9553 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9554         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9555 case "$with_widgets" in athena* )
9556         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;;
9557 esac
9558 case "$all_widgets" in *lucid* )
9559   { test "$extra_verbose" = "yes" && cat << \EOF
9560     Defining NEED_LUCID
9561 EOF
9562 cat >> confdefs.h <<\EOF
9563 #define NEED_LUCID 1
9564 EOF
9565 }
9566
9567   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9568 esac
9569
9570
9571
9572 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9573     Defining LWLIB_SCROLLBARS_ATHENA
9574 EOF
9575 cat >> confdefs.h <<\EOF
9576 #define LWLIB_SCROLLBARS_ATHENA 1
9577 EOF
9578 }
9579
9580 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9581     Defining LWLIB_DIALOGS_ATHENA
9582 EOF
9583 cat >> confdefs.h <<\EOF
9584 #define LWLIB_DIALOGS_ATHENA 1
9585 EOF
9586 }
9587
9588
9589 if test "$athena_3d" = "yes"; then
9590   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9591     Defining LWLIB_SCROLLBARS_ATHENA3D
9592 EOF
9593 cat >> confdefs.h <<\EOF
9594 #define LWLIB_SCROLLBARS_ATHENA3D 1
9595 EOF
9596 }
9597
9598   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9599     Defining LWLIB_DIALOGS_ATHENA3D
9600 EOF
9601 cat >> confdefs.h <<\EOF
9602 #define LWLIB_DIALOGS_ATHENA3D 1
9603 EOF
9604 }
9605
9606 fi
9607
9608 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9609     Defining LWLIB_WIDGETS_ATHENA
9610 EOF
9611 cat >> confdefs.h <<\EOF
9612 #define LWLIB_WIDGETS_ATHENA 1
9613 EOF
9614 }
9615 ;; esac
9616 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9617         { test "$extra_verbose" = "yes" && cat << \EOF
9618     Defining LWLIB_TABS_LUCID
9619 EOF
9620 cat >> confdefs.h <<\EOF
9621 #define LWLIB_TABS_LUCID 1
9622 EOF
9623 }
9624
9625
9626 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9627     Defining HAVE_MENUBARS
9628 EOF
9629 cat >> confdefs.h <<\EOF
9630 #define HAVE_MENUBARS 1
9631 EOF
9632 }
9633
9634 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9635     Defining HAVE_SCROLLBARS
9636 EOF
9637 cat >> confdefs.h <<\EOF
9638 #define HAVE_SCROLLBARS 1
9639 EOF
9640 }
9641
9642 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9643     Defining HAVE_DIALOGS
9644 EOF
9645 cat >> confdefs.h <<\EOF
9646 #define HAVE_DIALOGS 1
9647 EOF
9648 }
9649
9650 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9651     Defining HAVE_TOOLBARS
9652 EOF
9653 cat >> confdefs.h <<\EOF
9654 #define HAVE_TOOLBARS 1
9655 EOF
9656 }
9657
9658 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9659     Defining HAVE_WIDGETS
9660 EOF
9661 cat >> confdefs.h <<\EOF
9662 #define HAVE_WIDGETS 1
9663 EOF
9664 }
9665
9666
9667 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9668     Defining LWLIB_MENUBARS_LUCID
9669 EOF
9670 cat >> confdefs.h <<\EOF
9671 #define LWLIB_MENUBARS_LUCID 1
9672 EOF
9673 }
9674
9675 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9676     Defining LWLIB_SCROLLBARS_LUCID
9677 EOF
9678 cat >> confdefs.h <<\EOF
9679 #define LWLIB_SCROLLBARS_LUCID 1
9680 EOF
9681 }
9682
9683
9684 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9685     Defining LWLIB_MENUBARS_MOTIF
9686 EOF
9687 cat >> confdefs.h <<\EOF
9688 #define LWLIB_MENUBARS_MOTIF 1
9689 EOF
9690 }
9691
9692 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9693     Defining LWLIB_SCROLLBARS_MOTIF
9694 EOF
9695 cat >> confdefs.h <<\EOF
9696 #define LWLIB_SCROLLBARS_MOTIF 1
9697 EOF
9698 }
9699
9700 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9701     Defining LWLIB_DIALOGS_MOTIF
9702 EOF
9703 cat >> confdefs.h <<\EOF
9704 #define LWLIB_DIALOGS_MOTIF 1
9705 EOF
9706 }
9707
9708 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9709     Defining LWLIB_WIDGETS_MOTIF
9710 EOF
9711 cat >> confdefs.h <<\EOF
9712 #define LWLIB_WIDGETS_MOTIF 1
9713 EOF
9714 }
9715
9716
9717 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9718    echo "    xemacs will be linked with \"menubar.o\""
9719  fi
9720 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9721    echo "    xemacs will be linked with \"scrollbar.o\""
9722  fi
9723 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9724    echo "    xemacs will be linked with \"dialog.o\""
9725  fi
9726 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9727    echo "    xemacs will be linked with \"toolbar.o\""
9728  fi
9729
9730 if test "$with_gtk" = "yes"; then
9731   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9732    echo "    xemacs will be linked with \"menubar-gtk.o\""
9733  fi
9734   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9735    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9736  fi
9737   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9738    echo "    xemacs will be linked with \"dialog-gtk.o\""
9739  fi
9740   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9741    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9742  fi
9743   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9744    echo "    xemacs will be linked with \"gui-gtk.o\""
9745  fi
9746 fi
9747
9748 if test "$with_x11" = "yes"; then
9749   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9750    echo "    xemacs will be linked with \"menubar-x.o\""
9751  fi
9752   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9753    echo "    xemacs will be linked with \"scrollbar-x.o\""
9754  fi
9755   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9756    echo "    xemacs will be linked with \"dialog-x.o\""
9757  fi
9758   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9759    echo "    xemacs will be linked with \"toolbar-x.o\""
9760  fi
9761   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9762    echo "    xemacs will be linked with \"gui-x.o\""
9763  fi
9764 fi
9765
9766
9767 test -z "$with_mule" && with_mule=no
9768 test -z "$with_file_coding" && with_file_coding=no
9769
9770
9771 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9772   { test "$extra_verbose" = "yes" && cat << \EOF
9773     Defining FILE_CODING
9774 EOF
9775 cat >> confdefs.h <<\EOF
9776 #define FILE_CODING 1
9777 EOF
9778 }
9779
9780   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9781    echo "    xemacs will be linked with \"file-coding.o\""
9782  fi
9783 fi
9784
9785 if test "$with_mule" = "yes" ; then
9786   echo "checking for Mule-related features" 1>&6
9787 echo "configure:9788: checking for Mule-related features" >&5
9788   { test "$extra_verbose" = "yes" && cat << \EOF
9789     Defining MULE
9790 EOF
9791 cat >> confdefs.h <<\EOF
9792 #define MULE 1
9793 EOF
9794 }
9795
9796   { test "$extra_verbose" = "yes" && cat << \EOF
9797     Defining FILE_CODING
9798 EOF
9799 cat >> confdefs.h <<\EOF
9800 #define FILE_CODING 1
9801 EOF
9802 }
9803
9804   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9805    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9806  fi
9807   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9808     { test "$extra_verbose" = "yes" && cat << \EOF
9809     Defining TEXT_CODING
9810 EOF
9811 cat >> confdefs.h <<\EOF
9812 #define TEXT_CODING 1
9813 EOF
9814 }
9815
9816     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9817    echo "    xemacs will be linked with \"text-coding.o\""
9818  fi
9819   else
9820     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"file-coding.o\""
9822  fi
9823   fi
9824     for ac_hdr in libintl.h
9825 do
9826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9828 echo "configure:9829: checking for $ac_hdr" >&5
9829
9830 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833 #include <$ac_hdr>
9834 EOF
9835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9836 { (eval echo configure:9837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9838 if test -z "$ac_err"; then
9839   rm -rf conftest*
9840   eval "ac_cv_header_$ac_safe=yes"
9841 else
9842   echo "$ac_err" >&5
9843   echo "configure: failed program was:" >&5
9844   cat conftest.$ac_ext >&5
9845   rm -rf conftest*
9846   eval "ac_cv_header_$ac_safe=no"
9847 fi
9848 rm -f conftest*
9849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9850   echo "$ac_t""yes" 1>&6
9851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9852   { test "$extra_verbose" = "yes" && cat << EOF
9853     Defining $ac_tr_hdr
9854 EOF
9855 cat >> confdefs.h <<EOF
9856 #define $ac_tr_hdr 1
9857 EOF
9858 }
9859  
9860 else
9861   echo "$ac_t""no" 1>&6
9862 fi
9863 done
9864
9865   
9866 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9867 echo "configure:9868: checking for strerror in -lintl" >&5
9868 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9869
9870 xe_check_libs=" -lintl "
9871 cat > conftest.$ac_ext <<EOF
9872 #line 9873 "configure"
9873 #include "confdefs.h"
9874 /* Override any gcc2 internal prototype to avoid an error.  */
9875 /* We use char because int might match the return type of a gcc2
9876     builtin and then its argument prototype would still apply.  */
9877 char strerror();
9878
9879 int main() {
9880 strerror()
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   eval "ac_cv_lib_$ac_lib_var=yes"
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   eval "ac_cv_lib_$ac_lib_var=no"
9891 fi
9892 rm -f conftest*
9893 xe_check_libs=""
9894
9895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9896   echo "$ac_t""yes" 1>&6
9897     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9898     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9899   { test "$extra_verbose" = "yes" && cat << EOF
9900     Defining $ac_tr_lib
9901 EOF
9902 cat >> confdefs.h <<EOF
9903 #define $ac_tr_lib 1
9904 EOF
9905 }
9906
9907   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9908
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912
9913
9914
9915   if test "$with_utf_2000" = "yes" ; then
9916     { test "$extra_verbose" = "yes" && cat << \EOF
9917     Defining CHAR_IS_UCS4
9918 EOF
9919 cat >> confdefs.h <<\EOF
9920 #define CHAR_IS_UCS4 1
9921 EOF
9922 }
9923
9924     { test "$extra_verbose" = "yes" && cat << \EOF
9925     Defining UTF2000
9926 EOF
9927 cat >> confdefs.h <<\EOF
9928 #define UTF2000 1
9929 EOF
9930 }
9931
9932   fi
9933
9934   echo "checking for Mule input methods" 1>&6
9935 echo "configure:9936: checking for Mule input methods" >&5
9936         case "$with_xim" in "" | "yes" )
9937     echo "checking for XIM" 1>&6
9938 echo "configure:9939: checking for XIM" >&5
9939     
9940 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9941 echo "configure:9942: checking for XOpenIM in -lX11" >&5
9942 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9943
9944 xe_check_libs=" -lX11 "
9945 cat > conftest.$ac_ext <<EOF
9946 #line 9947 "configure"
9947 #include "confdefs.h"
9948 /* Override any gcc2 internal prototype to avoid an error.  */
9949 /* We use char because int might match the return type of a gcc2
9950     builtin and then its argument prototype would still apply.  */
9951 char XOpenIM();
9952
9953 int main() {
9954 XOpenIM()
9955 ; return 0; }
9956 EOF
9957 if { (eval echo configure:9958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9958   rm -rf conftest*
9959   eval "ac_cv_lib_$ac_lib_var=yes"
9960 else
9961   echo "configure: failed program was:" >&5
9962   cat conftest.$ac_ext >&5
9963   rm -rf conftest*
9964   eval "ac_cv_lib_$ac_lib_var=no"
9965 fi
9966 rm -f conftest*
9967 xe_check_libs=""
9968
9969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9970   echo "$ac_t""yes" 1>&6
9971   with_xim=xlib
9972 else
9973   echo "$ac_t""no" 1>&6
9974 with_xim=no
9975 fi
9976
9977
9978         if test "$have_motif $have_lesstif" = "yes no"; then
9979       
9980 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9981 echo "configure:9982: checking for XmImMbLookupString in -lXm" >&5
9982 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9983
9984 xe_check_libs=" -lXm "
9985 cat > conftest.$ac_ext <<EOF
9986 #line 9987 "configure"
9987 #include "confdefs.h"
9988 /* Override any gcc2 internal prototype to avoid an error.  */
9989 /* We use char because int might match the return type of a gcc2
9990     builtin and then its argument prototype would still apply.  */
9991 char XmImMbLookupString();
9992
9993 int main() {
9994 XmImMbLookupString()
9995 ; return 0; }
9996 EOF
9997 if { (eval echo configure:9998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9998   rm -rf conftest*
9999   eval "ac_cv_lib_$ac_lib_var=yes"
10000 else
10001   echo "configure: failed program was:" >&5
10002   cat conftest.$ac_ext >&5
10003   rm -rf conftest*
10004   eval "ac_cv_lib_$ac_lib_var=no"
10005 fi
10006 rm -f conftest*
10007 xe_check_libs=""
10008
10009 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10010   echo "$ac_t""yes" 1>&6
10011   with_xim=motif
10012 else
10013   echo "$ac_t""no" 1>&6
10014 fi
10015
10016
10017     fi ;;
10018   esac
10019   if test "$with_xim" != "no"; then
10020     { test "$extra_verbose" = "yes" && cat << \EOF
10021     Defining HAVE_XIM
10022 EOF
10023 cat >> confdefs.h <<\EOF
10024 #define HAVE_XIM 1
10025 EOF
10026 }
10027
10028     if test "$with_xim" = "xlib"; then
10029       { test "$extra_verbose" = "yes" && cat << \EOF
10030     Defining XIM_XLIB
10031 EOF
10032 cat >> confdefs.h <<\EOF
10033 #define XIM_XLIB 1
10034 EOF
10035 }
10036
10037       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10038    echo "    xemacs will be linked with \"input-method-xlib.o\""
10039  fi
10040     fi
10041     if test "$with_xim" = "motif"; then
10042       { test "$extra_verbose" = "yes" && cat << \EOF
10043     Defining XIM_MOTIF
10044 EOF
10045 cat >> confdefs.h <<\EOF
10046 #define XIM_MOTIF 1
10047 EOF
10048 }
10049
10050       need_motif=yes
10051       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10052    echo "    xemacs will be linked with \"input-method-motif.o\""
10053  fi
10054     fi
10055     if test "$with_xim" = "motif"; then
10056       with_xfs=no
10057     fi
10058   fi
10059
10060     if test "$with_xfs" = "yes" ; then
10061     echo "checking for XFontSet" 1>&6
10062 echo "configure:10063: checking for XFontSet" >&5
10063     
10064 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10065 echo "configure:10066: checking for XmbDrawString in -lX11" >&5
10066 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10067
10068 xe_check_libs=" -lX11 "
10069 cat > conftest.$ac_ext <<EOF
10070 #line 10071 "configure"
10071 #include "confdefs.h"
10072 /* Override any gcc2 internal prototype to avoid an error.  */
10073 /* We use char because int might match the return type of a gcc2
10074     builtin and then its argument prototype would still apply.  */
10075 char XmbDrawString();
10076
10077 int main() {
10078 XmbDrawString()
10079 ; return 0; }
10080 EOF
10081 if { (eval echo configure:10082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=yes"
10084 else
10085   echo "configure: failed program was:" >&5
10086   cat conftest.$ac_ext >&5
10087   rm -rf conftest*
10088   eval "ac_cv_lib_$ac_lib_var=no"
10089 fi
10090 rm -f conftest*
10091 xe_check_libs=""
10092
10093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10094   echo "$ac_t""yes" 1>&6
10095   :
10096 else
10097   echo "$ac_t""no" 1>&6
10098 with_xfs=no
10099 fi
10100
10101
10102     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10103       { test "$extra_verbose" = "yes" && cat << \EOF
10104     Defining USE_XFONTSET
10105 EOF
10106 cat >> confdefs.h <<\EOF
10107 #define USE_XFONTSET 1
10108 EOF
10109 }
10110
10111       if test "$with_xim" = "no" ; then
10112         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10113    echo "    xemacs will be linked with \"input-method-xlib.o\""
10114  fi
10115       fi
10116     fi
10117   fi 
10118     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10119   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10120 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10121 echo "configure:10122: checking for wnn/jllib.h" >&5
10122
10123 cat > conftest.$ac_ext <<EOF
10124 #line 10125 "configure"
10125 #include "confdefs.h"
10126 #include <wnn/jllib.h>
10127 EOF
10128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10129 { (eval echo configure:10130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10131 if test -z "$ac_err"; then
10132   rm -rf conftest*
10133   eval "ac_cv_header_$ac_safe=yes"
10134 else
10135   echo "$ac_err" >&5
10136   echo "configure: failed program was:" >&5
10137   cat conftest.$ac_ext >&5
10138   rm -rf conftest*
10139   eval "ac_cv_header_$ac_safe=no"
10140 fi
10141 rm -f conftest*
10142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10143   echo "$ac_t""yes" 1>&6
10144   :
10145 else
10146   echo "$ac_t""no" 1>&6
10147 with_wnn=no
10148 fi
10149  }
10150     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10151 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10152 echo "configure:10153: checking for wnn/commonhd.h" >&5
10153
10154 cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157 #include <wnn/commonhd.h>
10158 EOF
10159 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10160 { (eval echo configure:10161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10161 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10162 if test -z "$ac_err"; then
10163   rm -rf conftest*
10164   eval "ac_cv_header_$ac_safe=yes"
10165 else
10166   echo "$ac_err" >&5
10167   echo "configure: failed program was:" >&5
10168   cat conftest.$ac_ext >&5
10169   rm -rf conftest*
10170   eval "ac_cv_header_$ac_safe=no"
10171 fi
10172 rm -f conftest*
10173 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10174   echo "$ac_t""yes" 1>&6
10175   :
10176 else
10177   echo "$ac_t""no" 1>&6
10178 with_wnn=no
10179 fi
10180  }
10181     if test "$with_wnn" != "no"; then
10182     for ac_func in crypt
10183 do
10184 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10185 echo "configure:10186: checking for $ac_func" >&5
10186
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190 /* System header to define __stub macros and hopefully few prototypes,
10191     which can conflict with char $ac_func(); below.  */
10192 #include <assert.h>
10193 /* Override any gcc2 internal prototype to avoid an error.  */
10194 /* We use char because int might match the return type of a gcc2
10195     builtin and then its argument prototype would still apply.  */
10196 char $ac_func();
10197
10198 int main() {
10199
10200 /* The GNU C library defines this for functions which it implements
10201     to always fail with ENOSYS.  Some functions are actually named
10202     something starting with __ and the normal name is an alias.  */
10203 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10204 choke me
10205 #else
10206 $ac_func();
10207 #endif
10208
10209 ; return 0; }
10210 EOF
10211 if { (eval echo configure:10212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10212   rm -rf conftest*
10213   eval "ac_cv_func_$ac_func=yes"
10214 else
10215   echo "configure: failed program was:" >&5
10216   cat conftest.$ac_ext >&5
10217   rm -rf conftest*
10218   eval "ac_cv_func_$ac_func=no"
10219 fi
10220 rm -f conftest*
10221
10222 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10223   echo "$ac_t""yes" 1>&6
10224     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10225   { test "$extra_verbose" = "yes" && cat << EOF
10226     Defining $ac_tr_func
10227 EOF
10228 cat >> confdefs.h <<EOF
10229 #define $ac_tr_func 1
10230 EOF
10231 }
10232  
10233 else
10234   echo "$ac_t""no" 1>&6
10235 fi
10236 done
10237
10238     test "$ac_cv_func_crypt" != "yes" && { 
10239 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10240 echo "configure:10241: checking for crypt in -lcrypt" >&5
10241 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10242
10243 xe_check_libs=" -lcrypt "
10244 cat > conftest.$ac_ext <<EOF
10245 #line 10246 "configure"
10246 #include "confdefs.h"
10247 /* Override any gcc2 internal prototype to avoid an error.  */
10248 /* We use char because int might match the return type of a gcc2
10249     builtin and then its argument prototype would still apply.  */
10250 char crypt();
10251
10252 int main() {
10253 crypt()
10254 ; return 0; }
10255 EOF
10256 if { (eval echo configure:10257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10257   rm -rf conftest*
10258   eval "ac_cv_lib_$ac_lib_var=yes"
10259 else
10260   echo "configure: failed program was:" >&5
10261   cat conftest.$ac_ext >&5
10262   rm -rf conftest*
10263   eval "ac_cv_lib_$ac_lib_var=no"
10264 fi
10265 rm -f conftest*
10266 xe_check_libs=""
10267
10268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10269   echo "$ac_t""yes" 1>&6
10270     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10272   { test "$extra_verbose" = "yes" && cat << EOF
10273     Defining $ac_tr_lib
10274 EOF
10275 cat >> confdefs.h <<EOF
10276 #define $ac_tr_lib 1
10277 EOF
10278 }
10279
10280   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10281
10282 else
10283   echo "$ac_t""no" 1>&6
10284 fi
10285
10286  }
10287   fi
10288     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10289     
10290 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10291 echo "configure:10292: checking for jl_dic_list_e in -lwnn" >&5
10292 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10293
10294 xe_check_libs=" -lwnn "
10295 cat > conftest.$ac_ext <<EOF
10296 #line 10297 "configure"
10297 #include "confdefs.h"
10298 /* Override any gcc2 internal prototype to avoid an error.  */
10299 /* We use char because int might match the return type of a gcc2
10300     builtin and then its argument prototype would still apply.  */
10301 char jl_dic_list_e();
10302
10303 int main() {
10304 jl_dic_list_e()
10305 ; return 0; }
10306 EOF
10307 if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10308   rm -rf conftest*
10309   eval "ac_cv_lib_$ac_lib_var=yes"
10310 else
10311   echo "configure: failed program was:" >&5
10312   cat conftest.$ac_ext >&5
10313   rm -rf conftest*
10314   eval "ac_cv_lib_$ac_lib_var=no"
10315 fi
10316 rm -f conftest*
10317 xe_check_libs=""
10318
10319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10320   echo "$ac_t""yes" 1>&6
10321   libwnn=wnn
10322 else
10323   echo "$ac_t""no" 1>&6
10324 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10325 echo "configure:10326: checking for jl_dic_list_e in -lwnn4" >&5
10326 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10327
10328 xe_check_libs=" -lwnn4 "
10329 cat > conftest.$ac_ext <<EOF
10330 #line 10331 "configure"
10331 #include "confdefs.h"
10332 /* Override any gcc2 internal prototype to avoid an error.  */
10333 /* We use char because int might match the return type of a gcc2
10334     builtin and then its argument prototype would still apply.  */
10335 char jl_dic_list_e();
10336
10337 int main() {
10338 jl_dic_list_e()
10339 ; return 0; }
10340 EOF
10341 if { (eval echo configure:10342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10342   rm -rf conftest*
10343   eval "ac_cv_lib_$ac_lib_var=yes"
10344 else
10345   echo "configure: failed program was:" >&5
10346   cat conftest.$ac_ext >&5
10347   rm -rf conftest*
10348   eval "ac_cv_lib_$ac_lib_var=no"
10349 fi
10350 rm -f conftest*
10351 xe_check_libs=""
10352
10353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10354   echo "$ac_t""yes" 1>&6
10355   libwnn=wnn4
10356 else
10357   echo "$ac_t""no" 1>&6
10358 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10359 echo "configure:10360: checking for jl_dic_list_e in -lwnn6" >&5
10360 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10361
10362 xe_check_libs=" -lwnn6 "
10363 cat > conftest.$ac_ext <<EOF
10364 #line 10365 "configure"
10365 #include "confdefs.h"
10366 /* Override any gcc2 internal prototype to avoid an error.  */
10367 /* We use char because int might match the return type of a gcc2
10368     builtin and then its argument prototype would still apply.  */
10369 char jl_dic_list_e();
10370
10371 int main() {
10372 jl_dic_list_e()
10373 ; return 0; }
10374 EOF
10375 if { (eval echo configure:10376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10376   rm -rf conftest*
10377   eval "ac_cv_lib_$ac_lib_var=yes"
10378 else
10379   echo "configure: failed program was:" >&5
10380   cat conftest.$ac_ext >&5
10381   rm -rf conftest*
10382   eval "ac_cv_lib_$ac_lib_var=no"
10383 fi
10384 rm -f conftest*
10385 xe_check_libs=""
10386
10387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10388   echo "$ac_t""yes" 1>&6
10389   libwnn=wnn6
10390 else
10391   echo "$ac_t""no" 1>&6
10392 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10393 echo "configure:10394: checking for dic_list_e in -lwnn6_fromsrc" >&5
10394 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10395
10396 xe_check_libs=" -lwnn6_fromsrc "
10397 cat > conftest.$ac_ext <<EOF
10398 #line 10399 "configure"
10399 #include "confdefs.h"
10400 /* Override any gcc2 internal prototype to avoid an error.  */
10401 /* We use char because int might match the return type of a gcc2
10402     builtin and then its argument prototype would still apply.  */
10403 char dic_list_e();
10404
10405 int main() {
10406 dic_list_e()
10407 ; return 0; }
10408 EOF
10409 if { (eval echo configure:10410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10410   rm -rf conftest*
10411   eval "ac_cv_lib_$ac_lib_var=yes"
10412 else
10413   echo "configure: failed program was:" >&5
10414   cat conftest.$ac_ext >&5
10415   rm -rf conftest*
10416   eval "ac_cv_lib_$ac_lib_var=no"
10417 fi
10418 rm -f conftest*
10419 xe_check_libs=""
10420
10421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10422   echo "$ac_t""yes" 1>&6
10423   libwnn=wnn6_fromsrc
10424 else
10425   echo "$ac_t""no" 1>&6
10426 with_wnn=no
10427 fi
10428
10429
10430 fi
10431
10432
10433 fi
10434
10435
10436 fi
10437
10438
10439   fi
10440   test -z "$with_wnn" && with_wnn=yes
10441   if test "$with_wnn" = "yes"; then
10442     { test "$extra_verbose" = "yes" && cat << \EOF
10443     Defining HAVE_WNN
10444 EOF
10445 cat >> confdefs.h <<\EOF
10446 #define HAVE_WNN 1
10447 EOF
10448 }
10449
10450     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10451     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10452    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10453  fi
10454     if test "$with_wnn6" != "no"; then
10455       
10456 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10457 echo "configure:10458: checking for jl_fi_dic_list in -l$libwnn" >&5
10458 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10459
10460 xe_check_libs=" -l$libwnn "
10461 cat > conftest.$ac_ext <<EOF
10462 #line 10463 "configure"
10463 #include "confdefs.h"
10464 /* Override any gcc2 internal prototype to avoid an error.  */
10465 /* We use char because int might match the return type of a gcc2
10466     builtin and then its argument prototype would still apply.  */
10467 char jl_fi_dic_list();
10468
10469 int main() {
10470 jl_fi_dic_list()
10471 ; return 0; }
10472 EOF
10473 if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10474   rm -rf conftest*
10475   eval "ac_cv_lib_$ac_lib_var=yes"
10476 else
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   eval "ac_cv_lib_$ac_lib_var=no"
10481 fi
10482 rm -f conftest*
10483 xe_check_libs=""
10484
10485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10486   echo "$ac_t""yes" 1>&6
10487   with_wnn6=yes
10488 else
10489   echo "$ac_t""no" 1>&6
10490 fi
10491
10492
10493       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10494     Defining WNN6
10495 EOF
10496 cat >> confdefs.h <<\EOF
10497 #define WNN6 1
10498 EOF
10499 }
10500
10501     fi
10502   fi
10503
10504     canna_includes_found=no
10505   if test "$with_canna" != "no"; then
10506     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10507 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10508 echo "configure:10509: checking for canna/jrkanji.h" >&5
10509
10510 cat > conftest.$ac_ext <<EOF
10511 #line 10512 "configure"
10512 #include "confdefs.h"
10513 #include <canna/jrkanji.h>
10514 EOF
10515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10516 { (eval echo configure:10517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10518 if test -z "$ac_err"; then
10519   rm -rf conftest*
10520   eval "ac_cv_header_$ac_safe=yes"
10521 else
10522   echo "$ac_err" >&5
10523   echo "configure: failed program was:" >&5
10524   cat conftest.$ac_ext >&5
10525   rm -rf conftest*
10526   eval "ac_cv_header_$ac_safe=no"
10527 fi
10528 rm -f conftest*
10529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10530   echo "$ac_t""yes" 1>&6
10531   canna_includes_found=yes
10532 else
10533   echo "$ac_t""no" 1>&6
10534 fi
10535
10536   fi
10537   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10538       -d "/usr/local/canna/include"; then
10539     save_c_switch_site="$c_switch_site"
10540     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10541     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10542 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10543 echo "configure:10544: checking for canna/jrkanji.h" >&5
10544
10545 cat > conftest.$ac_ext <<EOF
10546 #line 10547 "configure"
10547 #include "confdefs.h"
10548 #include <canna/jrkanji.h>
10549 EOF
10550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10551 { (eval echo configure:10552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10553 if test -z "$ac_err"; then
10554   rm -rf conftest*
10555   eval "ac_cv_header_$ac_safe=yes"
10556 else
10557   echo "$ac_err" >&5
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_header_$ac_safe=no"
10562 fi
10563 rm -f conftest*
10564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566   canna_includes_found=yes
10567 else
10568   echo "$ac_t""no" 1>&6
10569 fi
10570
10571     if test "$canna_includes_found" != "yes"; then
10572       c_switch_site="$save_c_switch_site"
10573       with_canna="no"
10574     fi
10575   fi
10576
10577   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10578 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10579 echo "configure:10580: checking for canna/RK.h" >&5
10580
10581 cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584 #include <canna/RK.h>
10585 EOF
10586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10587 { (eval echo configure:10588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10589 if test -z "$ac_err"; then
10590   rm -rf conftest*
10591   eval "ac_cv_header_$ac_safe=yes"
10592 else
10593   echo "$ac_err" >&5
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -rf conftest*
10597   eval "ac_cv_header_$ac_safe=no"
10598 fi
10599 rm -f conftest*
10600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10601   echo "$ac_t""yes" 1>&6
10602   :
10603 else
10604   echo "$ac_t""no" 1>&6
10605 with_canna=no
10606 fi
10607  }
10608   test -z "$with_canna" && { 
10609 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10610 echo "configure:10611: checking for RkBgnBun in -lRKC" >&5
10611 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10612
10613 xe_check_libs=" -lRKC "
10614 cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617 /* Override any gcc2 internal prototype to avoid an error.  */
10618 /* We use char because int might match the return type of a gcc2
10619     builtin and then its argument prototype would still apply.  */
10620 char RkBgnBun();
10621
10622 int main() {
10623 RkBgnBun()
10624 ; return 0; }
10625 EOF
10626 if { (eval echo configure:10627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10627   rm -rf conftest*
10628   eval "ac_cv_lib_$ac_lib_var=yes"
10629 else
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_lib_$ac_lib_var=no"
10634 fi
10635 rm -f conftest*
10636 xe_check_libs=""
10637
10638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10639   echo "$ac_t""yes" 1>&6
10640   :
10641 else
10642   echo "$ac_t""no" 1>&6
10643 with_canna=no
10644 fi
10645
10646  }
10647   test -z "$with_canna" && { 
10648 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10649 echo "configure:10650: checking for jrKanjiControl in -lcanna" >&5
10650 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10651
10652 xe_check_libs=" -lcanna "
10653 cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 /* Override any gcc2 internal prototype to avoid an error.  */
10657 /* We use char because int might match the return type of a gcc2
10658     builtin and then its argument prototype would still apply.  */
10659 char jrKanjiControl();
10660
10661 int main() {
10662 jrKanjiControl()
10663 ; return 0; }
10664 EOF
10665 if { (eval echo configure:10666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10666   rm -rf conftest*
10667   eval "ac_cv_lib_$ac_lib_var=yes"
10668 else
10669   echo "configure: failed program was:" >&5
10670   cat conftest.$ac_ext >&5
10671   rm -rf conftest*
10672   eval "ac_cv_lib_$ac_lib_var=no"
10673 fi
10674 rm -f conftest*
10675 xe_check_libs=""
10676
10677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10678   echo "$ac_t""yes" 1>&6
10679   :
10680 else
10681   echo "$ac_t""no" 1>&6
10682 with_canna=no
10683 fi
10684
10685  }
10686   test -z "$with_canna" && with_canna=yes
10687   if test "$with_canna" = "yes"; then
10688     { test "$extra_verbose" = "yes" && cat << \EOF
10689     Defining HAVE_CANNA
10690 EOF
10691 cat >> confdefs.h <<\EOF
10692 #define HAVE_CANNA 1
10693 EOF
10694 }
10695
10696     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10697     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10698    echo "    xemacs will be linked with \"mule-canna.o\""
10699  fi
10700   fi
10701
10702 else   for feature in xim canna wnn; do
10703     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10704       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10705     fi
10706     eval "with_${feature}=no"
10707   done
10708 fi 
10709
10710 if test "$need_motif" = "yes" ; then
10711   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10712     
10713 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10714 echo "configure:10715: checking for layout_object_getvalue in -li18n" >&5
10715 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10716
10717 xe_check_libs=" -li18n "
10718 cat > conftest.$ac_ext <<EOF
10719 #line 10720 "configure"
10720 #include "confdefs.h"
10721 /* Override any gcc2 internal prototype to avoid an error.  */
10722 /* We use char because int might match the return type of a gcc2
10723     builtin and then its argument prototype would still apply.  */
10724 char layout_object_getvalue();
10725
10726 int main() {
10727 layout_object_getvalue()
10728 ; return 0; }
10729 EOF
10730 if { (eval echo configure:10731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10731   rm -rf conftest*
10732   eval "ac_cv_lib_$ac_lib_var=yes"
10733 else
10734   echo "configure: failed program was:" >&5
10735   cat conftest.$ac_ext >&5
10736   rm -rf conftest*
10737   eval "ac_cv_lib_$ac_lib_var=no"
10738 fi
10739 rm -f conftest*
10740 xe_check_libs=""
10741
10742 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10743   echo "$ac_t""yes" 1>&6
10744   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10745 else
10746   echo "$ac_t""no" 1>&6
10747 fi
10748
10749
10750   
10751 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10752     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10753   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10754   
10755         runpath="" runpath_dirs=""
10756   if test -n "$LD_RUN_PATH"; then
10757     runpath="$LD_RUN_PATH"
10758   elif test "$GCC" = "yes"; then
10759         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10760     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10761     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10762     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10763       case "$arg" in P,* | -L* | -R* )
10764         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10765           {
10766 xe_runpath_dir="$dir"
10767   test "$xe_runpath_dir" != "/lib"     -a \
10768         "$xe_runpath_dir" != "/usr/lib" -a \
10769         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10770   eval "$xe_add_unique_runpath_dir"
10771 }
10772         done ;;
10773       esac
10774     done
10775     ld_switch_run="$ld_switch_run_save"
10776     rm -f conftest*
10777   else
10778         for arg in $ld_switch_site $ld_switch_x_site; do
10779       case "$arg" in -L*) {
10780 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10781   test "$xe_runpath_dir" != "/lib"     -a \
10782         "$xe_runpath_dir" != "/usr/lib" -a \
10783         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10784   eval "$xe_add_unique_runpath_dir"
10785 };; esac
10786     done
10787         if test "$opsys $need_motif" = "sol2 yes"; then
10788       xe_runpath_dir="/opt/SUNWdt/lib";
10789       eval "$xe_add_unique_runpath_dir";
10790     fi
10791   fi 
10792   if test -n "$runpath"; then
10793     ld_switch_run="${dash_r}${runpath}"
10794     
10795 if test "$GCC" = "yes"; then
10796   set x $ld_switch_run; shift; ld_switch_run=""
10797   while test -n "$1"; do
10798     case $1 in
10799       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10800       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10801       -Xlinker* ) ;;
10802       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10803     esac
10804     shift
10805   done
10806 fi
10807     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10808   fi
10809 fi
10810
10811 fi
10812
10813 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
10814 do
10815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10816 echo "configure:10817: checking for $ac_func" >&5
10817
10818 cat > conftest.$ac_ext <<EOF
10819 #line 10820 "configure"
10820 #include "confdefs.h"
10821 /* System header to define __stub macros and hopefully few prototypes,
10822     which can conflict with char $ac_func(); below.  */
10823 #include <assert.h>
10824 /* Override any gcc2 internal prototype to avoid an error.  */
10825 /* We use char because int might match the return type of a gcc2
10826     builtin and then its argument prototype would still apply.  */
10827 char $ac_func();
10828
10829 int main() {
10830
10831 /* The GNU C library defines this for functions which it implements
10832     to always fail with ENOSYS.  Some functions are actually named
10833     something starting with __ and the normal name is an alias.  */
10834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10835 choke me
10836 #else
10837 $ac_func();
10838 #endif
10839
10840 ; return 0; }
10841 EOF
10842 if { (eval echo configure:10843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10843   rm -rf conftest*
10844   eval "ac_cv_func_$ac_func=yes"
10845 else
10846   echo "configure: failed program was:" >&5
10847   cat conftest.$ac_ext >&5
10848   rm -rf conftest*
10849   eval "ac_cv_func_$ac_func=no"
10850 fi
10851 rm -f conftest*
10852
10853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10854   echo "$ac_t""yes" 1>&6
10855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10856   { test "$extra_verbose" = "yes" && cat << EOF
10857     Defining $ac_tr_func
10858 EOF
10859 cat >> confdefs.h <<EOF
10860 #define $ac_tr_func 1
10861 EOF
10862 }
10863  
10864 else
10865   echo "$ac_t""no" 1>&6
10866 fi
10867 done
10868
10869
10870
10871 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10872 do
10873 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10874 echo "configure:10875: checking for $ac_func" >&5
10875
10876 cat > conftest.$ac_ext <<EOF
10877 #line 10878 "configure"
10878 #include "confdefs.h"
10879 /* System header to define __stub macros and hopefully few prototypes,
10880     which can conflict with char $ac_func(); below.  */
10881 #include <assert.h>
10882 /* Override any gcc2 internal prototype to avoid an error.  */
10883 /* We use char because int might match the return type of a gcc2
10884     builtin and then its argument prototype would still apply.  */
10885 char $ac_func();
10886
10887 int main() {
10888
10889 /* The GNU C library defines this for functions which it implements
10890     to always fail with ENOSYS.  Some functions are actually named
10891     something starting with __ and the normal name is an alias.  */
10892 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10893 choke me
10894 #else
10895 $ac_func();
10896 #endif
10897
10898 ; return 0; }
10899 EOF
10900 if { (eval echo configure:10901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10901   rm -rf conftest*
10902   eval "ac_cv_func_$ac_func=yes"
10903 else
10904   echo "configure: failed program was:" >&5
10905   cat conftest.$ac_ext >&5
10906   rm -rf conftest*
10907   eval "ac_cv_func_$ac_func=no"
10908 fi
10909 rm -f conftest*
10910
10911 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10912   echo "$ac_t""yes" 1>&6
10913     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10914   { test "$extra_verbose" = "yes" && cat << EOF
10915     Defining $ac_tr_func
10916 EOF
10917 cat >> confdefs.h <<EOF
10918 #define $ac_tr_func 1
10919 EOF
10920 }
10921  
10922 else
10923   echo "$ac_t""no" 1>&6
10924 fi
10925 done
10926
10927
10928 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10929 echo "configure:10930: checking for openpty" >&5
10930
10931 cat > conftest.$ac_ext <<EOF
10932 #line 10933 "configure"
10933 #include "confdefs.h"
10934 /* System header to define __stub macros and hopefully few prototypes,
10935     which can conflict with char openpty(); below.  */
10936 #include <assert.h>
10937 /* Override any gcc2 internal prototype to avoid an error.  */
10938 /* We use char because int might match the return type of a gcc2
10939     builtin and then its argument prototype would still apply.  */
10940 char openpty();
10941
10942 int main() {
10943
10944 /* The GNU C library defines this for functions which it implements
10945     to always fail with ENOSYS.  Some functions are actually named
10946     something starting with __ and the normal name is an alias.  */
10947 #if defined (__stub_openpty) || defined (__stub___openpty)
10948 choke me
10949 #else
10950 openpty();
10951 #endif
10952
10953 ; return 0; }
10954 EOF
10955 if { (eval echo configure:10956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10956   rm -rf conftest*
10957   eval "ac_cv_func_openpty=yes"
10958 else
10959   echo "configure: failed program was:" >&5
10960   cat conftest.$ac_ext >&5
10961   rm -rf conftest*
10962   eval "ac_cv_func_openpty=no"
10963 fi
10964 rm -f conftest*
10965
10966 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10967   echo "$ac_t""yes" 1>&6
10968   have_openpty=yes
10969 else
10970   echo "$ac_t""no" 1>&6
10971
10972   
10973 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10974 echo "configure:10975: checking for openpty in -lutil" >&5
10975 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10976
10977 xe_check_libs=" -lutil "
10978 cat > conftest.$ac_ext <<EOF
10979 #line 10980 "configure"
10980 #include "confdefs.h"
10981 /* Override any gcc2 internal prototype to avoid an error.  */
10982 /* We use char because int might match the return type of a gcc2
10983     builtin and then its argument prototype would still apply.  */
10984 char openpty();
10985
10986 int main() {
10987 openpty()
10988 ; return 0; }
10989 EOF
10990 if { (eval echo configure:10991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10991   rm -rf conftest*
10992   eval "ac_cv_lib_$ac_lib_var=yes"
10993 else
10994   echo "configure: failed program was:" >&5
10995   cat conftest.$ac_ext >&5
10996   rm -rf conftest*
10997   eval "ac_cv_lib_$ac_lib_var=no"
10998 fi
10999 rm -f conftest*
11000 xe_check_libs=""
11001
11002 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11003   echo "$ac_t""yes" 1>&6
11004   have_openpty=yes need_libutil=yes
11005 else
11006   echo "$ac_t""no" 1>&6
11007 fi
11008
11009
11010 fi
11011
11012 if test "$have_openpty" = "yes"; then
11013   { test "$extra_verbose" = "yes" && cat << \EOF
11014     Defining HAVE_OPENPTY
11015 EOF
11016 cat >> confdefs.h <<\EOF
11017 #define HAVE_OPENPTY 1
11018 EOF
11019 }
11020
11021   for ac_hdr in pty.h libutil.h util.h
11022 do
11023 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11024 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11025 echo "configure:11026: checking for $ac_hdr" >&5
11026
11027 cat > conftest.$ac_ext <<EOF
11028 #line 11029 "configure"
11029 #include "confdefs.h"
11030 #include <$ac_hdr>
11031 EOF
11032 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11033 { (eval echo configure:11034: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11034 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11035 if test -z "$ac_err"; then
11036   rm -rf conftest*
11037   eval "ac_cv_header_$ac_safe=yes"
11038 else
11039   echo "$ac_err" >&5
11040   echo "configure: failed program was:" >&5
11041   cat conftest.$ac_ext >&5
11042   rm -rf conftest*
11043   eval "ac_cv_header_$ac_safe=no"
11044 fi
11045 rm -f conftest*
11046 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11049   { test "$extra_verbose" = "yes" && cat << EOF
11050     Defining $ac_tr_hdr
11051 EOF
11052 cat >> confdefs.h <<EOF
11053 #define $ac_tr_hdr 1
11054 EOF
11055 }
11056  break
11057 else
11058   echo "$ac_t""no" 1>&6
11059 fi
11060 done
11061
11062   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11063 fi
11064
11065 for ac_hdr in stropts.h
11066 do
11067 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11068 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11069 echo "configure:11070: checking for $ac_hdr" >&5
11070
11071 cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 #include <$ac_hdr>
11075 EOF
11076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11077 { (eval echo configure:11078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11079 if test -z "$ac_err"; then
11080   rm -rf conftest*
11081   eval "ac_cv_header_$ac_safe=yes"
11082 else
11083   echo "$ac_err" >&5
11084   echo "configure: failed program was:" >&5
11085   cat conftest.$ac_ext >&5
11086   rm -rf conftest*
11087   eval "ac_cv_header_$ac_safe=no"
11088 fi
11089 rm -f conftest*
11090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11091   echo "$ac_t""yes" 1>&6
11092     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11093   { test "$extra_verbose" = "yes" && cat << EOF
11094     Defining $ac_tr_hdr
11095 EOF
11096 cat >> confdefs.h <<EOF
11097 #define $ac_tr_hdr 1
11098 EOF
11099 }
11100  
11101 else
11102   echo "$ac_t""no" 1>&6
11103 fi
11104 done
11105
11106 if test "$ac_cv_header_stropts_h" = "yes"; then
11107   for ac_func in isastream
11108 do
11109 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11110 echo "configure:11111: checking for $ac_func" >&5
11111
11112 cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 /* System header to define __stub macros and hopefully few prototypes,
11116     which can conflict with char $ac_func(); below.  */
11117 #include <assert.h>
11118 /* Override any gcc2 internal prototype to avoid an error.  */
11119 /* We use char because int might match the return type of a gcc2
11120     builtin and then its argument prototype would still apply.  */
11121 char $ac_func();
11122
11123 int main() {
11124
11125 /* The GNU C library defines this for functions which it implements
11126     to always fail with ENOSYS.  Some functions are actually named
11127     something starting with __ and the normal name is an alias.  */
11128 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11129 choke me
11130 #else
11131 $ac_func();
11132 #endif
11133
11134 ; return 0; }
11135 EOF
11136 if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11137   rm -rf conftest*
11138   eval "ac_cv_func_$ac_func=yes"
11139 else
11140   echo "configure: failed program was:" >&5
11141   cat conftest.$ac_ext >&5
11142   rm -rf conftest*
11143   eval "ac_cv_func_$ac_func=no"
11144 fi
11145 rm -f conftest*
11146
11147 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11148   echo "$ac_t""yes" 1>&6
11149     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11150   { test "$extra_verbose" = "yes" && cat << EOF
11151     Defining $ac_tr_func
11152 EOF
11153 cat >> confdefs.h <<EOF
11154 #define $ac_tr_func 1
11155 EOF
11156 }
11157  
11158 else
11159   echo "$ac_t""no" 1>&6
11160 fi
11161 done
11162
11163   for ac_hdr in strtio.h
11164 do
11165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11167 echo "configure:11168: checking for $ac_hdr" >&5
11168
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <$ac_hdr>
11173 EOF
11174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11175 { (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11177 if test -z "$ac_err"; then
11178   rm -rf conftest*
11179   eval "ac_cv_header_$ac_safe=yes"
11180 else
11181   echo "$ac_err" >&5
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=no"
11186 fi
11187 rm -f conftest*
11188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11189   echo "$ac_t""yes" 1>&6
11190     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11191   { test "$extra_verbose" = "yes" && cat << EOF
11192     Defining $ac_tr_hdr
11193 EOF
11194 cat >> confdefs.h <<EOF
11195 #define $ac_tr_hdr 1
11196 EOF
11197 }
11198  
11199 else
11200   echo "$ac_t""no" 1>&6
11201 fi
11202 done
11203  fi
11204
11205 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11206    echo "    xemacs will be linked with \"realpath.o\""
11207  fi
11208
11209 for ac_func in getloadavg
11210 do
11211 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11212 echo "configure:11213: checking for $ac_func" >&5
11213
11214 cat > conftest.$ac_ext <<EOF
11215 #line 11216 "configure"
11216 #include "confdefs.h"
11217 /* System header to define __stub macros and hopefully few prototypes,
11218     which can conflict with char $ac_func(); below.  */
11219 #include <assert.h>
11220 /* Override any gcc2 internal prototype to avoid an error.  */
11221 /* We use char because int might match the return type of a gcc2
11222     builtin and then its argument prototype would still apply.  */
11223 char $ac_func();
11224
11225 int main() {
11226
11227 /* The GNU C library defines this for functions which it implements
11228     to always fail with ENOSYS.  Some functions are actually named
11229     something starting with __ and the normal name is an alias.  */
11230 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11231 choke me
11232 #else
11233 $ac_func();
11234 #endif
11235
11236 ; return 0; }
11237 EOF
11238 if { (eval echo configure:11239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11239   rm -rf conftest*
11240   eval "ac_cv_func_$ac_func=yes"
11241 else
11242   echo "configure: failed program was:" >&5
11243   cat conftest.$ac_ext >&5
11244   rm -rf conftest*
11245   eval "ac_cv_func_$ac_func=no"
11246 fi
11247 rm -f conftest*
11248
11249 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11250   echo "$ac_t""yes" 1>&6
11251     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11252   { test "$extra_verbose" = "yes" && cat << EOF
11253     Defining $ac_tr_func
11254 EOF
11255 cat >> confdefs.h <<EOF
11256 #define $ac_tr_func 1
11257 EOF
11258 }
11259  
11260 else
11261   echo "$ac_t""no" 1>&6
11262 fi
11263 done
11264
11265
11266 if test "$ac_cv_func_getloadavg" = "yes"; then
11267         for ac_hdr in sys/loadavg.h
11268 do
11269 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11270 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11271 echo "configure:11272: checking for $ac_hdr" >&5
11272
11273 cat > conftest.$ac_ext <<EOF
11274 #line 11275 "configure"
11275 #include "confdefs.h"
11276 #include <$ac_hdr>
11277 EOF
11278 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11279 { (eval echo configure:11280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11280 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11281 if test -z "$ac_err"; then
11282   rm -rf conftest*
11283   eval "ac_cv_header_$ac_safe=yes"
11284 else
11285   echo "$ac_err" >&5
11286   echo "configure: failed program was:" >&5
11287   cat conftest.$ac_ext >&5
11288   rm -rf conftest*
11289   eval "ac_cv_header_$ac_safe=no"
11290 fi
11291 rm -f conftest*
11292 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11293   echo "$ac_t""yes" 1>&6
11294     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11295   { test "$extra_verbose" = "yes" && cat << EOF
11296     Defining $ac_tr_hdr
11297 EOF
11298 cat >> confdefs.h <<EOF
11299 #define $ac_tr_hdr 1
11300 EOF
11301 }
11302  
11303 else
11304   echo "$ac_t""no" 1>&6
11305 fi
11306 done
11307
11308 else
11309     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11310    echo "    xemacs will be linked with \"getloadavg.o\""
11311  fi
11312
11313     
11314 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11315 echo "configure:11316: checking for kstat_open in -lkstat" >&5
11316 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11317
11318 xe_check_libs=" -lkstat "
11319 cat > conftest.$ac_ext <<EOF
11320 #line 11321 "configure"
11321 #include "confdefs.h"
11322 /* Override any gcc2 internal prototype to avoid an error.  */
11323 /* We use char because int might match the return type of a gcc2
11324     builtin and then its argument prototype would still apply.  */
11325 char kstat_open();
11326
11327 int main() {
11328 kstat_open()
11329 ; return 0; }
11330 EOF
11331 if { (eval echo configure:11332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11332   rm -rf conftest*
11333   eval "ac_cv_lib_$ac_lib_var=yes"
11334 else
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_lib_$ac_lib_var=no"
11339 fi
11340 rm -f conftest*
11341 xe_check_libs=""
11342
11343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11344   echo "$ac_t""yes" 1>&6
11345     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11347   { test "$extra_verbose" = "yes" && cat << EOF
11348     Defining $ac_tr_lib
11349 EOF
11350 cat >> confdefs.h <<EOF
11351 #define $ac_tr_lib 1
11352 EOF
11353 }
11354
11355   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11356
11357 else
11358   echo "$ac_t""no" 1>&6
11359 fi
11360
11361
11362   for ac_hdr in kstat.h
11363 do
11364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11366 echo "configure:11367: checking for $ac_hdr" >&5
11367
11368 cat > conftest.$ac_ext <<EOF
11369 #line 11370 "configure"
11370 #include "confdefs.h"
11371 #include <$ac_hdr>
11372 EOF
11373 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11374 { (eval echo configure:11375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11375 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11376 if test -z "$ac_err"; then
11377   rm -rf conftest*
11378   eval "ac_cv_header_$ac_safe=yes"
11379 else
11380   echo "$ac_err" >&5
11381   echo "configure: failed program was:" >&5
11382   cat conftest.$ac_ext >&5
11383   rm -rf conftest*
11384   eval "ac_cv_header_$ac_safe=no"
11385 fi
11386 rm -f conftest*
11387 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11388   echo "$ac_t""yes" 1>&6
11389     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11390   { test "$extra_verbose" = "yes" && cat << EOF
11391     Defining $ac_tr_hdr
11392 EOF
11393 cat >> confdefs.h <<EOF
11394 #define $ac_tr_hdr 1
11395 EOF
11396 }
11397  
11398 else
11399   echo "$ac_t""no" 1>&6
11400 fi
11401 done
11402
11403
11404     
11405 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11406 echo "configure:11407: checking for kvm_read in -lkvm" >&5
11407 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11408
11409 xe_check_libs=" -lkvm "
11410 cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413 /* Override any gcc2 internal prototype to avoid an error.  */
11414 /* We use char because int might match the return type of a gcc2
11415     builtin and then its argument prototype would still apply.  */
11416 char kvm_read();
11417
11418 int main() {
11419 kvm_read()
11420 ; return 0; }
11421 EOF
11422 if { (eval echo configure:11423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11423   rm -rf conftest*
11424   eval "ac_cv_lib_$ac_lib_var=yes"
11425 else
11426   echo "configure: failed program was:" >&5
11427   cat conftest.$ac_ext >&5
11428   rm -rf conftest*
11429   eval "ac_cv_lib_$ac_lib_var=no"
11430 fi
11431 rm -f conftest*
11432 xe_check_libs=""
11433
11434 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11435   echo "$ac_t""yes" 1>&6
11436     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11437     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11438   { test "$extra_verbose" = "yes" && cat << EOF
11439     Defining $ac_tr_lib
11440 EOF
11441 cat >> confdefs.h <<EOF
11442 #define $ac_tr_lib 1
11443 EOF
11444 }
11445
11446   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11447
11448 else
11449   echo "$ac_t""no" 1>&6
11450 fi
11451
11452
11453 fi
11454
11455 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11456 echo "configure:11457: checking whether netdb declares h_errno" >&5
11457 cat > conftest.$ac_ext <<EOF
11458 #line 11459 "configure"
11459 #include "confdefs.h"
11460 #include <netdb.h>
11461 int main() {
11462 return h_errno;
11463 ; return 0; }
11464 EOF
11465 if { (eval echo configure:11466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11466   rm -rf conftest*
11467   echo "$ac_t""yes" 1>&6
11468    { test "$extra_verbose" = "yes" && cat << \EOF
11469     Defining HAVE_H_ERRNO
11470 EOF
11471 cat >> confdefs.h <<\EOF
11472 #define HAVE_H_ERRNO 1
11473 EOF
11474 }
11475
11476 else
11477   echo "configure: failed program was:" >&5
11478   cat conftest.$ac_ext >&5
11479   rm -rf conftest*
11480   echo "$ac_t""no" 1>&6
11481 fi
11482 rm -f conftest*
11483
11484 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11485 echo "configure:11486: checking for sigsetjmp" >&5
11486 cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 #include <setjmp.h>
11490 int main() {
11491 sigjmp_buf bar; sigsetjmp (bar, 0);
11492 ; return 0; }
11493 EOF
11494 if { (eval echo configure:11495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11495   rm -rf conftest*
11496   echo "$ac_t""yes" 1>&6
11497    { test "$extra_verbose" = "yes" && cat << \EOF
11498     Defining HAVE_SIGSETJMP
11499 EOF
11500 cat >> confdefs.h <<\EOF
11501 #define HAVE_SIGSETJMP 1
11502 EOF
11503 }
11504
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   echo "$ac_t""no" 1>&6
11510 fi
11511 rm -f conftest*
11512
11513 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11514 echo "configure:11515: checking whether localtime caches TZ" >&5
11515
11516 if test "$ac_cv_func_tzset" = "yes"; then
11517 cat > conftest.$ac_ext <<EOF
11518 #line 11519 "configure"
11519 #include "confdefs.h"
11520 #include <time.h>
11521 #if STDC_HEADERS
11522 # include <stdlib.h>
11523 #endif
11524 extern char **environ;
11525 unset_TZ ()
11526 {
11527   char **from, **to;
11528   for (to = from = environ; (*to = *from); from++)
11529     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11530       to++;
11531 }
11532 char TZ_GMT0[] = "TZ=GMT0";
11533 char TZ_PST8[] = "TZ=PST8";
11534 main()
11535 {
11536   time_t now = time ((time_t *) 0);
11537   int hour_GMT0, hour_unset;
11538   if (putenv (TZ_GMT0) != 0)
11539     exit (1);
11540   hour_GMT0 = localtime (&now)->tm_hour;
11541   unset_TZ ();
11542   hour_unset = localtime (&now)->tm_hour;
11543   if (putenv (TZ_PST8) != 0)
11544     exit (1);
11545   if (localtime (&now)->tm_hour == hour_GMT0)
11546     exit (1);
11547   unset_TZ ();
11548   if (localtime (&now)->tm_hour != hour_unset)
11549     exit (1);
11550   exit (0);
11551 }
11552 EOF
11553 if { (eval echo configure:11554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11554 then
11555   emacs_cv_localtime_cache=no
11556 else
11557   conftest_rc="$?"
11558   echo "configure: failed program was:" >&5
11559   cat conftest.$ac_ext >&5
11560   rm -fr conftest*
11561   emacs_cv_localtime_cache=yes
11562 fi
11563 rm -fr conftest*
11564 else
11565         # If we lack tzset, report that localtime does not cache TZ,
11566         # since we can't invalidate the cache if we don't have tzset.
11567         emacs_cv_localtime_cache=no
11568 fi
11569 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11570 if test $emacs_cv_localtime_cache = yes; then
11571   { test "$extra_verbose" = "yes" && cat << \EOF
11572     Defining LOCALTIME_CACHE
11573 EOF
11574 cat >> confdefs.h <<\EOF
11575 #define LOCALTIME_CACHE 1
11576 EOF
11577 }
11578
11579 fi
11580
11581 if test "$HAVE_TIMEVAL" = "yes"; then
11582 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11583 echo "configure:11584: checking whether gettimeofday accepts one or two arguments" >&5
11584 cat > conftest.$ac_ext <<EOF
11585 #line 11586 "configure"
11586 #include "confdefs.h"
11587
11588 #ifdef TIME_WITH_SYS_TIME
11589 #include <sys/time.h>
11590 #include <time.h>
11591 #else
11592 #ifdef HAVE_SYS_TIME_H
11593 #include <sys/time.h>
11594 #else
11595 #include <time.h>
11596 #endif
11597 #endif
11598   
11599 int main() {
11600
11601   struct timeval time;
11602   gettimeofday (&time, 0);
11603
11604 ; return 0; }
11605 EOF
11606 if { (eval echo configure:11607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11607   rm -rf conftest*
11608   echo "$ac_t""two" 1>&6
11609 else
11610   echo "configure: failed program was:" >&5
11611   cat conftest.$ac_ext >&5
11612   rm -rf conftest*
11613   echo "$ac_t""one" 1>&6
11614    { test "$extra_verbose" = "yes" && cat << \EOF
11615     Defining GETTIMEOFDAY_ONE_ARGUMENT
11616 EOF
11617 cat >> confdefs.h <<\EOF
11618 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11619 EOF
11620 }
11621
11622 fi
11623 rm -f conftest*
11624 fi
11625
11626
11627 echo $ac_n "checking for inline""... $ac_c" 1>&6
11628 echo "configure:11629: checking for inline" >&5
11629
11630 ac_cv_c_inline=no
11631 for ac_kw in inline __inline__ __inline; do
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635
11636 int main() {
11637 } $ac_kw foo() {
11638 ; return 0; }
11639 EOF
11640 if { (eval echo configure:11641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11641   rm -rf conftest*
11642   ac_cv_c_inline=$ac_kw; break
11643 else
11644   echo "configure: failed program was:" >&5
11645   cat conftest.$ac_ext >&5
11646 fi
11647 rm -f conftest*
11648 done
11649
11650
11651 echo "$ac_t""$ac_cv_c_inline" 1>&6
11652 case "$ac_cv_c_inline" in
11653   inline | yes) ;;
11654   no) { test "$extra_verbose" = "yes" && cat << \EOF
11655     Defining inline = 
11656 EOF
11657 cat >> confdefs.h <<\EOF
11658 #define inline 
11659 EOF
11660 }
11661  ;;
11662   *)  { test "$extra_verbose" = "yes" && cat << EOF
11663     Defining inline = $ac_cv_c_inline
11664 EOF
11665 cat >> confdefs.h <<EOF
11666 #define inline $ac_cv_c_inline
11667 EOF
11668 }
11669  ;;
11670 esac
11671
11672 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11673    echo "    xemacs will be linked with \"inline.o\""
11674  fi
11675
11676
11677 if test "$__DECC" != "yes"; then
11678   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11679 # for constant arguments.  Useless!
11680 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11681 echo "configure:11682: checking for working alloca.h" >&5
11682
11683 cat > conftest.$ac_ext <<EOF
11684 #line 11685 "configure"
11685 #include "confdefs.h"
11686 #include <alloca.h>
11687 int main() {
11688 char *p = alloca(2 * sizeof(int));
11689 ; return 0; }
11690 EOF
11691 if { (eval echo configure:11692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11692   rm -rf conftest*
11693   ac_cv_header_alloca_h=yes
11694 else
11695   echo "configure: failed program was:" >&5
11696   cat conftest.$ac_ext >&5
11697   rm -rf conftest*
11698   ac_cv_header_alloca_h=no
11699 fi
11700 rm -f conftest*
11701
11702 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11703 if test $ac_cv_header_alloca_h = yes; then
11704   { test "$extra_verbose" = "yes" && cat << \EOF
11705     Defining HAVE_ALLOCA_H
11706 EOF
11707 cat >> confdefs.h <<\EOF
11708 #define HAVE_ALLOCA_H 1
11709 EOF
11710 }
11711
11712 fi
11713
11714 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11715 echo "configure:11716: checking for alloca" >&5
11716
11717 cat > conftest.$ac_ext <<EOF
11718 #line 11719 "configure"
11719 #include "confdefs.h"
11720
11721 #ifdef __GNUC__
11722 # define alloca __builtin_alloca
11723 #else
11724 # ifdef _MSC_VER
11725 #  include <malloc.h>
11726 #  define alloca _alloca
11727 # else
11728 #  if HAVE_ALLOCA_H
11729 #   include <alloca.h>
11730 #  else
11731 #   ifdef _AIX
11732  #pragma alloca
11733 #   else
11734 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11735 char *alloca ();
11736 #    endif
11737 #   endif
11738 #  endif
11739 # endif
11740 #endif
11741
11742 int main() {
11743 char *p = (char *) alloca(1);
11744 ; return 0; }
11745 EOF
11746 if { (eval echo configure:11747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11747   rm -rf conftest*
11748   ac_cv_func_alloca_works=yes
11749 else
11750   echo "configure: failed program was:" >&5
11751   cat conftest.$ac_ext >&5
11752   rm -rf conftest*
11753   ac_cv_func_alloca_works=no
11754 fi
11755 rm -f conftest*
11756
11757 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11758 if test $ac_cv_func_alloca_works = yes; then
11759   { test "$extra_verbose" = "yes" && cat << \EOF
11760     Defining HAVE_ALLOCA
11761 EOF
11762 cat >> confdefs.h <<\EOF
11763 #define HAVE_ALLOCA 1
11764 EOF
11765 }
11766
11767 fi
11768
11769 if test $ac_cv_func_alloca_works = no; then
11770   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11771   # that cause trouble.  Some versions do not even contain alloca or
11772   # contain a buggy version.  If you still want to use their alloca,
11773   # use ar to extract alloca.o from them instead of compiling alloca.c.
11774   ALLOCA=alloca.${ac_objext}
11775   { test "$extra_verbose" = "yes" && cat << \EOF
11776     Defining C_ALLOCA
11777 EOF
11778 cat >> confdefs.h <<\EOF
11779 #define C_ALLOCA 1
11780 EOF
11781 }
11782
11783
11784 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11785 echo "configure:11786: checking whether alloca needs Cray hooks" >&5
11786
11787 cat > conftest.$ac_ext <<EOF
11788 #line 11789 "configure"
11789 #include "confdefs.h"
11790 #if defined(CRAY) && ! defined(CRAY2)
11791 webecray
11792 #else
11793 wenotbecray
11794 #endif
11795
11796 EOF
11797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11798   egrep "webecray" >/dev/null 2>&1; then
11799   rm -rf conftest*
11800   ac_cv_os_cray=yes
11801 else
11802   rm -rf conftest*
11803   ac_cv_os_cray=no
11804 fi
11805 rm -f conftest*
11806
11807
11808 echo "$ac_t""$ac_cv_os_cray" 1>&6
11809 if test $ac_cv_os_cray = yes; then
11810 for ac_func in _getb67 GETB67 getb67; do
11811   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11812 echo "configure:11813: checking for $ac_func" >&5
11813
11814 cat > conftest.$ac_ext <<EOF
11815 #line 11816 "configure"
11816 #include "confdefs.h"
11817 /* System header to define __stub macros and hopefully few prototypes,
11818     which can conflict with char $ac_func(); below.  */
11819 #include <assert.h>
11820 /* Override any gcc2 internal prototype to avoid an error.  */
11821 /* We use char because int might match the return type of a gcc2
11822     builtin and then its argument prototype would still apply.  */
11823 char $ac_func();
11824
11825 int main() {
11826
11827 /* The GNU C library defines this for functions which it implements
11828     to always fail with ENOSYS.  Some functions are actually named
11829     something starting with __ and the normal name is an alias.  */
11830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11831 choke me
11832 #else
11833 $ac_func();
11834 #endif
11835
11836 ; return 0; }
11837 EOF
11838 if { (eval echo configure:11839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11839   rm -rf conftest*
11840   eval "ac_cv_func_$ac_func=yes"
11841 else
11842   echo "configure: failed program was:" >&5
11843   cat conftest.$ac_ext >&5
11844   rm -rf conftest*
11845   eval "ac_cv_func_$ac_func=no"
11846 fi
11847 rm -f conftest*
11848
11849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11850   echo "$ac_t""yes" 1>&6
11851   { test "$extra_verbose" = "yes" && cat << EOF
11852     Defining CRAY_STACKSEG_END = $ac_func
11853 EOF
11854 cat >> confdefs.h <<EOF
11855 #define CRAY_STACKSEG_END $ac_func
11856 EOF
11857 }
11858
11859   break
11860 else
11861   echo "$ac_t""no" 1>&6
11862 fi
11863
11864 done
11865 fi
11866
11867 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11868 echo "configure:11869: checking stack direction for C alloca" >&5
11869
11870 cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 find_stack_direction ()
11874 {
11875   static char *addr = 0;
11876   auto char dummy;
11877   if (addr == 0)
11878     {
11879       addr = &dummy;
11880       return find_stack_direction ();
11881     }
11882   else
11883     return (&dummy > addr) ? 1 : -1;
11884 }
11885 main ()
11886 {
11887   exit (find_stack_direction() < 0);
11888 }
11889 EOF
11890 if { (eval echo configure:11891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11891 then
11892   ac_cv_c_stack_direction=1
11893 else
11894   conftest_rc="$?"
11895   echo "configure: failed program was:" >&5
11896   cat conftest.$ac_ext >&5
11897   rm -fr conftest*
11898   ac_cv_c_stack_direction=-1
11899 fi
11900 rm -fr conftest*
11901
11902 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11903 { test "$extra_verbose" = "yes" && cat << EOF
11904     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11905 EOF
11906 cat >> confdefs.h <<EOF
11907 #define STACK_DIRECTION $ac_cv_c_stack_direction
11908 EOF
11909 }
11910
11911 fi
11912
11913   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11914    echo "    xemacs will be linked with \"$ALLOCA\""
11915  fi
11916 fi
11917
11918 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11919 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11920 echo "configure:11921: checking for vfork.h" >&5
11921
11922 cat > conftest.$ac_ext <<EOF
11923 #line 11924 "configure"
11924 #include "confdefs.h"
11925 #include <vfork.h>
11926 EOF
11927 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11928 { (eval echo configure:11929: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11929 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11930 if test -z "$ac_err"; then
11931   rm -rf conftest*
11932   eval "ac_cv_header_$ac_safe=yes"
11933 else
11934   echo "$ac_err" >&5
11935   echo "configure: failed program was:" >&5
11936   cat conftest.$ac_ext >&5
11937   rm -rf conftest*
11938   eval "ac_cv_header_$ac_safe=no"
11939 fi
11940 rm -f conftest*
11941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11942   echo "$ac_t""yes" 1>&6
11943   { test "$extra_verbose" = "yes" && cat << \EOF
11944     Defining HAVE_VFORK_H
11945 EOF
11946 cat >> confdefs.h <<\EOF
11947 #define HAVE_VFORK_H 1
11948 EOF
11949 }
11950
11951 else
11952   echo "$ac_t""no" 1>&6
11953 fi
11954
11955 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11956 echo "configure:11957: checking for working vfork" >&5
11957
11958 cat > conftest.$ac_ext <<EOF
11959 #line 11960 "configure"
11960 #include "confdefs.h"
11961 /* Thanks to Paul Eggert for this test.  */
11962 #include <stdio.h>
11963 #include <sys/types.h>
11964 #include <sys/stat.h>
11965 #ifdef HAVE_UNISTD_H
11966 #include <unistd.h>
11967 #endif
11968 #ifdef HAVE_VFORK_H
11969 #include <vfork.h>
11970 #endif
11971 /* On some sparc systems, changes by the child to local and incoming
11972    argument registers are propagated back to the parent.
11973    The compiler is told about this with #include <vfork.h>,
11974    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11975    Test for this by using a static variable whose address
11976    is put into a register that is clobbered by the vfork.  */
11977 static
11978 #ifdef __cplusplus
11979 sparc_address_test (int arg)
11980 #else
11981 sparc_address_test (arg) int arg;
11982 #endif
11983 {
11984   static pid_t child;
11985   if (!child) {
11986     child = vfork ();
11987     if (child < 0) {
11988       perror ("vfork");
11989       _exit(2);
11990     }
11991     if (!child) {
11992       arg = getpid();
11993       write(-1, "", 0);
11994       _exit (arg);
11995     }
11996   }
11997 }
11998 main() {
11999   pid_t parent = getpid ();
12000   pid_t child;
12001
12002   sparc_address_test ();
12003
12004   child = vfork ();
12005
12006   if (child == 0) {
12007     /* Here is another test for sparc vfork register problems.
12008        This test uses lots of local variables, at least
12009        as many local variables as main has allocated so far
12010        including compiler temporaries.  4 locals are enough for
12011        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12012        A buggy compiler should reuse the register of parent
12013        for one of the local variables, since it will think that
12014        parent can't possibly be used any more in this routine.
12015        Assigning to the local variable will thus munge parent
12016        in the parent process.  */
12017     pid_t
12018       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12019       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12020     /* Convince the compiler that p..p7 are live; otherwise, it might
12021        use the same hardware register for all 8 local variables.  */
12022     if (p != p1 || p != p2 || p != p3 || p != p4
12023         || p != p5 || p != p6 || p != p7)
12024       _exit(1);
12025
12026     /* On some systems (e.g. IRIX 3.3),
12027        vfork doesn't separate parent from child file descriptors.
12028        If the child closes a descriptor before it execs or exits,
12029        this munges the parent's descriptor as well.
12030        Test for this by closing stdout in the child.  */
12031     _exit(close(fileno(stdout)) != 0);
12032   } else {
12033     int status;
12034     struct stat st;
12035
12036     while (wait(&status) != child)
12037       ;
12038     exit(
12039          /* Was there some problem with vforking?  */
12040          child < 0
12041
12042          /* Did the child fail?  (This shouldn't happen.)  */
12043          || status
12044
12045          /* Did the vfork/compiler bug occur?  */
12046          || parent != getpid()
12047
12048          /* Did the file descriptor bug occur?  */
12049          || fstat(fileno(stdout), &st) != 0
12050          );
12051   }
12052 }
12053 EOF
12054 if { (eval echo configure:12055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12055 then
12056   ac_cv_func_vfork_works=yes
12057 else
12058   conftest_rc="$?"
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -fr conftest*
12062   ac_cv_func_vfork_works=no
12063 fi
12064 rm -fr conftest*
12065
12066 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12067 if test $ac_cv_func_vfork_works = no; then
12068   { test "$extra_verbose" = "yes" && cat << \EOF
12069     Defining vfork = fork
12070 EOF
12071 cat >> confdefs.h <<\EOF
12072 #define vfork fork
12073 EOF
12074 }
12075
12076 fi
12077
12078
12079 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12080 echo "configure:12081: checking for working strcoll" >&5
12081
12082 cat > conftest.$ac_ext <<EOF
12083 #line 12084 "configure"
12084 #include "confdefs.h"
12085 #include <string.h>
12086 main ()
12087 {
12088   exit (strcoll ("abc", "def") >= 0 ||
12089         strcoll ("ABC", "DEF") >= 0 ||
12090         strcoll ("123", "456") >= 0);
12091 }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12094 then
12095   ac_cv_func_strcoll_works=yes
12096 else
12097   conftest_rc="$?"
12098   echo "configure: failed program was:" >&5
12099   cat conftest.$ac_ext >&5
12100   rm -fr conftest*
12101   ac_cv_func_strcoll_works=no
12102 fi
12103 rm -fr conftest*
12104
12105 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12106 if test $ac_cv_func_strcoll_works = yes; then
12107   { test "$extra_verbose" = "yes" && cat << \EOF
12108     Defining HAVE_STRCOLL
12109 EOF
12110 cat >> confdefs.h <<\EOF
12111 #define HAVE_STRCOLL 1
12112 EOF
12113 }
12114
12115 fi
12116
12117
12118 for ac_func in getpgrp
12119 do
12120 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12121 echo "configure:12122: checking for $ac_func" >&5
12122
12123 cat > conftest.$ac_ext <<EOF
12124 #line 12125 "configure"
12125 #include "confdefs.h"
12126 /* System header to define __stub macros and hopefully few prototypes,
12127     which can conflict with char $ac_func(); below.  */
12128 #include <assert.h>
12129 /* Override any gcc2 internal prototype to avoid an error.  */
12130 /* We use char because int might match the return type of a gcc2
12131     builtin and then its argument prototype would still apply.  */
12132 char $ac_func();
12133
12134 int main() {
12135
12136 /* The GNU C library defines this for functions which it implements
12137     to always fail with ENOSYS.  Some functions are actually named
12138     something starting with __ and the normal name is an alias.  */
12139 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12140 choke me
12141 #else
12142 $ac_func();
12143 #endif
12144
12145 ; return 0; }
12146 EOF
12147 if { (eval echo configure:12148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12148   rm -rf conftest*
12149   eval "ac_cv_func_$ac_func=yes"
12150 else
12151   echo "configure: failed program was:" >&5
12152   cat conftest.$ac_ext >&5
12153   rm -rf conftest*
12154   eval "ac_cv_func_$ac_func=no"
12155 fi
12156 rm -f conftest*
12157
12158 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12159   echo "$ac_t""yes" 1>&6
12160     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12161   { test "$extra_verbose" = "yes" && cat << EOF
12162     Defining $ac_tr_func
12163 EOF
12164 cat >> confdefs.h <<EOF
12165 #define $ac_tr_func 1
12166 EOF
12167 }
12168  
12169 else
12170   echo "$ac_t""no" 1>&6
12171 fi
12172 done
12173
12174 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12175 echo "configure:12176: checking whether getpgrp takes no argument" >&5
12176
12177 cat > conftest.$ac_ext <<EOF
12178 #line 12179 "configure"
12179 #include "confdefs.h"
12180
12181 /*
12182  * If this system has a BSD-style getpgrp(),
12183  * which takes a pid argument, exit unsuccessfully.
12184  *
12185  * Snarfed from Chet Ramey's bash pgrp.c test program
12186  */
12187 #include <stdio.h>
12188 #include <sys/types.h>
12189
12190 int     pid;
12191 int     pg1, pg2, pg3, pg4;
12192 int     ng, np, s, child;
12193
12194 main()
12195 {
12196         pid = getpid();
12197         pg1 = getpgrp(0);
12198         pg2 = getpgrp();
12199         pg3 = getpgrp(pid);
12200         pg4 = getpgrp(1);
12201
12202         /*
12203          * If all of these values are the same, it's pretty sure that
12204          * we're on a system that ignores getpgrp's first argument.
12205          */
12206         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12207                 exit(0);
12208
12209         child = fork();
12210         if (child < 0)
12211                 exit(1);
12212         else if (child == 0) {
12213                 np = getpid();
12214                 /*
12215                  * If this is Sys V, this will not work; pgrp will be
12216                  * set to np because setpgrp just changes a pgrp to be
12217                  * the same as the pid.
12218                  */
12219                 setpgrp(np, pg1);
12220                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12221                 if (ng == pg1) {
12222                         exit(1);
12223                 } else {
12224                         exit(0);
12225                 }
12226         } else {
12227                 wait(&s);
12228                 exit(s>>8);
12229         }
12230 }
12231
12232 EOF
12233 if { (eval echo configure:12234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12234 then
12235   ac_cv_func_getpgrp_void=yes
12236 else
12237   conftest_rc="$?"
12238   echo "configure: failed program was:" >&5
12239   cat conftest.$ac_ext >&5
12240   rm -fr conftest*
12241   ac_cv_func_getpgrp_void=no
12242 fi
12243 rm -fr conftest*
12244
12245
12246 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12247 if test $ac_cv_func_getpgrp_void = yes; then
12248   { test "$extra_verbose" = "yes" && cat << \EOF
12249     Defining GETPGRP_VOID
12250 EOF
12251 cat >> confdefs.h <<\EOF
12252 #define GETPGRP_VOID 1
12253 EOF
12254 }
12255
12256 fi
12257
12258
12259 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12260 echo "configure:12261: checking for working mmap" >&5
12261 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12262 cat > conftest.$ac_ext <<EOF
12263 #line 12264 "configure"
12264 #include "confdefs.h"
12265 #include <stdio.h>
12266 #include <unistd.h>
12267 #include <fcntl.h>
12268 #include <sys/mman.h>
12269
12270 #ifndef MAP_VARIABLE
12271 #define MAP_VARIABLE 0
12272 #endif
12273
12274 #ifndef MAP_FAILED
12275 #define MAP_FAILED -1
12276 #endif
12277
12278 int main (int argc, char *argv[])
12279 {
12280   int fd = -1;
12281   caddr_t p;
12282 #ifndef MAP_ANONYMOUS
12283   fd = open ("/dev/zero", O_RDWR);
12284   if (fd < 0)
12285     return 1;
12286 #define MAP_ANONYMOUS 0
12287 #endif
12288   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12289            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12290            fd, 0) != (void *) MAP_FAILED)
12291     return 0;
12292   perror ("conftest: mmap failed");
12293   return 1;
12294 }
12295 EOF
12296 if { (eval echo configure:12297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12297 then
12298   have_mmap=yes
12299 else
12300   conftest_rc="$?"
12301   echo "configure: failed program was:" >&5
12302   cat conftest.$ac_ext >&5
12303   rm -fr conftest*
12304   have_mmap=no
12305 fi
12306 rm -fr conftest* ;;
12307 esac
12308 echo "$ac_t""$have_mmap" 1>&6
12309 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12310     Defining HAVE_MMAP
12311 EOF
12312 cat >> confdefs.h <<\EOF
12313 #define HAVE_MMAP 1
12314 EOF
12315 }
12316
12317
12318 case "$opsys" in cygwin*) 
12319         test "$rel_alloc" = "default" && rel_alloc=no ;;
12320 esac
12321 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12322 if test "$rel_alloc $have_mmap" = "default yes"; then
12323   if test "$doug_lea_malloc" = "yes"; then
12324         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12325 echo "configure:12326: checking for M_MMAP_THRESHOLD" >&5
12326     cat > conftest.$ac_ext <<EOF
12327 #line 12328 "configure"
12328 #include "confdefs.h"
12329 #include <malloc.h>
12330 int main() {
12331
12332 #ifndef M_MMAP_THRESHOLD
12333 #error No M_MMAP_THRESHOLD :-(
12334 !@+$%^&*_)(_ - unlikely to compile...
12335 #endif
12336
12337 ; return 0; }
12338 EOF
12339 if { (eval echo configure:12340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12340   rm -rf conftest*
12341   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12342 else
12343   echo "configure: failed program was:" >&5
12344   cat conftest.$ac_ext >&5
12345   rm -rf conftest*
12346   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12347 fi
12348 rm -f conftest*
12349   else
12350     rel_alloc=yes
12351   fi
12352 fi
12353 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12354     Defining REL_ALLOC
12355 EOF
12356 cat >> confdefs.h <<\EOF
12357 #define REL_ALLOC 1
12358 EOF
12359 }
12360
12361
12362 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12363 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12364 echo "configure:12365: checking for termios.h" >&5
12365
12366 cat > conftest.$ac_ext <<EOF
12367 #line 12368 "configure"
12368 #include "confdefs.h"
12369 #include <termios.h>
12370 EOF
12371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12372 { (eval echo configure:12373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12374 if test -z "$ac_err"; then
12375   rm -rf conftest*
12376   eval "ac_cv_header_$ac_safe=yes"
12377 else
12378   echo "$ac_err" >&5
12379   echo "configure: failed program was:" >&5
12380   cat conftest.$ac_ext >&5
12381   rm -rf conftest*
12382   eval "ac_cv_header_$ac_safe=no"
12383 fi
12384 rm -f conftest*
12385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12386   echo "$ac_t""yes" 1>&6
12387   { test "$extra_verbose" = "yes" && cat << \EOF
12388     Defining HAVE_TERMIOS
12389 EOF
12390 cat >> confdefs.h <<\EOF
12391 #define HAVE_TERMIOS 1
12392 EOF
12393 }
12394
12395   { test "$extra_verbose" = "yes" && cat << \EOF
12396     Defining SIGNALS_VIA_CHARACTERS
12397 EOF
12398 cat >> confdefs.h <<\EOF
12399 #define SIGNALS_VIA_CHARACTERS 1
12400 EOF
12401 }
12402
12403   { test "$extra_verbose" = "yes" && cat << \EOF
12404     Defining NO_TERMIO
12405 EOF
12406 cat >> confdefs.h <<\EOF
12407 #define NO_TERMIO 1
12408 EOF
12409 }
12410
12411 else
12412   echo "$ac_t""no" 1>&6
12413 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12414 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12415 echo "configure:12416: checking for termio.h" >&5
12416
12417 cat > conftest.$ac_ext <<EOF
12418 #line 12419 "configure"
12419 #include "confdefs.h"
12420 #include <termio.h>
12421 EOF
12422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12423 { (eval echo configure:12424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12425 if test -z "$ac_err"; then
12426   rm -rf conftest*
12427   eval "ac_cv_header_$ac_safe=yes"
12428 else
12429   echo "$ac_err" >&5
12430   echo "configure: failed program was:" >&5
12431   cat conftest.$ac_ext >&5
12432   rm -rf conftest*
12433   eval "ac_cv_header_$ac_safe=no"
12434 fi
12435 rm -f conftest*
12436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12437   echo "$ac_t""yes" 1>&6
12438   { test "$extra_verbose" = "yes" && cat << \EOF
12439     Defining HAVE_TERMIO
12440 EOF
12441 cat >> confdefs.h <<\EOF
12442 #define HAVE_TERMIO 1
12443 EOF
12444 }
12445
12446 else
12447   echo "$ac_t""no" 1>&6
12448 fi
12449
12450 fi
12451
12452
12453
12454 echo $ac_n "checking for socket""... $ac_c" 1>&6
12455 echo "configure:12456: checking for socket" >&5
12456
12457 cat > conftest.$ac_ext <<EOF
12458 #line 12459 "configure"
12459 #include "confdefs.h"
12460 /* System header to define __stub macros and hopefully few prototypes,
12461     which can conflict with char socket(); below.  */
12462 #include <assert.h>
12463 /* Override any gcc2 internal prototype to avoid an error.  */
12464 /* We use char because int might match the return type of a gcc2
12465     builtin and then its argument prototype would still apply.  */
12466 char socket();
12467
12468 int main() {
12469
12470 /* The GNU C library defines this for functions which it implements
12471     to always fail with ENOSYS.  Some functions are actually named
12472     something starting with __ and the normal name is an alias.  */
12473 #if defined (__stub_socket) || defined (__stub___socket)
12474 choke me
12475 #else
12476 socket();
12477 #endif
12478
12479 ; return 0; }
12480 EOF
12481 if { (eval echo configure:12482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12482   rm -rf conftest*
12483   eval "ac_cv_func_socket=yes"
12484 else
12485   echo "configure: failed program was:" >&5
12486   cat conftest.$ac_ext >&5
12487   rm -rf conftest*
12488   eval "ac_cv_func_socket=no"
12489 fi
12490 rm -f conftest*
12491
12492 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12493   echo "$ac_t""yes" 1>&6
12494   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12495 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12496 echo "configure:12497: checking for netinet/in.h" >&5
12497
12498 cat > conftest.$ac_ext <<EOF
12499 #line 12500 "configure"
12500 #include "confdefs.h"
12501 #include <netinet/in.h>
12502 EOF
12503 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12504 { (eval echo configure:12505: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12505 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12506 if test -z "$ac_err"; then
12507   rm -rf conftest*
12508   eval "ac_cv_header_$ac_safe=yes"
12509 else
12510   echo "$ac_err" >&5
12511   echo "configure: failed program was:" >&5
12512   cat conftest.$ac_ext >&5
12513   rm -rf conftest*
12514   eval "ac_cv_header_$ac_safe=no"
12515 fi
12516 rm -f conftest*
12517 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12518   echo "$ac_t""yes" 1>&6
12519   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12520 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12521 echo "configure:12522: checking for arpa/inet.h" >&5
12522
12523 cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 #include <arpa/inet.h>
12527 EOF
12528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12529 { (eval echo configure:12530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12531 if test -z "$ac_err"; then
12532   rm -rf conftest*
12533   eval "ac_cv_header_$ac_safe=yes"
12534 else
12535   echo "$ac_err" >&5
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -rf conftest*
12539   eval "ac_cv_header_$ac_safe=no"
12540 fi
12541 rm -f conftest*
12542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12543   echo "$ac_t""yes" 1>&6
12544   
12545   { test "$extra_verbose" = "yes" && cat << \EOF
12546     Defining HAVE_SOCKETS
12547 EOF
12548 cat >> confdefs.h <<\EOF
12549 #define HAVE_SOCKETS 1
12550 EOF
12551 }
12552
12553       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12554 echo "configure:12555: checking "for sun_len member in struct sockaddr_un"" >&5
12555       cat > conftest.$ac_ext <<EOF
12556 #line 12557 "configure"
12557 #include "confdefs.h"
12558
12559 #include <sys/types.h>
12560 #include <sys/socket.h>
12561 #include <sys/un.h>
12562       
12563 int main() {
12564 static struct sockaddr_un x; x.sun_len = 1;
12565 ; return 0; }
12566 EOF
12567 if { (eval echo configure:12568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12568   rm -rf conftest*
12569   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12570     Defining HAVE_SOCKADDR_SUN_LEN
12571 EOF
12572 cat >> confdefs.h <<\EOF
12573 #define HAVE_SOCKADDR_SUN_LEN 1
12574 EOF
12575 }
12576
12577 else
12578   echo "configure: failed program was:" >&5
12579   cat conftest.$ac_ext >&5
12580   rm -rf conftest*
12581   echo "$ac_t""no" 1>&6
12582 fi
12583 rm -f conftest*
12584       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12585 echo "configure:12586: checking "for ip_mreq struct in netinet/in.h"" >&5
12586       cat > conftest.$ac_ext <<EOF
12587 #line 12588 "configure"
12588 #include "confdefs.h"
12589
12590 #include <sys/types.h>
12591 #include <netinet/in.h>
12592       
12593 int main() {
12594 static struct ip_mreq x;
12595 ; return 0; }
12596 EOF
12597 if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12598   rm -rf conftest*
12599   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12600     Defining HAVE_MULTICAST
12601 EOF
12602 cat >> confdefs.h <<\EOF
12603 #define HAVE_MULTICAST 1
12604 EOF
12605 }
12606
12607 else
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   echo "$ac_t""no" 1>&6
12612 fi
12613 rm -f conftest*
12614 else
12615   echo "$ac_t""no" 1>&6
12616 fi
12617
12618 else
12619   echo "$ac_t""no" 1>&6
12620 fi
12621
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625
12626
12627 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12628 echo "configure:12629: checking for msgget" >&5
12629
12630 cat > conftest.$ac_ext <<EOF
12631 #line 12632 "configure"
12632 #include "confdefs.h"
12633 /* System header to define __stub macros and hopefully few prototypes,
12634     which can conflict with char msgget(); below.  */
12635 #include <assert.h>
12636 /* Override any gcc2 internal prototype to avoid an error.  */
12637 /* We use char because int might match the return type of a gcc2
12638     builtin and then its argument prototype would still apply.  */
12639 char msgget();
12640
12641 int main() {
12642
12643 /* The GNU C library defines this for functions which it implements
12644     to always fail with ENOSYS.  Some functions are actually named
12645     something starting with __ and the normal name is an alias.  */
12646 #if defined (__stub_msgget) || defined (__stub___msgget)
12647 choke me
12648 #else
12649 msgget();
12650 #endif
12651
12652 ; return 0; }
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12655   rm -rf conftest*
12656   eval "ac_cv_func_msgget=yes"
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   eval "ac_cv_func_msgget=no"
12662 fi
12663 rm -f conftest*
12664
12665 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12666   echo "$ac_t""yes" 1>&6
12667   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12668 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12669 echo "configure:12670: checking for sys/ipc.h" >&5
12670
12671 cat > conftest.$ac_ext <<EOF
12672 #line 12673 "configure"
12673 #include "confdefs.h"
12674 #include <sys/ipc.h>
12675 EOF
12676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12677 { (eval echo configure:12678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12679 if test -z "$ac_err"; then
12680   rm -rf conftest*
12681   eval "ac_cv_header_$ac_safe=yes"
12682 else
12683   echo "$ac_err" >&5
12684   echo "configure: failed program was:" >&5
12685   cat conftest.$ac_ext >&5
12686   rm -rf conftest*
12687   eval "ac_cv_header_$ac_safe=no"
12688 fi
12689 rm -f conftest*
12690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12691   echo "$ac_t""yes" 1>&6
12692   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12693 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12694 echo "configure:12695: checking for sys/msg.h" >&5
12695
12696 cat > conftest.$ac_ext <<EOF
12697 #line 12698 "configure"
12698 #include "confdefs.h"
12699 #include <sys/msg.h>
12700 EOF
12701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12702 { (eval echo configure:12703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12704 if test -z "$ac_err"; then
12705   rm -rf conftest*
12706   eval "ac_cv_header_$ac_safe=yes"
12707 else
12708   echo "$ac_err" >&5
12709   echo "configure: failed program was:" >&5
12710   cat conftest.$ac_ext >&5
12711   rm -rf conftest*
12712   eval "ac_cv_header_$ac_safe=no"
12713 fi
12714 rm -f conftest*
12715 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12716   echo "$ac_t""yes" 1>&6
12717   { test "$extra_verbose" = "yes" && cat << \EOF
12718     Defining HAVE_SYSVIPC
12719 EOF
12720 cat >> confdefs.h <<\EOF
12721 #define HAVE_SYSVIPC 1
12722 EOF
12723 }
12724
12725 else
12726   echo "$ac_t""no" 1>&6
12727 fi
12728
12729 else
12730   echo "$ac_t""no" 1>&6
12731 fi
12732
12733 else
12734   echo "$ac_t""no" 1>&6
12735 fi
12736
12737
12738 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12739 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12740 echo "configure:12741: checking for dirent.h" >&5
12741
12742 cat > conftest.$ac_ext <<EOF
12743 #line 12744 "configure"
12744 #include "confdefs.h"
12745 #include <dirent.h>
12746 EOF
12747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12748 { (eval echo configure:12749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12750 if test -z "$ac_err"; then
12751   rm -rf conftest*
12752   eval "ac_cv_header_$ac_safe=yes"
12753 else
12754   echo "$ac_err" >&5
12755   echo "configure: failed program was:" >&5
12756   cat conftest.$ac_ext >&5
12757   rm -rf conftest*
12758   eval "ac_cv_header_$ac_safe=no"
12759 fi
12760 rm -f conftest*
12761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12762   echo "$ac_t""yes" 1>&6
12763   { test "$extra_verbose" = "yes" && cat << \EOF
12764     Defining SYSV_SYSTEM_DIR
12765 EOF
12766 cat >> confdefs.h <<\EOF
12767 #define SYSV_SYSTEM_DIR 1
12768 EOF
12769 }
12770
12771 else
12772   echo "$ac_t""no" 1>&6
12773 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12774 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12775 echo "configure:12776: checking for sys/dir.h" >&5
12776
12777 cat > conftest.$ac_ext <<EOF
12778 #line 12779 "configure"
12779 #include "confdefs.h"
12780 #include <sys/dir.h>
12781 EOF
12782 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12783 { (eval echo configure:12784: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12784 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12785 if test -z "$ac_err"; then
12786   rm -rf conftest*
12787   eval "ac_cv_header_$ac_safe=yes"
12788 else
12789   echo "$ac_err" >&5
12790   echo "configure: failed program was:" >&5
12791   cat conftest.$ac_ext >&5
12792   rm -rf conftest*
12793   eval "ac_cv_header_$ac_safe=no"
12794 fi
12795 rm -f conftest*
12796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12797   echo "$ac_t""yes" 1>&6
12798   :
12799 else
12800   echo "$ac_t""no" 1>&6
12801 { test "$extra_verbose" = "yes" && cat << \EOF
12802     Defining NONSYSTEM_DIR_LIBRARY
12803 EOF
12804 cat >> confdefs.h <<\EOF
12805 #define NONSYSTEM_DIR_LIBRARY 1
12806 EOF
12807 }
12808
12809 fi
12810
12811 fi
12812
12813
12814 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12815 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12816 echo "configure:12817: checking for nlist.h" >&5
12817
12818 cat > conftest.$ac_ext <<EOF
12819 #line 12820 "configure"
12820 #include "confdefs.h"
12821 #include <nlist.h>
12822 EOF
12823 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12824 { (eval echo configure:12825: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12825 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12826 if test -z "$ac_err"; then
12827   rm -rf conftest*
12828   eval "ac_cv_header_$ac_safe=yes"
12829 else
12830   echo "$ac_err" >&5
12831   echo "configure: failed program was:" >&5
12832   cat conftest.$ac_ext >&5
12833   rm -rf conftest*
12834   eval "ac_cv_header_$ac_safe=no"
12835 fi
12836 rm -f conftest*
12837 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12838   echo "$ac_t""yes" 1>&6
12839   { test "$extra_verbose" = "yes" && cat << \EOF
12840     Defining NLIST_STRUCT
12841 EOF
12842 cat >> confdefs.h <<\EOF
12843 #define NLIST_STRUCT 1
12844 EOF
12845 }
12846
12847 else
12848   echo "$ac_t""no" 1>&6
12849 fi
12850
12851
12852
12853 echo "checking "for sound support"" 1>&6
12854 echo "configure:12855: checking "for sound support"" >&5
12855 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12856
12857 if test "$with_native_sound" != "no"; then
12858     if test -n "$native_sound_lib"; then
12859     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12860 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12861 echo "configure:12862: checking for multimedia/audio_device.h" >&5
12862
12863 cat > conftest.$ac_ext <<EOF
12864 #line 12865 "configure"
12865 #include "confdefs.h"
12866 #include <multimedia/audio_device.h>
12867 EOF
12868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12869 { (eval echo configure:12870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12871 if test -z "$ac_err"; then
12872   rm -rf conftest*
12873   eval "ac_cv_header_$ac_safe=yes"
12874 else
12875   echo "$ac_err" >&5
12876   echo "configure: failed program was:" >&5
12877   cat conftest.$ac_ext >&5
12878   rm -rf conftest*
12879   eval "ac_cv_header_$ac_safe=no"
12880 fi
12881 rm -f conftest*
12882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12883   echo "$ac_t""yes" 1>&6
12884   sound_found=yes sound_cflags=""
12885       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12886    echo "    xemacs will be linked with \"sunplay.o\""
12887  fi
12888 else
12889   echo "$ac_t""no" 1>&6
12890 fi
12891
12892   fi
12893
12894     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12895     sound_found=yes
12896     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12897    echo "    xemacs will be linked with \"sunplay.o\""
12898  fi
12899     if test -d "/usr/demo/SOUND/include"
12900       then sound_cflags="-I/usr/demo/SOUND/include"
12901       else sound_cflags="-I/usr/demo/SOUND"
12902     fi
12903     if test -z "$native_sound_lib" ; then
12904       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12905         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12906         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12907       fi
12908     fi
12909   fi
12910
12911     if test -z "$sound_found"; then
12912     case "$canonical" in
12913     *-sgi-* )
12914       if test -z "$native_sound_lib"; then
12915         
12916 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12917 echo "configure:12918: checking for ALopenport in -laudio" >&5
12918 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12919
12920 xe_check_libs=" -laudio "
12921 cat > conftest.$ac_ext <<EOF
12922 #line 12923 "configure"
12923 #include "confdefs.h"
12924 /* Override any gcc2 internal prototype to avoid an error.  */
12925 /* We use char because int might match the return type of a gcc2
12926     builtin and then its argument prototype would still apply.  */
12927 char ALopenport();
12928
12929 int main() {
12930 ALopenport()
12931 ; return 0; }
12932 EOF
12933 if { (eval echo configure:12934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12934   rm -rf conftest*
12935   eval "ac_cv_lib_$ac_lib_var=yes"
12936 else
12937   echo "configure: failed program was:" >&5
12938   cat conftest.$ac_ext >&5
12939   rm -rf conftest*
12940   eval "ac_cv_lib_$ac_lib_var=no"
12941 fi
12942 rm -f conftest*
12943 xe_check_libs=""
12944
12945 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12946   echo "$ac_t""yes" 1>&6
12947   native_sound_lib="-laudio"
12948 else
12949   echo "$ac_t""no" 1>&6
12950 fi
12951
12952
12953       fi
12954       if test -n "$native_sound_lib"; then
12955         sound_found=yes sound_cflags=""
12956         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12957    echo "    xemacs will be linked with \"sgiplay.o\""
12958  fi
12959       fi ;;
12960     hppa*-hp-hpux* )
12961       if test -z "$native_sound_lib"; then
12962         
12963 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12964 echo "configure:12965: checking for AOpenAudio in -lAlib" >&5
12965 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12966
12967 xe_check_libs=" -lAlib "
12968 cat > conftest.$ac_ext <<EOF
12969 #line 12970 "configure"
12970 #include "confdefs.h"
12971 /* Override any gcc2 internal prototype to avoid an error.  */
12972 /* We use char because int might match the return type of a gcc2
12973     builtin and then its argument prototype would still apply.  */
12974 char AOpenAudio();
12975
12976 int main() {
12977 AOpenAudio()
12978 ; return 0; }
12979 EOF
12980 if { (eval echo configure:12981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12981   rm -rf conftest*
12982   eval "ac_cv_lib_$ac_lib_var=yes"
12983 else
12984   echo "configure: failed program was:" >&5
12985   cat conftest.$ac_ext >&5
12986   rm -rf conftest*
12987   eval "ac_cv_lib_$ac_lib_var=no"
12988 fi
12989 rm -f conftest*
12990 xe_check_libs=""
12991
12992 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12993   echo "$ac_t""yes" 1>&6
12994   native_sound_lib="-lAlib"
12995 else
12996   echo "$ac_t""no" 1>&6
12997 fi
12998
12999
13000       fi
13001       if test -n "$native_sound_lib"; then
13002         sound_found=yes
13003         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13004    echo "    xemacs will be linked with \"hpplay.o\""
13005  fi
13006         if test "$GCC" = "yes" # Kludge city
13007           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13008           else sound_cflags="+e -I/usr/audio/examples"
13009         fi
13010       fi ;;
13011     esac
13012   fi
13013
13014     if test -z "$sound_found"; then
13015     for dir in "machine" "sys" "linux"; do
13016       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13017 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13018 echo "configure:13019: checking for ${dir}/soundcard.h" >&5
13019
13020 cat > conftest.$ac_ext <<EOF
13021 #line 13022 "configure"
13022 #include "confdefs.h"
13023 #include <${dir}/soundcard.h>
13024 EOF
13025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13026 { (eval echo configure:13027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13028 if test -z "$ac_err"; then
13029   rm -rf conftest*
13030   eval "ac_cv_header_$ac_safe=yes"
13031 else
13032   echo "$ac_err" >&5
13033   echo "configure: failed program was:" >&5
13034   cat conftest.$ac_ext >&5
13035   rm -rf conftest*
13036   eval "ac_cv_header_$ac_safe=no"
13037 fi
13038 rm -f conftest*
13039 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13040   echo "$ac_t""yes" 1>&6
13041   sound_found=yes
13042        need_miscplay=yes
13043         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13044    echo "    xemacs will be linked with \"linuxplay.o\""
13045  fi
13046         { test "$extra_verbose" = "yes" && cat << EOF
13047     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13048 EOF
13049 cat >> confdefs.h <<EOF
13050 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13051 EOF
13052 }
13053
13054         break
13055 else
13056   echo "$ac_t""no" 1>&6
13057 fi
13058
13059     done
13060   fi
13061
13062     if test -z "$sound_found"; then
13063     if test "$with_msw" = "yes"; then
13064     sound_found=yes
13065     native_sound_lib=
13066     fi
13067   fi
13068
13069   test "$sound_found" = "yes" && with_native_sound=yes
13070 fi
13071
13072 if test "$with_native_sound" = "yes"; then
13073   { test "$extra_verbose" = "yes" && cat << \EOF
13074     Defining HAVE_NATIVE_SOUND
13075 EOF
13076 cat >> confdefs.h <<\EOF
13077 #define HAVE_NATIVE_SOUND 1
13078 EOF
13079 }
13080
13081   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13082 fi
13083
13084 if test "$with_nas_sound" != "no"; then
13085   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13086 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13087 echo "configure:13088: checking for audio/audiolib.h" >&5
13088
13089 cat > conftest.$ac_ext <<EOF
13090 #line 13091 "configure"
13091 #include "confdefs.h"
13092 #include <audio/audiolib.h>
13093 EOF
13094 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13095 { (eval echo configure:13096: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13096 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13097 if test -z "$ac_err"; then
13098   rm -rf conftest*
13099   eval "ac_cv_header_$ac_safe=yes"
13100 else
13101   echo "$ac_err" >&5
13102   echo "configure: failed program was:" >&5
13103   cat conftest.$ac_ext >&5
13104   rm -rf conftest*
13105   eval "ac_cv_header_$ac_safe=no"
13106 fi
13107 rm -f conftest*
13108 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13109   echo "$ac_t""yes" 1>&6
13110   
13111     
13112 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13113 echo "configure:13114: checking for AuOpenServer in -laudio" >&5
13114 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13115
13116 xe_check_libs=" -laudio "
13117 cat > conftest.$ac_ext <<EOF
13118 #line 13119 "configure"
13119 #include "confdefs.h"
13120 /* Override any gcc2 internal prototype to avoid an error.  */
13121 /* We use char because int might match the return type of a gcc2
13122     builtin and then its argument prototype would still apply.  */
13123 char AuOpenServer();
13124
13125 int main() {
13126 AuOpenServer()
13127 ; return 0; }
13128 EOF
13129 if { (eval echo configure:13130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13130   rm -rf conftest*
13131   eval "ac_cv_lib_$ac_lib_var=yes"
13132 else
13133   echo "configure: failed program was:" >&5
13134   cat conftest.$ac_ext >&5
13135   rm -rf conftest*
13136   eval "ac_cv_lib_$ac_lib_var=no"
13137 fi
13138 rm -f conftest*
13139 xe_check_libs=""
13140
13141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13142   echo "$ac_t""yes" 1>&6
13143   have_nas_sound=yes
13144 else
13145   echo "$ac_t""no" 1>&6
13146 fi
13147
13148
13149 else
13150   echo "$ac_t""no" 1>&6
13151 fi
13152
13153   if test "$have_nas_sound" = "yes"; then
13154     with_nas_sound=yes
13155     { test "$extra_verbose" = "yes" && cat << \EOF
13156     Defining HAVE_NAS_SOUND
13157 EOF
13158 cat >> confdefs.h <<\EOF
13159 #define HAVE_NAS_SOUND 1
13160 EOF
13161 }
13162
13163     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13164    echo "    xemacs will be linked with \"nas.o\""
13165  fi
13166     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13167             cat > conftest.$ac_ext <<EOF
13168 #line 13169 "configure"
13169 #include "confdefs.h"
13170 #include <audio/Xtutil.h>
13171 EOF
13172 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13173   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13174   :
13175 else
13176   rm -rf conftest*
13177   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13178     Defining NAS_NO_ERROR_JUMP
13179 EOF
13180 cat >> confdefs.h <<\EOF
13181 #define NAS_NO_ERROR_JUMP 1
13182 EOF
13183 }
13184
13185 fi
13186 rm -f conftest*
13187
13188   else
13189     test "$with_nas_sound" = "yes" && \
13190       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13191     with_nas_sound=no
13192   fi
13193 fi
13194
13195 if test "$with_esd_sound" != "no"; then
13196   # Extract the first word of "esd-config", so it can be a program name with args.
13197 set dummy esd-config; ac_word=$2
13198 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13199 echo "configure:13200: checking for $ac_word" >&5
13200
13201 if test -n "$have_esd_config"; then
13202   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13203 else
13204   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13205   ac_dummy="$PATH"
13206   for ac_dir in $ac_dummy; do
13207     test -z "$ac_dir" && ac_dir=.
13208     if test -f $ac_dir/$ac_word; then
13209       ac_cv_prog_have_esd_config="yes"
13210       break
13211     fi
13212   done
13213   IFS="$ac_save_ifs"
13214   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13215 fi
13216 have_esd_config="$ac_cv_prog_have_esd_config"
13217 if test -n "$have_esd_config"; then
13218   echo "$ac_t""$have_esd_config" 1>&6
13219 else
13220   echo "$ac_t""no" 1>&6
13221 fi
13222
13223   if test "$have_esd_config" = "yes"; then
13224     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13225     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
13226     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13227     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13228 echo "configure:13229: checking for esd_play_stream" >&5
13229
13230 cat > conftest.$ac_ext <<EOF
13231 #line 13232 "configure"
13232 #include "confdefs.h"
13233 /* System header to define __stub macros and hopefully few prototypes,
13234     which can conflict with char esd_play_stream(); below.  */
13235 #include <assert.h>
13236 /* Override any gcc2 internal prototype to avoid an error.  */
13237 /* We use char because int might match the return type of a gcc2
13238     builtin and then its argument prototype would still apply.  */
13239 char esd_play_stream();
13240
13241 int main() {
13242
13243 /* The GNU C library defines this for functions which it implements
13244     to always fail with ENOSYS.  Some functions are actually named
13245     something starting with __ and the normal name is an alias.  */
13246 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13247 choke me
13248 #else
13249 esd_play_stream();
13250 #endif
13251
13252 ; return 0; }
13253 EOF
13254 if { (eval echo configure:13255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13255   rm -rf conftest*
13256   eval "ac_cv_func_esd_play_stream=yes"
13257 else
13258   echo "configure: failed program was:" >&5
13259   cat conftest.$ac_ext >&5
13260   rm -rf conftest*
13261   eval "ac_cv_func_esd_play_stream=no"
13262 fi
13263 rm -f conftest*
13264
13265 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13266   echo "$ac_t""yes" 1>&6
13267   have_esd_sound=yes
13268 else
13269   echo "$ac_t""no" 1>&6
13270 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13271 fi
13272
13273   fi
13274
13275   if test "$have_esd_sound" = "yes"; then
13276     with_esd_sound=yes
13277     need_miscplay=yes
13278     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13279    echo "    xemacs will be linked with \"esd.o\""
13280  fi
13281     { test "$extra_verbose" = "yes" && cat << \EOF
13282     Defining HAVE_ESD_SOUND
13283 EOF
13284 cat >> confdefs.h <<\EOF
13285 #define HAVE_ESD_SOUND 1
13286 EOF
13287 }
13288
13289   else
13290     test "$with_esd_sound" = "yes" && \
13291       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13292     with_esd_sound=no
13293   fi
13294 fi
13295
13296 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13297    echo "    xemacs will be linked with \"miscplay.o\""
13298  fi
13299
13300
13301 test -z "$with_tty" && with_tty=yes
13302
13303 if test "$with_tty" = "yes"  ; then
13304   echo "checking for TTY-related features" 1>&6
13305 echo "configure:13306: checking for TTY-related features" >&5
13306   { test "$extra_verbose" = "yes" && cat << \EOF
13307     Defining HAVE_TTY
13308 EOF
13309 cat >> confdefs.h <<\EOF
13310 #define HAVE_TTY 1
13311 EOF
13312 }
13313
13314   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
13315    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\""
13316  fi
13317
13318     if test -z "$with_ncurses"; then
13319     
13320 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13321 echo "configure:13322: checking for tgetent in -lncurses" >&5
13322 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13323
13324 xe_check_libs=" -lncurses "
13325 cat > conftest.$ac_ext <<EOF
13326 #line 13327 "configure"
13327 #include "confdefs.h"
13328 /* Override any gcc2 internal prototype to avoid an error.  */
13329 /* We use char because int might match the return type of a gcc2
13330     builtin and then its argument prototype would still apply.  */
13331 char tgetent();
13332
13333 int main() {
13334 tgetent()
13335 ; return 0; }
13336 EOF
13337 if { (eval echo configure:13338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13338   rm -rf conftest*
13339   eval "ac_cv_lib_$ac_lib_var=yes"
13340 else
13341   echo "configure: failed program was:" >&5
13342   cat conftest.$ac_ext >&5
13343   rm -rf conftest*
13344   eval "ac_cv_lib_$ac_lib_var=no"
13345 fi
13346 rm -f conftest*
13347 xe_check_libs=""
13348
13349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13350   echo "$ac_t""yes" 1>&6
13351   with_ncurses=yes
13352 else
13353   echo "$ac_t""no" 1>&6
13354 with_ncurses=no
13355 fi
13356
13357
13358   fi
13359   if test "$with_ncurses" = "yes"; then
13360     { test "$extra_verbose" = "yes" && cat << \EOF
13361     Defining HAVE_NCURSES
13362 EOF
13363 cat >> confdefs.h <<\EOF
13364 #define HAVE_NCURSES 1
13365 EOF
13366 }
13367
13368     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13369 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13370 echo "configure:13371: checking for ncurses/curses.h" >&5
13371
13372 cat > conftest.$ac_ext <<EOF
13373 #line 13374 "configure"
13374 #include "confdefs.h"
13375 #include <ncurses/curses.h>
13376 EOF
13377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13378 { (eval echo configure:13379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13380 if test -z "$ac_err"; then
13381   rm -rf conftest*
13382   eval "ac_cv_header_$ac_safe=yes"
13383 else
13384   echo "$ac_err" >&5
13385   echo "configure: failed program was:" >&5
13386   cat conftest.$ac_ext >&5
13387   rm -rf conftest*
13388   eval "ac_cv_header_$ac_safe=no"
13389 fi
13390 rm -f conftest*
13391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13392   echo "$ac_t""yes" 1>&6
13393   curses_h_file=ncurses/curses.h
13394 else
13395   echo "$ac_t""no" 1>&6
13396 fi
13397
13398     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13399 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13400 echo "configure:13401: checking for ncurses/term.h" >&5
13401
13402 cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 #include <ncurses/term.h>
13406 EOF
13407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13408 { (eval echo configure:13409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13410 if test -z "$ac_err"; then
13411   rm -rf conftest*
13412   eval "ac_cv_header_$ac_safe=yes"
13413 else
13414   echo "$ac_err" >&5
13415   echo "configure: failed program was:" >&5
13416   cat conftest.$ac_ext >&5
13417   rm -rf conftest*
13418   eval "ac_cv_header_$ac_safe=no"
13419 fi
13420 rm -f conftest*
13421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13422   echo "$ac_t""yes" 1>&6
13423   term_h_file=ncurses/term.h
13424 else
13425   echo "$ac_t""no" 1>&6
13426 fi
13427
13428     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13429    echo "    xemacs will be linked with \"terminfo.o\""
13430  fi
13431     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13432
13433     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13434                         save_c_switch_site="$c_switch_site"
13435       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13436       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13437 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13438 echo "configure:13439: checking for ncurses/curses.h" >&5
13439
13440 cat > conftest.$ac_ext <<EOF
13441 #line 13442 "configure"
13442 #include "confdefs.h"
13443 #include <ncurses/curses.h>
13444 EOF
13445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13446 { (eval echo configure:13447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13448 if test -z "$ac_err"; then
13449   rm -rf conftest*
13450   eval "ac_cv_header_$ac_safe=yes"
13451 else
13452   echo "$ac_err" >&5
13453   echo "configure: failed program was:" >&5
13454   cat conftest.$ac_ext >&5
13455   rm -rf conftest*
13456   eval "ac_cv_header_$ac_safe=no"
13457 fi
13458 rm -f conftest*
13459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13460   echo "$ac_t""yes" 1>&6
13461   curses_h_file=ncurses/curses.h
13462 else
13463   echo "$ac_t""no" 1>&6
13464 fi
13465
13466       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13467         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13468         else c_switch_site="$save_c_switch_site"
13469       fi
13470     fi
13471   else         if test "$have_terminfo" = "yes"; then
13472       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13473    echo "    xemacs will be linked with \"terminfo.o\""
13474  fi
13475       if test -n "$libs_termcap"; then
13476         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13477       else
13478         for lib in curses termlib termcap; do
13479           
13480 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13481 echo "configure:13482: checking for tgetent in -l$lib" >&5
13482 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13483
13484 xe_check_libs=" -l$lib "
13485 cat > conftest.$ac_ext <<EOF
13486 #line 13487 "configure"
13487 #include "confdefs.h"
13488 /* Override any gcc2 internal prototype to avoid an error.  */
13489 /* We use char because int might match the return type of a gcc2
13490     builtin and then its argument prototype would still apply.  */
13491 char tgetent();
13492
13493 int main() {
13494 tgetent()
13495 ; return 0; }
13496 EOF
13497 if { (eval echo configure:13498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13498   rm -rf conftest*
13499   eval "ac_cv_lib_$ac_lib_var=yes"
13500 else
13501   echo "configure: failed program was:" >&5
13502   cat conftest.$ac_ext >&5
13503   rm -rf conftest*
13504   eval "ac_cv_lib_$ac_lib_var=no"
13505 fi
13506 rm -f conftest*
13507 xe_check_libs=""
13508
13509 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13510   echo "$ac_t""yes" 1>&6
13511   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13512 else
13513   echo "$ac_t""no" 1>&6
13514 fi
13515
13516
13517         done
13518       fi
13519     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13520    echo "    xemacs will be linked with \"tparam.o\""
13521  fi
13522                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13523       if test -n "$libs_termcap"; then
13524         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13525       else
13526         
13527 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13528 echo "configure:13529: checking for tgetent in -lcurses" >&5
13529 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13530
13531 xe_check_libs=" -lcurses "
13532 cat > conftest.$ac_ext <<EOF
13533 #line 13534 "configure"
13534 #include "confdefs.h"
13535 /* Override any gcc2 internal prototype to avoid an error.  */
13536 /* We use char because int might match the return type of a gcc2
13537     builtin and then its argument prototype would still apply.  */
13538 char tgetent();
13539
13540 int main() {
13541 tgetent()
13542 ; return 0; }
13543 EOF
13544 if { (eval echo configure:13545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13545   rm -rf conftest*
13546   eval "ac_cv_lib_$ac_lib_var=yes"
13547 else
13548   echo "configure: failed program was:" >&5
13549   cat conftest.$ac_ext >&5
13550   rm -rf conftest*
13551   eval "ac_cv_lib_$ac_lib_var=no"
13552 fi
13553 rm -f conftest*
13554 xe_check_libs=""
13555
13556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13557   echo "$ac_t""yes" 1>&6
13558   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13559 else
13560   echo "$ac_t""no" 1>&6
13561 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13562 echo "configure:13563: checking for tgetent in -ltermcap" >&5
13563 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13564
13565 xe_check_libs=" -ltermcap "
13566 cat > conftest.$ac_ext <<EOF
13567 #line 13568 "configure"
13568 #include "confdefs.h"
13569 /* Override any gcc2 internal prototype to avoid an error.  */
13570 /* We use char because int might match the return type of a gcc2
13571     builtin and then its argument prototype would still apply.  */
13572 char tgetent();
13573
13574 int main() {
13575 tgetent()
13576 ; return 0; }
13577 EOF
13578 if { (eval echo configure:13579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13579   rm -rf conftest*
13580   eval "ac_cv_lib_$ac_lib_var=yes"
13581 else
13582   echo "configure: failed program was:" >&5
13583   cat conftest.$ac_ext >&5
13584   rm -rf conftest*
13585   eval "ac_cv_lib_$ac_lib_var=no"
13586 fi
13587 rm -f conftest*
13588 xe_check_libs=""
13589
13590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13591   echo "$ac_t""yes" 1>&6
13592   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13593 else
13594   echo "$ac_t""no" 1>&6
13595 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13596    echo "    xemacs will be linked with \"termcap.o\""
13597  fi
13598 fi
13599
13600
13601 fi
13602
13603
13604       fi
13605     fi
13606   fi
13607   { test "$extra_verbose" = "yes" && cat << EOF
13608     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13609 EOF
13610 cat >> confdefs.h <<EOF
13611 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13612 EOF
13613 }
13614
13615   { test "$extra_verbose" = "yes" && cat << EOF
13616     Defining TERM_H_FILE = "${term_h_file-term.h}"
13617 EOF
13618 cat >> confdefs.h <<EOF
13619 #define TERM_H_FILE "${term_h_file-term.h}"
13620 EOF
13621 }
13622
13623
13624     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13625 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13626 echo "configure:13627: checking for gpm.h" >&5
13627
13628 cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 #include <gpm.h>
13632 EOF
13633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13634 { (eval echo configure:13635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13636 if test -z "$ac_err"; then
13637   rm -rf conftest*
13638   eval "ac_cv_header_$ac_safe=yes"
13639 else
13640   echo "$ac_err" >&5
13641   echo "configure: failed program was:" >&5
13642   cat conftest.$ac_ext >&5
13643   rm -rf conftest*
13644   eval "ac_cv_header_$ac_safe=no"
13645 fi
13646 rm -f conftest*
13647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13648   echo "$ac_t""yes" 1>&6
13649   :
13650 else
13651   echo "$ac_t""no" 1>&6
13652 with_gpm=no
13653 fi
13654  }
13655   test -z "$with_gpm" && { 
13656 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13657 echo "configure:13658: checking for Gpm_Open in -lgpm" >&5
13658 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13659
13660 xe_check_libs=" -lgpm "
13661 cat > conftest.$ac_ext <<EOF
13662 #line 13663 "configure"
13663 #include "confdefs.h"
13664 /* Override any gcc2 internal prototype to avoid an error.  */
13665 /* We use char because int might match the return type of a gcc2
13666     builtin and then its argument prototype would still apply.  */
13667 char Gpm_Open();
13668
13669 int main() {
13670 Gpm_Open()
13671 ; return 0; }
13672 EOF
13673 if { (eval echo configure:13674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13674   rm -rf conftest*
13675   eval "ac_cv_lib_$ac_lib_var=yes"
13676 else
13677   echo "configure: failed program was:" >&5
13678   cat conftest.$ac_ext >&5
13679   rm -rf conftest*
13680   eval "ac_cv_lib_$ac_lib_var=no"
13681 fi
13682 rm -f conftest*
13683 xe_check_libs=""
13684
13685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13686   echo "$ac_t""yes" 1>&6
13687   with_gpm=yes
13688 else
13689   echo "$ac_t""no" 1>&6
13690 with_gpm=no
13691 fi
13692
13693  }
13694   if test "$with_gpm" = "yes"; then
13695     { test "$extra_verbose" = "yes" && cat << \EOF
13696     Defining HAVE_GPM
13697 EOF
13698 cat >> confdefs.h <<\EOF
13699 #define HAVE_GPM 1
13700 EOF
13701 }
13702
13703     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13704    echo "    xemacs will be linked with \"gpmevent.o\""
13705  fi
13706     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13707   fi
13708
13709 else   for feature in ncurses gpm; do
13710     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13711       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13712     fi
13713     eval "with_${feature}=no"
13714   done
13715 fi 
13716 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13717    echo "    xemacs will be linked with \"event-unixoid.o\""
13718  fi
13719
13720
13721 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13722   != "no no no" && echo "checking for database support" 1>&6
13723 echo "configure:13724: checking for database support" >&5
13724
13725 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13726   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13727 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13728 echo "configure:13729: checking for ndbm.h" >&5
13729
13730 cat > conftest.$ac_ext <<EOF
13731 #line 13732 "configure"
13732 #include "confdefs.h"
13733 #include <ndbm.h>
13734 EOF
13735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13736 { (eval echo configure:13737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13738 if test -z "$ac_err"; then
13739   rm -rf conftest*
13740   eval "ac_cv_header_$ac_safe=yes"
13741 else
13742   echo "$ac_err" >&5
13743   echo "configure: failed program was:" >&5
13744   cat conftest.$ac_ext >&5
13745   rm -rf conftest*
13746   eval "ac_cv_header_$ac_safe=no"
13747 fi
13748 rm -f conftest*
13749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13750   echo "$ac_t""yes" 1>&6
13751   :
13752 else
13753   echo "$ac_t""no" 1>&6
13754
13755     test "$with_database_gdbm" = "yes" -o \
13756          "$with_database_dbm"  = "yes" && \
13757       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13758     with_database_gdbm=no with_database_dbm=no
13759 fi
13760
13761 fi
13762
13763 if test "$with_database_gdbm" != "no"; then
13764   
13765 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13766 echo "configure:13767: checking for dbm_open in -lgdbm" >&5
13767 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13768
13769 xe_check_libs=" -lgdbm "
13770 cat > conftest.$ac_ext <<EOF
13771 #line 13772 "configure"
13772 #include "confdefs.h"
13773 /* Override any gcc2 internal prototype to avoid an error.  */
13774 /* We use char because int might match the return type of a gcc2
13775     builtin and then its argument prototype would still apply.  */
13776 char dbm_open();
13777
13778 int main() {
13779 dbm_open()
13780 ; return 0; }
13781 EOF
13782 if { (eval echo configure:13783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13783   rm -rf conftest*
13784   eval "ac_cv_lib_$ac_lib_var=yes"
13785 else
13786   echo "configure: failed program was:" >&5
13787   cat conftest.$ac_ext >&5
13788   rm -rf conftest*
13789   eval "ac_cv_lib_$ac_lib_var=no"
13790 fi
13791 rm -f conftest*
13792 xe_check_libs=""
13793
13794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13795   echo "$ac_t""yes" 1>&6
13796   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13797 else
13798   echo "$ac_t""no" 1>&6
13799 if test "$with_database_gdbm" = "yes"; then
13800      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13801    fi
13802    with_database_gdbm=no
13803 fi
13804
13805
13806 fi
13807
13808 if test "$with_database_dbm" != "no"; then
13809   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13810 echo "configure:13811: checking for dbm_open" >&5
13811
13812 cat > conftest.$ac_ext <<EOF
13813 #line 13814 "configure"
13814 #include "confdefs.h"
13815 /* System header to define __stub macros and hopefully few prototypes,
13816     which can conflict with char dbm_open(); below.  */
13817 #include <assert.h>
13818 /* Override any gcc2 internal prototype to avoid an error.  */
13819 /* We use char because int might match the return type of a gcc2
13820     builtin and then its argument prototype would still apply.  */
13821 char dbm_open();
13822
13823 int main() {
13824
13825 /* The GNU C library defines this for functions which it implements
13826     to always fail with ENOSYS.  Some functions are actually named
13827     something starting with __ and the normal name is an alias.  */
13828 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13829 choke me
13830 #else
13831 dbm_open();
13832 #endif
13833
13834 ; return 0; }
13835 EOF
13836 if { (eval echo configure:13837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13837   rm -rf conftest*
13838   eval "ac_cv_func_dbm_open=yes"
13839 else
13840   echo "configure: failed program was:" >&5
13841   cat conftest.$ac_ext >&5
13842   rm -rf conftest*
13843   eval "ac_cv_func_dbm_open=no"
13844 fi
13845 rm -f conftest*
13846
13847 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13848   echo "$ac_t""yes" 1>&6
13849   with_database_dbm=yes libdbm=
13850 else
13851   echo "$ac_t""no" 1>&6
13852
13853     
13854 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13855 echo "configure:13856: checking for dbm_open in -ldbm" >&5
13856 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13857
13858 xe_check_libs=" -ldbm "
13859 cat > conftest.$ac_ext <<EOF
13860 #line 13861 "configure"
13861 #include "confdefs.h"
13862 /* Override any gcc2 internal prototype to avoid an error.  */
13863 /* We use char because int might match the return type of a gcc2
13864     builtin and then its argument prototype would still apply.  */
13865 char dbm_open();
13866
13867 int main() {
13868 dbm_open()
13869 ; return 0; }
13870 EOF
13871 if { (eval echo configure:13872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13872   rm -rf conftest*
13873   eval "ac_cv_lib_$ac_lib_var=yes"
13874 else
13875   echo "configure: failed program was:" >&5
13876   cat conftest.$ac_ext >&5
13877   rm -rf conftest*
13878   eval "ac_cv_lib_$ac_lib_var=no"
13879 fi
13880 rm -f conftest*
13881 xe_check_libs=""
13882
13883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13884   echo "$ac_t""yes" 1>&6
13885   with_database_dbm=yes libdbm=-ldbm
13886 else
13887   echo "$ac_t""no" 1>&6
13888 test "$with_database_dbm" = "yes" && \
13889         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13890       with_database_dbm=no
13891 fi
13892
13893
13894 fi
13895
13896 fi
13897
13898 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13899 test "$with_database_gdbm" = "yes" -o \
13900      "$with_database_dbm"  = "yes" && \
13901   { test "$extra_verbose" = "yes" && cat << \EOF
13902     Defining HAVE_DBM
13903 EOF
13904 cat >> confdefs.h <<\EOF
13905 #define HAVE_DBM 1
13906 EOF
13907 }
13908
13909
13910 if test "$with_database_berkdb" != "no"; then
13911   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13912 echo "configure:13913: checking for Berkeley db.h" >&5
13913   for header in "db/db.h" "db.h"; do
13914     cat > conftest.$ac_ext <<EOF
13915 #line 13916 "configure"
13916 #include "confdefs.h"
13917
13918 #include <stdlib.h>
13919 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13920 #ifdef HAVE_INTTYPES_H
13921 #define __BIT_TYPES_DEFINED__
13922 #include <inttypes.h>
13923 typedef uint8_t  u_int8_t;
13924 typedef uint16_t u_int16_t;
13925 typedef uint32_t u_int32_t;
13926 #ifdef WE_DONT_NEED_QUADS
13927 typedef uint64_t u_int64_t;
13928 #endif
13929 #endif
13930 #endif
13931 #include <$header>
13932
13933 int main() {
13934
13935 ; return 0; }
13936 EOF
13937 if { (eval echo configure:13938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13938   rm -rf conftest*
13939   db_h_file="$header"; break
13940 else
13941   echo "configure: failed program was:" >&5
13942   cat conftest.$ac_ext >&5
13943 fi
13944 rm -f conftest*
13945   done
13946   if test -z "$db_h_file"
13947   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13948   else echo "$ac_t""$db_h_file" 1>&6
13949   fi
13950
13951   if test "$with_database_berkdb" != "no"; then
13952     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13953 echo "configure:13954: checking for Berkeley DB version" >&5
13954     cat > conftest.$ac_ext <<EOF
13955 #line 13956 "configure"
13956 #include "confdefs.h"
13957 #include <$db_h_file>
13958 #if DB_VERSION_MAJOR > 1
13959 yes
13960 #endif
13961
13962 EOF
13963 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13964   egrep "yes" >/dev/null 2>&1; then
13965   rm -rf conftest*
13966   cat > conftest.$ac_ext <<EOF
13967 #line 13968 "configure"
13968 #include "confdefs.h"
13969 #include <$db_h_file>
13970 #if DB_VERSION_MAJOR > 2
13971 yes
13972 #endif
13973
13974 EOF
13975 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13976   egrep "yes" >/dev/null 2>&1; then
13977   rm -rf conftest*
13978   echo "$ac_t""3" 1>&6; dbfunc=db_create
13979 else
13980   rm -rf conftest*
13981   
13982     echo "$ac_t""2" 1>&6; dbfunc=db_open
13983 fi
13984 rm -f conftest*
13985
13986 else
13987   rm -rf conftest*
13988   
13989     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13990 fi
13991 rm -f conftest*
13992
13993     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13994 echo "configure:13995: checking for $dbfunc" >&5
13995
13996 cat > conftest.$ac_ext <<EOF
13997 #line 13998 "configure"
13998 #include "confdefs.h"
13999 /* System header to define __stub macros and hopefully few prototypes,
14000     which can conflict with char $dbfunc(); below.  */
14001 #include <assert.h>
14002 /* Override any gcc2 internal prototype to avoid an error.  */
14003 /* We use char because int might match the return type of a gcc2
14004     builtin and then its argument prototype would still apply.  */
14005 char $dbfunc();
14006
14007 int main() {
14008
14009 /* The GNU C library defines this for functions which it implements
14010     to always fail with ENOSYS.  Some functions are actually named
14011     something starting with __ and the normal name is an alias.  */
14012 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14013 choke me
14014 #else
14015 $dbfunc();
14016 #endif
14017
14018 ; return 0; }
14019 EOF
14020 if { (eval echo configure:14021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14021   rm -rf conftest*
14022   eval "ac_cv_func_$dbfunc=yes"
14023 else
14024   echo "configure: failed program was:" >&5
14025   cat conftest.$ac_ext >&5
14026   rm -rf conftest*
14027   eval "ac_cv_func_$dbfunc=no"
14028 fi
14029 rm -f conftest*
14030
14031 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14032   echo "$ac_t""yes" 1>&6
14033   with_database_berkdb=yes need_libdb=no
14034 else
14035   echo "$ac_t""no" 1>&6
14036
14037     
14038 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14039 echo "configure:14040: checking for $dbfunc in -ldb" >&5
14040 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14041
14042 xe_check_libs=" -ldb "
14043 cat > conftest.$ac_ext <<EOF
14044 #line 14045 "configure"
14045 #include "confdefs.h"
14046 /* Override any gcc2 internal prototype to avoid an error.  */
14047 /* We use char because int might match the return type of a gcc2
14048     builtin and then its argument prototype would still apply.  */
14049 char $dbfunc();
14050
14051 int main() {
14052 $dbfunc()
14053 ; return 0; }
14054 EOF
14055 if { (eval echo configure:14056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14056   rm -rf conftest*
14057   eval "ac_cv_lib_$ac_lib_var=yes"
14058 else
14059   echo "configure: failed program was:" >&5
14060   cat conftest.$ac_ext >&5
14061   rm -rf conftest*
14062   eval "ac_cv_lib_$ac_lib_var=no"
14063 fi
14064 rm -f conftest*
14065 xe_check_libs=""
14066
14067 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14068   echo "$ac_t""yes" 1>&6
14069   with_database_berkdb=yes need_libdb=yes
14070 else
14071   echo "$ac_t""no" 1>&6
14072 fi
14073
14074
14075 fi
14076
14077   fi
14078
14079   if test "$with_database_berkdb" = "yes"; then
14080     { test "$extra_verbose" = "yes" && cat << EOF
14081     Defining DB_H_FILE = "$db_h_file"
14082 EOF
14083 cat >> confdefs.h <<EOF
14084 #define DB_H_FILE "$db_h_file"
14085 EOF
14086 }
14087
14088     { test "$extra_verbose" = "yes" && cat << \EOF
14089     Defining HAVE_BERKELEY_DB
14090 EOF
14091 cat >> confdefs.h <<\EOF
14092 #define HAVE_BERKELEY_DB 1
14093 EOF
14094 }
14095
14096     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14097   else with_database_berkdb=no
14098   fi
14099 fi
14100
14101 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14102      != "no no no"; then
14103   { test "$extra_verbose" = "yes" && cat << \EOF
14104     Defining HAVE_DATABASE
14105 EOF
14106 cat >> confdefs.h <<\EOF
14107 #define HAVE_DATABASE 1
14108 EOF
14109 }
14110
14111   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14112    echo "    xemacs will be linked with \"database.o\""
14113  fi
14114   if test "$with_utf_2000" = "yes"; then
14115     { test "$extra_verbose" = "yes" && cat << \EOF
14116     Defining HAVE_CHISE_CLIENT
14117 EOF
14118 cat >> confdefs.h <<\EOF
14119 #define HAVE_CHISE_CLIENT 1
14120 EOF
14121 }
14122
14123   fi
14124 fi
14125
14126 if test "$with_socks" = "yes"; then
14127   
14128 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14129 echo "configure:14130: checking for SOCKSinit in -lsocks" >&5
14130 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14131
14132 xe_check_libs=" -lsocks "
14133 cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136 /* Override any gcc2 internal prototype to avoid an error.  */
14137 /* We use char because int might match the return type of a gcc2
14138     builtin and then its argument prototype would still apply.  */
14139 char SOCKSinit();
14140
14141 int main() {
14142 SOCKSinit()
14143 ; return 0; }
14144 EOF
14145 if { (eval echo configure:14146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14146   rm -rf conftest*
14147   eval "ac_cv_lib_$ac_lib_var=yes"
14148 else
14149   echo "configure: failed program was:" >&5
14150   cat conftest.$ac_ext >&5
14151   rm -rf conftest*
14152   eval "ac_cv_lib_$ac_lib_var=no"
14153 fi
14154 rm -f conftest*
14155 xe_check_libs=""
14156
14157 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14158   echo "$ac_t""yes" 1>&6
14159     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14160     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14161   { test "$extra_verbose" = "yes" && cat << EOF
14162     Defining $ac_tr_lib
14163 EOF
14164 cat >> confdefs.h <<EOF
14165 #define $ac_tr_lib 1
14166 EOF
14167 }
14168
14169   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14170
14171 else
14172   echo "$ac_t""no" 1>&6
14173 fi
14174
14175
14176   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14177     Defining HAVE_SOCKS
14178 EOF
14179 cat >> confdefs.h <<\EOF
14180 #define HAVE_SOCKS 1
14181 EOF
14182 }
14183
14184 fi
14185
14186 if test "$usage_tracking" = "yes"; then
14187   { test "$extra_verbose" = "yes" && cat << \EOF
14188     Defining USAGE_TRACKING
14189 EOF
14190 cat >> confdefs.h <<\EOF
14191 #define USAGE_TRACKING 1
14192 EOF
14193 }
14194
14195   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14196 fi
14197
14198 if test "$with_modules" != "no"; then
14199   echo "checking for module support" 1>&6
14200 echo "configure:14201: checking for module support" >&5
14201
14202     if test "$with_msw" = "yes"; then
14203     have_dl=yes;
14204   else
14205         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14206 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14207 echo "configure:14208: checking for dlfcn.h" >&5
14208
14209 cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 #include <dlfcn.h>
14213 EOF
14214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14215 { (eval echo configure:14216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14217 if test -z "$ac_err"; then
14218   rm -rf conftest*
14219   eval "ac_cv_header_$ac_safe=yes"
14220 else
14221   echo "$ac_err" >&5
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -rf conftest*
14225   eval "ac_cv_header_$ac_safe=no"
14226 fi
14227 rm -f conftest*
14228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14229   echo "$ac_t""yes" 1>&6
14230   
14231       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14232 echo "configure:14233: checking for dlopen in -lc" >&5
14233       cat > conftest.$ac_ext <<EOF
14234 #line 14235 "configure"
14235 #include "confdefs.h"
14236 #include <dlfcn.h>
14237 int main() {
14238         dlopen ("", 0);
14239 ; return 0; }
14240 EOF
14241 if { (eval echo configure:14242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14242   rm -rf conftest*
14243    have_dl=yes 
14244 else
14245   echo "configure: failed program was:" >&5
14246   cat conftest.$ac_ext >&5
14247   rm -rf conftest*
14248   
14249       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14250 echo "configure:14251: checking for dlopen in -ldl" >&5
14251       ac_save_LIBS="$LIBS"
14252       LIBS="-ldl $LIBS"
14253       cat > conftest.$ac_ext <<EOF
14254 #line 14255 "configure"
14255 #include "confdefs.h"
14256 #include <dlfcn.h>
14257 int main() {
14258         dlopen ("", 0);
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262   rm -rf conftest*
14263    have_dl=yes 
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   LIBS="$ac_save_LIBS"
14269 fi
14270 rm -f conftest*
14271       ac_save_LIBS=
14272 fi
14273 rm -f conftest*
14274 else
14275   echo "$ac_t""no" 1>&6
14276 fi
14277
14278     if test -n "$have_dl"; then
14279       { test "$extra_verbose" = "yes" && cat << \EOF
14280     Defining HAVE_DLOPEN
14281 EOF
14282 cat >> confdefs.h <<\EOF
14283 #define HAVE_DLOPEN 1
14284 EOF
14285 }
14286
14287     else
14288       
14289 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14290 echo "configure:14291: checking for shl_load in -ldld" >&5
14291 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14292
14293 xe_check_libs=" -ldld "
14294 cat > conftest.$ac_ext <<EOF
14295 #line 14296 "configure"
14296 #include "confdefs.h"
14297 /* Override any gcc2 internal prototype to avoid an error.  */
14298 /* We use char because int might match the return type of a gcc2
14299     builtin and then its argument prototype would still apply.  */
14300 char shl_load();
14301
14302 int main() {
14303 shl_load()
14304 ; return 0; }
14305 EOF
14306 if { (eval echo configure:14307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14307   rm -rf conftest*
14308   eval "ac_cv_lib_$ac_lib_var=yes"
14309 else
14310   echo "configure: failed program was:" >&5
14311   cat conftest.$ac_ext >&5
14312   rm -rf conftest*
14313   eval "ac_cv_lib_$ac_lib_var=no"
14314 fi
14315 rm -f conftest*
14316 xe_check_libs=""
14317
14318 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14319   echo "$ac_t""yes" 1>&6
14320   libdl=dld have_dl=yes;
14321         { test "$extra_verbose" = "yes" && cat << \EOF
14322     Defining HAVE_SHL_LOAD
14323 EOF
14324 cat >> confdefs.h <<\EOF
14325 #define HAVE_SHL_LOAD 1
14326 EOF
14327 }
14328
14329 else
14330   echo "$ac_t""no" 1>&6
14331
14332 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14333 echo "configure:14334: checking for dld_init in -ldld" >&5
14334 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14335
14336 xe_check_libs=" -ldld "
14337 cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340 /* Override any gcc2 internal prototype to avoid an error.  */
14341 /* We use char because int might match the return type of a gcc2
14342     builtin and then its argument prototype would still apply.  */
14343 char dld_init();
14344
14345 int main() {
14346 dld_init()
14347 ; return 0; }
14348 EOF
14349 if { (eval echo configure:14350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14350   rm -rf conftest*
14351   eval "ac_cv_lib_$ac_lib_var=yes"
14352 else
14353   echo "configure: failed program was:" >&5
14354   cat conftest.$ac_ext >&5
14355   rm -rf conftest*
14356   eval "ac_cv_lib_$ac_lib_var=no"
14357 fi
14358 rm -f conftest*
14359 xe_check_libs=""
14360
14361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14362   echo "$ac_t""yes" 1>&6
14363   libdl=dld have_dl=yes;
14364         { test "$extra_verbose" = "yes" && cat << \EOF
14365     Defining HAVE_DLD_INIT
14366 EOF
14367 cat >> confdefs.h <<\EOF
14368 #define HAVE_DLD_INIT 1
14369 EOF
14370 }
14371
14372 else
14373   echo "$ac_t""no" 1>&6
14374 fi
14375
14376
14377 fi
14378
14379
14380     fi
14381   fi 
14382   if test -n "$have_dl"; then
14383         
14384 dll_ld=
14385 dll_ldflags=
14386 dll_cflags=
14387 dll_post=
14388 dll_ldo="-o"
14389 ld_dynamic_link_flags=
14390 xehost=$canonical
14391 xealias=$internal_configuration
14392
14393 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14394 echo "configure:14395: checking how to build dynamic libraries for ${xehost}" >&5
14395 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14396 case "$xehost" in
14397 *-*-linux-gnu*) ;;
14398 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14399 esac
14400
14401 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14402 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14403 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14404
14405 case "$xehost_os" in
14406 aix3*)
14407   # AIX sometimes has problems with the GCC collect2 program.  For some
14408   # reason, if we set the COLLECT_NAMES environment variable, the problems
14409   # vanish in a puff of smoke.
14410   if test "${COLLECT_NAMES+set}" != set; then
14411     COLLECT_NAMES=
14412     export COLLECT_NAMES
14413   fi
14414   ;;
14415 esac
14416
14417 # Now see if the compiler is really GCC.
14418 if test "$GCC" = "yes"; then
14419   XEGCC=yes
14420 else
14421   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14422 echo "configure:14423: checking checking whether we are using GNU C" >&5
14423   cat > conftest.$ac_ext <<EOF
14424 #line 14425 "configure"
14425 #include "confdefs.h"
14426
14427 #ifdef __GNUC__
14428   yes;
14429 #endif
14430
14431 EOF
14432 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14433   egrep "yes" >/dev/null 2>&1; then
14434   rm -rf conftest*
14435   XEGCC=yes
14436 else
14437   rm -rf conftest*
14438   XEGCC=no
14439 fi
14440 rm -f conftest*
14441
14442   echo "$ac_t""${XEGCC}" 1>&6
14443 fi
14444
14445 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14446 echo "configure:14447: checking how to produce PIC code" >&5
14447 wl=
14448
14449 can_build_shared=yes
14450 if test "$XEGCC" = yes; then
14451   wl='-Wl,'
14452
14453   case "$xehost_os" in
14454   aix[3-9]* | irix[5-9]* | osf[3-9])
14455     # PIC is the default for these OSes.
14456     ;;
14457
14458   os2*)
14459     # We can build DLLs from non-PIC.
14460     ;;
14461   amigaos*)
14462     # FIXME: we need at least 68020 code to build shared libraries, but
14463     # adding the `-m68020' flag to GCC prevents building anything better,
14464     # like `-m68040'.
14465     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14466     ;;
14467   *cygwin* | *mingw* )
14468     # PIC is the default
14469     ;;
14470   *)
14471     dll_cflags='-fPIC'
14472     ;;
14473   esac
14474 else
14475   # PORTME Check for PIC flags for the system compiler.
14476   case "$xehost_os" in
14477   hpux9* | hpux1[0-9]*)
14478     # Is there a better link_static_flag that works with the bundled CC?
14479     wl='-Wl,'
14480     dll_cflags='+Z'
14481     ;;
14482
14483   irix[5-9]*)
14484     wl='-Wl,'
14485     # PIC (with -KPIC) is the default.
14486     ;;
14487
14488   os2*)
14489     # We can build DLLs from non-PIC.
14490     ;;
14491
14492   osf[3-9]*)
14493     # All OSF/1 code is PIC.
14494     wl='-Wl,'
14495     ;;
14496
14497   aix[3-9]*)
14498     # All AIX code is PIC.
14499     wl='-Wl,'
14500     ;;
14501
14502   sco3.2v5*)
14503     dll_cflags='-belf -Kpic'
14504     wl='-Wl,'
14505     ;;
14506
14507   unixware*)
14508     dll_cflags="-KPIC"
14509     wl="-Wl,"
14510     ;;
14511
14512   sysv4*)
14513     dll_cflags="-KPIC"
14514     wl="-Wl,"
14515     ;;
14516
14517   sysv5*)
14518     dll_cflags="-KPIC"
14519     wl="-Wl,"
14520     ;;
14521
14522   solaris2*)
14523     dll_cflags='-KPIC'
14524     wl='-Wl,'
14525     ;;
14526
14527   sunos4*)
14528     dll_cflags='-PIC'
14529     wl='-Qoption ld '
14530     ;;
14531
14532   uts4*)
14533     dll_cflags='-pic'
14534     ;;
14535
14536   *)
14537     can_build_shared=no
14538     ;;
14539   esac
14540 fi
14541
14542 if test -n "$dll_cflags"; then
14543   echo "$ac_t""${dll_cflags}" 1>&6
14544
14545   # Check to make sure the dll_cflags actually works.
14546   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14547 echo "configure:14548: checking if PIC flag ${dll_cflags} really works" >&5
14548   save_CFLAGS="$CFLAGS"
14549   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14550   cat > conftest.$ac_ext <<EOF
14551 #line 14552 "configure"
14552 #include "confdefs.h"
14553
14554 int main() {
14555 int x=0;
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14559   rm -rf conftest*
14560   
14561     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14562     # reports no error.  So, we need to grep stderr for (Bundled).
14563     if grep '(Bundled)' config.log >/dev/null; then
14564       echo "$ac_t""no" 1>&6
14565       can_build_shared=no
14566       dll_cflags=
14567     else
14568       echo "$ac_t""yes" 1>&6
14569     fi
14570 else
14571   echo "configure: failed program was:" >&5
14572   cat conftest.$ac_ext >&5
14573   rm -rf conftest*
14574   echo "$ac_t""no" 1>&6
14575     can_build_shared=no
14576     dll_cflags=
14577 fi
14578 rm -f conftest*
14579   CFLAGS="$save_CFLAGS"
14580 else
14581   echo "$ac_t""none" 1>&6
14582 fi
14583
14584 if test "$can_build_shared" = "yes"; then
14585 cc_produces_so=no
14586 xldf=
14587 xcldf=
14588 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14589 echo "configure:14590: checking if C compiler can produce shared libraries" >&5
14590 if test "$XEGCC" = yes; then
14591   xcldf="-shared"
14592   xldf="-shared"
14593 else # Not using GCC
14594   case "$xehost_os" in
14595     aix[3-9]*)
14596       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14597       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14598       ;;
14599
14600     freebsd2* | netbsd* | openbsd*)
14601       xldf="-Bshareable"
14602       xcldf="${wl}-Bshareable"
14603       ;;
14604
14605     freebsd3*)
14606       xcldf="-shared"
14607       ;;
14608
14609     hpux*)
14610       xldf="-b +s"
14611       xcldf="${wl}-b ${wl}+s"
14612       ;;
14613
14614     irix[5-9]* | osf[3-9]*)
14615       xcldf="${wl}-shared"
14616       xldf="-shared"
14617       ;;
14618
14619     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14620       xcldf="-G"
14621       xldf="-G"
14622       ;;
14623
14624     sunos4*)
14625       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14626       xldf="-assert pure-text -Bstatic"
14627       ;;
14628   esac
14629 fi # End if if we are using gcc
14630
14631 if test -n "$xcldf"; then
14632   save_LDFLAGS=$LDFLAGS
14633   save_LIBS=$LIBS
14634   save_xe_libs=$xe_libs
14635   LDFLAGS="$xcldf $LDFLAGS"
14636   LIBS=
14637   xe_libs=
14638   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14639   cat > conftest.$ac_ext <<EOF
14640 #line 14641 "configure"
14641 #include "confdefs.h"
14642
14643 int main() {
14644 int x=0;
14645 ; return 0; }
14646 EOF
14647 if { (eval echo configure:14648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14648   rm -rf conftest*
14649   cc_produces_so=yes
14650 else
14651   echo "configure: failed program was:" >&5
14652   cat conftest.$ac_ext >&5
14653   rm -rf conftest*
14654   cc_produces_so=no
14655 fi
14656 rm -f conftest*
14657   LDFLAGS=$save_LDFLAGS
14658   LIBS=$save_LIBS
14659   xe_libs=$save_xe_libs
14660   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14661 else
14662   cc_produces_so=no
14663 fi
14664 echo "$ac_t""${cc_produces_so}" 1>&6
14665
14666 LTLD=$LD
14667 if test -z "$LTLD"; then
14668   ac_prog=ld
14669   if test "$XEGCC" = yes; then
14670     # Check if gcc -print-prog-name=ld gives a path.
14671     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14672 echo "configure:14673: checking for ld used by GCC" >&5
14673     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14674     case "$ac_prog" in
14675     # Accept absolute paths.
14676     /*)
14677       if test -z "$LTLD"; then
14678         case "$ac_prog" in
14679           *gcc-lib*) LTLD="$CC"
14680                      ;;
14681           *)         LTLD="$ac_prog"
14682                      ;;
14683         esac
14684       fi
14685       ;;
14686     "")
14687       # If it fails, then pretend we aren't using GCC.
14688       ac_prog=ld
14689       ;;
14690     *)
14691       # If it is relative, then search for the first ld in PATH.
14692       with_gnu_ld=unknown
14693       ;;
14694     esac
14695   else
14696     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14697 echo "configure:14698: checking for GNU ld" >&5
14698   fi
14699
14700   if test -z "$LTLD"; then
14701     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14702     for ac_dir in $PATH; do
14703       test -z "$ac_dir" && ac_dir=.
14704       if test -f "$ac_dir/$ac_prog"; then
14705         LTLD="$ac_dir/$ac_prog"
14706         # Check to see if the program is GNU ld.  I'd rather use --version,
14707         # but apparently some GNU ld's only accept -v.
14708         # Break only if it was the GNU/non-GNU ld that we prefer.
14709         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14710           xe_gnu_ld=yes
14711         else
14712           xe_gnu_ld=no
14713         fi
14714       fi
14715     done
14716     IFS="$ac_save_ifs"
14717   fi
14718
14719   if test -n "$LTLD"; then
14720     echo "$ac_t""${LTLD}" 1>&6
14721   else
14722     echo "$ac_t""no" 1>&6
14723   fi
14724
14725   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14726     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14727     exit 1
14728   fi
14729 fi
14730
14731 ld_dynamic_link_flags=
14732
14733 # Check to see if it really is or isn't GNU ld.
14734 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14735 echo "configure:14736: checking if the linker is GNU ld" >&5
14736 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14737 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14738   xe_gnu_ld=yes
14739 else
14740   xe_gnu_ld=no
14741 fi
14742 echo "$ac_t""${xe_gnu_ld}" 1>&6
14743
14744 case "$xehost_os" in
14745   amigaos* | sunos4*)
14746     # On these operating systems, we should treat GNU ld like the system ld.
14747     gnu_ld_acts_native=yes
14748     ;;
14749   *)
14750     gnu_ld_acts_native=no
14751     ;;
14752 esac
14753
14754 if test "$cc_produces_so" = "yes"; then
14755   dll_ld=$CC
14756   dll_ldflags=$xcldf
14757   can_build_shared=yes
14758   ld_shlibs=yes
14759 else
14760   # OK - only NOW do we futz about with ld.
14761   # See if the linker supports building shared libraries.
14762   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14763 echo "configure:14764: checking whether the linker supports shared libraries" >&5
14764   dll_ld=$CC
14765   dll_ldflags=$LDFLAGS
14766   ld_shlibs=yes
14767   can_build_shared=yes
14768   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14769     # See if GNU ld supports shared libraries.
14770     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14771       dll_ld=$CC
14772       dll_ldflags="-shared"
14773       ld_shlibs=yes
14774     else
14775       ld_shlibs=no
14776     fi
14777   else
14778     # PORTME fill in a description of your system's linker (not GNU ld)
14779     case "$xehost_os" in
14780     aix3*)
14781       dll_ld=$LTLD
14782       dll_ldflags=$xldf
14783       ;;
14784
14785     aix[4-9]*)
14786       dll_ldflags=$xcldf
14787       ;;
14788
14789     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14790     # support.  Future versions do this automatically, but an explicit c++rt0.o
14791     # doesn't break anything, and helps significantly (at the cost of a little
14792     # extra space).
14793     freebsd2.2*)
14794       dll_ld=$LTLD
14795       dll_ldflags=$xldf
14796       dll_post="/usr/lib/c++rt0.o"
14797       ;;
14798
14799     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14800     freebsd2*)
14801       dll_ld=$LTLD
14802       dll_ldflags="-Bshareable"
14803       ;;
14804
14805     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14806     freebsd3*)
14807       dll_ldflags="-shared"
14808       ;;
14809
14810     hpux*)
14811       dll_ld=$LTLD
14812       dll_ldflags=$xldf
14813       ;;
14814
14815     irix[5-9]*)
14816       dll_ld=$LTLD
14817       dll_ldflags=$xldf
14818       ;;
14819
14820     netbsd*)
14821       # Tested with NetBSD 1.2 ld
14822       dll_ld=$LTLD
14823       dll_ldflags=$xldf
14824       ;;
14825
14826     openbsd*)
14827       dll_ld=$LTLD
14828       dll_ldflags=$xldf
14829       ;;
14830
14831     osf3* | osf4*)
14832       dll_ld=$LTLD
14833       dll_ldflags=$xldf
14834       ;;
14835
14836     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14837     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14838       dll_ld=$LTLD
14839       case "$dll_ld" in
14840         *gcc*) dll_ldflags="-shared"
14841                dll_ld=$CC
14842                ;;
14843         *)     dll_ldflags="-G"
14844                ;;
14845       esac
14846       ;;
14847
14848     sunos4*)
14849       if test "$XEGCC" = yes; then
14850         dll_ld=$CC
14851       else
14852         dll_ld=$LTLD
14853       fi
14854       dll_ldflags=$xldf
14855       ;;
14856
14857     uts4*)
14858       dll_ld=$LTLD
14859       dll_ldflags="-G"
14860       ;;
14861
14862     bsdi*)
14863       dll_ldflags="-r"
14864       dll_ld="shlicc2"
14865       ;;
14866
14867     *)
14868       ld_shlibs=no
14869       can_build_shared=no
14870       ;;
14871     esac
14872   fi
14873   echo "$ac_t""${ld_shlibs}" 1>&6
14874   if test "$ld_shlibs" = "no"; then
14875     can_build_shared=no
14876   fi
14877 fi # End of if cc_produces_so = no
14878
14879
14880 if test "$xe_gnu_ld" = yes; then
14881   if test "$ld_shlibs" = yes; then
14882     ld_dynamic_link_flags="${wl}-export-dynamic"
14883   fi
14884 fi
14885
14886 if test -z "$ld_dynamic_link_flags"; then
14887   case "$xehost_os" in
14888   aix[3-9]*)
14889     ld_dynamic_link_flags=
14890     ;;
14891
14892   freebsd2.2*)
14893     ld_dynamic_link_flags=
14894     ;;
14895
14896   freebsd2*)
14897     ld_dynamic_link_flags=
14898     ;;
14899
14900   freebsd3*)
14901     ld_dynamic_link_flags=
14902     ;;
14903
14904   hpux*)
14905     ld_dynamic_link_flags="${wl}-E"
14906     ;;
14907
14908   irix[5-9]*)
14909     ld_dynamic_link_flags=
14910     ;;
14911
14912   netbsd*)
14913     ld_dynamic_link_flags=
14914     ;;
14915
14916   openbsd*)
14917     ld_dynamic_link_flags=
14918     ;;
14919
14920   osf3* | osf4*)
14921     ld_dynamic_link_flags=
14922     ;;
14923
14924   solaris2* | solaris7*)
14925     ld_dynamic_link_flags=
14926     ;;
14927
14928   sco3.2v5* | unixware* | sysv5* | sysv4*)
14929     ld_dynamic_link_flags="${wl}-Bexport"
14930     ;;
14931
14932   sunos4*)
14933     ld_dynamic_link_flags=
14934     ;;
14935
14936   uts4*)
14937     ld_dynamic_link_flags=
14938     ;;
14939
14940   bsdi*)
14941     ld_dynamic_link_flags=
14942     ;;
14943
14944   esac
14945 fi # End of if -z ld_dynamic_link_flags
14946 fi # End of if test "$can_build_shared" = "yes"
14947
14948
14949
14950
14951
14952
14953
14954
14955   fi
14956
14957   if test "$can_build_shared" = "yes"; then
14958     { test "$extra_verbose" = "yes" && cat << \EOF
14959     Defining HAVE_SHLIB
14960 EOF
14961 cat >> confdefs.h <<\EOF
14962 #define HAVE_SHLIB 1
14963 EOF
14964 }
14965
14966     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14967    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14968  fi
14969     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14970     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14971     for ac_func in dlerror _dlerror
14972 do
14973 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14974 echo "configure:14975: checking for $ac_func" >&5
14975
14976 cat > conftest.$ac_ext <<EOF
14977 #line 14978 "configure"
14978 #include "confdefs.h"
14979 /* System header to define __stub macros and hopefully few prototypes,
14980     which can conflict with char $ac_func(); below.  */
14981 #include <assert.h>
14982 /* Override any gcc2 internal prototype to avoid an error.  */
14983 /* We use char because int might match the return type of a gcc2
14984     builtin and then its argument prototype would still apply.  */
14985 char $ac_func();
14986
14987 int main() {
14988
14989 /* The GNU C library defines this for functions which it implements
14990     to always fail with ENOSYS.  Some functions are actually named
14991     something starting with __ and the normal name is an alias.  */
14992 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14993 choke me
14994 #else
14995 $ac_func();
14996 #endif
14997
14998 ; return 0; }
14999 EOF
15000 if { (eval echo configure:15001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15001   rm -rf conftest*
15002   eval "ac_cv_func_$ac_func=yes"
15003 else
15004   echo "configure: failed program was:" >&5
15005   cat conftest.$ac_ext >&5
15006   rm -rf conftest*
15007   eval "ac_cv_func_$ac_func=no"
15008 fi
15009 rm -f conftest*
15010
15011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15012   echo "$ac_t""yes" 1>&6
15013     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15014   { test "$extra_verbose" = "yes" && cat << EOF
15015     Defining $ac_tr_func
15016 EOF
15017 cat >> confdefs.h <<EOF
15018 #define $ac_tr_func 1
15019 EOF
15020 }
15021  
15022 else
15023   echo "$ac_t""no" 1>&6
15024 fi
15025 done
15026
15027     with_modules=yes
15028   else
15029     if test "$with_modules" = "yes"; then
15030       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15031     else
15032       echo "configure: warning: "Module support cannot be provided."" 1>&2
15033     fi
15034     with_modules=no
15035   fi
15036 fi
15037
15038 cat > conftest.$ac_ext <<EOF
15039 #line 15040 "configure"
15040 #include "confdefs.h"
15041 int main(int c,char *v[]){return 0;}
15042 EOF
15043 if { (eval echo configure:15044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15044 then
15045   :
15046 else
15047   conftest_rc="$?"
15048   echo "configure: failed program was:" >&5
15049   cat conftest.$ac_ext >&5
15050   rm -fr conftest*
15051   
15052   echo ""
15053   echo "*** PANIC *** The C compiler can no longer build working executables."
15054   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15055   echo "*** PANIC *** The most likely reason for this problem is that configure"
15056   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15057   echo "*** PANIC *** found at run time."
15058   echo "*** PANIC ***"
15059   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15060   echo "*** PANIC *** On other systems, try telling configure where to find the"
15061   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15062   echo "*** PANIC ***"
15063   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15064   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15065   echo "*** PANIC *** on your system.  Don't do that."
15066   exit 1
15067 fi
15068 rm -fr conftest*
15069
15070 if test "$win32_processes" = "yes"; then
15071   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15072    echo "    xemacs will be linked with \"process-nt.o\""
15073  fi
15074 else
15075   { test "$extra_verbose" = "yes" && cat << \EOF
15076     Defining HAVE_UNIX_PROCESSES
15077 EOF
15078 cat >> confdefs.h <<\EOF
15079 #define HAVE_UNIX_PROCESSES 1
15080 EOF
15081 }
15082
15083   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15084    echo "    xemacs will be linked with \"process-unix.o\""
15085  fi
15086 fi
15087
15088
15089
15090 T=""
15091 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15092 CFLAGS="$T"
15093
15094
15095 T=""
15096 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15097 extra_objs="$T"
15098
15099
15100 T=""
15101 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
15102 c_switch_general="$T"
15103
15104
15105 T=""
15106 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
15107 c_switch_window_system="$T"
15108
15109
15110 T=""
15111 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15112 c_switch_all="$T"
15113
15114
15115 T=""
15116 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
15117 ld_switch_general="$T"
15118
15119
15120 T=""
15121 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15122 ld_switch_window_system="$T"
15123
15124
15125 T=""
15126 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15127 ld_switch_all="$T"
15128
15129
15130 T=""
15131 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15132 ld_libs_general="$T"
15133
15134
15135 T=""
15136 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
15137 ld_libs_window_system="$T"
15138
15139
15140 T=""
15141 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15142 ld_libs_all="$T"
15143
15144
15145
15146 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15147 internal_makefile_list="Makefile.in"
15148 SUBDIR_MAKEFILES=''
15149 test -d lock || mkdir lock
15150 for dir in $MAKE_SUBDIR; do
15151   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15152         test -d "$d" || mkdir "$d"; cd "$d"
15153       done ) ;;
15154    * ) test -d "$dir" || mkdir "$dir" ;;
15155   esac
15156   
15157 T=""
15158 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15159 SUBDIR_MAKEFILES="$T"
15160
15161   
15162 T=""
15163 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15164 internal_makefile_list="$T"
15165
15166 done
15167
15168
15169
15170
15171 for dir in src/s src/m; do
15172   if test ! -d "$dir" ; then
15173     echo Making symbolic link to "$srcdir/$dir"
15174     ${LN_S} "$srcdir/$dir" "$dir"
15175   fi
15176 done
15177
15178 if test "$extra_verbose" = "yes"; then
15179   echo ""
15180   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
15181   echo ""
15182 fi
15183
15184
15185 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15186   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15187   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15188 fi
15189
15190 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15191   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15192   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15193 fi
15194
15195 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15196   test "$extra_verbose" = "yes" && echo "creating TAGS"
15197   echo "\f
15198 $srcdir/TAGS,include" > "TAGS"
15199 fi
15200
15201 if test "$__SUNPRO_C" = "yes"; then
15202   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15203   ( echo "# For use with Sun WorkShop's Source browser."
15204     echo "# See sbquery(1) and sbinit(4) for more information"
15205     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15206   ) > .sbinit
15207 fi
15208
15209 rm -f core
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230 PREFIX=$prefix
15231 while true; do
15232   case "$PREFIX" in
15233     *\$* ) eval "PREFIX=$PREFIX" ;;
15234     *) break ;;
15235   esac
15236 done
15237
15238
15239
15240
15241 EXEC_PREFIX=$exec_prefix
15242 while true; do
15243   case "$EXEC_PREFIX" in
15244     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15245     *) break ;;
15246   esac
15247 done
15248
15249
15250
15251
15252 INFODIR=$infodir
15253 while true; do
15254   case "$INFODIR" in
15255     *\$* ) eval "INFODIR=$INFODIR" ;;
15256     *) break ;;
15257   esac
15258 done
15259
15260
15261
15262
15263 INFOPATH=$infopath
15264 while true; do
15265   case "$INFOPATH" in
15266     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15267     *) break ;;
15268   esac
15269 done
15270
15271
15272
15273
15274 PACKAGE_PATH=$package_path
15275 while true; do
15276   case "$PACKAGE_PATH" in
15277     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15278     *) break ;;
15279   esac
15280 done
15281
15282
15283
15284
15285 LISPDIR=$lispdir
15286 while true; do
15287   case "$LISPDIR" in
15288     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15289     *) break ;;
15290   esac
15291 done
15292
15293
15294
15295
15296 MODULEDIR=$moduledir
15297 while true; do
15298   case "$MODULEDIR" in
15299     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15300     *) break ;;
15301   esac
15302 done
15303
15304
15305
15306
15307 SITELISPDIR=$sitelispdir
15308 while true; do
15309   case "$SITELISPDIR" in
15310     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15311     *) break ;;
15312   esac
15313 done
15314
15315
15316
15317
15318 SITEMODULEDIR=$sitemoduledir
15319 while true; do
15320   case "$SITEMODULEDIR" in
15321     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15322     *) break ;;
15323   esac
15324 done
15325
15326
15327
15328
15329 ETCDIR=$etcdir
15330 while true; do
15331   case "$ETCDIR" in
15332     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15333     *) break ;;
15334   esac
15335 done
15336
15337
15338
15339
15340 DOCDIR=$docdir
15341 while true; do
15342   case "$DOCDIR" in
15343     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15344     *) break ;;
15345   esac
15346 done
15347
15348
15349
15350
15351 ARCHLIBDIR=$archlibdir
15352 while true; do
15353   case "$ARCHLIBDIR" in
15354     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15355     *) break ;;
15356   esac
15357 done
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15379
15380
15381
15382
15383
15384
15385
15386 : ${XEMACS_CC:=$CC}
15387
15388
15389 if test "$with_prefix" = "yes"; then
15390   { test "$extra_verbose" = "yes" && cat << \EOF
15391     Defining PREFIX_USER_DEFINED
15392 EOF
15393 cat >> confdefs.h <<\EOF
15394 #define PREFIX_USER_DEFINED 1
15395 EOF
15396 }
15397
15398 fi
15399
15400 if test "$with_site_lisp" = "no"; then
15401   { test "$extra_verbose" = "yes" && cat << \EOF
15402     Defining INHIBIT_SITE_LISP
15403 EOF
15404 cat >> confdefs.h <<\EOF
15405 #define INHIBIT_SITE_LISP 1
15406 EOF
15407 }
15408
15409 fi
15410 if test "$with_site_modules" = "no"; then
15411   { test "$extra_verbose" = "yes" && cat << \EOF
15412     Defining INHIBIT_SITE_MODULES
15413 EOF
15414 cat >> confdefs.h <<\EOF
15415 #define INHIBIT_SITE_MODULES 1
15416 EOF
15417 }
15418
15419 fi
15420
15421
15422 T=""
15423 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15424 ac_configure_args="$T"
15425
15426 { test "$extra_verbose" = "yes" && cat << EOF
15427     Defining EMACS_CONFIGURATION = "$configuration"
15428 EOF
15429 cat >> confdefs.h <<EOF
15430 #define EMACS_CONFIGURATION "$configuration"
15431 EOF
15432 }
15433
15434 { test "$extra_verbose" = "yes" && cat << EOF
15435     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15436 EOF
15437 cat >> confdefs.h <<EOF
15438 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15439 EOF
15440 }
15441
15442
15443
15444 null_string=""
15445 { test "$extra_verbose" = "yes" && cat << EOF
15446     Defining LD_SWITCH_X_SITE = $null_string
15447 EOF
15448 cat >> confdefs.h <<EOF
15449 #define LD_SWITCH_X_SITE $null_string
15450 EOF
15451 }
15452
15453 { test "$extra_verbose" = "yes" && cat << EOF
15454     Defining LD_SWITCH_X_SITE_AUX = $null_string
15455 EOF
15456 cat >> confdefs.h <<EOF
15457 #define LD_SWITCH_X_SITE_AUX $null_string
15458 EOF
15459 }
15460
15461 { test "$extra_verbose" = "yes" && cat << EOF
15462     Defining C_SWITCH_X_SITE = $null_string
15463 EOF
15464 cat >> confdefs.h <<EOF
15465 #define C_SWITCH_X_SITE $null_string
15466 EOF
15467 }
15468
15469 { test "$extra_verbose" = "yes" && cat << EOF
15470     Defining LD_SWITCH_SITE = $null_string
15471 EOF
15472 cat >> confdefs.h <<EOF
15473 #define LD_SWITCH_SITE $null_string
15474 EOF
15475 }
15476
15477 { test "$extra_verbose" = "yes" && cat << EOF
15478     Defining C_SWITCH_SITE = $null_string
15479 EOF
15480 cat >> confdefs.h <<EOF
15481 #define C_SWITCH_SITE $null_string
15482 EOF
15483 }
15484
15485
15486
15487 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15488     Defining GNU_MALLOC
15489 EOF
15490 cat >> confdefs.h <<\EOF
15491 #define GNU_MALLOC 1
15492 EOF
15493 }
15494
15495 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15496     Defining USE_SYSTEM_MALLOC
15497 EOF
15498 cat >> confdefs.h <<\EOF
15499 #define USE_SYSTEM_MALLOC 1
15500 EOF
15501 }
15502
15503 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15504     Defining USE_DEBUG_MALLOC
15505 EOF
15506 cat >> confdefs.h <<\EOF
15507 #define USE_DEBUG_MALLOC 1
15508 EOF
15509 }
15510
15511                                               { test "$extra_verbose" = "yes" && cat << \EOF
15512     Defining USE_SYSTEM_MALLOC
15513 EOF
15514 cat >> confdefs.h <<\EOF
15515 #define USE_SYSTEM_MALLOC 1
15516 EOF
15517 }
15518
15519 fi
15520 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15521     Defining I18N3
15522 EOF
15523 cat >> confdefs.h <<\EOF
15524 #define I18N3 1
15525 EOF
15526 }
15527
15528 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15529     Defining USE_GCC
15530 EOF
15531 cat >> confdefs.h <<\EOF
15532 #define USE_GCC 1
15533 EOF
15534 }
15535
15536 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15537     Defining EXTERNAL_WIDGET
15538 EOF
15539 cat >> confdefs.h <<\EOF
15540 #define EXTERNAL_WIDGET 1
15541 EOF
15542 }
15543
15544 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15545     Defining QUICK_BUILD
15546 EOF
15547 cat >> confdefs.h <<\EOF
15548 #define QUICK_BUILD 1
15549 EOF
15550 }
15551
15552 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15553     Defining PURIFY
15554 EOF
15555 cat >> confdefs.h <<\EOF
15556 #define PURIFY 1
15557 EOF
15558 }
15559
15560 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15561     Defining QUANTIFY
15562 EOF
15563 cat >> confdefs.h <<\EOF
15564 #define QUANTIFY 1
15565 EOF
15566 }
15567
15568 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15569     Defining MAIL_USE_POP
15570 EOF
15571 cat >> confdefs.h <<\EOF
15572 #define MAIL_USE_POP 1
15573 EOF
15574 }
15575
15576 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15577     Defining KERBEROS
15578 EOF
15579 cat >> confdefs.h <<\EOF
15580 #define KERBEROS 1
15581 EOF
15582 }
15583
15584 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15585     Defining HESIOD
15586 EOF
15587 cat >> confdefs.h <<\EOF
15588 #define HESIOD 1
15589 EOF
15590 }
15591
15592 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15593     Defining USE_UNION_TYPE
15594 EOF
15595 cat >> confdefs.h <<\EOF
15596 #define USE_UNION_TYPE 1
15597 EOF
15598 }
15599
15600 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15601     Defining PDUMP
15602 EOF
15603 cat >> confdefs.h <<\EOF
15604 #define PDUMP 1
15605 EOF
15606 }
15607
15608
15609
15610 (
15611 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15612 else
15613   echo "uname -a: `uname -a`"
15614 fi
15615 echo ""
15616 echo "$0 $quoted_arguments"
15617 ) > Installation
15618
15619 if test ! -z ${emacs_beta_version} ; then
15620   if test -z "${emacs_is_beta}" ; then
15621         xemacs_betaname=".${emacs_beta_version}"
15622   else
15623         xemacs_betaname="-b${emacs_beta_version}"
15624   fi
15625 else
15626   xemacs_betaname=""
15627 fi
15628
15629 (
15630 echo "
15631
15632 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15633 "
15634 echo "
15635 Compilation / Installation:"
15636 echo "  Source code location:              $srcdir"
15637 echo "  Installation prefix:               $prefix"
15638 if test -n "$site_includes"; then
15639   echo "  Additional header files:           $site_includes"
15640 fi
15641 if test -n "$site_libraries"; then
15642   echo "  Additional libraries:              $site_libraries"
15643 fi
15644 if test -n "$site_prefixes"; then
15645   echo "  Additional prefixes:               $site_prefixes"
15646 fi
15647 if test -n "$runpath"; then
15648   echo "  Runtime library search path:       $runpath"
15649 fi
15650
15651 if test -n "$opsysfile"
15652 then echo "  Operating system description file: \`$opsysfile'"
15653 else echo "  Not using any operating system description file"
15654 fi
15655 if test -n "$machfile"
15656 then echo "  Machine description file:          \`$machfile'"
15657 else echo "  Not using any machine description file"
15658 fi
15659
15660 echo "  Compiler:                          $CC $CFLAGS"
15661 echo "  Relocating allocator for buffers:  $rel_alloc"
15662 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15663
15664 echo "
15665 Window System:"
15666 if test "$with_msw" = "yes"; then
15667   echo "  Compiling in support for the Microsoft window system."
15668 fi
15669 if test "$with_x11" = "yes"; then
15670   echo "  Compiling in support for the X window system:"
15671   echo "    - X Windows headers location:                 $x_includes"
15672   echo "    - X Windows libraries location:               $x_libraries"
15673   if test "$with_xauth" != yes; then
15674     echo "    - Xau (X authority) not available."
15675   fi
15676   if test "$with_xmu" != yes; then
15677     echo "    - Xmu library not available; substituting equivalent routines."
15678   fi
15679   if test "$with_wmcommand" != no; then
15680     echo "    - Handling WM_COMMAND properly."
15681   fi
15682 fi
15683 if test "$need_athena" = "yes"; then
15684   echo "  Compiling in support for the Athena widget set:"
15685   echo "    - Athena headers location:                    $athena_h_path"
15686   echo "    - Athena library to link:                     $athena_lib"
15687 fi
15688 case "$with_menubars" in
15689   gtk   ) echo "  Using GTK menubars."   ;;
15690   lucid ) echo "  Using Lucid menubars." ;;
15691   motif ) echo "  Using Motif menubars."
15692           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15693           echo "             We recommend using the Lucid menubar instead."
15694           echo "             Re-run configure with --with-menubars='lucid'." ;;
15695     msw ) echo "  Using MS-Windows menubars." ;;
15696 esac
15697 case "$with_scrollbars" in
15698   gtk    ) echo "  Using GTK scrollbars."        ;;
15699   lucid  ) echo "  Using Lucid scrollbars."      ;;
15700   motif  ) echo "  Using Motif scrollbars."      ;;
15701   athena ) echo "  Using Athena scrollbars."     ;;
15702      msw ) echo "  Using MS-Windows scrollbars." ;;
15703 esac
15704 case "$with_dialogs" in
15705   gtk    ) echo "  Using GTK dialog boxes." ;;
15706   motif  ) echo "  Using Motif dialog boxes."
15707            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15708              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15709              echo "             We recommend using the Athena dialog boxes instead."
15710              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15711              echo "             Read the PROBLEMS file for more information."
15712            fi; fi ;;
15713   athena ) echo "  Using Athena dialog boxes."     ;;
15714      msw ) echo "  Using MS-Windows dialog boxes." ;;
15715 esac
15716 case "$with_widgets" in
15717   gtk    ) echo "  Using GTK native widgets."        ;;
15718   motif  ) echo "  Using Motif native widgets."      ;;
15719   athena ) echo "  Using Athena native widgets."     ;;
15720      msw ) echo "  Using MS-Windows native widgets." ;;
15721 esac
15722 if test "$with_dragndrop" = yes; then
15723   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15724   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15725 fi
15726
15727 echo "
15728 TTY:"
15729 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15730 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15731
15732 echo "
15733 Images:"
15734 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15735 if test "$with_xpm" = yes; then
15736   echo "  Compiling in support for XPM  images."
15737 elif test "$with_x11" = yes; then
15738   echo "  WARNING: -----------------------------------------------------------"
15739   echo "  WARNING: Compiling without XPM image support."
15740   if test "$xpm_problem" != ""; then
15741     echo "  Reason: $xpm_problem"
15742   fi
15743   echo "  WARNING: You should strongly consider installing XPM."
15744   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15745   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15746   echo "  WARNING: -----------------------------------------------------------"
15747 fi
15748 if test "$with_png" = yes; then
15749   echo "  Compiling in support for PNG  images."
15750 elif test "$window_system" != "none"; then
15751   echo "  WARNING: -----------------------------------------------------------"
15752   echo "  WARNING: Compiling without PNG image support."
15753   if test "$png_problem" != ""; then
15754     echo "  Reason: $png_problem"
15755   fi
15756   echo "  WARNING: You should strongly consider installing the PNG libraries."
15757   echo "  WARNING: Otherwise certain images and glyphs may not display."
15758   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15759   echo "  WARNING: -----------------------------------------------------------"
15760 fi
15761 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15762 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15763 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15764
15765 echo "
15766 Sound:"
15767 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15768 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15769 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15770 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15771
15772 echo "
15773 Databases:"
15774 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15775 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15776 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15777 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15778 if test "$with_postgresql" = yes; then
15779   echo "  Compiling in support for PostgreSQL."
15780   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15781   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15782 fi
15783
15784 echo "
15785 Internationalization:"
15786 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15787 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15788 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15789 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15790 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15791 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15792 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15793 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15794 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15795 if test "$with_wnn" = yes; then
15796   echo "  Compiling in support for the WNN input method on Mule."
15797   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15798 fi
15799 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15800
15801 echo "
15802 Mail:"
15803 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15804 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15805 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15806 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15807
15808 echo "
15809 Other Features:"
15810 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15811 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15812 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15813 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15814 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15815 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15816 test "$pdump" = yes && echo "  Using the new portable dumper."
15817 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15818 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15819 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15820   != "no no no no no no"; then
15821   echo "  WARNING: ---------------------------------------------------------"
15822   echo "  WARNING: Compiling in support for runtime error checking."
15823   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15824   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15825   echo "  WARNING: ---------------------------------------------------------"
15826 fi
15827 echo ""
15828 ) | tee -a Installation
15829 echo ""
15830
15831
15832 # Remove any trailing slashes in these variables.
15833 test -n "$prefix" &&
15834   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15835 test -n "$exec_prefix" &&
15836   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15837
15838
15839 for file in $internal_makefile_list; do
15840   test "$file" = src/Makefile.in && \
15841     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15842   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15843 done
15844 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15845 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
15846
15847 trap '' 1 2 15
15848
15849 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15850
15851 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15852 # Let make expand exec_prefix.
15853 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15854
15855 # Any assignment to VPATH causes Sun make to only execute
15856 # the first set of double-colon rules, so remove it if not needed.
15857 # If there is a colon in the path, we need to keep it.
15858 if test "x$srcdir" = x.; then
15859   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15860 fi
15861
15862 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15863
15864 DEFS=-DHAVE_CONFIG_H
15865
15866 # Without the "./", some shells look in PATH for config.status.
15867 : ${CONFIG_STATUS=./config.status}
15868
15869 echo creating $CONFIG_STATUS
15870 rm -f $CONFIG_STATUS
15871 cat > $CONFIG_STATUS <<EOF
15872 #! /bin/sh
15873 # Generated automatically by configure.
15874 # Run this file to recreate the current configuration.
15875 # This directory was configured as follows,
15876 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15877 #
15878 # $0 $ac_configure_args
15879 #
15880 # Compiler output produced by configure, useful for debugging
15881 # configure, is in ./config.log if it exists.
15882
15883 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15884 for ac_option
15885 do
15886   case "\$ac_option" in
15887   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15888     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15889     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15890   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15891     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15892     exit 0 ;;
15893   -help | --help | --hel | --he | --h)
15894     echo "\$ac_cs_usage"; exit 0 ;;
15895   *) echo "\$ac_cs_usage"; exit 1 ;;
15896   esac
15897 done
15898
15899 ac_given_srcdir=$srcdir
15900 ac_given_INSTALL="$INSTALL"
15901
15902 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15903 EOF
15904 cat >> $CONFIG_STATUS <<EOF
15905
15906 # Protect against being on the right side of a sed subst in config.status.
15907 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15908  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15909 $ac_vpsub
15910 $extrasub
15911 s%@SHELL@%$SHELL%g
15912 s%@CFLAGS@%$CFLAGS%g
15913 s%@CPPFLAGS@%$CPPFLAGS%g
15914 s%@CXXFLAGS@%$CXXFLAGS%g
15915 s%@FFLAGS@%$FFLAGS%g
15916 s%@DEFS@%$DEFS%g
15917 s%@LDFLAGS@%$LDFLAGS%g
15918 s%@LIBS@%$LIBS%g
15919 s%@exec_prefix@%$exec_prefix%g
15920 s%@prefix@%$prefix%g
15921 s%@program_transform_name@%$program_transform_name%g
15922 s%@bindir@%$bindir%g
15923 s%@sbindir@%$sbindir%g
15924 s%@libexecdir@%$libexecdir%g
15925 s%@datadir@%$datadir%g
15926 s%@sysconfdir@%$sysconfdir%g
15927 s%@sharedstatedir@%$sharedstatedir%g
15928 s%@localstatedir@%$localstatedir%g
15929 s%@libdir@%$libdir%g
15930 s%@includedir@%$includedir%g
15931 s%@oldincludedir@%$oldincludedir%g
15932 s%@infodir@%$infodir%g
15933 s%@mandir@%$mandir%g
15934 s%@LN_S@%$LN_S%g
15935 s%@blddir@%$blddir%g
15936 s%@CC@%$CC%g
15937 s%@CPP@%$CPP%g
15938 s%@start_flags@%$start_flags%g
15939 s%@ld_switch_shared@%$ld_switch_shared%g
15940 s%@start_files@%$start_files%g
15941 s%@ld@%$ld%g
15942 s%@lib_gcc@%$lib_gcc%g
15943 s%@RANLIB@%$RANLIB%g
15944 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15945 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15946 s%@INSTALL_DATA@%$INSTALL_DATA%g
15947 s%@YACC@%$YACC%g
15948 s%@SET_MAKE@%$SET_MAKE%g
15949 s%@GTK_CONFIG@%$GTK_CONFIG%g
15950 s%@X_CFLAGS@%$X_CFLAGS%g
15951 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15952 s%@X_LIBS@%$X_LIBS%g
15953 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15954 s%@install_pp@%$install_pp%g
15955 s%@libs_xauth@%$libs_xauth%g
15956 s%@dnd_objs@%$dnd_objs%g
15957 s%@lwlib_objs@%$lwlib_objs%g
15958 s%@ALLOCA@%$ALLOCA%g
15959 s%@have_esd_config@%$have_esd_config%g
15960 s%@dll_ld@%$dll_ld%g
15961 s%@dll_cflags@%$dll_cflags%g
15962 s%@dll_ldflags@%$dll_ldflags%g
15963 s%@dll_post@%$dll_post%g
15964 s%@dll_ldo@%$dll_ldo%g
15965 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15966 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15967 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15968 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15969 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15970 s%@PROGNAME@%$PROGNAME%g
15971 s%@version@%$version%g
15972 s%@configuration@%$configuration%g
15973 s%@canonical@%$canonical%g
15974 s%@inststaticdir@%$inststaticdir%g
15975 s%@instvardir@%$instvardir%g
15976 s%@srcdir@%$srcdir%g
15977 s%@pkgdir@%$pkgdir%g
15978 s%@statedir@%$statedir%g
15979 s%@extra_includes@%$extra_includes%g
15980 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15981 s%@PREFIX@%$PREFIX%g
15982 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15983 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15984 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15985 s%@INFODIR@%$INFODIR%g
15986 s%@infopath@%$infopath%g
15987 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15988 s%@INFOPATH@%$INFOPATH%g
15989 s%@package_path@%$package_path%g
15990 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15991 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15992 s%@lispdir@%$lispdir%g
15993 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15994 s%@LISPDIR@%$LISPDIR%g
15995 s%@moduledir@%$moduledir%g
15996 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15997 s%@MODULEDIR@%$MODULEDIR%g
15998 s%@sitelispdir@%$sitelispdir%g
15999 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16000 s%@SITELISPDIR@%$SITELISPDIR%g
16001 s%@sitemoduledir@%$sitemoduledir%g
16002 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16003 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16004 s%@etcdir@%$etcdir%g
16005 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16006 s%@ETCDIR@%$ETCDIR%g
16007 s%@docdir@%$docdir%g
16008 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16009 s%@DOCDIR@%$DOCDIR%g
16010 s%@archlibdir@%$archlibdir%g
16011 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16012 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16013 s%@bitmapdir@%$bitmapdir%g
16014 s%@extra_objs@%$extra_objs%g
16015 s%@machfile@%$machfile%g
16016 s%@opsysfile@%$opsysfile%g
16017 s%@c_switch_general@%$c_switch_general%g
16018 s%@c_switch_window_system@%$c_switch_window_system%g
16019 s%@c_switch_all@%$c_switch_all%g
16020 s%@ld_switch_general@%$ld_switch_general%g
16021 s%@ld_switch_window_system@%$ld_switch_window_system%g
16022 s%@ld_switch_all@%$ld_switch_all%g
16023 s%@ld_libs_general@%$ld_libs_general%g
16024 s%@ld_libs_window_system@%$ld_libs_window_system%g
16025 s%@ld_libs_all@%$ld_libs_all%g
16026 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16027 s%@native_sound_lib@%$native_sound_lib%g
16028 s%@sound_cflags@%$sound_cflags%g
16029 s%@dynodump_arch@%$dynodump_arch%g
16030 s%@XEMACS_CC@%$XEMACS_CC%g
16031 s%@internal_makefile_list@%$internal_makefile_list%g
16032
16033 CEOF
16034 EOF
16035
16036 cat >> $CONFIG_STATUS <<\EOF
16037
16038 # Split the substitutions into bite-sized pieces for seds with
16039 # small command number limits, like on Digital OSF/1 and HP-UX.
16040 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16041 ac_file=1 # Number of current file.
16042 ac_beg=1 # First line for current file.
16043 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16044 ac_more_lines=:
16045 ac_sed_cmds=""
16046 while $ac_more_lines; do
16047   if test $ac_beg -gt 1; then
16048     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16049   else
16050     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16051   fi
16052   if test ! -s conftest.s$ac_file; then
16053     ac_more_lines=false
16054     rm -f conftest.s$ac_file
16055   else
16056     if test -z "$ac_sed_cmds"; then
16057       ac_sed_cmds="sed -f conftest.s$ac_file"
16058     else
16059       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16060     fi
16061     ac_file=`expr $ac_file + 1`
16062     ac_beg=$ac_end
16063     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16064   fi
16065 done
16066 if test -z "$ac_sed_cmds"; then
16067   ac_sed_cmds=cat
16068 fi
16069 EOF
16070
16071 cat >> $CONFIG_STATUS <<EOF
16072
16073 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16074 EOF
16075 cat >> $CONFIG_STATUS <<\EOF
16076 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16077   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16078   case "$ac_file" in
16079   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16080        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16081   *) ac_file_in="${ac_file}.in" ;;
16082   esac
16083
16084   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16085
16086   # Remove last slash and all that follows it.  Not all systems have dirname.
16087   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16088   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16089     # The file is in a subdirectory.
16090     test ! -d "$ac_dir" && mkdir "$ac_dir"
16091     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16092     # A "../" for each directory in $ac_dir_suffix.
16093     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16094   else
16095     ac_dir_suffix= ac_dots=
16096   fi
16097
16098   case "$ac_given_srcdir" in
16099   .)  srcdir=.
16100       if test -z "$ac_dots"; then top_srcdir=.
16101       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16102   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16103   *) # Relative path.
16104     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16105     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16106   esac
16107
16108   case "$ac_given_INSTALL" in
16109   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16110   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16111   esac
16112
16113   echo creating "$ac_file"
16114   rm -f "$ac_file"
16115   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16116   case "$ac_file" in
16117   *Makefile*) ac_comsub="1i\\
16118 # $configure_input" ;;
16119   *) ac_comsub= ;;
16120   esac
16121
16122   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16123   sed -e "$ac_comsub
16124 s%@configure_input@%$configure_input%g
16125 s%@srcdir@%$srcdir%g
16126 s%@top_srcdir@%$top_srcdir%g
16127 s%@INSTALL@%$INSTALL%g
16128 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16129 fi; done
16130 rm -f conftest.s*
16131
16132 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16133 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16134 #
16135 # ac_d sets the value in "#define NAME VALUE" lines.
16136 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16137 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16138 ac_dC='\3'
16139 ac_dD='%g'
16140 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16141 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16142 ac_uB='\([      ]\)%\1#\2define\3'
16143 ac_uC=' '
16144 ac_uD='\4%g'
16145 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16146 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16147 ac_eB='$%\1#\2define\3'
16148 ac_eC=' '
16149 ac_eD='%g'
16150
16151 if test "${CONFIG_HEADERS+set}" != set; then
16152 EOF
16153 cat >> $CONFIG_STATUS <<EOF
16154   CONFIG_HEADERS="src/config.h lwlib/config.h"
16155 EOF
16156 cat >> $CONFIG_STATUS <<\EOF
16157 fi
16158 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16159   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16160   case "$ac_file" in
16161   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16162        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16163   *) ac_file_in="${ac_file}.in" ;;
16164   esac
16165
16166   echo creating $ac_file
16167
16168   rm -f conftest.frag conftest.in conftest.out
16169   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16170   cat $ac_file_inputs > conftest.in
16171
16172 EOF
16173
16174 # Transform confdefs.h into a sed script conftest.vals that substitutes
16175 # the proper values into config.h.in to produce config.h.  And first:
16176 # Protect against being on the right side of a sed subst in config.status.
16177 # Protect against being in an unquoted here document in config.status.
16178 rm -f conftest.vals
16179 cat > conftest.hdr <<\EOF
16180 s/[\\&%]/\\&/g
16181 s%[\\$`]%\\&%g
16182 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16183 s%ac_d%ac_u%gp
16184 s%ac_u%ac_e%gp
16185 EOF
16186 sed -n -f conftest.hdr confdefs.h > conftest.vals
16187 rm -f conftest.hdr
16188
16189 # This sed command replaces #undef with comments.  This is necessary, for
16190 # example, in the case of _POSIX_SOURCE, which is predefined and required
16191 # on some systems where configure will not decide to define it.
16192 cat >> conftest.vals <<\EOF
16193 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16194 EOF
16195
16196 # Break up conftest.vals because some shells have a limit on
16197 # the size of here documents, and old seds have small limits too.
16198
16199 rm -f conftest.tail
16200 while :
16201 do
16202   ac_lines=`grep -c . conftest.vals`
16203   # grep -c gives empty output for an empty file on some AIX systems.
16204   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16205   # Write a limited-size here document to conftest.frag.
16206   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16207   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16208   echo 'CEOF
16209   sed -f conftest.frag conftest.in > conftest.out
16210   rm -f conftest.in
16211   mv conftest.out conftest.in
16212 ' >> $CONFIG_STATUS
16213   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16214   rm -f conftest.vals
16215   mv conftest.tail conftest.vals
16216 done
16217 rm -f conftest.vals
16218
16219 cat >> $CONFIG_STATUS <<\EOF
16220   rm -f conftest.frag conftest.h
16221   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16222   cat conftest.in >> conftest.h
16223   rm -f conftest.in
16224   if cmp -s $ac_file conftest.h 2>/dev/null; then
16225     echo "$ac_file is unchanged"
16226     rm -f conftest.h
16227   else
16228     # Remove last slash and all that follows it.  Not all systems have dirname.
16229       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16230       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16231       # The file is in a subdirectory.
16232       test ! -d "$ac_dir" && mkdir "$ac_dir"
16233     fi
16234     rm -f $ac_file
16235     mv conftest.h $ac_file
16236   fi
16237 fi; done
16238
16239 EOF
16240 cat >> $CONFIG_STATUS <<EOF
16241 CPP="$CPP"
16242  top_srcdir="$srcdir"
16243  MAKE_SUBDIR="$MAKE_SUBDIR"
16244
16245 EOF
16246 cat >> $CONFIG_STATUS <<\EOF
16247 for dir in . $MAKE_SUBDIR; do
16248   (
16249     cd $dir
16250     rm -f junk.c
16251     < Makefile.in \
16252       sed -e '/^# Generated/d' \
16253           -e 's%/\*\*/#.*%%' \
16254           -e 's/^ *# */#/' \
16255           -e '/^##/d' \
16256           -e '/^#/ {
16257 p
16258 d
16259 }'        \
16260           -e '/./ {
16261 s/\([\"]\)/\\\1/g
16262 s/^/"/
16263 s/$/"/
16264 }'  > junk.c;
16265
16266
16267
16268     echo creating $dir/Makefile
16269 $CPP -I. -I${top_srcdir}/src  junk.c \
16270   | sed -e 's/^\#.*//'          \
16271         -e 's/^[        ][      ]*$//'\
16272         -e 's/^ /       /'              \
16273         -e '/^[ \f]*$/d' \
16274         -e '/^\"/ {
16275         s/\\\([\"]\)/\1/g
16276         s/^[    ]*\"//
16277         s/\"[   ]*$//
16278 }' > Makefile.new
16279     chmod 444 Makefile.new
16280     mv -f Makefile.new Makefile
16281
16282     echo creating $dir/GNUmakefile
16283 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16284   | sed -e 's/^\#.*//'          \
16285         -e 's/^[        ][      ]*$//'\
16286         -e 's/^ /       /'              \
16287         -e '/^[ \f]*$/d' \
16288         -e '/^\"/ {
16289         s/\\\([\"]\)/\1/g
16290         s/^[    ]*\"//
16291         s/\"[   ]*$//
16292 }' > Makefile.new
16293     chmod 444 Makefile.new
16294     mv -f Makefile.new GNUmakefile
16295
16296     rm -f junk.c
16297   )
16298 done
16299
16300 sed < config.status >> lib-src/config.values \
16301   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16302   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16303   -e 's/^\([^ ]*\) $/\1 ""/' \
16304   -e 's/ 1$/ t/'
16305
16306
16307 exit 0
16308 EOF
16309 chmod +x $CONFIG_STATUS
16310 rm -fr confdefs* $ac_clean_files
16311 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1