XEmacs 21.4.3 "Academic Rigor".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
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_file_coding| \
340         with_canna      | \
341         with_wnn        | \
342         with_wnn6       | \
343         with_workshop   | \
344         with_sparcworks | \
345         with_tooltalk   | \
346         with_ldap       | \
347         with_postgresql | \
348         with_pop        | \
349         with_kerberos   | \
350         with_hesiod     | \
351         with_dnet       | \
352         with_infodock   | \
353         with_netinstall   | \
354         external_widget | \
355         verbose         | \
356         extra_verbose   | \
357         usage_tracking  | \
358         use_union_type  | \
359         pdump           | \
360         debug           | \
361         use_assertions  | \
362         memory_usage_stats | \
363         with_clash_detection | \
364         with_modules | \
365         quick_build )
366                   case "$val" in
367             y | ye | yes )      val=yes ;;
368             n | no )            val=no  ;;
369             * ) (echo "$progname: Usage error:"
370 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
371 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
372           esac
373           eval "$opt=\"$val\"" ;;
374
375
376                         srcdir          | \
377         compiler        | \
378         cflags          | \
379         cpp             | \
380         cppflags        | \
381         libs            | \
382         ldflags         | \
383         cache_file      | \
384         native_sound_lib| \
385         site_lisp       | \
386         x_includes      | \
387         x_libraries     | \
388         site_includes   | \
389         site_libraries  | \
390         site_prefixes   | \
391         site_runtime_libraries )
392                   if test "$valomitted" = "yes" ; then
393                     if test "$#" = 0 ; then
394               (echo "$progname: Usage error:"
395 echo " " "The \`--$optname' option requires a value."
396 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
397             fi
398             val="$1"; shift
399           fi
400           eval "$opt=\"$val\""
401         ;;
402
403                 rel_alloc | \
404         with_dlmalloc | \
405         with_debug_malloc  | use_debug_malloc | \
406         with_system_malloc | use_system_malloc )
407           case "$val" in
408             y | ye | yes )      val=yes ;;
409             n | no )            val=no  ;;
410             d | de | def | defa | defau | defaul | default ) val=default ;;
411             * ) (echo "$progname: Usage error:"
412 echo " " "The \`--$optname' option requires one of these values:
413   \`yes', \`no', or \`default'."
414 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
415           esac
416           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
417           eval "$opt=\"$val\""
418         ;;
419
420                 "with_database" )
421           with_database_berkdb=no
422           with_database_dbm=no
423           with_database_gdbm=no
424           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
425             case "$x" in
426               no ) ;;
427               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
428               d | db | dbm )                               with_database_dbm=yes    ;;
429               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
430               * ) (echo "$progname: Usage error:"
431 echo " " "The \`--$optname' option value
432   must be either \`no' or a comma-separated list
433   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
434 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
435             esac
436           done
437           if test "$with_database_dbm"  = "yes" -a \
438                   "$with_database_gdbm" = "yes"; then
439           (echo "$progname: Usage error:"
440 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
441   with the \`--$optname' option."
442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
443           fi
444         ;;
445
446                 "with_sound" )
447                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
448             case "$x" in
449                       n | no | non | none ) new_sdefault=no ;;
450               a | al | all | both ) new_sdefault=yes ;;
451
452               native )       with_native_sound=yes ;;
453               nonative )     with_native_sound=no ;;
454
455               nas )          with_nas_sound=yes ;;
456               nonas )        with_nas_sound=no ;;
457
458               esd )          with_esd_sound=yes ;;
459               noesd )        with_esd_sound=no ;;
460
461               * ) bogus_sound=yes ;;
462             esac
463             if test "$bogus_sound" -o \
464                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
465                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
466                 (echo "$progname: Usage error:"
467 echo " " "Valid types for the \`--$optname' option are:
468   $types.
469 The default is to autodetect all sound support."
470 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
471             elif test -n "$new_sdefault" ; then
472                 with_native_sound=$new_sdefault
473                 with_nas_sound=$new_sdefault
474                 with_esd_sound=$new_sdefault
475                 new_sdefault=   # reset this
476             fi
477             sound_notfirst=true
478           done
479         ;;
480
481                         "with_athena" )
482           case "$val" in
483             xa | xaw )                    val=xaw    ;;
484             3 | 3d | xaw3d )              val=3d     ;;
485                         ne | nex | next | naxtaw)     val=next   ;;
486                         9 | 95 | xaw95 )              val=95     ;;
487             xp | xpm | xawxpm )           val=xpm    ;;
488             * ) (echo "$progname: Usage error:"
489 echo " " "The \`--$optname' option must have one of these values:
490   \`xaw', \`3d', \`next', \`95', or \`xpm'."
491 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
492           esac
493           eval "$opt=\"$val\""
494         ;;
495
496                 "with_xim" )
497           case "$val" in
498             y | ye | yes )                val=yes   ;;
499             n | no | non | none )         val=no    ;;
500             x | xl | xli | xlib )         val=xlib  ;;
501             m | mo | mot | moti | motif ) val=motif ;;
502             * ) (echo "$progname: Usage error:"
503 echo " " "The \`--$optname' option must have one of these values:
504   \`motif', \`xlib', \`yes', or \`no'."
505 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
506           esac
507           eval "$opt=\"$val\""
508         ;;
509
510                 "mail_locking" )
511           case "$val" in
512             lockf )     val=lockf ;;
513             flock )     val=flock ;;
514             file | dot ) val=file  ;;
515             locking )   val=locking  ;;
516             * ) (echo "$progname: Usage error:"
517 echo " " "The \`--$optname' option must have one of these values:
518   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
519 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
520           esac
521           eval "$opt=\"$val\""
522         ;;
523
524                 "error_checking" )
525                           
526           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
527             case "$x" in
528                       n | no | non | none ) new_default=no ;;
529               a | al | all )        new_default=yes ;;
530
531               extents )       error_check_extents=yes ;;
532               noextents )     error_check_extents=no ;;
533
534               typecheck )     error_check_typecheck=yes ;;
535               notypecheck )   error_check_typecheck=no ;;
536
537               bufpos )        error_check_bufpos=yes ;;
538               nobufpos )      error_check_bufpos=no ;;
539
540               gc )            error_check_gc=yes ;;
541               nogc )          error_check_gc=no ;;
542
543               malloc )        error_check_malloc=yes ;;
544               nomalloc )      error_check_malloc=no ;;
545
546               byte_code )     error_check_byte_code=yes ;;
547               nobyte_code )   error_check_byte_code=no ;;
548
549               glyphs )     error_check_glyphs=yes ;;
550               noglyphs )   error_check_glyphs=no ;;
551
552               * ) bogus_error_check=yes ;;
553             esac
554             if test "$bogus_error_check" -o \
555                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
556                 if test "$error_check_default" = yes ; then
557                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
558                 else
559                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
560                 fi
561                 (echo "$progname: Usage error:"
562 echo " " "Valid types for the \`--$optname' option are:
563   $types."
564 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
565             elif test -n "$new_default" ; then
566                 error_check_extents=$new_default
567                 error_check_typecheck=$new_default
568                 error_check_bufpos=$new_default
569                 error_check_gc=$new_default
570                 error_check_malloc=$new_default
571                 error_check_byte_code=$new_default
572                 error_check_glyphs=$new_default
573                 new_default=    # reset this
574             fi
575             echeck_notfirst=true
576           done
577         ;;
578
579                                 
580                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
581         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
582         archlibdir | docdir | package_path )
583                    if test "$valomitted" = "yes"; then
584              if test "$#" = 0; then
585                  (echo "$progname: Usage error:"
586 echo " " "The \`--$optname' option requires a value."
587 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
588              fi
589              val="$1"; shift
590            fi
591            eval "$opt=\"$val\""
592
593                            case "$opt" in
594                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining EXEC_PREFIX_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define EXEC_PREFIX_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining LISPDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define LISPDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining SITELISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define SITELISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining MODULEDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define MODULEDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining ETCDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define ETCDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining INFODIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define INFODIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFOPATH_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFOPATH_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining PACKAGE_PATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define PACKAGE_PATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              datadir )
659                 { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining INFODIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define INFODIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining LISPDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define LISPDIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining MODULEDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define MODULEDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining ETCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define ETCDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining DOCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define DOCDIR_USER_DEFINED 1
696 EOF
697 }
698
699                 { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining ARCHLIBDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define ARCHLIBDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining DOCDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define DOCDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
716     Defining ARCHLIBDIR_USER_DEFINED
717 EOF
718 cat >> confdefs.h <<\EOF
719 #define ARCHLIBDIR_USER_DEFINED 1
720 EOF
721 }
722  ;;
723            esac
724         ;;
725
726                 "no_create" ) ;;
727
728                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
729
730                 "with_menubars"   | \
731         "with_scrollbars" | \
732         "with_dialogs"    | \
733         "with_widgets" )
734           case "$val" in
735             l | lu | luc | luci | lucid )               val=lucid  ;;
736             m | mo | mot | moti | motif )               val=motif  ;;
737             a | at | ath | athe | athen | athena )      val=athena ;;
738             n | no | non | none )                       val=no     ;;
739             y | ye | yes )                              val=yes    ;;
740             g | gt | gtk )                              val=gtk    ;;
741             m | ms | msw )                              val=msw    ;;
742             * ) (echo "$progname: Usage error:"
743 echo " " "The \`--$optname' option must have one of these values:
744   \`gtk\', \`lucid', \`motif', \`athena', \`yes', or \`no'."
745 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
746           esac
747           eval "$opt=\"$val\""
748         ;;
749
750                 "use_minimal_tagbits" | \
751         "use_indexed_lrecord_implementation" | \
752         "run_in_place"  | \
753         "const_is_losing" | \
754         "with_gnu_make" )
755           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
756         ;;
757
758                 * ) (echo "$progname: Usage error:"
759 echo " " "Unrecognized option: $arg"
760 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
761
762       esac
763     ;;
764
765         *-*-*) configuration="$arg" ;;
766
767         *) (echo "$progname: Usage error:"
768 echo " " "Unrecognized argument: $arg"
769 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
770
771   esac
772 done
773
774
775 test -n "$cpp"      && CPP="$cpp"
776 test -n "$cppflags" && CPPFLAGS="$cppflags"
777 test -n "$libs"     && LIBS="$libs"
778 test -n "$ldflags"  && LDFLAGS="$ldflags"
779
780 eval set x "$quoted_arguments"; shift
781
782 test "$extra_verbose" = "yes" && verbose=yes
783
784 test -n "$with_x" && with_x11="$with_x"
785
786 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
787   test "$with_system_malloc" = "default" && with_system_malloc=yes
788 fi
789
790
791
792 if test "$with_cde $with_tooltalk" = "yes no"; then
793   (echo "$progname: Usage error:"
794 echo " " "--with-cde requires --with-tooltalk"
795 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
796 elif test "$with_tooltalk" = "no" ; then with_cde=no
797 elif test "$with_cde" = "yes"; then with_tooltalk=yes
798 fi
799
800
801 case "$srcdir" in
802
803     "" )
804     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
805       if test -f "$dir/src/lisp.h" -a \
806               -f "$dir/lisp/version.el" ; then
807         srcdir="$dir"
808         break
809       fi
810     done
811     if test -z "$srcdir" ; then
812       (echo "$progname: Usage error:"
813 echo " " "Neither the current directory nor its parent seem to
814   contain the XEmacs sources.  If you do not want to build XEmacs in its
815   source tree, you should run \`$progname' in the directory in which
816   you wish to build XEmacs, using the \`--srcdir' option to say where the
817   sources may be found."
818 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
819     fi
820   ;;
821
822     * )
823     if test ! -f "$srcdir/src/lisp.h" -o \
824             ! -f "$srcdir/lisp/version.el" ; then
825       (echo "$progname: Usage error:"
826 echo " " "The directory specified with the \`--srcdir' option,
827   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
828   either run the \`$progname' script at the top of the XEmacs source
829   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831     fi
832   ;;
833 esac
834
835 if test -z "$configuration"; then
836     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
837   if test -z "$configuration"; then
838     (echo "$progname: Usage error:"
839 echo " " "XEmacs has not been ported to this host type.
840 Try explicitly specifying the CONFIGURATION when rerunning configure."
841 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
842   fi
843 fi
844
845 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
846 echo "configure:847: checking whether ln -s works" >&5
847
848 rm -f conftestdata
849 if ln -s X conftestdata 2>/dev/null
850 then
851   rm -f conftestdata
852   ac_cv_prog_LN_S="ln -s"
853 else
854   ac_cv_prog_LN_S=ln
855 fi
856 LN_S="$ac_cv_prog_LN_S"
857 if test "$ac_cv_prog_LN_S" = "ln -s"; then
858   echo "$ac_t""yes" 1>&6
859 else
860   echo "$ac_t""no" 1>&6
861 fi
862
863
864 for dir in lisp etc man info tests; do
865   if test ! -d "$dir" ; then
866     echo Making symbolic link to "$srcdir/$dir"
867     ${LN_S} "$srcdir/$dir" "$dir"
868   fi
869 done
870
871
872 absolute_pwd="`pwd`";
873 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
874 then blddir="$PWD"
875 else blddir="$absolute_pwd"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   blddir=`echo "$blddir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi
880 fi
881
882
883 case "$srcdir" in
884   /* ) ;;
885   .  ) srcdir="$blddir" ;;
886   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
887   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
888   srcdir=`echo "$srcdir" | \
889    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
890 fi ;;
891 esac
892
893 if test `pwd` != `sh -c cd $srcdir && pwd`  \
894    && test -f "$srcdir/src/config.h"; then
895   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
896    echo "   as a build directory right now; it has been configured in its own"
897    echo "   right.  To configure in another directory as well, you MUST"
898    echo "   use GNU make.  If you do not have GNU make, then you must"
899    echo "   now do \`make distclean' in $srcdir,"
900    echo "   and then run $progname again.") >&2
901   extrasub='/^VPATH[     ]*=/c\
902 vpath %.c $(srcdir)\
903 vpath %.h $(srcdir)\
904 vpath %.y $(srcdir)\
905 vpath %.l $(srcdir)\
906 vpath %.s $(srcdir)\
907 vpath %.in $(srcdir)'
908 fi
909
910 . "$srcdir/version.sh" || exit 1;
911 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
912 : "${extra_verbose=$beta}"
913 version="${emacs_major_version}.${emacs_minor_version}"
914 { test "$extra_verbose" = "yes" && cat << EOF
915     Defining EMACS_MAJOR_VERSION = $emacs_major_version
916 EOF
917 cat >> confdefs.h <<EOF
918 #define EMACS_MAJOR_VERSION $emacs_major_version
919 EOF
920 }
921
922 { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_MINOR_VERSION = $emacs_minor_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_MINOR_VERSION $emacs_minor_version
927 EOF
928 }
929
930 if test -n "$emacs_beta_version" ; then
931   if test "$beta" = "yes"; then
932         version="${version}-b${emacs_beta_version}"
933         { test "$extra_verbose" = "yes" && cat << EOF
934     Defining EMACS_BETA_VERSION = $emacs_beta_version
935 EOF
936 cat >> confdefs.h <<EOF
937 #define EMACS_BETA_VERSION $emacs_beta_version
938 EOF
939 }
940
941   else
942         version="${version}.${emacs_beta_version}"
943         { test "$extra_verbose" = "yes" && cat << EOF
944     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
945 EOF
946 cat >> confdefs.h <<EOF
947 #define EMACS_PATCH_LEVEL $emacs_beta_version
948 EOF
949 }
950
951   fi
952 fi
953 { test "$extra_verbose" = "yes" && cat << EOF
954     Defining XEMACS_CODENAME = "$xemacs_codename"
955 EOF
956 cat >> confdefs.h <<EOF
957 #define XEMACS_CODENAME "$xemacs_codename"
958 EOF
959 }
960
961 { test "$extra_verbose" = "yes" && cat << EOF
962     Defining EMACS_VERSION = "$version"
963 EOF
964 cat >> confdefs.h <<EOF
965 #define EMACS_VERSION "$version"
966 EOF
967 }
968
969
970 if test "$with_infodock" = "yes"; then
971   if test ! -f ../../ID-INSTALL; then
972     echo "Cannot build InfoDock without InfoDock sources"
973     with_infodock=no
974   fi
975 fi
976
977 if test "$with_infodock" = "yes"; then
978       { test "$extra_verbose" = "yes" && cat << EOF
979     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
980 EOF
981 cat >> confdefs.h <<EOF
982 #define INFODOCK_MAJOR_VERSION $infodock_major_version
983 EOF
984 }
985
986   { test "$extra_verbose" = "yes" && cat << EOF
987     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
988 EOF
989 cat >> confdefs.h <<EOF
990 #define INFODOCK_MINOR_VERSION $infodock_minor_version
991 EOF
992 }
993
994   { test "$extra_verbose" = "yes" && cat << EOF
995     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
996 EOF
997 cat >> confdefs.h <<EOF
998 #define INFODOCK_BUILD_VERSION $infodock_build_version
999 EOF
1000 }
1001
1002   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1003   PROGNAME=infodock
1004   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1005 else
1006   PROGNAME=xemacs
1007 fi
1008
1009 { test "$extra_verbose" = "yes" && cat << EOF
1010     Defining EMACS_PROGNAME = "$PROGNAME"
1011 EOF
1012 cat >> confdefs.h <<EOF
1013 #define EMACS_PROGNAME "$PROGNAME"
1014 EOF
1015 }
1016
1017
1018 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1019 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1020     Defining ERROR_CHECK_EXTENTS
1021 EOF
1022 cat >> confdefs.h <<\EOF
1023 #define ERROR_CHECK_EXTENTS 1
1024 EOF
1025 }
1026
1027 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1028     Defining ERROR_CHECK_TYPECHECK
1029 EOF
1030 cat >> confdefs.h <<\EOF
1031 #define ERROR_CHECK_TYPECHECK 1
1032 EOF
1033 }
1034
1035 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1036     Defining ERROR_CHECK_BUFPOS
1037 EOF
1038 cat >> confdefs.h <<\EOF
1039 #define ERROR_CHECK_BUFPOS 1
1040 EOF
1041 }
1042
1043 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1044     Defining ERROR_CHECK_GC
1045 EOF
1046 cat >> confdefs.h <<\EOF
1047 #define ERROR_CHECK_GC 1
1048 EOF
1049 }
1050
1051 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1052     Defining ERROR_CHECK_MALLOC
1053 EOF
1054 cat >> confdefs.h <<\EOF
1055 #define ERROR_CHECK_MALLOC 1
1056 EOF
1057 }
1058
1059 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining ERROR_CHECK_BYTE_CODE
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define ERROR_CHECK_BYTE_CODE 1
1064 EOF
1065 }
1066
1067 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining ERROR_CHECK_GLYPHS
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define ERROR_CHECK_GLYPHS 1
1072 EOF
1073 }
1074
1075 if test "${debug:=$beta}" = "yes"; then
1076   use_assertions=yes memory_usage_stats=yes
1077   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1078    echo "    xemacs will be linked with \"debug.o\""
1079  fi
1080   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1081    echo "    xemacs will be linked with \"tests.o\""
1082  fi
1083   { test "$extra_verbose" = "yes" && cat << \EOF
1084     Defining DEBUG_XEMACS
1085 EOF
1086 cat >> confdefs.h <<\EOF
1087 #define DEBUG_XEMACS 1
1088 EOF
1089 }
1090
1091 fi
1092 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1093     Defining USE_ASSERTIONS
1094 EOF
1095 cat >> confdefs.h <<\EOF
1096 #define USE_ASSERTIONS 1
1097 EOF
1098 }
1099
1100 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1101     Defining MEMORY_USAGE_STATS
1102 EOF
1103 cat >> confdefs.h <<\EOF
1104 #define MEMORY_USAGE_STATS 1
1105 EOF
1106 }
1107
1108
1109
1110 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1111 echo "configure:1112: checking "host system type"" >&5
1112 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1113 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1114 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1115 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1116 echo "$ac_t""$configuration" 1>&6
1117
1118
1119
1120
1121
1122 machine='' opsys=''
1123
1124 case "$canonical" in
1125   sparc-*-*        ) machine=sparc ;;
1126   alpha*-*-*       ) machine=alpha ;;
1127   vax-*-*          ) machine=vax ;;
1128   mips-dec-*       ) machine=pmax ;;
1129   mips-sgi-irix6*  ) machine=iris6d ;;
1130   mips-sgi-*       ) machine=iris4d ;;
1131   mips*-linux      ) machine=mips ;;
1132   romp-ibm-*       ) machine=ibmrt ;;
1133   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1134   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1135   powerpc*-*       ) machine=powerpc ;;
1136   hppa-*-*         ) machine=hp800 ;;
1137   m88k-dg-*        ) machine=aviion ;;
1138   m68*-sony-*      ) machine=news ;;
1139   mips-sony-*      ) machine=news-risc ;;
1140   clipper-*        ) machine=clipper ;;
1141   arm*             ) machine=arm ;;
1142   ns32k-*          ) machine=ns32000 ;;
1143 esac
1144
1145 case "$canonical" in
1146   *-*-linux*    ) opsys=linux ;;
1147   *-*-netbsd*   ) opsys=netbsd ;;
1148   *-*-openbsd*  ) opsys=openbsd ;;
1149   *-*-nextstep* ) opsys=nextstep ;;
1150   *-*-vms       ) opsys=vms ;;
1151
1152     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1153   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1154   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1155   *-dec-osf3*                ) opsys=decosf3-1 ;;
1156   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1157
1158     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1159   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1160   *-*-ultrix* )         opsys=ultrix4-3 ;;
1161
1162     *-*-aix3.1*  ) opsys=aix3-1 ;;
1163   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1164   *-*-aix3*    ) opsys=aix3-2   ;;
1165   *-*-aix4.0*  ) opsys=aix4     ;;
1166   *-*-aix4.1*  ) opsys=aix4-1   ;;
1167   *-*-aix4*    ) opsys=aix4-2   ;;
1168
1169     *-gnu* )                    opsys=gnu    ;;
1170   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1171   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1172   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1173   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1174   *-*-aos*   )                  opsys=bsd4-3 ;;
1175   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1176   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1177   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1178   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1179   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1180   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1181         if test -z "$NON_GNU_CPP" ; then
1182           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1183             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1184           done
1185         fi
1186         opsys=usg5-4-2 ;;
1187     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1188     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1189 esac
1190
1191 case "$canonical" in
1192
1193     *-*-netbsd* )
1194     case "$canonical" in
1195       i[3-9]86-*-netbsd*) machine=intel386 ;;
1196       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1197                                             machine=hp9000s300 ;;
1198       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1199       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1200     esac
1201   ;;
1202
1203     *-*-openbsd* )
1204     case "${canonical}" in
1205       i386-*-openbsd*)          machine=intel386 ;;
1206       m68k-*-openbsd*)          machine=hp9000s300 ;;
1207       mipsel-*-openbsd*)        machine=pmax ;;
1208      esac
1209    ;;
1210
1211     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1212   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1213
1214     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1215   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1216
1217     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1218
1219     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1220
1221     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1222
1223     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1224
1225     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1226
1227     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1228   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1229   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1230
1231   
1232     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1233
1234     *-convex-bsd* | *-convex-convexos* )
1235     machine=convex opsys=bsd4-3
1236     NON_GNU_CPP="cc -E -P"
1237   ;;
1238
1239     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1240
1241     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1242   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1243   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1244   m88k-dg-dgux*                           ) opsys=dgux     ;;
1245
1246     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1247   m88k-motorola-sysv4* )
1248                     machine=delta88k opsys=usg5-4-2
1249   ;;
1250   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1251
1252     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1253   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1254
1255     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1256
1257     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1258   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1259   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1260
1261       m88k-harris-cxux* )
1262         case "`uname -r`" in
1263        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1264        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1265     esac
1266     NON_GNU_CPP="/lib/cpp"
1267   ;;
1268     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1269     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1270
1271     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1272
1273     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1274
1275     *-hp-hpux* )
1276         case "$canonical" in
1277       m68*  ) machine=hp9000s300 ;;
1278       hppa* ) machine=hp800      ;;
1279     esac
1280
1281     case "$canonical" in
1282       *-hp-hpux7*  )  opsys=hpux   ;;
1283       *-hp-hpux8*  )  opsys=hpux8  ;;
1284       *-hp-hpux9*  )  opsys=hpux9  ;;
1285       *-hp-hpux10* )  opsys=hpux10 ;;
1286       *-hp-hpux11* )  opsys=hpux11 ;;
1287       *            )  opsys=hpux   ;;
1288     esac
1289
1290         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1291    echo "    xemacs will be linked with \"strcat.o\""
1292  fi ;; esac
1293
1294     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1295         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1296     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1297
1298     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1299   ;;
1300
1301     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1302   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1303
1304     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1305   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1306   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1307   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1308   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1309   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1310
1311     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1312   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1313
1314     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1315
1316     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1317
1318     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1319
1320     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1321
1322       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1323
1324     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1325
1326     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1327
1328     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1329
1330     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1331
1332         mips-mips-usg* ) machine=mips4 ;;
1333   mips-mips-riscos4 )
1334     machine=mips4
1335     NON_GNU_CC="cc -systype bsd43"
1336     NON_GNU_CPP="cc -systype bsd43 -E"
1337     case "$canonical" in
1338       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1339       mips-mips-riscos5* ) opsys=riscos5 ;;
1340     esac
1341   ;;
1342   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1343   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1344
1345     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1346
1347     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1348
1349     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1350   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1351
1352     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1353
1354     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1355
1356     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1357
1358     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1359
1360     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1361   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1362
1363     mips-siemens-sysv* | mips-sni-sysv*)
1364     machine=mips-siemens opsys=usg5-4
1365     NON_GNU_CC=/usr/ccs/bin/cc
1366     NON_GNU_CPP=/usr/ccs/lib/cpp
1367   ;;
1368
1369     mips-nec-sysv*)
1370     machine=mips-nec
1371     NON_GNU_CC=/usr/ccs/bin/cc
1372     NON_GNU_CPP=/usr/ccs/lib/cpp
1373   ;;
1374
1375       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1376   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1377     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1378   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1379   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1380   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1381   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1382   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1383   mips-sgi-irix*      ) opsys=irix5-0 ;;
1384
1385     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1386   *-sony-news* ) opsys=newsos5 ;;
1387
1388     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1389
1390     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1391         case "$canonical" in
1392       m68*-sunos1* )             machine=sun1     ;;
1393       m68*-sunos2* )             machine=sun2     ;;
1394       m68* )                     machine=sun3     ;;
1395       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1396       i*86-*-* )                 machine=intel386 ;;
1397       rs6000* )                  machine=rs6000   ;;
1398     esac
1399
1400         case "$canonical" in *-sunos5*)
1401       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1402     esac
1403
1404                     case "$canonical" in
1405       *-sunos4* )
1406         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1407         : ;;
1408       *-solaris2* )
1409         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1410         RANLIB=':' ;;
1411     esac
1412
1413     case "$canonical" in
1414       *-solaris*          )
1415         opsys=sol2
1416         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1417         { test "$extra_verbose" = "yes" && cat << EOF
1418     Defining OS_RELEASE = $os_release
1419 EOF
1420 cat >> confdefs.h <<EOF
1421 #define OS_RELEASE $os_release
1422 EOF
1423 }
1424  ;;
1425
1426             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1427       *-sunos4.0*         ) opsys=sunos4-0      ;;
1428       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1429       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1430       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1431       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1432       *-mach*             ) opsys=mach-bsd4-3   ;;
1433       *                   ) opsys=bsd4-2        ;;
1434     esac
1435
1436     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1437
1438         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1439   ;;
1440
1441     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1442
1443     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1444   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1445
1446     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1447
1448     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1449
1450     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1451       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1452
1453     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1454
1455     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1456
1457     vax-dec-* )
1458     case "$canonical" in
1459       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1460       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1461       *-mach* )                         opsys=mach-bsd4-3 ;;
1462     esac
1463   ;;
1464
1465     ns16k-whitechapel-* ) machine=mg1 ;;
1466
1467     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1468
1469     i[3-9]86-*-* )
1470     machine=intel386
1471     case "$canonical" in
1472       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1473       *-isc2.2* )               opsys=isc2-2 ;;
1474       *-isc4.0* )               opsys=isc4-0 ;;
1475       *-isc4.* )                opsys=isc4-1
1476                                 GCC_TEST_OPTIONS=-posix
1477                                 NON_GCC_TEST_OPTIONS=-Xp
1478                                 ;;
1479       *-isc* )                  opsys=isc3-0 ;;
1480       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1481       *-esix* )                 opsys=esix ;;
1482       *-mach* )                 opsys=mach-bsd4-3 ;;
1483       *-xenix* )                opsys=xenix ;;
1484       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1485       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1486       *-bsdi4* )                opsys=bsdos4 ;;
1487       *-bsdi3* )                opsys=bsdos3 ;;
1488       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1489       *-bsdi2* )                opsys=bsdos2 ;;
1490       *-sco3.2v5* )             opsys=sco5 ;;
1491       *-sysv5* )                opsys=sco7 ;;
1492       *-386bsd* )               opsys=386bsd ;;
1493       *-freebsd* )              opsys=freebsd ;;
1494       *-nextstep* )             opsys=nextstep ;;
1495       *-pc-cygwin* )            opsys=cygwin32 ;;
1496       *-pc-mingw* )             opsys=mingw32 ;
1497                                 test -z "$with_tty" && with_tty="no";;
1498           esac
1499   ;;
1500
1501     m68k-*-linux* ) machine=m68k opsys=linux ;;
1502
1503 esac
1504
1505 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1506
1507 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1508
1509 if test -r "${srcdir}/src/m/${machine}.h"; then
1510   machfile="m/${machine}.h"
1511   { test "$extra_verbose" = "yes" && cat << EOF
1512     Defining config_machfile = "$machfile"
1513 EOF
1514 cat >> confdefs.h <<EOF
1515 #define config_machfile "$machfile"
1516 EOF
1517 }
1518
1519 else
1520   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1521   echo "Using configure-time autodetection only."
1522 fi
1523
1524 if test -r "${srcdir}/src/s/${opsys}.h"; then
1525   opsysfile="s/${opsys}.h"
1526   { test "$extra_verbose" = "yes" && cat << EOF
1527     Defining config_opsysfile = "$opsysfile"
1528 EOF
1529 cat >> confdefs.h <<EOF
1530 #define config_opsysfile "$opsysfile"
1531 EOF
1532 }
1533
1534 else
1535   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1536   echo "Using configure-time autodetection only."
1537 fi
1538
1539
1540 if test -z "$dynamic"; then
1541   case "$opsys" in
1542     hpux* | sunos4* ) dynamic=no ;;
1543     *) dynamic=yes ;;
1544   esac
1545 fi
1546 if test "$dynamic" = "yes"; then
1547   case "$opsys" in
1548     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1549     decosf* ) ld_call_shared="-call_shared" ;;
1550   esac
1551 else   case "$opsys" in
1552     sol2 )
1553       echo "Static linking is not supported on Solaris 2."
1554       echo "Rerun configure without specifying --dynamic=no."
1555       exit 1 ;;
1556     linux   ) ld_call_shared="-Bstatic" ;;
1557     decosf* ) ld_call_shared="-non_shared" ;;
1558   esac
1559 fi
1560
1561 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1562
1563 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1564 { test "$extra_verbose" = "yes" && cat << EOF
1565     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1566 EOF
1567 cat >> confdefs.h <<EOF
1568 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1569 EOF
1570 }
1571
1572
1573
1574 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1575 if test "$with_workshop $with_tooltalk" = "yes no"; then
1576   (echo "$progname: Usage error:"
1577 echo " " "--with-workshop requires --with-tooltalk"
1578 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1579 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1580 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1581 fi
1582
1583 if test "$with_workshop" = "yes"; then
1584   { test "$extra_verbose" = "yes" && cat << \EOF
1585     Defining SUNPRO
1586 EOF
1587 cat >> confdefs.h <<\EOF
1588 #define SUNPRO 1
1589 EOF
1590 }
1591
1592   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1593    echo "    xemacs will be linked with \"sunpro.o\""
1594  fi
1595 fi
1596
1597 if test "$with_clash_detection" != "no"; then
1598   { test "$extra_verbose" = "yes" && cat << \EOF
1599     Defining CLASH_DETECTION
1600 EOF
1601 cat >> confdefs.h <<\EOF
1602 #define CLASH_DETECTION 1
1603 EOF
1604 }
1605
1606   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1607    echo "    xemacs will be linked with \"filelock.o\""
1608  fi
1609 fi
1610
1611 test -n "$compiler" && CC="$compiler"
1612 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1613 fi
1614
1615 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1616 if test "${CFLAGS-unset}" != unset
1617   then cflags_specified=yes;
1618   else cflags_specified=no;
1619 fi
1620
1621 xe_save_CFLAGS="$CFLAGS"
1622
1623 # Extract the first word of "gcc", so it can be a program name with args.
1624 set dummy gcc; ac_word=$2
1625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1626 echo "configure:1627: checking for $ac_word" >&5
1627
1628 if test -n "$CC"; then
1629   ac_cv_prog_CC="$CC" # Let the user override the test.
1630 else
1631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1632   ac_dummy="$PATH"
1633   for ac_dir in $ac_dummy; do
1634     test -z "$ac_dir" && ac_dir=.
1635     if test -f $ac_dir/$ac_word; then
1636       ac_cv_prog_CC="gcc"
1637       break
1638     fi
1639   done
1640   IFS="$ac_save_ifs"
1641 fi
1642 CC="$ac_cv_prog_CC"
1643 if test -n "$CC"; then
1644   echo "$ac_t""$CC" 1>&6
1645 else
1646   echo "$ac_t""no" 1>&6
1647 fi
1648
1649 if test -z "$CC"; then
1650   # Extract the first word of "cc", so it can be a program name with args.
1651 set dummy cc; ac_word=$2
1652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1653 echo "configure:1654: checking for $ac_word" >&5
1654
1655 if test -n "$CC"; then
1656   ac_cv_prog_CC="$CC" # Let the user override the test.
1657 else
1658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1659   ac_prog_rejected=no
1660   ac_dummy="$PATH"
1661   for ac_dir in $ac_dummy; do
1662     test -z "$ac_dir" && ac_dir=.
1663     if test -f $ac_dir/$ac_word; then
1664       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1665         ac_prog_rejected=yes
1666         continue
1667       fi
1668       ac_cv_prog_CC="cc"
1669       break
1670     fi
1671   done
1672   IFS="$ac_save_ifs"
1673 if test $ac_prog_rejected = yes; then
1674   # We found a bogon in the path, so make sure we never use it.
1675   set dummy $ac_cv_prog_CC
1676   shift
1677   if test $# -gt 0; then
1678     # We chose a different compiler from the bogus one.
1679     # However, it has the same basename, so the bogon will be chosen
1680     # first if we set CC to just the basename; use the full file name.
1681     shift
1682     set dummy "$ac_dir/$ac_word" "$@"
1683     shift
1684     ac_cv_prog_CC="$@"
1685   fi
1686 fi
1687 fi
1688 CC="$ac_cv_prog_CC"
1689 if test -n "$CC"; then
1690   echo "$ac_t""$CC" 1>&6
1691 else
1692   echo "$ac_t""no" 1>&6
1693 fi
1694
1695   if test -z "$CC"; then
1696     case "`uname -s`" in
1697     *win32* | *WIN32*)
1698       # Extract the first word of "cl", so it can be a program name with args.
1699 set dummy cl; ac_word=$2
1700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1701 echo "configure:1702: checking for $ac_word" >&5
1702
1703 if test -n "$CC"; then
1704   ac_cv_prog_CC="$CC" # Let the user override the test.
1705 else
1706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1707   ac_dummy="$PATH"
1708   for ac_dir in $ac_dummy; do
1709     test -z "$ac_dir" && ac_dir=.
1710     if test -f $ac_dir/$ac_word; then
1711       ac_cv_prog_CC="cl"
1712       break
1713     fi
1714   done
1715   IFS="$ac_save_ifs"
1716 fi
1717 CC="$ac_cv_prog_CC"
1718 if test -n "$CC"; then
1719   echo "$ac_t""$CC" 1>&6
1720 else
1721   echo "$ac_t""no" 1>&6
1722 fi
1723  ;;
1724     esac
1725   fi
1726   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1727 fi
1728
1729 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1730 echo "configure:1731: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1731
1732 ac_ext=c
1733 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1734 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1735 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'
1736 ac_cpp='$CPP '"$xe_cppflags"
1737 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1738 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1739 cross_compiling=no
1740
1741 cat > conftest.$ac_ext << EOF
1742
1743 #line 1744 "configure"
1744 #include "confdefs.h"
1745
1746 main(){return(0);}
1747 EOF
1748 if { (eval echo configure:1749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1749   ac_cv_prog_cc_works=yes
1750   # If we can't run a trivial program, we are probably using a cross compiler.
1751   if (./conftest; exit) 2>/dev/null; then
1752     ac_cv_prog_cc_cross=no
1753   else
1754     ac_cv_prog_cc_cross=yes
1755   fi
1756 else
1757   echo "configure: failed program was:" >&5
1758   cat conftest.$ac_ext >&5
1759   ac_cv_prog_cc_works=no
1760 fi
1761 rm -fr conftest*
1762 ac_ext=c
1763 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1764 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1765 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'
1766 ac_cpp='$CPP '"$xe_cppflags"
1767 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1768 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1769 cross_compiling=no
1770
1771 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1772 if test $ac_cv_prog_cc_works = no; then
1773   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1774 fi
1775 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1776 echo "configure:1777: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1777 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1778 cross_compiling=$ac_cv_prog_cc_cross
1779
1780 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1781 echo "configure:1782: checking whether we are using GNU C" >&5
1782
1783 cat > conftest.c <<EOF
1784 #ifdef __GNUC__
1785   yes;
1786 #endif
1787 EOF
1788 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1789   ac_cv_prog_gcc=yes
1790 else
1791   ac_cv_prog_gcc=no
1792 fi
1793
1794 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1795
1796 if test $ac_cv_prog_gcc = yes; then
1797   GCC=yes
1798 else
1799   GCC=
1800 fi
1801
1802 ac_test_CFLAGS="${CFLAGS+set}"
1803 ac_save_CFLAGS="$CFLAGS"
1804 CFLAGS=
1805 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1806 echo "configure:1807: checking whether ${CC-cc} accepts -g" >&5
1807
1808 echo 'void f(){}' > conftest.c
1809 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1810   ac_cv_prog_cc_g=yes
1811 else
1812   ac_cv_prog_cc_g=no
1813 fi
1814 rm -f conftest*
1815
1816
1817 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1818 if test "$ac_test_CFLAGS" = set; then
1819   CFLAGS="$ac_save_CFLAGS"
1820 elif test $ac_cv_prog_cc_g = yes; then
1821   if test "$GCC" = yes; then
1822     CFLAGS="-g -O2"
1823   else
1824     CFLAGS="-g"
1825   fi
1826 else
1827   if test "$GCC" = yes; then
1828     CFLAGS="-O2"
1829   else
1830     CFLAGS=
1831   fi
1832 fi
1833  
1834 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1835   CC=${NON_GNU_CC-cc}
1836   # Extract the first word of "gcc", so it can be a program name with args.
1837 set dummy gcc; ac_word=$2
1838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1839 echo "configure:1840: checking for $ac_word" >&5
1840
1841 if test -n "$CC"; then
1842   ac_cv_prog_CC="$CC" # Let the user override the test.
1843 else
1844   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1845   ac_dummy="$PATH"
1846   for ac_dir in $ac_dummy; do
1847     test -z "$ac_dir" && ac_dir=.
1848     if test -f $ac_dir/$ac_word; then
1849       ac_cv_prog_CC="gcc"
1850       break
1851     fi
1852   done
1853   IFS="$ac_save_ifs"
1854 fi
1855 CC="$ac_cv_prog_CC"
1856 if test -n "$CC"; then
1857   echo "$ac_t""$CC" 1>&6
1858 else
1859   echo "$ac_t""no" 1>&6
1860 fi
1861
1862 if test -z "$CC"; then
1863   # Extract the first word of "cc", so it can be a program name with args.
1864 set dummy cc; ac_word=$2
1865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_word" >&5
1867
1868 if test -n "$CC"; then
1869   ac_cv_prog_CC="$CC" # Let the user override the test.
1870 else
1871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1872   ac_prog_rejected=no
1873   ac_dummy="$PATH"
1874   for ac_dir in $ac_dummy; do
1875     test -z "$ac_dir" && ac_dir=.
1876     if test -f $ac_dir/$ac_word; then
1877       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1878         ac_prog_rejected=yes
1879         continue
1880       fi
1881       ac_cv_prog_CC="cc"
1882       break
1883     fi
1884   done
1885   IFS="$ac_save_ifs"
1886 if test $ac_prog_rejected = yes; then
1887   # We found a bogon in the path, so make sure we never use it.
1888   set dummy $ac_cv_prog_CC
1889   shift
1890   if test $# -gt 0; then
1891     # We chose a different compiler from the bogus one.
1892     # However, it has the same basename, so the bogon will be chosen
1893     # first if we set CC to just the basename; use the full file name.
1894     shift
1895     set dummy "$ac_dir/$ac_word" "$@"
1896     shift
1897     ac_cv_prog_CC="$@"
1898   fi
1899 fi
1900 fi
1901 CC="$ac_cv_prog_CC"
1902 if test -n "$CC"; then
1903   echo "$ac_t""$CC" 1>&6
1904 else
1905   echo "$ac_t""no" 1>&6
1906 fi
1907
1908   if test -z "$CC"; then
1909     case "`uname -s`" in
1910     *win32* | *WIN32*)
1911       # Extract the first word of "cl", so it can be a program name with args.
1912 set dummy cl; ac_word=$2
1913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1914 echo "configure:1915: checking for $ac_word" >&5
1915
1916 if test -n "$CC"; then
1917   ac_cv_prog_CC="$CC" # Let the user override the test.
1918 else
1919   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1920   ac_dummy="$PATH"
1921   for ac_dir in $ac_dummy; do
1922     test -z "$ac_dir" && ac_dir=.
1923     if test -f $ac_dir/$ac_word; then
1924       ac_cv_prog_CC="cl"
1925       break
1926     fi
1927   done
1928   IFS="$ac_save_ifs"
1929 fi
1930 CC="$ac_cv_prog_CC"
1931 if test -n "$CC"; then
1932   echo "$ac_t""$CC" 1>&6
1933 else
1934   echo "$ac_t""no" 1>&6
1935 fi
1936  ;;
1937     esac
1938   fi
1939   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1940 fi
1941
1942 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1943 echo "configure:1944: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1944
1945 ac_ext=c
1946 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1947 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1948 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'
1949 ac_cpp='$CPP '"$xe_cppflags"
1950 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1951 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1952 cross_compiling=no
1953
1954 cat > conftest.$ac_ext << EOF
1955
1956 #line 1957 "configure"
1957 #include "confdefs.h"
1958
1959 main(){return(0);}
1960 EOF
1961 if { (eval echo configure:1962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1962   ac_cv_prog_cc_works=yes
1963   # If we can't run a trivial program, we are probably using a cross compiler.
1964   if (./conftest; exit) 2>/dev/null; then
1965     ac_cv_prog_cc_cross=no
1966   else
1967     ac_cv_prog_cc_cross=yes
1968   fi
1969 else
1970   echo "configure: failed program was:" >&5
1971   cat conftest.$ac_ext >&5
1972   ac_cv_prog_cc_works=no
1973 fi
1974 rm -fr conftest*
1975 ac_ext=c
1976 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1977 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1978 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'
1979 ac_cpp='$CPP '"$xe_cppflags"
1980 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1981 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1982 cross_compiling=no
1983
1984 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1985 if test $ac_cv_prog_cc_works = no; then
1986   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1987 fi
1988 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1989 echo "configure:1990: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1990 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1991 cross_compiling=$ac_cv_prog_cc_cross
1992
1993 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1994 echo "configure:1995: checking whether we are using GNU C" >&5
1995
1996 cat > conftest.c <<EOF
1997 #ifdef __GNUC__
1998   yes;
1999 #endif
2000 EOF
2001 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2002   ac_cv_prog_gcc=yes
2003 else
2004   ac_cv_prog_gcc=no
2005 fi
2006
2007 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2008
2009 if test $ac_cv_prog_gcc = yes; then
2010   GCC=yes
2011 else
2012   GCC=
2013 fi
2014
2015 ac_test_CFLAGS="${CFLAGS+set}"
2016 ac_save_CFLAGS="$CFLAGS"
2017 CFLAGS=
2018 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2019 echo "configure:2020: checking whether ${CC-cc} accepts -g" >&5
2020
2021 echo 'void f(){}' > conftest.c
2022 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2023   ac_cv_prog_cc_g=yes
2024 else
2025   ac_cv_prog_cc_g=no
2026 fi
2027 rm -f conftest*
2028
2029
2030 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2031 if test "$ac_test_CFLAGS" = set; then
2032   CFLAGS="$ac_save_CFLAGS"
2033 elif test $ac_cv_prog_cc_g = yes; then
2034   if test "$GCC" = yes; then
2035     CFLAGS="-g -O2"
2036   else
2037     CFLAGS="-g"
2038   fi
2039 else
2040   if test "$GCC" = yes; then
2041     CFLAGS="-O2"
2042   else
2043     CFLAGS=
2044   fi
2045 fi
2046
2047 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2048   CC=gcc
2049   # Extract the first word of "gcc", so it can be a program name with args.
2050 set dummy gcc; ac_word=$2
2051 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2052 echo "configure:2053: checking for $ac_word" >&5
2053
2054 if test -n "$CC"; then
2055   ac_cv_prog_CC="$CC" # Let the user override the test.
2056 else
2057   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2058   ac_dummy="$PATH"
2059   for ac_dir in $ac_dummy; do
2060     test -z "$ac_dir" && ac_dir=.
2061     if test -f $ac_dir/$ac_word; then
2062       ac_cv_prog_CC="gcc"
2063       break
2064     fi
2065   done
2066   IFS="$ac_save_ifs"
2067 fi
2068 CC="$ac_cv_prog_CC"
2069 if test -n "$CC"; then
2070   echo "$ac_t""$CC" 1>&6
2071 else
2072   echo "$ac_t""no" 1>&6
2073 fi
2074
2075 if test -z "$CC"; then
2076   # Extract the first word of "cc", so it can be a program name with args.
2077 set dummy cc; ac_word=$2
2078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2079 echo "configure:2080: checking for $ac_word" >&5
2080
2081 if test -n "$CC"; then
2082   ac_cv_prog_CC="$CC" # Let the user override the test.
2083 else
2084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2085   ac_prog_rejected=no
2086   ac_dummy="$PATH"
2087   for ac_dir in $ac_dummy; do
2088     test -z "$ac_dir" && ac_dir=.
2089     if test -f $ac_dir/$ac_word; then
2090       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2091         ac_prog_rejected=yes
2092         continue
2093       fi
2094       ac_cv_prog_CC="cc"
2095       break
2096     fi
2097   done
2098   IFS="$ac_save_ifs"
2099 if test $ac_prog_rejected = yes; then
2100   # We found a bogon in the path, so make sure we never use it.
2101   set dummy $ac_cv_prog_CC
2102   shift
2103   if test $# -gt 0; then
2104     # We chose a different compiler from the bogus one.
2105     # However, it has the same basename, so the bogon will be chosen
2106     # first if we set CC to just the basename; use the full file name.
2107     shift
2108     set dummy "$ac_dir/$ac_word" "$@"
2109     shift
2110     ac_cv_prog_CC="$@"
2111   fi
2112 fi
2113 fi
2114 CC="$ac_cv_prog_CC"
2115 if test -n "$CC"; then
2116   echo "$ac_t""$CC" 1>&6
2117 else
2118   echo "$ac_t""no" 1>&6
2119 fi
2120
2121   if test -z "$CC"; then
2122     case "`uname -s`" in
2123     *win32* | *WIN32*)
2124       # Extract the first word of "cl", so it can be a program name with args.
2125 set dummy cl; ac_word=$2
2126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2127 echo "configure:2128: checking for $ac_word" >&5
2128
2129 if test -n "$CC"; then
2130   ac_cv_prog_CC="$CC" # Let the user override the test.
2131 else
2132   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2133   ac_dummy="$PATH"
2134   for ac_dir in $ac_dummy; do
2135     test -z "$ac_dir" && ac_dir=.
2136     if test -f $ac_dir/$ac_word; then
2137       ac_cv_prog_CC="cl"
2138       break
2139     fi
2140   done
2141   IFS="$ac_save_ifs"
2142 fi
2143 CC="$ac_cv_prog_CC"
2144 if test -n "$CC"; then
2145   echo "$ac_t""$CC" 1>&6
2146 else
2147   echo "$ac_t""no" 1>&6
2148 fi
2149  ;;
2150     esac
2151   fi
2152   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2153 fi
2154
2155 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2156 echo "configure:2157: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2157
2158 ac_ext=c
2159 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2160 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2161 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'
2162 ac_cpp='$CPP '"$xe_cppflags"
2163 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2164 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2165 cross_compiling=no
2166
2167 cat > conftest.$ac_ext << EOF
2168
2169 #line 2170 "configure"
2170 #include "confdefs.h"
2171
2172 main(){return(0);}
2173 EOF
2174 if { (eval echo configure:2175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2175   ac_cv_prog_cc_works=yes
2176   # If we can't run a trivial program, we are probably using a cross compiler.
2177   if (./conftest; exit) 2>/dev/null; then
2178     ac_cv_prog_cc_cross=no
2179   else
2180     ac_cv_prog_cc_cross=yes
2181   fi
2182 else
2183   echo "configure: failed program was:" >&5
2184   cat conftest.$ac_ext >&5
2185   ac_cv_prog_cc_works=no
2186 fi
2187 rm -fr conftest*
2188 ac_ext=c
2189 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2190 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2191 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'
2192 ac_cpp='$CPP '"$xe_cppflags"
2193 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2194 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2195 cross_compiling=no
2196
2197 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2198 if test $ac_cv_prog_cc_works = no; then
2199   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2200 fi
2201 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2202 echo "configure:2203: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2203 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2204 cross_compiling=$ac_cv_prog_cc_cross
2205
2206 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2207 echo "configure:2208: checking whether we are using GNU C" >&5
2208
2209 cat > conftest.c <<EOF
2210 #ifdef __GNUC__
2211   yes;
2212 #endif
2213 EOF
2214 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2215   ac_cv_prog_gcc=yes
2216 else
2217   ac_cv_prog_gcc=no
2218 fi
2219
2220 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2221
2222 if test $ac_cv_prog_gcc = yes; then
2223   GCC=yes
2224 else
2225   GCC=
2226 fi
2227
2228 ac_test_CFLAGS="${CFLAGS+set}"
2229 ac_save_CFLAGS="$CFLAGS"
2230 CFLAGS=
2231 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2232 echo "configure:2233: checking whether ${CC-cc} accepts -g" >&5
2233
2234 echo 'void f(){}' > conftest.c
2235 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2236   ac_cv_prog_cc_g=yes
2237 else
2238   ac_cv_prog_cc_g=no
2239 fi
2240 rm -f conftest*
2241
2242
2243 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2244 if test "$ac_test_CFLAGS" = set; then
2245   CFLAGS="$ac_save_CFLAGS"
2246 elif test $ac_cv_prog_cc_g = yes; then
2247   if test "$GCC" = yes; then
2248     CFLAGS="-g -O2"
2249   else
2250     CFLAGS="-g"
2251   fi
2252 else
2253   if test "$GCC" = yes; then
2254     CFLAGS="-O2"
2255   else
2256     CFLAGS=
2257   fi
2258 fi
2259
2260 fi
2261 CFLAGS="$xe_save_CFLAGS"
2262
2263
2264 test -n "$CPP" -a -d "$CPP" && CPP=
2265
2266 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2267
2268 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2269 echo "configure:2270: checking how to run the C preprocessor" >&5
2270 # On Suns, sometimes $CPP names a directory.
2271 if test -n "$CPP" && test -d "$CPP"; then
2272   CPP=
2273 fi
2274 if test -z "$CPP"; then
2275
2276   # This must be in double quotes, not single quotes, because CPP may get
2277   # substituted into the Makefile and "${CC-cc}" will confuse make.
2278   CPP="${CC-cc} -E"
2279   # On the NeXT, cc -E runs the code through the compiler's parser,
2280   # not just through cpp.
2281   cat > conftest.$ac_ext <<EOF
2282 #line 2283 "configure"
2283 #include "confdefs.h"
2284 #include <assert.h>
2285 Syntax Error
2286 EOF
2287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2288 { (eval echo configure:2289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2290 if test -z "$ac_err"; then
2291   :
2292 else
2293   echo "$ac_err" >&5
2294   echo "configure: failed program was:" >&5
2295   cat conftest.$ac_ext >&5
2296   rm -rf conftest*
2297   CPP="${CC-cc} -E -traditional-cpp"
2298   cat > conftest.$ac_ext <<EOF
2299 #line 2300 "configure"
2300 #include "confdefs.h"
2301 #include <assert.h>
2302 Syntax Error
2303 EOF
2304 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2305 { (eval echo configure:2306: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2306 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2307 if test -z "$ac_err"; then
2308   :
2309 else
2310   echo "$ac_err" >&5
2311   echo "configure: failed program was:" >&5
2312   cat conftest.$ac_ext >&5
2313   rm -rf conftest*
2314   CPP="${CC-cc} -nologo -E"
2315   cat > conftest.$ac_ext <<EOF
2316 #line 2317 "configure"
2317 #include "confdefs.h"
2318 #include <assert.h>
2319 Syntax Error
2320 EOF
2321 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2322 { (eval echo configure:2323: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2323 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2324 if test -z "$ac_err"; then
2325   :
2326 else
2327   echo "$ac_err" >&5
2328   echo "configure: failed program was:" >&5
2329   cat conftest.$ac_ext >&5
2330   rm -rf conftest*
2331   CPP=/lib/cpp
2332 fi
2333 rm -f conftest*
2334 fi
2335 rm -f conftest*
2336 fi
2337 rm -f conftest*
2338   ac_cv_prog_CPP="$CPP"
2339   CPP="$ac_cv_prog_CPP"
2340 else
2341   ac_cv_prog_CPP="$CPP"
2342 fi
2343 echo "$ac_t""$CPP" 1>&6
2344
2345
2346
2347 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2348 echo "configure:2349: checking for AIX" >&5
2349 cat > conftest.$ac_ext <<EOF
2350 #line 2351 "configure"
2351 #include "confdefs.h"
2352 #ifdef _AIX
2353   yes
2354 #endif
2355
2356 EOF
2357 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2358   egrep "yes" >/dev/null 2>&1; then
2359   rm -rf conftest*
2360   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2361     Defining _ALL_SOURCE
2362 EOF
2363 cat >> confdefs.h <<\EOF
2364 #define _ALL_SOURCE 1
2365 EOF
2366 }
2367
2368 else
2369   rm -rf conftest*
2370   echo "$ac_t""no" 1>&6
2371 fi
2372 rm -f conftest*
2373
2374  
2375
2376 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2377 echo "configure:2378: checking for GNU libc" >&5
2378 cat > conftest.$ac_ext <<EOF
2379 #line 2380 "configure"
2380 #include "confdefs.h"
2381 #include <features.h>
2382 int main() {
2383
2384 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2385 #error Not a GNU libc system :-(
2386 ******* ======= ******** &&&&&&&&
2387 #endif
2388
2389 ; return 0; }
2390 EOF
2391 if { (eval echo configure:2392: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2392   rm -rf conftest*
2393   have_glibc=yes
2394 else
2395   echo "configure: failed program was:" >&5
2396   cat conftest.$ac_ext >&5
2397   rm -rf conftest*
2398   have_glibc=no
2399 fi
2400 rm -f conftest*
2401 echo "$ac_t""$have_glibc" 1>&6
2402 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2403     Defining _GNU_SOURCE
2404 EOF
2405 cat >> confdefs.h <<\EOF
2406 #define _GNU_SOURCE 1
2407 EOF
2408 }
2409
2410
2411 case "$opsys" in
2412   sol2)
2413    { test "$extra_verbose" = "yes" && cat << \EOF
2414     Defining __EXTENSIONS__
2415 EOF
2416 cat >> confdefs.h <<\EOF
2417 #define __EXTENSIONS__ 1
2418 EOF
2419 }
2420
2421       if test "$os_release" -ge 55; then
2422      { test "$extra_verbose" = "yes" && cat << \EOF
2423     Defining _XOPEN_SOURCE = 500
2424 EOF
2425 cat >> confdefs.h <<\EOF
2426 #define _XOPEN_SOURCE 500
2427 EOF
2428 }
2429
2430      { test "$extra_verbose" = "yes" && cat << \EOF
2431     Defining _XOPEN_SOURCE_EXTENDED
2432 EOF
2433 cat >> confdefs.h <<\EOF
2434 #define _XOPEN_SOURCE_EXTENDED 1
2435 EOF
2436 }
2437
2438    fi ;;
2439   linux)
2440     { test "$extra_verbose" = "yes" && cat << \EOF
2441     Defining _POSIX_C_SOURCE = 199506L
2442 EOF
2443 cat >> confdefs.h <<\EOF
2444 #define _POSIX_C_SOURCE 199506L
2445 EOF
2446 }
2447
2448     { test "$extra_verbose" = "yes" && cat << \EOF
2449     Defining _XOPEN_SOURCE = 500
2450 EOF
2451 cat >> confdefs.h <<\EOF
2452 #define _XOPEN_SOURCE 500
2453 EOF
2454 }
2455
2456     { test "$extra_verbose" = "yes" && cat << \EOF
2457     Defining _XOPEN_SOURCE_EXTENDED
2458 EOF
2459 cat >> confdefs.h <<\EOF
2460 #define _XOPEN_SOURCE_EXTENDED 1
2461 EOF
2462 }
2463
2464     ;;
2465 esac
2466
2467 cat > conftest.$ac_ext <<EOF
2468 #line 2469 "configure"
2469 #include "confdefs.h"
2470 int main () {
2471 #if defined __SUNPRO_C
2472 return 11;
2473 #elif defined __DECC
2474 return 12;
2475 #elif defined __USLC__ && defined __SCO_VERSION__
2476 return 13;
2477 #else
2478 return 0;
2479 #endif
2480 }
2481 EOF
2482 if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2483 then
2484   :
2485 else
2486   conftest_rc="$?"
2487   echo "configure: failed program was:" >&5
2488   cat conftest.$ac_ext >&5
2489   rm -fr conftest*
2490   case "$conftest_rc" in
2491   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2492   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2493   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2494 esac
2495 fi
2496 rm -fr conftest*
2497
2498
2499
2500
2501 echo "Extracting information from the machine- and system-dependent headers..."
2502
2503 tempcname="conftest.c"
2504
2505
2506
2507 cat > $tempcname < confdefs.h
2508 cat >> $tempcname <<EOF
2509 #define NOT_C_CODE
2510 #define C_SWITCH_SITE
2511 #define C_SWITCH_X_SITE
2512 #define LD_SWITCH_SITE
2513 #define LD_SWITCH_X_SITE
2514 #define LD_SWITCH_X_SITE_AUX
2515 #define OS_RELEASE $os_release
2516
2517 #ifdef config_opsysfile
2518 #include "$srcdir/src/$opsysfile"
2519 #endif
2520
2521 #ifdef config_machfile
2522 #include "$srcdir/src/$machfile"
2523 #endif
2524
2525 #ifndef LIBS_MACHINE
2526 #define LIBS_MACHINE
2527 #endif
2528 configure___ libs_machine=LIBS_MACHINE
2529
2530 #ifndef LIBS_SYSTEM
2531 #define LIBS_SYSTEM
2532 #endif
2533 configure___ libs_system=LIBS_SYSTEM
2534
2535 #ifndef LIBS_TERMCAP
2536 #define LIBS_TERMCAP
2537 #endif
2538 configure___ libs_termcap=LIBS_TERMCAP
2539
2540 #ifndef LIB_STANDARD
2541 #define LIB_STANDARD
2542 #endif
2543 configure___ libs_standard=LIB_STANDARD
2544
2545
2546 #ifndef OBJECTS_MACHINE
2547 #define OBJECTS_MACHINE
2548 #endif
2549 configure___ objects_machine=OBJECTS_MACHINE
2550
2551 #ifndef OBJECTS_SYSTEM
2552 #define OBJECTS_SYSTEM
2553 #endif
2554 configure___ objects_system=OBJECTS_SYSTEM
2555
2556
2557 #ifndef C_SWITCH_MACHINE
2558 #define C_SWITCH_MACHINE
2559 #endif
2560 configure___ c_switch_machine=C_SWITCH_MACHINE
2561
2562 #ifndef C_SWITCH_SYSTEM
2563 #define C_SWITCH_SYSTEM
2564 #endif
2565 configure___ c_switch_system=C_SWITCH_SYSTEM
2566
2567
2568 #ifndef LD_SWITCH_MACHINE
2569 #define LD_SWITCH_MACHINE
2570 #endif
2571 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2572
2573 #ifndef LD_SWITCH_SYSTEM
2574 #define LD_SWITCH_SYSTEM
2575 #endif
2576 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2577
2578
2579 #ifndef UNEXEC
2580 #define UNEXEC "unexec.o"
2581 #endif
2582 configure___ unexec=UNEXEC
2583
2584
2585 #ifndef LD_SWITCH_SHARED
2586 #define LD_SWITCH_SHARED "-c"
2587 #endif
2588 configure___ ld_switch_shared=LD_SWITCH_SHARED
2589
2590
2591 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2592 configure___ ordinary_ld=ORDINARY_LD
2593
2594 #ifdef ORDINARY_LINK
2595 #define LD ORDINARY_LD
2596 #else /* no ORDINARY LINK */
2597 #ifdef COFF_ENCAPSULATE
2598 #define LD "\$(CC) -nostdlib"
2599 #else /* not COFF_ENCAPSULATE */
2600 #ifdef LINKER
2601 #define LD LINKER
2602 #else /* ! defined (LINKER) */
2603 #define LD "ld"
2604 #endif /* ! defined (LINKER) */
2605 #endif /* ! defined (COFF_ENCAPSULATE) */
2606 #endif /* not ORDINARY_LINK */
2607 configure___ ld=LD
2608
2609 #ifndef LIB_GCC
2610 #define LIB_GCC
2611 #endif
2612 configure___ lib_gcc=LIB_GCC
2613
2614 #ifndef LD_TEXT_START_ADDR
2615 #define LD_TEXT_START_ADDR
2616 #endif
2617 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2618
2619
2620 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2621 #ifdef NO_REMAP
2622 #ifdef COFF_ENCAPSULATE
2623 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2624 #else /* ! defined (COFF_ENCAPSULATE) */
2625 #define START_FILES "pre-crt0.o /lib/crt0.o"
2626 #endif /* ! defined (COFF_ENCAPSULATE) */
2627 #else /* ! defined (NO_REMAP) */
2628 #define START_FILES "ecrt0.o"
2629 #endif /* ! defined (NO_REMAP) */
2630 #endif /* no ORDINARY_LINK */
2631 #ifndef START_FILES
2632 #define START_FILES
2633 #endif
2634 configure___ start_files=START_FILES
2635
2636 #ifdef ORDINARY_LINK
2637 configure___ ordinary_link=yes
2638 #else
2639 configure___ ordinary_link=no
2640 #endif
2641
2642 #ifdef SYSTEM_MALLOC
2643 configure___ system_malloc=yes
2644 #else
2645 configure___ system_malloc=no
2646 #endif
2647
2648 #ifdef TERMINFO
2649 configure___ have_terminfo=yes
2650 #else
2651 configure___ have_terminfo=no
2652 #endif
2653
2654 #ifdef MAIL_USE_FLOCK
2655 configure___ mail_use_flock=yes
2656 #else
2657 configure___ mail_use_flock=no
2658 #endif
2659
2660 #ifdef MAIL_USE_LOCKF
2661 configure___ mail_use_lockf=yes
2662 #else
2663 configure___ mail_use_lockf=no
2664 #endif
2665
2666 #ifdef MAIL_USE_LOCKING
2667 configure___ mail_use_locking=yes
2668 #else
2669 configure___ mail_use_locking=no
2670 #endif
2671
2672 #ifdef HAVE_WIN32_PROCESSES
2673 configure___ win32_processes=yes
2674 #else
2675 configure___ win32_processes=no
2676 #endif
2677
2678 EOF
2679
2680 CPP=`eval "echo $CPP $CPPFLAGS"`
2681 eval `$CPP -Isrc $tempcname \
2682         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2683
2684 rm $tempcname
2685
2686 if test "$pdump" = "yes"; then
2687   ordinary_link="yes"
2688   ld="${ordinary_ld}"
2689   start_files=
2690   libs_standard=
2691   unexec=
2692   lib_gcc=
2693 fi
2694
2695 test "$extra_verbose" = "yes" && \
2696   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 ""
2697
2698 case "$opsys" in mingw* | cygwin*)
2699   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2700   cygwin_include=`eval "dirname $cygwin_include"` ;
2701   cygwin_include="-I$cygwin_include/../include" ;
2702   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2703   case "$opsys" in mingw*)
2704     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2705   esac
2706   ;;
2707 esac
2708
2709 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2710
2711
2712 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2713
2714 if test "$__USLC__" = yes; then
2715   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2716 echo "configure:2717: checking for whether the -Kalloca compiler flag is needed" >&5
2717   need_kalloca=no
2718   cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721
2722 int main() {
2723 void *x = alloca(4);
2724 ; return 0; }
2725 EOF
2726 if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2727   rm -rf conftest*
2728   :
2729 else
2730   echo "configure: failed program was:" >&5
2731   cat conftest.$ac_ext >&5
2732   rm -rf conftest*
2733   
2734     xe_save_c_switch_system="$c_switch_system"
2735     c_switch_system="$c_switch_system -Kalloca"
2736     cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739
2740 int main() {
2741 void *x = alloca(4);
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2745   rm -rf conftest*
2746    need_kalloca=yes 
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750 fi
2751 rm -f conftest*
2752     c_switch_system="$xe_save_c_switch_system"
2753 fi
2754 rm -f conftest*
2755   echo "$ac_t""$need_kalloca" 1>&6
2756   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
2757 fi
2758
2759 if test "$cflags_specified" = "no"; then
2760       if   test "$GCC" = "yes"; then
2761     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2762         CFLAGS="$CFLAGS -Wsign-compare"
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 
6420       -D__STDC__*) ;;
6421       -D* )
6422         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6423         case "$word" in
6424           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6425           *     ) val=1 ;;
6426         esac
6427         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6428           if test "$val" = "1"
6429             then { test "$extra_verbose" = "yes" && cat << EOF
6430     Defining $sym
6431 EOF
6432 cat >> confdefs.h <<EOF
6433 #define $sym 1
6434 EOF
6435 }
6436
6437             else { test "$extra_verbose" = "yes" && cat << EOF
6438     Defining $sym = $val
6439 EOF
6440 cat >> confdefs.h <<EOF
6441 #define $sym $val
6442 EOF
6443 }
6444
6445           fi
6446         fi  ;;
6447       esac
6448     done
6449   fi
6450
6451     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6452 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6453 echo "configure:6454: checking for X11/Intrinsic.h" >&5
6454
6455 cat > conftest.$ac_ext <<EOF
6456 #line 6457 "configure"
6457 #include "confdefs.h"
6458 #include <X11/Intrinsic.h>
6459 EOF
6460 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6461 { (eval echo configure:6462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6462 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6463 if test -z "$ac_err"; then
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=yes"
6466 else
6467   echo "$ac_err" >&5
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   eval "ac_cv_header_$ac_safe=no"
6472 fi
6473 rm -f conftest*
6474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6475   echo "$ac_t""yes" 1>&6
6476   :
6477 else
6478   echo "$ac_t""no" 1>&6
6479 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6480 fi
6481
6482
6483       
6484 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6485 echo "configure:6486: checking for XOpenDisplay in -lX11" >&5
6486 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6487
6488 xe_check_libs=" -lX11 "
6489 cat > conftest.$ac_ext <<EOF
6490 #line 6491 "configure"
6491 #include "confdefs.h"
6492 /* Override any gcc2 internal prototype to avoid an error.  */
6493 /* We use char because int might match the return type of a gcc2
6494     builtin and then its argument prototype would still apply.  */
6495 char XOpenDisplay();
6496
6497 int main() {
6498 XOpenDisplay()
6499 ; return 0; }
6500 EOF
6501 if { (eval echo configure:6502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6502   rm -rf conftest*
6503   eval "ac_cv_lib_$ac_lib_var=yes"
6504 else
6505   echo "configure: failed program was:" >&5
6506   cat conftest.$ac_ext >&5
6507   rm -rf conftest*
6508   eval "ac_cv_lib_$ac_lib_var=no"
6509 fi
6510 rm -f conftest*
6511 xe_check_libs=""
6512
6513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6514   echo "$ac_t""yes" 1>&6
6515   have_lib_x11=yes
6516 else
6517   echo "$ac_t""no" 1>&6
6518 fi
6519
6520
6521   if test "$have_lib_x11" != "yes"; then
6522     
6523 xe_msg_checking="for XGetFontProperty in -lX11"
6524 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6525 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6526 echo "configure:6527: checking "$xe_msg_checking"" >&5
6527 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6528
6529 xe_check_libs=" -lX11 -b i486-linuxaout"
6530 cat > conftest.$ac_ext <<EOF
6531 #line 6532 "configure"
6532 #include "confdefs.h"
6533 /* Override any gcc2 internal prototype to avoid an error.  */
6534 /* We use char because int might match the return type of a gcc2
6535     builtin and then its argument prototype would still apply.  */
6536 char XGetFontProperty();
6537
6538 int main() {
6539 XGetFontProperty()
6540 ; return 0; }
6541 EOF
6542 if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6543   rm -rf conftest*
6544   eval "ac_cv_lib_$ac_lib_var=yes"
6545 else
6546   echo "configure: failed program was:" >&5
6547   cat conftest.$ac_ext >&5
6548   rm -rf conftest*
6549   eval "ac_cv_lib_$ac_lib_var=no"
6550 fi
6551 rm -f conftest*
6552 xe_check_libs=""
6553
6554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6555   echo "$ac_t""yes" 1>&6
6556   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6557 else
6558   echo "$ac_t""no" 1>&6
6559 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6560 fi
6561
6562
6563   fi
6564   libs_x="-lX11"
6565   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6566
6567     
6568 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6569 echo "configure:6570: checking for XShapeSelectInput in -lXext" >&5
6570 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6571
6572 xe_check_libs=" -lXext "
6573 cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 /* We use char because int might match the return type of a gcc2
6578     builtin and then its argument prototype would still apply.  */
6579 char XShapeSelectInput();
6580
6581 int main() {
6582 XShapeSelectInput()
6583 ; return 0; }
6584 EOF
6585 if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6586   rm -rf conftest*
6587   eval "ac_cv_lib_$ac_lib_var=yes"
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   eval "ac_cv_lib_$ac_lib_var=no"
6593 fi
6594 rm -f conftest*
6595 xe_check_libs=""
6596
6597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6598   echo "$ac_t""yes" 1>&6
6599   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6600 else
6601   echo "$ac_t""no" 1>&6
6602 fi
6603
6604
6605
6606     
6607 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6608 echo "configure:6609: checking for XtOpenDisplay in -lXt" >&5
6609 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6610
6611 xe_check_libs=" -lXt "
6612 cat > conftest.$ac_ext <<EOF
6613 #line 6614 "configure"
6614 #include "confdefs.h"
6615 /* Override any gcc2 internal prototype to avoid an error.  */
6616 /* We use char because int might match the return type of a gcc2
6617     builtin and then its argument prototype would still apply.  */
6618 char XtOpenDisplay();
6619
6620 int main() {
6621 XtOpenDisplay()
6622 ; return 0; }
6623 EOF
6624 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6625   rm -rf conftest*
6626   eval "ac_cv_lib_$ac_lib_var=yes"
6627 else
6628   echo "configure: failed program was:" >&5
6629   cat conftest.$ac_ext >&5
6630   rm -rf conftest*
6631   eval "ac_cv_lib_$ac_lib_var=no"
6632 fi
6633 rm -f conftest*
6634 xe_check_libs=""
6635
6636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6637   echo "$ac_t""yes" 1>&6
6638   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6639 else
6640   echo "$ac_t""no" 1>&6
6641 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6642 fi
6643
6644
6645
6646   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6647 echo "configure:6648: checking the version of X11 being used" >&5
6648   cat > conftest.$ac_ext <<EOF
6649 #line 6650 "configure"
6650 #include "confdefs.h"
6651 #include <X11/Intrinsic.h>
6652     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6655 then
6656   ./conftest foobar; x11_release=$?
6657 else
6658   conftest_rc="$?"
6659   echo "configure: failed program was:" >&5
6660   cat conftest.$ac_ext >&5
6661   rm -fr conftest*
6662   x11_release=4
6663 fi
6664 rm -fr conftest*
6665   echo "$ac_t""R${x11_release}" 1>&6
6666   { test "$extra_verbose" = "yes" && cat << EOF
6667     Defining THIS_IS_X11R${x11_release}
6668 EOF
6669 cat >> confdefs.h <<EOF
6670 #define THIS_IS_X11R${x11_release} 1
6671 EOF
6672 }
6673
6674
6675   if test "${x11_release}" = "4"; then
6676     case "$with_widgets" in
6677       "" | "no") with_widgets=no ;;
6678       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6679     esac
6680   fi
6681
6682   for ac_func in XConvertCase
6683 do
6684 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6685 echo "configure:6686: checking for $ac_func" >&5
6686
6687 cat > conftest.$ac_ext <<EOF
6688 #line 6689 "configure"
6689 #include "confdefs.h"
6690 /* System header to define __stub macros and hopefully few prototypes,
6691     which can conflict with char $ac_func(); below.  */
6692 #include <assert.h>
6693 /* Override any gcc2 internal prototype to avoid an error.  */
6694 /* We use char because int might match the return type of a gcc2
6695     builtin and then its argument prototype would still apply.  */
6696 char $ac_func();
6697
6698 int main() {
6699
6700 /* The GNU C library defines this for functions which it implements
6701     to always fail with ENOSYS.  Some functions are actually named
6702     something starting with __ and the normal name is an alias.  */
6703 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6704 choke me
6705 #else
6706 $ac_func();
6707 #endif
6708
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_func_$ac_func=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_func_$ac_func=no"
6719 fi
6720 rm -f conftest*
6721
6722 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6723   echo "$ac_t""yes" 1>&6
6724     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6725   { test "$extra_verbose" = "yes" && cat << EOF
6726     Defining $ac_tr_func
6727 EOF
6728 cat >> confdefs.h <<EOF
6729 #define $ac_tr_func 1
6730 EOF
6731 }
6732  
6733 else
6734   echo "$ac_t""no" 1>&6
6735 fi
6736 done
6737
6738
6739   for ac_hdr in X11/Xlocale.h
6740 do
6741 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6742 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6743 echo "configure:6744: checking for $ac_hdr" >&5
6744
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 #include <$ac_hdr>
6749 EOF
6750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6751 { (eval echo configure:6752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6753 if test -z "$ac_err"; then
6754   rm -rf conftest*
6755   eval "ac_cv_header_$ac_safe=yes"
6756 else
6757   echo "$ac_err" >&5
6758   echo "configure: failed program was:" >&5
6759   cat conftest.$ac_ext >&5
6760   rm -rf conftest*
6761   eval "ac_cv_header_$ac_safe=no"
6762 fi
6763 rm -f conftest*
6764 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6765   echo "$ac_t""yes" 1>&6
6766     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6767   { test "$extra_verbose" = "yes" && cat << EOF
6768     Defining $ac_tr_hdr
6769 EOF
6770 cat >> confdefs.h <<EOF
6771 #define $ac_tr_hdr 1
6772 EOF
6773 }
6774  
6775 else
6776   echo "$ac_t""no" 1>&6
6777 fi
6778 done
6779
6780
6781     for ac_func in XRegisterIMInstantiateCallback
6782 do
6783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6784 echo "configure:6785: checking for $ac_func" >&5
6785
6786 cat > conftest.$ac_ext <<EOF
6787 #line 6788 "configure"
6788 #include "confdefs.h"
6789 /* System header to define __stub macros and hopefully few prototypes,
6790     which can conflict with char $ac_func(); below.  */
6791 #include <assert.h>
6792 /* Override any gcc2 internal prototype to avoid an error.  */
6793 /* We use char because int might match the return type of a gcc2
6794     builtin and then its argument prototype would still apply.  */
6795 char $ac_func();
6796
6797 int main() {
6798
6799 /* The GNU C library defines this for functions which it implements
6800     to always fail with ENOSYS.  Some functions are actually named
6801     something starting with __ and the normal name is an alias.  */
6802 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6803 choke me
6804 #else
6805 $ac_func();
6806 #endif
6807
6808 ; return 0; }
6809 EOF
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6811   rm -rf conftest*
6812   eval "ac_cv_func_$ac_func=yes"
6813 else
6814   echo "configure: failed program was:" >&5
6815   cat conftest.$ac_ext >&5
6816   rm -rf conftest*
6817   eval "ac_cv_func_$ac_func=no"
6818 fi
6819 rm -f conftest*
6820
6821 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6822   echo "$ac_t""yes" 1>&6
6823     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6824   { test "$extra_verbose" = "yes" && cat << EOF
6825     Defining $ac_tr_func
6826 EOF
6827 cat >> confdefs.h <<EOF
6828 #define $ac_tr_func 1
6829 EOF
6830 }
6831  
6832 else
6833   echo "$ac_t""no" 1>&6
6834 fi
6835 done
6836
6837   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6838 echo "configure:6839: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6839   cat > conftest.$ac_ext <<EOF
6840 #line 6841 "configure"
6841 #include "confdefs.h"
6842
6843 #define NeedFunctionPrototypes 1
6844 #include <X11/Xlib.h>
6845 extern Bool XRegisterIMInstantiateCallback(
6846    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6847
6848 int main() {
6849
6850 ; return 0; }
6851 EOF
6852 if { (eval echo configure:6853: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6853   rm -rf conftest*
6854   echo "$ac_t""yes" 1>&6
6855 else
6856   echo "configure: failed program was:" >&5
6857   cat conftest.$ac_ext >&5
6858   rm -rf conftest*
6859   echo "$ac_t""no" 1>&6
6860    { test "$extra_verbose" = "yes" && cat << \EOF
6861     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6862 EOF
6863 cat >> confdefs.h <<\EOF
6864 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6865 EOF
6866 }
6867
6868 fi
6869 rm -f conftest*
6870
6871     test -z "$with_xmu" && { 
6872 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6873 echo "configure:6874: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6874 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6875
6876 xe_check_libs=" -lXmu "
6877 cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880 /* Override any gcc2 internal prototype to avoid an error.  */
6881 /* We use char because int might match the return type of a gcc2
6882     builtin and then its argument prototype would still apply.  */
6883 char XmuReadBitmapDataFromFile();
6884
6885 int main() {
6886 XmuReadBitmapDataFromFile()
6887 ; return 0; }
6888 EOF
6889 if { (eval echo configure:6890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6890   rm -rf conftest*
6891   eval "ac_cv_lib_$ac_lib_var=yes"
6892 else
6893   echo "configure: failed program was:" >&5
6894   cat conftest.$ac_ext >&5
6895   rm -rf conftest*
6896   eval "ac_cv_lib_$ac_lib_var=no"
6897 fi
6898 rm -f conftest*
6899 xe_check_libs=""
6900
6901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6902   echo "$ac_t""yes" 1>&6
6903   with_xmu=yes
6904 else
6905   echo "$ac_t""no" 1>&6
6906 with_xmu=no
6907 fi
6908
6909  }
6910   if test "$with_xmu" = "no"; then
6911     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6912    echo "    xemacs will be linked with \"xmu.o\""
6913  fi
6914   else
6915     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6916     { test "$extra_verbose" = "yes" && cat << \EOF
6917     Defining HAVE_XMU
6918 EOF
6919 cat >> confdefs.h <<\EOF
6920 #define HAVE_XMU 1
6921 EOF
6922 }
6923
6924   fi
6925
6926       
6927 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6928 echo "configure:6929: checking for main in -lXbsd" >&5
6929 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6930
6931 xe_check_libs=" -lXbsd "
6932 cat > conftest.$ac_ext <<EOF
6933 #line 6934 "configure"
6934 #include "confdefs.h"
6935
6936 int main() {
6937 main()
6938 ; return 0; }
6939 EOF
6940 if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6941   rm -rf conftest*
6942   eval "ac_cv_lib_$ac_lib_var=yes"
6943 else
6944   echo "configure: failed program was:" >&5
6945   cat conftest.$ac_ext >&5
6946   rm -rf conftest*
6947   eval "ac_cv_lib_$ac_lib_var=no"
6948 fi
6949 rm -f conftest*
6950 xe_check_libs=""
6951
6952 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6953   echo "$ac_t""yes" 1>&6
6954   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6955 else
6956   echo "$ac_t""no" 1>&6
6957 fi
6958
6959
6960
6961     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6962         if test "$GCC" = "yes"; then
6963       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6964       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6965     else
6966       case "$CC" in
6967         "xlc" ) CC="xlc_r" ;;
6968         "xlC" ) CC="xlC_r" ;;
6969         "cc"  ) CC="cc_r" ;;
6970       esac
6971     fi
6972   fi
6973
6974 fi 
6975 if test "$with_msw" != "no"; then
6976   echo "checking for MS-Windows" 1>&6
6977 echo "configure:6978: checking for MS-Windows" >&5
6978   
6979 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6980 echo "configure:6981: checking for main in -lgdi32" >&5
6981 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6982
6983 xe_check_libs=" -lgdi32 "
6984 cat > conftest.$ac_ext <<EOF
6985 #line 6986 "configure"
6986 #include "confdefs.h"
6987
6988 int main() {
6989 main()
6990 ; return 0; }
6991 EOF
6992 if { (eval echo configure:6993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6993   rm -rf conftest*
6994   eval "ac_cv_lib_$ac_lib_var=yes"
6995 else
6996   echo "configure: failed program was:" >&5
6997   cat conftest.$ac_ext >&5
6998   rm -rf conftest*
6999   eval "ac_cv_lib_$ac_lib_var=no"
7000 fi
7001 rm -f conftest*
7002 xe_check_libs=""
7003
7004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7005   echo "$ac_t""yes" 1>&6
7006   with_msw=yes
7007 else
7008   echo "$ac_t""no" 1>&6
7009 fi
7010
7011
7012   if test "$with_msw" = "yes"; then
7013     { test "$extra_verbose" = "yes" && cat << \EOF
7014     Defining HAVE_MS_WINDOWS
7015 EOF
7016 cat >> confdefs.h <<\EOF
7017 #define HAVE_MS_WINDOWS 1
7018 EOF
7019 }
7020
7021
7022         if test "$with_netinstall" = "yes"; then
7023       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7024       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7025       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7026     fi
7027
7028     install_pp="$blddir/lib-src/installexe.sh"
7029     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
7030     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7031     if test "$window_system" != x11; then
7032         window_system=msw
7033         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7034             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7035    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7036  fi
7037         test "$with_menubars"   != "no" && with_menubars=msw \
7038             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7039    echo "    xemacs will be linked with \"menubar-msw.o\""
7040  fi
7041         test "$with_toolbars"   != "no" && with_toolbars=msw \
7042             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7043    echo "    xemacs will be linked with \"toolbar-msw.o\""
7044  fi
7045         test "$with_dialogs"   != "no" && with_dialogs=msw \
7046             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7047    echo "    xemacs will be linked with \"dialog-msw.o\""
7048  fi
7049         test "$with_widgets"   != "no" && with_widgets=msw
7050     else
7051         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7053  fi
7054         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7055    echo "    xemacs will be linked with \"menubar-msw.o\""
7056  fi
7057         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7058    echo "    xemacs will be linked with \"toolbar-msw.o\""
7059  fi
7060         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7061    echo "    xemacs will be linked with \"dialog-msw.o\""
7062  fi
7063     fi
7064         cat > conftest.$ac_ext <<EOF
7065 #line 7066 "configure"
7066 #include "confdefs.h"
7067 #include <fcntl.h>
7068     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7071 then
7072   { test "$extra_verbose" = "yes" && cat << \EOF
7073     Defining HAVE_MSG_SELECT
7074 EOF
7075 cat >> confdefs.h <<\EOF
7076 #define HAVE_MSG_SELECT 1
7077 EOF
7078 }
7079
7080 else
7081   conftest_rc="$?"
7082   echo "configure: failed program was:" >&5
7083   cat conftest.$ac_ext >&5
7084 fi
7085 rm -fr conftest*
7086     with_file_coding=yes
7087     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
7088    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\""
7089  fi
7090   fi
7091 fi
7092
7093
7094
7095 test -z "$window_system" && window_system="none"
7096
7097 if test "$window_system" = "none"; then
7098   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7099   do
7100     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7101        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7102     fi
7103     eval "with_${feature}=no"
7104   done
7105 else
7106   test -z "$with_toolbars" && with_toolbars=yes
7107 fi
7108
7109 if test "$with_msw" != "yes"; then
7110   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7111   do
7112     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7113        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7114     fi
7115     eval "with_${feature}=no"
7116   done
7117 else
7118   :
7119 fi
7120
7121 if test "$with_x11" != "yes"; then
7122             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7123   do
7124     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7125        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7126     fi
7127     eval "with_${feature}=no"
7128   done
7129 fi
7130
7131 if test "$with_x11" = "yes"; then
7132   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7133 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7134 echo "configure:7135: checking for X11/extensions/shape.h" >&5
7135
7136 cat > conftest.$ac_ext <<EOF
7137 #line 7138 "configure"
7138 #include "confdefs.h"
7139 #include <X11/extensions/shape.h>
7140 EOF
7141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7142 { (eval echo configure:7143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7144 if test -z "$ac_err"; then
7145   rm -rf conftest*
7146   eval "ac_cv_header_$ac_safe=yes"
7147 else
7148   echo "$ac_err" >&5
7149   echo "configure: failed program was:" >&5
7150   cat conftest.$ac_ext >&5
7151   rm -rf conftest*
7152   eval "ac_cv_header_$ac_safe=no"
7153 fi
7154 rm -f conftest*
7155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7156   echo "$ac_t""yes" 1>&6
7157   
7158    { test "$extra_verbose" = "yes" && cat << \EOF
7159     Defining HAVE_BALLOON_HELP
7160 EOF
7161 cat >> confdefs.h <<\EOF
7162 #define HAVE_BALLOON_HELP 1
7163 EOF
7164 }
7165
7166    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7167    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7168  fi
7169 else
7170   echo "$ac_t""no" 1>&6
7171 fi
7172
7173 fi
7174
7175 bitmapdir=
7176
7177 case "$window_system" in
7178   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7179   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7180   gtk  )
7181        HAVE_X_WINDOWS=no
7182        test "$with_gnome" = "yes" && echo "  Using GNOME."
7183        test "$with_gnome" = "no" && echo "  Using GTK."
7184        ;;
7185   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7186 esac
7187
7188 case "$x_libraries" in *X11R4* )
7189   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7190   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7191 esac
7192
7193 echo "checking for WM_COMMAND option" 1>&6
7194 echo "configure:7195: checking for WM_COMMAND option" >&5;
7195 if test "$with_wmcommand" != "no"; then
7196   { test "$extra_verbose" = "yes" && cat << \EOF
7197     Defining HAVE_WMCOMMAND
7198 EOF
7199 cat >> confdefs.h <<\EOF
7200 #define HAVE_WMCOMMAND 1
7201 EOF
7202 }
7203
7204 fi
7205
7206 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7207 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7208 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7209 echo "configure:7210: checking for X11/Xauth.h" >&5
7210
7211 cat > conftest.$ac_ext <<EOF
7212 #line 7213 "configure"
7213 #include "confdefs.h"
7214 #include <X11/Xauth.h>
7215 EOF
7216 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7217 { (eval echo configure:7218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7218 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7219 if test -z "$ac_err"; then
7220   rm -rf conftest*
7221   eval "ac_cv_header_$ac_safe=yes"
7222 else
7223   echo "$ac_err" >&5
7224   echo "configure: failed program was:" >&5
7225   cat conftest.$ac_ext >&5
7226   rm -rf conftest*
7227   eval "ac_cv_header_$ac_safe=no"
7228 fi
7229 rm -f conftest*
7230 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7231   echo "$ac_t""yes" 1>&6
7232   :
7233 else
7234   echo "$ac_t""no" 1>&6
7235 with_xauth=no
7236 fi
7237  }
7238 test -z "$with_xauth" && { 
7239 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7240 echo "configure:7241: checking for XauGetAuthByAddr in -lXau" >&5
7241 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7242
7243 xe_check_libs=" -lXau "
7244 cat > conftest.$ac_ext <<EOF
7245 #line 7246 "configure"
7246 #include "confdefs.h"
7247 /* Override any gcc2 internal prototype to avoid an error.  */
7248 /* We use char because int might match the return type of a gcc2
7249     builtin and then its argument prototype would still apply.  */
7250 char XauGetAuthByAddr();
7251
7252 int main() {
7253 XauGetAuthByAddr()
7254 ; return 0; }
7255 EOF
7256 if { (eval echo configure:7257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7257   rm -rf conftest*
7258   eval "ac_cv_lib_$ac_lib_var=yes"
7259 else
7260   echo "configure: failed program was:" >&5
7261   cat conftest.$ac_ext >&5
7262   rm -rf conftest*
7263   eval "ac_cv_lib_$ac_lib_var=no"
7264 fi
7265 rm -f conftest*
7266 xe_check_libs=""
7267
7268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7269   echo "$ac_t""yes" 1>&6
7270   :
7271 else
7272   echo "$ac_t""no" 1>&6
7273 with_xauth=no
7274 fi
7275
7276  }
7277 test -z "$with_xauth" && with_xauth=yes
7278 if test "$with_xauth" = "yes"; then
7279   { test "$extra_verbose" = "yes" && cat << \EOF
7280     Defining HAVE_XAUTH
7281 EOF
7282 cat >> confdefs.h <<\EOF
7283 #define HAVE_XAUTH 1
7284 EOF
7285 }
7286
7287   
7288 T=""
7289 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
7290 libs_xauth="$T"
7291
7292 fi
7293
7294
7295
7296
7297 if test "$with_tooltalk" != "no" ; then
7298       for dir in "" "Tt/" "desktop/" ; do
7299     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7300 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7301 echo "configure:7302: checking for ${dir}tt_c.h" >&5
7302
7303 cat > conftest.$ac_ext <<EOF
7304 #line 7305 "configure"
7305 #include "confdefs.h"
7306 #include <${dir}tt_c.h>
7307 EOF
7308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7309 { (eval echo configure:7310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7311 if test -z "$ac_err"; then
7312   rm -rf conftest*
7313   eval "ac_cv_header_$ac_safe=yes"
7314 else
7315   echo "$ac_err" >&5
7316   echo "configure: failed program was:" >&5
7317   cat conftest.$ac_ext >&5
7318   rm -rf conftest*
7319   eval "ac_cv_header_$ac_safe=no"
7320 fi
7321 rm -f conftest*
7322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7323   echo "$ac_t""yes" 1>&6
7324   tt_c_h_file="${dir}tt_c.h"; break
7325 else
7326   echo "$ac_t""no" 1>&6
7327 fi
7328
7329   done
7330   if test -z "$tt_c_h_file"; then
7331     if test "$with_tooltalk" = "yes"; then
7332       (echo "$progname: Usage error:"
7333 echo " " "Unable to find required tooltalk header files."
7334 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7335     fi
7336     with_tooltalk=no
7337   fi
7338 fi
7339 if test "$with_tooltalk" != "no" ; then
7340   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7341     
7342 xe_msg_checking="for tt_message_create in -ltt"
7343 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7344 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7345 echo "configure:7346: checking "$xe_msg_checking"" >&5
7346 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7347
7348 xe_check_libs=" -ltt $extra_libs"
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 /* Override any gcc2 internal prototype to avoid an error.  */
7353 /* We use char because int might match the return type of a gcc2
7354     builtin and then its argument prototype would still apply.  */
7355 char tt_message_create();
7356
7357 int main() {
7358 tt_message_create()
7359 ; return 0; }
7360 EOF
7361 if { (eval echo configure:7362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7362   rm -rf conftest*
7363   eval "ac_cv_lib_$ac_lib_var=yes"
7364 else
7365   echo "configure: failed program was:" >&5
7366   cat conftest.$ac_ext >&5
7367   rm -rf conftest*
7368   eval "ac_cv_lib_$ac_lib_var=no"
7369 fi
7370 rm -f conftest*
7371 xe_check_libs=""
7372
7373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7374   echo "$ac_t""yes" 1>&6
7375   tt_libs="-ltt $extra_libs"; break
7376 else
7377   echo "$ac_t""no" 1>&6
7378 :
7379 fi
7380
7381
7382   done
7383   if test -z "$tt_libs"; then
7384     if test "$with_tooltalk" = "yes"; then
7385       (echo "$progname: Usage error:"
7386 echo " " "Unable to find required tooltalk libraries."
7387 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7388     fi
7389     with_tooltalk=no
7390   fi
7391 fi
7392 test -z "$with_tooltalk" && with_tooltalk=yes
7393 if test "$with_tooltalk" = "yes"; then
7394   { test "$extra_verbose" = "yes" && cat << \EOF
7395     Defining TOOLTALK
7396 EOF
7397 cat >> confdefs.h <<\EOF
7398 #define TOOLTALK 1
7399 EOF
7400 }
7401
7402   { test "$extra_verbose" = "yes" && cat << EOF
7403     Defining TT_C_H_FILE = "$tt_c_h_file"
7404 EOF
7405 cat >> confdefs.h <<EOF
7406 #define TT_C_H_FILE "$tt_c_h_file"
7407 EOF
7408 }
7409
7410   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7411   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7412    echo "    xemacs will be linked with \"tooltalk.o\""
7413  fi
7414 fi
7415
7416 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7417 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7418 echo "configure:7419: checking for Dt/Dt.h" >&5
7419
7420 cat > conftest.$ac_ext <<EOF
7421 #line 7422 "configure"
7422 #include "confdefs.h"
7423 #include <Dt/Dt.h>
7424 EOF
7425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7426 { (eval echo configure:7427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7428 if test -z "$ac_err"; then
7429   rm -rf conftest*
7430   eval "ac_cv_header_$ac_safe=yes"
7431 else
7432   echo "$ac_err" >&5
7433   echo "configure: failed program was:" >&5
7434   cat conftest.$ac_ext >&5
7435   rm -rf conftest*
7436   eval "ac_cv_header_$ac_safe=no"
7437 fi
7438 rm -f conftest*
7439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7440   echo "$ac_t""yes" 1>&6
7441   :
7442 else
7443   echo "$ac_t""no" 1>&6
7444 with_cde=no
7445 fi
7446  }
7447 test -z "$with_cde" && { 
7448 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7449 echo "configure:7450: checking for DtDndDragStart in -lDtSvc" >&5
7450 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7451
7452 xe_check_libs=" -lDtSvc "
7453 cat > conftest.$ac_ext <<EOF
7454 #line 7455 "configure"
7455 #include "confdefs.h"
7456 /* Override any gcc2 internal prototype to avoid an error.  */
7457 /* We use char because int might match the return type of a gcc2
7458     builtin and then its argument prototype would still apply.  */
7459 char DtDndDragStart();
7460
7461 int main() {
7462 DtDndDragStart()
7463 ; return 0; }
7464 EOF
7465 if { (eval echo configure:7466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7466   rm -rf conftest*
7467   eval "ac_cv_lib_$ac_lib_var=yes"
7468 else
7469   echo "configure: failed program was:" >&5
7470   cat conftest.$ac_ext >&5
7471   rm -rf conftest*
7472   eval "ac_cv_lib_$ac_lib_var=no"
7473 fi
7474 rm -f conftest*
7475 xe_check_libs=""
7476
7477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7478   echo "$ac_t""yes" 1>&6
7479   :
7480 else
7481   echo "$ac_t""no" 1>&6
7482 with_cde=no
7483 fi
7484
7485  }
7486 test -z "$with_cde" && with_cde=yes
7487 if test "$with_dragndrop" = no; then
7488   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7489   with_cde=no
7490 fi
7491 if test "$with_cde" = "yes" ; then
7492   { test "$extra_verbose" = "yes" && cat << \EOF
7493     Defining HAVE_CDE
7494 EOF
7495 cat >> confdefs.h <<\EOF
7496 #define HAVE_CDE 1
7497 EOF
7498 }
7499
7500   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7501   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7502   with_tooltalk=yes # CDE requires Tooltalk
7503   need_motif=yes    # CDE requires Motif
7504 fi
7505
7506 test "$window_system" != "x11" && with_offix=no
7507 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7508   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7509   with_offix=no
7510 fi
7511 if test "$with_dragndrop" = no; then
7512   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7513   with_offix=no
7514 fi
7515 if test "$with_cde" = yes; then
7516   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7517   with_offix=no
7518 fi
7519 test -z "$with_offix" && with_offix=no
7520 if test "$with_offix" = "yes"; then
7521   { test "$extra_verbose" = "yes" && cat << \EOF
7522     Defining HAVE_OFFIX_DND
7523 EOF
7524 cat >> confdefs.h <<\EOF
7525 #define HAVE_OFFIX_DND 1
7526 EOF
7527 }
7528
7529   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7530   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7531 fi
7532 if test "$with_gtk" = "yes"; then
7533    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7534 fi
7535
7536 if test "$with_dragndrop" != "no" ; then
7537   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7538 echo "configure:7539: checking if drag and drop API is needed" >&5
7539   if test -n "$dragndrop_proto" ; then
7540     with_dragndrop=yes
7541     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7542     { test "$extra_verbose" = "yes" && cat << \EOF
7543     Defining HAVE_DRAGNDROP
7544 EOF
7545 cat >> confdefs.h <<\EOF
7546 #define HAVE_DRAGNDROP 1
7547 EOF
7548 }
7549
7550     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7551   else
7552     with_dragndrop=no
7553     echo "$ac_t""no" 1>&6
7554   fi
7555 fi
7556
7557 echo "checking for LDAP" 1>&6
7558 echo "configure:7559: checking for LDAP" >&5
7559 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7560 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7561 echo "configure:7562: checking for ldap.h" >&5
7562
7563 cat > conftest.$ac_ext <<EOF
7564 #line 7565 "configure"
7565 #include "confdefs.h"
7566 #include <ldap.h>
7567 EOF
7568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7569 { (eval echo configure:7570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7571 if test -z "$ac_err"; then
7572   rm -rf conftest*
7573   eval "ac_cv_header_$ac_safe=yes"
7574 else
7575   echo "$ac_err" >&5
7576   echo "configure: failed program was:" >&5
7577   cat conftest.$ac_ext >&5
7578   rm -rf conftest*
7579   eval "ac_cv_header_$ac_safe=no"
7580 fi
7581 rm -f conftest*
7582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7583   echo "$ac_t""yes" 1>&6
7584   :
7585 else
7586   echo "$ac_t""no" 1>&6
7587 with_ldap=no
7588 fi
7589  }
7590 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7591 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7592 echo "configure:7593: checking for lber.h" >&5
7593
7594 cat > conftest.$ac_ext <<EOF
7595 #line 7596 "configure"
7596 #include "confdefs.h"
7597 #include <lber.h>
7598 EOF
7599 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7600 { (eval echo configure:7601: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7601 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7602 if test -z "$ac_err"; then
7603   rm -rf conftest*
7604   eval "ac_cv_header_$ac_safe=yes"
7605 else
7606   echo "$ac_err" >&5
7607   echo "configure: failed program was:" >&5
7608   cat conftest.$ac_ext >&5
7609   rm -rf conftest*
7610   eval "ac_cv_header_$ac_safe=no"
7611 fi
7612 rm -f conftest*
7613 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7614   echo "$ac_t""yes" 1>&6
7615   :
7616 else
7617   echo "$ac_t""no" 1>&6
7618 with_ldap=no
7619 fi
7620  }
7621 if test "$with_ldap" != "no"; then
7622   
7623 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7624 echo "configure:7625: checking for ldap_search in -lldap" >&5
7625 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7626
7627 xe_check_libs=" -lldap "
7628 cat > conftest.$ac_ext <<EOF
7629 #line 7630 "configure"
7630 #include "confdefs.h"
7631 /* Override any gcc2 internal prototype to avoid an error.  */
7632 /* We use char because int might match the return type of a gcc2
7633     builtin and then its argument prototype would still apply.  */
7634 char ldap_search();
7635
7636 int main() {
7637 ldap_search()
7638 ; return 0; }
7639 EOF
7640 if { (eval echo configure:7641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7641   rm -rf conftest*
7642   eval "ac_cv_lib_$ac_lib_var=yes"
7643 else
7644   echo "configure: failed program was:" >&5
7645   cat conftest.$ac_ext >&5
7646   rm -rf conftest*
7647   eval "ac_cv_lib_$ac_lib_var=no"
7648 fi
7649 rm -f conftest*
7650 xe_check_libs=""
7651
7652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7653   echo "$ac_t""yes" 1>&6
7654   with_ldap_nolber=yes
7655 else
7656   echo "$ac_t""no" 1>&6
7657 with_ldap_nolber=no
7658 fi
7659
7660
7661   test "$with_ldap_nolber" = "no" && { 
7662 xe_msg_checking="for ldap_open in -lldap"
7663 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7664 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7665 echo "configure:7666: checking "$xe_msg_checking"" >&5
7666 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7667
7668 xe_check_libs=" -lldap -llber"
7669 cat > conftest.$ac_ext <<EOF
7670 #line 7671 "configure"
7671 #include "confdefs.h"
7672 /* Override any gcc2 internal prototype to avoid an error.  */
7673 /* We use char because int might match the return type of a gcc2
7674     builtin and then its argument prototype would still apply.  */
7675 char ldap_open();
7676
7677 int main() {
7678 ldap_open()
7679 ; return 0; }
7680 EOF
7681 if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7682   rm -rf conftest*
7683   eval "ac_cv_lib_$ac_lib_var=yes"
7684 else
7685   echo "configure: failed program was:" >&5
7686   cat conftest.$ac_ext >&5
7687   rm -rf conftest*
7688   eval "ac_cv_lib_$ac_lib_var=no"
7689 fi
7690 rm -f conftest*
7691 xe_check_libs=""
7692
7693 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7694   echo "$ac_t""yes" 1>&6
7695   with_ldap_lber=yes
7696 else
7697   echo "$ac_t""no" 1>&6
7698 with_ldap_lber=no
7699 fi
7700
7701  }
7702   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7703 xe_msg_checking="for ldap_open in -lldap"
7704 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7705 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7706 echo "configure:7707: checking "$xe_msg_checking"" >&5
7707 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7708
7709 xe_check_libs=" -lldap -llber -lkrb"
7710 cat > conftest.$ac_ext <<EOF
7711 #line 7712 "configure"
7712 #include "confdefs.h"
7713 /* Override any gcc2 internal prototype to avoid an error.  */
7714 /* We use char because int might match the return type of a gcc2
7715     builtin and then its argument prototype would still apply.  */
7716 char ldap_open();
7717
7718 int main() {
7719 ldap_open()
7720 ; return 0; }
7721 EOF
7722 if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7723   rm -rf conftest*
7724   eval "ac_cv_lib_$ac_lib_var=yes"
7725 else
7726   echo "configure: failed program was:" >&5
7727   cat conftest.$ac_ext >&5
7728   rm -rf conftest*
7729   eval "ac_cv_lib_$ac_lib_var=no"
7730 fi
7731 rm -f conftest*
7732 xe_check_libs=""
7733
7734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7735   echo "$ac_t""yes" 1>&6
7736   with_ldap_krb=yes
7737 else
7738   echo "$ac_t""no" 1>&6
7739 with_ldap_krb=no
7740 fi
7741
7742  }
7743   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7744 xe_msg_checking="for ldap_open in -lldap"
7745 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7746 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7747 echo "configure:7748: checking "$xe_msg_checking"" >&5
7748 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7749
7750 xe_check_libs=" -lldap -llber -lkrb -ldes"
7751 cat > conftest.$ac_ext <<EOF
7752 #line 7753 "configure"
7753 #include "confdefs.h"
7754 /* Override any gcc2 internal prototype to avoid an error.  */
7755 /* We use char because int might match the return type of a gcc2
7756     builtin and then its argument prototype would still apply.  */
7757 char ldap_open();
7758
7759 int main() {
7760 ldap_open()
7761 ; return 0; }
7762 EOF
7763 if { (eval echo configure:7764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7764   rm -rf conftest*
7765   eval "ac_cv_lib_$ac_lib_var=yes"
7766 else
7767   echo "configure: failed program was:" >&5
7768   cat conftest.$ac_ext >&5
7769   rm -rf conftest*
7770   eval "ac_cv_lib_$ac_lib_var=no"
7771 fi
7772 rm -f conftest*
7773 xe_check_libs=""
7774
7775 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7776   echo "$ac_t""yes" 1>&6
7777   with_ldap_krbdes=yes
7778 else
7779   echo "$ac_t""no" 1>&6
7780 with_ldap_krbdes=no
7781 fi
7782
7783  }
7784   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
7785 fi
7786 if test "$with_ldap" = "yes"; then
7787   { test "$extra_verbose" = "yes" && cat << \EOF
7788     Defining HAVE_LDAP
7789 EOF
7790 cat >> confdefs.h <<\EOF
7791 #define HAVE_LDAP 1
7792 EOF
7793 }
7794
7795   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7796    echo "    xemacs will be linked with \"eldap.o\""
7797  fi
7798   if test "$with_ldap_nolber" = "yes" ; then
7799     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7800   else
7801     if test "$with_ldap_krb" = "yes" ; then
7802       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7803     fi
7804     if test "$with_ldap_krbdes" = "yes" ; then
7805       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7806       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7807     fi
7808     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7809     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7810   fi
7811   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7812 do
7813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7814 echo "configure:7815: checking for $ac_func" >&5
7815
7816 cat > conftest.$ac_ext <<EOF
7817 #line 7818 "configure"
7818 #include "confdefs.h"
7819 /* System header to define __stub macros and hopefully few prototypes,
7820     which can conflict with char $ac_func(); below.  */
7821 #include <assert.h>
7822 /* Override any gcc2 internal prototype to avoid an error.  */
7823 /* We use char because int might match the return type of a gcc2
7824     builtin and then its argument prototype would still apply.  */
7825 char $ac_func();
7826
7827 int main() {
7828
7829 /* The GNU C library defines this for functions which it implements
7830     to always fail with ENOSYS.  Some functions are actually named
7831     something starting with __ and the normal name is an alias.  */
7832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7833 choke me
7834 #else
7835 $ac_func();
7836 #endif
7837
7838 ; return 0; }
7839 EOF
7840 if { (eval echo configure:7841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7841   rm -rf conftest*
7842   eval "ac_cv_func_$ac_func=yes"
7843 else
7844   echo "configure: failed program was:" >&5
7845   cat conftest.$ac_ext >&5
7846   rm -rf conftest*
7847   eval "ac_cv_func_$ac_func=no"
7848 fi
7849 rm -f conftest*
7850
7851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7852   echo "$ac_t""yes" 1>&6
7853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7854   { test "$extra_verbose" = "yes" && cat << EOF
7855     Defining $ac_tr_func
7856 EOF
7857 cat >> confdefs.h <<EOF
7858 #define $ac_tr_func 1
7859 EOF
7860 }
7861  
7862 else
7863   echo "$ac_t""no" 1>&6
7864 fi
7865 done
7866
7867 fi
7868
7869 if test "$with_postgresql" != "no"; then
7870   echo "checking for PostgreSQL" 1>&6
7871 echo "configure:7872: checking for PostgreSQL" >&5
7872
7873   for header_dir in "" "pgsql/" "postgresql/"; do
7874     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7875 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7876 echo "configure:7877: checking for ${header_dir}libpq-fe.h" >&5
7877
7878 cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <${header_dir}libpq-fe.h>
7882 EOF
7883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7884 { (eval echo configure:7885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7886 if test -z "$ac_err"; then
7887   rm -rf conftest*
7888   eval "ac_cv_header_$ac_safe=yes"
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   eval "ac_cv_header_$ac_safe=no"
7895 fi
7896 rm -f conftest*
7897 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7898   echo "$ac_t""yes" 1>&6
7899   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7900 else
7901   echo "$ac_t""no" 1>&6
7902 fi
7903
7904   done
7905
7906   test -n "$libpq_fe_h_file" && { 
7907 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7908 echo "configure:7909: checking for PQconnectdb in -lpq" >&5
7909 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7910
7911 xe_check_libs=" -lpq "
7912 cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 /* Override any gcc2 internal prototype to avoid an error.  */
7916 /* We use char because int might match the return type of a gcc2
7917     builtin and then its argument prototype would still apply.  */
7918 char PQconnectdb();
7919
7920 int main() {
7921 PQconnectdb()
7922 ; return 0; }
7923 EOF
7924 if { (eval echo configure:7925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7925   rm -rf conftest*
7926   eval "ac_cv_lib_$ac_lib_var=yes"
7927 else
7928   echo "configure: failed program was:" >&5
7929   cat conftest.$ac_ext >&5
7930   rm -rf conftest*
7931   eval "ac_cv_lib_$ac_lib_var=no"
7932 fi
7933 rm -f conftest*
7934 xe_check_libs=""
7935
7936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7937   echo "$ac_t""yes" 1>&6
7938   have_libpq=yes
7939 else
7940   echo "$ac_t""no" 1>&6
7941 fi
7942
7943  }
7944
7945   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7946     with_postgresql=yes
7947     { test "$extra_verbose" = "yes" && cat << \EOF
7948     Defining HAVE_POSTGRESQL
7949 EOF
7950 cat >> confdefs.h <<\EOF
7951 #define HAVE_POSTGRESQL 1
7952 EOF
7953 }
7954
7955     
7956 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7957 echo "configure:7958: checking for PQconnectStart in -lpq" >&5
7958 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7959
7960 xe_check_libs=" -lpq "
7961 cat > conftest.$ac_ext <<EOF
7962 #line 7963 "configure"
7963 #include "confdefs.h"
7964 /* Override any gcc2 internal prototype to avoid an error.  */
7965 /* We use char because int might match the return type of a gcc2
7966     builtin and then its argument prototype would still apply.  */
7967 char PQconnectStart();
7968
7969 int main() {
7970 PQconnectStart()
7971 ; return 0; }
7972 EOF
7973 if { (eval echo configure:7974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7974   rm -rf conftest*
7975   eval "ac_cv_lib_$ac_lib_var=yes"
7976 else
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_lib_$ac_lib_var=no"
7981 fi
7982 rm -f conftest*
7983 xe_check_libs=""
7984
7985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7986   echo "$ac_t""yes" 1>&6
7987   with_postgresqlv7=yes;
7988                  { test "$extra_verbose" = "yes" && cat << \EOF
7989     Defining HAVE_POSTGRESQLV7
7990 EOF
7991 cat >> confdefs.h <<\EOF
7992 #define HAVE_POSTGRESQLV7 1
7993 EOF
7994 }
7995
7996 else
7997   echo "$ac_t""no" 1>&6
7998 fi
7999
8000
8001     { test "$extra_verbose" = "yes" && cat << EOF
8002     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8003 EOF
8004 cat >> confdefs.h <<EOF
8005 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8006 EOF
8007 }
8008
8009     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8010     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8011    echo "    xemacs will be linked with \"postgresql.o\""
8012  fi
8013   elif test "$with_postgresql" = "yes"; then
8014     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8015   fi
8016 fi
8017
8018
8019 if test "$window_system" != "none"; then
8020   echo "checking for graphics libraries" 1>&6
8021 echo "configure:8022: checking for graphics libraries" >&5
8022
8023     xpm_problem=""
8024   if test -z "$with_xpm"; then
8025     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8026 echo "configure:8027: checking for Xpm - no older than 3.4f" >&5
8027     xe_check_libs=-lXpm
8028     cat > conftest.$ac_ext <<EOF
8029 #line 8030 "configure"
8030 #include "confdefs.h"
8031 #define XPM_NUMBERS
8032 #include <X11/xpm.h>
8033     int main(int c, char **v) {
8034     return c == 1 ? 0 :
8035       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8036       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8037 EOF
8038 if { (eval echo configure:8039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8039 then
8040   ./conftest dummy_arg; xpm_status=$?;
8041       if test "$xpm_status" = "0"; then
8042         with_xpm=yes;
8043       else
8044         with_xpm=no;
8045         if test "$xpm_status" = "1"; then
8046           xpm_problem="Xpm library version and header file version don't match!"
8047         elif test "$xpm_status" = "2"; then
8048           xpm_problem="Xpm library version is too old!"
8049         else
8050           xpm_problem="Internal xpm detection logic error!"
8051         fi
8052         echo "
8053 *** WARNING *** $xpm_problem
8054   I'm not touching that with a 10-foot pole!
8055   If you really want to use the installed version of Xpm, rerun
8056   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8057     fi
8058 else
8059   conftest_rc="$?"
8060   echo "configure: failed program was:" >&5
8061   cat conftest.$ac_ext >&5
8062   rm -fr conftest*
8063   with_xpm=no
8064 fi
8065 rm -fr conftest*
8066     xe_check_libs=
8067     echo "$ac_t""$with_xpm" 1>&6
8068   fi
8069   if test "$with_xpm" = "yes"; then
8070                 { test "$extra_verbose" = "yes" && cat << \EOF
8071     Defining HAVE_XPM
8072 EOF
8073 cat >> confdefs.h <<\EOF
8074 #define HAVE_XPM 1
8075 EOF
8076 }
8077
8078     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8079     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8080 echo "configure:8081: checking for \"FOR_MSW\" xpm" >&5
8081     xe_check_libs=-lXpm
8082     cat > conftest.$ac_ext <<EOF
8083 #line 8084 "configure"
8084 #include "confdefs.h"
8085
8086 int main() {
8087 XpmCreatePixmapFromData()
8088 ; return 0; }
8089 EOF
8090 if { (eval echo configure:8091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8091   rm -rf conftest*
8092   xpm_for_msw=no
8093 else
8094   echo "configure: failed program was:" >&5
8095   cat conftest.$ac_ext >&5
8096   rm -rf conftest*
8097   xpm_for_msw=yes
8098 fi
8099 rm -f conftest*
8100     xe_check_libs=
8101     echo "$ac_t""$xpm_for_msw" 1>&6
8102     if test "$xpm_for_msw" = "yes"; then
8103       { test "$extra_verbose" = "yes" && cat << \EOF
8104     Defining FOR_MSW
8105 EOF
8106 cat >> confdefs.h <<\EOF
8107 #define FOR_MSW 1
8108 EOF
8109 }
8110
8111     fi
8112   fi
8113
8114     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8115 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8116 echo "configure:8117: checking for compface.h" >&5
8117
8118 cat > conftest.$ac_ext <<EOF
8119 #line 8120 "configure"
8120 #include "confdefs.h"
8121 #include <compface.h>
8122 EOF
8123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8124 { (eval echo configure:8125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8126 if test -z "$ac_err"; then
8127   rm -rf conftest*
8128   eval "ac_cv_header_$ac_safe=yes"
8129 else
8130   echo "$ac_err" >&5
8131   echo "configure: failed program was:" >&5
8132   cat conftest.$ac_ext >&5
8133   rm -rf conftest*
8134   eval "ac_cv_header_$ac_safe=no"
8135 fi
8136 rm -f conftest*
8137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8138   echo "$ac_t""yes" 1>&6
8139   :
8140 else
8141   echo "$ac_t""no" 1>&6
8142 with_xface=no
8143 fi
8144  }
8145   test -z "$with_xface" && { 
8146 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8147 echo "configure:8148: checking for UnGenFace in -lcompface" >&5
8148 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8149
8150 xe_check_libs=" -lcompface "
8151 cat > conftest.$ac_ext <<EOF
8152 #line 8153 "configure"
8153 #include "confdefs.h"
8154 /* Override any gcc2 internal prototype to avoid an error.  */
8155 /* We use char because int might match the return type of a gcc2
8156     builtin and then its argument prototype would still apply.  */
8157 char UnGenFace();
8158
8159 int main() {
8160 UnGenFace()
8161 ; return 0; }
8162 EOF
8163 if { (eval echo configure:8164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8164   rm -rf conftest*
8165   eval "ac_cv_lib_$ac_lib_var=yes"
8166 else
8167   echo "configure: failed program was:" >&5
8168   cat conftest.$ac_ext >&5
8169   rm -rf conftest*
8170   eval "ac_cv_lib_$ac_lib_var=no"
8171 fi
8172 rm -f conftest*
8173 xe_check_libs=""
8174
8175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8176   echo "$ac_t""yes" 1>&6
8177   : 
8178 else
8179   echo "$ac_t""no" 1>&6
8180 with_xface=no
8181 fi
8182
8183  }
8184   test -z "$with_xface" && with_xface=yes
8185   if test "$with_xface" = "yes"; then
8186     { test "$extra_verbose" = "yes" && cat << \EOF
8187     Defining HAVE_XFACE
8188 EOF
8189 cat >> confdefs.h <<\EOF
8190 #define HAVE_XFACE 1
8191 EOF
8192 }
8193
8194     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8195   fi
8196
8197         if test "$with_gif" != "no"; then
8198     with_gif="yes"
8199     { test "$extra_verbose" = "yes" && cat << \EOF
8200     Defining HAVE_GIF
8201 EOF
8202 cat >> confdefs.h <<\EOF
8203 #define HAVE_GIF 1
8204 EOF
8205 }
8206
8207     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8208    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8209  fi
8210   fi
8211
8212       if test "$with_png $with_tiff" != "no no"; then
8213     
8214 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8215 echo "configure:8216: checking for inflate in -lc" >&5
8216 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8217
8218 xe_check_libs=" -lc "
8219 cat > conftest.$ac_ext <<EOF
8220 #line 8221 "configure"
8221 #include "confdefs.h"
8222 /* Override any gcc2 internal prototype to avoid an error.  */
8223 /* We use char because int might match the return type of a gcc2
8224     builtin and then its argument prototype would still apply.  */
8225 char inflate();
8226
8227 int main() {
8228 inflate()
8229 ; return 0; }
8230 EOF
8231 if { (eval echo configure:8232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8232   rm -rf conftest*
8233   eval "ac_cv_lib_$ac_lib_var=yes"
8234 else
8235   echo "configure: failed program was:" >&5
8236   cat conftest.$ac_ext >&5
8237   rm -rf conftest*
8238   eval "ac_cv_lib_$ac_lib_var=no"
8239 fi
8240 rm -f conftest*
8241 xe_check_libs=""
8242
8243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8244   echo "$ac_t""yes" 1>&6
8245   :
8246 else
8247   echo "$ac_t""no" 1>&6
8248
8249 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8250 echo "configure:8251: checking for inflate in -lz" >&5
8251 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8252
8253 xe_check_libs=" -lz "
8254 cat > conftest.$ac_ext <<EOF
8255 #line 8256 "configure"
8256 #include "confdefs.h"
8257 /* Override any gcc2 internal prototype to avoid an error.  */
8258 /* We use char because int might match the return type of a gcc2
8259     builtin and then its argument prototype would still apply.  */
8260 char inflate();
8261
8262 int main() {
8263 inflate()
8264 ; return 0; }
8265 EOF
8266 if { (eval echo configure:8267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=yes"
8269 else
8270   echo "configure: failed program was:" >&5
8271   cat conftest.$ac_ext >&5
8272   rm -rf conftest*
8273   eval "ac_cv_lib_$ac_lib_var=no"
8274 fi
8275 rm -f conftest*
8276 xe_check_libs=""
8277
8278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8279   echo "$ac_t""yes" 1>&6
8280   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8281 else
8282   echo "$ac_t""no" 1>&6
8283
8284 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8285 echo "configure:8286: checking for inflate in -lgz" >&5
8286 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8287
8288 xe_check_libs=" -lgz "
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char inflate();
8296
8297 int main() {
8298 inflate()
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=yes"
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=no"
8309 fi
8310 rm -f conftest*
8311 xe_check_libs=""
8312
8313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8314   echo "$ac_t""yes" 1>&6
8315   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8316 else
8317   echo "$ac_t""no" 1>&6
8318 fi
8319
8320
8321 fi
8322
8323
8324 fi
8325
8326
8327   fi
8328
8329     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8330 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8331 echo "configure:8332: checking for jpeglib.h" >&5
8332
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 #include <jpeglib.h>
8337 EOF
8338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8339 { (eval echo configure:8340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8341 if test -z "$ac_err"; then
8342   rm -rf conftest*
8343   eval "ac_cv_header_$ac_safe=yes"
8344 else
8345   echo "$ac_err" >&5
8346   echo "configure: failed program was:" >&5
8347   cat conftest.$ac_ext >&5
8348   rm -rf conftest*
8349   eval "ac_cv_header_$ac_safe=no"
8350 fi
8351 rm -f conftest*
8352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8353   echo "$ac_t""yes" 1>&6
8354   :
8355 else
8356   echo "$ac_t""no" 1>&6
8357 with_jpeg=no
8358 fi
8359  }
8360   test -z "$with_jpeg" && { 
8361 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8362 echo "configure:8363: checking for jpeg_destroy_decompress in -ljpeg" >&5
8363 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8364
8365 xe_check_libs=" -ljpeg "
8366 cat > conftest.$ac_ext <<EOF
8367 #line 8368 "configure"
8368 #include "confdefs.h"
8369 /* Override any gcc2 internal prototype to avoid an error.  */
8370 /* We use char because int might match the return type of a gcc2
8371     builtin and then its argument prototype would still apply.  */
8372 char jpeg_destroy_decompress();
8373
8374 int main() {
8375 jpeg_destroy_decompress()
8376 ; return 0; }
8377 EOF
8378 if { (eval echo configure:8379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8379   rm -rf conftest*
8380   eval "ac_cv_lib_$ac_lib_var=yes"
8381 else
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_lib_$ac_lib_var=no"
8386 fi
8387 rm -f conftest*
8388 xe_check_libs=""
8389
8390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8391   echo "$ac_t""yes" 1>&6
8392   :
8393 else
8394   echo "$ac_t""no" 1>&6
8395 with_jpeg=no
8396 fi
8397
8398  }
8399   test -z "$with_jpeg" && with_jpeg=yes
8400   if test "$with_jpeg" = "yes"; then
8401     { test "$extra_verbose" = "yes" && cat << \EOF
8402     Defining HAVE_JPEG
8403 EOF
8404 cat >> confdefs.h <<\EOF
8405 #define HAVE_JPEG 1
8406 EOF
8407 }
8408
8409     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8410   fi
8411
8412     png_problem=""
8413   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8414 echo "configure:8415: checking for pow" >&5
8415
8416 cat > conftest.$ac_ext <<EOF
8417 #line 8418 "configure"
8418 #include "confdefs.h"
8419 /* System header to define __stub macros and hopefully few prototypes,
8420     which can conflict with char pow(); below.  */
8421 #include <assert.h>
8422 /* Override any gcc2 internal prototype to avoid an error.  */
8423 /* We use char because int might match the return type of a gcc2
8424     builtin and then its argument prototype would still apply.  */
8425 char pow();
8426
8427 int main() {
8428
8429 /* The GNU C library defines this for functions which it implements
8430     to always fail with ENOSYS.  Some functions are actually named
8431     something starting with __ and the normal name is an alias.  */
8432 #if defined (__stub_pow) || defined (__stub___pow)
8433 choke me
8434 #else
8435 pow();
8436 #endif
8437
8438 ; return 0; }
8439 EOF
8440 if { (eval echo configure:8441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8441   rm -rf conftest*
8442   eval "ac_cv_func_pow=yes"
8443 else
8444   echo "configure: failed program was:" >&5
8445   cat conftest.$ac_ext >&5
8446   rm -rf conftest*
8447   eval "ac_cv_func_pow=no"
8448 fi
8449 rm -f conftest*
8450
8451 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8452   echo "$ac_t""yes" 1>&6
8453   :
8454 else
8455   echo "$ac_t""no" 1>&6
8456 with_png=no
8457 fi
8458  }
8459   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8460 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8461 echo "configure:8462: checking for png.h" >&5
8462
8463 cat > conftest.$ac_ext <<EOF
8464 #line 8465 "configure"
8465 #include "confdefs.h"
8466 #include <png.h>
8467 EOF
8468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8469 { (eval echo configure:8470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8471 if test -z "$ac_err"; then
8472   rm -rf conftest*
8473   eval "ac_cv_header_$ac_safe=yes"
8474 else
8475   echo "$ac_err" >&5
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   eval "ac_cv_header_$ac_safe=no"
8480 fi
8481 rm -f conftest*
8482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8483   echo "$ac_t""yes" 1>&6
8484   :
8485 else
8486   echo "$ac_t""no" 1>&6
8487 with_png=no
8488 fi
8489  }
8490   test -z "$with_png" && { 
8491 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8492 echo "configure:8493: checking for png_read_image in -lpng" >&5
8493 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8494
8495 xe_check_libs=" -lpng "
8496 cat > conftest.$ac_ext <<EOF
8497 #line 8498 "configure"
8498 #include "confdefs.h"
8499 /* Override any gcc2 internal prototype to avoid an error.  */
8500 /* We use char because int might match the return type of a gcc2
8501     builtin and then its argument prototype would still apply.  */
8502 char png_read_image();
8503
8504 int main() {
8505 png_read_image()
8506 ; return 0; }
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8509   rm -rf conftest*
8510   eval "ac_cv_lib_$ac_lib_var=yes"
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -rf conftest*
8515   eval "ac_cv_lib_$ac_lib_var=no"
8516 fi
8517 rm -f conftest*
8518 xe_check_libs=""
8519
8520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8521   echo "$ac_t""yes" 1>&6
8522   :
8523 else
8524   echo "$ac_t""no" 1>&6
8525 with_png=no
8526 fi
8527
8528  }
8529   if test -z "$with_png"; then
8530     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8531 echo "configure:8532: checking for workable png version information" >&5
8532     xe_check_libs="-lpng -lz"
8533     cat > conftest.$ac_ext <<EOF
8534 #line 8535 "configure"
8535 #include "confdefs.h"
8536 #include <png.h>
8537     int main(int c, char **v) {
8538     if (c == 1) return 0;
8539     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8540     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8541 EOF
8542 if { (eval echo configure:8543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8543 then
8544   ./conftest dummy_arg; png_status=$?;
8545       if test "$png_status" = "0"; then
8546         with_png=yes;
8547       else
8548         with_png=no;
8549         if test "$png_status" = "1"; then
8550           png_problem="PNG library version and header file don't match!"
8551         elif test "$png_status" = "2"; then
8552           png_problem="PNG library version too old (pre 1.0.2)!"
8553         fi
8554         echo "
8555 *** WARNING *** $png_problem
8556   I'm not touching that with a 10-foot pole!
8557   If you really want to use the installed version of libPNG, rerun
8558   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8559     fi
8560 else
8561   conftest_rc="$?"
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -fr conftest*
8565   with_png=no
8566 fi
8567 rm -fr conftest*
8568     xe_check_libs=
8569     echo "$ac_t""$with_png" 1>&6
8570   fi
8571   if test "$with_png" = "yes"; then
8572     { test "$extra_verbose" = "yes" && cat << \EOF
8573     Defining HAVE_PNG
8574 EOF
8575 cat >> confdefs.h <<\EOF
8576 #define HAVE_PNG 1
8577 EOF
8578 }
8579
8580     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8581   fi
8582
8583     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8584 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8585 echo "configure:8586: checking for tiffio.h" >&5
8586
8587 cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 #include <tiffio.h>
8591 EOF
8592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8593 { (eval echo configure:8594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8595 if test -z "$ac_err"; then
8596   rm -rf conftest*
8597   eval "ac_cv_header_$ac_safe=yes"
8598 else
8599   echo "$ac_err" >&5
8600   echo "configure: failed program was:" >&5
8601   cat conftest.$ac_ext >&5
8602   rm -rf conftest*
8603   eval "ac_cv_header_$ac_safe=no"
8604 fi
8605 rm -f conftest*
8606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8607   echo "$ac_t""yes" 1>&6
8608   :
8609 else
8610   echo "$ac_t""no" 1>&6
8611 with_tiff=no
8612 fi
8613  }
8614   test -z "$with_tiff" && { 
8615 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8616 echo "configure:8617: checking for TIFFClientOpen in -ltiff" >&5
8617 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8618
8619 xe_check_libs=" -ltiff "
8620 cat > conftest.$ac_ext <<EOF
8621 #line 8622 "configure"
8622 #include "confdefs.h"
8623 /* Override any gcc2 internal prototype to avoid an error.  */
8624 /* We use char because int might match the return type of a gcc2
8625     builtin and then its argument prototype would still apply.  */
8626 char TIFFClientOpen();
8627
8628 int main() {
8629 TIFFClientOpen()
8630 ; return 0; }
8631 EOF
8632 if { (eval echo configure:8633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8633   rm -rf conftest*
8634   eval "ac_cv_lib_$ac_lib_var=yes"
8635 else
8636   echo "configure: failed program was:" >&5
8637   cat conftest.$ac_ext >&5
8638   rm -rf conftest*
8639   eval "ac_cv_lib_$ac_lib_var=no"
8640 fi
8641 rm -f conftest*
8642 xe_check_libs=""
8643
8644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8645   echo "$ac_t""yes" 1>&6
8646   :
8647 else
8648   echo "$ac_t""no" 1>&6
8649 with_tiff=no
8650 fi
8651
8652  }
8653   test -z "$with_tiff" && with_tiff=yes
8654   if test "$with_tiff" = "yes"; then
8655     { test "$extra_verbose" = "yes" && cat << \EOF
8656     Defining HAVE_TIFF
8657 EOF
8658 cat >> confdefs.h <<\EOF
8659 #define HAVE_TIFF 1
8660 EOF
8661 }
8662
8663     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8664   fi
8665 fi
8666
8667
8668 if test "$with_gtk" = "yes"; then
8669     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8670 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8671 echo "configure:8672: checking for compface.h" >&5
8672
8673 cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 #include <compface.h>
8677 EOF
8678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8679 { (eval echo configure:8680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8681 if test -z "$ac_err"; then
8682   rm -rf conftest*
8683   eval "ac_cv_header_$ac_safe=yes"
8684 else
8685   echo "$ac_err" >&5
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_header_$ac_safe=no"
8690 fi
8691 rm -f conftest*
8692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8693   echo "$ac_t""yes" 1>&6
8694   :
8695 else
8696   echo "$ac_t""no" 1>&6
8697 with_xface=no
8698 fi
8699  }
8700   test -z "$with_xface" && { 
8701 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8702 echo "configure:8703: checking for UnGenFace in -lcompface" >&5
8703 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8704
8705 xe_check_libs=" -lcompface "
8706 cat > conftest.$ac_ext <<EOF
8707 #line 8708 "configure"
8708 #include "confdefs.h"
8709 /* Override any gcc2 internal prototype to avoid an error.  */
8710 /* We use char because int might match the return type of a gcc2
8711     builtin and then its argument prototype would still apply.  */
8712 char UnGenFace();
8713
8714 int main() {
8715 UnGenFace()
8716 ; return 0; }
8717 EOF
8718 if { (eval echo configure:8719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8719   rm -rf conftest*
8720   eval "ac_cv_lib_$ac_lib_var=yes"
8721 else
8722   echo "configure: failed program was:" >&5
8723   cat conftest.$ac_ext >&5
8724   rm -rf conftest*
8725   eval "ac_cv_lib_$ac_lib_var=no"
8726 fi
8727 rm -f conftest*
8728 xe_check_libs=""
8729
8730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8731   echo "$ac_t""yes" 1>&6
8732   : 
8733 else
8734   echo "$ac_t""no" 1>&6
8735 with_xface=no
8736 fi
8737
8738  }
8739   test -z "$with_xface" && with_xface=yes
8740   if test "$with_xface" = "yes"; then
8741     { test "$extra_verbose" = "yes" && cat << \EOF
8742     Defining HAVE_XFACE
8743 EOF
8744 cat >> confdefs.h <<\EOF
8745 #define HAVE_XFACE 1
8746 EOF
8747 }
8748
8749     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8750   fi
8751 fi
8752
8753
8754
8755 if test "$with_x11" = "yes"; then
8756
8757   echo "checking for X11 graphics libraries" 1>&6
8758 echo "configure:8759: checking for X11 graphics libraries" >&5
8759
8760   echo "checking for the Athena widgets" 1>&6
8761 echo "configure:8762: checking for the Athena widgets" >&5
8762
8763     case "$with_athena" in
8764         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8765     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8766     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8767     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8768     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8769     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8770   esac
8771
8772     if test "$athena_3d" = "no"; then
8773     
8774 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8775 echo "configure:8776: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8776 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8777
8778 xe_check_libs=" -l$athena_variant "
8779 cat > conftest.$ac_ext <<EOF
8780 #line 8781 "configure"
8781 #include "confdefs.h"
8782 /* Override any gcc2 internal prototype to avoid an error.  */
8783 /* We use char because int might match the return type of a gcc2
8784     builtin and then its argument prototype would still apply.  */
8785 char XawScrollbarSetThumb();
8786
8787 int main() {
8788 XawScrollbarSetThumb()
8789 ; return 0; }
8790 EOF
8791 if { (eval echo configure:8792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8792   rm -rf conftest*
8793   eval "ac_cv_lib_$ac_lib_var=yes"
8794 else
8795   echo "configure: failed program was:" >&5
8796   cat conftest.$ac_ext >&5
8797   rm -rf conftest*
8798   eval "ac_cv_lib_$ac_lib_var=no"
8799 fi
8800 rm -f conftest*
8801 xe_check_libs=""
8802
8803 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8804   echo "$ac_t""yes" 1>&6
8805           
8806 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8807 echo "configure:8808: checking for threeDClassRec in -l$athena_variant" >&5
8808 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8809
8810 xe_check_libs=" -l$athena_variant "
8811 cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 /* Override any gcc2 internal prototype to avoid an error.  */
8815 /* We use char because int might match the return type of a gcc2
8816     builtin and then its argument prototype would still apply.  */
8817 char threeDClassRec();
8818
8819 int main() {
8820 threeDClassRec()
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   eval "ac_cv_lib_$ac_lib_var=yes"
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   eval "ac_cv_lib_$ac_lib_var=no"
8831 fi
8832 rm -f conftest*
8833 xe_check_libs=""
8834
8835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8836   echo "$ac_t""yes" 1>&6
8837   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8838 else
8839   echo "$ac_t""no" 1>&6
8840 athena_lib=$athena_variant
8841 fi
8842
8843
8844       
8845 else
8846   echo "$ac_t""no" 1>&6
8847 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8848 fi
8849
8850
8851   else
8852         
8853 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8854 echo "configure:8855: checking for threeDClassRec in -l$athena_variant" >&5
8855 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8856
8857 xe_check_libs=" -l$athena_variant "
8858 cat > conftest.$ac_ext <<EOF
8859 #line 8860 "configure"
8860 #include "confdefs.h"
8861 /* Override any gcc2 internal prototype to avoid an error.  */
8862 /* We use char because int might match the return type of a gcc2
8863     builtin and then its argument prototype would still apply.  */
8864 char threeDClassRec();
8865
8866 int main() {
8867 threeDClassRec()
8868 ; return 0; }
8869 EOF
8870 if { (eval echo configure:8871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8871   rm -rf conftest*
8872   eval "ac_cv_lib_$ac_lib_var=yes"
8873 else
8874   echo "configure: failed program was:" >&5
8875   cat conftest.$ac_ext >&5
8876   rm -rf conftest*
8877   eval "ac_cv_lib_$ac_lib_var=no"
8878 fi
8879 rm -f conftest*
8880 xe_check_libs=""
8881
8882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8883   echo "$ac_t""yes" 1>&6
8884   athena_lib=$athena_variant
8885 else
8886   echo "$ac_t""no" 1>&6
8887 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8888 echo "configure:8889: checking for threeDClassRec in -lXaw" >&5
8889 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8890
8891 xe_check_libs=" -lXaw "
8892 cat > conftest.$ac_ext <<EOF
8893 #line 8894 "configure"
8894 #include "confdefs.h"
8895 /* Override any gcc2 internal prototype to avoid an error.  */
8896 /* We use char because int might match the return type of a gcc2
8897     builtin and then its argument prototype would still apply.  */
8898 char threeDClassRec();
8899
8900 int main() {
8901 threeDClassRec()
8902 ; return 0; }
8903 EOF
8904 if { (eval echo configure:8905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8905   rm -rf conftest*
8906   eval "ac_cv_lib_$ac_lib_var=yes"
8907 else
8908   echo "configure: failed program was:" >&5
8909   cat conftest.$ac_ext >&5
8910   rm -rf conftest*
8911   eval "ac_cv_lib_$ac_lib_var=no"
8912 fi
8913 rm -f conftest*
8914 xe_check_libs=""
8915
8916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8917   echo "$ac_t""yes" 1>&6
8918   athena_lib=Xaw;
8919           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8920         
8921 else
8922   echo "$ac_t""no" 1>&6
8923 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8924 fi
8925
8926
8927 fi
8928
8929
8930   fi
8931
8932     if test "$athena_3d" = "no"; then
8933     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8934 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8935 echo "configure:8936: checking for X11/Xaw/ThreeD.h" >&5
8936
8937 cat > conftest.$ac_ext <<EOF
8938 #line 8939 "configure"
8939 #include "confdefs.h"
8940 #include <X11/Xaw/ThreeD.h>
8941 EOF
8942 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8943 { (eval echo configure:8944: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8944 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8945 if test -z "$ac_err"; then
8946   rm -rf conftest*
8947   eval "ac_cv_header_$ac_safe=yes"
8948 else
8949   echo "$ac_err" >&5
8950   echo "configure: failed program was:" >&5
8951   cat conftest.$ac_ext >&5
8952   rm -rf conftest*
8953   eval "ac_cv_header_$ac_safe=no"
8954 fi
8955 rm -f conftest*
8956 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8957   echo "$ac_t""yes" 1>&6
8958   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8959 else
8960   echo "$ac_t""no" 1>&6
8961 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8962 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8963 echo "configure:8964: checking for X11/Xaw/XawInit.h" >&5
8964
8965 cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968 #include <X11/Xaw/XawInit.h>
8969 EOF
8970 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8971 { (eval echo configure:8972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8972 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8973 if test -z "$ac_err"; then
8974   rm -rf conftest*
8975   eval "ac_cv_header_$ac_safe=yes"
8976 else
8977   echo "$ac_err" >&5
8978   echo "configure: failed program was:" >&5
8979   cat conftest.$ac_ext >&5
8980   rm -rf conftest*
8981   eval "ac_cv_header_$ac_safe=no"
8982 fi
8983 rm -f conftest*
8984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8985   echo "$ac_t""yes" 1>&6
8986   athena_h_path=X11/Xaw
8987 else
8988   echo "$ac_t""no" 1>&6
8989 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8990 fi
8991
8992 fi
8993
8994   else
8995             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8996 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8997 echo "configure:8998: checking for X11/$athena_variant/XawInit.h" >&5
8998
8999 cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002 #include <X11/$athena_variant/XawInit.h>
9003 EOF
9004 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9005 { (eval echo configure:9006: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9006 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9007 if test -z "$ac_err"; then
9008   rm -rf conftest*
9009   eval "ac_cv_header_$ac_safe=yes"
9010 else
9011   echo "$ac_err" >&5
9012   echo "configure: failed program was:" >&5
9013   cat conftest.$ac_ext >&5
9014   rm -rf conftest*
9015   eval "ac_cv_header_$ac_safe=no"
9016 fi
9017 rm -f conftest*
9018 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9019   echo "$ac_t""yes" 1>&6
9020   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9021 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9022 echo "configure:9023: checking for X11/$athena_variant/ThreeD.h" >&5
9023
9024 cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 #include <X11/$athena_variant/ThreeD.h>
9028 EOF
9029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9030 { (eval echo configure:9031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9032 if test -z "$ac_err"; then
9033   rm -rf conftest*
9034   eval "ac_cv_header_$ac_safe=yes"
9035 else
9036   echo "$ac_err" >&5
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_header_$ac_safe=no"
9041 fi
9042 rm -f conftest*
9043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9044   echo "$ac_t""yes" 1>&6
9045   athena_h_path=X11/$athena_variant
9046 else
9047   echo "$ac_t""no" 1>&6
9048 fi
9049
9050 else
9051   echo "$ac_t""no" 1>&6
9052 fi
9053
9054
9055         if test -z "$athena_h_path"; then
9056       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9057 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9058 echo "configure:9059: checking for $athena_variant/XawInit.h" >&5
9059
9060 cat > conftest.$ac_ext <<EOF
9061 #line 9062 "configure"
9062 #include "confdefs.h"
9063 #include <$athena_variant/XawInit.h>
9064 EOF
9065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9066 { (eval echo configure:9067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9068 if test -z "$ac_err"; then
9069   rm -rf conftest*
9070   eval "ac_cv_header_$ac_safe=yes"
9071 else
9072   echo "$ac_err" >&5
9073   echo "configure: failed program was:" >&5
9074   cat conftest.$ac_ext >&5
9075   rm -rf conftest*
9076   eval "ac_cv_header_$ac_safe=no"
9077 fi
9078 rm -f conftest*
9079 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9080   echo "$ac_t""yes" 1>&6
9081   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9082 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9083 echo "configure:9084: checking for $athena_variant/ThreeD.h" >&5
9084
9085 cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088 #include <$athena_variant/ThreeD.h>
9089 EOF
9090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9091 { (eval echo configure:9092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9093 if test -z "$ac_err"; then
9094   rm -rf conftest*
9095   eval "ac_cv_header_$ac_safe=yes"
9096 else
9097   echo "$ac_err" >&5
9098   echo "configure: failed program was:" >&5
9099   cat conftest.$ac_ext >&5
9100   rm -rf conftest*
9101   eval "ac_cv_header_$ac_safe=no"
9102 fi
9103 rm -f conftest*
9104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9105   echo "$ac_t""yes" 1>&6
9106   athena_h_path=$athena_variant
9107 else
9108   echo "$ac_t""no" 1>&6
9109 fi
9110
9111 else
9112   echo "$ac_t""no" 1>&6
9113 fi
9114
9115     fi
9116
9117         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9118       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9119 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9120 echo "configure:9121: checking for X11/Xaw3d/XawInit.h" >&5
9121
9122 cat > conftest.$ac_ext <<EOF
9123 #line 9124 "configure"
9124 #include "confdefs.h"
9125 #include <X11/Xaw3d/XawInit.h>
9126 EOF
9127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9128 { (eval echo configure:9129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9130 if test -z "$ac_err"; then
9131   rm -rf conftest*
9132   eval "ac_cv_header_$ac_safe=yes"
9133 else
9134   echo "$ac_err" >&5
9135   echo "configure: failed program was:" >&5
9136   cat conftest.$ac_ext >&5
9137   rm -rf conftest*
9138   eval "ac_cv_header_$ac_safe=no"
9139 fi
9140 rm -f conftest*
9141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9142   echo "$ac_t""yes" 1>&6
9143   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9144 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9145 echo "configure:9146: checking for X11/Xaw3d/ThreeD.h" >&5
9146
9147 cat > conftest.$ac_ext <<EOF
9148 #line 9149 "configure"
9149 #include "confdefs.h"
9150 #include <X11/Xaw3d/ThreeD.h>
9151 EOF
9152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9153 { (eval echo configure:9154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9155 if test -z "$ac_err"; then
9156   rm -rf conftest*
9157   eval "ac_cv_header_$ac_safe=yes"
9158 else
9159   echo "$ac_err" >&5
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   eval "ac_cv_header_$ac_safe=no"
9164 fi
9165 rm -f conftest*
9166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9167   echo "$ac_t""yes" 1>&6
9168   
9169             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9170             athena_h_path=X11/Xaw3d
9171           
9172 else
9173   echo "$ac_t""no" 1>&6
9174 fi
9175
9176 else
9177   echo "$ac_t""no" 1>&6
9178 fi
9179
9180     fi
9181
9182         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9183       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9184 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9185 echo "configure:9186: checking for Xaw3d/XawInit.h" >&5
9186
9187 cat > conftest.$ac_ext <<EOF
9188 #line 9189 "configure"
9189 #include "confdefs.h"
9190 #include <Xaw3d/XawInit.h>
9191 EOF
9192 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9193 { (eval echo configure:9194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9194 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9195 if test -z "$ac_err"; then
9196   rm -rf conftest*
9197   eval "ac_cv_header_$ac_safe=yes"
9198 else
9199   echo "$ac_err" >&5
9200   echo "configure: failed program was:" >&5
9201   cat conftest.$ac_ext >&5
9202   rm -rf conftest*
9203   eval "ac_cv_header_$ac_safe=no"
9204 fi
9205 rm -f conftest*
9206 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9207   echo "$ac_t""yes" 1>&6
9208   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9209 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9210 echo "configure:9211: checking for Xaw3d/ThreeD.h" >&5
9211
9212 cat > conftest.$ac_ext <<EOF
9213 #line 9214 "configure"
9214 #include "confdefs.h"
9215 #include <Xaw3d/ThreeD.h>
9216 EOF
9217 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9218 { (eval echo configure:9219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9219 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9220 if test -z "$ac_err"; then
9221   rm -rf conftest*
9222   eval "ac_cv_header_$ac_safe=yes"
9223 else
9224   echo "$ac_err" >&5
9225   echo "configure: failed program was:" >&5
9226   cat conftest.$ac_ext >&5
9227   rm -rf conftest*
9228   eval "ac_cv_header_$ac_safe=no"
9229 fi
9230 rm -f conftest*
9231 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9232   echo "$ac_t""yes" 1>&6
9233   
9234             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9235             athena_h_path=Xaw3d
9236           
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241 else
9242   echo "$ac_t""no" 1>&6
9243 fi
9244
9245     fi
9246
9247             if test -z "$athena_h_path"; then
9248       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9249 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9250 echo "configure:9251: checking for X11/Xaw/ThreeD.h" >&5
9251
9252 cat > conftest.$ac_ext <<EOF
9253 #line 9254 "configure"
9254 #include "confdefs.h"
9255 #include <X11/Xaw/ThreeD.h>
9256 EOF
9257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9258 { (eval echo configure:9259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9260 if test -z "$ac_err"; then
9261   rm -rf conftest*
9262   eval "ac_cv_header_$ac_safe=yes"
9263 else
9264   echo "$ac_err" >&5
9265   echo "configure: failed program was:" >&5
9266   cat conftest.$ac_ext >&5
9267   rm -rf conftest*
9268   eval "ac_cv_header_$ac_safe=no"
9269 fi
9270 rm -f conftest*
9271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9272   echo "$ac_t""yes" 1>&6
9273   
9274           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9275           athena_h_path=X11/Xaw
9276         
9277 else
9278   echo "$ac_t""no" 1>&6
9279 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9280 fi
9281
9282     fi
9283   fi
9284
9285     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9286     have_xaw=yes
9287   else
9288     have_xaw=no
9289   fi
9290
9291     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9292 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9293 echo "configure:9294: checking for Xm/Xm.h" >&5
9294
9295 cat > conftest.$ac_ext <<EOF
9296 #line 9297 "configure"
9297 #include "confdefs.h"
9298 #include <Xm/Xm.h>
9299 EOF
9300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9301 { (eval echo configure:9302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9303 if test -z "$ac_err"; then
9304   rm -rf conftest*
9305   eval "ac_cv_header_$ac_safe=yes"
9306 else
9307   echo "$ac_err" >&5
9308   echo "configure: failed program was:" >&5
9309   cat conftest.$ac_ext >&5
9310   rm -rf conftest*
9311   eval "ac_cv_header_$ac_safe=no"
9312 fi
9313 rm -f conftest*
9314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316   
9317 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9318 echo "configure:9319: checking for XmStringFree in -lXm" >&5
9319 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9320
9321 xe_check_libs=" -lXm "
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325 /* Override any gcc2 internal prototype to avoid an error.  */
9326 /* We use char because int might match the return type of a gcc2
9327     builtin and then its argument prototype would still apply.  */
9328 char XmStringFree();
9329
9330 int main() {
9331 XmStringFree()
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=no"
9342 fi
9343 rm -f conftest*
9344 xe_check_libs=""
9345
9346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9347   echo "$ac_t""yes" 1>&6
9348   have_motif=yes
9349 else
9350   echo "$ac_t""no" 1>&6
9351 have_motif=no
9352 fi
9353
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 have_motif=no
9358 fi
9359
9360
9361   if test "$have_motif" = "yes"; then
9362         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9363 echo "configure:9364: checking for Lesstif" >&5
9364     cat > conftest.$ac_ext <<EOF
9365 #line 9366 "configure"
9366 #include "confdefs.h"
9367 #include <Xm/Xm.h>
9368 #ifdef LESSTIF_VERSION
9369 yes
9370 #endif
9371
9372 EOF
9373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9374   egrep "yes" >/dev/null 2>&1; then
9375   rm -rf conftest*
9376   have_lesstif=yes
9377 else
9378   rm -rf conftest*
9379   have_lesstif=no
9380 fi
9381 rm -f conftest*
9382
9383   echo "$ac_t""$have_lesstif" 1>&6
9384   fi
9385
9386 fi 
9387
9388 case "$with_menubars" in "" | "yes" | "athena" )
9389   with_menubars="lucid" ;;
9390 esac
9391 case "$with_dialogs" in "" | "yes" | "lucid" )
9392   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9393   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9394   else with_dialogs=no
9395   fi ;;
9396 esac
9397 case "$with_scrollbars" in "" | "yes" )
9398   with_scrollbars="lucid" ;;
9399 esac
9400 case "$with_widgets" in "" | "yes" | "lucid")
9401   if   test "$have_motif" = "yes"; then with_widgets="motif"
9402   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9403   else with_widgets=no
9404   fi ;;
9405 esac
9406
9407 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9408
9409 case "$all_widgets" in
9410   *athena* )
9411     if test "$have_xaw" != "yes"; then
9412       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9413     fi
9414
9415         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9416
9417         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9418
9419                     { test "$extra_verbose" = "yes" && cat << EOF
9420     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9421 EOF
9422 cat >> confdefs.h <<EOF
9423 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9424 EOF
9425 }
9426
9427     { test "$extra_verbose" = "yes" && cat << EOF
9428     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9429 EOF
9430 cat >> confdefs.h <<EOF
9431 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9432 EOF
9433 }
9434
9435     { test "$extra_verbose" = "yes" && cat << EOF
9436     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9437 EOF
9438 cat >> confdefs.h <<EOF
9439 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9440 EOF
9441 }
9442
9443     { test "$extra_verbose" = "yes" && cat << EOF
9444     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9445 EOF
9446 cat >> confdefs.h <<EOF
9447 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9448 EOF
9449 }
9450
9451     { test "$extra_verbose" = "yes" && cat << EOF
9452     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9453 EOF
9454 cat >> confdefs.h <<EOF
9455 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9456 EOF
9457 }
9458
9459     { test "$extra_verbose" = "yes" && cat << EOF
9460     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9461 EOF
9462 cat >> confdefs.h <<EOF
9463 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9464 EOF
9465 }
9466
9467     { test "$extra_verbose" = "yes" && cat << EOF
9468     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9469 EOF
9470 cat >> confdefs.h <<EOF
9471 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9472 EOF
9473 }
9474
9475     { test "$extra_verbose" = "yes" && cat << EOF
9476     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9477 EOF
9478 cat >> confdefs.h <<EOF
9479 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9480 EOF
9481 }
9482
9483     { test "$extra_verbose" = "yes" && cat << EOF
9484     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9485 EOF
9486 cat >> confdefs.h <<EOF
9487 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9488 EOF
9489 }
9490
9491     { test "$extra_verbose" = "yes" && cat << EOF
9492     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9493 EOF
9494 cat >> confdefs.h <<EOF
9495 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9496 EOF
9497 }
9498
9499
9500     { test "$extra_verbose" = "yes" && cat << \EOF
9501     Defining LWLIB_USES_ATHENA
9502 EOF
9503 cat >> confdefs.h <<\EOF
9504 #define LWLIB_USES_ATHENA 1
9505 EOF
9506 }
9507
9508     { test "$extra_verbose" = "yes" && cat << \EOF
9509     Defining NEED_ATHENA
9510 EOF
9511 cat >> confdefs.h <<\EOF
9512 #define NEED_ATHENA 1
9513 EOF
9514 }
9515
9516     need_athena="yes"
9517
9518     if test "$athena_3d" = "yes"; then
9519       { test "$extra_verbose" = "yes" && cat << \EOF
9520     Defining HAVE_ATHENA_3D
9521 EOF
9522 cat >> confdefs.h <<\EOF
9523 #define HAVE_ATHENA_3D 1
9524 EOF
9525 }
9526
9527     fi
9528   ;;
9529 esac
9530
9531 case "$all_widgets" in *motif* )
9532   { test "$extra_verbose" = "yes" && cat << \EOF
9533     Defining LWLIB_USES_MOTIF
9534 EOF
9535 cat >> confdefs.h <<\EOF
9536 #define LWLIB_USES_MOTIF 1
9537 EOF
9538 }
9539
9540   { test "$extra_verbose" = "yes" && cat << \EOF
9541     Defining NEED_MOTIF
9542 EOF
9543 cat >> confdefs.h <<\EOF
9544 #define NEED_MOTIF 1
9545 EOF
9546 }
9547
9548   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9549   need_motif=yes ;;
9550 esac
9551
9552 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9553 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9554 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9555 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9556         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9557 case "$with_widgets" in athena* )
9558         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;;
9559 esac
9560 case "$all_widgets" in *lucid* )
9561   { test "$extra_verbose" = "yes" && cat << \EOF
9562     Defining NEED_LUCID
9563 EOF
9564 cat >> confdefs.h <<\EOF
9565 #define NEED_LUCID 1
9566 EOF
9567 }
9568
9569   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9570 esac
9571
9572
9573
9574 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9575     Defining LWLIB_SCROLLBARS_ATHENA
9576 EOF
9577 cat >> confdefs.h <<\EOF
9578 #define LWLIB_SCROLLBARS_ATHENA 1
9579 EOF
9580 }
9581
9582 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9583     Defining LWLIB_DIALOGS_ATHENA
9584 EOF
9585 cat >> confdefs.h <<\EOF
9586 #define LWLIB_DIALOGS_ATHENA 1
9587 EOF
9588 }
9589
9590
9591 if test "$athena_3d" = "yes"; then
9592   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9593     Defining LWLIB_SCROLLBARS_ATHENA3D
9594 EOF
9595 cat >> confdefs.h <<\EOF
9596 #define LWLIB_SCROLLBARS_ATHENA3D 1
9597 EOF
9598 }
9599
9600   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9601     Defining LWLIB_DIALOGS_ATHENA3D
9602 EOF
9603 cat >> confdefs.h <<\EOF
9604 #define LWLIB_DIALOGS_ATHENA3D 1
9605 EOF
9606 }
9607
9608 fi
9609
9610 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9611     Defining LWLIB_WIDGETS_ATHENA
9612 EOF
9613 cat >> confdefs.h <<\EOF
9614 #define LWLIB_WIDGETS_ATHENA 1
9615 EOF
9616 }
9617 ;; esac
9618 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9619         { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining LWLIB_TABS_LUCID
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define LWLIB_TABS_LUCID 1
9624 EOF
9625 }
9626
9627
9628 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9629     Defining HAVE_MENUBARS
9630 EOF
9631 cat >> confdefs.h <<\EOF
9632 #define HAVE_MENUBARS 1
9633 EOF
9634 }
9635
9636 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9637     Defining HAVE_SCROLLBARS
9638 EOF
9639 cat >> confdefs.h <<\EOF
9640 #define HAVE_SCROLLBARS 1
9641 EOF
9642 }
9643
9644 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9645     Defining HAVE_DIALOGS
9646 EOF
9647 cat >> confdefs.h <<\EOF
9648 #define HAVE_DIALOGS 1
9649 EOF
9650 }
9651
9652 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9653     Defining HAVE_TOOLBARS
9654 EOF
9655 cat >> confdefs.h <<\EOF
9656 #define HAVE_TOOLBARS 1
9657 EOF
9658 }
9659
9660 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9661     Defining HAVE_WIDGETS
9662 EOF
9663 cat >> confdefs.h <<\EOF
9664 #define HAVE_WIDGETS 1
9665 EOF
9666 }
9667
9668
9669 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining LWLIB_MENUBARS_LUCID
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define LWLIB_MENUBARS_LUCID 1
9674 EOF
9675 }
9676
9677 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9678     Defining LWLIB_SCROLLBARS_LUCID
9679 EOF
9680 cat >> confdefs.h <<\EOF
9681 #define LWLIB_SCROLLBARS_LUCID 1
9682 EOF
9683 }
9684
9685
9686 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9687     Defining LWLIB_MENUBARS_MOTIF
9688 EOF
9689 cat >> confdefs.h <<\EOF
9690 #define LWLIB_MENUBARS_MOTIF 1
9691 EOF
9692 }
9693
9694 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9695     Defining LWLIB_SCROLLBARS_MOTIF
9696 EOF
9697 cat >> confdefs.h <<\EOF
9698 #define LWLIB_SCROLLBARS_MOTIF 1
9699 EOF
9700 }
9701
9702 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9703     Defining LWLIB_DIALOGS_MOTIF
9704 EOF
9705 cat >> confdefs.h <<\EOF
9706 #define LWLIB_DIALOGS_MOTIF 1
9707 EOF
9708 }
9709
9710 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9711     Defining LWLIB_WIDGETS_MOTIF
9712 EOF
9713 cat >> confdefs.h <<\EOF
9714 #define LWLIB_WIDGETS_MOTIF 1
9715 EOF
9716 }
9717
9718
9719 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9720    echo "    xemacs will be linked with \"menubar.o\""
9721  fi
9722 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9723    echo "    xemacs will be linked with \"scrollbar.o\""
9724  fi
9725 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9726    echo "    xemacs will be linked with \"dialog.o\""
9727  fi
9728 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9729    echo "    xemacs will be linked with \"toolbar.o\""
9730  fi
9731
9732 if test "$with_gtk" = "yes"; then
9733   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9734    echo "    xemacs will be linked with \"menubar-gtk.o\""
9735  fi
9736   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9737    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9738  fi
9739   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9740    echo "    xemacs will be linked with \"dialog-gtk.o\""
9741  fi
9742   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9743    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9744  fi
9745   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9746    echo "    xemacs will be linked with \"gui-gtk.o\""
9747  fi
9748 fi
9749
9750 if test "$with_x11" = "yes"; then
9751   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"menubar-x.o\""
9753  fi
9754   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9755    echo "    xemacs will be linked with \"scrollbar-x.o\""
9756  fi
9757   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9758    echo "    xemacs will be linked with \"dialog-x.o\""
9759  fi
9760   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9761    echo "    xemacs will be linked with \"toolbar-x.o\""
9762  fi
9763   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9764    echo "    xemacs will be linked with \"gui-x.o\""
9765  fi
9766 fi
9767
9768
9769 test -z "$with_mule" && with_mule=no
9770 test -z "$with_file_coding" && with_file_coding=no
9771
9772
9773 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9774   { test "$extra_verbose" = "yes" && cat << \EOF
9775     Defining FILE_CODING
9776 EOF
9777 cat >> confdefs.h <<\EOF
9778 #define FILE_CODING 1
9779 EOF
9780 }
9781
9782   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9783    echo "    xemacs will be linked with \"file-coding.o\""
9784  fi
9785 fi
9786
9787 if test "$with_mule" = "yes" ; then
9788   echo "checking for Mule-related features" 1>&6
9789 echo "configure:9790: checking for Mule-related features" >&5
9790   { test "$extra_verbose" = "yes" && cat << \EOF
9791     Defining MULE
9792 EOF
9793 cat >> confdefs.h <<\EOF
9794 #define MULE 1
9795 EOF
9796 }
9797
9798   { test "$extra_verbose" = "yes" && cat << \EOF
9799     Defining FILE_CODING
9800 EOF
9801 cat >> confdefs.h <<\EOF
9802 #define FILE_CODING 1
9803 EOF
9804 }
9805
9806   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9807    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9808  fi
9809
9810     for ac_hdr in libintl.h
9811 do
9812 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9813 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9814 echo "configure:9815: checking for $ac_hdr" >&5
9815
9816 cat > conftest.$ac_ext <<EOF
9817 #line 9818 "configure"
9818 #include "confdefs.h"
9819 #include <$ac_hdr>
9820 EOF
9821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9822 { (eval echo configure:9823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9824 if test -z "$ac_err"; then
9825   rm -rf conftest*
9826   eval "ac_cv_header_$ac_safe=yes"
9827 else
9828   echo "$ac_err" >&5
9829   echo "configure: failed program was:" >&5
9830   cat conftest.$ac_ext >&5
9831   rm -rf conftest*
9832   eval "ac_cv_header_$ac_safe=no"
9833 fi
9834 rm -f conftest*
9835 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9836   echo "$ac_t""yes" 1>&6
9837     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9838   { test "$extra_verbose" = "yes" && cat << EOF
9839     Defining $ac_tr_hdr
9840 EOF
9841 cat >> confdefs.h <<EOF
9842 #define $ac_tr_hdr 1
9843 EOF
9844 }
9845  
9846 else
9847   echo "$ac_t""no" 1>&6
9848 fi
9849 done
9850
9851   
9852 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9853 echo "configure:9854: checking for strerror in -lintl" >&5
9854 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9855
9856 xe_check_libs=" -lintl "
9857 cat > conftest.$ac_ext <<EOF
9858 #line 9859 "configure"
9859 #include "confdefs.h"
9860 /* Override any gcc2 internal prototype to avoid an error.  */
9861 /* We use char because int might match the return type of a gcc2
9862     builtin and then its argument prototype would still apply.  */
9863 char strerror();
9864
9865 int main() {
9866 strerror()
9867 ; return 0; }
9868 EOF
9869 if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9870   rm -rf conftest*
9871   eval "ac_cv_lib_$ac_lib_var=yes"
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875   rm -rf conftest*
9876   eval "ac_cv_lib_$ac_lib_var=no"
9877 fi
9878 rm -f conftest*
9879 xe_check_libs=""
9880
9881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9882   echo "$ac_t""yes" 1>&6
9883     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9884     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9885   { test "$extra_verbose" = "yes" && cat << EOF
9886     Defining $ac_tr_lib
9887 EOF
9888 cat >> confdefs.h <<EOF
9889 #define $ac_tr_lib 1
9890 EOF
9891 }
9892
9893   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9894
9895 else
9896   echo "$ac_t""no" 1>&6
9897 fi
9898
9899
9900
9901   echo "checking for Mule input methods" 1>&6
9902 echo "configure:9903: checking for Mule input methods" >&5
9903         case "$with_xim" in "" | "yes" )
9904     echo "checking for XIM" 1>&6
9905 echo "configure:9906: checking for XIM" >&5
9906     
9907 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9908 echo "configure:9909: checking for XOpenIM in -lX11" >&5
9909 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9910
9911 xe_check_libs=" -lX11 "
9912 cat > conftest.$ac_ext <<EOF
9913 #line 9914 "configure"
9914 #include "confdefs.h"
9915 /* Override any gcc2 internal prototype to avoid an error.  */
9916 /* We use char because int might match the return type of a gcc2
9917     builtin and then its argument prototype would still apply.  */
9918 char XOpenIM();
9919
9920 int main() {
9921 XOpenIM()
9922 ; return 0; }
9923 EOF
9924 if { (eval echo configure:9925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9925   rm -rf conftest*
9926   eval "ac_cv_lib_$ac_lib_var=yes"
9927 else
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930   rm -rf conftest*
9931   eval "ac_cv_lib_$ac_lib_var=no"
9932 fi
9933 rm -f conftest*
9934 xe_check_libs=""
9935
9936 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9937   echo "$ac_t""yes" 1>&6
9938   with_xim=xlib
9939 else
9940   echo "$ac_t""no" 1>&6
9941 with_xim=no
9942 fi
9943
9944
9945         if test "$have_motif $have_lesstif" = "yes no"; then
9946       
9947 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9948 echo "configure:9949: checking for XmImMbLookupString in -lXm" >&5
9949 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9950
9951 xe_check_libs=" -lXm "
9952 cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* Override any gcc2 internal prototype to avoid an error.  */
9956 /* We use char because int might match the return type of a gcc2
9957     builtin and then its argument prototype would still apply.  */
9958 char XmImMbLookupString();
9959
9960 int main() {
9961 XmImMbLookupString()
9962 ; return 0; }
9963 EOF
9964 if { (eval echo configure:9965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9965   rm -rf conftest*
9966   eval "ac_cv_lib_$ac_lib_var=yes"
9967 else
9968   echo "configure: failed program was:" >&5
9969   cat conftest.$ac_ext >&5
9970   rm -rf conftest*
9971   eval "ac_cv_lib_$ac_lib_var=no"
9972 fi
9973 rm -f conftest*
9974 xe_check_libs=""
9975
9976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9977   echo "$ac_t""yes" 1>&6
9978   with_xim=motif
9979 else
9980   echo "$ac_t""no" 1>&6
9981 fi
9982
9983
9984     fi ;;
9985   esac
9986   if test "$with_xim" != "no"; then
9987     { test "$extra_verbose" = "yes" && cat << \EOF
9988     Defining HAVE_XIM
9989 EOF
9990 cat >> confdefs.h <<\EOF
9991 #define HAVE_XIM 1
9992 EOF
9993 }
9994
9995     if test "$with_xim" = "xlib"; then
9996       { test "$extra_verbose" = "yes" && cat << \EOF
9997     Defining XIM_XLIB
9998 EOF
9999 cat >> confdefs.h <<\EOF
10000 #define XIM_XLIB 1
10001 EOF
10002 }
10003
10004       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10005    echo "    xemacs will be linked with \"input-method-xlib.o\""
10006  fi
10007     fi
10008     if test "$with_xim" = "motif"; then
10009       { test "$extra_verbose" = "yes" && cat << \EOF
10010     Defining XIM_MOTIF
10011 EOF
10012 cat >> confdefs.h <<\EOF
10013 #define XIM_MOTIF 1
10014 EOF
10015 }
10016
10017       need_motif=yes
10018       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10019    echo "    xemacs will be linked with \"input-method-motif.o\""
10020  fi
10021     fi
10022     if test "$with_xim" = "motif"; then
10023       with_xfs=no
10024     fi
10025   fi
10026
10027     if test "$with_xfs" = "yes" ; then
10028     echo "checking for XFontSet" 1>&6
10029 echo "configure:10030: checking for XFontSet" >&5
10030     
10031 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10032 echo "configure:10033: checking for XmbDrawString in -lX11" >&5
10033 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10034
10035 xe_check_libs=" -lX11 "
10036 cat > conftest.$ac_ext <<EOF
10037 #line 10038 "configure"
10038 #include "confdefs.h"
10039 /* Override any gcc2 internal prototype to avoid an error.  */
10040 /* We use char because int might match the return type of a gcc2
10041     builtin and then its argument prototype would still apply.  */
10042 char XmbDrawString();
10043
10044 int main() {
10045 XmbDrawString()
10046 ; return 0; }
10047 EOF
10048 if { (eval echo configure:10049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10049   rm -rf conftest*
10050   eval "ac_cv_lib_$ac_lib_var=yes"
10051 else
10052   echo "configure: failed program was:" >&5
10053   cat conftest.$ac_ext >&5
10054   rm -rf conftest*
10055   eval "ac_cv_lib_$ac_lib_var=no"
10056 fi
10057 rm -f conftest*
10058 xe_check_libs=""
10059
10060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10061   echo "$ac_t""yes" 1>&6
10062   :
10063 else
10064   echo "$ac_t""no" 1>&6
10065 with_xfs=no
10066 fi
10067
10068
10069     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10070       { test "$extra_verbose" = "yes" && cat << \EOF
10071     Defining USE_XFONTSET
10072 EOF
10073 cat >> confdefs.h <<\EOF
10074 #define USE_XFONTSET 1
10075 EOF
10076 }
10077
10078       if test "$with_xim" = "no" ; then
10079         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10080    echo "    xemacs will be linked with \"input-method-xlib.o\""
10081  fi
10082       fi
10083     fi
10084   fi 
10085     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10086   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10087 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10088 echo "configure:10089: checking for wnn/jllib.h" >&5
10089
10090 cat > conftest.$ac_ext <<EOF
10091 #line 10092 "configure"
10092 #include "confdefs.h"
10093 #include <wnn/jllib.h>
10094 EOF
10095 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10096 { (eval echo configure:10097: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10097 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10098 if test -z "$ac_err"; then
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=yes"
10101 else
10102   echo "$ac_err" >&5
10103   echo "configure: failed program was:" >&5
10104   cat conftest.$ac_ext >&5
10105   rm -rf conftest*
10106   eval "ac_cv_header_$ac_safe=no"
10107 fi
10108 rm -f conftest*
10109 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10110   echo "$ac_t""yes" 1>&6
10111   :
10112 else
10113   echo "$ac_t""no" 1>&6
10114 with_wnn=no
10115 fi
10116  }
10117     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10118 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10119 echo "configure:10120: checking for wnn/commonhd.h" >&5
10120
10121 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124 #include <wnn/commonhd.h>
10125 EOF
10126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10127 { (eval echo configure:10128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10129 if test -z "$ac_err"; then
10130   rm -rf conftest*
10131   eval "ac_cv_header_$ac_safe=yes"
10132 else
10133   echo "$ac_err" >&5
10134   echo "configure: failed program was:" >&5
10135   cat conftest.$ac_ext >&5
10136   rm -rf conftest*
10137   eval "ac_cv_header_$ac_safe=no"
10138 fi
10139 rm -f conftest*
10140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10141   echo "$ac_t""yes" 1>&6
10142   :
10143 else
10144   echo "$ac_t""no" 1>&6
10145 with_wnn=no
10146 fi
10147  }
10148     if test "$with_wnn" != "no"; then
10149     for ac_func in crypt
10150 do
10151 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10152 echo "configure:10153: checking for $ac_func" >&5
10153
10154 cat > conftest.$ac_ext <<EOF
10155 #line 10156 "configure"
10156 #include "confdefs.h"
10157 /* System header to define __stub macros and hopefully few prototypes,
10158     which can conflict with char $ac_func(); below.  */
10159 #include <assert.h>
10160 /* Override any gcc2 internal prototype to avoid an error.  */
10161 /* We use char because int might match the return type of a gcc2
10162     builtin and then its argument prototype would still apply.  */
10163 char $ac_func();
10164
10165 int main() {
10166
10167 /* The GNU C library defines this for functions which it implements
10168     to always fail with ENOSYS.  Some functions are actually named
10169     something starting with __ and the normal name is an alias.  */
10170 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10171 choke me
10172 #else
10173 $ac_func();
10174 #endif
10175
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_func_$ac_func=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_func_$ac_func=no"
10186 fi
10187 rm -f conftest*
10188
10189 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10190   echo "$ac_t""yes" 1>&6
10191     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10192   { test "$extra_verbose" = "yes" && cat << EOF
10193     Defining $ac_tr_func
10194 EOF
10195 cat >> confdefs.h <<EOF
10196 #define $ac_tr_func 1
10197 EOF
10198 }
10199  
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203 done
10204
10205     test "$ac_cv_func_crypt" != "yes" && { 
10206 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10207 echo "configure:10208: checking for crypt in -lcrypt" >&5
10208 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10209
10210 xe_check_libs=" -lcrypt "
10211 cat > conftest.$ac_ext <<EOF
10212 #line 10213 "configure"
10213 #include "confdefs.h"
10214 /* Override any gcc2 internal prototype to avoid an error.  */
10215 /* We use char because int might match the return type of a gcc2
10216     builtin and then its argument prototype would still apply.  */
10217 char crypt();
10218
10219 int main() {
10220 crypt()
10221 ; return 0; }
10222 EOF
10223 if { (eval echo configure:10224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10224   rm -rf conftest*
10225   eval "ac_cv_lib_$ac_lib_var=yes"
10226 else
10227   echo "configure: failed program was:" >&5
10228   cat conftest.$ac_ext >&5
10229   rm -rf conftest*
10230   eval "ac_cv_lib_$ac_lib_var=no"
10231 fi
10232 rm -f conftest*
10233 xe_check_libs=""
10234
10235 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10236   echo "$ac_t""yes" 1>&6
10237     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10238     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10239   { test "$extra_verbose" = "yes" && cat << EOF
10240     Defining $ac_tr_lib
10241 EOF
10242 cat >> confdefs.h <<EOF
10243 #define $ac_tr_lib 1
10244 EOF
10245 }
10246
10247   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10248
10249 else
10250   echo "$ac_t""no" 1>&6
10251 fi
10252
10253  }
10254   fi
10255     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10256     
10257 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10258 echo "configure:10259: checking for jl_dic_list_e in -lwnn" >&5
10259 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10260
10261 xe_check_libs=" -lwnn "
10262 cat > conftest.$ac_ext <<EOF
10263 #line 10264 "configure"
10264 #include "confdefs.h"
10265 /* Override any gcc2 internal prototype to avoid an error.  */
10266 /* We use char because int might match the return type of a gcc2
10267     builtin and then its argument prototype would still apply.  */
10268 char jl_dic_list_e();
10269
10270 int main() {
10271 jl_dic_list_e()
10272 ; return 0; }
10273 EOF
10274 if { (eval echo configure:10275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10275   rm -rf conftest*
10276   eval "ac_cv_lib_$ac_lib_var=yes"
10277 else
10278   echo "configure: failed program was:" >&5
10279   cat conftest.$ac_ext >&5
10280   rm -rf conftest*
10281   eval "ac_cv_lib_$ac_lib_var=no"
10282 fi
10283 rm -f conftest*
10284 xe_check_libs=""
10285
10286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10287   echo "$ac_t""yes" 1>&6
10288   libwnn=wnn
10289 else
10290   echo "$ac_t""no" 1>&6
10291 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10292 echo "configure:10293: checking for jl_dic_list_e in -lwnn4" >&5
10293 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10294
10295 xe_check_libs=" -lwnn4 "
10296 cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 /* Override any gcc2 internal prototype to avoid an error.  */
10300 /* We use char because int might match the return type of a gcc2
10301     builtin and then its argument prototype would still apply.  */
10302 char jl_dic_list_e();
10303
10304 int main() {
10305 jl_dic_list_e()
10306 ; return 0; }
10307 EOF
10308 if { (eval echo configure:10309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10309   rm -rf conftest*
10310   eval "ac_cv_lib_$ac_lib_var=yes"
10311 else
10312   echo "configure: failed program was:" >&5
10313   cat conftest.$ac_ext >&5
10314   rm -rf conftest*
10315   eval "ac_cv_lib_$ac_lib_var=no"
10316 fi
10317 rm -f conftest*
10318 xe_check_libs=""
10319
10320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10321   echo "$ac_t""yes" 1>&6
10322   libwnn=wnn4
10323 else
10324   echo "$ac_t""no" 1>&6
10325 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10326 echo "configure:10327: checking for jl_dic_list_e in -lwnn6" >&5
10327 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10328
10329 xe_check_libs=" -lwnn6 "
10330 cat > conftest.$ac_ext <<EOF
10331 #line 10332 "configure"
10332 #include "confdefs.h"
10333 /* Override any gcc2 internal prototype to avoid an error.  */
10334 /* We use char because int might match the return type of a gcc2
10335     builtin and then its argument prototype would still apply.  */
10336 char jl_dic_list_e();
10337
10338 int main() {
10339 jl_dic_list_e()
10340 ; return 0; }
10341 EOF
10342 if { (eval echo configure:10343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10343   rm -rf conftest*
10344   eval "ac_cv_lib_$ac_lib_var=yes"
10345 else
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=no"
10350 fi
10351 rm -f conftest*
10352 xe_check_libs=""
10353
10354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10355   echo "$ac_t""yes" 1>&6
10356   libwnn=wnn6
10357 else
10358   echo "$ac_t""no" 1>&6
10359 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10360 echo "configure:10361: checking for dic_list_e in -lwnn6_fromsrc" >&5
10361 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10362
10363 xe_check_libs=" -lwnn6_fromsrc "
10364 cat > conftest.$ac_ext <<EOF
10365 #line 10366 "configure"
10366 #include "confdefs.h"
10367 /* Override any gcc2 internal prototype to avoid an error.  */
10368 /* We use char because int might match the return type of a gcc2
10369     builtin and then its argument prototype would still apply.  */
10370 char dic_list_e();
10371
10372 int main() {
10373 dic_list_e()
10374 ; return 0; }
10375 EOF
10376 if { (eval echo configure:10377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10377   rm -rf conftest*
10378   eval "ac_cv_lib_$ac_lib_var=yes"
10379 else
10380   echo "configure: failed program was:" >&5
10381   cat conftest.$ac_ext >&5
10382   rm -rf conftest*
10383   eval "ac_cv_lib_$ac_lib_var=no"
10384 fi
10385 rm -f conftest*
10386 xe_check_libs=""
10387
10388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10389   echo "$ac_t""yes" 1>&6
10390   libwnn=wnn6_fromsrc
10391 else
10392   echo "$ac_t""no" 1>&6
10393 with_wnn=no
10394 fi
10395
10396
10397 fi
10398
10399
10400 fi
10401
10402
10403 fi
10404
10405
10406   fi
10407   test -z "$with_wnn" && with_wnn=yes
10408   if test "$with_wnn" = "yes"; then
10409     { test "$extra_verbose" = "yes" && cat << \EOF
10410     Defining HAVE_WNN
10411 EOF
10412 cat >> confdefs.h <<\EOF
10413 #define HAVE_WNN 1
10414 EOF
10415 }
10416
10417     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10418     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10419    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10420  fi
10421     if test "$with_wnn6" != "no"; then
10422       
10423 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10424 echo "configure:10425: checking for jl_fi_dic_list in -l$libwnn" >&5
10425 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10426
10427 xe_check_libs=" -l$libwnn "
10428 cat > conftest.$ac_ext <<EOF
10429 #line 10430 "configure"
10430 #include "confdefs.h"
10431 /* Override any gcc2 internal prototype to avoid an error.  */
10432 /* We use char because int might match the return type of a gcc2
10433     builtin and then its argument prototype would still apply.  */
10434 char jl_fi_dic_list();
10435
10436 int main() {
10437 jl_fi_dic_list()
10438 ; return 0; }
10439 EOF
10440 if { (eval echo configure:10441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10441   rm -rf conftest*
10442   eval "ac_cv_lib_$ac_lib_var=yes"
10443 else
10444   echo "configure: failed program was:" >&5
10445   cat conftest.$ac_ext >&5
10446   rm -rf conftest*
10447   eval "ac_cv_lib_$ac_lib_var=no"
10448 fi
10449 rm -f conftest*
10450 xe_check_libs=""
10451
10452 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10453   echo "$ac_t""yes" 1>&6
10454   with_wnn6=yes
10455 else
10456   echo "$ac_t""no" 1>&6
10457 fi
10458
10459
10460       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10461     Defining WNN6
10462 EOF
10463 cat >> confdefs.h <<\EOF
10464 #define WNN6 1
10465 EOF
10466 }
10467
10468     fi
10469   fi
10470
10471     canna_includes_found=no
10472   if test "$with_canna" != "no"; then
10473     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10474 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10475 echo "configure:10476: checking for canna/jrkanji.h" >&5
10476
10477 cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480 #include <canna/jrkanji.h>
10481 EOF
10482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10483 { (eval echo configure:10484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10485 if test -z "$ac_err"; then
10486   rm -rf conftest*
10487   eval "ac_cv_header_$ac_safe=yes"
10488 else
10489   echo "$ac_err" >&5
10490   echo "configure: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   rm -rf conftest*
10493   eval "ac_cv_header_$ac_safe=no"
10494 fi
10495 rm -f conftest*
10496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10497   echo "$ac_t""yes" 1>&6
10498   canna_includes_found=yes
10499 else
10500   echo "$ac_t""no" 1>&6
10501 fi
10502
10503   fi
10504   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10505       -d "/usr/local/canna/include"; then
10506     save_c_switch_site="$c_switch_site"
10507     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10508     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10509 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10510 echo "configure:10511: checking for canna/jrkanji.h" >&5
10511
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 #include <canna/jrkanji.h>
10516 EOF
10517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10518 { (eval echo configure:10519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10520 if test -z "$ac_err"; then
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=yes"
10523 else
10524   echo "$ac_err" >&5
10525   echo "configure: failed program was:" >&5
10526   cat conftest.$ac_ext >&5
10527   rm -rf conftest*
10528   eval "ac_cv_header_$ac_safe=no"
10529 fi
10530 rm -f conftest*
10531 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10532   echo "$ac_t""yes" 1>&6
10533   canna_includes_found=yes
10534 else
10535   echo "$ac_t""no" 1>&6
10536 fi
10537
10538     if test "$canna_includes_found" != "yes"; then
10539       c_switch_site="$save_c_switch_site"
10540       with_canna="no"
10541     fi
10542   fi
10543
10544   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10545 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10546 echo "configure:10547: checking for canna/RK.h" >&5
10547
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551 #include <canna/RK.h>
10552 EOF
10553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10554 { (eval echo configure:10555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10556 if test -z "$ac_err"; then
10557   rm -rf conftest*
10558   eval "ac_cv_header_$ac_safe=yes"
10559 else
10560   echo "$ac_err" >&5
10561   echo "configure: failed program was:" >&5
10562   cat conftest.$ac_ext >&5
10563   rm -rf conftest*
10564   eval "ac_cv_header_$ac_safe=no"
10565 fi
10566 rm -f conftest*
10567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10568   echo "$ac_t""yes" 1>&6
10569   :
10570 else
10571   echo "$ac_t""no" 1>&6
10572 with_canna=no
10573 fi
10574  }
10575   test -z "$with_canna" && { 
10576 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10577 echo "configure:10578: checking for RkBgnBun in -lRKC" >&5
10578 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10579
10580 xe_check_libs=" -lRKC "
10581 cat > conftest.$ac_ext <<EOF
10582 #line 10583 "configure"
10583 #include "confdefs.h"
10584 /* Override any gcc2 internal prototype to avoid an error.  */
10585 /* We use char because int might match the return type of a gcc2
10586     builtin and then its argument prototype would still apply.  */
10587 char RkBgnBun();
10588
10589 int main() {
10590 RkBgnBun()
10591 ; return 0; }
10592 EOF
10593 if { (eval echo configure:10594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10594   rm -rf conftest*
10595   eval "ac_cv_lib_$ac_lib_var=yes"
10596 else
10597   echo "configure: failed program was:" >&5
10598   cat conftest.$ac_ext >&5
10599   rm -rf conftest*
10600   eval "ac_cv_lib_$ac_lib_var=no"
10601 fi
10602 rm -f conftest*
10603 xe_check_libs=""
10604
10605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10606   echo "$ac_t""yes" 1>&6
10607   :
10608 else
10609   echo "$ac_t""no" 1>&6
10610 with_canna=no
10611 fi
10612
10613  }
10614   test -z "$with_canna" && { 
10615 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10616 echo "configure:10617: checking for jrKanjiControl in -lcanna" >&5
10617 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10618
10619 xe_check_libs=" -lcanna "
10620 cat > conftest.$ac_ext <<EOF
10621 #line 10622 "configure"
10622 #include "confdefs.h"
10623 /* Override any gcc2 internal prototype to avoid an error.  */
10624 /* We use char because int might match the return type of a gcc2
10625     builtin and then its argument prototype would still apply.  */
10626 char jrKanjiControl();
10627
10628 int main() {
10629 jrKanjiControl()
10630 ; return 0; }
10631 EOF
10632 if { (eval echo configure:10633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10633   rm -rf conftest*
10634   eval "ac_cv_lib_$ac_lib_var=yes"
10635 else
10636   echo "configure: failed program was:" >&5
10637   cat conftest.$ac_ext >&5
10638   rm -rf conftest*
10639   eval "ac_cv_lib_$ac_lib_var=no"
10640 fi
10641 rm -f conftest*
10642 xe_check_libs=""
10643
10644 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10645   echo "$ac_t""yes" 1>&6
10646   :
10647 else
10648   echo "$ac_t""no" 1>&6
10649 with_canna=no
10650 fi
10651
10652  }
10653   test -z "$with_canna" && with_canna=yes
10654   if test "$with_canna" = "yes"; then
10655     { test "$extra_verbose" = "yes" && cat << \EOF
10656     Defining HAVE_CANNA
10657 EOF
10658 cat >> confdefs.h <<\EOF
10659 #define HAVE_CANNA 1
10660 EOF
10661 }
10662
10663     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10664     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10665    echo "    xemacs will be linked with \"mule-canna.o\""
10666  fi
10667   fi
10668
10669 else   for feature in xim canna wnn; do
10670     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10671       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10672     fi
10673     eval "with_${feature}=no"
10674   done
10675 fi 
10676
10677 if test "$need_motif" = "yes" ; then
10678   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10679     
10680 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10681 echo "configure:10682: checking for layout_object_getvalue in -li18n" >&5
10682 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10683
10684 xe_check_libs=" -li18n "
10685 cat > conftest.$ac_ext <<EOF
10686 #line 10687 "configure"
10687 #include "confdefs.h"
10688 /* Override any gcc2 internal prototype to avoid an error.  */
10689 /* We use char because int might match the return type of a gcc2
10690     builtin and then its argument prototype would still apply.  */
10691 char layout_object_getvalue();
10692
10693 int main() {
10694 layout_object_getvalue()
10695 ; return 0; }
10696 EOF
10697 if { (eval echo configure:10698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10698   rm -rf conftest*
10699   eval "ac_cv_lib_$ac_lib_var=yes"
10700 else
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -rf conftest*
10704   eval "ac_cv_lib_$ac_lib_var=no"
10705 fi
10706 rm -f conftest*
10707 xe_check_libs=""
10708
10709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10710   echo "$ac_t""yes" 1>&6
10711   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10712 else
10713   echo "$ac_t""no" 1>&6
10714 fi
10715
10716
10717   
10718 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10719     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10720   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10721   
10722         runpath="" runpath_dirs=""
10723   if test -n "$LD_RUN_PATH"; then
10724     runpath="$LD_RUN_PATH"
10725   elif test "$GCC" = "yes"; then
10726         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10727     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10728     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10729     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10730       case "$arg" in P,* | -L* | -R* )
10731         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10732           {
10733 xe_runpath_dir="$dir"
10734   test "$xe_runpath_dir" != "/lib"     -a \
10735         "$xe_runpath_dir" != "/usr/lib" -a \
10736         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10737   eval "$xe_add_unique_runpath_dir"
10738 }
10739         done ;;
10740       esac
10741     done
10742     ld_switch_run="$ld_switch_run_save"
10743     rm -f conftest*
10744   else
10745         for arg in $ld_switch_site $ld_switch_x_site; do
10746       case "$arg" in -L*) {
10747 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10748   test "$xe_runpath_dir" != "/lib"     -a \
10749         "$xe_runpath_dir" != "/usr/lib" -a \
10750         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10751   eval "$xe_add_unique_runpath_dir"
10752 };; esac
10753     done
10754         if test "$opsys $need_motif" = "sol2 yes"; then
10755       xe_runpath_dir="/opt/SUNWdt/lib";
10756       eval "$xe_add_unique_runpath_dir";
10757     fi
10758   fi 
10759   if test -n "$runpath"; then
10760     ld_switch_run="${dash_r}${runpath}"
10761     
10762 if test "$GCC" = "yes"; then
10763   set x $ld_switch_run; shift; ld_switch_run=""
10764   while test -n "$1"; do
10765     case $1 in
10766       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10767       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10768       -Xlinker* ) ;;
10769       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10770     esac
10771     shift
10772   done
10773 fi
10774     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10775   fi
10776 fi
10777
10778 fi
10779
10780 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
10781 do
10782 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10783 echo "configure:10784: checking for $ac_func" >&5
10784
10785 cat > conftest.$ac_ext <<EOF
10786 #line 10787 "configure"
10787 #include "confdefs.h"
10788 /* System header to define __stub macros and hopefully few prototypes,
10789     which can conflict with char $ac_func(); below.  */
10790 #include <assert.h>
10791 /* Override any gcc2 internal prototype to avoid an error.  */
10792 /* We use char because int might match the return type of a gcc2
10793     builtin and then its argument prototype would still apply.  */
10794 char $ac_func();
10795
10796 int main() {
10797
10798 /* The GNU C library defines this for functions which it implements
10799     to always fail with ENOSYS.  Some functions are actually named
10800     something starting with __ and the normal name is an alias.  */
10801 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10802 choke me
10803 #else
10804 $ac_func();
10805 #endif
10806
10807 ; return 0; }
10808 EOF
10809 if { (eval echo configure:10810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10810   rm -rf conftest*
10811   eval "ac_cv_func_$ac_func=yes"
10812 else
10813   echo "configure: failed program was:" >&5
10814   cat conftest.$ac_ext >&5
10815   rm -rf conftest*
10816   eval "ac_cv_func_$ac_func=no"
10817 fi
10818 rm -f conftest*
10819
10820 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10821   echo "$ac_t""yes" 1>&6
10822     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10823   { test "$extra_verbose" = "yes" && cat << EOF
10824     Defining $ac_tr_func
10825 EOF
10826 cat >> confdefs.h <<EOF
10827 #define $ac_tr_func 1
10828 EOF
10829 }
10830  
10831 else
10832   echo "$ac_t""no" 1>&6
10833 fi
10834 done
10835
10836
10837
10838 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10839 do
10840 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10841 echo "configure:10842: checking for $ac_func" >&5
10842
10843 cat > conftest.$ac_ext <<EOF
10844 #line 10845 "configure"
10845 #include "confdefs.h"
10846 /* System header to define __stub macros and hopefully few prototypes,
10847     which can conflict with char $ac_func(); below.  */
10848 #include <assert.h>
10849 /* Override any gcc2 internal prototype to avoid an error.  */
10850 /* We use char because int might match the return type of a gcc2
10851     builtin and then its argument prototype would still apply.  */
10852 char $ac_func();
10853
10854 int main() {
10855
10856 /* The GNU C library defines this for functions which it implements
10857     to always fail with ENOSYS.  Some functions are actually named
10858     something starting with __ and the normal name is an alias.  */
10859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10860 choke me
10861 #else
10862 $ac_func();
10863 #endif
10864
10865 ; return 0; }
10866 EOF
10867 if { (eval echo configure:10868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10868   rm -rf conftest*
10869   eval "ac_cv_func_$ac_func=yes"
10870 else
10871   echo "configure: failed program was:" >&5
10872   cat conftest.$ac_ext >&5
10873   rm -rf conftest*
10874   eval "ac_cv_func_$ac_func=no"
10875 fi
10876 rm -f conftest*
10877
10878 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10879   echo "$ac_t""yes" 1>&6
10880     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10881   { test "$extra_verbose" = "yes" && cat << EOF
10882     Defining $ac_tr_func
10883 EOF
10884 cat >> confdefs.h <<EOF
10885 #define $ac_tr_func 1
10886 EOF
10887 }
10888  
10889 else
10890   echo "$ac_t""no" 1>&6
10891 fi
10892 done
10893
10894
10895 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10896 echo "configure:10897: checking for openpty" >&5
10897
10898 cat > conftest.$ac_ext <<EOF
10899 #line 10900 "configure"
10900 #include "confdefs.h"
10901 /* System header to define __stub macros and hopefully few prototypes,
10902     which can conflict with char openpty(); below.  */
10903 #include <assert.h>
10904 /* Override any gcc2 internal prototype to avoid an error.  */
10905 /* We use char because int might match the return type of a gcc2
10906     builtin and then its argument prototype would still apply.  */
10907 char openpty();
10908
10909 int main() {
10910
10911 /* The GNU C library defines this for functions which it implements
10912     to always fail with ENOSYS.  Some functions are actually named
10913     something starting with __ and the normal name is an alias.  */
10914 #if defined (__stub_openpty) || defined (__stub___openpty)
10915 choke me
10916 #else
10917 openpty();
10918 #endif
10919
10920 ; return 0; }
10921 EOF
10922 if { (eval echo configure:10923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10923   rm -rf conftest*
10924   eval "ac_cv_func_openpty=yes"
10925 else
10926   echo "configure: failed program was:" >&5
10927   cat conftest.$ac_ext >&5
10928   rm -rf conftest*
10929   eval "ac_cv_func_openpty=no"
10930 fi
10931 rm -f conftest*
10932
10933 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10934   echo "$ac_t""yes" 1>&6
10935   have_openpty=yes
10936 else
10937   echo "$ac_t""no" 1>&6
10938
10939   
10940 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10941 echo "configure:10942: checking for openpty in -lutil" >&5
10942 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10943
10944 xe_check_libs=" -lutil "
10945 cat > conftest.$ac_ext <<EOF
10946 #line 10947 "configure"
10947 #include "confdefs.h"
10948 /* Override any gcc2 internal prototype to avoid an error.  */
10949 /* We use char because int might match the return type of a gcc2
10950     builtin and then its argument prototype would still apply.  */
10951 char openpty();
10952
10953 int main() {
10954 openpty()
10955 ; return 0; }
10956 EOF
10957 if { (eval echo configure:10958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=yes"
10960 else
10961   echo "configure: failed program was:" >&5
10962   cat conftest.$ac_ext >&5
10963   rm -rf conftest*
10964   eval "ac_cv_lib_$ac_lib_var=no"
10965 fi
10966 rm -f conftest*
10967 xe_check_libs=""
10968
10969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10970   echo "$ac_t""yes" 1>&6
10971   have_openpty=yes need_libutil=yes
10972 else
10973   echo "$ac_t""no" 1>&6
10974 fi
10975
10976
10977 fi
10978
10979 if test "$have_openpty" = "yes"; then
10980   { test "$extra_verbose" = "yes" && cat << \EOF
10981     Defining HAVE_OPENPTY
10982 EOF
10983 cat >> confdefs.h <<\EOF
10984 #define HAVE_OPENPTY 1
10985 EOF
10986 }
10987
10988   for ac_hdr in pty.h libutil.h util.h
10989 do
10990 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10991 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10992 echo "configure:10993: checking for $ac_hdr" >&5
10993
10994 cat > conftest.$ac_ext <<EOF
10995 #line 10996 "configure"
10996 #include "confdefs.h"
10997 #include <$ac_hdr>
10998 EOF
10999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11000 { (eval echo configure:11001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11002 if test -z "$ac_err"; then
11003   rm -rf conftest*
11004   eval "ac_cv_header_$ac_safe=yes"
11005 else
11006   echo "$ac_err" >&5
11007   echo "configure: failed program was:" >&5
11008   cat conftest.$ac_ext >&5
11009   rm -rf conftest*
11010   eval "ac_cv_header_$ac_safe=no"
11011 fi
11012 rm -f conftest*
11013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11014   echo "$ac_t""yes" 1>&6
11015     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11016   { test "$extra_verbose" = "yes" && cat << EOF
11017     Defining $ac_tr_hdr
11018 EOF
11019 cat >> confdefs.h <<EOF
11020 #define $ac_tr_hdr 1
11021 EOF
11022 }
11023  break
11024 else
11025   echo "$ac_t""no" 1>&6
11026 fi
11027 done
11028
11029   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11030 fi
11031
11032 for ac_hdr in stropts.h
11033 do
11034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11036 echo "configure:11037: checking for $ac_hdr" >&5
11037
11038 cat > conftest.$ac_ext <<EOF
11039 #line 11040 "configure"
11040 #include "confdefs.h"
11041 #include <$ac_hdr>
11042 EOF
11043 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11044 { (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11045 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11046 if test -z "$ac_err"; then
11047   rm -rf conftest*
11048   eval "ac_cv_header_$ac_safe=yes"
11049 else
11050   echo "$ac_err" >&5
11051   echo "configure: failed program was:" >&5
11052   cat conftest.$ac_ext >&5
11053   rm -rf conftest*
11054   eval "ac_cv_header_$ac_safe=no"
11055 fi
11056 rm -f conftest*
11057 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11060   { test "$extra_verbose" = "yes" && cat << EOF
11061     Defining $ac_tr_hdr
11062 EOF
11063 cat >> confdefs.h <<EOF
11064 #define $ac_tr_hdr 1
11065 EOF
11066 }
11067  
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071 done
11072
11073 if test "$ac_cv_header_stropts_h" = "yes"; then
11074   for ac_func in isastream
11075 do
11076 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11077 echo "configure:11078: checking for $ac_func" >&5
11078
11079 cat > conftest.$ac_ext <<EOF
11080 #line 11081 "configure"
11081 #include "confdefs.h"
11082 /* System header to define __stub macros and hopefully few prototypes,
11083     which can conflict with char $ac_func(); below.  */
11084 #include <assert.h>
11085 /* Override any gcc2 internal prototype to avoid an error.  */
11086 /* We use char because int might match the return type of a gcc2
11087     builtin and then its argument prototype would still apply.  */
11088 char $ac_func();
11089
11090 int main() {
11091
11092 /* The GNU C library defines this for functions which it implements
11093     to always fail with ENOSYS.  Some functions are actually named
11094     something starting with __ and the normal name is an alias.  */
11095 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11096 choke me
11097 #else
11098 $ac_func();
11099 #endif
11100
11101 ; return 0; }
11102 EOF
11103 if { (eval echo configure:11104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11104   rm -rf conftest*
11105   eval "ac_cv_func_$ac_func=yes"
11106 else
11107   echo "configure: failed program was:" >&5
11108   cat conftest.$ac_ext >&5
11109   rm -rf conftest*
11110   eval "ac_cv_func_$ac_func=no"
11111 fi
11112 rm -f conftest*
11113
11114 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11115   echo "$ac_t""yes" 1>&6
11116     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11117   { test "$extra_verbose" = "yes" && cat << EOF
11118     Defining $ac_tr_func
11119 EOF
11120 cat >> confdefs.h <<EOF
11121 #define $ac_tr_func 1
11122 EOF
11123 }
11124  
11125 else
11126   echo "$ac_t""no" 1>&6
11127 fi
11128 done
11129
11130   for ac_hdr in strtio.h
11131 do
11132 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11133 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11134 echo "configure:11135: checking for $ac_hdr" >&5
11135
11136 cat > conftest.$ac_ext <<EOF
11137 #line 11138 "configure"
11138 #include "confdefs.h"
11139 #include <$ac_hdr>
11140 EOF
11141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11142 { (eval echo configure:11143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11144 if test -z "$ac_err"; then
11145   rm -rf conftest*
11146   eval "ac_cv_header_$ac_safe=yes"
11147 else
11148   echo "$ac_err" >&5
11149   echo "configure: failed program was:" >&5
11150   cat conftest.$ac_ext >&5
11151   rm -rf conftest*
11152   eval "ac_cv_header_$ac_safe=no"
11153 fi
11154 rm -f conftest*
11155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11156   echo "$ac_t""yes" 1>&6
11157     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11158   { test "$extra_verbose" = "yes" && cat << EOF
11159     Defining $ac_tr_hdr
11160 EOF
11161 cat >> confdefs.h <<EOF
11162 #define $ac_tr_hdr 1
11163 EOF
11164 }
11165  
11166 else
11167   echo "$ac_t""no" 1>&6
11168 fi
11169 done
11170  fi
11171
11172 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11173    echo "    xemacs will be linked with \"realpath.o\""
11174  fi
11175
11176 for ac_func in getloadavg
11177 do
11178 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11179 echo "configure:11180: checking for $ac_func" >&5
11180
11181 cat > conftest.$ac_ext <<EOF
11182 #line 11183 "configure"
11183 #include "confdefs.h"
11184 /* System header to define __stub macros and hopefully few prototypes,
11185     which can conflict with char $ac_func(); below.  */
11186 #include <assert.h>
11187 /* Override any gcc2 internal prototype to avoid an error.  */
11188 /* We use char because int might match the return type of a gcc2
11189     builtin and then its argument prototype would still apply.  */
11190 char $ac_func();
11191
11192 int main() {
11193
11194 /* The GNU C library defines this for functions which it implements
11195     to always fail with ENOSYS.  Some functions are actually named
11196     something starting with __ and the normal name is an alias.  */
11197 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11198 choke me
11199 #else
11200 $ac_func();
11201 #endif
11202
11203 ; return 0; }
11204 EOF
11205 if { (eval echo configure:11206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11206   rm -rf conftest*
11207   eval "ac_cv_func_$ac_func=yes"
11208 else
11209   echo "configure: failed program was:" >&5
11210   cat conftest.$ac_ext >&5
11211   rm -rf conftest*
11212   eval "ac_cv_func_$ac_func=no"
11213 fi
11214 rm -f conftest*
11215
11216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11217   echo "$ac_t""yes" 1>&6
11218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11219   { test "$extra_verbose" = "yes" && cat << EOF
11220     Defining $ac_tr_func
11221 EOF
11222 cat >> confdefs.h <<EOF
11223 #define $ac_tr_func 1
11224 EOF
11225 }
11226  
11227 else
11228   echo "$ac_t""no" 1>&6
11229 fi
11230 done
11231
11232
11233 if test "$ac_cv_func_getloadavg" = "yes"; then
11234         for ac_hdr in sys/loadavg.h
11235 do
11236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11238 echo "configure:11239: checking for $ac_hdr" >&5
11239
11240 cat > conftest.$ac_ext <<EOF
11241 #line 11242 "configure"
11242 #include "confdefs.h"
11243 #include <$ac_hdr>
11244 EOF
11245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11246 { (eval echo configure:11247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11248 if test -z "$ac_err"; then
11249   rm -rf conftest*
11250   eval "ac_cv_header_$ac_safe=yes"
11251 else
11252   echo "$ac_err" >&5
11253   echo "configure: failed program was:" >&5
11254   cat conftest.$ac_ext >&5
11255   rm -rf conftest*
11256   eval "ac_cv_header_$ac_safe=no"
11257 fi
11258 rm -f conftest*
11259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11260   echo "$ac_t""yes" 1>&6
11261     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11262   { test "$extra_verbose" = "yes" && cat << EOF
11263     Defining $ac_tr_hdr
11264 EOF
11265 cat >> confdefs.h <<EOF
11266 #define $ac_tr_hdr 1
11267 EOF
11268 }
11269  
11270 else
11271   echo "$ac_t""no" 1>&6
11272 fi
11273 done
11274
11275 else
11276     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11277    echo "    xemacs will be linked with \"getloadavg.o\""
11278  fi
11279
11280     
11281 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11282 echo "configure:11283: checking for kstat_open in -lkstat" >&5
11283 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11284
11285 xe_check_libs=" -lkstat "
11286 cat > conftest.$ac_ext <<EOF
11287 #line 11288 "configure"
11288 #include "confdefs.h"
11289 /* Override any gcc2 internal prototype to avoid an error.  */
11290 /* We use char because int might match the return type of a gcc2
11291     builtin and then its argument prototype would still apply.  */
11292 char kstat_open();
11293
11294 int main() {
11295 kstat_open()
11296 ; return 0; }
11297 EOF
11298 if { (eval echo configure:11299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11299   rm -rf conftest*
11300   eval "ac_cv_lib_$ac_lib_var=yes"
11301 else
11302   echo "configure: failed program was:" >&5
11303   cat conftest.$ac_ext >&5
11304   rm -rf conftest*
11305   eval "ac_cv_lib_$ac_lib_var=no"
11306 fi
11307 rm -f conftest*
11308 xe_check_libs=""
11309
11310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11311   echo "$ac_t""yes" 1>&6
11312     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11313     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11314   { test "$extra_verbose" = "yes" && cat << EOF
11315     Defining $ac_tr_lib
11316 EOF
11317 cat >> confdefs.h <<EOF
11318 #define $ac_tr_lib 1
11319 EOF
11320 }
11321
11322   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11323
11324 else
11325   echo "$ac_t""no" 1>&6
11326 fi
11327
11328
11329   for ac_hdr in kstat.h
11330 do
11331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11333 echo "configure:11334: checking for $ac_hdr" >&5
11334
11335 cat > conftest.$ac_ext <<EOF
11336 #line 11337 "configure"
11337 #include "confdefs.h"
11338 #include <$ac_hdr>
11339 EOF
11340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11341 { (eval echo configure:11342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11343 if test -z "$ac_err"; then
11344   rm -rf conftest*
11345   eval "ac_cv_header_$ac_safe=yes"
11346 else
11347   echo "$ac_err" >&5
11348   echo "configure: failed program was:" >&5
11349   cat conftest.$ac_ext >&5
11350   rm -rf conftest*
11351   eval "ac_cv_header_$ac_safe=no"
11352 fi
11353 rm -f conftest*
11354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11355   echo "$ac_t""yes" 1>&6
11356     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11357   { test "$extra_verbose" = "yes" && cat << EOF
11358     Defining $ac_tr_hdr
11359 EOF
11360 cat >> confdefs.h <<EOF
11361 #define $ac_tr_hdr 1
11362 EOF
11363 }
11364  
11365 else
11366   echo "$ac_t""no" 1>&6
11367 fi
11368 done
11369
11370
11371     
11372 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11373 echo "configure:11374: checking for kvm_read in -lkvm" >&5
11374 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11375
11376 xe_check_libs=" -lkvm "
11377 cat > conftest.$ac_ext <<EOF
11378 #line 11379 "configure"
11379 #include "confdefs.h"
11380 /* Override any gcc2 internal prototype to avoid an error.  */
11381 /* We use char because int might match the return type of a gcc2
11382     builtin and then its argument prototype would still apply.  */
11383 char kvm_read();
11384
11385 int main() {
11386 kvm_read()
11387 ; return 0; }
11388 EOF
11389 if { (eval echo configure:11390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11390   rm -rf conftest*
11391   eval "ac_cv_lib_$ac_lib_var=yes"
11392 else
11393   echo "configure: failed program was:" >&5
11394   cat conftest.$ac_ext >&5
11395   rm -rf conftest*
11396   eval "ac_cv_lib_$ac_lib_var=no"
11397 fi
11398 rm -f conftest*
11399 xe_check_libs=""
11400
11401 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11402   echo "$ac_t""yes" 1>&6
11403     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11404     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11405   { test "$extra_verbose" = "yes" && cat << EOF
11406     Defining $ac_tr_lib
11407 EOF
11408 cat >> confdefs.h <<EOF
11409 #define $ac_tr_lib 1
11410 EOF
11411 }
11412
11413   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11414
11415 else
11416   echo "$ac_t""no" 1>&6
11417 fi
11418
11419
11420 fi
11421
11422 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11423 echo "configure:11424: checking whether netdb declares h_errno" >&5
11424 cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <netdb.h>
11428 int main() {
11429 return h_errno;
11430 ; return 0; }
11431 EOF
11432 if { (eval echo configure:11433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11433   rm -rf conftest*
11434   echo "$ac_t""yes" 1>&6
11435    { test "$extra_verbose" = "yes" && cat << \EOF
11436     Defining HAVE_H_ERRNO
11437 EOF
11438 cat >> confdefs.h <<\EOF
11439 #define HAVE_H_ERRNO 1
11440 EOF
11441 }
11442
11443 else
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -rf conftest*
11447   echo "$ac_t""no" 1>&6
11448 fi
11449 rm -f conftest*
11450
11451 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11452 echo "configure:11453: checking for sigsetjmp" >&5
11453 cat > conftest.$ac_ext <<EOF
11454 #line 11455 "configure"
11455 #include "confdefs.h"
11456 #include <setjmp.h>
11457 int main() {
11458 sigjmp_buf bar; sigsetjmp (bar, 0);
11459 ; return 0; }
11460 EOF
11461 if { (eval echo configure:11462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11462   rm -rf conftest*
11463   echo "$ac_t""yes" 1>&6
11464    { test "$extra_verbose" = "yes" && cat << \EOF
11465     Defining HAVE_SIGSETJMP
11466 EOF
11467 cat >> confdefs.h <<\EOF
11468 #define HAVE_SIGSETJMP 1
11469 EOF
11470 }
11471
11472 else
11473   echo "configure: failed program was:" >&5
11474   cat conftest.$ac_ext >&5
11475   rm -rf conftest*
11476   echo "$ac_t""no" 1>&6
11477 fi
11478 rm -f conftest*
11479
11480 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11481 echo "configure:11482: checking whether localtime caches TZ" >&5
11482
11483 if test "$ac_cv_func_tzset" = "yes"; then
11484 cat > conftest.$ac_ext <<EOF
11485 #line 11486 "configure"
11486 #include "confdefs.h"
11487 #include <time.h>
11488 #if STDC_HEADERS
11489 # include <stdlib.h>
11490 #endif
11491 extern char **environ;
11492 unset_TZ ()
11493 {
11494   char **from, **to;
11495   for (to = from = environ; (*to = *from); from++)
11496     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11497       to++;
11498 }
11499 char TZ_GMT0[] = "TZ=GMT0";
11500 char TZ_PST8[] = "TZ=PST8";
11501 main()
11502 {
11503   time_t now = time ((time_t *) 0);
11504   int hour_GMT0, hour_unset;
11505   if (putenv (TZ_GMT0) != 0)
11506     exit (1);
11507   hour_GMT0 = localtime (&now)->tm_hour;
11508   unset_TZ ();
11509   hour_unset = localtime (&now)->tm_hour;
11510   if (putenv (TZ_PST8) != 0)
11511     exit (1);
11512   if (localtime (&now)->tm_hour == hour_GMT0)
11513     exit (1);
11514   unset_TZ ();
11515   if (localtime (&now)->tm_hour != hour_unset)
11516     exit (1);
11517   exit (0);
11518 }
11519 EOF
11520 if { (eval echo configure:11521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11521 then
11522   emacs_cv_localtime_cache=no
11523 else
11524   conftest_rc="$?"
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -fr conftest*
11528   emacs_cv_localtime_cache=yes
11529 fi
11530 rm -fr conftest*
11531 else
11532         # If we lack tzset, report that localtime does not cache TZ,
11533         # since we can't invalidate the cache if we don't have tzset.
11534         emacs_cv_localtime_cache=no
11535 fi
11536 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11537 if test $emacs_cv_localtime_cache = yes; then
11538   { test "$extra_verbose" = "yes" && cat << \EOF
11539     Defining LOCALTIME_CACHE
11540 EOF
11541 cat >> confdefs.h <<\EOF
11542 #define LOCALTIME_CACHE 1
11543 EOF
11544 }
11545
11546 fi
11547
11548 if test "$HAVE_TIMEVAL" = "yes"; then
11549 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11550 echo "configure:11551: checking whether gettimeofday accepts one or two arguments" >&5
11551 cat > conftest.$ac_ext <<EOF
11552 #line 11553 "configure"
11553 #include "confdefs.h"
11554
11555 #ifdef TIME_WITH_SYS_TIME
11556 #include <sys/time.h>
11557 #include <time.h>
11558 #else
11559 #ifdef HAVE_SYS_TIME_H
11560 #include <sys/time.h>
11561 #else
11562 #include <time.h>
11563 #endif
11564 #endif
11565   
11566 int main() {
11567
11568   struct timeval time;
11569   gettimeofday (&time, 0);
11570
11571 ; return 0; }
11572 EOF
11573 if { (eval echo configure:11574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11574   rm -rf conftest*
11575   echo "$ac_t""two" 1>&6
11576 else
11577   echo "configure: failed program was:" >&5
11578   cat conftest.$ac_ext >&5
11579   rm -rf conftest*
11580   echo "$ac_t""one" 1>&6
11581    { test "$extra_verbose" = "yes" && cat << \EOF
11582     Defining GETTIMEOFDAY_ONE_ARGUMENT
11583 EOF
11584 cat >> confdefs.h <<\EOF
11585 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11586 EOF
11587 }
11588
11589 fi
11590 rm -f conftest*
11591 fi
11592
11593
11594 echo $ac_n "checking for inline""... $ac_c" 1>&6
11595 echo "configure:11596: checking for inline" >&5
11596
11597 ac_cv_c_inline=no
11598 for ac_kw in inline __inline__ __inline; do
11599   cat > conftest.$ac_ext <<EOF
11600 #line 11601 "configure"
11601 #include "confdefs.h"
11602
11603 int main() {
11604 } $ac_kw foo() {
11605 ; return 0; }
11606 EOF
11607 if { (eval echo configure:11608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11608   rm -rf conftest*
11609   ac_cv_c_inline=$ac_kw; break
11610 else
11611   echo "configure: failed program was:" >&5
11612   cat conftest.$ac_ext >&5
11613 fi
11614 rm -f conftest*
11615 done
11616
11617
11618 echo "$ac_t""$ac_cv_c_inline" 1>&6
11619 case "$ac_cv_c_inline" in
11620   inline | yes) ;;
11621   no) { test "$extra_verbose" = "yes" && cat << \EOF
11622     Defining inline = 
11623 EOF
11624 cat >> confdefs.h <<\EOF
11625 #define inline 
11626 EOF
11627 }
11628  ;;
11629   *)  { test "$extra_verbose" = "yes" && cat << EOF
11630     Defining inline = $ac_cv_c_inline
11631 EOF
11632 cat >> confdefs.h <<EOF
11633 #define inline $ac_cv_c_inline
11634 EOF
11635 }
11636  ;;
11637 esac
11638
11639 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11640    echo "    xemacs will be linked with \"inline.o\""
11641  fi
11642
11643
11644 if test "$__DECC" != "yes"; then
11645   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11646 # for constant arguments.  Useless!
11647 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11648 echo "configure:11649: checking for working alloca.h" >&5
11649
11650 cat > conftest.$ac_ext <<EOF
11651 #line 11652 "configure"
11652 #include "confdefs.h"
11653 #include <alloca.h>
11654 int main() {
11655 char *p = alloca(2 * sizeof(int));
11656 ; return 0; }
11657 EOF
11658 if { (eval echo configure:11659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11659   rm -rf conftest*
11660   ac_cv_header_alloca_h=yes
11661 else
11662   echo "configure: failed program was:" >&5
11663   cat conftest.$ac_ext >&5
11664   rm -rf conftest*
11665   ac_cv_header_alloca_h=no
11666 fi
11667 rm -f conftest*
11668
11669 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11670 if test $ac_cv_header_alloca_h = yes; then
11671   { test "$extra_verbose" = "yes" && cat << \EOF
11672     Defining HAVE_ALLOCA_H
11673 EOF
11674 cat >> confdefs.h <<\EOF
11675 #define HAVE_ALLOCA_H 1
11676 EOF
11677 }
11678
11679 fi
11680
11681 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11682 echo "configure:11683: checking for alloca" >&5
11683
11684 cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687
11688 #ifdef __GNUC__
11689 # define alloca __builtin_alloca
11690 #else
11691 # ifdef _MSC_VER
11692 #  include <malloc.h>
11693 #  define alloca _alloca
11694 # else
11695 #  if HAVE_ALLOCA_H
11696 #   include <alloca.h>
11697 #  else
11698 #   ifdef _AIX
11699  #pragma alloca
11700 #   else
11701 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11702 char *alloca ();
11703 #    endif
11704 #   endif
11705 #  endif
11706 # endif
11707 #endif
11708
11709 int main() {
11710 char *p = (char *) alloca(1);
11711 ; return 0; }
11712 EOF
11713 if { (eval echo configure:11714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11714   rm -rf conftest*
11715   ac_cv_func_alloca_works=yes
11716 else
11717   echo "configure: failed program was:" >&5
11718   cat conftest.$ac_ext >&5
11719   rm -rf conftest*
11720   ac_cv_func_alloca_works=no
11721 fi
11722 rm -f conftest*
11723
11724 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11725 if test $ac_cv_func_alloca_works = yes; then
11726   { test "$extra_verbose" = "yes" && cat << \EOF
11727     Defining HAVE_ALLOCA
11728 EOF
11729 cat >> confdefs.h <<\EOF
11730 #define HAVE_ALLOCA 1
11731 EOF
11732 }
11733
11734 fi
11735
11736 if test $ac_cv_func_alloca_works = no; then
11737   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11738   # that cause trouble.  Some versions do not even contain alloca or
11739   # contain a buggy version.  If you still want to use their alloca,
11740   # use ar to extract alloca.o from them instead of compiling alloca.c.
11741   ALLOCA=alloca.${ac_objext}
11742   { test "$extra_verbose" = "yes" && cat << \EOF
11743     Defining C_ALLOCA
11744 EOF
11745 cat >> confdefs.h <<\EOF
11746 #define C_ALLOCA 1
11747 EOF
11748 }
11749
11750
11751 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11752 echo "configure:11753: checking whether alloca needs Cray hooks" >&5
11753
11754 cat > conftest.$ac_ext <<EOF
11755 #line 11756 "configure"
11756 #include "confdefs.h"
11757 #if defined(CRAY) && ! defined(CRAY2)
11758 webecray
11759 #else
11760 wenotbecray
11761 #endif
11762
11763 EOF
11764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11765   egrep "webecray" >/dev/null 2>&1; then
11766   rm -rf conftest*
11767   ac_cv_os_cray=yes
11768 else
11769   rm -rf conftest*
11770   ac_cv_os_cray=no
11771 fi
11772 rm -f conftest*
11773
11774
11775 echo "$ac_t""$ac_cv_os_cray" 1>&6
11776 if test $ac_cv_os_cray = yes; then
11777 for ac_func in _getb67 GETB67 getb67; do
11778   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11779 echo "configure:11780: checking for $ac_func" >&5
11780
11781 cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784 /* System header to define __stub macros and hopefully few prototypes,
11785     which can conflict with char $ac_func(); below.  */
11786 #include <assert.h>
11787 /* Override any gcc2 internal prototype to avoid an error.  */
11788 /* We use char because int might match the return type of a gcc2
11789     builtin and then its argument prototype would still apply.  */
11790 char $ac_func();
11791
11792 int main() {
11793
11794 /* The GNU C library defines this for functions which it implements
11795     to always fail with ENOSYS.  Some functions are actually named
11796     something starting with __ and the normal name is an alias.  */
11797 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11798 choke me
11799 #else
11800 $ac_func();
11801 #endif
11802
11803 ; return 0; }
11804 EOF
11805 if { (eval echo configure:11806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11806   rm -rf conftest*
11807   eval "ac_cv_func_$ac_func=yes"
11808 else
11809   echo "configure: failed program was:" >&5
11810   cat conftest.$ac_ext >&5
11811   rm -rf conftest*
11812   eval "ac_cv_func_$ac_func=no"
11813 fi
11814 rm -f conftest*
11815
11816 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11817   echo "$ac_t""yes" 1>&6
11818   { test "$extra_verbose" = "yes" && cat << EOF
11819     Defining CRAY_STACKSEG_END = $ac_func
11820 EOF
11821 cat >> confdefs.h <<EOF
11822 #define CRAY_STACKSEG_END $ac_func
11823 EOF
11824 }
11825
11826   break
11827 else
11828   echo "$ac_t""no" 1>&6
11829 fi
11830
11831 done
11832 fi
11833
11834 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11835 echo "configure:11836: checking stack direction for C alloca" >&5
11836
11837 cat > conftest.$ac_ext <<EOF
11838 #line 11839 "configure"
11839 #include "confdefs.h"
11840 find_stack_direction ()
11841 {
11842   static char *addr = 0;
11843   auto char dummy;
11844   if (addr == 0)
11845     {
11846       addr = &dummy;
11847       return find_stack_direction ();
11848     }
11849   else
11850     return (&dummy > addr) ? 1 : -1;
11851 }
11852 main ()
11853 {
11854   exit (find_stack_direction() < 0);
11855 }
11856 EOF
11857 if { (eval echo configure:11858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11858 then
11859   ac_cv_c_stack_direction=1
11860 else
11861   conftest_rc="$?"
11862   echo "configure: failed program was:" >&5
11863   cat conftest.$ac_ext >&5
11864   rm -fr conftest*
11865   ac_cv_c_stack_direction=-1
11866 fi
11867 rm -fr conftest*
11868
11869 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11870 { test "$extra_verbose" = "yes" && cat << EOF
11871     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11872 EOF
11873 cat >> confdefs.h <<EOF
11874 #define STACK_DIRECTION $ac_cv_c_stack_direction
11875 EOF
11876 }
11877
11878 fi
11879
11880   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11881    echo "    xemacs will be linked with \"$ALLOCA\""
11882  fi
11883 fi
11884
11885 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11886 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11887 echo "configure:11888: checking for vfork.h" >&5
11888
11889 cat > conftest.$ac_ext <<EOF
11890 #line 11891 "configure"
11891 #include "confdefs.h"
11892 #include <vfork.h>
11893 EOF
11894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11895 { (eval echo configure:11896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11897 if test -z "$ac_err"; then
11898   rm -rf conftest*
11899   eval "ac_cv_header_$ac_safe=yes"
11900 else
11901   echo "$ac_err" >&5
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   eval "ac_cv_header_$ac_safe=no"
11906 fi
11907 rm -f conftest*
11908 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11909   echo "$ac_t""yes" 1>&6
11910   { test "$extra_verbose" = "yes" && cat << \EOF
11911     Defining HAVE_VFORK_H
11912 EOF
11913 cat >> confdefs.h <<\EOF
11914 #define HAVE_VFORK_H 1
11915 EOF
11916 }
11917
11918 else
11919   echo "$ac_t""no" 1>&6
11920 fi
11921
11922 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11923 echo "configure:11924: checking for working vfork" >&5
11924
11925 cat > conftest.$ac_ext <<EOF
11926 #line 11927 "configure"
11927 #include "confdefs.h"
11928 /* Thanks to Paul Eggert for this test.  */
11929 #include <stdio.h>
11930 #include <sys/types.h>
11931 #include <sys/stat.h>
11932 #ifdef HAVE_UNISTD_H
11933 #include <unistd.h>
11934 #endif
11935 #ifdef HAVE_VFORK_H
11936 #include <vfork.h>
11937 #endif
11938 /* On some sparc systems, changes by the child to local and incoming
11939    argument registers are propagated back to the parent.
11940    The compiler is told about this with #include <vfork.h>,
11941    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11942    Test for this by using a static variable whose address
11943    is put into a register that is clobbered by the vfork.  */
11944 static
11945 #ifdef __cplusplus
11946 sparc_address_test (int arg)
11947 #else
11948 sparc_address_test (arg) int arg;
11949 #endif
11950 {
11951   static pid_t child;
11952   if (!child) {
11953     child = vfork ();
11954     if (child < 0) {
11955       perror ("vfork");
11956       _exit(2);
11957     }
11958     if (!child) {
11959       arg = getpid();
11960       write(-1, "", 0);
11961       _exit (arg);
11962     }
11963   }
11964 }
11965 main() {
11966   pid_t parent = getpid ();
11967   pid_t child;
11968
11969   sparc_address_test ();
11970
11971   child = vfork ();
11972
11973   if (child == 0) {
11974     /* Here is another test for sparc vfork register problems.
11975        This test uses lots of local variables, at least
11976        as many local variables as main has allocated so far
11977        including compiler temporaries.  4 locals are enough for
11978        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11979        A buggy compiler should reuse the register of parent
11980        for one of the local variables, since it will think that
11981        parent can't possibly be used any more in this routine.
11982        Assigning to the local variable will thus munge parent
11983        in the parent process.  */
11984     pid_t
11985       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11986       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11987     /* Convince the compiler that p..p7 are live; otherwise, it might
11988        use the same hardware register for all 8 local variables.  */
11989     if (p != p1 || p != p2 || p != p3 || p != p4
11990         || p != p5 || p != p6 || p != p7)
11991       _exit(1);
11992
11993     /* On some systems (e.g. IRIX 3.3),
11994        vfork doesn't separate parent from child file descriptors.
11995        If the child closes a descriptor before it execs or exits,
11996        this munges the parent's descriptor as well.
11997        Test for this by closing stdout in the child.  */
11998     _exit(close(fileno(stdout)) != 0);
11999   } else {
12000     int status;
12001     struct stat st;
12002
12003     while (wait(&status) != child)
12004       ;
12005     exit(
12006          /* Was there some problem with vforking?  */
12007          child < 0
12008
12009          /* Did the child fail?  (This shouldn't happen.)  */
12010          || status
12011
12012          /* Did the vfork/compiler bug occur?  */
12013          || parent != getpid()
12014
12015          /* Did the file descriptor bug occur?  */
12016          || fstat(fileno(stdout), &st) != 0
12017          );
12018   }
12019 }
12020 EOF
12021 if { (eval echo configure:12022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12022 then
12023   ac_cv_func_vfork_works=yes
12024 else
12025   conftest_rc="$?"
12026   echo "configure: failed program was:" >&5
12027   cat conftest.$ac_ext >&5
12028   rm -fr conftest*
12029   ac_cv_func_vfork_works=no
12030 fi
12031 rm -fr conftest*
12032
12033 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12034 if test $ac_cv_func_vfork_works = no; then
12035   { test "$extra_verbose" = "yes" && cat << \EOF
12036     Defining vfork = fork
12037 EOF
12038 cat >> confdefs.h <<\EOF
12039 #define vfork fork
12040 EOF
12041 }
12042
12043 fi
12044
12045
12046 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12047 echo "configure:12048: checking for working strcoll" >&5
12048
12049 cat > conftest.$ac_ext <<EOF
12050 #line 12051 "configure"
12051 #include "confdefs.h"
12052 #include <string.h>
12053 main ()
12054 {
12055   exit (strcoll ("abc", "def") >= 0 ||
12056         strcoll ("ABC", "DEF") >= 0 ||
12057         strcoll ("123", "456") >= 0);
12058 }
12059 EOF
12060 if { (eval echo configure:12061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12061 then
12062   ac_cv_func_strcoll_works=yes
12063 else
12064   conftest_rc="$?"
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -fr conftest*
12068   ac_cv_func_strcoll_works=no
12069 fi
12070 rm -fr conftest*
12071
12072 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12073 if test $ac_cv_func_strcoll_works = yes; then
12074   { test "$extra_verbose" = "yes" && cat << \EOF
12075     Defining HAVE_STRCOLL
12076 EOF
12077 cat >> confdefs.h <<\EOF
12078 #define HAVE_STRCOLL 1
12079 EOF
12080 }
12081
12082 fi
12083
12084
12085 for ac_func in getpgrp
12086 do
12087 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12088 echo "configure:12089: checking for $ac_func" >&5
12089
12090 cat > conftest.$ac_ext <<EOF
12091 #line 12092 "configure"
12092 #include "confdefs.h"
12093 /* System header to define __stub macros and hopefully few prototypes,
12094     which can conflict with char $ac_func(); below.  */
12095 #include <assert.h>
12096 /* Override any gcc2 internal prototype to avoid an error.  */
12097 /* We use char because int might match the return type of a gcc2
12098     builtin and then its argument prototype would still apply.  */
12099 char $ac_func();
12100
12101 int main() {
12102
12103 /* The GNU C library defines this for functions which it implements
12104     to always fail with ENOSYS.  Some functions are actually named
12105     something starting with __ and the normal name is an alias.  */
12106 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12107 choke me
12108 #else
12109 $ac_func();
12110 #endif
12111
12112 ; return 0; }
12113 EOF
12114 if { (eval echo configure:12115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12115   rm -rf conftest*
12116   eval "ac_cv_func_$ac_func=yes"
12117 else
12118   echo "configure: failed program was:" >&5
12119   cat conftest.$ac_ext >&5
12120   rm -rf conftest*
12121   eval "ac_cv_func_$ac_func=no"
12122 fi
12123 rm -f conftest*
12124
12125 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12126   echo "$ac_t""yes" 1>&6
12127     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12128   { test "$extra_verbose" = "yes" && cat << EOF
12129     Defining $ac_tr_func
12130 EOF
12131 cat >> confdefs.h <<EOF
12132 #define $ac_tr_func 1
12133 EOF
12134 }
12135  
12136 else
12137   echo "$ac_t""no" 1>&6
12138 fi
12139 done
12140
12141 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12142 echo "configure:12143: checking whether getpgrp takes no argument" >&5
12143
12144 cat > conftest.$ac_ext <<EOF
12145 #line 12146 "configure"
12146 #include "confdefs.h"
12147
12148 /*
12149  * If this system has a BSD-style getpgrp(),
12150  * which takes a pid argument, exit unsuccessfully.
12151  *
12152  * Snarfed from Chet Ramey's bash pgrp.c test program
12153  */
12154 #include <stdio.h>
12155 #include <sys/types.h>
12156
12157 int     pid;
12158 int     pg1, pg2, pg3, pg4;
12159 int     ng, np, s, child;
12160
12161 main()
12162 {
12163         pid = getpid();
12164         pg1 = getpgrp(0);
12165         pg2 = getpgrp();
12166         pg3 = getpgrp(pid);
12167         pg4 = getpgrp(1);
12168
12169         /*
12170          * If all of these values are the same, it's pretty sure that
12171          * we're on a system that ignores getpgrp's first argument.
12172          */
12173         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12174                 exit(0);
12175
12176         child = fork();
12177         if (child < 0)
12178                 exit(1);
12179         else if (child == 0) {
12180                 np = getpid();
12181                 /*
12182                  * If this is Sys V, this will not work; pgrp will be
12183                  * set to np because setpgrp just changes a pgrp to be
12184                  * the same as the pid.
12185                  */
12186                 setpgrp(np, pg1);
12187                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12188                 if (ng == pg1) {
12189                         exit(1);
12190                 } else {
12191                         exit(0);
12192                 }
12193         } else {
12194                 wait(&s);
12195                 exit(s>>8);
12196         }
12197 }
12198
12199 EOF
12200 if { (eval echo configure:12201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12201 then
12202   ac_cv_func_getpgrp_void=yes
12203 else
12204   conftest_rc="$?"
12205   echo "configure: failed program was:" >&5
12206   cat conftest.$ac_ext >&5
12207   rm -fr conftest*
12208   ac_cv_func_getpgrp_void=no
12209 fi
12210 rm -fr conftest*
12211
12212
12213 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12214 if test $ac_cv_func_getpgrp_void = yes; then
12215   { test "$extra_verbose" = "yes" && cat << \EOF
12216     Defining GETPGRP_VOID
12217 EOF
12218 cat >> confdefs.h <<\EOF
12219 #define GETPGRP_VOID 1
12220 EOF
12221 }
12222
12223 fi
12224
12225
12226 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12227 echo "configure:12228: checking for working mmap" >&5
12228 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12229 cat > conftest.$ac_ext <<EOF
12230 #line 12231 "configure"
12231 #include "confdefs.h"
12232 #include <stdio.h>
12233 #include <unistd.h>
12234 #include <fcntl.h>
12235 #include <sys/mman.h>
12236
12237 #ifndef MAP_VARIABLE
12238 #define MAP_VARIABLE 0
12239 #endif
12240
12241 #ifndef MAP_FAILED
12242 #define MAP_FAILED -1
12243 #endif
12244
12245 int main (int argc, char *argv[])
12246 {
12247   int fd = -1;
12248   caddr_t p;
12249 #ifndef MAP_ANONYMOUS
12250   fd = open ("/dev/zero", O_RDWR);
12251   if (fd < 0)
12252     return 1;
12253 #define MAP_ANONYMOUS 0
12254 #endif
12255   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12256            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12257            fd, 0) != (void *) MAP_FAILED)
12258     return 0;
12259   perror ("conftest: mmap failed");
12260   return 1;
12261 }
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12264 then
12265   have_mmap=yes
12266 else
12267   conftest_rc="$?"
12268   echo "configure: failed program was:" >&5
12269   cat conftest.$ac_ext >&5
12270   rm -fr conftest*
12271   have_mmap=no
12272 fi
12273 rm -fr conftest* ;;
12274 esac
12275 echo "$ac_t""$have_mmap" 1>&6
12276 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12277     Defining HAVE_MMAP
12278 EOF
12279 cat >> confdefs.h <<\EOF
12280 #define HAVE_MMAP 1
12281 EOF
12282 }
12283
12284
12285 case "$opsys" in cygwin*) 
12286         test "$rel_alloc" = "default" && rel_alloc=no ;;
12287 esac
12288 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12289 if test "$rel_alloc $have_mmap" = "default yes"; then
12290   if test "$doug_lea_malloc" = "yes"; then
12291         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12292 echo "configure:12293: checking for M_MMAP_THRESHOLD" >&5
12293     cat > conftest.$ac_ext <<EOF
12294 #line 12295 "configure"
12295 #include "confdefs.h"
12296 #include <malloc.h>
12297 int main() {
12298
12299 #ifndef M_MMAP_THRESHOLD
12300 #error No M_MMAP_THRESHOLD :-(
12301 !@+$%^&*_)(_ - unlikely to compile...
12302 #endif
12303
12304 ; return 0; }
12305 EOF
12306 if { (eval echo configure:12307: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12307   rm -rf conftest*
12308   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12309 else
12310   echo "configure: failed program was:" >&5
12311   cat conftest.$ac_ext >&5
12312   rm -rf conftest*
12313   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12314 fi
12315 rm -f conftest*
12316   else
12317     rel_alloc=yes
12318   fi
12319 fi
12320 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12321     Defining REL_ALLOC
12322 EOF
12323 cat >> confdefs.h <<\EOF
12324 #define REL_ALLOC 1
12325 EOF
12326 }
12327
12328
12329 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12330 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12331 echo "configure:12332: checking for termios.h" >&5
12332
12333 cat > conftest.$ac_ext <<EOF
12334 #line 12335 "configure"
12335 #include "confdefs.h"
12336 #include <termios.h>
12337 EOF
12338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12339 { (eval echo configure:12340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12341 if test -z "$ac_err"; then
12342   rm -rf conftest*
12343   eval "ac_cv_header_$ac_safe=yes"
12344 else
12345   echo "$ac_err" >&5
12346   echo "configure: failed program was:" >&5
12347   cat conftest.$ac_ext >&5
12348   rm -rf conftest*
12349   eval "ac_cv_header_$ac_safe=no"
12350 fi
12351 rm -f conftest*
12352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12353   echo "$ac_t""yes" 1>&6
12354   { test "$extra_verbose" = "yes" && cat << \EOF
12355     Defining HAVE_TERMIOS
12356 EOF
12357 cat >> confdefs.h <<\EOF
12358 #define HAVE_TERMIOS 1
12359 EOF
12360 }
12361
12362   { test "$extra_verbose" = "yes" && cat << \EOF
12363     Defining SIGNALS_VIA_CHARACTERS
12364 EOF
12365 cat >> confdefs.h <<\EOF
12366 #define SIGNALS_VIA_CHARACTERS 1
12367 EOF
12368 }
12369
12370   { test "$extra_verbose" = "yes" && cat << \EOF
12371     Defining NO_TERMIO
12372 EOF
12373 cat >> confdefs.h <<\EOF
12374 #define NO_TERMIO 1
12375 EOF
12376 }
12377
12378 else
12379   echo "$ac_t""no" 1>&6
12380 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12381 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12382 echo "configure:12383: checking for termio.h" >&5
12383
12384 cat > conftest.$ac_ext <<EOF
12385 #line 12386 "configure"
12386 #include "confdefs.h"
12387 #include <termio.h>
12388 EOF
12389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12390 { (eval echo configure:12391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12392 if test -z "$ac_err"; then
12393   rm -rf conftest*
12394   eval "ac_cv_header_$ac_safe=yes"
12395 else
12396   echo "$ac_err" >&5
12397   echo "configure: failed program was:" >&5
12398   cat conftest.$ac_ext >&5
12399   rm -rf conftest*
12400   eval "ac_cv_header_$ac_safe=no"
12401 fi
12402 rm -f conftest*
12403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12404   echo "$ac_t""yes" 1>&6
12405   { test "$extra_verbose" = "yes" && cat << \EOF
12406     Defining HAVE_TERMIO
12407 EOF
12408 cat >> confdefs.h <<\EOF
12409 #define HAVE_TERMIO 1
12410 EOF
12411 }
12412
12413 else
12414   echo "$ac_t""no" 1>&6
12415 fi
12416
12417 fi
12418
12419
12420
12421 echo $ac_n "checking for socket""... $ac_c" 1>&6
12422 echo "configure:12423: checking for socket" >&5
12423
12424 cat > conftest.$ac_ext <<EOF
12425 #line 12426 "configure"
12426 #include "confdefs.h"
12427 /* System header to define __stub macros and hopefully few prototypes,
12428     which can conflict with char socket(); below.  */
12429 #include <assert.h>
12430 /* Override any gcc2 internal prototype to avoid an error.  */
12431 /* We use char because int might match the return type of a gcc2
12432     builtin and then its argument prototype would still apply.  */
12433 char socket();
12434
12435 int main() {
12436
12437 /* The GNU C library defines this for functions which it implements
12438     to always fail with ENOSYS.  Some functions are actually named
12439     something starting with __ and the normal name is an alias.  */
12440 #if defined (__stub_socket) || defined (__stub___socket)
12441 choke me
12442 #else
12443 socket();
12444 #endif
12445
12446 ; return 0; }
12447 EOF
12448 if { (eval echo configure:12449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12449   rm -rf conftest*
12450   eval "ac_cv_func_socket=yes"
12451 else
12452   echo "configure: failed program was:" >&5
12453   cat conftest.$ac_ext >&5
12454   rm -rf conftest*
12455   eval "ac_cv_func_socket=no"
12456 fi
12457 rm -f conftest*
12458
12459 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12460   echo "$ac_t""yes" 1>&6
12461   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12462 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12463 echo "configure:12464: checking for netinet/in.h" >&5
12464
12465 cat > conftest.$ac_ext <<EOF
12466 #line 12467 "configure"
12467 #include "confdefs.h"
12468 #include <netinet/in.h>
12469 EOF
12470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12471 { (eval echo configure:12472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12473 if test -z "$ac_err"; then
12474   rm -rf conftest*
12475   eval "ac_cv_header_$ac_safe=yes"
12476 else
12477   echo "$ac_err" >&5
12478   echo "configure: failed program was:" >&5
12479   cat conftest.$ac_ext >&5
12480   rm -rf conftest*
12481   eval "ac_cv_header_$ac_safe=no"
12482 fi
12483 rm -f conftest*
12484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12485   echo "$ac_t""yes" 1>&6
12486   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12487 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12488 echo "configure:12489: checking for arpa/inet.h" >&5
12489
12490 cat > conftest.$ac_ext <<EOF
12491 #line 12492 "configure"
12492 #include "confdefs.h"
12493 #include <arpa/inet.h>
12494 EOF
12495 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12496 { (eval echo configure:12497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12497 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12498 if test -z "$ac_err"; then
12499   rm -rf conftest*
12500   eval "ac_cv_header_$ac_safe=yes"
12501 else
12502   echo "$ac_err" >&5
12503   echo "configure: failed program was:" >&5
12504   cat conftest.$ac_ext >&5
12505   rm -rf conftest*
12506   eval "ac_cv_header_$ac_safe=no"
12507 fi
12508 rm -f conftest*
12509 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12510   echo "$ac_t""yes" 1>&6
12511   
12512   { test "$extra_verbose" = "yes" && cat << \EOF
12513     Defining HAVE_SOCKETS
12514 EOF
12515 cat >> confdefs.h <<\EOF
12516 #define HAVE_SOCKETS 1
12517 EOF
12518 }
12519
12520       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12521 echo "configure:12522: checking "for sun_len member in struct sockaddr_un"" >&5
12522       cat > conftest.$ac_ext <<EOF
12523 #line 12524 "configure"
12524 #include "confdefs.h"
12525
12526 #include <sys/types.h>
12527 #include <sys/socket.h>
12528 #include <sys/un.h>
12529       
12530 int main() {
12531 static struct sockaddr_un x; x.sun_len = 1;
12532 ; return 0; }
12533 EOF
12534 if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12535   rm -rf conftest*
12536   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12537     Defining HAVE_SOCKADDR_SUN_LEN
12538 EOF
12539 cat >> confdefs.h <<\EOF
12540 #define HAVE_SOCKADDR_SUN_LEN 1
12541 EOF
12542 }
12543
12544 else
12545   echo "configure: failed program was:" >&5
12546   cat conftest.$ac_ext >&5
12547   rm -rf conftest*
12548   echo "$ac_t""no" 1>&6
12549 fi
12550 rm -f conftest*
12551       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12552 echo "configure:12553: checking "for ip_mreq struct in netinet/in.h"" >&5
12553       cat > conftest.$ac_ext <<EOF
12554 #line 12555 "configure"
12555 #include "confdefs.h"
12556
12557 #include <sys/types.h>
12558 #include <netinet/in.h>
12559       
12560 int main() {
12561 static struct ip_mreq x;
12562 ; return 0; }
12563 EOF
12564 if { (eval echo configure:12565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12565   rm -rf conftest*
12566   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12567     Defining HAVE_MULTICAST
12568 EOF
12569 cat >> confdefs.h <<\EOF
12570 #define HAVE_MULTICAST 1
12571 EOF
12572 }
12573
12574 else
12575   echo "configure: failed program was:" >&5
12576   cat conftest.$ac_ext >&5
12577   rm -rf conftest*
12578   echo "$ac_t""no" 1>&6
12579 fi
12580 rm -f conftest*
12581 else
12582   echo "$ac_t""no" 1>&6
12583 fi
12584
12585 else
12586   echo "$ac_t""no" 1>&6
12587 fi
12588
12589 else
12590   echo "$ac_t""no" 1>&6
12591 fi
12592
12593
12594 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12595 echo "configure:12596: checking for msgget" >&5
12596
12597 cat > conftest.$ac_ext <<EOF
12598 #line 12599 "configure"
12599 #include "confdefs.h"
12600 /* System header to define __stub macros and hopefully few prototypes,
12601     which can conflict with char msgget(); below.  */
12602 #include <assert.h>
12603 /* Override any gcc2 internal prototype to avoid an error.  */
12604 /* We use char because int might match the return type of a gcc2
12605     builtin and then its argument prototype would still apply.  */
12606 char msgget();
12607
12608 int main() {
12609
12610 /* The GNU C library defines this for functions which it implements
12611     to always fail with ENOSYS.  Some functions are actually named
12612     something starting with __ and the normal name is an alias.  */
12613 #if defined (__stub_msgget) || defined (__stub___msgget)
12614 choke me
12615 #else
12616 msgget();
12617 #endif
12618
12619 ; return 0; }
12620 EOF
12621 if { (eval echo configure:12622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12622   rm -rf conftest*
12623   eval "ac_cv_func_msgget=yes"
12624 else
12625   echo "configure: failed program was:" >&5
12626   cat conftest.$ac_ext >&5
12627   rm -rf conftest*
12628   eval "ac_cv_func_msgget=no"
12629 fi
12630 rm -f conftest*
12631
12632 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12633   echo "$ac_t""yes" 1>&6
12634   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12635 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12636 echo "configure:12637: checking for sys/ipc.h" >&5
12637
12638 cat > conftest.$ac_ext <<EOF
12639 #line 12640 "configure"
12640 #include "confdefs.h"
12641 #include <sys/ipc.h>
12642 EOF
12643 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12644 { (eval echo configure:12645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12645 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12646 if test -z "$ac_err"; then
12647   rm -rf conftest*
12648   eval "ac_cv_header_$ac_safe=yes"
12649 else
12650   echo "$ac_err" >&5
12651   echo "configure: failed program was:" >&5
12652   cat conftest.$ac_ext >&5
12653   rm -rf conftest*
12654   eval "ac_cv_header_$ac_safe=no"
12655 fi
12656 rm -f conftest*
12657 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12658   echo "$ac_t""yes" 1>&6
12659   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12660 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12661 echo "configure:12662: checking for sys/msg.h" >&5
12662
12663 cat > conftest.$ac_ext <<EOF
12664 #line 12665 "configure"
12665 #include "confdefs.h"
12666 #include <sys/msg.h>
12667 EOF
12668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12669 { (eval echo configure:12670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12671 if test -z "$ac_err"; then
12672   rm -rf conftest*
12673   eval "ac_cv_header_$ac_safe=yes"
12674 else
12675   echo "$ac_err" >&5
12676   echo "configure: failed program was:" >&5
12677   cat conftest.$ac_ext >&5
12678   rm -rf conftest*
12679   eval "ac_cv_header_$ac_safe=no"
12680 fi
12681 rm -f conftest*
12682 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12683   echo "$ac_t""yes" 1>&6
12684   { test "$extra_verbose" = "yes" && cat << \EOF
12685     Defining HAVE_SYSVIPC
12686 EOF
12687 cat >> confdefs.h <<\EOF
12688 #define HAVE_SYSVIPC 1
12689 EOF
12690 }
12691
12692 else
12693   echo "$ac_t""no" 1>&6
12694 fi
12695
12696 else
12697   echo "$ac_t""no" 1>&6
12698 fi
12699
12700 else
12701   echo "$ac_t""no" 1>&6
12702 fi
12703
12704
12705 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12706 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12707 echo "configure:12708: checking for dirent.h" >&5
12708
12709 cat > conftest.$ac_ext <<EOF
12710 #line 12711 "configure"
12711 #include "confdefs.h"
12712 #include <dirent.h>
12713 EOF
12714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12715 { (eval echo configure:12716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12717 if test -z "$ac_err"; then
12718   rm -rf conftest*
12719   eval "ac_cv_header_$ac_safe=yes"
12720 else
12721   echo "$ac_err" >&5
12722   echo "configure: failed program was:" >&5
12723   cat conftest.$ac_ext >&5
12724   rm -rf conftest*
12725   eval "ac_cv_header_$ac_safe=no"
12726 fi
12727 rm -f conftest*
12728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12729   echo "$ac_t""yes" 1>&6
12730   { test "$extra_verbose" = "yes" && cat << \EOF
12731     Defining SYSV_SYSTEM_DIR
12732 EOF
12733 cat >> confdefs.h <<\EOF
12734 #define SYSV_SYSTEM_DIR 1
12735 EOF
12736 }
12737
12738 else
12739   echo "$ac_t""no" 1>&6
12740 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12741 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12742 echo "configure:12743: checking for sys/dir.h" >&5
12743
12744 cat > conftest.$ac_ext <<EOF
12745 #line 12746 "configure"
12746 #include "confdefs.h"
12747 #include <sys/dir.h>
12748 EOF
12749 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12750 { (eval echo configure:12751: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12751 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12752 if test -z "$ac_err"; then
12753   rm -rf conftest*
12754   eval "ac_cv_header_$ac_safe=yes"
12755 else
12756   echo "$ac_err" >&5
12757   echo "configure: failed program was:" >&5
12758   cat conftest.$ac_ext >&5
12759   rm -rf conftest*
12760   eval "ac_cv_header_$ac_safe=no"
12761 fi
12762 rm -f conftest*
12763 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12764   echo "$ac_t""yes" 1>&6
12765   :
12766 else
12767   echo "$ac_t""no" 1>&6
12768 { test "$extra_verbose" = "yes" && cat << \EOF
12769     Defining NONSYSTEM_DIR_LIBRARY
12770 EOF
12771 cat >> confdefs.h <<\EOF
12772 #define NONSYSTEM_DIR_LIBRARY 1
12773 EOF
12774 }
12775
12776 fi
12777
12778 fi
12779
12780
12781 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12782 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12783 echo "configure:12784: checking for nlist.h" >&5
12784
12785 cat > conftest.$ac_ext <<EOF
12786 #line 12787 "configure"
12787 #include "confdefs.h"
12788 #include <nlist.h>
12789 EOF
12790 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12791 { (eval echo configure:12792: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12792 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12793 if test -z "$ac_err"; then
12794   rm -rf conftest*
12795   eval "ac_cv_header_$ac_safe=yes"
12796 else
12797   echo "$ac_err" >&5
12798   echo "configure: failed program was:" >&5
12799   cat conftest.$ac_ext >&5
12800   rm -rf conftest*
12801   eval "ac_cv_header_$ac_safe=no"
12802 fi
12803 rm -f conftest*
12804 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12805   echo "$ac_t""yes" 1>&6
12806   { test "$extra_verbose" = "yes" && cat << \EOF
12807     Defining NLIST_STRUCT
12808 EOF
12809 cat >> confdefs.h <<\EOF
12810 #define NLIST_STRUCT 1
12811 EOF
12812 }
12813
12814 else
12815   echo "$ac_t""no" 1>&6
12816 fi
12817
12818
12819
12820 echo "checking "for sound support"" 1>&6
12821 echo "configure:12822: checking "for sound support"" >&5
12822 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12823
12824 if test "$with_native_sound" != "no"; then
12825     if test -n "$native_sound_lib"; then
12826     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12827 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12828 echo "configure:12829: checking for multimedia/audio_device.h" >&5
12829
12830 cat > conftest.$ac_ext <<EOF
12831 #line 12832 "configure"
12832 #include "confdefs.h"
12833 #include <multimedia/audio_device.h>
12834 EOF
12835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12836 { (eval echo configure:12837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12838 if test -z "$ac_err"; then
12839   rm -rf conftest*
12840   eval "ac_cv_header_$ac_safe=yes"
12841 else
12842   echo "$ac_err" >&5
12843   echo "configure: failed program was:" >&5
12844   cat conftest.$ac_ext >&5
12845   rm -rf conftest*
12846   eval "ac_cv_header_$ac_safe=no"
12847 fi
12848 rm -f conftest*
12849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12850   echo "$ac_t""yes" 1>&6
12851   sound_found=yes sound_cflags=""
12852       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12853    echo "    xemacs will be linked with \"sunplay.o\""
12854  fi
12855 else
12856   echo "$ac_t""no" 1>&6
12857 fi
12858
12859   fi
12860
12861     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12862     sound_found=yes
12863     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12864    echo "    xemacs will be linked with \"sunplay.o\""
12865  fi
12866     if test -d "/usr/demo/SOUND/include"
12867       then sound_cflags="-I/usr/demo/SOUND/include"
12868       else sound_cflags="-I/usr/demo/SOUND"
12869     fi
12870     if test -z "$native_sound_lib" ; then
12871       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12872         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12873         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12874       fi
12875     fi
12876   fi
12877
12878     if test -z "$sound_found"; then
12879     case "$canonical" in
12880     *-sgi-* )
12881       if test -z "$native_sound_lib"; then
12882         
12883 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12884 echo "configure:12885: checking for ALopenport in -laudio" >&5
12885 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12886
12887 xe_check_libs=" -laudio "
12888 cat > conftest.$ac_ext <<EOF
12889 #line 12890 "configure"
12890 #include "confdefs.h"
12891 /* Override any gcc2 internal prototype to avoid an error.  */
12892 /* We use char because int might match the return type of a gcc2
12893     builtin and then its argument prototype would still apply.  */
12894 char ALopenport();
12895
12896 int main() {
12897 ALopenport()
12898 ; return 0; }
12899 EOF
12900 if { (eval echo configure:12901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12901   rm -rf conftest*
12902   eval "ac_cv_lib_$ac_lib_var=yes"
12903 else
12904   echo "configure: failed program was:" >&5
12905   cat conftest.$ac_ext >&5
12906   rm -rf conftest*
12907   eval "ac_cv_lib_$ac_lib_var=no"
12908 fi
12909 rm -f conftest*
12910 xe_check_libs=""
12911
12912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12913   echo "$ac_t""yes" 1>&6
12914   native_sound_lib="-laudio"
12915 else
12916   echo "$ac_t""no" 1>&6
12917 fi
12918
12919
12920       fi
12921       if test -n "$native_sound_lib"; then
12922         sound_found=yes sound_cflags=""
12923         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12924    echo "    xemacs will be linked with \"sgiplay.o\""
12925  fi
12926       fi ;;
12927     hppa*-hp-hpux* )
12928       if test -z "$native_sound_lib"; then
12929         
12930 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12931 echo "configure:12932: checking for AOpenAudio in -lAlib" >&5
12932 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12933
12934 xe_check_libs=" -lAlib "
12935 cat > conftest.$ac_ext <<EOF
12936 #line 12937 "configure"
12937 #include "confdefs.h"
12938 /* Override any gcc2 internal prototype to avoid an error.  */
12939 /* We use char because int might match the return type of a gcc2
12940     builtin and then its argument prototype would still apply.  */
12941 char AOpenAudio();
12942
12943 int main() {
12944 AOpenAudio()
12945 ; return 0; }
12946 EOF
12947 if { (eval echo configure:12948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12948   rm -rf conftest*
12949   eval "ac_cv_lib_$ac_lib_var=yes"
12950 else
12951   echo "configure: failed program was:" >&5
12952   cat conftest.$ac_ext >&5
12953   rm -rf conftest*
12954   eval "ac_cv_lib_$ac_lib_var=no"
12955 fi
12956 rm -f conftest*
12957 xe_check_libs=""
12958
12959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12960   echo "$ac_t""yes" 1>&6
12961   native_sound_lib="-lAlib"
12962 else
12963   echo "$ac_t""no" 1>&6
12964 fi
12965
12966
12967       fi
12968       if test -n "$native_sound_lib"; then
12969         sound_found=yes
12970         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12971    echo "    xemacs will be linked with \"hpplay.o\""
12972  fi
12973         if test "$GCC" = "yes" # Kludge city
12974           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12975           else sound_cflags="+e -I/usr/audio/examples"
12976         fi
12977       fi ;;
12978     esac
12979   fi
12980
12981     if test -z "$sound_found"; then
12982     if test "$with_msw" = "yes"; then
12983     sound_found=yes
12984     native_sound_lib=
12985     fi
12986   fi
12987
12988     if test -z "$sound_found"; then
12989     for dir in "machine" "sys" "linux"; do
12990       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12991 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12992 echo "configure:12993: checking for ${dir}/soundcard.h" >&5
12993
12994 cat > conftest.$ac_ext <<EOF
12995 #line 12996 "configure"
12996 #include "confdefs.h"
12997 #include <${dir}/soundcard.h>
12998 EOF
12999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13000 { (eval echo configure:13001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13002 if test -z "$ac_err"; then
13003   rm -rf conftest*
13004   eval "ac_cv_header_$ac_safe=yes"
13005 else
13006   echo "$ac_err" >&5
13007   echo "configure: failed program was:" >&5
13008   cat conftest.$ac_ext >&5
13009   rm -rf conftest*
13010   eval "ac_cv_header_$ac_safe=no"
13011 fi
13012 rm -f conftest*
13013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13014   echo "$ac_t""yes" 1>&6
13015   sound_found=yes
13016        need_miscplay=yes
13017         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13018    echo "    xemacs will be linked with \"linuxplay.o\""
13019  fi
13020         { test "$extra_verbose" = "yes" && cat << EOF
13021     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13022 EOF
13023 cat >> confdefs.h <<EOF
13024 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13025 EOF
13026 }
13027
13028         break
13029 else
13030   echo "$ac_t""no" 1>&6
13031 fi
13032
13033     done
13034   fi
13035
13036   test "$sound_found" = "yes" && with_native_sound=yes
13037 fi
13038
13039 if test "$with_native_sound" = "yes"; then
13040   { test "$extra_verbose" = "yes" && cat << \EOF
13041     Defining HAVE_NATIVE_SOUND
13042 EOF
13043 cat >> confdefs.h <<\EOF
13044 #define HAVE_NATIVE_SOUND 1
13045 EOF
13046 }
13047
13048   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13049 fi
13050
13051 if test "$with_nas_sound" != "no"; then
13052   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13053 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13054 echo "configure:13055: checking for audio/audiolib.h" >&5
13055
13056 cat > conftest.$ac_ext <<EOF
13057 #line 13058 "configure"
13058 #include "confdefs.h"
13059 #include <audio/audiolib.h>
13060 EOF
13061 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13062 { (eval echo configure:13063: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13063 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13064 if test -z "$ac_err"; then
13065   rm -rf conftest*
13066   eval "ac_cv_header_$ac_safe=yes"
13067 else
13068   echo "$ac_err" >&5
13069   echo "configure: failed program was:" >&5
13070   cat conftest.$ac_ext >&5
13071   rm -rf conftest*
13072   eval "ac_cv_header_$ac_safe=no"
13073 fi
13074 rm -f conftest*
13075 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13076   echo "$ac_t""yes" 1>&6
13077   
13078     
13079 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13080 echo "configure:13081: checking for AuOpenServer in -laudio" >&5
13081 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13082
13083 xe_check_libs=" -laudio "
13084 cat > conftest.$ac_ext <<EOF
13085 #line 13086 "configure"
13086 #include "confdefs.h"
13087 /* Override any gcc2 internal prototype to avoid an error.  */
13088 /* We use char because int might match the return type of a gcc2
13089     builtin and then its argument prototype would still apply.  */
13090 char AuOpenServer();
13091
13092 int main() {
13093 AuOpenServer()
13094 ; return 0; }
13095 EOF
13096 if { (eval echo configure:13097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13097   rm -rf conftest*
13098   eval "ac_cv_lib_$ac_lib_var=yes"
13099 else
13100   echo "configure: failed program was:" >&5
13101   cat conftest.$ac_ext >&5
13102   rm -rf conftest*
13103   eval "ac_cv_lib_$ac_lib_var=no"
13104 fi
13105 rm -f conftest*
13106 xe_check_libs=""
13107
13108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13109   echo "$ac_t""yes" 1>&6
13110   have_nas_sound=yes
13111 else
13112   echo "$ac_t""no" 1>&6
13113 fi
13114
13115
13116 else
13117   echo "$ac_t""no" 1>&6
13118 fi
13119
13120   if test "$have_nas_sound" = "yes"; then
13121     with_nas_sound=yes
13122     { test "$extra_verbose" = "yes" && cat << \EOF
13123     Defining HAVE_NAS_SOUND
13124 EOF
13125 cat >> confdefs.h <<\EOF
13126 #define HAVE_NAS_SOUND 1
13127 EOF
13128 }
13129
13130     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13131    echo "    xemacs will be linked with \"nas.o\""
13132  fi
13133     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13134             cat > conftest.$ac_ext <<EOF
13135 #line 13136 "configure"
13136 #include "confdefs.h"
13137 #include <audio/Xtutil.h>
13138 EOF
13139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13140   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13141   :
13142 else
13143   rm -rf conftest*
13144   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13145     Defining NAS_NO_ERROR_JUMP
13146 EOF
13147 cat >> confdefs.h <<\EOF
13148 #define NAS_NO_ERROR_JUMP 1
13149 EOF
13150 }
13151
13152 fi
13153 rm -f conftest*
13154
13155   else
13156     test "$with_nas_sound" = "yes" && \
13157       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13158     with_nas_sound=no
13159   fi
13160 fi
13161
13162 if test "$with_esd_sound" != "no"; then
13163   # Extract the first word of "esd-config", so it can be a program name with args.
13164 set dummy esd-config; ac_word=$2
13165 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13166 echo "configure:13167: checking for $ac_word" >&5
13167
13168 if test -n "$have_esd_config"; then
13169   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13170 else
13171   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13172   ac_dummy="$PATH"
13173   for ac_dir in $ac_dummy; do
13174     test -z "$ac_dir" && ac_dir=.
13175     if test -f $ac_dir/$ac_word; then
13176       ac_cv_prog_have_esd_config="yes"
13177       break
13178     fi
13179   done
13180   IFS="$ac_save_ifs"
13181   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13182 fi
13183 have_esd_config="$ac_cv_prog_have_esd_config"
13184 if test -n "$have_esd_config"; then
13185   echo "$ac_t""$have_esd_config" 1>&6
13186 else
13187   echo "$ac_t""no" 1>&6
13188 fi
13189
13190   if test "$have_esd_config" = "yes"; then
13191     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13192     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
13193     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13194     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13195 echo "configure:13196: checking for esd_play_stream" >&5
13196
13197 cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 /* System header to define __stub macros and hopefully few prototypes,
13201     which can conflict with char esd_play_stream(); below.  */
13202 #include <assert.h>
13203 /* Override any gcc2 internal prototype to avoid an error.  */
13204 /* We use char because int might match the return type of a gcc2
13205     builtin and then its argument prototype would still apply.  */
13206 char esd_play_stream();
13207
13208 int main() {
13209
13210 /* The GNU C library defines this for functions which it implements
13211     to always fail with ENOSYS.  Some functions are actually named
13212     something starting with __ and the normal name is an alias.  */
13213 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13214 choke me
13215 #else
13216 esd_play_stream();
13217 #endif
13218
13219 ; return 0; }
13220 EOF
13221 if { (eval echo configure:13222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13222   rm -rf conftest*
13223   eval "ac_cv_func_esd_play_stream=yes"
13224 else
13225   echo "configure: failed program was:" >&5
13226   cat conftest.$ac_ext >&5
13227   rm -rf conftest*
13228   eval "ac_cv_func_esd_play_stream=no"
13229 fi
13230 rm -f conftest*
13231
13232 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13233   echo "$ac_t""yes" 1>&6
13234   have_esd_sound=yes
13235 else
13236   echo "$ac_t""no" 1>&6
13237 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13238 fi
13239
13240   fi
13241
13242   if test "$have_esd_sound" = "yes"; then
13243     with_esd_sound=yes
13244     need_miscplay=yes
13245     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13246    echo "    xemacs will be linked with \"esd.o\""
13247  fi
13248     { test "$extra_verbose" = "yes" && cat << \EOF
13249     Defining HAVE_ESD_SOUND
13250 EOF
13251 cat >> confdefs.h <<\EOF
13252 #define HAVE_ESD_SOUND 1
13253 EOF
13254 }
13255
13256   else
13257     test "$with_esd_sound" = "yes" && \
13258       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13259     with_esd_sound=no
13260   fi
13261 fi
13262
13263 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13264    echo "    xemacs will be linked with \"miscplay.o\""
13265  fi
13266
13267
13268 test -z "$with_tty" && with_tty=yes
13269
13270 if test "$with_tty" = "yes"  ; then
13271   echo "checking for TTY-related features" 1>&6
13272 echo "configure:13273: checking for TTY-related features" >&5
13273   { test "$extra_verbose" = "yes" && cat << \EOF
13274     Defining HAVE_TTY
13275 EOF
13276 cat >> confdefs.h <<\EOF
13277 #define HAVE_TTY 1
13278 EOF
13279 }
13280
13281   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
13282    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\""
13283  fi
13284
13285     if test -z "$with_ncurses"; then
13286     
13287 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13288 echo "configure:13289: checking for tgetent in -lncurses" >&5
13289 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13290
13291 xe_check_libs=" -lncurses "
13292 cat > conftest.$ac_ext <<EOF
13293 #line 13294 "configure"
13294 #include "confdefs.h"
13295 /* Override any gcc2 internal prototype to avoid an error.  */
13296 /* We use char because int might match the return type of a gcc2
13297     builtin and then its argument prototype would still apply.  */
13298 char tgetent();
13299
13300 int main() {
13301 tgetent()
13302 ; return 0; }
13303 EOF
13304 if { (eval echo configure:13305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13305   rm -rf conftest*
13306   eval "ac_cv_lib_$ac_lib_var=yes"
13307 else
13308   echo "configure: failed program was:" >&5
13309   cat conftest.$ac_ext >&5
13310   rm -rf conftest*
13311   eval "ac_cv_lib_$ac_lib_var=no"
13312 fi
13313 rm -f conftest*
13314 xe_check_libs=""
13315
13316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13317   echo "$ac_t""yes" 1>&6
13318   with_ncurses=yes
13319 else
13320   echo "$ac_t""no" 1>&6
13321 with_ncurses=no
13322 fi
13323
13324
13325   fi
13326   if test "$with_ncurses" = "yes"; then
13327     { test "$extra_verbose" = "yes" && cat << \EOF
13328     Defining HAVE_NCURSES
13329 EOF
13330 cat >> confdefs.h <<\EOF
13331 #define HAVE_NCURSES 1
13332 EOF
13333 }
13334
13335     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13336 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13337 echo "configure:13338: checking for ncurses/curses.h" >&5
13338
13339 cat > conftest.$ac_ext <<EOF
13340 #line 13341 "configure"
13341 #include "confdefs.h"
13342 #include <ncurses/curses.h>
13343 EOF
13344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13345 { (eval echo configure:13346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13347 if test -z "$ac_err"; then
13348   rm -rf conftest*
13349   eval "ac_cv_header_$ac_safe=yes"
13350 else
13351   echo "$ac_err" >&5
13352   echo "configure: failed program was:" >&5
13353   cat conftest.$ac_ext >&5
13354   rm -rf conftest*
13355   eval "ac_cv_header_$ac_safe=no"
13356 fi
13357 rm -f conftest*
13358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13359   echo "$ac_t""yes" 1>&6
13360   curses_h_file=ncurses/curses.h
13361 else
13362   echo "$ac_t""no" 1>&6
13363 fi
13364
13365     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13366 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13367 echo "configure:13368: checking for ncurses/term.h" >&5
13368
13369 cat > conftest.$ac_ext <<EOF
13370 #line 13371 "configure"
13371 #include "confdefs.h"
13372 #include <ncurses/term.h>
13373 EOF
13374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13375 { (eval echo configure:13376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13377 if test -z "$ac_err"; then
13378   rm -rf conftest*
13379   eval "ac_cv_header_$ac_safe=yes"
13380 else
13381   echo "$ac_err" >&5
13382   echo "configure: failed program was:" >&5
13383   cat conftest.$ac_ext >&5
13384   rm -rf conftest*
13385   eval "ac_cv_header_$ac_safe=no"
13386 fi
13387 rm -f conftest*
13388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13389   echo "$ac_t""yes" 1>&6
13390   term_h_file=ncurses/term.h
13391 else
13392   echo "$ac_t""no" 1>&6
13393 fi
13394
13395     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13396    echo "    xemacs will be linked with \"terminfo.o\""
13397  fi
13398     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13399
13400     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13401                         save_c_switch_site="$c_switch_site"
13402       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13403       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13404 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13405 echo "configure:13406: checking for ncurses/curses.h" >&5
13406
13407 cat > conftest.$ac_ext <<EOF
13408 #line 13409 "configure"
13409 #include "confdefs.h"
13410 #include <ncurses/curses.h>
13411 EOF
13412 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13413 { (eval echo configure:13414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13414 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13415 if test -z "$ac_err"; then
13416   rm -rf conftest*
13417   eval "ac_cv_header_$ac_safe=yes"
13418 else
13419   echo "$ac_err" >&5
13420   echo "configure: failed program was:" >&5
13421   cat conftest.$ac_ext >&5
13422   rm -rf conftest*
13423   eval "ac_cv_header_$ac_safe=no"
13424 fi
13425 rm -f conftest*
13426 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13427   echo "$ac_t""yes" 1>&6
13428   curses_h_file=ncurses/curses.h
13429 else
13430   echo "$ac_t""no" 1>&6
13431 fi
13432
13433       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13434         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13435         else c_switch_site="$save_c_switch_site"
13436       fi
13437     fi
13438   else         if test "$have_terminfo" = "yes"; then
13439       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13440    echo "    xemacs will be linked with \"terminfo.o\""
13441  fi
13442       if test -n "$libs_termcap"; then
13443         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13444       else
13445         for lib in curses termlib termcap; do
13446           
13447 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13448 echo "configure:13449: checking for tgetent in -l$lib" >&5
13449 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13450
13451 xe_check_libs=" -l$lib "
13452 cat > conftest.$ac_ext <<EOF
13453 #line 13454 "configure"
13454 #include "confdefs.h"
13455 /* Override any gcc2 internal prototype to avoid an error.  */
13456 /* We use char because int might match the return type of a gcc2
13457     builtin and then its argument prototype would still apply.  */
13458 char tgetent();
13459
13460 int main() {
13461 tgetent()
13462 ; return 0; }
13463 EOF
13464 if { (eval echo configure:13465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13465   rm -rf conftest*
13466   eval "ac_cv_lib_$ac_lib_var=yes"
13467 else
13468   echo "configure: failed program was:" >&5
13469   cat conftest.$ac_ext >&5
13470   rm -rf conftest*
13471   eval "ac_cv_lib_$ac_lib_var=no"
13472 fi
13473 rm -f conftest*
13474 xe_check_libs=""
13475
13476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13477   echo "$ac_t""yes" 1>&6
13478   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13479 else
13480   echo "$ac_t""no" 1>&6
13481 fi
13482
13483
13484         done
13485       fi
13486     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13487    echo "    xemacs will be linked with \"tparam.o\""
13488  fi
13489                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13490       if test -n "$libs_termcap"; then
13491         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13492       else
13493         
13494 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13495 echo "configure:13496: checking for tgetent in -lcurses" >&5
13496 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13497
13498 xe_check_libs=" -lcurses "
13499 cat > conftest.$ac_ext <<EOF
13500 #line 13501 "configure"
13501 #include "confdefs.h"
13502 /* Override any gcc2 internal prototype to avoid an error.  */
13503 /* We use char because int might match the return type of a gcc2
13504     builtin and then its argument prototype would still apply.  */
13505 char tgetent();
13506
13507 int main() {
13508 tgetent()
13509 ; return 0; }
13510 EOF
13511 if { (eval echo configure:13512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13512   rm -rf conftest*
13513   eval "ac_cv_lib_$ac_lib_var=yes"
13514 else
13515   echo "configure: failed program was:" >&5
13516   cat conftest.$ac_ext >&5
13517   rm -rf conftest*
13518   eval "ac_cv_lib_$ac_lib_var=no"
13519 fi
13520 rm -f conftest*
13521 xe_check_libs=""
13522
13523 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13524   echo "$ac_t""yes" 1>&6
13525   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13526 else
13527   echo "$ac_t""no" 1>&6
13528 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13529 echo "configure:13530: checking for tgetent in -ltermcap" >&5
13530 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13531
13532 xe_check_libs=" -ltermcap "
13533 cat > conftest.$ac_ext <<EOF
13534 #line 13535 "configure"
13535 #include "confdefs.h"
13536 /* Override any gcc2 internal prototype to avoid an error.  */
13537 /* We use char because int might match the return type of a gcc2
13538     builtin and then its argument prototype would still apply.  */
13539 char tgetent();
13540
13541 int main() {
13542 tgetent()
13543 ; return 0; }
13544 EOF
13545 if { (eval echo configure:13546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13546   rm -rf conftest*
13547   eval "ac_cv_lib_$ac_lib_var=yes"
13548 else
13549   echo "configure: failed program was:" >&5
13550   cat conftest.$ac_ext >&5
13551   rm -rf conftest*
13552   eval "ac_cv_lib_$ac_lib_var=no"
13553 fi
13554 rm -f conftest*
13555 xe_check_libs=""
13556
13557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13558   echo "$ac_t""yes" 1>&6
13559   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13560 else
13561   echo "$ac_t""no" 1>&6
13562 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13563    echo "    xemacs will be linked with \"termcap.o\""
13564  fi
13565 fi
13566
13567
13568 fi
13569
13570
13571       fi
13572     fi
13573   fi
13574   { test "$extra_verbose" = "yes" && cat << EOF
13575     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13576 EOF
13577 cat >> confdefs.h <<EOF
13578 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13579 EOF
13580 }
13581
13582   { test "$extra_verbose" = "yes" && cat << EOF
13583     Defining TERM_H_FILE = "${term_h_file-term.h}"
13584 EOF
13585 cat >> confdefs.h <<EOF
13586 #define TERM_H_FILE "${term_h_file-term.h}"
13587 EOF
13588 }
13589
13590
13591     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13592 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13593 echo "configure:13594: checking for gpm.h" >&5
13594
13595 cat > conftest.$ac_ext <<EOF
13596 #line 13597 "configure"
13597 #include "confdefs.h"
13598 #include <gpm.h>
13599 EOF
13600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13601 { (eval echo configure:13602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13603 if test -z "$ac_err"; then
13604   rm -rf conftest*
13605   eval "ac_cv_header_$ac_safe=yes"
13606 else
13607   echo "$ac_err" >&5
13608   echo "configure: failed program was:" >&5
13609   cat conftest.$ac_ext >&5
13610   rm -rf conftest*
13611   eval "ac_cv_header_$ac_safe=no"
13612 fi
13613 rm -f conftest*
13614 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13615   echo "$ac_t""yes" 1>&6
13616   :
13617 else
13618   echo "$ac_t""no" 1>&6
13619 with_gpm=no
13620 fi
13621  }
13622   test -z "$with_gpm" && { 
13623 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13624 echo "configure:13625: checking for Gpm_Open in -lgpm" >&5
13625 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13626
13627 xe_check_libs=" -lgpm "
13628 cat > conftest.$ac_ext <<EOF
13629 #line 13630 "configure"
13630 #include "confdefs.h"
13631 /* Override any gcc2 internal prototype to avoid an error.  */
13632 /* We use char because int might match the return type of a gcc2
13633     builtin and then its argument prototype would still apply.  */
13634 char Gpm_Open();
13635
13636 int main() {
13637 Gpm_Open()
13638 ; return 0; }
13639 EOF
13640 if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13641   rm -rf conftest*
13642   eval "ac_cv_lib_$ac_lib_var=yes"
13643 else
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   eval "ac_cv_lib_$ac_lib_var=no"
13648 fi
13649 rm -f conftest*
13650 xe_check_libs=""
13651
13652 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13653   echo "$ac_t""yes" 1>&6
13654   with_gpm=yes
13655 else
13656   echo "$ac_t""no" 1>&6
13657 with_gpm=no
13658 fi
13659
13660  }
13661   if test "$with_gpm" = "yes"; then
13662     { test "$extra_verbose" = "yes" && cat << \EOF
13663     Defining HAVE_GPM
13664 EOF
13665 cat >> confdefs.h <<\EOF
13666 #define HAVE_GPM 1
13667 EOF
13668 }
13669
13670     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13671    echo "    xemacs will be linked with \"gpmevent.o\""
13672  fi
13673     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13674   fi
13675
13676 else   for feature in ncurses gpm; do
13677     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13678       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13679     fi
13680     eval "with_${feature}=no"
13681   done
13682 fi 
13683 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13684    echo "    xemacs will be linked with \"event-unixoid.o\""
13685  fi
13686
13687
13688 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13689   != "no no no" && echo "checking for database support" 1>&6
13690 echo "configure:13691: checking for database support" >&5
13691
13692 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13693   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13694 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13695 echo "configure:13696: checking for ndbm.h" >&5
13696
13697 cat > conftest.$ac_ext <<EOF
13698 #line 13699 "configure"
13699 #include "confdefs.h"
13700 #include <ndbm.h>
13701 EOF
13702 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13703 { (eval echo configure:13704: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13704 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13705 if test -z "$ac_err"; then
13706   rm -rf conftest*
13707   eval "ac_cv_header_$ac_safe=yes"
13708 else
13709   echo "$ac_err" >&5
13710   echo "configure: failed program was:" >&5
13711   cat conftest.$ac_ext >&5
13712   rm -rf conftest*
13713   eval "ac_cv_header_$ac_safe=no"
13714 fi
13715 rm -f conftest*
13716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13717   echo "$ac_t""yes" 1>&6
13718   :
13719 else
13720   echo "$ac_t""no" 1>&6
13721
13722     test "$with_database_gdbm" = "yes" -o \
13723          "$with_database_dbm"  = "yes" && \
13724       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13725     with_database_gdbm=no with_database_dbm=no
13726 fi
13727
13728 fi
13729
13730 if test "$with_database_gdbm" != "no"; then
13731   
13732 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13733 echo "configure:13734: checking for dbm_open in -lgdbm" >&5
13734 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13735
13736 xe_check_libs=" -lgdbm "
13737 cat > conftest.$ac_ext <<EOF
13738 #line 13739 "configure"
13739 #include "confdefs.h"
13740 /* Override any gcc2 internal prototype to avoid an error.  */
13741 /* We use char because int might match the return type of a gcc2
13742     builtin and then its argument prototype would still apply.  */
13743 char dbm_open();
13744
13745 int main() {
13746 dbm_open()
13747 ; return 0; }
13748 EOF
13749 if { (eval echo configure:13750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13750   rm -rf conftest*
13751   eval "ac_cv_lib_$ac_lib_var=yes"
13752 else
13753   echo "configure: failed program was:" >&5
13754   cat conftest.$ac_ext >&5
13755   rm -rf conftest*
13756   eval "ac_cv_lib_$ac_lib_var=no"
13757 fi
13758 rm -f conftest*
13759 xe_check_libs=""
13760
13761 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13762   echo "$ac_t""yes" 1>&6
13763   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13764 else
13765   echo "$ac_t""no" 1>&6
13766 if test "$with_database_gdbm" = "yes"; then
13767      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13768    fi
13769    with_database_gdbm=no
13770 fi
13771
13772
13773 fi
13774
13775 if test "$with_database_dbm" != "no"; then
13776   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13777 echo "configure:13778: checking for dbm_open" >&5
13778
13779 cat > conftest.$ac_ext <<EOF
13780 #line 13781 "configure"
13781 #include "confdefs.h"
13782 /* System header to define __stub macros and hopefully few prototypes,
13783     which can conflict with char dbm_open(); below.  */
13784 #include <assert.h>
13785 /* Override any gcc2 internal prototype to avoid an error.  */
13786 /* We use char because int might match the return type of a gcc2
13787     builtin and then its argument prototype would still apply.  */
13788 char dbm_open();
13789
13790 int main() {
13791
13792 /* The GNU C library defines this for functions which it implements
13793     to always fail with ENOSYS.  Some functions are actually named
13794     something starting with __ and the normal name is an alias.  */
13795 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13796 choke me
13797 #else
13798 dbm_open();
13799 #endif
13800
13801 ; return 0; }
13802 EOF
13803 if { (eval echo configure:13804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13804   rm -rf conftest*
13805   eval "ac_cv_func_dbm_open=yes"
13806 else
13807   echo "configure: failed program was:" >&5
13808   cat conftest.$ac_ext >&5
13809   rm -rf conftest*
13810   eval "ac_cv_func_dbm_open=no"
13811 fi
13812 rm -f conftest*
13813
13814 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13815   echo "$ac_t""yes" 1>&6
13816   with_database_dbm=yes libdbm=
13817 else
13818   echo "$ac_t""no" 1>&6
13819
13820     
13821 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13822 echo "configure:13823: checking for dbm_open in -ldbm" >&5
13823 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13824
13825 xe_check_libs=" -ldbm "
13826 cat > conftest.$ac_ext <<EOF
13827 #line 13828 "configure"
13828 #include "confdefs.h"
13829 /* Override any gcc2 internal prototype to avoid an error.  */
13830 /* We use char because int might match the return type of a gcc2
13831     builtin and then its argument prototype would still apply.  */
13832 char dbm_open();
13833
13834 int main() {
13835 dbm_open()
13836 ; return 0; }
13837 EOF
13838 if { (eval echo configure:13839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13839   rm -rf conftest*
13840   eval "ac_cv_lib_$ac_lib_var=yes"
13841 else
13842   echo "configure: failed program was:" >&5
13843   cat conftest.$ac_ext >&5
13844   rm -rf conftest*
13845   eval "ac_cv_lib_$ac_lib_var=no"
13846 fi
13847 rm -f conftest*
13848 xe_check_libs=""
13849
13850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13851   echo "$ac_t""yes" 1>&6
13852   with_database_dbm=yes libdbm=-ldbm
13853 else
13854   echo "$ac_t""no" 1>&6
13855 test "$with_database_dbm" = "yes" && \
13856         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13857       with_database_dbm=no
13858 fi
13859
13860
13861 fi
13862
13863 fi
13864
13865 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13866 test "$with_database_gdbm" = "yes" -o \
13867      "$with_database_dbm"  = "yes" && \
13868   { test "$extra_verbose" = "yes" && cat << \EOF
13869     Defining HAVE_DBM
13870 EOF
13871 cat >> confdefs.h <<\EOF
13872 #define HAVE_DBM 1
13873 EOF
13874 }
13875
13876
13877 if test "$with_database_berkdb" != "no"; then
13878   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13879 echo "configure:13880: checking for Berkeley db.h" >&5
13880   for header in "db/db.h" "db.h"; do
13881     cat > conftest.$ac_ext <<EOF
13882 #line 13883 "configure"
13883 #include "confdefs.h"
13884
13885 #include <stdlib.h>
13886 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13887 #ifdef HAVE_INTTYPES_H
13888 #define __BIT_TYPES_DEFINED__
13889 #include <inttypes.h>
13890 typedef uint8_t  u_int8_t;
13891 typedef uint16_t u_int16_t;
13892 typedef uint32_t u_int32_t;
13893 #ifdef WE_DONT_NEED_QUADS
13894 typedef uint64_t u_int64_t;
13895 #endif
13896 #endif
13897 #endif
13898 #include <$header>
13899
13900 int main() {
13901
13902 ; return 0; }
13903 EOF
13904 if { (eval echo configure:13905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13905   rm -rf conftest*
13906   db_h_file="$header"; break
13907 else
13908   echo "configure: failed program was:" >&5
13909   cat conftest.$ac_ext >&5
13910 fi
13911 rm -f conftest*
13912   done
13913   if test -z "$db_h_file"
13914   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13915   else echo "$ac_t""$db_h_file" 1>&6
13916   fi
13917
13918   if test "$with_database_berkdb" != "no"; then
13919     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13920 echo "configure:13921: checking for Berkeley DB version" >&5
13921     cat > conftest.$ac_ext <<EOF
13922 #line 13923 "configure"
13923 #include "confdefs.h"
13924 #include <$db_h_file>
13925 #if DB_VERSION_MAJOR > 1
13926 yes
13927 #endif
13928
13929 EOF
13930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13931   egrep "yes" >/dev/null 2>&1; then
13932   rm -rf conftest*
13933   cat > conftest.$ac_ext <<EOF
13934 #line 13935 "configure"
13935 #include "confdefs.h"
13936 #include <$db_h_file>
13937 #if DB_VERSION_MAJOR > 2
13938 yes
13939 #endif
13940
13941 EOF
13942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13943   egrep "yes" >/dev/null 2>&1; then
13944   rm -rf conftest*
13945   echo "$ac_t""3" 1>&6; dbfunc=db_create
13946 else
13947   rm -rf conftest*
13948   
13949     echo "$ac_t""2" 1>&6; dbfunc=db_open
13950 fi
13951 rm -f conftest*
13952
13953 else
13954   rm -rf conftest*
13955   
13956     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13957 fi
13958 rm -f conftest*
13959
13960     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13961 echo "configure:13962: checking for $dbfunc" >&5
13962
13963 cat > conftest.$ac_ext <<EOF
13964 #line 13965 "configure"
13965 #include "confdefs.h"
13966 /* System header to define __stub macros and hopefully few prototypes,
13967     which can conflict with char $dbfunc(); below.  */
13968 #include <assert.h>
13969 /* Override any gcc2 internal prototype to avoid an error.  */
13970 /* We use char because int might match the return type of a gcc2
13971     builtin and then its argument prototype would still apply.  */
13972 char $dbfunc();
13973
13974 int main() {
13975
13976 /* The GNU C library defines this for functions which it implements
13977     to always fail with ENOSYS.  Some functions are actually named
13978     something starting with __ and the normal name is an alias.  */
13979 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13980 choke me
13981 #else
13982 $dbfunc();
13983 #endif
13984
13985 ; return 0; }
13986 EOF
13987 if { (eval echo configure:13988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13988   rm -rf conftest*
13989   eval "ac_cv_func_$dbfunc=yes"
13990 else
13991   echo "configure: failed program was:" >&5
13992   cat conftest.$ac_ext >&5
13993   rm -rf conftest*
13994   eval "ac_cv_func_$dbfunc=no"
13995 fi
13996 rm -f conftest*
13997
13998 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13999   echo "$ac_t""yes" 1>&6
14000   with_database_berkdb=yes need_libdb=no
14001 else
14002   echo "$ac_t""no" 1>&6
14003
14004     
14005 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14006 echo "configure:14007: checking for $dbfunc in -ldb" >&5
14007 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14008
14009 xe_check_libs=" -ldb "
14010 cat > conftest.$ac_ext <<EOF
14011 #line 14012 "configure"
14012 #include "confdefs.h"
14013 /* Override any gcc2 internal prototype to avoid an error.  */
14014 /* We use char because int might match the return type of a gcc2
14015     builtin and then its argument prototype would still apply.  */
14016 char $dbfunc();
14017
14018 int main() {
14019 $dbfunc()
14020 ; return 0; }
14021 EOF
14022 if { (eval echo configure:14023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14023   rm -rf conftest*
14024   eval "ac_cv_lib_$ac_lib_var=yes"
14025 else
14026   echo "configure: failed program was:" >&5
14027   cat conftest.$ac_ext >&5
14028   rm -rf conftest*
14029   eval "ac_cv_lib_$ac_lib_var=no"
14030 fi
14031 rm -f conftest*
14032 xe_check_libs=""
14033
14034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14035   echo "$ac_t""yes" 1>&6
14036   with_database_berkdb=yes need_libdb=yes
14037 else
14038   echo "$ac_t""no" 1>&6
14039 fi
14040
14041
14042 fi
14043
14044   fi
14045
14046   if test "$with_database_berkdb" = "yes"; then
14047     { test "$extra_verbose" = "yes" && cat << EOF
14048     Defining DB_H_FILE = "$db_h_file"
14049 EOF
14050 cat >> confdefs.h <<EOF
14051 #define DB_H_FILE "$db_h_file"
14052 EOF
14053 }
14054
14055     { test "$extra_verbose" = "yes" && cat << \EOF
14056     Defining HAVE_BERKELEY_DB
14057 EOF
14058 cat >> confdefs.h <<\EOF
14059 #define HAVE_BERKELEY_DB 1
14060 EOF
14061 }
14062
14063     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14064   else with_database_berkdb=no
14065   fi
14066 fi
14067
14068 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14069      != "no no no"; then
14070   { test "$extra_verbose" = "yes" && cat << \EOF
14071     Defining HAVE_DATABASE
14072 EOF
14073 cat >> confdefs.h <<\EOF
14074 #define HAVE_DATABASE 1
14075 EOF
14076 }
14077
14078   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14079    echo "    xemacs will be linked with \"database.o\""
14080  fi
14081 fi
14082
14083 if test "$with_socks" = "yes"; then
14084   
14085 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14086 echo "configure:14087: checking for SOCKSinit in -lsocks" >&5
14087 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14088
14089 xe_check_libs=" -lsocks "
14090 cat > conftest.$ac_ext <<EOF
14091 #line 14092 "configure"
14092 #include "confdefs.h"
14093 /* Override any gcc2 internal prototype to avoid an error.  */
14094 /* We use char because int might match the return type of a gcc2
14095     builtin and then its argument prototype would still apply.  */
14096 char SOCKSinit();
14097
14098 int main() {
14099 SOCKSinit()
14100 ; return 0; }
14101 EOF
14102 if { (eval echo configure:14103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14103   rm -rf conftest*
14104   eval "ac_cv_lib_$ac_lib_var=yes"
14105 else
14106   echo "configure: failed program was:" >&5
14107   cat conftest.$ac_ext >&5
14108   rm -rf conftest*
14109   eval "ac_cv_lib_$ac_lib_var=no"
14110 fi
14111 rm -f conftest*
14112 xe_check_libs=""
14113
14114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14115   echo "$ac_t""yes" 1>&6
14116     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14117     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14118   { test "$extra_verbose" = "yes" && cat << EOF
14119     Defining $ac_tr_lib
14120 EOF
14121 cat >> confdefs.h <<EOF
14122 #define $ac_tr_lib 1
14123 EOF
14124 }
14125
14126   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14127
14128 else
14129   echo "$ac_t""no" 1>&6
14130 fi
14131
14132
14133   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14134     Defining HAVE_SOCKS
14135 EOF
14136 cat >> confdefs.h <<\EOF
14137 #define HAVE_SOCKS 1
14138 EOF
14139 }
14140
14141 fi
14142
14143 if test "$usage_tracking" = "yes"; then
14144   { test "$extra_verbose" = "yes" && cat << \EOF
14145     Defining USAGE_TRACKING
14146 EOF
14147 cat >> confdefs.h <<\EOF
14148 #define USAGE_TRACKING 1
14149 EOF
14150 }
14151
14152   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14153 fi
14154
14155 if test "$with_modules" != "no"; then
14156   echo "checking for module support" 1>&6
14157 echo "configure:14158: checking for module support" >&5
14158
14159     if test "$with_msw" = "yes"; then
14160     have_dl=yes;
14161   else
14162         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14163 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14164 echo "configure:14165: checking for dlfcn.h" >&5
14165
14166 cat > conftest.$ac_ext <<EOF
14167 #line 14168 "configure"
14168 #include "confdefs.h"
14169 #include <dlfcn.h>
14170 EOF
14171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14172 { (eval echo configure:14173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14174 if test -z "$ac_err"; then
14175   rm -rf conftest*
14176   eval "ac_cv_header_$ac_safe=yes"
14177 else
14178   echo "$ac_err" >&5
14179   echo "configure: failed program was:" >&5
14180   cat conftest.$ac_ext >&5
14181   rm -rf conftest*
14182   eval "ac_cv_header_$ac_safe=no"
14183 fi
14184 rm -f conftest*
14185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14186   echo "$ac_t""yes" 1>&6
14187   
14188       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14189 echo "configure:14190: checking for dlopen in -lc" >&5
14190       cat > conftest.$ac_ext <<EOF
14191 #line 14192 "configure"
14192 #include "confdefs.h"
14193 #include <dlfcn.h>
14194 int main() {
14195         dlopen ("", 0);
14196 ; return 0; }
14197 EOF
14198 if { (eval echo configure:14199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14199   rm -rf conftest*
14200    have_dl=yes 
14201 else
14202   echo "configure: failed program was:" >&5
14203   cat conftest.$ac_ext >&5
14204   rm -rf conftest*
14205   
14206       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14207 echo "configure:14208: checking for dlopen in -ldl" >&5
14208       ac_save_LIBS="$LIBS"
14209       LIBS="-ldl $LIBS"
14210       cat > conftest.$ac_ext <<EOF
14211 #line 14212 "configure"
14212 #include "confdefs.h"
14213 #include <dlfcn.h>
14214 int main() {
14215         dlopen ("", 0);
14216 ; return 0; }
14217 EOF
14218 if { (eval echo configure:14219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14219   rm -rf conftest*
14220    have_dl=yes 
14221 else
14222   echo "configure: failed program was:" >&5
14223   cat conftest.$ac_ext >&5
14224   rm -rf conftest*
14225   LIBS="$ac_save_LIBS"
14226 fi
14227 rm -f conftest*
14228       ac_save_LIBS=
14229 fi
14230 rm -f conftest*
14231 else
14232   echo "$ac_t""no" 1>&6
14233 fi
14234
14235     if test -n "$have_dl"; then
14236       { test "$extra_verbose" = "yes" && cat << \EOF
14237     Defining HAVE_DLOPEN
14238 EOF
14239 cat >> confdefs.h <<\EOF
14240 #define HAVE_DLOPEN 1
14241 EOF
14242 }
14243
14244     else
14245       
14246 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14247 echo "configure:14248: checking for shl_load in -ldld" >&5
14248 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14249
14250 xe_check_libs=" -ldld "
14251 cat > conftest.$ac_ext <<EOF
14252 #line 14253 "configure"
14253 #include "confdefs.h"
14254 /* Override any gcc2 internal prototype to avoid an error.  */
14255 /* We use char because int might match the return type of a gcc2
14256     builtin and then its argument prototype would still apply.  */
14257 char shl_load();
14258
14259 int main() {
14260 shl_load()
14261 ; return 0; }
14262 EOF
14263 if { (eval echo configure:14264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14264   rm -rf conftest*
14265   eval "ac_cv_lib_$ac_lib_var=yes"
14266 else
14267   echo "configure: failed program was:" >&5
14268   cat conftest.$ac_ext >&5
14269   rm -rf conftest*
14270   eval "ac_cv_lib_$ac_lib_var=no"
14271 fi
14272 rm -f conftest*
14273 xe_check_libs=""
14274
14275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14276   echo "$ac_t""yes" 1>&6
14277   libdl=dld have_dl=yes;
14278         { test "$extra_verbose" = "yes" && cat << \EOF
14279     Defining HAVE_SHL_LOAD
14280 EOF
14281 cat >> confdefs.h <<\EOF
14282 #define HAVE_SHL_LOAD 1
14283 EOF
14284 }
14285
14286 else
14287   echo "$ac_t""no" 1>&6
14288
14289 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14290 echo "configure:14291: checking for dld_init in -ldld" >&5
14291 ac_lib_var=`echo dld'_'dld_init | 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 dld_init();
14301
14302 int main() {
14303 dld_init()
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_DLD_INIT
14323 EOF
14324 cat >> confdefs.h <<\EOF
14325 #define HAVE_DLD_INIT 1
14326 EOF
14327 }
14328
14329 else
14330   echo "$ac_t""no" 1>&6
14331 fi
14332
14333
14334 fi
14335
14336
14337     fi
14338   fi 
14339   if test -n "$have_dl"; then
14340         
14341 dll_ld=
14342 dll_ldflags=
14343 dll_cflags=
14344 dll_post=
14345 dll_ldo="-o"
14346 ld_dynamic_link_flags=
14347 xehost=$canonical
14348 xealias=$internal_configuration
14349
14350 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14351 echo "configure:14352: checking how to build dynamic libraries for ${xehost}" >&5
14352 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14353 case "$xehost" in
14354 *-*-linux-gnu*) ;;
14355 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14356 esac
14357
14358 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14359 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14360 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14361
14362 case "$xehost_os" in
14363 aix3*)
14364   # AIX sometimes has problems with the GCC collect2 program.  For some
14365   # reason, if we set the COLLECT_NAMES environment variable, the problems
14366   # vanish in a puff of smoke.
14367   if test "${COLLECT_NAMES+set}" != set; then
14368     COLLECT_NAMES=
14369     export COLLECT_NAMES
14370   fi
14371   ;;
14372 esac
14373
14374 # Now see if the compiler is really GCC.
14375 if test "$GCC" = "yes"; then
14376   XEGCC=yes
14377 else
14378   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14379 echo "configure:14380: checking checking whether we are using GNU C" >&5
14380   cat > conftest.$ac_ext <<EOF
14381 #line 14382 "configure"
14382 #include "confdefs.h"
14383
14384 #ifdef __GNUC__
14385   yes;
14386 #endif
14387
14388 EOF
14389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14390   egrep "yes" >/dev/null 2>&1; then
14391   rm -rf conftest*
14392   XEGCC=yes
14393 else
14394   rm -rf conftest*
14395   XEGCC=no
14396 fi
14397 rm -f conftest*
14398
14399   echo "$ac_t""${XEGCC}" 1>&6
14400 fi
14401
14402 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14403 echo "configure:14404: checking how to produce PIC code" >&5
14404 wl=
14405
14406 can_build_shared=yes
14407 if test "$XEGCC" = yes; then
14408   wl='-Wl,'
14409
14410   case "$xehost_os" in
14411   aix[3-9]* | irix[5-9]* | osf[3-9])
14412     # PIC is the default for these OSes.
14413     ;;
14414
14415   os2*)
14416     # We can build DLLs from non-PIC.
14417     ;;
14418   amigaos*)
14419     # FIXME: we need at least 68020 code to build shared libraries, but
14420     # adding the `-m68020' flag to GCC prevents building anything better,
14421     # like `-m68040'.
14422     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14423     ;;
14424   *cygwin* | *mingw* )
14425     # PIC is the default
14426     ;;
14427   *)
14428     dll_cflags='-fPIC'
14429     ;;
14430   esac
14431 else
14432   # PORTME Check for PIC flags for the system compiler.
14433   case "$xehost_os" in
14434   hpux9* | hpux1[0-9]*)
14435     # Is there a better link_static_flag that works with the bundled CC?
14436     wl='-Wl,'
14437     dll_cflags='+Z'
14438     ;;
14439
14440   irix[5-9]*)
14441     wl='-Wl,'
14442     # PIC (with -KPIC) is the default.
14443     ;;
14444
14445   os2*)
14446     # We can build DLLs from non-PIC.
14447     ;;
14448
14449   osf[3-9]*)
14450     # All OSF/1 code is PIC.
14451     wl='-Wl,'
14452     ;;
14453
14454   aix[3-9]*)
14455     # All AIX code is PIC.
14456     wl='-Wl,'
14457     ;;
14458
14459   sco3.2v5*)
14460     dll_cflags='-belf -Kpic'
14461     wl='-Wl,'
14462     ;;
14463
14464   unixware*)
14465     dll_cflags="-KPIC"
14466     wl="-Wl,"
14467     ;;
14468
14469   sysv4*)
14470     dll_cflags="-KPIC"
14471     wl="-Wl,"
14472     ;;
14473
14474   sysv5*)
14475     dll_cflags="-KPIC"
14476     wl="-Wl,"
14477     ;;
14478
14479   solaris2*)
14480     dll_cflags='-KPIC'
14481     wl='-Wl,'
14482     ;;
14483
14484   sunos4*)
14485     dll_cflags='-PIC'
14486     wl='-Qoption ld '
14487     ;;
14488
14489   uts4*)
14490     dll_cflags='-pic'
14491     ;;
14492
14493   *)
14494     can_build_shared=no
14495     ;;
14496   esac
14497 fi
14498
14499 if test -n "$dll_cflags"; then
14500   echo "$ac_t""${dll_cflags}" 1>&6
14501
14502   # Check to make sure the dll_cflags actually works.
14503   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14504 echo "configure:14505: checking if PIC flag ${dll_cflags} really works" >&5
14505   save_CFLAGS="$CFLAGS"
14506   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14507   cat > conftest.$ac_ext <<EOF
14508 #line 14509 "configure"
14509 #include "confdefs.h"
14510
14511 int main() {
14512 int x=0;
14513 ; return 0; }
14514 EOF
14515 if { (eval echo configure:14516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14516   rm -rf conftest*
14517   
14518     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14519     # reports no error.  So, we need to grep stderr for (Bundled).
14520     if grep '(Bundled)' config.log >/dev/null; then
14521       echo "$ac_t""no" 1>&6
14522       can_build_shared=no
14523       dll_cflags=
14524     else
14525       echo "$ac_t""yes" 1>&6
14526     fi
14527 else
14528   echo "configure: failed program was:" >&5
14529   cat conftest.$ac_ext >&5
14530   rm -rf conftest*
14531   echo "$ac_t""no" 1>&6
14532     can_build_shared=no
14533     dll_cflags=
14534 fi
14535 rm -f conftest*
14536   CFLAGS="$save_CFLAGS"
14537 else
14538   echo "$ac_t""none" 1>&6
14539 fi
14540
14541 if test "$can_build_shared" = "yes"; then
14542 cc_produces_so=no
14543 xldf=
14544 xcldf=
14545 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14546 echo "configure:14547: checking if C compiler can produce shared libraries" >&5
14547 if test "$XEGCC" = yes; then
14548   xcldf="-shared"
14549   xldf="-shared"
14550 else # Not using GCC
14551   case "$xehost_os" in
14552     aix[3-9]*)
14553       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14554       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14555       ;;
14556
14557     freebsd2* | netbsd* | openbsd*)
14558       xldf="-Bshareable"
14559       xcldf="${wl}-Bshareable"
14560       ;;
14561
14562     freebsd3*)
14563       xcldf="-shared"
14564       ;;
14565
14566     hpux*)
14567       xldf="-b +s"
14568       xcldf="${wl}-b ${wl}+s"
14569       ;;
14570
14571     irix[5-9]* | osf[3-9]*)
14572       xcldf="${wl}-shared"
14573       xldf="-shared"
14574       ;;
14575
14576     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14577       xcldf="-G"
14578       xldf="-G"
14579       ;;
14580
14581     sunos4*)
14582       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14583       xldf="-assert pure-text -Bstatic"
14584       ;;
14585   esac
14586 fi # End if if we are using gcc
14587
14588 if test -n "$xcldf"; then
14589   save_LDFLAGS=$LDFLAGS
14590   save_LIBS=$LIBS
14591   save_xe_libs=$xe_libs
14592   LDFLAGS="$xcldf $LDFLAGS"
14593   LIBS=
14594   xe_libs=
14595   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14596   cat > conftest.$ac_ext <<EOF
14597 #line 14598 "configure"
14598 #include "confdefs.h"
14599
14600 int main() {
14601 int x=0;
14602 ; return 0; }
14603 EOF
14604 if { (eval echo configure:14605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14605   rm -rf conftest*
14606   cc_produces_so=yes
14607 else
14608   echo "configure: failed program was:" >&5
14609   cat conftest.$ac_ext >&5
14610   rm -rf conftest*
14611   cc_produces_so=no
14612 fi
14613 rm -f conftest*
14614   LDFLAGS=$save_LDFLAGS
14615   LIBS=$save_LIBS
14616   xe_libs=$save_xe_libs
14617   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14618 else
14619   cc_produces_so=no
14620 fi
14621 echo "$ac_t""${cc_produces_so}" 1>&6
14622
14623 LTLD=$LD
14624 if test -z "$LTLD"; then
14625   ac_prog=ld
14626   if test "$XEGCC" = yes; then
14627     # Check if gcc -print-prog-name=ld gives a path.
14628     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14629 echo "configure:14630: checking for ld used by GCC" >&5
14630     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14631     case "$ac_prog" in
14632     # Accept absolute paths.
14633     /*)
14634       if test -z "$LTLD"; then
14635         case "$ac_prog" in
14636           *gcc-lib*) LTLD="$CC"
14637                      ;;
14638           *)         LTLD="$ac_prog"
14639                      ;;
14640         esac
14641       fi
14642       ;;
14643     "")
14644       # If it fails, then pretend we aren't using GCC.
14645       ac_prog=ld
14646       ;;
14647     *)
14648       # If it is relative, then search for the first ld in PATH.
14649       with_gnu_ld=unknown
14650       ;;
14651     esac
14652   else
14653     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14654 echo "configure:14655: checking for GNU ld" >&5
14655   fi
14656
14657   if test -z "$LTLD"; then
14658     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14659     for ac_dir in $PATH; do
14660       test -z "$ac_dir" && ac_dir=.
14661       if test -f "$ac_dir/$ac_prog"; then
14662         LTLD="$ac_dir/$ac_prog"
14663         # Check to see if the program is GNU ld.  I'd rather use --version,
14664         # but apparently some GNU ld's only accept -v.
14665         # Break only if it was the GNU/non-GNU ld that we prefer.
14666         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14667           xe_gnu_ld=yes
14668         else
14669           xe_gnu_ld=no
14670         fi
14671       fi
14672     done
14673     IFS="$ac_save_ifs"
14674   fi
14675
14676   if test -n "$LTLD"; then
14677     echo "$ac_t""${LTLD}" 1>&6
14678   else
14679     echo "$ac_t""no" 1>&6
14680   fi
14681
14682   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14683     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14684     exit 1
14685   fi
14686 fi
14687
14688 ld_dynamic_link_flags=
14689
14690 # Check to see if it really is or isn't GNU ld.
14691 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14692 echo "configure:14693: checking if the linker is GNU ld" >&5
14693 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14694 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14695   xe_gnu_ld=yes
14696 else
14697   xe_gnu_ld=no
14698 fi
14699 echo "$ac_t""${xe_gnu_ld}" 1>&6
14700
14701 case "$xehost_os" in
14702   amigaos* | sunos4*)
14703     # On these operating systems, we should treat GNU ld like the system ld.
14704     gnu_ld_acts_native=yes
14705     ;;
14706   *)
14707     gnu_ld_acts_native=no
14708     ;;
14709 esac
14710
14711 if test "$cc_produces_so" = "yes"; then
14712   dll_ld=$CC
14713   dll_ldflags=$xcldf
14714   can_build_shared=yes
14715   ld_shlibs=yes
14716 else
14717   # OK - only NOW do we futz about with ld.
14718   # See if the linker supports building shared libraries.
14719   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14720 echo "configure:14721: checking whether the linker supports shared libraries" >&5
14721   dll_ld=$CC
14722   dll_ldflags=$LDFLAGS
14723   ld_shlibs=yes
14724   can_build_shared=yes
14725   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14726     # See if GNU ld supports shared libraries.
14727     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14728       dll_ld=$CC
14729       dll_ldflags="-shared"
14730       ld_shlibs=yes
14731     else
14732       ld_shlibs=no
14733     fi
14734   else
14735     # PORTME fill in a description of your system's linker (not GNU ld)
14736     case "$xehost_os" in
14737     aix3*)
14738       dll_ld=$LTLD
14739       dll_ldflags=$xldf
14740       ;;
14741
14742     aix[4-9]*)
14743       dll_ldflags=$xcldf
14744       ;;
14745
14746     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14747     # support.  Future versions do this automatically, but an explicit c++rt0.o
14748     # doesn't break anything, and helps significantly (at the cost of a little
14749     # extra space).
14750     freebsd2.2*)
14751       dll_ld=$LTLD
14752       dll_ldflags=$xldf
14753       dll_post="/usr/lib/c++rt0.o"
14754       ;;
14755
14756     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14757     freebsd2*)
14758       dll_ld=$LTLD
14759       dll_ldflags="-Bshareable"
14760       ;;
14761
14762     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14763     freebsd3*)
14764       dll_ldflags="-shared"
14765       ;;
14766
14767     hpux*)
14768       dll_ld=$LTLD
14769       dll_ldflags=$xldf
14770       ;;
14771
14772     irix[5-9]*)
14773       dll_ld=$LTLD
14774       dll_ldflags=$xldf
14775       ;;
14776
14777     netbsd*)
14778       # Tested with NetBSD 1.2 ld
14779       dll_ld=$LTLD
14780       dll_ldflags=$xldf
14781       ;;
14782
14783     openbsd*)
14784       dll_ld=$LTLD
14785       dll_ldflags=$xldf
14786       ;;
14787
14788     osf3* | osf4*)
14789       dll_ld=$LTLD
14790       dll_ldflags=$xldf
14791       ;;
14792
14793     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14794     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14795       dll_ld=$LTLD
14796       case "$dll_ld" in
14797         *gcc*) dll_ldflags="-shared"
14798                dll_ld=$CC
14799                ;;
14800         *)     dll_ldflags="-G"
14801                ;;
14802       esac
14803       ;;
14804
14805     sunos4*)
14806       if test "$XEGCC" = yes; then
14807         dll_ld=$CC
14808       else
14809         dll_ld=$LTLD
14810       fi
14811       dll_ldflags=$xldf
14812       ;;
14813
14814     uts4*)
14815       dll_ld=$LTLD
14816       dll_ldflags="-G"
14817       ;;
14818
14819     bsdi*)
14820       dll_ldflags="-r"
14821       dll_ld="shlicc2"
14822       ;;
14823
14824     *)
14825       ld_shlibs=no
14826       can_build_shared=no
14827       ;;
14828     esac
14829   fi
14830   echo "$ac_t""${ld_shlibs}" 1>&6
14831   if test "$ld_shlibs" = "no"; then
14832     can_build_shared=no
14833   fi
14834 fi # End of if cc_produces_so = no
14835
14836
14837 if test "$xe_gnu_ld" = yes; then
14838   if test "$ld_shlibs" = yes; then
14839     ld_dynamic_link_flags="${wl}-export-dynamic"
14840   fi
14841 fi
14842
14843 if test -z "$ld_dynamic_link_flags"; then
14844   case "$xehost_os" in
14845   aix[3-9]*)
14846     ld_dynamic_link_flags=
14847     ;;
14848
14849   freebsd2.2*)
14850     ld_dynamic_link_flags=
14851     ;;
14852
14853   freebsd2*)
14854     ld_dynamic_link_flags=
14855     ;;
14856
14857   freebsd3*)
14858     ld_dynamic_link_flags=
14859     ;;
14860
14861   hpux*)
14862     ld_dynamic_link_flags="${wl}-E"
14863     ;;
14864
14865   irix[5-9]*)
14866     ld_dynamic_link_flags=
14867     ;;
14868
14869   netbsd*)
14870     ld_dynamic_link_flags=
14871     ;;
14872
14873   openbsd*)
14874     ld_dynamic_link_flags=
14875     ;;
14876
14877   osf3* | osf4*)
14878     ld_dynamic_link_flags=
14879     ;;
14880
14881   solaris2* | solaris7*)
14882     ld_dynamic_link_flags=
14883     ;;
14884
14885   sco3.2v5* | unixware* | sysv5* | sysv4*)
14886     ld_dynamic_link_flags="${wl}-Bexport"
14887     ;;
14888
14889   sunos4*)
14890     ld_dynamic_link_flags=
14891     ;;
14892
14893   uts4*)
14894     ld_dynamic_link_flags=
14895     ;;
14896
14897   bsdi*)
14898     ld_dynamic_link_flags=
14899     ;;
14900
14901   esac
14902 fi # End of if -z ld_dynamic_link_flags
14903 fi # End of if test "$can_build_shared" = "yes"
14904
14905
14906
14907
14908
14909
14910
14911
14912   fi
14913
14914   if test "$can_build_shared" = "yes"; then
14915     { test "$extra_verbose" = "yes" && cat << \EOF
14916     Defining HAVE_SHLIB
14917 EOF
14918 cat >> confdefs.h <<\EOF
14919 #define HAVE_SHLIB 1
14920 EOF
14921 }
14922
14923     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14924    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14925  fi
14926     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14927     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14928     for ac_func in dlerror _dlerror
14929 do
14930 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14931 echo "configure:14932: checking for $ac_func" >&5
14932
14933 cat > conftest.$ac_ext <<EOF
14934 #line 14935 "configure"
14935 #include "confdefs.h"
14936 /* System header to define __stub macros and hopefully few prototypes,
14937     which can conflict with char $ac_func(); below.  */
14938 #include <assert.h>
14939 /* Override any gcc2 internal prototype to avoid an error.  */
14940 /* We use char because int might match the return type of a gcc2
14941     builtin and then its argument prototype would still apply.  */
14942 char $ac_func();
14943
14944 int main() {
14945
14946 /* The GNU C library defines this for functions which it implements
14947     to always fail with ENOSYS.  Some functions are actually named
14948     something starting with __ and the normal name is an alias.  */
14949 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14950 choke me
14951 #else
14952 $ac_func();
14953 #endif
14954
14955 ; return 0; }
14956 EOF
14957 if { (eval echo configure:14958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14958   rm -rf conftest*
14959   eval "ac_cv_func_$ac_func=yes"
14960 else
14961   echo "configure: failed program was:" >&5
14962   cat conftest.$ac_ext >&5
14963   rm -rf conftest*
14964   eval "ac_cv_func_$ac_func=no"
14965 fi
14966 rm -f conftest*
14967
14968 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14969   echo "$ac_t""yes" 1>&6
14970     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14971   { test "$extra_verbose" = "yes" && cat << EOF
14972     Defining $ac_tr_func
14973 EOF
14974 cat >> confdefs.h <<EOF
14975 #define $ac_tr_func 1
14976 EOF
14977 }
14978  
14979 else
14980   echo "$ac_t""no" 1>&6
14981 fi
14982 done
14983
14984     with_modules=yes
14985   else
14986     if test "$with_modules" = "yes"; then
14987       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14988     else
14989       echo "configure: warning: "Module support cannot be provided."" 1>&2
14990     fi
14991     with_modules=no
14992   fi
14993 fi
14994
14995 cat > conftest.$ac_ext <<EOF
14996 #line 14997 "configure"
14997 #include "confdefs.h"
14998 int main(int c,char *v[]){return 0;}
14999 EOF
15000 if { (eval echo configure:15001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15001 then
15002   :
15003 else
15004   conftest_rc="$?"
15005   echo "configure: failed program was:" >&5
15006   cat conftest.$ac_ext >&5
15007   rm -fr conftest*
15008   
15009   echo ""
15010   echo "*** PANIC *** The C compiler can no longer build working executables."
15011   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15012   echo "*** PANIC *** The most likely reason for this problem is that configure"
15013   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15014   echo "*** PANIC *** found at run time."
15015   echo "*** PANIC ***"
15016   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15017   echo "*** PANIC *** On other systems, try telling configure where to find the"
15018   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15019   echo "*** PANIC ***"
15020   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15021   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15022   echo "*** PANIC *** on your system.  Don't do that."
15023   exit 1
15024 fi
15025 rm -fr conftest*
15026
15027 if test "$win32_processes" = "yes"; then
15028   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15029    echo "    xemacs will be linked with \"process-nt.o\""
15030  fi
15031 else
15032   { test "$extra_verbose" = "yes" && cat << \EOF
15033     Defining HAVE_UNIX_PROCESSES
15034 EOF
15035 cat >> confdefs.h <<\EOF
15036 #define HAVE_UNIX_PROCESSES 1
15037 EOF
15038 }
15039
15040   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15041    echo "    xemacs will be linked with \"process-unix.o\""
15042  fi
15043 fi
15044
15045
15046
15047 T=""
15048 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15049 CFLAGS="$T"
15050
15051
15052 T=""
15053 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15054 extra_objs="$T"
15055
15056
15057 T=""
15058 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
15059 c_switch_general="$T"
15060
15061
15062 T=""
15063 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
15064 c_switch_window_system="$T"
15065
15066
15067 T=""
15068 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15069 c_switch_all="$T"
15070
15071
15072 T=""
15073 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
15074 ld_switch_general="$T"
15075
15076
15077 T=""
15078 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15079 ld_switch_window_system="$T"
15080
15081
15082 T=""
15083 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15084 ld_switch_all="$T"
15085
15086
15087 T=""
15088 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15089 ld_libs_general="$T"
15090
15091
15092 T=""
15093 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
15094 ld_libs_window_system="$T"
15095
15096
15097 T=""
15098 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15099 ld_libs_all="$T"
15100
15101
15102
15103 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15104 internal_makefile_list="Makefile.in"
15105 SUBDIR_MAKEFILES=''
15106 test -d lock || mkdir lock
15107 for dir in $MAKE_SUBDIR; do
15108   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15109         test -d "$d" || mkdir "$d"; cd "$d"
15110       done ) ;;
15111    * ) test -d "$dir" || mkdir "$dir" ;;
15112   esac
15113   
15114 T=""
15115 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15116 SUBDIR_MAKEFILES="$T"
15117
15118   
15119 T=""
15120 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15121 internal_makefile_list="$T"
15122
15123 done
15124
15125
15126
15127
15128 for dir in src/s src/m; do
15129   if test ! -d "$dir" ; then
15130     echo Making symbolic link to "$srcdir/$dir"
15131     ${LN_S} "$srcdir/$dir" "$dir"
15132   fi
15133 done
15134
15135 if test "$extra_verbose" = "yes"; then
15136   echo ""
15137   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
15138   echo ""
15139 fi
15140
15141
15142 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15143   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15144   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15145 fi
15146
15147 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15148   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15149   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15150 fi
15151
15152 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15153   test "$extra_verbose" = "yes" && echo "creating TAGS"
15154   echo "\f
15155 $srcdir/TAGS,include" > "TAGS"
15156 fi
15157
15158 if test "$__SUNPRO_C" = "yes"; then
15159   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15160   ( echo "# For use with Sun WorkShop's Source browser."
15161     echo "# See sbquery(1) and sbinit(4) for more information"
15162     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15163   ) > .sbinit
15164 fi
15165
15166 rm -f core
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187 PREFIX=$prefix
15188 while true; do
15189   case "$PREFIX" in
15190     *\$* ) eval "PREFIX=$PREFIX" ;;
15191     *) break ;;
15192   esac
15193 done
15194
15195
15196
15197
15198 EXEC_PREFIX=$exec_prefix
15199 while true; do
15200   case "$EXEC_PREFIX" in
15201     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15202     *) break ;;
15203   esac
15204 done
15205
15206
15207
15208
15209 INFODIR=$infodir
15210 while true; do
15211   case "$INFODIR" in
15212     *\$* ) eval "INFODIR=$INFODIR" ;;
15213     *) break ;;
15214   esac
15215 done
15216
15217
15218
15219
15220 INFOPATH=$infopath
15221 while true; do
15222   case "$INFOPATH" in
15223     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15224     *) break ;;
15225   esac
15226 done
15227
15228
15229
15230
15231 PACKAGE_PATH=$package_path
15232 while true; do
15233   case "$PACKAGE_PATH" in
15234     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15235     *) break ;;
15236   esac
15237 done
15238
15239
15240
15241
15242 LISPDIR=$lispdir
15243 while true; do
15244   case "$LISPDIR" in
15245     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15246     *) break ;;
15247   esac
15248 done
15249
15250
15251
15252
15253 MODULEDIR=$moduledir
15254 while true; do
15255   case "$MODULEDIR" in
15256     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15257     *) break ;;
15258   esac
15259 done
15260
15261
15262
15263
15264 SITELISPDIR=$sitelispdir
15265 while true; do
15266   case "$SITELISPDIR" in
15267     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15268     *) break ;;
15269   esac
15270 done
15271
15272
15273
15274
15275 SITEMODULEDIR=$sitemoduledir
15276 while true; do
15277   case "$SITEMODULEDIR" in
15278     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15279     *) break ;;
15280   esac
15281 done
15282
15283
15284
15285
15286 ETCDIR=$etcdir
15287 while true; do
15288   case "$ETCDIR" in
15289     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15290     *) break ;;
15291   esac
15292 done
15293
15294
15295
15296
15297 DOCDIR=$docdir
15298 while true; do
15299   case "$DOCDIR" in
15300     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15301     *) break ;;
15302   esac
15303 done
15304
15305
15306
15307
15308 ARCHLIBDIR=$archlibdir
15309 while true; do
15310   case "$ARCHLIBDIR" in
15311     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15312     *) break ;;
15313   esac
15314 done
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15336
15337
15338
15339
15340
15341
15342
15343 : ${XEMACS_CC:=$CC}
15344
15345
15346 if test "$with_prefix" = "yes"; then
15347   { test "$extra_verbose" = "yes" && cat << \EOF
15348     Defining PREFIX_USER_DEFINED
15349 EOF
15350 cat >> confdefs.h <<\EOF
15351 #define PREFIX_USER_DEFINED 1
15352 EOF
15353 }
15354
15355 fi
15356
15357 if test "$with_site_lisp" = "no"; then
15358   { test "$extra_verbose" = "yes" && cat << \EOF
15359     Defining INHIBIT_SITE_LISP
15360 EOF
15361 cat >> confdefs.h <<\EOF
15362 #define INHIBIT_SITE_LISP 1
15363 EOF
15364 }
15365
15366 fi
15367 if test "$with_site_modules" = "no"; then
15368   { test "$extra_verbose" = "yes" && cat << \EOF
15369     Defining INHIBIT_SITE_MODULES
15370 EOF
15371 cat >> confdefs.h <<\EOF
15372 #define INHIBIT_SITE_MODULES 1
15373 EOF
15374 }
15375
15376 fi
15377
15378
15379 T=""
15380 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15381 ac_configure_args="$T"
15382
15383 { test "$extra_verbose" = "yes" && cat << EOF
15384     Defining EMACS_CONFIGURATION = "$configuration"
15385 EOF
15386 cat >> confdefs.h <<EOF
15387 #define EMACS_CONFIGURATION "$configuration"
15388 EOF
15389 }
15390
15391 { test "$extra_verbose" = "yes" && cat << EOF
15392     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15393 EOF
15394 cat >> confdefs.h <<EOF
15395 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15396 EOF
15397 }
15398
15399
15400
15401 null_string=""
15402 { test "$extra_verbose" = "yes" && cat << EOF
15403     Defining LD_SWITCH_X_SITE = $null_string
15404 EOF
15405 cat >> confdefs.h <<EOF
15406 #define LD_SWITCH_X_SITE $null_string
15407 EOF
15408 }
15409
15410 { test "$extra_verbose" = "yes" && cat << EOF
15411     Defining LD_SWITCH_X_SITE_AUX = $null_string
15412 EOF
15413 cat >> confdefs.h <<EOF
15414 #define LD_SWITCH_X_SITE_AUX $null_string
15415 EOF
15416 }
15417
15418 { test "$extra_verbose" = "yes" && cat << EOF
15419     Defining C_SWITCH_X_SITE = $null_string
15420 EOF
15421 cat >> confdefs.h <<EOF
15422 #define C_SWITCH_X_SITE $null_string
15423 EOF
15424 }
15425
15426 { test "$extra_verbose" = "yes" && cat << EOF
15427     Defining LD_SWITCH_SITE = $null_string
15428 EOF
15429 cat >> confdefs.h <<EOF
15430 #define LD_SWITCH_SITE $null_string
15431 EOF
15432 }
15433
15434 { test "$extra_verbose" = "yes" && cat << EOF
15435     Defining C_SWITCH_SITE = $null_string
15436 EOF
15437 cat >> confdefs.h <<EOF
15438 #define C_SWITCH_SITE $null_string
15439 EOF
15440 }
15441
15442
15443
15444 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15445     Defining GNU_MALLOC
15446 EOF
15447 cat >> confdefs.h <<\EOF
15448 #define GNU_MALLOC 1
15449 EOF
15450 }
15451
15452 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15453     Defining USE_SYSTEM_MALLOC
15454 EOF
15455 cat >> confdefs.h <<\EOF
15456 #define USE_SYSTEM_MALLOC 1
15457 EOF
15458 }
15459
15460 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15461     Defining USE_DEBUG_MALLOC
15462 EOF
15463 cat >> confdefs.h <<\EOF
15464 #define USE_DEBUG_MALLOC 1
15465 EOF
15466 }
15467
15468                                               { test "$extra_verbose" = "yes" && cat << \EOF
15469     Defining USE_SYSTEM_MALLOC
15470 EOF
15471 cat >> confdefs.h <<\EOF
15472 #define USE_SYSTEM_MALLOC 1
15473 EOF
15474 }
15475
15476 fi
15477 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15478     Defining I18N3
15479 EOF
15480 cat >> confdefs.h <<\EOF
15481 #define I18N3 1
15482 EOF
15483 }
15484
15485 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15486     Defining USE_GCC
15487 EOF
15488 cat >> confdefs.h <<\EOF
15489 #define USE_GCC 1
15490 EOF
15491 }
15492
15493 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15494     Defining EXTERNAL_WIDGET
15495 EOF
15496 cat >> confdefs.h <<\EOF
15497 #define EXTERNAL_WIDGET 1
15498 EOF
15499 }
15500
15501 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15502     Defining QUICK_BUILD
15503 EOF
15504 cat >> confdefs.h <<\EOF
15505 #define QUICK_BUILD 1
15506 EOF
15507 }
15508
15509 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15510     Defining PURIFY
15511 EOF
15512 cat >> confdefs.h <<\EOF
15513 #define PURIFY 1
15514 EOF
15515 }
15516
15517 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15518     Defining QUANTIFY
15519 EOF
15520 cat >> confdefs.h <<\EOF
15521 #define QUANTIFY 1
15522 EOF
15523 }
15524
15525 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15526     Defining MAIL_USE_POP
15527 EOF
15528 cat >> confdefs.h <<\EOF
15529 #define MAIL_USE_POP 1
15530 EOF
15531 }
15532
15533 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15534     Defining KERBEROS
15535 EOF
15536 cat >> confdefs.h <<\EOF
15537 #define KERBEROS 1
15538 EOF
15539 }
15540
15541 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15542     Defining HESIOD
15543 EOF
15544 cat >> confdefs.h <<\EOF
15545 #define HESIOD 1
15546 EOF
15547 }
15548
15549 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15550     Defining USE_UNION_TYPE
15551 EOF
15552 cat >> confdefs.h <<\EOF
15553 #define USE_UNION_TYPE 1
15554 EOF
15555 }
15556
15557 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15558     Defining PDUMP
15559 EOF
15560 cat >> confdefs.h <<\EOF
15561 #define PDUMP 1
15562 EOF
15563 }
15564
15565
15566
15567 (
15568 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15569 else
15570   echo "uname -a: `uname -a`"
15571 fi
15572 echo ""
15573 echo "$0 $quoted_arguments"
15574 ) > Installation
15575
15576 if test ! -z ${emacs_beta_version} ; then
15577   if test -z "${emacs_is_beta}" ; then
15578         xemacs_betaname=".${emacs_beta_version}"
15579   else
15580         xemacs_betaname="-b${emacs_beta_version}"
15581   fi
15582 else
15583   xemacs_betaname=""
15584 fi
15585
15586 (
15587 echo "
15588
15589 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15590 "
15591 echo "
15592 Compilation / Installation:"
15593 echo "  Source code location:              $srcdir"
15594 echo "  Installation prefix:               $prefix"
15595 if test -n "$site_includes"; then
15596   echo "  Additional header files:           $site_includes"
15597 fi
15598 if test -n "$site_libraries"; then
15599   echo "  Additional libraries:              $site_libraries"
15600 fi
15601 if test -n "$site_prefixes"; then
15602   echo "  Additional prefixes:               $site_prefixes"
15603 fi
15604 if test -n "$runpath"; then
15605   echo "  Runtime library search path:       $runpath"
15606 fi
15607
15608 if test -n "$opsysfile"
15609 then echo "  Operating system description file: \`$opsysfile'"
15610 else echo "  Not using any operating system description file"
15611 fi
15612 if test -n "$machfile"
15613 then echo "  Machine description file:          \`$machfile'"
15614 else echo "  Not using any machine description file"
15615 fi
15616
15617 echo "  Compiler:                          $CC $CFLAGS"
15618 echo "  Relocating allocator for buffers:  $rel_alloc"
15619 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15620
15621 echo "
15622 Window System:"
15623 if test "$with_msw" = "yes"; then
15624   echo "  Compiling in support for the Microsoft window system."
15625 fi
15626 if test "$with_x11" = "yes"; then
15627   echo "  Compiling in support for the X window system:"
15628   echo "    - X Windows headers location:                 $x_includes"
15629   echo "    - X Windows libraries location:               $x_libraries"
15630   if test "$with_xauth" != yes; then
15631     echo "    - Xau (X authority) not available."
15632   fi
15633   if test "$with_xmu" != yes; then
15634     echo "    - Xmu library not available; substituting equivalent routines."
15635   fi
15636   if test "$with_wmcommand" != no; then
15637     echo "    - Handling WM_COMMAND properly."
15638   fi
15639 fi
15640 if test "$need_athena" = "yes"; then
15641   echo "  Compiling in support for the Athena widget set:"
15642   echo "    - Athena headers location:                    $athena_h_path"
15643   echo "    - Athena library to link:                     $athena_lib"
15644 fi
15645 case "$with_menubars" in
15646   gtk   ) echo "  Using GTK menubars."   ;;
15647   lucid ) echo "  Using Lucid menubars." ;;
15648   motif ) echo "  Using Motif menubars."
15649           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15650           echo "             We recommend using the Lucid menubar instead."
15651           echo "             Re-run configure with --with-menubars='lucid'." ;;
15652     msw ) echo "  Using MS-Windows menubars." ;;
15653 esac
15654 case "$with_scrollbars" in
15655   gtk    ) echo "  Using GTK scrollbars."        ;;
15656   lucid  ) echo "  Using Lucid scrollbars."      ;;
15657   motif  ) echo "  Using Motif scrollbars."      ;;
15658   athena ) echo "  Using Athena scrollbars."     ;;
15659      msw ) echo "  Using MS-Windows scrollbars." ;;
15660 esac
15661 case "$with_dialogs" in
15662   gtk    ) echo "  Using GTK dialog boxes." ;;
15663   motif  ) echo "  Using Motif dialog boxes."
15664            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15665              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15666              echo "             We recommend using the Athena dialog boxes instead."
15667              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15668              echo "             Read the PROBLEMS file for more information."
15669            fi; fi ;;
15670   athena ) echo "  Using Athena dialog boxes."     ;;
15671      msw ) echo "  Using MS-Windows dialog boxes." ;;
15672 esac
15673 case "$with_widgets" in
15674   gtk    ) echo "  Using GTK native widgets."        ;;
15675   motif  ) echo "  Using Motif native widgets."      ;;
15676   athena ) echo "  Using Athena native widgets."     ;;
15677      msw ) echo "  Using MS-Windows native widgets." ;;
15678 esac
15679 if test "$with_dragndrop" = yes; then
15680   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15681   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15682 fi
15683
15684 echo "
15685 TTY:"
15686 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15687 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15688
15689 echo "
15690 Images:"
15691 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15692 if test "$with_xpm" = yes; then
15693   echo "  Compiling in support for XPM  images."
15694 elif test "$with_x11" = yes; then
15695   echo "  WARNING: -----------------------------------------------------------"
15696   echo "  WARNING: Compiling without XPM image support."
15697   if test "$xpm_problem" != ""; then
15698     echo "  Reason: $xpm_problem"
15699   fi
15700   echo "  WARNING: You should strongly consider installing XPM."
15701   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15702   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15703   echo "  WARNING: -----------------------------------------------------------"
15704 fi
15705 if test "$with_png" = yes; then
15706   echo "  Compiling in support for PNG  images."
15707 elif test "$window_system" != "none"; then
15708   echo "  WARNING: -----------------------------------------------------------"
15709   echo "  WARNING: Compiling without PNG image support."
15710   if test "$png_problem" != ""; then
15711     echo "  Reason: $png_problem"
15712   fi
15713   echo "  WARNING: You should strongly consider installing the PNG libraries."
15714   echo "  WARNING: Otherwise certain images and glyphs may not display."
15715   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15716   echo "  WARNING: -----------------------------------------------------------"
15717 fi
15718 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15719 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15720 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15721
15722 echo "
15723 Sound:"
15724 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15725 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15726 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15727 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15728
15729 echo "
15730 Databases:"
15731 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15732 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15733 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15734 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15735 if test "$with_postgresql" = yes; then
15736   echo "  Compiling in support for PostgreSQL."
15737   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15738   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15739 fi
15740
15741 echo "
15742 Internationalization:"
15743 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15744 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15745 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15746 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15747 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15748 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15749 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15750 if test "$with_wnn" = yes; then
15751   echo "  Compiling in support for the WNN input method on Mule."
15752   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15753 fi
15754 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15755
15756 echo "
15757 Mail:"
15758 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15759 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15760 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15761 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15762
15763 echo "
15764 Other Features:"
15765 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15766 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15767 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15768 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15769 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15770 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15771 test "$pdump" = yes && echo "  Using the new portable dumper."
15772 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15773 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15774 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15775   != "no no no no no no"; then
15776   echo "  WARNING: ---------------------------------------------------------"
15777   echo "  WARNING: Compiling in support for runtime error checking."
15778   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15779   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15780   echo "  WARNING: ---------------------------------------------------------"
15781 fi
15782 echo ""
15783 ) | tee -a Installation
15784 echo ""
15785
15786
15787 # Remove any trailing slashes in these variables.
15788 test -n "$prefix" &&
15789   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15790 test -n "$exec_prefix" &&
15791   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15792
15793
15794 for file in $internal_makefile_list; do
15795   test "$file" = src/Makefile.in && \
15796     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15797   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15798 done
15799 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15800 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
15801
15802 trap '' 1 2 15
15803
15804 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15805
15806 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15807 # Let make expand exec_prefix.
15808 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15809
15810 # Any assignment to VPATH causes Sun make to only execute
15811 # the first set of double-colon rules, so remove it if not needed.
15812 # If there is a colon in the path, we need to keep it.
15813 if test "x$srcdir" = x.; then
15814   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15815 fi
15816
15817 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15818
15819 DEFS=-DHAVE_CONFIG_H
15820
15821 # Without the "./", some shells look in PATH for config.status.
15822 : ${CONFIG_STATUS=./config.status}
15823
15824 echo creating $CONFIG_STATUS
15825 rm -f $CONFIG_STATUS
15826 cat > $CONFIG_STATUS <<EOF
15827 #! /bin/sh
15828 # Generated automatically by configure.
15829 # Run this file to recreate the current configuration.
15830 # This directory was configured as follows,
15831 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15832 #
15833 # $0 $ac_configure_args
15834 #
15835 # Compiler output produced by configure, useful for debugging
15836 # configure, is in ./config.log if it exists.
15837
15838 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15839 for ac_option
15840 do
15841   case "\$ac_option" in
15842   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15843     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15844     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15845   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15846     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15847     exit 0 ;;
15848   -help | --help | --hel | --he | --h)
15849     echo "\$ac_cs_usage"; exit 0 ;;
15850   *) echo "\$ac_cs_usage"; exit 1 ;;
15851   esac
15852 done
15853
15854 ac_given_srcdir=$srcdir
15855 ac_given_INSTALL="$INSTALL"
15856
15857 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15858 EOF
15859 cat >> $CONFIG_STATUS <<EOF
15860
15861 # Protect against being on the right side of a sed subst in config.status.
15862 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15863  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15864 $ac_vpsub
15865 $extrasub
15866 s%@SHELL@%$SHELL%g
15867 s%@CFLAGS@%$CFLAGS%g
15868 s%@CPPFLAGS@%$CPPFLAGS%g
15869 s%@CXXFLAGS@%$CXXFLAGS%g
15870 s%@FFLAGS@%$FFLAGS%g
15871 s%@DEFS@%$DEFS%g
15872 s%@LDFLAGS@%$LDFLAGS%g
15873 s%@LIBS@%$LIBS%g
15874 s%@exec_prefix@%$exec_prefix%g
15875 s%@prefix@%$prefix%g
15876 s%@program_transform_name@%$program_transform_name%g
15877 s%@bindir@%$bindir%g
15878 s%@sbindir@%$sbindir%g
15879 s%@libexecdir@%$libexecdir%g
15880 s%@datadir@%$datadir%g
15881 s%@sysconfdir@%$sysconfdir%g
15882 s%@sharedstatedir@%$sharedstatedir%g
15883 s%@localstatedir@%$localstatedir%g
15884 s%@libdir@%$libdir%g
15885 s%@includedir@%$includedir%g
15886 s%@oldincludedir@%$oldincludedir%g
15887 s%@infodir@%$infodir%g
15888 s%@mandir@%$mandir%g
15889 s%@LN_S@%$LN_S%g
15890 s%@blddir@%$blddir%g
15891 s%@CC@%$CC%g
15892 s%@CPP@%$CPP%g
15893 s%@start_flags@%$start_flags%g
15894 s%@ld_switch_shared@%$ld_switch_shared%g
15895 s%@start_files@%$start_files%g
15896 s%@ld@%$ld%g
15897 s%@lib_gcc@%$lib_gcc%g
15898 s%@RANLIB@%$RANLIB%g
15899 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15900 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15901 s%@INSTALL_DATA@%$INSTALL_DATA%g
15902 s%@YACC@%$YACC%g
15903 s%@SET_MAKE@%$SET_MAKE%g
15904 s%@GTK_CONFIG@%$GTK_CONFIG%g
15905 s%@X_CFLAGS@%$X_CFLAGS%g
15906 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15907 s%@X_LIBS@%$X_LIBS%g
15908 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15909 s%@install_pp@%$install_pp%g
15910 s%@libs_xauth@%$libs_xauth%g
15911 s%@dnd_objs@%$dnd_objs%g
15912 s%@lwlib_objs@%$lwlib_objs%g
15913 s%@ALLOCA@%$ALLOCA%g
15914 s%@have_esd_config@%$have_esd_config%g
15915 s%@dll_ld@%$dll_ld%g
15916 s%@dll_cflags@%$dll_cflags%g
15917 s%@dll_ldflags@%$dll_ldflags%g
15918 s%@dll_post@%$dll_post%g
15919 s%@dll_ldo@%$dll_ldo%g
15920 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15921 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15922 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15923 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15924 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15925 s%@PROGNAME@%$PROGNAME%g
15926 s%@version@%$version%g
15927 s%@configuration@%$configuration%g
15928 s%@canonical@%$canonical%g
15929 s%@inststaticdir@%$inststaticdir%g
15930 s%@instvardir@%$instvardir%g
15931 s%@srcdir@%$srcdir%g
15932 s%@pkgdir@%$pkgdir%g
15933 s%@statedir@%$statedir%g
15934 s%@extra_includes@%$extra_includes%g
15935 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15936 s%@PREFIX@%$PREFIX%g
15937 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15938 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15939 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15940 s%@INFODIR@%$INFODIR%g
15941 s%@infopath@%$infopath%g
15942 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15943 s%@INFOPATH@%$INFOPATH%g
15944 s%@package_path@%$package_path%g
15945 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15946 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15947 s%@lispdir@%$lispdir%g
15948 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15949 s%@LISPDIR@%$LISPDIR%g
15950 s%@moduledir@%$moduledir%g
15951 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15952 s%@MODULEDIR@%$MODULEDIR%g
15953 s%@sitelispdir@%$sitelispdir%g
15954 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15955 s%@SITELISPDIR@%$SITELISPDIR%g
15956 s%@sitemoduledir@%$sitemoduledir%g
15957 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15958 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15959 s%@etcdir@%$etcdir%g
15960 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15961 s%@ETCDIR@%$ETCDIR%g
15962 s%@docdir@%$docdir%g
15963 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15964 s%@DOCDIR@%$DOCDIR%g
15965 s%@archlibdir@%$archlibdir%g
15966 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15967 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15968 s%@bitmapdir@%$bitmapdir%g
15969 s%@extra_objs@%$extra_objs%g
15970 s%@machfile@%$machfile%g
15971 s%@opsysfile@%$opsysfile%g
15972 s%@c_switch_general@%$c_switch_general%g
15973 s%@c_switch_window_system@%$c_switch_window_system%g
15974 s%@c_switch_all@%$c_switch_all%g
15975 s%@ld_switch_general@%$ld_switch_general%g
15976 s%@ld_switch_window_system@%$ld_switch_window_system%g
15977 s%@ld_switch_all@%$ld_switch_all%g
15978 s%@ld_libs_general@%$ld_libs_general%g
15979 s%@ld_libs_window_system@%$ld_libs_window_system%g
15980 s%@ld_libs_all@%$ld_libs_all%g
15981 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15982 s%@native_sound_lib@%$native_sound_lib%g
15983 s%@sound_cflags@%$sound_cflags%g
15984 s%@dynodump_arch@%$dynodump_arch%g
15985 s%@XEMACS_CC@%$XEMACS_CC%g
15986 s%@internal_makefile_list@%$internal_makefile_list%g
15987
15988 CEOF
15989 EOF
15990
15991 cat >> $CONFIG_STATUS <<\EOF
15992
15993 # Split the substitutions into bite-sized pieces for seds with
15994 # small command number limits, like on Digital OSF/1 and HP-UX.
15995 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15996 ac_file=1 # Number of current file.
15997 ac_beg=1 # First line for current file.
15998 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15999 ac_more_lines=:
16000 ac_sed_cmds=""
16001 while $ac_more_lines; do
16002   if test $ac_beg -gt 1; then
16003     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16004   else
16005     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16006   fi
16007   if test ! -s conftest.s$ac_file; then
16008     ac_more_lines=false
16009     rm -f conftest.s$ac_file
16010   else
16011     if test -z "$ac_sed_cmds"; then
16012       ac_sed_cmds="sed -f conftest.s$ac_file"
16013     else
16014       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16015     fi
16016     ac_file=`expr $ac_file + 1`
16017     ac_beg=$ac_end
16018     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16019   fi
16020 done
16021 if test -z "$ac_sed_cmds"; then
16022   ac_sed_cmds=cat
16023 fi
16024 EOF
16025
16026 cat >> $CONFIG_STATUS <<EOF
16027
16028 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16029 EOF
16030 cat >> $CONFIG_STATUS <<\EOF
16031 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16032   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16033   case "$ac_file" in
16034   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16035        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16036   *) ac_file_in="${ac_file}.in" ;;
16037   esac
16038
16039   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16040
16041   # Remove last slash and all that follows it.  Not all systems have dirname.
16042   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16043   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16044     # The file is in a subdirectory.
16045     test ! -d "$ac_dir" && mkdir "$ac_dir"
16046     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16047     # A "../" for each directory in $ac_dir_suffix.
16048     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16049   else
16050     ac_dir_suffix= ac_dots=
16051   fi
16052
16053   case "$ac_given_srcdir" in
16054   .)  srcdir=.
16055       if test -z "$ac_dots"; then top_srcdir=.
16056       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16057   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16058   *) # Relative path.
16059     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16060     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16061   esac
16062
16063   case "$ac_given_INSTALL" in
16064   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16065   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16066   esac
16067
16068   echo creating "$ac_file"
16069   rm -f "$ac_file"
16070   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16071   case "$ac_file" in
16072   *Makefile*) ac_comsub="1i\\
16073 # $configure_input" ;;
16074   *) ac_comsub= ;;
16075   esac
16076
16077   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16078   sed -e "$ac_comsub
16079 s%@configure_input@%$configure_input%g
16080 s%@srcdir@%$srcdir%g
16081 s%@top_srcdir@%$top_srcdir%g
16082 s%@INSTALL@%$INSTALL%g
16083 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16084 fi; done
16085 rm -f conftest.s*
16086
16087 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16088 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16089 #
16090 # ac_d sets the value in "#define NAME VALUE" lines.
16091 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16092 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16093 ac_dC='\3'
16094 ac_dD='%g'
16095 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16096 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16097 ac_uB='\([      ]\)%\1#\2define\3'
16098 ac_uC=' '
16099 ac_uD='\4%g'
16100 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16101 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16102 ac_eB='$%\1#\2define\3'
16103 ac_eC=' '
16104 ac_eD='%g'
16105
16106 if test "${CONFIG_HEADERS+set}" != set; then
16107 EOF
16108 cat >> $CONFIG_STATUS <<EOF
16109   CONFIG_HEADERS="src/config.h lwlib/config.h"
16110 EOF
16111 cat >> $CONFIG_STATUS <<\EOF
16112 fi
16113 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16114   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16115   case "$ac_file" in
16116   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16117        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16118   *) ac_file_in="${ac_file}.in" ;;
16119   esac
16120
16121   echo creating $ac_file
16122
16123   rm -f conftest.frag conftest.in conftest.out
16124   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16125   cat $ac_file_inputs > conftest.in
16126
16127 EOF
16128
16129 # Transform confdefs.h into a sed script conftest.vals that substitutes
16130 # the proper values into config.h.in to produce config.h.  And first:
16131 # Protect against being on the right side of a sed subst in config.status.
16132 # Protect against being in an unquoted here document in config.status.
16133 rm -f conftest.vals
16134 cat > conftest.hdr <<\EOF
16135 s/[\\&%]/\\&/g
16136 s%[\\$`]%\\&%g
16137 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16138 s%ac_d%ac_u%gp
16139 s%ac_u%ac_e%gp
16140 EOF
16141 sed -n -f conftest.hdr confdefs.h > conftest.vals
16142 rm -f conftest.hdr
16143
16144 # This sed command replaces #undef with comments.  This is necessary, for
16145 # example, in the case of _POSIX_SOURCE, which is predefined and required
16146 # on some systems where configure will not decide to define it.
16147 cat >> conftest.vals <<\EOF
16148 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16149 EOF
16150
16151 # Break up conftest.vals because some shells have a limit on
16152 # the size of here documents, and old seds have small limits too.
16153
16154 rm -f conftest.tail
16155 while :
16156 do
16157   ac_lines=`grep -c . conftest.vals`
16158   # grep -c gives empty output for an empty file on some AIX systems.
16159   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16160   # Write a limited-size here document to conftest.frag.
16161   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16162   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16163   echo 'CEOF
16164   sed -f conftest.frag conftest.in > conftest.out
16165   rm -f conftest.in
16166   mv conftest.out conftest.in
16167 ' >> $CONFIG_STATUS
16168   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16169   rm -f conftest.vals
16170   mv conftest.tail conftest.vals
16171 done
16172 rm -f conftest.vals
16173
16174 cat >> $CONFIG_STATUS <<\EOF
16175   rm -f conftest.frag conftest.h
16176   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16177   cat conftest.in >> conftest.h
16178   rm -f conftest.in
16179   if cmp -s $ac_file conftest.h 2>/dev/null; then
16180     echo "$ac_file is unchanged"
16181     rm -f conftest.h
16182   else
16183     # Remove last slash and all that follows it.  Not all systems have dirname.
16184       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16185       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16186       # The file is in a subdirectory.
16187       test ! -d "$ac_dir" && mkdir "$ac_dir"
16188     fi
16189     rm -f $ac_file
16190     mv conftest.h $ac_file
16191   fi
16192 fi; done
16193
16194 EOF
16195 cat >> $CONFIG_STATUS <<EOF
16196 CPP="$CPP"
16197  top_srcdir="$srcdir"
16198  MAKE_SUBDIR="$MAKE_SUBDIR"
16199
16200 EOF
16201 cat >> $CONFIG_STATUS <<\EOF
16202 for dir in . $MAKE_SUBDIR; do
16203   (
16204     cd $dir
16205     rm -f junk.c
16206     < Makefile.in \
16207       sed -e '/^# Generated/d' \
16208           -e 's%/\*\*/#.*%%' \
16209           -e 's/^ *# */#/' \
16210           -e '/^##/d' \
16211           -e '/^#/ {
16212 p
16213 d
16214 }'        \
16215           -e '/./ {
16216 s/\([\"]\)/\\\1/g
16217 s/^/"/
16218 s/$/"/
16219 }'  > junk.c;
16220
16221
16222
16223     echo creating $dir/Makefile
16224 $CPP -I. -I${top_srcdir}/src  junk.c \
16225   | sed -e 's/^\#.*//'          \
16226         -e 's/^[        ][      ]*$//'\
16227         -e 's/^ /       /'              \
16228         -e '/^[ \f]*$/d' \
16229         -e '/^\"/ {
16230         s/\\\([\"]\)/\1/g
16231         s/^[    ]*\"//
16232         s/\"[   ]*$//
16233 }' > Makefile.new
16234     chmod 444 Makefile.new
16235     mv -f Makefile.new Makefile
16236
16237     echo creating $dir/GNUmakefile
16238 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16239   | sed -e 's/^\#.*//'          \
16240         -e 's/^[        ][      ]*$//'\
16241         -e 's/^ /       /'              \
16242         -e '/^[ \f]*$/d' \
16243         -e '/^\"/ {
16244         s/\\\([\"]\)/\1/g
16245         s/^[    ]*\"//
16246         s/\"[   ]*$//
16247 }' > Makefile.new
16248     chmod 444 Makefile.new
16249     mv -f Makefile.new GNUmakefile
16250
16251     rm -f junk.c
16252   )
16253 done
16254
16255 sed < config.status >> lib-src/config.values \
16256   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16257   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16258   -e 's/^\([^ ]*\) $/\1 ""/' \
16259   -e 's/ 1$/ t/'
16260
16261
16262 exit 0
16263 EOF
16264 chmod +x $CONFIG_STATUS
16265 rm -fr confdefs* $ac_clean_files
16266 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1