fdb596f3a075fec7fc40d9e39f56ac90f7a9bd64
[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 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1507
1508 if test -r "${srcdir}/src/m/${machine}.h"; then
1509   machfile="m/${machine}.h"
1510   { test "$extra_verbose" = "yes" && cat << EOF
1511     Defining config_machfile = "$machfile"
1512 EOF
1513 cat >> confdefs.h <<EOF
1514 #define config_machfile "$machfile"
1515 EOF
1516 }
1517
1518 else
1519   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1520   echo "Using configure-time autodetection only."
1521 fi
1522
1523 if test -r "${srcdir}/src/s/${opsys}.h"; then
1524   opsysfile="s/${opsys}.h"
1525   { test "$extra_verbose" = "yes" && cat << EOF
1526     Defining config_opsysfile = "$opsysfile"
1527 EOF
1528 cat >> confdefs.h <<EOF
1529 #define config_opsysfile "$opsysfile"
1530 EOF
1531 }
1532
1533 else
1534   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1535   echo "Using configure-time autodetection only."
1536 fi
1537
1538
1539 if test -z "$dynamic"; then
1540   case "$opsys" in
1541     hpux* | sunos4* ) dynamic=no ;;
1542     *) dynamic=yes ;;
1543   esac
1544 fi
1545 if test "$dynamic" = "yes"; then
1546   case "$opsys" in
1547     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1548     decosf* ) ld_call_shared="-call_shared" ;;
1549   esac
1550 else   case "$opsys" in
1551     sol2 )
1552       echo "Static linking is not supported on Solaris 2."
1553       echo "Rerun configure without specifying --dynamic=no."
1554       exit 1 ;;
1555     linux   ) ld_call_shared="-Bstatic" ;;
1556     decosf* ) ld_call_shared="-non_shared" ;;
1557   esac
1558 fi
1559
1560 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1561
1562 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1563 { test "$extra_verbose" = "yes" && cat << EOF
1564     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1565 EOF
1566 cat >> confdefs.h <<EOF
1567 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1568 EOF
1569 }
1570
1571
1572
1573 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1574 if test "$with_workshop $with_tooltalk" = "yes no"; then
1575   (echo "$progname: Usage error:"
1576 echo " " "--with-workshop requires --with-tooltalk"
1577 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1578 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1579 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1580 fi
1581
1582 if test "$with_workshop" = "yes"; then
1583   { test "$extra_verbose" = "yes" && cat << \EOF
1584     Defining SUNPRO
1585 EOF
1586 cat >> confdefs.h <<\EOF
1587 #define SUNPRO 1
1588 EOF
1589 }
1590
1591   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1592    echo "    xemacs will be linked with \"sunpro.o\""
1593  fi
1594 fi
1595
1596 if test "$with_clash_detection" != "no"; then
1597   { test "$extra_verbose" = "yes" && cat << \EOF
1598     Defining CLASH_DETECTION
1599 EOF
1600 cat >> confdefs.h <<\EOF
1601 #define CLASH_DETECTION 1
1602 EOF
1603 }
1604
1605   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1606    echo "    xemacs will be linked with \"filelock.o\""
1607  fi
1608 fi
1609
1610 test -n "$compiler" && CC="$compiler"
1611 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1612 fi
1613
1614 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1615 if test "${CFLAGS-unset}" != unset
1616   then cflags_specified=yes;
1617   else cflags_specified=no;
1618 fi
1619
1620 xe_save_CFLAGS="$CFLAGS"
1621
1622 # Extract the first word of "gcc", so it can be a program name with args.
1623 set dummy gcc; ac_word=$2
1624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1625 echo "configure:1626: checking for $ac_word" >&5
1626
1627 if test -n "$CC"; then
1628   ac_cv_prog_CC="$CC" # Let the user override the test.
1629 else
1630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1631   ac_dummy="$PATH"
1632   for ac_dir in $ac_dummy; do
1633     test -z "$ac_dir" && ac_dir=.
1634     if test -f $ac_dir/$ac_word; then
1635       ac_cv_prog_CC="gcc"
1636       break
1637     fi
1638   done
1639   IFS="$ac_save_ifs"
1640 fi
1641 CC="$ac_cv_prog_CC"
1642 if test -n "$CC"; then
1643   echo "$ac_t""$CC" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648 if test -z "$CC"; then
1649   # Extract the first word of "cc", so it can be a program name with args.
1650 set dummy cc; ac_word=$2
1651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1652 echo "configure:1653: checking for $ac_word" >&5
1653
1654 if test -n "$CC"; then
1655   ac_cv_prog_CC="$CC" # Let the user override the test.
1656 else
1657   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1658   ac_prog_rejected=no
1659   ac_dummy="$PATH"
1660   for ac_dir in $ac_dummy; do
1661     test -z "$ac_dir" && ac_dir=.
1662     if test -f $ac_dir/$ac_word; then
1663       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1664         ac_prog_rejected=yes
1665         continue
1666       fi
1667       ac_cv_prog_CC="cc"
1668       break
1669     fi
1670   done
1671   IFS="$ac_save_ifs"
1672 if test $ac_prog_rejected = yes; then
1673   # We found a bogon in the path, so make sure we never use it.
1674   set dummy $ac_cv_prog_CC
1675   shift
1676   if test $# -gt 0; then
1677     # We chose a different compiler from the bogus one.
1678     # However, it has the same basename, so the bogon will be chosen
1679     # first if we set CC to just the basename; use the full file name.
1680     shift
1681     set dummy "$ac_dir/$ac_word" "$@"
1682     shift
1683     ac_cv_prog_CC="$@"
1684   fi
1685 fi
1686 fi
1687 CC="$ac_cv_prog_CC"
1688 if test -n "$CC"; then
1689   echo "$ac_t""$CC" 1>&6
1690 else
1691   echo "$ac_t""no" 1>&6
1692 fi
1693
1694   if test -z "$CC"; then
1695     case "`uname -s`" in
1696     *win32* | *WIN32*)
1697       # Extract the first word of "cl", so it can be a program name with args.
1698 set dummy cl; ac_word=$2
1699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1700 echo "configure:1701: checking for $ac_word" >&5
1701
1702 if test -n "$CC"; then
1703   ac_cv_prog_CC="$CC" # Let the user override the test.
1704 else
1705   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1706   ac_dummy="$PATH"
1707   for ac_dir in $ac_dummy; do
1708     test -z "$ac_dir" && ac_dir=.
1709     if test -f $ac_dir/$ac_word; then
1710       ac_cv_prog_CC="cl"
1711       break
1712     fi
1713   done
1714   IFS="$ac_save_ifs"
1715 fi
1716 CC="$ac_cv_prog_CC"
1717 if test -n "$CC"; then
1718   echo "$ac_t""$CC" 1>&6
1719 else
1720   echo "$ac_t""no" 1>&6
1721 fi
1722  ;;
1723     esac
1724   fi
1725   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1726 fi
1727
1728 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1729 echo "configure:1730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1730
1731 ac_ext=c
1732 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1733 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1734 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'
1735 ac_cpp='$CPP '"$xe_cppflags"
1736 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1737 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1738 cross_compiling=no
1739
1740 cat > conftest.$ac_ext << EOF
1741
1742 #line 1743 "configure"
1743 #include "confdefs.h"
1744
1745 main(){return(0);}
1746 EOF
1747 if { (eval echo configure:1748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1748   ac_cv_prog_cc_works=yes
1749   # If we can't run a trivial program, we are probably using a cross compiler.
1750   if (./conftest; exit) 2>/dev/null; then
1751     ac_cv_prog_cc_cross=no
1752   else
1753     ac_cv_prog_cc_cross=yes
1754   fi
1755 else
1756   echo "configure: failed program was:" >&5
1757   cat conftest.$ac_ext >&5
1758   ac_cv_prog_cc_works=no
1759 fi
1760 rm -fr conftest*
1761 ac_ext=c
1762 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1763 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1764 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'
1765 ac_cpp='$CPP '"$xe_cppflags"
1766 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1767 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1768 cross_compiling=no
1769
1770 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1771 if test $ac_cv_prog_cc_works = no; then
1772   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1773 fi
1774 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1775 echo "configure:1776: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1776 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1777 cross_compiling=$ac_cv_prog_cc_cross
1778
1779 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1780 echo "configure:1781: checking whether we are using GNU C" >&5
1781
1782 cat > conftest.c <<EOF
1783 #ifdef __GNUC__
1784   yes;
1785 #endif
1786 EOF
1787 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1788   ac_cv_prog_gcc=yes
1789 else
1790   ac_cv_prog_gcc=no
1791 fi
1792
1793 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1794
1795 if test $ac_cv_prog_gcc = yes; then
1796   GCC=yes
1797 else
1798   GCC=
1799 fi
1800
1801 ac_test_CFLAGS="${CFLAGS+set}"
1802 ac_save_CFLAGS="$CFLAGS"
1803 CFLAGS=
1804 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1805 echo "configure:1806: checking whether ${CC-cc} accepts -g" >&5
1806
1807 echo 'void f(){}' > conftest.c
1808 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1809   ac_cv_prog_cc_g=yes
1810 else
1811   ac_cv_prog_cc_g=no
1812 fi
1813 rm -f conftest*
1814
1815
1816 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1817 if test "$ac_test_CFLAGS" = set; then
1818   CFLAGS="$ac_save_CFLAGS"
1819 elif test $ac_cv_prog_cc_g = yes; then
1820   if test "$GCC" = yes; then
1821     CFLAGS="-g -O2"
1822   else
1823     CFLAGS="-g"
1824   fi
1825 else
1826   if test "$GCC" = yes; then
1827     CFLAGS="-O2"
1828   else
1829     CFLAGS=
1830   fi
1831 fi
1832  
1833 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1834   CC=${NON_GNU_CC-cc}
1835   # Extract the first word of "gcc", so it can be a program name with args.
1836 set dummy gcc; ac_word=$2
1837 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1838 echo "configure:1839: checking for $ac_word" >&5
1839
1840 if test -n "$CC"; then
1841   ac_cv_prog_CC="$CC" # Let the user override the test.
1842 else
1843   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1844   ac_dummy="$PATH"
1845   for ac_dir in $ac_dummy; do
1846     test -z "$ac_dir" && ac_dir=.
1847     if test -f $ac_dir/$ac_word; then
1848       ac_cv_prog_CC="gcc"
1849       break
1850     fi
1851   done
1852   IFS="$ac_save_ifs"
1853 fi
1854 CC="$ac_cv_prog_CC"
1855 if test -n "$CC"; then
1856   echo "$ac_t""$CC" 1>&6
1857 else
1858   echo "$ac_t""no" 1>&6
1859 fi
1860
1861 if test -z "$CC"; then
1862   # Extract the first word of "cc", so it can be a program name with args.
1863 set dummy cc; ac_word=$2
1864 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $ac_word" >&5
1866
1867 if test -n "$CC"; then
1868   ac_cv_prog_CC="$CC" # Let the user override the test.
1869 else
1870   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1871   ac_prog_rejected=no
1872   ac_dummy="$PATH"
1873   for ac_dir in $ac_dummy; do
1874     test -z "$ac_dir" && ac_dir=.
1875     if test -f $ac_dir/$ac_word; then
1876       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1877         ac_prog_rejected=yes
1878         continue
1879       fi
1880       ac_cv_prog_CC="cc"
1881       break
1882     fi
1883   done
1884   IFS="$ac_save_ifs"
1885 if test $ac_prog_rejected = yes; then
1886   # We found a bogon in the path, so make sure we never use it.
1887   set dummy $ac_cv_prog_CC
1888   shift
1889   if test $# -gt 0; then
1890     # We chose a different compiler from the bogus one.
1891     # However, it has the same basename, so the bogon will be chosen
1892     # first if we set CC to just the basename; use the full file name.
1893     shift
1894     set dummy "$ac_dir/$ac_word" "$@"
1895     shift
1896     ac_cv_prog_CC="$@"
1897   fi
1898 fi
1899 fi
1900 CC="$ac_cv_prog_CC"
1901 if test -n "$CC"; then
1902   echo "$ac_t""$CC" 1>&6
1903 else
1904   echo "$ac_t""no" 1>&6
1905 fi
1906
1907   if test -z "$CC"; then
1908     case "`uname -s`" in
1909     *win32* | *WIN32*)
1910       # Extract the first word of "cl", so it can be a program name with args.
1911 set dummy cl; ac_word=$2
1912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1913 echo "configure:1914: checking for $ac_word" >&5
1914
1915 if test -n "$CC"; then
1916   ac_cv_prog_CC="$CC" # Let the user override the test.
1917 else
1918   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1919   ac_dummy="$PATH"
1920   for ac_dir in $ac_dummy; do
1921     test -z "$ac_dir" && ac_dir=.
1922     if test -f $ac_dir/$ac_word; then
1923       ac_cv_prog_CC="cl"
1924       break
1925     fi
1926   done
1927   IFS="$ac_save_ifs"
1928 fi
1929 CC="$ac_cv_prog_CC"
1930 if test -n "$CC"; then
1931   echo "$ac_t""$CC" 1>&6
1932 else
1933   echo "$ac_t""no" 1>&6
1934 fi
1935  ;;
1936     esac
1937   fi
1938   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1939 fi
1940
1941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1942 echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1943
1944 ac_ext=c
1945 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1946 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1947 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'
1948 ac_cpp='$CPP '"$xe_cppflags"
1949 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1950 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1951 cross_compiling=no
1952
1953 cat > conftest.$ac_ext << EOF
1954
1955 #line 1956 "configure"
1956 #include "confdefs.h"
1957
1958 main(){return(0);}
1959 EOF
1960 if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1961   ac_cv_prog_cc_works=yes
1962   # If we can't run a trivial program, we are probably using a cross compiler.
1963   if (./conftest; exit) 2>/dev/null; then
1964     ac_cv_prog_cc_cross=no
1965   else
1966     ac_cv_prog_cc_cross=yes
1967   fi
1968 else
1969   echo "configure: failed program was:" >&5
1970   cat conftest.$ac_ext >&5
1971   ac_cv_prog_cc_works=no
1972 fi
1973 rm -fr conftest*
1974 ac_ext=c
1975 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1976 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1977 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'
1978 ac_cpp='$CPP '"$xe_cppflags"
1979 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1980 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1981 cross_compiling=no
1982
1983 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1984 if test $ac_cv_prog_cc_works = no; then
1985   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1986 fi
1987 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1988 echo "configure:1989: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1989 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1990 cross_compiling=$ac_cv_prog_cc_cross
1991
1992 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1993 echo "configure:1994: checking whether we are using GNU C" >&5
1994
1995 cat > conftest.c <<EOF
1996 #ifdef __GNUC__
1997   yes;
1998 #endif
1999 EOF
2000 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2001   ac_cv_prog_gcc=yes
2002 else
2003   ac_cv_prog_gcc=no
2004 fi
2005
2006 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2007
2008 if test $ac_cv_prog_gcc = yes; then
2009   GCC=yes
2010 else
2011   GCC=
2012 fi
2013
2014 ac_test_CFLAGS="${CFLAGS+set}"
2015 ac_save_CFLAGS="$CFLAGS"
2016 CFLAGS=
2017 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2018 echo "configure:2019: checking whether ${CC-cc} accepts -g" >&5
2019
2020 echo 'void f(){}' > conftest.c
2021 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2022   ac_cv_prog_cc_g=yes
2023 else
2024   ac_cv_prog_cc_g=no
2025 fi
2026 rm -f conftest*
2027
2028
2029 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2030 if test "$ac_test_CFLAGS" = set; then
2031   CFLAGS="$ac_save_CFLAGS"
2032 elif test $ac_cv_prog_cc_g = yes; then
2033   if test "$GCC" = yes; then
2034     CFLAGS="-g -O2"
2035   else
2036     CFLAGS="-g"
2037   fi
2038 else
2039   if test "$GCC" = yes; then
2040     CFLAGS="-O2"
2041   else
2042     CFLAGS=
2043   fi
2044 fi
2045
2046 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2047   CC=gcc
2048   # Extract the first word of "gcc", so it can be a program name with args.
2049 set dummy gcc; ac_word=$2
2050 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2051 echo "configure:2052: checking for $ac_word" >&5
2052
2053 if test -n "$CC"; then
2054   ac_cv_prog_CC="$CC" # Let the user override the test.
2055 else
2056   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2057   ac_dummy="$PATH"
2058   for ac_dir in $ac_dummy; do
2059     test -z "$ac_dir" && ac_dir=.
2060     if test -f $ac_dir/$ac_word; then
2061       ac_cv_prog_CC="gcc"
2062       break
2063     fi
2064   done
2065   IFS="$ac_save_ifs"
2066 fi
2067 CC="$ac_cv_prog_CC"
2068 if test -n "$CC"; then
2069   echo "$ac_t""$CC" 1>&6
2070 else
2071   echo "$ac_t""no" 1>&6
2072 fi
2073
2074 if test -z "$CC"; then
2075   # Extract the first word of "cc", so it can be a program name with args.
2076 set dummy cc; ac_word=$2
2077 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2078 echo "configure:2079: checking for $ac_word" >&5
2079
2080 if test -n "$CC"; then
2081   ac_cv_prog_CC="$CC" # Let the user override the test.
2082 else
2083   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2084   ac_prog_rejected=no
2085   ac_dummy="$PATH"
2086   for ac_dir in $ac_dummy; do
2087     test -z "$ac_dir" && ac_dir=.
2088     if test -f $ac_dir/$ac_word; then
2089       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2090         ac_prog_rejected=yes
2091         continue
2092       fi
2093       ac_cv_prog_CC="cc"
2094       break
2095     fi
2096   done
2097   IFS="$ac_save_ifs"
2098 if test $ac_prog_rejected = yes; then
2099   # We found a bogon in the path, so make sure we never use it.
2100   set dummy $ac_cv_prog_CC
2101   shift
2102   if test $# -gt 0; then
2103     # We chose a different compiler from the bogus one.
2104     # However, it has the same basename, so the bogon will be chosen
2105     # first if we set CC to just the basename; use the full file name.
2106     shift
2107     set dummy "$ac_dir/$ac_word" "$@"
2108     shift
2109     ac_cv_prog_CC="$@"
2110   fi
2111 fi
2112 fi
2113 CC="$ac_cv_prog_CC"
2114 if test -n "$CC"; then
2115   echo "$ac_t""$CC" 1>&6
2116 else
2117   echo "$ac_t""no" 1>&6
2118 fi
2119
2120   if test -z "$CC"; then
2121     case "`uname -s`" in
2122     *win32* | *WIN32*)
2123       # Extract the first word of "cl", so it can be a program name with args.
2124 set dummy cl; ac_word=$2
2125 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2126 echo "configure:2127: checking for $ac_word" >&5
2127
2128 if test -n "$CC"; then
2129   ac_cv_prog_CC="$CC" # Let the user override the test.
2130 else
2131   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2132   ac_dummy="$PATH"
2133   for ac_dir in $ac_dummy; do
2134     test -z "$ac_dir" && ac_dir=.
2135     if test -f $ac_dir/$ac_word; then
2136       ac_cv_prog_CC="cl"
2137       break
2138     fi
2139   done
2140   IFS="$ac_save_ifs"
2141 fi
2142 CC="$ac_cv_prog_CC"
2143 if test -n "$CC"; then
2144   echo "$ac_t""$CC" 1>&6
2145 else
2146   echo "$ac_t""no" 1>&6
2147 fi
2148  ;;
2149     esac
2150   fi
2151   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2152 fi
2153
2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2156
2157 ac_ext=c
2158 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2159 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2160 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'
2161 ac_cpp='$CPP '"$xe_cppflags"
2162 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2163 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2164 cross_compiling=no
2165
2166 cat > conftest.$ac_ext << EOF
2167
2168 #line 2169 "configure"
2169 #include "confdefs.h"
2170
2171 main(){return(0);}
2172 EOF
2173 if { (eval echo configure:2174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2174   ac_cv_prog_cc_works=yes
2175   # If we can't run a trivial program, we are probably using a cross compiler.
2176   if (./conftest; exit) 2>/dev/null; then
2177     ac_cv_prog_cc_cross=no
2178   else
2179     ac_cv_prog_cc_cross=yes
2180   fi
2181 else
2182   echo "configure: failed program was:" >&5
2183   cat conftest.$ac_ext >&5
2184   ac_cv_prog_cc_works=no
2185 fi
2186 rm -fr conftest*
2187 ac_ext=c
2188 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2189 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2190 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'
2191 ac_cpp='$CPP '"$xe_cppflags"
2192 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2193 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2194 cross_compiling=no
2195
2196 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2197 if test $ac_cv_prog_cc_works = no; then
2198   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2199 fi
2200 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2201 echo "configure:2202: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2202 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2203 cross_compiling=$ac_cv_prog_cc_cross
2204
2205 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2206 echo "configure:2207: checking whether we are using GNU C" >&5
2207
2208 cat > conftest.c <<EOF
2209 #ifdef __GNUC__
2210   yes;
2211 #endif
2212 EOF
2213 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2214: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2214   ac_cv_prog_gcc=yes
2215 else
2216   ac_cv_prog_gcc=no
2217 fi
2218
2219 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2220
2221 if test $ac_cv_prog_gcc = yes; then
2222   GCC=yes
2223 else
2224   GCC=
2225 fi
2226
2227 ac_test_CFLAGS="${CFLAGS+set}"
2228 ac_save_CFLAGS="$CFLAGS"
2229 CFLAGS=
2230 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2231 echo "configure:2232: checking whether ${CC-cc} accepts -g" >&5
2232
2233 echo 'void f(){}' > conftest.c
2234 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2235   ac_cv_prog_cc_g=yes
2236 else
2237   ac_cv_prog_cc_g=no
2238 fi
2239 rm -f conftest*
2240
2241
2242 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2243 if test "$ac_test_CFLAGS" = set; then
2244   CFLAGS="$ac_save_CFLAGS"
2245 elif test $ac_cv_prog_cc_g = yes; then
2246   if test "$GCC" = yes; then
2247     CFLAGS="-g -O2"
2248   else
2249     CFLAGS="-g"
2250   fi
2251 else
2252   if test "$GCC" = yes; then
2253     CFLAGS="-O2"
2254   else
2255     CFLAGS=
2256   fi
2257 fi
2258
2259 fi
2260 CFLAGS="$xe_save_CFLAGS"
2261
2262
2263 test -n "$CPP" -a -d "$CPP" && CPP=
2264
2265 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2266
2267 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2268 echo "configure:2269: checking how to run the C preprocessor" >&5
2269 # On Suns, sometimes $CPP names a directory.
2270 if test -n "$CPP" && test -d "$CPP"; then
2271   CPP=
2272 fi
2273 if test -z "$CPP"; then
2274
2275   # This must be in double quotes, not single quotes, because CPP may get
2276   # substituted into the Makefile and "${CC-cc}" will confuse make.
2277   CPP="${CC-cc} -E"
2278   # On the NeXT, cc -E runs the code through the compiler's parser,
2279   # not just through cpp.
2280   cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #include <assert.h>
2284 Syntax Error
2285 EOF
2286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2287 { (eval echo configure:2288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2289 if test -z "$ac_err"; then
2290   :
2291 else
2292   echo "$ac_err" >&5
2293   echo "configure: failed program was:" >&5
2294   cat conftest.$ac_ext >&5
2295   rm -rf conftest*
2296   CPP="${CC-cc} -E -traditional-cpp"
2297   cat > conftest.$ac_ext <<EOF
2298 #line 2299 "configure"
2299 #include "confdefs.h"
2300 #include <assert.h>
2301 Syntax Error
2302 EOF
2303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2304 { (eval echo configure:2305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2306 if test -z "$ac_err"; then
2307   :
2308 else
2309   echo "$ac_err" >&5
2310   echo "configure: failed program was:" >&5
2311   cat conftest.$ac_ext >&5
2312   rm -rf conftest*
2313   CPP="${CC-cc} -nologo -E"
2314   cat > conftest.$ac_ext <<EOF
2315 #line 2316 "configure"
2316 #include "confdefs.h"
2317 #include <assert.h>
2318 Syntax Error
2319 EOF
2320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2321 { (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2323 if test -z "$ac_err"; then
2324   :
2325 else
2326   echo "$ac_err" >&5
2327   echo "configure: failed program was:" >&5
2328   cat conftest.$ac_ext >&5
2329   rm -rf conftest*
2330   CPP=/lib/cpp
2331 fi
2332 rm -f conftest*
2333 fi
2334 rm -f conftest*
2335 fi
2336 rm -f conftest*
2337   ac_cv_prog_CPP="$CPP"
2338   CPP="$ac_cv_prog_CPP"
2339 else
2340   ac_cv_prog_CPP="$CPP"
2341 fi
2342 echo "$ac_t""$CPP" 1>&6
2343
2344
2345
2346 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2347 echo "configure:2348: checking for AIX" >&5
2348 cat > conftest.$ac_ext <<EOF
2349 #line 2350 "configure"
2350 #include "confdefs.h"
2351 #ifdef _AIX
2352   yes
2353 #endif
2354
2355 EOF
2356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2357   egrep "yes" >/dev/null 2>&1; then
2358   rm -rf conftest*
2359   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2360     Defining _ALL_SOURCE
2361 EOF
2362 cat >> confdefs.h <<\EOF
2363 #define _ALL_SOURCE 1
2364 EOF
2365 }
2366
2367 else
2368   rm -rf conftest*
2369   echo "$ac_t""no" 1>&6
2370 fi
2371 rm -f conftest*
2372
2373  
2374
2375 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2376 echo "configure:2377: checking for GNU libc" >&5
2377 cat > conftest.$ac_ext <<EOF
2378 #line 2379 "configure"
2379 #include "confdefs.h"
2380 #include <features.h>
2381 int main() {
2382
2383 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2384 #error Not a GNU libc system :-(
2385 ******* ======= ******** &&&&&&&&
2386 #endif
2387
2388 ; return 0; }
2389 EOF
2390 if { (eval echo configure:2391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2391   rm -rf conftest*
2392   have_glibc=yes
2393 else
2394   echo "configure: failed program was:" >&5
2395   cat conftest.$ac_ext >&5
2396   rm -rf conftest*
2397   have_glibc=no
2398 fi
2399 rm -f conftest*
2400 echo "$ac_t""$have_glibc" 1>&6
2401 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2402     Defining _GNU_SOURCE
2403 EOF
2404 cat >> confdefs.h <<\EOF
2405 #define _GNU_SOURCE 1
2406 EOF
2407 }
2408
2409
2410 case "$opsys" in
2411   sol2)
2412    { test "$extra_verbose" = "yes" && cat << \EOF
2413     Defining __EXTENSIONS__
2414 EOF
2415 cat >> confdefs.h <<\EOF
2416 #define __EXTENSIONS__ 1
2417 EOF
2418 }
2419
2420       if test "$os_release" -ge 55; then
2421      { test "$extra_verbose" = "yes" && cat << \EOF
2422     Defining _XOPEN_SOURCE = 500
2423 EOF
2424 cat >> confdefs.h <<\EOF
2425 #define _XOPEN_SOURCE 500
2426 EOF
2427 }
2428
2429      { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining _XOPEN_SOURCE_EXTENDED
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define _XOPEN_SOURCE_EXTENDED 1
2434 EOF
2435 }
2436
2437    fi ;;
2438   linux)
2439     { test "$extra_verbose" = "yes" && cat << \EOF
2440     Defining _POSIX_C_SOURCE = 199506L
2441 EOF
2442 cat >> confdefs.h <<\EOF
2443 #define _POSIX_C_SOURCE 199506L
2444 EOF
2445 }
2446
2447     { test "$extra_verbose" = "yes" && cat << \EOF
2448     Defining _XOPEN_SOURCE = 500
2449 EOF
2450 cat >> confdefs.h <<\EOF
2451 #define _XOPEN_SOURCE 500
2452 EOF
2453 }
2454
2455     { test "$extra_verbose" = "yes" && cat << \EOF
2456     Defining _XOPEN_SOURCE_EXTENDED
2457 EOF
2458 cat >> confdefs.h <<\EOF
2459 #define _XOPEN_SOURCE_EXTENDED 1
2460 EOF
2461 }
2462
2463     ;;
2464 esac
2465
2466 cat > conftest.$ac_ext <<EOF
2467 #line 2468 "configure"
2468 #include "confdefs.h"
2469 int main () {
2470 #if defined __SUNPRO_C
2471 return 11;
2472 #elif defined __DECC
2473 return 12;
2474 #elif defined __USLC__ && defined __SCO_VERSION__
2475 return 13;
2476 #else
2477 return 0;
2478 #endif
2479 }
2480 EOF
2481 if { (eval echo configure:2482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2482 then
2483   :
2484 else
2485   conftest_rc="$?"
2486   echo "configure: failed program was:" >&5
2487   cat conftest.$ac_ext >&5
2488   rm -fr conftest*
2489   case "$conftest_rc" in
2490   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2491   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2492   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2493 esac
2494 fi
2495 rm -fr conftest*
2496
2497
2498
2499
2500 echo "Extracting information from the machine- and system-dependent headers..."
2501
2502 tempcname="conftest.c"
2503
2504
2505
2506 cat > $tempcname < confdefs.h
2507 cat >> $tempcname <<EOF
2508 #define NOT_C_CODE
2509 #define C_SWITCH_SITE
2510 #define C_SWITCH_X_SITE
2511 #define LD_SWITCH_SITE
2512 #define LD_SWITCH_X_SITE
2513 #define LD_SWITCH_X_SITE_AUX
2514 #define OS_RELEASE $os_release
2515
2516 #ifdef config_opsysfile
2517 #include "$srcdir/src/$opsysfile"
2518 #endif
2519
2520 #ifdef config_machfile
2521 #include "$srcdir/src/$machfile"
2522 #endif
2523
2524 #ifndef LIBS_MACHINE
2525 #define LIBS_MACHINE
2526 #endif
2527 configure___ libs_machine=LIBS_MACHINE
2528
2529 #ifndef LIBS_SYSTEM
2530 #define LIBS_SYSTEM
2531 #endif
2532 configure___ libs_system=LIBS_SYSTEM
2533
2534 #ifndef LIBS_TERMCAP
2535 #define LIBS_TERMCAP
2536 #endif
2537 configure___ libs_termcap=LIBS_TERMCAP
2538
2539 #ifndef LIB_STANDARD
2540 #define LIB_STANDARD
2541 #endif
2542 configure___ libs_standard=LIB_STANDARD
2543
2544
2545 #ifndef OBJECTS_MACHINE
2546 #define OBJECTS_MACHINE
2547 #endif
2548 configure___ objects_machine=OBJECTS_MACHINE
2549
2550 #ifndef OBJECTS_SYSTEM
2551 #define OBJECTS_SYSTEM
2552 #endif
2553 configure___ objects_system=OBJECTS_SYSTEM
2554
2555
2556 #ifndef C_SWITCH_MACHINE
2557 #define C_SWITCH_MACHINE
2558 #endif
2559 configure___ c_switch_machine=C_SWITCH_MACHINE
2560
2561 #ifndef C_SWITCH_SYSTEM
2562 #define C_SWITCH_SYSTEM
2563 #endif
2564 configure___ c_switch_system=C_SWITCH_SYSTEM
2565
2566
2567 #ifndef LD_SWITCH_MACHINE
2568 #define LD_SWITCH_MACHINE
2569 #endif
2570 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2571
2572 #ifndef LD_SWITCH_SYSTEM
2573 #define LD_SWITCH_SYSTEM
2574 #endif
2575 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2576
2577
2578 #ifndef UNEXEC
2579 #define UNEXEC "unexec.o"
2580 #endif
2581 configure___ unexec=UNEXEC
2582
2583
2584 #ifndef LD_SWITCH_SHARED
2585 #define LD_SWITCH_SHARED "-c"
2586 #endif
2587 configure___ ld_switch_shared=LD_SWITCH_SHARED
2588
2589
2590 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2591 configure___ ordinary_ld=ORDINARY_LD
2592
2593 #ifdef ORDINARY_LINK
2594 #define LD ORDINARY_LD
2595 #else /* no ORDINARY LINK */
2596 #ifdef COFF_ENCAPSULATE
2597 #define LD "\$(CC) -nostdlib"
2598 #else /* not COFF_ENCAPSULATE */
2599 #ifdef LINKER
2600 #define LD LINKER
2601 #else /* ! defined (LINKER) */
2602 #define LD "ld"
2603 #endif /* ! defined (LINKER) */
2604 #endif /* ! defined (COFF_ENCAPSULATE) */
2605 #endif /* not ORDINARY_LINK */
2606 configure___ ld=LD
2607
2608 #ifndef LIB_GCC
2609 #define LIB_GCC
2610 #endif
2611 configure___ lib_gcc=LIB_GCC
2612
2613 #ifndef LD_TEXT_START_ADDR
2614 #define LD_TEXT_START_ADDR
2615 #endif
2616 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2617
2618
2619 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2620 #ifdef NO_REMAP
2621 #ifdef COFF_ENCAPSULATE
2622 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2623 #else /* ! defined (COFF_ENCAPSULATE) */
2624 #define START_FILES "pre-crt0.o /lib/crt0.o"
2625 #endif /* ! defined (COFF_ENCAPSULATE) */
2626 #else /* ! defined (NO_REMAP) */
2627 #define START_FILES "ecrt0.o"
2628 #endif /* ! defined (NO_REMAP) */
2629 #endif /* no ORDINARY_LINK */
2630 #ifndef START_FILES
2631 #define START_FILES
2632 #endif
2633 configure___ start_files=START_FILES
2634
2635 #ifdef ORDINARY_LINK
2636 configure___ ordinary_link=yes
2637 #else
2638 configure___ ordinary_link=no
2639 #endif
2640
2641 #ifdef SYSTEM_MALLOC
2642 configure___ system_malloc=yes
2643 #else
2644 configure___ system_malloc=no
2645 #endif
2646
2647 #ifdef TERMINFO
2648 configure___ have_terminfo=yes
2649 #else
2650 configure___ have_terminfo=no
2651 #endif
2652
2653 #ifdef MAIL_USE_FLOCK
2654 configure___ mail_use_flock=yes
2655 #else
2656 configure___ mail_use_flock=no
2657 #endif
2658
2659 #ifdef MAIL_USE_LOCKF
2660 configure___ mail_use_lockf=yes
2661 #else
2662 configure___ mail_use_lockf=no
2663 #endif
2664
2665 #ifdef MAIL_USE_LOCKING
2666 configure___ mail_use_locking=yes
2667 #else
2668 configure___ mail_use_locking=no
2669 #endif
2670
2671 #ifdef HAVE_WIN32_PROCESSES
2672 configure___ win32_processes=yes
2673 #else
2674 configure___ win32_processes=no
2675 #endif
2676
2677 EOF
2678
2679 CPP=`eval "echo $CPP $CPPFLAGS"`
2680 eval `$CPP -Isrc $tempcname \
2681         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2682
2683 rm $tempcname
2684
2685 if test "$pdump" = "yes"; then
2686   ordinary_link="yes"
2687   ld="${ordinary_ld}"
2688   start_files=
2689   libs_standard=
2690   unexec=
2691   lib_gcc=
2692 fi
2693
2694 test "$extra_verbose" = "yes" && \
2695   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 ""
2696
2697 case "$opsys" in mingw* | cygwin*)
2698   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2699   cygwin_include=`eval "dirname $cygwin_include"` ;
2700   cygwin_include="-I$cygwin_include/../include" ;
2701   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2702   case "$opsys" in mingw*)
2703     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2704   esac
2705   ;;
2706 esac
2707
2708 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2709
2710
2711 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2712
2713 if test "$__USLC__" = yes; then
2714   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2715 echo "configure:2716: checking for whether the -Kalloca compiler flag is needed" >&5
2716   need_kalloca=no
2717   cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720
2721 int main() {
2722 void *x = alloca(4);
2723 ; return 0; }
2724 EOF
2725 if { (eval echo configure:2726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2726   rm -rf conftest*
2727   :
2728 else
2729   echo "configure: failed program was:" >&5
2730   cat conftest.$ac_ext >&5
2731   rm -rf conftest*
2732   
2733     xe_save_c_switch_system="$c_switch_system"
2734     c_switch_system="$c_switch_system -Kalloca"
2735     cat > conftest.$ac_ext <<EOF
2736 #line 2737 "configure"
2737 #include "confdefs.h"
2738
2739 int main() {
2740 void *x = alloca(4);
2741 ; return 0; }
2742 EOF
2743 if { (eval echo configure:2744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744   rm -rf conftest*
2745    need_kalloca=yes 
2746 else
2747   echo "configure: failed program was:" >&5
2748   cat conftest.$ac_ext >&5
2749 fi
2750 rm -f conftest*
2751     c_switch_system="$xe_save_c_switch_system"
2752 fi
2753 rm -f conftest*
2754   echo "$ac_t""$need_kalloca" 1>&6
2755   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
2756 fi
2757
2758 if test "$cflags_specified" = "no"; then
2759       if   test "$GCC" = "yes"; then
2760     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2761         CFLAGS="$CFLAGS -Wsign-compare"
2762             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2763               elif test "$__SUNPRO_C" = "yes"; then
2764     case "$opsys" in
2765       sol2    ) CFLAGS="-v -xO4" ;;
2766       sunos4* ) CFLAGS="-xO2";;
2767     esac
2768   elif test "$__DECC" = "yes"; then
2769     CFLAGS="-O3"
2770   elif test "$CC" = "xlc"; then
2771     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2772     else
2773     CFLAGS="-O" ;  fi
2774 fi
2775
2776 if test "$GCC" = "yes"; then
2777 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2778 echo "configure:2779: checking for buggy gcc versions" >&5
2779 GCC_VERSION=`$CC --version`
2780 case `uname -s`:`uname -m`:$GCC_VERSION in
2781                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2782                         case "$CFLAGS" in
2783             *-O2*|*-O3*)
2784                 case "$CFLAGS" in
2785                     *-fno-schedule-insns*) ;;
2786                     *)
2787                         echo "$ac_t""yes" 1>&6
2788                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2789                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2790                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2791                         ;;
2792                 esac
2793                 ;;
2794         esac
2795         ;;
2796                     Linux:alpha:egcs-2.91.*)
2797         echo "$ac_t""yes" 1>&6
2798         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2799         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2800         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2801         ;;
2802     *:i*86*:2.7.2*)
2803         case "$CFLAGS" in
2804             *-O2*|*-O3*)
2805                 case "$GCC_VERSION" in
2806                     2.7.2)
2807                         case "$CFLAGS" in
2808                             *-fno-strength-reduce*) ;;
2809                             *)
2810                                 echo "$ac_t""yes" 1>&6
2811                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2812                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2813                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2814                                 ;;
2815                         esac
2816                         ;;
2817                 esac
2818                 case "$CFLAGS" in
2819                  *-fno-caller-saves*) ;;
2820                  *)
2821                     echo "$ac_t""yes" 1>&6
2822                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2823                     echo "configure: warning: -fno-caller-saves." 1>&2
2824                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2825                     ;;
2826                 esac
2827                 ;;
2828         esac
2829         ;;
2830 esac
2831 echo "$ac_t""no" 1>&6
2832 fi
2833
2834
2835 if test "$GCC" = "yes"; then
2836   set x $ld_switch_system; shift; ld_switch_system=""
2837   while test -n "$1"; do
2838     case $1 in
2839       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2840       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2841       -Xlinker* ) ;;
2842       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2843     esac
2844     shift
2845   done
2846 fi
2847
2848 if test "$GCC" = "yes"; then
2849   set x $ld_switch_machine; shift; ld_switch_machine=""
2850   while test -n "$1"; do
2851     case $1 in
2852       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2853       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2854       -Xlinker* ) ;;
2855       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2856     esac
2857     shift
2858   done
2859 fi
2860
2861 if test "$GCC" = "yes"; then
2862   set x $LDFLAGS; shift; LDFLAGS=""
2863   while test -n "$1"; do
2864     case $1 in
2865       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2866       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2867       -Xlinker* ) ;;
2868       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2869     esac
2870     shift
2871   done
2872 fi
2873
2874 if test "$GCC" = "yes"; then
2875   set x $ld_call_shared; shift; ld_call_shared=""
2876   while test -n "$1"; do
2877     case $1 in
2878       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2879       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2880       -Xlinker* ) ;;
2881       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2882     esac
2883     shift
2884   done
2885 fi
2886
2887 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2888    echo "    xemacs will be linked with \"$objects_machine\""
2889  fi
2890 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"$objects_system\""
2892  fi
2893 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2894    echo "    xemacs will be linked with \"$unexec\""
2895  fi
2896 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"dumper.o\""
2898  fi
2899
2900 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2901 echo "configure:2902: checking for dynodump" >&5
2902 if test "$unexec" != "unexsol2.o"; then
2903   echo "$ac_t""no" 1>&6
2904 else
2905   echo "$ac_t""yes" 1>&6
2906   { test "$extra_verbose" = "yes" && cat << \EOF
2907     Defining DYNODUMP
2908 EOF
2909 cat >> confdefs.h <<\EOF
2910 #define DYNODUMP 1
2911 EOF
2912 }
2913
2914   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2915   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2916   case "$machine" in
2917     sparc   ) dynodump_arch=sparc ;;
2918     *86*    ) dynodump_arch=i386  ;;
2919     powerpc ) dynodump_arch=ppc   ;;
2920   esac
2921     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
2922 fi
2923
2924
2925 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2926
2927 if test "$unexec" = "unexaix.o"; then
2928   if   test "$dynamic" = "no"; then
2929   start_flags="-Wl,-bnso,-bnodelcsect"
2930   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2931   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2932     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2933   done
2934   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2935     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2936   done
2937   
2938 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2939 echo "configure:2940: checking for terminateAndUnload in -lC" >&5
2940 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2941
2942 xe_check_libs=" -lC "
2943 cat > conftest.$ac_ext <<EOF
2944 #line 2945 "configure"
2945 #include "confdefs.h"
2946 /* Override any gcc2 internal prototype to avoid an error.  */
2947 /* We use char because int might match the return type of a gcc2
2948     builtin and then its argument prototype would still apply.  */
2949 char terminateAndUnload();
2950
2951 int main() {
2952 terminateAndUnload()
2953 ; return 0; }
2954 EOF
2955 if { (eval echo configure:2956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2956   rm -rf conftest*
2957   eval "ac_cv_lib_$ac_lib_var=yes"
2958 else
2959   echo "configure: failed program was:" >&5
2960   cat conftest.$ac_ext >&5
2961   rm -rf conftest*
2962   eval "ac_cv_lib_$ac_lib_var=no"
2963 fi
2964 rm -f conftest*
2965 xe_check_libs=""
2966
2967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2968   echo "$ac_t""yes" 1>&6
2969   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973
2974
2975   fi
2976 elif test -n "$ld_text_start_addr"; then
2977   start_flags="-T $ld_text_start_addr -e __start"
2978 fi
2979
2980
2981
2982
2983 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2984  test -z "$linker" &&  linker='$(CC) -nostdlib'
2985  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2986 fi
2987 test "$GCC" != "yes" && lib_gcc=
2988
2989
2990
2991
2992
2993 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2994 if test -n "$site_libraries"; then
2995   for arg in $site_libraries; do
2996     case "$arg" in
2997      -* ) ;;
2998      * ) test -d "$arg" || \
2999            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3000        arg="-L${arg}" ;;
3001     esac
3002     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3003   done
3004 fi
3005
3006 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3007 if test -n "$site_includes"; then
3008   for arg in $site_includes; do
3009     case "$arg" in
3010       -* ) ;;
3011       * ) test -d "$arg" || \
3012            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3013       arg="-I${arg}" ;;
3014     esac
3015     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3016   done
3017 fi
3018
3019 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3020 if test -n "$site_prefixes"; then
3021   for dir in $site_prefixes; do
3022     lib_dir="${dir}/lib"
3023     inc_dir="${dir}/include"
3024     if test ! -d "$dir"; then
3025       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3026     elif test ! -d "$lib_dir"; then
3027       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3028     else
3029       if test -d "$inc_dir"; then
3030         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
3031       fi
3032       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
3033     fi
3034   done
3035 fi
3036
3037
3038 for dir in "/usr/ccs/lib"; do
3039   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
3040 done
3041
3042 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3043 if test -n "$site_runtime_libraries"; then
3044   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3045   export LD_RUN_PATH
3046 fi
3047
3048
3049
3050
3051
3052 if test -n "$add_runtime_path"; then :;
3053 elif test "$dynamic" = "no"; then add_runtime_path=no
3054 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3055 else case "$opsys" in
3056        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3057        * ) add_runtime_path=no ;;
3058      esac
3059 fi
3060
3061 if test "$add_runtime_path" = "yes"; then
3062       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3063 echo "configure:3064: checking "for runtime libraries flag"" >&5
3064   case "$opsys" in
3065     sol2 ) dash_r="-R" ;;
3066     decosf* | linux* | irix*) dash_r="-rpath " ;;
3067     *)
3068       dash_r=""
3069       for try_dash_r in "-R" "-R " "-rpath "; do
3070         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3071         
3072 if test "$GCC" = "yes"; then
3073   set x $xe_check_libs; shift; xe_check_libs=""
3074   while test -n "$1"; do
3075     case $1 in
3076       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3077       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3078       -Xlinker* ) ;;
3079       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3080     esac
3081     shift
3082   done
3083 fi
3084         cat > conftest.$ac_ext <<EOF
3085 #line 3086 "configure"
3086 #include "confdefs.h"
3087
3088 int main() {
3089
3090 ; return 0; }
3091 EOF
3092 if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3093   rm -rf conftest*
3094   dash_r="$try_dash_r"
3095 else
3096   echo "configure: failed program was:" >&5
3097   cat conftest.$ac_ext >&5
3098 fi
3099 rm -f conftest*
3100         xe_check_libs=""
3101         test -n "$dash_r" && break
3102       done ;;
3103   esac
3104   if test -n "$dash_r";
3105     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3106     else echo "$ac_t""NONE" 1>&6
3107   fi
3108 fi
3109
3110 xe_add_unique_runpath_dir='
3111   xe_add_p=yes
3112   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3113   done
3114   if test "$xe_add_p" = "yes"; then
3115     test -n "$runpath" && runpath="${runpath}:"
3116     runpath="${runpath}${xe_runpath_dir}"
3117     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3118   fi'
3119
3120
3121
3122
3123 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3124     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3125   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3126   
3127         runpath="" runpath_dirs=""
3128   if test -n "$LD_RUN_PATH"; then
3129     runpath="$LD_RUN_PATH"
3130   elif test "$GCC" = "yes"; then
3131         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3132     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3133     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3134     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3135       case "$arg" in P,* | -L* | -R* )
3136         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3137           {
3138 xe_runpath_dir="$dir"
3139   test "$xe_runpath_dir" != "/lib"     -a \
3140         "$xe_runpath_dir" != "/usr/lib" -a \
3141         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3142   eval "$xe_add_unique_runpath_dir"
3143 }
3144         done ;;
3145       esac
3146     done
3147     ld_switch_run="$ld_switch_run_save"
3148     rm -f conftest*
3149   else
3150         for arg in $ld_switch_site $ld_switch_x_site; do
3151       case "$arg" in -L*) {
3152 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3153   test "$xe_runpath_dir" != "/lib"     -a \
3154         "$xe_runpath_dir" != "/usr/lib" -a \
3155         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3156   eval "$xe_add_unique_runpath_dir"
3157 };; esac
3158     done
3159         if test "$opsys $need_motif" = "sol2 yes"; then
3160       xe_runpath_dir="/opt/SUNWdt/lib";
3161       eval "$xe_add_unique_runpath_dir";
3162     fi
3163   fi 
3164   if test -n "$runpath"; then
3165     ld_switch_run="${dash_r}${runpath}"
3166     
3167 if test "$GCC" = "yes"; then
3168   set x $ld_switch_run; shift; ld_switch_run=""
3169   while test -n "$1"; do
3170     case $1 in
3171       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3172       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3173       -Xlinker* ) ;;
3174       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3175     esac
3176     shift
3177   done
3178 fi
3179     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3180   fi
3181 fi
3182
3183
3184
3185 GNU_MALLOC=yes
3186 if test "$with_dlmalloc" != "no"; then
3187         doug_lea_malloc=yes
3188 else
3189         doug_lea_malloc=no
3190 fi
3191 after_morecore_hook_exists=yes
3192 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3193 echo "configure:3194: checking for malloc_set_state" >&5
3194
3195 cat > conftest.$ac_ext <<EOF
3196 #line 3197 "configure"
3197 #include "confdefs.h"
3198 /* System header to define __stub macros and hopefully few prototypes,
3199     which can conflict with char malloc_set_state(); below.  */
3200 #include <assert.h>
3201 /* Override any gcc2 internal prototype to avoid an error.  */
3202 /* We use char because int might match the return type of a gcc2
3203     builtin and then its argument prototype would still apply.  */
3204 char malloc_set_state();
3205
3206 int main() {
3207
3208 /* The GNU C library defines this for functions which it implements
3209     to always fail with ENOSYS.  Some functions are actually named
3210     something starting with __ and the normal name is an alias.  */
3211 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3212 choke me
3213 #else
3214 malloc_set_state();
3215 #endif
3216
3217 ; return 0; }
3218 EOF
3219 if { (eval echo configure:3220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3220   rm -rf conftest*
3221   eval "ac_cv_func_malloc_set_state=yes"
3222 else
3223   echo "configure: failed program was:" >&5
3224   cat conftest.$ac_ext >&5
3225   rm -rf conftest*
3226   eval "ac_cv_func_malloc_set_state=no"
3227 fi
3228 rm -f conftest*
3229
3230 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3231   echo "$ac_t""yes" 1>&6
3232   :
3233 else
3234   echo "$ac_t""no" 1>&6
3235 doug_lea_malloc=no
3236 fi
3237
3238 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3239 echo "configure:3240: checking whether __after_morecore_hook exists" >&5
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 extern void (* __after_morecore_hook)();
3244 int main() {
3245 __after_morecore_hook = 0
3246 ; return 0; }
3247 EOF
3248 if { (eval echo configure:3249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3249   rm -rf conftest*
3250   echo "$ac_t""yes" 1>&6
3251 else
3252   echo "configure: failed program was:" >&5
3253   cat conftest.$ac_ext >&5
3254   rm -rf conftest*
3255   echo "$ac_t""no" 1>&6
3256    after_morecore_hook_exists=no
3257 fi
3258 rm -f conftest*
3259 if test "$system_malloc" = "yes" ; then
3260   GNU_MALLOC=no
3261   GNU_MALLOC_reason="
3262     - The GNU allocators don't work with this system configuration."
3263 elif test "$with_system_malloc" = "yes" ; then
3264   GNU_MALLOC=no
3265   GNU_MALLOC_reason="
3266     - User chose not to use GNU allocators."
3267 elif test "$with_debug_malloc" = "yes" ; then
3268   GNU_MALLOC=no
3269   GNU_MALLOC_reason="
3270     - User chose to use Debugging Malloc."
3271 fi
3272
3273 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3274   GNU_MALLOC_reason="
3275     - Using Doug Lea's new malloc from the GNU C Library."
3276   { test "$extra_verbose" = "yes" && cat << \EOF
3277     Defining DOUG_LEA_MALLOC
3278 EOF
3279 cat >> confdefs.h <<\EOF
3280 #define DOUG_LEA_MALLOC 1
3281 EOF
3282 }
3283
3284   if test "$after_morecore_hook_exists" = "no" ; then
3285     GNU_MALLOC_reason="
3286     - Using Doug Lea's new malloc from the Linux C Library."
3287     { test "$extra_verbose" = "yes" && cat << \EOF
3288     Defining _NO_MALLOC_WARNING_
3289 EOF
3290 cat >> confdefs.h <<\EOF
3291 #define _NO_MALLOC_WARNING_ 1
3292 EOF
3293 }
3294
3295   fi
3296 fi
3297
3298
3299
3300
3301 # Extract the first word of "ranlib", so it can be a program name with args.
3302 set dummy ranlib; ac_word=$2
3303 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3304 echo "configure:3305: checking for $ac_word" >&5
3305
3306 if test -n "$RANLIB"; then
3307   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3308 else
3309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3310   ac_dummy="$PATH"
3311   for ac_dir in $ac_dummy; do
3312     test -z "$ac_dir" && ac_dir=.
3313     if test -f $ac_dir/$ac_word; then
3314       ac_cv_prog_RANLIB="ranlib"
3315       break
3316     fi
3317   done
3318   IFS="$ac_save_ifs"
3319   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3320 fi
3321 RANLIB="$ac_cv_prog_RANLIB"
3322 if test -n "$RANLIB"; then
3323   echo "$ac_t""$RANLIB" 1>&6
3324 else
3325   echo "$ac_t""no" 1>&6
3326 fi
3327
3328 ac_aux_dir=
3329 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3330   if test -f $ac_dir/install-sh; then
3331     ac_aux_dir=$ac_dir
3332     ac_install_sh="$ac_aux_dir/install-sh -c"
3333     break
3334   elif test -f $ac_dir/install.sh; then
3335     ac_aux_dir=$ac_dir
3336     ac_install_sh="$ac_aux_dir/install.sh -c"
3337     break
3338   fi
3339 done
3340 if test -z "$ac_aux_dir"; then
3341   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3342 fi
3343 ac_config_guess=$ac_aux_dir/config.guess
3344 ac_config_sub=$ac_aux_dir/config.sub
3345 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3346
3347 # Find a good install program.  We prefer a C program (faster),
3348 # so one script is as good as another.  But avoid the broken or
3349 # incompatible versions:
3350 # SysV /etc/install, /usr/sbin/install
3351 # SunOS /usr/etc/install
3352 # IRIX /sbin/install
3353 # AIX /bin/install
3354 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3355 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3356 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3357 # ./install, which can be erroneously created by make from ./install.sh.
3358 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3359 echo "configure:3360: checking for a BSD compatible install" >&5
3360 if test -z "$INSTALL"; then
3361
3362   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3363   for ac_dir in $PATH; do
3364     # Account for people who put trailing slashes in PATH elements.
3365     case "$ac_dir/" in
3366     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3367     *)
3368       # OSF1 and SCO ODT 3.0 have their own names for install.
3369       # Don't use installbsd from OSF since it installs stuff as root
3370       # by default.
3371       for ac_prog in ginstall scoinst install; do
3372         if test -f $ac_dir/$ac_prog; then
3373           if test $ac_prog = install &&
3374             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3375             # AIX install.  It has an incompatible calling convention.
3376             :
3377           else
3378             ac_cv_path_install="$ac_dir/$ac_prog -c"
3379             break 2
3380           fi
3381         fi
3382       done
3383       ;;
3384     esac
3385   done
3386   IFS="$ac_save_IFS"
3387
3388   if test "${ac_cv_path_install+set}" = set; then
3389     INSTALL="$ac_cv_path_install"
3390   else
3391     # As a last resort, use the slow shell script.  We don't cache a
3392     # path for INSTALL within a source directory, because that will
3393     # break other packages using the cache if that directory is
3394     # removed, or if the path is relative.
3395     INSTALL="$ac_install_sh"
3396   fi
3397 fi
3398 echo "$ac_t""$INSTALL" 1>&6
3399
3400 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3401 # It thinks the first close brace ends the variable substitution.
3402 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3403
3404 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3405
3406 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3407
3408 for ac_prog in 'bison -y' byacc
3409 do
3410 # Extract the first word of "$ac_prog", so it can be a program name with args.
3411 set dummy $ac_prog; ac_word=$2
3412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3413 echo "configure:3414: checking for $ac_word" >&5
3414
3415 if test -n "$YACC"; then
3416   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3417 else
3418   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3419   ac_dummy="$PATH"
3420   for ac_dir in $ac_dummy; do
3421     test -z "$ac_dir" && ac_dir=.
3422     if test -f $ac_dir/$ac_word; then
3423       ac_cv_prog_YACC="$ac_prog"
3424       break
3425     fi
3426   done
3427   IFS="$ac_save_ifs"
3428 fi
3429 YACC="$ac_cv_prog_YACC"
3430 if test -n "$YACC"; then
3431   echo "$ac_t""$YACC" 1>&6
3432 else
3433   echo "$ac_t""no" 1>&6
3434 fi
3435
3436 test -n "$YACC" && break
3437 done
3438 test -n "$YACC" || YACC="yacc"
3439
3440
3441 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 
3442 do
3443 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3444 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3445 echo "configure:3446: checking for $ac_hdr" >&5
3446
3447 cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 #include <$ac_hdr>
3451 EOF
3452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3453 { (eval echo configure:3454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3455 if test -z "$ac_err"; then
3456   rm -rf conftest*
3457   eval "ac_cv_header_$ac_safe=yes"
3458 else
3459   echo "$ac_err" >&5
3460   echo "configure: failed program was:" >&5
3461   cat conftest.$ac_ext >&5
3462   rm -rf conftest*
3463   eval "ac_cv_header_$ac_safe=no"
3464 fi
3465 rm -f conftest*
3466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3467   echo "$ac_t""yes" 1>&6
3468     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3469   { test "$extra_verbose" = "yes" && cat << EOF
3470     Defining $ac_tr_hdr
3471 EOF
3472 cat >> confdefs.h <<EOF
3473 #define $ac_tr_hdr 1
3474 EOF
3475 }
3476  
3477 else
3478   echo "$ac_t""no" 1>&6
3479 fi
3480 done
3481
3482 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3483 echo "configure:3484: checking for sys/wait.h that is POSIX.1 compatible" >&5
3484
3485 cat > conftest.$ac_ext <<EOF
3486 #line 3487 "configure"
3487 #include "confdefs.h"
3488 #include <sys/types.h>
3489 #include <sys/wait.h>
3490 #ifndef WEXITSTATUS
3491 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3492 #endif
3493 #ifndef WIFEXITED
3494 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3495 #endif
3496 int main() {
3497 int s;
3498 wait (&s);
3499 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3500 ; return 0; }
3501 EOF
3502 if { (eval echo configure:3503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3503   rm -rf conftest*
3504   ac_cv_header_sys_wait_h=yes
3505 else
3506   echo "configure: failed program was:" >&5
3507   cat conftest.$ac_ext >&5
3508   rm -rf conftest*
3509   ac_cv_header_sys_wait_h=no
3510 fi
3511 rm -f conftest*
3512
3513 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3514 if test $ac_cv_header_sys_wait_h = yes; then
3515   { test "$extra_verbose" = "yes" && cat << \EOF
3516     Defining HAVE_SYS_WAIT_H
3517 EOF
3518 cat >> confdefs.h <<\EOF
3519 #define HAVE_SYS_WAIT_H 1
3520 EOF
3521 }
3522
3523 fi
3524
3525 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3526 echo "configure:3527: checking for ANSI C header files" >&5
3527
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <stdlib.h>
3532 #include <stdarg.h>
3533 #include <string.h>
3534 #include <float.h>
3535 EOF
3536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3537 { (eval echo configure:3538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3539 if test -z "$ac_err"; then
3540   rm -rf conftest*
3541   ac_cv_header_stdc=yes
3542 else
3543   echo "$ac_err" >&5
3544   echo "configure: failed program was:" >&5
3545   cat conftest.$ac_ext >&5
3546   rm -rf conftest*
3547   ac_cv_header_stdc=no
3548 fi
3549 rm -f conftest*
3550
3551 if test $ac_cv_header_stdc = yes; then
3552   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3553 cat > conftest.$ac_ext <<EOF
3554 #line 3555 "configure"
3555 #include "confdefs.h"
3556 #include <string.h>
3557 EOF
3558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3559   egrep "memchr" >/dev/null 2>&1; then
3560   :
3561 else
3562   rm -rf conftest*
3563   ac_cv_header_stdc=no
3564 fi
3565 rm -f conftest*
3566
3567 fi
3568
3569 if test $ac_cv_header_stdc = yes; then
3570   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3571 cat > conftest.$ac_ext <<EOF
3572 #line 3573 "configure"
3573 #include "confdefs.h"
3574 #include <stdlib.h>
3575 EOF
3576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3577   egrep "free" >/dev/null 2>&1; then
3578   :
3579 else
3580   rm -rf conftest*
3581   ac_cv_header_stdc=no
3582 fi
3583 rm -f conftest*
3584
3585 fi
3586
3587 if test $ac_cv_header_stdc = yes; then
3588   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3589 cat > conftest.$ac_ext <<EOF
3590 #line 3591 "configure"
3591 #include "confdefs.h"
3592 #include <ctype.h>
3593 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3594 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3595 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3596 int main () { int i; for (i = 0; i < 256; i++)
3597 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3598 exit (0); }
3599
3600 EOF
3601 if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3602 then
3603   :
3604 else
3605   conftest_rc="$?"
3606   echo "configure: failed program was:" >&5
3607   cat conftest.$ac_ext >&5
3608   rm -fr conftest*
3609   ac_cv_header_stdc=no
3610 fi
3611 rm -fr conftest*
3612 fi
3613
3614 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3615 if test $ac_cv_header_stdc = yes; then
3616   { test "$extra_verbose" = "yes" && cat << \EOF
3617     Defining STDC_HEADERS
3618 EOF
3619 cat >> confdefs.h <<\EOF
3620 #define STDC_HEADERS 1
3621 EOF
3622 }
3623
3624 fi
3625
3626 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3627 echo "configure:3628: checking whether time.h and sys/time.h may both be included" >&5
3628
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #include <sys/types.h>
3633 #include <sys/time.h>
3634 #include <time.h>
3635 int main() {
3636 struct tm *tp;
3637 ; return 0; }
3638 EOF
3639 if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3640   rm -rf conftest*
3641   ac_cv_header_time=yes
3642 else
3643   echo "configure: failed program was:" >&5
3644   cat conftest.$ac_ext >&5
3645   rm -rf conftest*
3646   ac_cv_header_time=no
3647 fi
3648 rm -f conftest*
3649
3650 echo "$ac_t""$ac_cv_header_time" 1>&6
3651 if test $ac_cv_header_time = yes; then
3652   { test "$extra_verbose" = "yes" && cat << \EOF
3653     Defining TIME_WITH_SYS_TIME
3654 EOF
3655 cat >> confdefs.h <<\EOF
3656 #define TIME_WITH_SYS_TIME 1
3657 EOF
3658 }
3659
3660 fi
3661
3662 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3663 echo "configure:3664: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3664
3665 cat > conftest.$ac_ext <<EOF
3666 #line 3667 "configure"
3667 #include "confdefs.h"
3668 #include <sys/types.h>
3669 #include <signal.h>
3670 /* NetBSD declares sys_siglist in unistd.h.  */
3671 #ifdef HAVE_UNISTD_H
3672 #include <unistd.h>
3673 #endif
3674 int main() {
3675 char *msg = *(sys_siglist + 1);
3676 ; return 0; }
3677 EOF
3678 if { (eval echo configure:3679: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3679   rm -rf conftest*
3680   ac_cv_decl_sys_siglist=yes
3681 else
3682   echo "configure: failed program was:" >&5
3683   cat conftest.$ac_ext >&5
3684   rm -rf conftest*
3685   ac_cv_decl_sys_siglist=no
3686 fi
3687 rm -f conftest*
3688
3689 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3690 if test $ac_cv_decl_sys_siglist = yes; then
3691   { test "$extra_verbose" = "yes" && cat << \EOF
3692     Defining SYS_SIGLIST_DECLARED
3693 EOF
3694 cat >> confdefs.h <<\EOF
3695 #define SYS_SIGLIST_DECLARED 1
3696 EOF
3697 }
3698
3699 fi
3700
3701
3702
3703 echo $ac_n "checking for utime""... $ac_c" 1>&6
3704 echo "configure:3705: checking for utime" >&5
3705 cat > conftest.$ac_ext <<EOF
3706 #line 3707 "configure"
3707 #include "confdefs.h"
3708 #include <sys/types.h>
3709 #include <utime.h>
3710 int main() {
3711 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3712 ; return 0; }
3713 EOF
3714 if { (eval echo configure:3715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3715   rm -rf conftest*
3716   echo "$ac_t""yes" 1>&6
3717    { test "$extra_verbose" = "yes" && cat << \EOF
3718     Defining HAVE_UTIME
3719 EOF
3720 cat >> confdefs.h <<\EOF
3721 #define HAVE_UTIME 1
3722 EOF
3723 }
3724
3725 else
3726   echo "configure: failed program was:" >&5
3727   cat conftest.$ac_ext >&5
3728   rm -rf conftest*
3729   echo "$ac_t""no" 1>&6
3730       for ac_func in utimes
3731 do
3732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3733 echo "configure:3734: checking for $ac_func" >&5
3734
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3738 /* System header to define __stub macros and hopefully few prototypes,
3739     which can conflict with char $ac_func(); below.  */
3740 #include <assert.h>
3741 /* Override any gcc2 internal prototype to avoid an error.  */
3742 /* We use char because int might match the return type of a gcc2
3743     builtin and then its argument prototype would still apply.  */
3744 char $ac_func();
3745
3746 int main() {
3747
3748 /* The GNU C library defines this for functions which it implements
3749     to always fail with ENOSYS.  Some functions are actually named
3750     something starting with __ and the normal name is an alias.  */
3751 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3752 choke me
3753 #else
3754 $ac_func();
3755 #endif
3756
3757 ; return 0; }
3758 EOF
3759 if { (eval echo configure:3760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3760   rm -rf conftest*
3761   eval "ac_cv_func_$ac_func=yes"
3762 else
3763   echo "configure: failed program was:" >&5
3764   cat conftest.$ac_ext >&5
3765   rm -rf conftest*
3766   eval "ac_cv_func_$ac_func=no"
3767 fi
3768 rm -f conftest*
3769
3770 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3771   echo "$ac_t""yes" 1>&6
3772     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3773   { test "$extra_verbose" = "yes" && cat << EOF
3774     Defining $ac_tr_func
3775 EOF
3776 cat >> confdefs.h <<EOF
3777 #define $ac_tr_func 1
3778 EOF
3779 }
3780  
3781 else
3782   echo "$ac_t""no" 1>&6
3783 fi
3784 done
3785
3786 fi
3787 rm -f conftest*
3788
3789
3790 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3791 echo "configure:3792: checking return type of signal handlers" >&5
3792
3793 cat > conftest.$ac_ext <<EOF
3794 #line 3795 "configure"
3795 #include "confdefs.h"
3796 #include <sys/types.h>
3797 #include <signal.h>
3798 #ifdef signal
3799 #undef signal
3800 #endif
3801 #ifdef __cplusplus
3802 extern "C" void (*signal (int, void (*)(int)))(int);
3803 #else
3804 void (*signal ()) ();
3805 #endif
3806
3807 int main() {
3808 int i;
3809 ; return 0; }
3810 EOF
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   rm -rf conftest*
3813   ac_cv_type_signal=void
3814 else
3815   echo "configure: failed program was:" >&5
3816   cat conftest.$ac_ext >&5
3817   rm -rf conftest*
3818   ac_cv_type_signal=int
3819 fi
3820 rm -f conftest*
3821
3822 echo "$ac_t""$ac_cv_type_signal" 1>&6
3823 { test "$extra_verbose" = "yes" && cat << EOF
3824     Defining RETSIGTYPE = $ac_cv_type_signal
3825 EOF
3826 cat >> confdefs.h <<EOF
3827 #define RETSIGTYPE $ac_cv_type_signal
3828 EOF
3829 }
3830
3831
3832 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3833 echo "configure:3834: checking for size_t" >&5
3834
3835 cat > conftest.$ac_ext <<EOF
3836 #line 3837 "configure"
3837 #include "confdefs.h"
3838 #include <sys/types.h>
3839 #if STDC_HEADERS
3840 #include <stdlib.h>
3841 #include <stddef.h>
3842 #endif
3843 EOF
3844 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3845   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3846   rm -rf conftest*
3847   ac_cv_type_size_t=yes
3848 else
3849   rm -rf conftest*
3850   ac_cv_type_size_t=no
3851 fi
3852 rm -f conftest*
3853
3854 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3855 if test $ac_cv_type_size_t = no; then
3856   { test "$extra_verbose" = "yes" && cat << \EOF
3857     Defining size_t = unsigned
3858 EOF
3859 cat >> confdefs.h <<\EOF
3860 #define size_t unsigned
3861 EOF
3862 }
3863
3864 fi
3865
3866 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3867 echo "configure:3868: checking for pid_t" >&5
3868
3869 cat > conftest.$ac_ext <<EOF
3870 #line 3871 "configure"
3871 #include "confdefs.h"
3872 #include <sys/types.h>
3873 #if STDC_HEADERS
3874 #include <stdlib.h>
3875 #include <stddef.h>
3876 #endif
3877 EOF
3878 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3879   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3880   rm -rf conftest*
3881   ac_cv_type_pid_t=yes
3882 else
3883   rm -rf conftest*
3884   ac_cv_type_pid_t=no
3885 fi
3886 rm -f conftest*
3887
3888 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3889 if test $ac_cv_type_pid_t = no; then
3890   { test "$extra_verbose" = "yes" && cat << \EOF
3891     Defining pid_t = int
3892 EOF
3893 cat >> confdefs.h <<\EOF
3894 #define pid_t int
3895 EOF
3896 }
3897
3898 fi
3899
3900 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3901 echo "configure:3902: checking for uid_t in sys/types.h" >&5
3902
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3906 #include <sys/types.h>
3907 EOF
3908 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3909   egrep "uid_t" >/dev/null 2>&1; then
3910   rm -rf conftest*
3911   ac_cv_type_uid_t=yes
3912 else
3913   rm -rf conftest*
3914   ac_cv_type_uid_t=no
3915 fi
3916 rm -f conftest*
3917
3918
3919 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3920 if test $ac_cv_type_uid_t = no; then
3921   { test "$extra_verbose" = "yes" && cat << \EOF
3922     Defining uid_t = int
3923 EOF
3924 cat >> confdefs.h <<\EOF
3925 #define uid_t int
3926 EOF
3927 }
3928
3929   { test "$extra_verbose" = "yes" && cat << \EOF
3930     Defining gid_t = int
3931 EOF
3932 cat >> confdefs.h <<\EOF
3933 #define gid_t int
3934 EOF
3935 }
3936
3937 fi
3938
3939 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3940 echo "configure:3941: checking for mode_t" >&5
3941
3942 cat > conftest.$ac_ext <<EOF
3943 #line 3944 "configure"
3944 #include "confdefs.h"
3945 #include <sys/types.h>
3946 #if STDC_HEADERS
3947 #include <stdlib.h>
3948 #include <stddef.h>
3949 #endif
3950 EOF
3951 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3952   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3953   rm -rf conftest*
3954   ac_cv_type_mode_t=yes
3955 else
3956   rm -rf conftest*
3957   ac_cv_type_mode_t=no
3958 fi
3959 rm -f conftest*
3960
3961 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3962 if test $ac_cv_type_mode_t = no; then
3963   { test "$extra_verbose" = "yes" && cat << \EOF
3964     Defining mode_t = int
3965 EOF
3966 cat >> confdefs.h <<\EOF
3967 #define mode_t int
3968 EOF
3969 }
3970
3971 fi
3972
3973 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3974 echo "configure:3975: checking for off_t" >&5
3975
3976 cat > conftest.$ac_ext <<EOF
3977 #line 3978 "configure"
3978 #include "confdefs.h"
3979 #include <sys/types.h>
3980 #if STDC_HEADERS
3981 #include <stdlib.h>
3982 #include <stddef.h>
3983 #endif
3984 EOF
3985 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3986   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3987   rm -rf conftest*
3988   ac_cv_type_off_t=yes
3989 else
3990   rm -rf conftest*
3991   ac_cv_type_off_t=no
3992 fi
3993 rm -f conftest*
3994
3995 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3996 if test $ac_cv_type_off_t = no; then
3997   { test "$extra_verbose" = "yes" && cat << \EOF
3998     Defining off_t = long
3999 EOF
4000 cat >> confdefs.h <<\EOF
4001 #define off_t long
4002 EOF
4003 }
4004
4005 fi
4006
4007 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4008 echo "configure:4009: checking for ssize_t" >&5
4009
4010 cat > conftest.$ac_ext <<EOF
4011 #line 4012 "configure"
4012 #include "confdefs.h"
4013 #include <sys/types.h>
4014 #if STDC_HEADERS
4015 #include <stdlib.h>
4016 #include <stddef.h>
4017 #endif
4018 EOF
4019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4020   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4021   rm -rf conftest*
4022   ac_cv_type_ssize_t=yes
4023 else
4024   rm -rf conftest*
4025   ac_cv_type_ssize_t=no
4026 fi
4027 rm -f conftest*
4028
4029 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4030 if test $ac_cv_type_ssize_t = no; then
4031   { test "$extra_verbose" = "yes" && cat << \EOF
4032     Defining ssize_t = int
4033 EOF
4034 cat >> confdefs.h <<\EOF
4035 #define ssize_t int
4036 EOF
4037 }
4038
4039 fi
4040
4041
4042 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4043 echo "configure:4044: checking for socklen_t" >&5
4044 cat > conftest.$ac_ext <<EOF
4045 #line 4046 "configure"
4046 #include "confdefs.h"
4047 #include <sys/socket.h>
4048 socklen_t x;
4049
4050 int main() {
4051
4052 ; return 0; }
4053 EOF
4054 if { (eval echo configure:4055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4055   rm -rf conftest*
4056   echo "$ac_t""yes" 1>&6
4057 else
4058   echo "configure: failed program was:" >&5
4059   cat conftest.$ac_ext >&5
4060   rm -rf conftest*
4061   
4062 cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <sys/socket.h>
4066 int accept (int, struct sockaddr *, size_t *);
4067
4068 int main() {
4069
4070 ; return 0; }
4071 EOF
4072 if { (eval echo configure:4073: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4073   rm -rf conftest*
4074   
4075 echo "$ac_t""size_t" 1>&6
4076 { test "$extra_verbose" = "yes" && cat << \EOF
4077     Defining socklen_t = size_t
4078 EOF
4079 cat >> confdefs.h <<\EOF
4080 #define socklen_t size_t
4081 EOF
4082 }
4083
4084 else
4085   echo "configure: failed program was:" >&5
4086   cat conftest.$ac_ext >&5
4087   rm -rf conftest*
4088   
4089 echo "$ac_t""int" 1>&6
4090 { test "$extra_verbose" = "yes" && cat << \EOF
4091     Defining socklen_t = int
4092 EOF
4093 cat >> confdefs.h <<\EOF
4094 #define socklen_t int
4095 EOF
4096 }
4097
4098 fi
4099 rm -f conftest*
4100 fi
4101 rm -f conftest*
4102
4103 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4104 echo "configure:4105: checking for struct timeval" >&5
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4108 #ifdef TIME_WITH_SYS_TIME
4109 #include <sys/time.h>
4110 #include <time.h>
4111 #else
4112 #ifdef HAVE_SYS_TIME_H
4113 #include <sys/time.h>
4114 #else
4115 #include <time.h>
4116 #endif
4117 #endif
4118 int main() {
4119 static struct timeval x; x.tv_sec = x.tv_usec;
4120 ; return 0; }
4121 EOF
4122 if { (eval echo configure:4123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4123   rm -rf conftest*
4124   echo "$ac_t""yes" 1>&6
4125   HAVE_TIMEVAL=yes
4126   { test "$extra_verbose" = "yes" && cat << \EOF
4127     Defining HAVE_TIMEVAL
4128 EOF
4129 cat >> confdefs.h <<\EOF
4130 #define HAVE_TIMEVAL 1
4131 EOF
4132 }
4133
4134 else
4135   echo "configure: failed program was:" >&5
4136   cat conftest.$ac_ext >&5
4137   rm -rf conftest*
4138   echo "$ac_t""no" 1>&6
4139    HAVE_TIMEVAL=no
4140 fi
4141 rm -f conftest*
4142
4143 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4144 echo "configure:4145: checking whether struct tm is in sys/time.h or time.h" >&5
4145
4146 cat > conftest.$ac_ext <<EOF
4147 #line 4148 "configure"
4148 #include "confdefs.h"
4149 #include <sys/types.h>
4150 #include <time.h>
4151 int main() {
4152 struct tm *tp; tp->tm_sec;
4153 ; return 0; }
4154 EOF
4155 if { (eval echo configure:4156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4156   rm -rf conftest*
4157   ac_cv_struct_tm=time.h
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161   rm -rf conftest*
4162   ac_cv_struct_tm=sys/time.h
4163 fi
4164 rm -f conftest*
4165
4166 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4167 if test $ac_cv_struct_tm = sys/time.h; then
4168   { test "$extra_verbose" = "yes" && cat << \EOF
4169     Defining TM_IN_SYS_TIME
4170 EOF
4171 cat >> confdefs.h <<\EOF
4172 #define TM_IN_SYS_TIME 1
4173 EOF
4174 }
4175
4176 fi
4177
4178 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4179 echo "configure:4180: checking for tm_zone in struct tm" >&5
4180
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4184 #include <sys/types.h>
4185 #include <$ac_cv_struct_tm>
4186 int main() {
4187 struct tm tm; tm.tm_zone;
4188 ; return 0; }
4189 EOF
4190 if { (eval echo configure:4191: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4191   rm -rf conftest*
4192   ac_cv_struct_tm_zone=yes
4193 else
4194   echo "configure: failed program was:" >&5
4195   cat conftest.$ac_ext >&5
4196   rm -rf conftest*
4197   ac_cv_struct_tm_zone=no
4198 fi
4199 rm -f conftest*
4200
4201 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4202 if test "$ac_cv_struct_tm_zone" = yes; then
4203   { test "$extra_verbose" = "yes" && cat << \EOF
4204     Defining HAVE_TM_ZONE
4205 EOF
4206 cat >> confdefs.h <<\EOF
4207 #define HAVE_TM_ZONE 1
4208 EOF
4209 }
4210
4211 else
4212   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4213 echo "configure:4214: checking for tzname" >&5
4214
4215 cat > conftest.$ac_ext <<EOF
4216 #line 4217 "configure"
4217 #include "confdefs.h"
4218 #include <time.h>
4219 #ifndef tzname /* For SGI.  */
4220 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4221 #endif
4222 int main() {
4223 atoi(*tzname);
4224 ; return 0; }
4225 EOF
4226 if { (eval echo configure:4227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4227   rm -rf conftest*
4228   ac_cv_var_tzname=yes
4229 else
4230   echo "configure: failed program was:" >&5
4231   cat conftest.$ac_ext >&5
4232   rm -rf conftest*
4233   ac_cv_var_tzname=no
4234 fi
4235 rm -f conftest*
4236
4237 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4238   if test $ac_cv_var_tzname = yes; then
4239     { test "$extra_verbose" = "yes" && cat << \EOF
4240     Defining HAVE_TZNAME
4241 EOF
4242 cat >> confdefs.h <<\EOF
4243 #define HAVE_TZNAME 1
4244 EOF
4245 }
4246
4247   fi
4248 fi
4249
4250
4251 echo $ac_n "checking for working const""... $ac_c" 1>&6
4252 echo "configure:4253: checking for working const" >&5
4253
4254 cat > conftest.$ac_ext <<EOF
4255 #line 4256 "configure"
4256 #include "confdefs.h"
4257
4258 int main() {
4259
4260 /* Ultrix mips cc rejects this.  */
4261 typedef int charset[2]; const charset x;
4262 /* SunOS 4.1.1 cc rejects this.  */
4263 char const *const *ccp;
4264 char **p;
4265 /* NEC SVR4.0.2 mips cc rejects this.  */
4266 struct point {int x, y;};
4267 static struct point const zero = {0,0};
4268 /* AIX XL C 1.02.0.0 rejects this.
4269    It does not let you subtract one const X* pointer from another in an arm
4270    of an if-expression whose if-part is not a constant expression */
4271 const char *g = "string";
4272 ccp = &g + (g ? g-g : 0);
4273 /* HPUX 7.0 cc rejects these. */
4274 ++ccp;
4275 p = (char**) ccp;
4276 ccp = (char const *const *) p;
4277 { /* SCO 3.2v4 cc rejects this.  */
4278   char *t;
4279   char const *s = 0 ? (char *) 0 : (char const *) 0;
4280
4281   *t++ = 0;
4282 }
4283 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4284   int x[] = {25, 17};
4285   const int *foo = &x[0];
4286   ++foo;
4287 }
4288 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4289   typedef const int *iptr;
4290   iptr p = 0;
4291   ++p;
4292 }
4293 { /* AIX XL C 1.02.0.0 rejects this saying
4294      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4295   struct s { int j; const int *ap[3]; };
4296   struct s *b; b->j = 5;
4297 }
4298 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4299   const int foo = 10;
4300 }
4301
4302 ; return 0; }
4303 EOF
4304 if { (eval echo configure:4305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4305   rm -rf conftest*
4306   ac_cv_c_const=yes
4307 else
4308   echo "configure: failed program was:" >&5
4309   cat conftest.$ac_ext >&5
4310   rm -rf conftest*
4311   ac_cv_c_const=no
4312 fi
4313 rm -f conftest*
4314
4315 echo "$ac_t""$ac_cv_c_const" 1>&6
4316 if test $ac_cv_c_const = no; then
4317   { test "$extra_verbose" = "yes" && cat << \EOF
4318     Defining const = 
4319 EOF
4320 cat >> confdefs.h <<\EOF
4321 #define const 
4322 EOF
4323 }
4324
4325 fi
4326
4327
4328 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4329 echo "configure:4330: checking whether ${MAKE-make} sets \${MAKE}" >&5
4330 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4331
4332 cat > conftestmake <<\EOF
4333 all:
4334         @echo 'ac_maketemp="${MAKE}"'
4335 EOF
4336 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4337 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4338 if test -n "$ac_maketemp"; then
4339   eval ac_cv_prog_make_${ac_make}_set=yes
4340 else
4341   eval ac_cv_prog_make_${ac_make}_set=no
4342 fi
4343 rm -f conftestmake
4344 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4345   echo "$ac_t""yes" 1>&6
4346   SET_MAKE=
4347 else
4348   echo "$ac_t""no" 1>&6
4349   SET_MAKE="MAKE=${MAKE-make}"
4350 fi
4351
4352
4353 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4354 echo "configure:4355: checking whether byte ordering is bigendian" >&5
4355
4356 ac_cv_c_bigendian=unknown
4357 # See if sys/param.h defines the BYTE_ORDER macro.
4358 cat > conftest.$ac_ext <<EOF
4359 #line 4360 "configure"
4360 #include "confdefs.h"
4361 #include <sys/types.h>
4362 #include <sys/param.h>
4363 int main() {
4364
4365 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4366  bogus endian macros
4367 #endif
4368 ; return 0; }
4369 EOF
4370 if { (eval echo configure:4371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4371   rm -rf conftest*
4372   # It does; now see whether it defined to BIG_ENDIAN or not.
4373 cat > conftest.$ac_ext <<EOF
4374 #line 4375 "configure"
4375 #include "confdefs.h"
4376 #include <sys/types.h>
4377 #include <sys/param.h>
4378 int main() {
4379
4380 #if BYTE_ORDER != BIG_ENDIAN
4381  not big endian
4382 #endif
4383 ; return 0; }
4384 EOF
4385 if { (eval echo configure:4386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4386   rm -rf conftest*
4387   ac_cv_c_bigendian=yes
4388 else
4389   echo "configure: failed program was:" >&5
4390   cat conftest.$ac_ext >&5
4391   rm -rf conftest*
4392   ac_cv_c_bigendian=no
4393 fi
4394 rm -f conftest*
4395 else
4396   echo "configure: failed program was:" >&5
4397   cat conftest.$ac_ext >&5
4398 fi
4399 rm -f conftest*
4400 if test $ac_cv_c_bigendian = unknown; then
4401 cat > conftest.$ac_ext <<EOF
4402 #line 4403 "configure"
4403 #include "confdefs.h"
4404 main () {
4405   /* Are we little or big endian?  From Harbison&Steele.  */
4406   union
4407   {
4408     long l;
4409     char c[sizeof (long)];
4410   } u;
4411   u.l = 1;
4412   exit (u.c[sizeof (long) - 1] == 1);
4413 }
4414 EOF
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4416 then
4417   ac_cv_c_bigendian=no
4418 else
4419   conftest_rc="$?"
4420   echo "configure: failed program was:" >&5
4421   cat conftest.$ac_ext >&5
4422   rm -fr conftest*
4423   ac_cv_c_bigendian=yes
4424 fi
4425 rm -fr conftest*
4426 fi
4427
4428 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4429 if test $ac_cv_c_bigendian = yes; then
4430   { test "$extra_verbose" = "yes" && cat << \EOF
4431     Defining WORDS_BIGENDIAN
4432 EOF
4433 cat >> confdefs.h <<\EOF
4434 #define WORDS_BIGENDIAN 1
4435 EOF
4436 }
4437
4438 fi
4439
4440
4441 echo $ac_n "checking size of short""... $ac_c" 1>&6
4442 echo "configure:4443: checking size of short" >&5
4443
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <stdio.h>
4448 #include <sys/types.h>
4449 main()
4450 {
4451   FILE *f=fopen("conftestval", "w");
4452   if (!f) exit(1);
4453   fprintf(f, "%d\n", sizeof(short));
4454   exit(0);
4455 }
4456 EOF
4457 if { (eval echo configure:4458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4458 then
4459   ac_cv_sizeof_short=`cat conftestval`
4460 else
4461   conftest_rc="$?"
4462   echo "configure: failed program was:" >&5
4463   cat conftest.$ac_ext >&5
4464   rm -fr conftest*
4465   ac_cv_sizeof_short=0
4466 fi
4467 rm -fr conftest*
4468 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4469 { test "$extra_verbose" = "yes" && cat << EOF
4470     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4471 EOF
4472 cat >> confdefs.h <<EOF
4473 #define SIZEOF_SHORT $ac_cv_sizeof_short
4474 EOF
4475 }
4476
4477
4478 if test "$ac_cv_sizeof_short" = 0; then
4479   echo ""
4480   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4481   echo "*** PANIC *** Please examine config.log for compilation errors."
4482   exit 1
4483 fi
4484 echo $ac_n "checking size of int""... $ac_c" 1>&6
4485 echo "configure:4486: checking size of int" >&5
4486
4487 cat > conftest.$ac_ext <<EOF
4488 #line 4489 "configure"
4489 #include "confdefs.h"
4490 #include <stdio.h>
4491 #include <sys/types.h>
4492 main()
4493 {
4494   FILE *f=fopen("conftestval", "w");
4495   if (!f) exit(1);
4496   fprintf(f, "%d\n", sizeof(int));
4497   exit(0);
4498 }
4499 EOF
4500 if { (eval echo configure:4501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4501 then
4502   ac_cv_sizeof_int=`cat conftestval`
4503 else
4504   conftest_rc="$?"
4505   echo "configure: failed program was:" >&5
4506   cat conftest.$ac_ext >&5
4507   rm -fr conftest*
4508   ac_cv_sizeof_int=0
4509 fi
4510 rm -fr conftest*
4511 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4512 { test "$extra_verbose" = "yes" && cat << EOF
4513     Defining SIZEOF_INT = $ac_cv_sizeof_int
4514 EOF
4515 cat >> confdefs.h <<EOF
4516 #define SIZEOF_INT $ac_cv_sizeof_int
4517 EOF
4518 }
4519
4520
4521 echo $ac_n "checking size of long""... $ac_c" 1>&6
4522 echo "configure:4523: checking size of long" >&5
4523
4524 cat > conftest.$ac_ext <<EOF
4525 #line 4526 "configure"
4526 #include "confdefs.h"
4527 #include <stdio.h>
4528 #include <sys/types.h>
4529 main()
4530 {
4531   FILE *f=fopen("conftestval", "w");
4532   if (!f) exit(1);
4533   fprintf(f, "%d\n", sizeof(long));
4534   exit(0);
4535 }
4536 EOF
4537 if { (eval echo configure:4538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4538 then
4539   ac_cv_sizeof_long=`cat conftestval`
4540 else
4541   conftest_rc="$?"
4542   echo "configure: failed program was:" >&5
4543   cat conftest.$ac_ext >&5
4544   rm -fr conftest*
4545   ac_cv_sizeof_long=0
4546 fi
4547 rm -fr conftest*
4548 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4549 { test "$extra_verbose" = "yes" && cat << EOF
4550     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4551 EOF
4552 cat >> confdefs.h <<EOF
4553 #define SIZEOF_LONG $ac_cv_sizeof_long
4554 EOF
4555 }
4556
4557
4558 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4559 echo "configure:4560: checking size of long long" >&5
4560
4561 cat > conftest.$ac_ext <<EOF
4562 #line 4563 "configure"
4563 #include "confdefs.h"
4564 #include <stdio.h>
4565 #include <sys/types.h>
4566 main()
4567 {
4568   FILE *f=fopen("conftestval", "w");
4569   if (!f) exit(1);
4570   fprintf(f, "%d\n", sizeof(long long));
4571   exit(0);
4572 }
4573 EOF
4574 if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4575 then
4576   ac_cv_sizeof_long_long=`cat conftestval`
4577 else
4578   conftest_rc="$?"
4579   echo "configure: failed program was:" >&5
4580   cat conftest.$ac_ext >&5
4581   rm -fr conftest*
4582   ac_cv_sizeof_long_long=0
4583 fi
4584 rm -fr conftest*
4585 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4586 { test "$extra_verbose" = "yes" && cat << EOF
4587     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4588 EOF
4589 cat >> confdefs.h <<EOF
4590 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4591 EOF
4592 }
4593
4594
4595 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4596 echo "configure:4597: checking size of void *" >&5
4597
4598 cat > conftest.$ac_ext <<EOF
4599 #line 4600 "configure"
4600 #include "confdefs.h"
4601 #include <stdio.h>
4602 #include <sys/types.h>
4603 main()
4604 {
4605   FILE *f=fopen("conftestval", "w");
4606   if (!f) exit(1);
4607   fprintf(f, "%d\n", sizeof(void *));
4608   exit(0);
4609 }
4610 EOF
4611 if { (eval echo configure:4612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4612 then
4613   ac_cv_sizeof_void_p=`cat conftestval`
4614 else
4615   conftest_rc="$?"
4616   echo "configure: failed program was:" >&5
4617   cat conftest.$ac_ext >&5
4618   rm -fr conftest*
4619   ac_cv_sizeof_void_p=0
4620 fi
4621 rm -fr conftest*
4622 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4623 { test "$extra_verbose" = "yes" && cat << EOF
4624     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4625 EOF
4626 cat >> confdefs.h <<EOF
4627 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4628 EOF
4629 }
4630
4631
4632
4633 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4634 echo "configure:4635: checking for long file names" >&5
4635
4636 ac_cv_sys_long_file_names=yes
4637 # Test for long file names in all the places we know might matter:
4638 #      .                the current directory, where building will happen
4639 #      $prefix/lib      where we will be installing things
4640 #      $exec_prefix/lib likewise
4641 # eval it to expand exec_prefix.
4642 #      $TMPDIR          if set, where it might want to write temporary files
4643 # if $TMPDIR is not set:
4644 #      /tmp             where it might want to write temporary files
4645 #      /var/tmp         likewise
4646 #      /usr/tmp         likewise
4647 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4648   ac_tmpdirs="$TMPDIR"
4649 else
4650   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4651 fi
4652 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4653   test -d $ac_dir || continue
4654   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4655   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4656   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4657   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4658   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4659     ac_cv_sys_long_file_names=no
4660     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4661     break
4662   fi
4663   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4664 done
4665
4666 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4667 if test $ac_cv_sys_long_file_names = yes; then
4668   { test "$extra_verbose" = "yes" && cat << \EOF
4669     Defining HAVE_LONG_FILE_NAMES
4670 EOF
4671 cat >> confdefs.h <<\EOF
4672 #define HAVE_LONG_FILE_NAMES 1
4673 EOF
4674 }
4675
4676 fi
4677
4678
4679 echo $ac_n "checking for sin""... $ac_c" 1>&6
4680 echo "configure:4681: checking for sin" >&5
4681
4682 cat > conftest.$ac_ext <<EOF
4683 #line 4684 "configure"
4684 #include "confdefs.h"
4685 /* System header to define __stub macros and hopefully few prototypes,
4686     which can conflict with char sin(); below.  */
4687 #include <assert.h>
4688 /* Override any gcc2 internal prototype to avoid an error.  */
4689 /* We use char because int might match the return type of a gcc2
4690     builtin and then its argument prototype would still apply.  */
4691 char sin();
4692
4693 int main() {
4694
4695 /* The GNU C library defines this for functions which it implements
4696     to always fail with ENOSYS.  Some functions are actually named
4697     something starting with __ and the normal name is an alias.  */
4698 #if defined (__stub_sin) || defined (__stub___sin)
4699 choke me
4700 #else
4701 sin();
4702 #endif
4703
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4707   rm -rf conftest*
4708   eval "ac_cv_func_sin=yes"
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   eval "ac_cv_func_sin=no"
4714 fi
4715 rm -f conftest*
4716
4717 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4718   echo "$ac_t""yes" 1>&6
4719   :
4720 else
4721   echo "$ac_t""no" 1>&6
4722
4723 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4724 echo "configure:4725: checking for sin in -lm" >&5
4725 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4726
4727 xe_check_libs=" -lm "
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4731 /* Override any gcc2 internal prototype to avoid an error.  */
4732 /* We use char because int might match the return type of a gcc2
4733     builtin and then its argument prototype would still apply.  */
4734 char sin();
4735
4736 int main() {
4737 sin()
4738 ; return 0; }
4739 EOF
4740 if { (eval echo configure:4741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741   rm -rf conftest*
4742   eval "ac_cv_lib_$ac_lib_var=yes"
4743 else
4744   echo "configure: failed program was:" >&5
4745   cat conftest.$ac_ext >&5
4746   rm -rf conftest*
4747   eval "ac_cv_lib_$ac_lib_var=no"
4748 fi
4749 rm -f conftest*
4750 xe_check_libs=""
4751
4752 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4753   echo "$ac_t""yes" 1>&6
4754     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4755     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4756   { test "$extra_verbose" = "yes" && cat << EOF
4757     Defining $ac_tr_lib
4758 EOF
4759 cat >> confdefs.h <<EOF
4760 #define $ac_tr_lib 1
4761 EOF
4762 }
4763
4764   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4765
4766 else
4767   echo "$ac_t""no" 1>&6
4768 fi
4769
4770
4771 fi
4772
4773
4774 { test "$extra_verbose" = "yes" && cat << \EOF
4775     Defining LISP_FLOAT_TYPE
4776 EOF
4777 cat >> confdefs.h <<\EOF
4778 #define LISP_FLOAT_TYPE 1
4779 EOF
4780 }
4781
4782
4783 cat > conftest.$ac_ext <<EOF
4784 #line 4785 "configure"
4785 #include "confdefs.h"
4786 #include <math.h>
4787 int main() {
4788 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4789 ; return 0; }
4790 EOF
4791 if { (eval echo configure:4792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4792   rm -rf conftest*
4793   { test "$extra_verbose" = "yes" && cat << \EOF
4794     Defining HAVE_INVERSE_HYPERBOLIC
4795 EOF
4796 cat >> confdefs.h <<\EOF
4797 #define HAVE_INVERSE_HYPERBOLIC 1
4798 EOF
4799 }
4800
4801 else
4802   echo "configure: failed program was:" >&5
4803   cat conftest.$ac_ext >&5
4804 fi
4805 rm -f conftest*
4806
4807 echo "checking type of mail spool file locking" 1>&6
4808 echo "configure:4809: checking type of mail spool file locking" >&5
4809 for ac_func in lockf flock
4810 do
4811 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4812 echo "configure:4813: checking for $ac_func" >&5
4813
4814 cat > conftest.$ac_ext <<EOF
4815 #line 4816 "configure"
4816 #include "confdefs.h"
4817 /* System header to define __stub macros and hopefully few prototypes,
4818     which can conflict with char $ac_func(); below.  */
4819 #include <assert.h>
4820 /* Override any gcc2 internal prototype to avoid an error.  */
4821 /* We use char because int might match the return type of a gcc2
4822     builtin and then its argument prototype would still apply.  */
4823 char $ac_func();
4824
4825 int main() {
4826
4827 /* The GNU C library defines this for functions which it implements
4828     to always fail with ENOSYS.  Some functions are actually named
4829     something starting with __ and the normal name is an alias.  */
4830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4831 choke me
4832 #else
4833 $ac_func();
4834 #endif
4835
4836 ; return 0; }
4837 EOF
4838 if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4839   rm -rf conftest*
4840   eval "ac_cv_func_$ac_func=yes"
4841 else
4842   echo "configure: failed program was:" >&5
4843   cat conftest.$ac_ext >&5
4844   rm -rf conftest*
4845   eval "ac_cv_func_$ac_func=no"
4846 fi
4847 rm -f conftest*
4848
4849 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4850   echo "$ac_t""yes" 1>&6
4851     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4852   { test "$extra_verbose" = "yes" && cat << EOF
4853     Defining $ac_tr_func
4854 EOF
4855 cat >> confdefs.h <<EOF
4856 #define $ac_tr_func 1
4857 EOF
4858 }
4859  
4860 else
4861   echo "$ac_t""no" 1>&6
4862 fi
4863 done
4864
4865 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4866 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4867 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4868 if   test -z "$mail_locking"; then
4869   case "$opsys" in cygwin* | mingw*)
4870     mail_locking=pop ;;
4871   esac
4872 fi
4873
4874 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4875     Defining MAIL_LOCK_LOCKF
4876 EOF
4877 cat >> confdefs.h <<\EOF
4878 #define MAIL_LOCK_LOCKF 1
4879 EOF
4880 }
4881
4882 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4883     Defining MAIL_LOCK_FLOCK
4884 EOF
4885 cat >> confdefs.h <<\EOF
4886 #define MAIL_LOCK_FLOCK 1
4887 EOF
4888 }
4889
4890 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4891     Defining MAIL_LOCK_LOCKING
4892 EOF
4893 cat >> confdefs.h <<\EOF
4894 #define MAIL_LOCK_LOCKING 1
4895 EOF
4896 }
4897
4898 elif test "$mail_locking" = "pop"; then
4899   with_pop=yes
4900   mail_locking=
4901 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4902     Defining MAIL_LOCK_DOT
4903 EOF
4904 cat >> confdefs.h <<\EOF
4905 #define MAIL_LOCK_DOT 1
4906 EOF
4907 }
4908
4909 fi
4910 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4911   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4912 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4913   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4914 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4915   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4916
4917 case "$opsys" in decosf*)
4918   
4919 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4920 echo "configure:4921: checking for cma_open in -lpthreads" >&5
4921 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4922
4923 xe_check_libs=" -lpthreads "
4924 cat > conftest.$ac_ext <<EOF
4925 #line 4926 "configure"
4926 #include "confdefs.h"
4927 /* Override any gcc2 internal prototype to avoid an error.  */
4928 /* We use char because int might match the return type of a gcc2
4929     builtin and then its argument prototype would still apply.  */
4930 char cma_open();
4931
4932 int main() {
4933 cma_open()
4934 ; return 0; }
4935 EOF
4936 if { (eval echo configure:4937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4937   rm -rf conftest*
4938   eval "ac_cv_lib_$ac_lib_var=yes"
4939 else
4940   echo "configure: failed program was:" >&5
4941   cat conftest.$ac_ext >&5
4942   rm -rf conftest*
4943   eval "ac_cv_lib_$ac_lib_var=no"
4944 fi
4945 rm -f conftest*
4946 xe_check_libs=""
4947
4948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4949   echo "$ac_t""yes" 1>&6
4950     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4951     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4952   { test "$extra_verbose" = "yes" && cat << EOF
4953     Defining $ac_tr_lib
4954 EOF
4955 cat >> confdefs.h <<EOF
4956 #define $ac_tr_lib 1
4957 EOF
4958 }
4959
4960   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4961
4962 else
4963   echo "$ac_t""no" 1>&6
4964 fi
4965
4966
4967   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4968     c_switch_site="$c_switch_site -threads" ;;
4969 esac
4970
4971 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4972 echo "configure:4973: checking whether the -xildoff compiler flag is required" >&5
4973 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4974   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4975     then echo "$ac_t""no" 1>&6;
4976     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
4977   fi
4978   else echo "$ac_t""no" 1>&6
4979 fi
4980
4981 if test "$opsys" = "sol2"; then
4982   if test "$os_release" -ge 56; then
4983     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4984 echo "configure:4985: checking for \"-z ignore\" linker flag" >&5
4985     case "`ld -h 2>&1`" in
4986       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4987         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4988       *) echo "$ac_t""no" 1>&6 ;;
4989     esac
4990   fi
4991 fi
4992
4993
4994 echo "checking "for specified window system"" 1>&6
4995 echo "configure:4996: checking "for specified window system"" >&5
4996
4997
4998 GNOME_CONFIG=no
4999 GTK_CONFIG=no
5000
5001 if test "$with_gnome" != "no"; then
5002    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5003 echo "configure:5004: checking for GNOME configuration script" >&5
5004    for possible in gnome-config
5005    do
5006       possible_version=`${possible} --version 2> /dev/null`
5007       if test "x${possible_version}" != "x"; then
5008               GNOME_CONFIG="${possible}"
5009               with_gnome=yes
5010               with_gtk=yes
5011               break
5012       fi
5013    done
5014    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5015 fi
5016
5017 if test "${GNOME_CONFIG}" != "no"; then
5018       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5019       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5020       { test "$extra_verbose" = "yes" && cat << \EOF
5021     Defining HAVE_GNOME
5022 EOF
5023 cat >> confdefs.h <<\EOF
5024 #define HAVE_GNOME 1
5025 EOF
5026 }
5027
5028       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5029       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5030 fi
5031
5032 if test "$with_gtk" != "no";then
5033    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5034 echo "configure:5035: checking for GTK configuration script" >&5
5035    for possible in gtk12-config gtk14-config gtk-config
5036    do
5037       possible_version=`${possible} --version 2> /dev/null`
5038       if test "x${possible_version}" != "x"; then
5039               GTK_CONFIG="${possible}"
5040       fi
5041       case "${possible_version}" in
5042         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5043         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5044         1.2.*)
5045                 with_gtk=yes
5046                 break
5047                 ;;
5048         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5049       esac
5050    done
5051    echo "$ac_t""${GTK_CONFIG}" 1>&6
5052 fi
5053
5054 if test "${GTK_CONFIG}" != "no"; then
5055       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5056 echo "configure:5057: checking gtk version" >&5
5057       GTK_VERSION=`${GTK_CONFIG} --version`
5058       echo "$ac_t""${GTK_VERSION}" 1>&6
5059
5060       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5061 echo "configure:5062: checking gtk libs" >&5
5062       GTK_LIBS=`${GTK_CONFIG} --libs`
5063       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5064       echo "$ac_t""${GTK_LIBS}" 1>&6
5065
5066       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5067 echo "configure:5068: checking gtk cflags" >&5
5068       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5069       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5070       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5071
5072       
5073 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5074 echo "configure:5075: checking for main in -lgdk_imlib" >&5
5075 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5076
5077 xe_check_libs=" -lgdk_imlib "
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5081
5082 int main() {
5083 main()
5084 ; return 0; }
5085 EOF
5086 if { (eval echo configure:5087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5087   rm -rf conftest*
5088   eval "ac_cv_lib_$ac_lib_var=yes"
5089 else
5090   echo "configure: failed program was:" >&5
5091   cat conftest.$ac_ext >&5
5092   rm -rf conftest*
5093   eval "ac_cv_lib_$ac_lib_var=no"
5094 fi
5095 rm -f conftest*
5096 xe_check_libs=""
5097
5098 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5099   echo "$ac_t""yes" 1>&6
5100   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5101 else
5102   echo "$ac_t""no" 1>&6
5103 fi
5104
5105
5106       
5107 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5108 echo "configure:5109: checking for Imlib_init in -lImlib" >&5
5109 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5110
5111 xe_check_libs=" -lImlib "
5112 cat > conftest.$ac_ext <<EOF
5113 #line 5114 "configure"
5114 #include "confdefs.h"
5115 /* Override any gcc2 internal prototype to avoid an error.  */
5116 /* We use char because int might match the return type of a gcc2
5117     builtin and then its argument prototype would still apply.  */
5118 char Imlib_init();
5119
5120 int main() {
5121 Imlib_init()
5122 ; return 0; }
5123 EOF
5124 if { (eval echo configure:5125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5125   rm -rf conftest*
5126   eval "ac_cv_lib_$ac_lib_var=yes"
5127 else
5128   echo "configure: failed program was:" >&5
5129   cat conftest.$ac_ext >&5
5130   rm -rf conftest*
5131   eval "ac_cv_lib_$ac_lib_var=no"
5132 fi
5133 rm -f conftest*
5134 xe_check_libs=""
5135
5136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5137   echo "$ac_t""yes" 1>&6
5138   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5139 else
5140   echo "$ac_t""no" 1>&6
5141 fi
5142
5143
5144       for ac_func in gdk_imlib_init
5145 do
5146 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5147 echo "configure:5148: checking for $ac_func" >&5
5148
5149 cat > conftest.$ac_ext <<EOF
5150 #line 5151 "configure"
5151 #include "confdefs.h"
5152 /* System header to define __stub macros and hopefully few prototypes,
5153     which can conflict with char $ac_func(); below.  */
5154 #include <assert.h>
5155 /* Override any gcc2 internal prototype to avoid an error.  */
5156 /* We use char because int might match the return type of a gcc2
5157     builtin and then its argument prototype would still apply.  */
5158 char $ac_func();
5159
5160 int main() {
5161
5162 /* The GNU C library defines this for functions which it implements
5163     to always fail with ENOSYS.  Some functions are actually named
5164     something starting with __ and the normal name is an alias.  */
5165 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5166 choke me
5167 #else
5168 $ac_func();
5169 #endif
5170
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_func_$ac_func=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_func_$ac_func=no"
5181 fi
5182 rm -f conftest*
5183
5184 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5185   echo "$ac_t""yes" 1>&6
5186     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5187   { test "$extra_verbose" = "yes" && cat << EOF
5188     Defining $ac_tr_func
5189 EOF
5190 cat >> confdefs.h <<EOF
5191 #define $ac_tr_func 1
5192 EOF
5193 }
5194  
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198 done
5199
5200
5201       { test "$extra_verbose" = "yes" && cat << \EOF
5202     Defining HAVE_XPM
5203 EOF
5204 cat >> confdefs.h <<\EOF
5205 #define HAVE_XPM 1
5206 EOF
5207 }
5208
5209       { test "$extra_verbose" = "yes" && cat << \EOF
5210     Defining HAVE_GTK
5211 EOF
5212 cat >> confdefs.h <<\EOF
5213 #define HAVE_GTK 1
5214 EOF
5215 }
5216
5217       
5218
5219       window_system=gtk
5220       with_gtk=yes
5221       with_x11=no
5222
5223       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5224       test "${with_toolbars}" != no && with_toolbars=gtk
5225       test "${with_menubars}" != "no" && with_menubars=gtk
5226       test "${with_dialogs}" != "no" && with_dialogs=gtk
5227       test "${with_widgets}" != "no" && with_widgets=gtk
5228
5229       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5230    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5231  fi
5232       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5233    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5234  fi
5235       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5236    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5237  fi
5238       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5239    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5240  fi
5241
5242             OLD_CFLAGS="${CFLAGS}"
5243       OLD_LDFLAGS="${LDFLAGS}"
5244       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5245       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5246       for ac_hdr in glade/glade.h glade.h
5247 do
5248 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5249 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5250 echo "configure:5251: checking for $ac_hdr" >&5
5251
5252 cat > conftest.$ac_ext <<EOF
5253 #line 5254 "configure"
5254 #include "confdefs.h"
5255 #include <$ac_hdr>
5256 EOF
5257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5258 { (eval echo configure:5259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5260 if test -z "$ac_err"; then
5261   rm -rf conftest*
5262   eval "ac_cv_header_$ac_safe=yes"
5263 else
5264   echo "$ac_err" >&5
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_header_$ac_safe=no"
5269 fi
5270 rm -f conftest*
5271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5272   echo "$ac_t""yes" 1>&6
5273     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5274   { test "$extra_verbose" = "yes" && cat << EOF
5275     Defining $ac_tr_hdr
5276 EOF
5277 cat >> confdefs.h <<EOF
5278 #define $ac_tr_hdr 1
5279 EOF
5280 }
5281  
5282 else
5283   echo "$ac_t""no" 1>&6
5284 fi
5285 done
5286
5287       
5288 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5289 echo "configure:5290: checking for main in -lxml" >&5
5290 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5291
5292 xe_check_libs=" -lxml "
5293 cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296
5297 int main() {
5298 main()
5299 ; return 0; }
5300 EOF
5301 if { (eval echo configure:5302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5302   rm -rf conftest*
5303   eval "ac_cv_lib_$ac_lib_var=yes"
5304 else
5305   echo "configure: failed program was:" >&5
5306   cat conftest.$ac_ext >&5
5307   rm -rf conftest*
5308   eval "ac_cv_lib_$ac_lib_var=no"
5309 fi
5310 rm -f conftest*
5311 xe_check_libs=""
5312
5313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5314   echo "$ac_t""yes" 1>&6
5315   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5316 else
5317   echo "$ac_t""no" 1>&6
5318 fi
5319
5320
5321       
5322 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5323 echo "configure:5324: checking for main in -lglade" >&5
5324 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5325
5326 xe_check_libs=" -lglade "
5327 cat > conftest.$ac_ext <<EOF
5328 #line 5329 "configure"
5329 #include "confdefs.h"
5330
5331 int main() {
5332 main()
5333 ; return 0; }
5334 EOF
5335 if { (eval echo configure:5336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5336   rm -rf conftest*
5337   eval "ac_cv_lib_$ac_lib_var=yes"
5338 else
5339   echo "configure: failed program was:" >&5
5340   cat conftest.$ac_ext >&5
5341   rm -rf conftest*
5342   eval "ac_cv_lib_$ac_lib_var=no"
5343 fi
5344 rm -f conftest*
5345 xe_check_libs=""
5346
5347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5348   echo "$ac_t""yes" 1>&6
5349   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5350 else
5351   echo "$ac_t""no" 1>&6
5352 fi
5353
5354
5355       
5356 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5357 echo "configure:5358: checking for main in -lglade-gnome" >&5
5358 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5359
5360 xe_check_libs=" -lglade-gnome "
5361 cat > conftest.$ac_ext <<EOF
5362 #line 5363 "configure"
5363 #include "confdefs.h"
5364
5365 int main() {
5366 main()
5367 ; return 0; }
5368 EOF
5369 if { (eval echo configure:5370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5370   rm -rf conftest*
5371   eval "ac_cv_lib_$ac_lib_var=yes"
5372 else
5373   echo "configure: failed program was:" >&5
5374   cat conftest.$ac_ext >&5
5375   rm -rf conftest*
5376   eval "ac_cv_lib_$ac_lib_var=no"
5377 fi
5378 rm -f conftest*
5379 xe_check_libs=""
5380
5381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5382   echo "$ac_t""yes" 1>&6
5383   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5384 else
5385   echo "$ac_t""no" 1>&6
5386 fi
5387
5388
5389       cat > conftest.$ac_ext <<EOF
5390 #line 5391 "configure"
5391 #include "confdefs.h"
5392 #include <glade/glade-xml.h>
5393 EOF
5394 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5395   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5396   rm -rf conftest*
5397   echo "$ac_t""yes" 1>&6
5398                        { test "$extra_verbose" = "yes" && cat << \EOF
5399     Defining LIBGLADE_XML_TXTDOMAIN = 1
5400 EOF
5401 cat >> confdefs.h <<\EOF
5402 #define LIBGLADE_XML_TXTDOMAIN 1
5403 EOF
5404 }
5405
5406 else
5407   rm -rf conftest*
5408   echo "$ac_t""no" 1>&6
5409 fi
5410 rm -f conftest*
5411
5412       CFLAGS="${OLD_CFLAGS}"
5413       LDFLAGS="${OLD_LDFLAGS}"
5414 fi
5415
5416
5417 if test "$with_x11" != "no"; then
5418     test "$x_includes $x_libraries" != "NONE NONE" && \
5419    window_system=x11 with_x11=yes
5420
5421         
5422       if test "$x_includes $x_libraries" = "NONE NONE" \
5423     -a -n "$OPENWINHOME" \
5424     -a "$OPENWINHOME" != "/usr/openwin" \
5425     -a -d "$OPENWINHOME"; then
5426       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5427       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5428       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5429   fi
5430
5431   if test "$x_includes" = "NONE"; then
5432                     for dir in "/usr/X11" "/usr/X11R6"; do
5433       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5434     done
5435   fi
5436
5437   if test "$x_libraries" = "NONE"; then
5438     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5439       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5440     done
5441   fi
5442
5443   # If we find X, set shell vars x_includes and x_libraries to the
5444 # paths, otherwise set no_x=yes.
5445 # Uses ac_ vars as temps to allow command line to override cache and checks.
5446 # --without-x overrides everything else, but does not touch the cache.
5447 echo $ac_n "checking for X""... $ac_c" 1>&6
5448 echo "configure:5449: checking for X" >&5
5449
5450 # Check whether --with-x or --without-x was given.
5451 if test "${with_x+set}" = set; then
5452   withval="$with_x"
5453   :
5454 fi
5455
5456 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5457 if test "x$with_x" = xno; then
5458   # The user explicitly disabled X.
5459   have_x=disabled
5460 else
5461   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5462     # Both variables are already set.
5463     have_x=yes
5464   else
5465
5466 # One or both of the vars are not set, and there is no cached value.
5467 ac_x_includes=NO ac_x_libraries=NO
5468 rm -fr conftestdir
5469 if mkdir conftestdir; then
5470   cd conftestdir
5471   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5472   cat > Imakefile <<'EOF'
5473 acfindx:
5474         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5475 EOF
5476   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5477     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5478     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5479     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5480     for ac_extension in a so sl; do
5481       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5482         test -f $ac_im_libdir/libX11.$ac_extension; then
5483         ac_im_usrlibdir=$ac_im_libdir; break
5484       fi
5485     done
5486     # Screen out bogus values from the imake configuration.  They are
5487     # bogus both because they are the default anyway, and because
5488     # using them would break gcc on systems where it needs fixed includes.
5489     case "$ac_im_incroot" in
5490         /usr/include) ;;
5491         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5492     esac
5493     case "$ac_im_usrlibdir" in
5494         /usr/lib | /lib) ;;
5495         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5496     esac
5497   fi
5498   cd ..
5499   rm -fr conftestdir
5500 fi
5501
5502 if test "$ac_x_includes" = NO; then
5503   # Guess where to find include files, by looking for this one X11 .h file.
5504   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5505
5506   # First, try using that file with no special directory specified.
5507 cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510 #include <$x_direct_test_include>
5511 EOF
5512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5513 { (eval echo configure:5514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5515 if test -z "$ac_err"; then
5516   rm -rf conftest*
5517   # We can compile using X headers with no special include directory.
5518 ac_x_includes=
5519 else
5520   echo "$ac_err" >&5
5521   echo "configure: failed program was:" >&5
5522   cat conftest.$ac_ext >&5
5523   rm -rf conftest*
5524   # Look for the header file in a standard set of common directories.
5525 # Check X11 before X11Rn because it is often a symlink to the current release.
5526   for ac_dir in               \
5527     /usr/X11/include          \
5528     /usr/X11R6/include        \
5529     /usr/X11R5/include        \
5530     /usr/X11R4/include        \
5531                               \
5532     /usr/include/X11          \
5533     /usr/include/X11R6        \
5534     /usr/include/X11R5        \
5535     /usr/include/X11R4        \
5536                               \
5537     /usr/local/X11/include    \
5538     /usr/local/X11R6/include  \
5539     /usr/local/X11R5/include  \
5540     /usr/local/X11R4/include  \
5541                               \
5542     /usr/local/include/X11    \
5543     /usr/local/include/X11R6  \
5544     /usr/local/include/X11R5  \
5545     /usr/local/include/X11R4  \
5546                               \
5547     /usr/X386/include         \
5548     /usr/x386/include         \
5549     /usr/XFree86/include/X11  \
5550                               \
5551     /usr/include              \
5552     /usr/local/include        \
5553     /usr/unsupported/include  \
5554     /usr/athena/include       \
5555     /usr/local/x11r5/include  \
5556     /usr/lpp/Xamples/include  \
5557                               \
5558     /usr/openwin/include      \
5559     /usr/openwin/share/include \
5560     ; \
5561   do
5562     if test -r "$ac_dir/$x_direct_test_include"; then
5563       ac_x_includes=$ac_dir
5564       break
5565     fi
5566   done
5567 fi
5568 rm -f conftest*
5569 fi # $ac_x_includes = NO
5570
5571 if test "$ac_x_libraries" = NO; then
5572   # Check for the libraries.
5573
5574   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5575   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5576
5577   # See if we find them without any special options.
5578   # Don't add to $LIBS permanently.
5579   ac_save_LIBS="$LIBS"
5580   LIBS="-l$x_direct_test_library $LIBS"
5581 cat > conftest.$ac_ext <<EOF
5582 #line 5583 "configure"
5583 #include "confdefs.h"
5584
5585 int main() {
5586 ${x_direct_test_function}()
5587 ; return 0; }
5588 EOF
5589 if { (eval echo configure:5590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5590   rm -rf conftest*
5591   LIBS="$ac_save_LIBS"
5592 # We can link X programs with no special library path.
5593 ac_x_libraries=
5594 else
5595   echo "configure: failed program was:" >&5
5596   cat conftest.$ac_ext >&5
5597   rm -rf conftest*
5598   LIBS="$ac_save_LIBS"
5599 # First see if replacing the include by lib works.
5600 # Check X11 before X11Rn because it is often a symlink to the current release.
5601 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5602     /usr/X11/lib          \
5603     /usr/X11R6/lib        \
5604     /usr/X11R5/lib        \
5605     /usr/X11R4/lib        \
5606                           \
5607     /usr/lib/X11          \
5608     /usr/lib/X11R6        \
5609     /usr/lib/X11R5        \
5610     /usr/lib/X11R4        \
5611                           \
5612     /usr/local/X11/lib    \
5613     /usr/local/X11R6/lib  \
5614     /usr/local/X11R5/lib  \
5615     /usr/local/X11R4/lib  \
5616                           \
5617     /usr/local/lib/X11    \
5618     /usr/local/lib/X11R6  \
5619     /usr/local/lib/X11R5  \
5620     /usr/local/lib/X11R4  \
5621                           \
5622     /usr/X386/lib         \
5623     /usr/x386/lib         \
5624     /usr/XFree86/lib/X11  \
5625                           \
5626     /usr/lib              \
5627     /usr/local/lib        \
5628     /usr/unsupported/lib  \
5629     /usr/athena/lib       \
5630     /usr/local/x11r5/lib  \
5631     /usr/lpp/Xamples/lib  \
5632     /lib/usr/lib/X11      \
5633                           \
5634     /usr/openwin/lib      \
5635     /usr/openwin/share/lib \
5636     ; \
5637 do
5638   for ac_extension in a so sl; do
5639     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5640       ac_x_libraries=$ac_dir
5641       break 2
5642     fi
5643   done
5644 done
5645 fi
5646 rm -f conftest*
5647 fi # $ac_x_libraries = NO
5648
5649 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5650   # Didn't find X anywhere.  Cache the known absence of X.
5651   ac_cv_have_x="have_x=no"
5652 else
5653   # Record where we found X for the cache.
5654   ac_cv_have_x="have_x=yes \
5655                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5656 fi
5657   fi
5658   eval "$ac_cv_have_x"
5659 fi # $with_x != no
5660
5661 if test "$have_x" != yes; then
5662   echo "$ac_t""$have_x" 1>&6
5663   no_x=yes
5664 else
5665   # If each of the values was on the command line, it overrides each guess.
5666   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5667   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5668   # Update the cache value to reflect the command line values.
5669   ac_cv_have_x="have_x=yes \
5670                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5671   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5672 fi
5673
5674 if test "$no_x" = yes; then
5675   # Not all programs may use this symbol, but it does not hurt to define it.
5676   { test "$extra_verbose" = "yes" && cat << \EOF
5677     Defining X_DISPLAY_MISSING
5678 EOF
5679 cat >> confdefs.h <<\EOF
5680 #define X_DISPLAY_MISSING 1
5681 EOF
5682 }
5683
5684   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5685 else
5686   if test -n "$x_includes"; then
5687     X_CFLAGS="$X_CFLAGS -I$x_includes"
5688   fi
5689
5690   # It would also be nice to do this for all -L options, not just this one.
5691   if test -n "$x_libraries"; then
5692     X_LIBS="$X_LIBS -L$x_libraries"
5693     # For Solaris; some versions of Sun CC require a space after -R and
5694     # others require no space.  Words are not sufficient . . . .
5695     case "`(uname -sr) 2>/dev/null`" in
5696     "SunOS 5"*)
5697       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5698 echo "configure:5699: checking whether -R must be followed by a space" >&5
5699       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5700       cat > conftest.$ac_ext <<EOF
5701 #line 5702 "configure"
5702 #include "confdefs.h"
5703
5704 int main() {
5705
5706 ; return 0; }
5707 EOF
5708 if { (eval echo configure:5709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5709   rm -rf conftest*
5710   ac_R_nospace=yes
5711 else
5712   echo "configure: failed program was:" >&5
5713   cat conftest.$ac_ext >&5
5714   rm -rf conftest*
5715   ac_R_nospace=no
5716 fi
5717 rm -f conftest*
5718       if test $ac_R_nospace = yes; then
5719         echo "$ac_t""no" 1>&6
5720         X_LIBS="$X_LIBS -R$x_libraries"
5721       else
5722         LIBS="$ac_xsave_LIBS -R $x_libraries"
5723         cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726
5727 int main() {
5728
5729 ; return 0; }
5730 EOF
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5732   rm -rf conftest*
5733   ac_R_space=yes
5734 else
5735   echo "configure: failed program was:" >&5
5736   cat conftest.$ac_ext >&5
5737   rm -rf conftest*
5738   ac_R_space=no
5739 fi
5740 rm -f conftest*
5741         if test $ac_R_space = yes; then
5742           echo "$ac_t""yes" 1>&6
5743           X_LIBS="$X_LIBS -R $x_libraries"
5744         else
5745           echo "$ac_t""neither works" 1>&6
5746         fi
5747       fi
5748       LIBS="$ac_xsave_LIBS"
5749     esac
5750   fi
5751
5752   # Check for system-dependent libraries X programs must link with.
5753   # Do this before checking for the system-independent R6 libraries
5754   # (-lICE), since we may need -lsocket or whatever for X linking.
5755
5756   if test "$ISC" = yes; then
5757     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5758   else
5759     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5760     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5761     # the Alpha needs dnet_stub (dnet does not exist).
5762     if test "$with_dnet" = "no" ; then
5763 ac_cv_lib_dnet_dnet_ntoa=no
5764 else
5765
5766 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5767 echo "configure:5768: checking for dnet_ntoa in -ldnet" >&5
5768 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5769
5770 xe_check_libs=" -ldnet "
5771 cat > conftest.$ac_ext <<EOF
5772 #line 5773 "configure"
5773 #include "confdefs.h"
5774 /* Override any gcc2 internal prototype to avoid an error.  */
5775 /* We use char because int might match the return type of a gcc2
5776     builtin and then its argument prototype would still apply.  */
5777 char dnet_ntoa();
5778
5779 int main() {
5780 dnet_ntoa()
5781 ; return 0; }
5782 EOF
5783 if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5784   rm -rf conftest*
5785   eval "ac_cv_lib_$ac_lib_var=yes"
5786 else
5787   echo "configure: failed program was:" >&5
5788   cat conftest.$ac_ext >&5
5789   rm -rf conftest*
5790   eval "ac_cv_lib_$ac_lib_var=no"
5791 fi
5792 rm -f conftest*
5793 xe_check_libs=""
5794
5795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5796   echo "$ac_t""yes" 1>&6
5797   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5798 else
5799   echo "$ac_t""no" 1>&6
5800 fi
5801
5802 fi
5803
5804     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5805       
5806 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5807 echo "configure:5808: checking for dnet_ntoa in -ldnet_stub" >&5
5808 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5809
5810 xe_check_libs=" -ldnet_stub "
5811 cat > conftest.$ac_ext <<EOF
5812 #line 5813 "configure"
5813 #include "confdefs.h"
5814 /* Override any gcc2 internal prototype to avoid an error.  */
5815 /* We use char because int might match the return type of a gcc2
5816     builtin and then its argument prototype would still apply.  */
5817 char dnet_ntoa();
5818
5819 int main() {
5820 dnet_ntoa()
5821 ; return 0; }
5822 EOF
5823 if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=yes"
5826 else
5827   echo "configure: failed program was:" >&5
5828   cat conftest.$ac_ext >&5
5829   rm -rf conftest*
5830   eval "ac_cv_lib_$ac_lib_var=no"
5831 fi
5832 rm -f conftest*
5833 xe_check_libs=""
5834
5835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5836   echo "$ac_t""yes" 1>&6
5837   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5838 else
5839   echo "$ac_t""no" 1>&6
5840 fi
5841
5842
5843     fi
5844
5845     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5846     # to get the SysV transport functions.
5847     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5848     # needs -lnsl.
5849     # The nsl library prevents programs from opening the X display
5850     # on Irix 5.2, according to dickey@clark.net.
5851     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5852 echo "configure:5853: checking for gethostbyname" >&5
5853
5854 cat > conftest.$ac_ext <<EOF
5855 #line 5856 "configure"
5856 #include "confdefs.h"
5857 /* System header to define __stub macros and hopefully few prototypes,
5858     which can conflict with char gethostbyname(); below.  */
5859 #include <assert.h>
5860 /* Override any gcc2 internal prototype to avoid an error.  */
5861 /* We use char because int might match the return type of a gcc2
5862     builtin and then its argument prototype would still apply.  */
5863 char gethostbyname();
5864
5865 int main() {
5866
5867 /* The GNU C library defines this for functions which it implements
5868     to always fail with ENOSYS.  Some functions are actually named
5869     something starting with __ and the normal name is an alias.  */
5870 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5871 choke me
5872 #else
5873 gethostbyname();
5874 #endif
5875
5876 ; return 0; }
5877 EOF
5878 if { (eval echo configure:5879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5879   rm -rf conftest*
5880   eval "ac_cv_func_gethostbyname=yes"
5881 else
5882   echo "configure: failed program was:" >&5
5883   cat conftest.$ac_ext >&5
5884   rm -rf conftest*
5885   eval "ac_cv_func_gethostbyname=no"
5886 fi
5887 rm -f conftest*
5888
5889 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5890   echo "$ac_t""yes" 1>&6
5891   :
5892 else
5893   echo "$ac_t""no" 1>&6
5894 fi
5895
5896     if test $ac_cv_func_gethostbyname = no; then
5897       
5898 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5899 echo "configure:5900: checking for gethostbyname in -lnsl" >&5
5900 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5901
5902 xe_check_libs=" -lnsl "
5903 cat > conftest.$ac_ext <<EOF
5904 #line 5905 "configure"
5905 #include "confdefs.h"
5906 /* Override any gcc2 internal prototype to avoid an error.  */
5907 /* We use char because int might match the return type of a gcc2
5908     builtin and then its argument prototype would still apply.  */
5909 char gethostbyname();
5910
5911 int main() {
5912 gethostbyname()
5913 ; return 0; }
5914 EOF
5915 if { (eval echo configure:5916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5916   rm -rf conftest*
5917   eval "ac_cv_lib_$ac_lib_var=yes"
5918 else
5919   echo "configure: failed program was:" >&5
5920   cat conftest.$ac_ext >&5
5921   rm -rf conftest*
5922   eval "ac_cv_lib_$ac_lib_var=no"
5923 fi
5924 rm -f conftest*
5925 xe_check_libs=""
5926
5927 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5928   echo "$ac_t""yes" 1>&6
5929   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933
5934
5935     fi
5936
5937     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5938     # socket/setsockopt and other routines are undefined under SCO ODT
5939     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5940     # on later versions), says simon@lia.di.epfl.ch: it contains
5941     # gethostby* variants that don't use the nameserver (or something).
5942     # -lsocket must be given before -lnsl if both are needed.
5943     # We assume that if connect needs -lnsl, so does gethostbyname.
5944     echo $ac_n "checking for connect""... $ac_c" 1>&6
5945 echo "configure:5946: checking for connect" >&5
5946
5947 cat > conftest.$ac_ext <<EOF
5948 #line 5949 "configure"
5949 #include "confdefs.h"
5950 /* System header to define __stub macros and hopefully few prototypes,
5951     which can conflict with char connect(); below.  */
5952 #include <assert.h>
5953 /* Override any gcc2 internal prototype to avoid an error.  */
5954 /* We use char because int might match the return type of a gcc2
5955     builtin and then its argument prototype would still apply.  */
5956 char connect();
5957
5958 int main() {
5959
5960 /* The GNU C library defines this for functions which it implements
5961     to always fail with ENOSYS.  Some functions are actually named
5962     something starting with __ and the normal name is an alias.  */
5963 #if defined (__stub_connect) || defined (__stub___connect)
5964 choke me
5965 #else
5966 connect();
5967 #endif
5968
5969 ; return 0; }
5970 EOF
5971 if { (eval echo configure:5972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5972   rm -rf conftest*
5973   eval "ac_cv_func_connect=yes"
5974 else
5975   echo "configure: failed program was:" >&5
5976   cat conftest.$ac_ext >&5
5977   rm -rf conftest*
5978   eval "ac_cv_func_connect=no"
5979 fi
5980 rm -f conftest*
5981
5982 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5983   echo "$ac_t""yes" 1>&6
5984   :
5985 else
5986   echo "$ac_t""no" 1>&6
5987 fi
5988
5989     if test $ac_cv_func_connect = no; then
5990       
5991 xe_msg_checking="for connect in -lsocket"
5992 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5993 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5994 echo "configure:5995: checking "$xe_msg_checking"" >&5
5995 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5996
5997 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5998 cat > conftest.$ac_ext <<EOF
5999 #line 6000 "configure"
6000 #include "confdefs.h"
6001 /* Override any gcc2 internal prototype to avoid an error.  */
6002 /* We use char because int might match the return type of a gcc2
6003     builtin and then its argument prototype would still apply.  */
6004 char connect();
6005
6006 int main() {
6007 connect()
6008 ; return 0; }
6009 EOF
6010 if { (eval echo configure:6011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=yes"
6013 else
6014   echo "configure: failed program was:" >&5
6015   cat conftest.$ac_ext >&5
6016   rm -rf conftest*
6017   eval "ac_cv_lib_$ac_lib_var=no"
6018 fi
6019 rm -f conftest*
6020 xe_check_libs=""
6021
6022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6023   echo "$ac_t""yes" 1>&6
6024   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6025 else
6026   echo "$ac_t""no" 1>&6
6027 fi
6028
6029
6030     fi
6031
6032     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6033     echo $ac_n "checking for remove""... $ac_c" 1>&6
6034 echo "configure:6035: checking for remove" >&5
6035
6036 cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 /* System header to define __stub macros and hopefully few prototypes,
6040     which can conflict with char remove(); below.  */
6041 #include <assert.h>
6042 /* Override any gcc2 internal prototype to avoid an error.  */
6043 /* We use char because int might match the return type of a gcc2
6044     builtin and then its argument prototype would still apply.  */
6045 char remove();
6046
6047 int main() {
6048
6049 /* The GNU C library defines this for functions which it implements
6050     to always fail with ENOSYS.  Some functions are actually named
6051     something starting with __ and the normal name is an alias.  */
6052 #if defined (__stub_remove) || defined (__stub___remove)
6053 choke me
6054 #else
6055 remove();
6056 #endif
6057
6058 ; return 0; }
6059 EOF
6060 if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6061   rm -rf conftest*
6062   eval "ac_cv_func_remove=yes"
6063 else
6064   echo "configure: failed program was:" >&5
6065   cat conftest.$ac_ext >&5
6066   rm -rf conftest*
6067   eval "ac_cv_func_remove=no"
6068 fi
6069 rm -f conftest*
6070
6071 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6072   echo "$ac_t""yes" 1>&6
6073   :
6074 else
6075   echo "$ac_t""no" 1>&6
6076 fi
6077
6078     if test $ac_cv_func_remove = no; then
6079       
6080 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6081 echo "configure:6082: checking for remove in -lposix" >&5
6082 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6083
6084 xe_check_libs=" -lposix "
6085 cat > conftest.$ac_ext <<EOF
6086 #line 6087 "configure"
6087 #include "confdefs.h"
6088 /* Override any gcc2 internal prototype to avoid an error.  */
6089 /* We use char because int might match the return type of a gcc2
6090     builtin and then its argument prototype would still apply.  */
6091 char remove();
6092
6093 int main() {
6094 remove()
6095 ; return 0; }
6096 EOF
6097 if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6098   rm -rf conftest*
6099   eval "ac_cv_lib_$ac_lib_var=yes"
6100 else
6101   echo "configure: failed program was:" >&5
6102   cat conftest.$ac_ext >&5
6103   rm -rf conftest*
6104   eval "ac_cv_lib_$ac_lib_var=no"
6105 fi
6106 rm -f conftest*
6107 xe_check_libs=""
6108
6109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6110   echo "$ac_t""yes" 1>&6
6111   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6112 else
6113   echo "$ac_t""no" 1>&6
6114 fi
6115
6116
6117     fi
6118
6119     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6120     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6121 echo "configure:6122: checking for shmat" >&5
6122
6123 cat > conftest.$ac_ext <<EOF
6124 #line 6125 "configure"
6125 #include "confdefs.h"
6126 /* System header to define __stub macros and hopefully few prototypes,
6127     which can conflict with char shmat(); below.  */
6128 #include <assert.h>
6129 /* Override any gcc2 internal prototype to avoid an error.  */
6130 /* We use char because int might match the return type of a gcc2
6131     builtin and then its argument prototype would still apply.  */
6132 char shmat();
6133
6134 int main() {
6135
6136 /* The GNU C library defines this for functions which it implements
6137     to always fail with ENOSYS.  Some functions are actually named
6138     something starting with __ and the normal name is an alias.  */
6139 #if defined (__stub_shmat) || defined (__stub___shmat)
6140 choke me
6141 #else
6142 shmat();
6143 #endif
6144
6145 ; return 0; }
6146 EOF
6147 if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6148   rm -rf conftest*
6149   eval "ac_cv_func_shmat=yes"
6150 else
6151   echo "configure: failed program was:" >&5
6152   cat conftest.$ac_ext >&5
6153   rm -rf conftest*
6154   eval "ac_cv_func_shmat=no"
6155 fi
6156 rm -f conftest*
6157
6158 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6159   echo "$ac_t""yes" 1>&6
6160   :
6161 else
6162   echo "$ac_t""no" 1>&6
6163 fi
6164
6165     if test $ac_cv_func_shmat = no; then
6166       
6167 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6168 echo "configure:6169: checking for shmat in -lipc" >&5
6169 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6170
6171 xe_check_libs=" -lipc "
6172 cat > conftest.$ac_ext <<EOF
6173 #line 6174 "configure"
6174 #include "confdefs.h"
6175 /* Override any gcc2 internal prototype to avoid an error.  */
6176 /* We use char because int might match the return type of a gcc2
6177     builtin and then its argument prototype would still apply.  */
6178 char shmat();
6179
6180 int main() {
6181 shmat()
6182 ; return 0; }
6183 EOF
6184 if { (eval echo configure:6185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6185   rm -rf conftest*
6186   eval "ac_cv_lib_$ac_lib_var=yes"
6187 else
6188   echo "configure: failed program was:" >&5
6189   cat conftest.$ac_ext >&5
6190   rm -rf conftest*
6191   eval "ac_cv_lib_$ac_lib_var=no"
6192 fi
6193 rm -f conftest*
6194 xe_check_libs=""
6195
6196 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6197   echo "$ac_t""yes" 1>&6
6198   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6199 else
6200   echo "$ac_t""no" 1>&6
6201 fi
6202
6203
6204     fi
6205   fi
6206
6207   # Check for libraries that X11R6 Xt/Xaw programs need.
6208   ac_save_LDFLAGS="$LDFLAGS"
6209   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6210   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6211   # check for ICE first), but we must link in the order -lSM -lICE or
6212   # we get undefined symbols.  So assume we have SM if we have ICE.
6213   # These have to be linked with before -lX11, unlike the other
6214   # libraries we check for below, so use a different variable.
6215   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6216   
6217 xe_msg_checking="for IceConnectionNumber in -lICE"
6218 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6219 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6220 echo "configure:6221: checking "$xe_msg_checking"" >&5
6221 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6222
6223 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6224 cat > conftest.$ac_ext <<EOF
6225 #line 6226 "configure"
6226 #include "confdefs.h"
6227 /* Override any gcc2 internal prototype to avoid an error.  */
6228 /* We use char because int might match the return type of a gcc2
6229     builtin and then its argument prototype would still apply.  */
6230 char IceConnectionNumber();
6231
6232 int main() {
6233 IceConnectionNumber()
6234 ; return 0; }
6235 EOF
6236 if { (eval echo configure:6237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6237   rm -rf conftest*
6238   eval "ac_cv_lib_$ac_lib_var=yes"
6239 else
6240   echo "configure: failed program was:" >&5
6241   cat conftest.$ac_ext >&5
6242   rm -rf conftest*
6243   eval "ac_cv_lib_$ac_lib_var=no"
6244 fi
6245 rm -f conftest*
6246 xe_check_libs=""
6247
6248 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6249   echo "$ac_t""yes" 1>&6
6250   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6251 else
6252   echo "$ac_t""no" 1>&6
6253 fi
6254
6255
6256   LDFLAGS="$ac_save_LDFLAGS"
6257
6258 fi
6259  # Autoconf claims to find X library and include dirs for us.
6260   if test "$no_x" = "yes"
6261   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6262   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6263   fi
6264 fi
6265
6266
6267 if test "$with_x11" = "yes"; then
6268   { test "$extra_verbose" = "yes" && cat << \EOF
6269     Defining HAVE_X_WINDOWS
6270 EOF
6271 cat >> confdefs.h <<\EOF
6272 #define HAVE_X_WINDOWS 1
6273 EOF
6274 }
6275
6276   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6277   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6278
6279       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6280     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6281     if test -d "$lib_dir" -a -d "$inc_dir"; then
6282       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6283         x_libraries="$lib_dir $x_libraries"
6284         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6285       esac
6286       case "$x_includes" in "$inc_dir"* ) ;; *)
6287         x_includes="$inc_dir $x_includes"
6288         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6289       esac
6290       break;       fi
6291   done
6292
6293     for rel in "X11R6" "X11R5" "X11R4"; do
6294     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6295     if test -d "$lib_dir" -a -d "$inc_dir"; then
6296       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6297         x_libraries="$x_libraries $lib_dir"
6298         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6299       esac
6300       case "$x_includes" in "$inc_dir"* ) ;; *)
6301         x_includes="$x_includes $inc_dir"
6302         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6303       esac
6304       break;     fi
6305   done
6306
6307     case "$opsys" in
6308   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 ;;
6309   esac
6310
6311   ld_switch_x_site="$X_LIBS"
6312
6313   
6314 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6315     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6316   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6317   
6318         runpath="" runpath_dirs=""
6319   if test -n "$LD_RUN_PATH"; then
6320     runpath="$LD_RUN_PATH"
6321   elif test "$GCC" = "yes"; then
6322         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6323     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6324     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6325     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6326       case "$arg" in P,* | -L* | -R* )
6327         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6328           {
6329 xe_runpath_dir="$dir"
6330   test "$xe_runpath_dir" != "/lib"     -a \
6331         "$xe_runpath_dir" != "/usr/lib" -a \
6332         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6333   eval "$xe_add_unique_runpath_dir"
6334 }
6335         done ;;
6336       esac
6337     done
6338     ld_switch_run="$ld_switch_run_save"
6339     rm -f conftest*
6340   else
6341         for arg in $ld_switch_site $ld_switch_x_site; do
6342       case "$arg" in -L*) {
6343 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6344   test "$xe_runpath_dir" != "/lib"     -a \
6345         "$xe_runpath_dir" != "/usr/lib" -a \
6346         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6347   eval "$xe_add_unique_runpath_dir"
6348 };; esac
6349     done
6350         if test "$opsys $need_motif" = "sol2 yes"; then
6351       xe_runpath_dir="/opt/SUNWdt/lib";
6352       eval "$xe_add_unique_runpath_dir";
6353     fi
6354   fi 
6355   if test -n "$runpath"; then
6356     ld_switch_run="${dash_r}${runpath}"
6357     
6358 if test "$GCC" = "yes"; then
6359   set x $ld_switch_run; shift; ld_switch_run=""
6360   while test -n "$1"; do
6361     case $1 in
6362       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6363       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6364       -Xlinker* ) ;;
6365       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6366     esac
6367     shift
6368   done
6369 fi
6370     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6371   fi
6372 fi
6373
6374
6375   if test "$extra_verbose" = "yes"; then
6376     echo; echo "X11 compilation variables:"
6377     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6378     echo
6379   fi
6380
6381             bitmapdirs=
6382   if test "$x_includes" != NONE; then
6383     for i in $x_includes; do
6384       if test -d "$i/bitmaps"; then
6385         bitmapdirs="$i/bitmaps:$bitmapdirs"
6386       fi
6387       if test -d "$i/X11/bitmaps"; then
6388         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6389       fi
6390     done
6391     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6392   fi
6393   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6394     Defining BITMAPDIR = "$bitmapdirs"
6395 EOF
6396 cat >> confdefs.h <<EOF
6397 #define BITMAPDIR "$bitmapdirs"
6398 EOF
6399 }
6400
6401
6402     echo "checking for X defines extracted by xmkmf" 1>&6
6403 echo "configure:6404: checking for X defines extracted by xmkmf" >&5
6404   rm -fr conftestdir
6405   if mkdir conftestdir; then
6406     cd conftestdir
6407     cat > Imakefile <<'EOF'
6408 xetest:
6409         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6410 EOF
6411     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6412       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6413       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6414     fi
6415     cd ..
6416     rm -fr conftestdir
6417     for word in $xmkmf_defines; do
6418       case "$word" in -D* )
6419         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6420         case "$word" in
6421           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6422           *     ) val=1 ;;
6423         esac
6424         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6425           if test "$val" = "1"
6426             then { test "$extra_verbose" = "yes" && cat << EOF
6427     Defining $sym
6428 EOF
6429 cat >> confdefs.h <<EOF
6430 #define $sym 1
6431 EOF
6432 }
6433
6434             else { test "$extra_verbose" = "yes" && cat << EOF
6435     Defining $sym = $val
6436 EOF
6437 cat >> confdefs.h <<EOF
6438 #define $sym $val
6439 EOF
6440 }
6441
6442           fi
6443         fi  ;;
6444       esac
6445     done
6446   fi
6447
6448     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6449 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6450 echo "configure:6451: checking for X11/Intrinsic.h" >&5
6451
6452 cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 #include <X11/Intrinsic.h>
6456 EOF
6457 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6458 { (eval echo configure:6459: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6459 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6460 if test -z "$ac_err"; then
6461   rm -rf conftest*
6462   eval "ac_cv_header_$ac_safe=yes"
6463 else
6464   echo "$ac_err" >&5
6465   echo "configure: failed program was:" >&5
6466   cat conftest.$ac_ext >&5
6467   rm -rf conftest*
6468   eval "ac_cv_header_$ac_safe=no"
6469 fi
6470 rm -f conftest*
6471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6472   echo "$ac_t""yes" 1>&6
6473   :
6474 else
6475   echo "$ac_t""no" 1>&6
6476 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6477 fi
6478
6479
6480       
6481 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6482 echo "configure:6483: checking for XOpenDisplay in -lX11" >&5
6483 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6484
6485 xe_check_libs=" -lX11 "
6486 cat > conftest.$ac_ext <<EOF
6487 #line 6488 "configure"
6488 #include "confdefs.h"
6489 /* Override any gcc2 internal prototype to avoid an error.  */
6490 /* We use char because int might match the return type of a gcc2
6491     builtin and then its argument prototype would still apply.  */
6492 char XOpenDisplay();
6493
6494 int main() {
6495 XOpenDisplay()
6496 ; return 0; }
6497 EOF
6498 if { (eval echo configure:6499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6499   rm -rf conftest*
6500   eval "ac_cv_lib_$ac_lib_var=yes"
6501 else
6502   echo "configure: failed program was:" >&5
6503   cat conftest.$ac_ext >&5
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=no"
6506 fi
6507 rm -f conftest*
6508 xe_check_libs=""
6509
6510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6511   echo "$ac_t""yes" 1>&6
6512   have_lib_x11=yes
6513 else
6514   echo "$ac_t""no" 1>&6
6515 fi
6516
6517
6518   if test "$have_lib_x11" != "yes"; then
6519     
6520 xe_msg_checking="for XGetFontProperty in -lX11"
6521 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6522 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6523 echo "configure:6524: checking "$xe_msg_checking"" >&5
6524 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6525
6526 xe_check_libs=" -lX11 -b i486-linuxaout"
6527 cat > conftest.$ac_ext <<EOF
6528 #line 6529 "configure"
6529 #include "confdefs.h"
6530 /* Override any gcc2 internal prototype to avoid an error.  */
6531 /* We use char because int might match the return type of a gcc2
6532     builtin and then its argument prototype would still apply.  */
6533 char XGetFontProperty();
6534
6535 int main() {
6536 XGetFontProperty()
6537 ; return 0; }
6538 EOF
6539 if { (eval echo configure:6540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6540   rm -rf conftest*
6541   eval "ac_cv_lib_$ac_lib_var=yes"
6542 else
6543   echo "configure: failed program was:" >&5
6544   cat conftest.$ac_ext >&5
6545   rm -rf conftest*
6546   eval "ac_cv_lib_$ac_lib_var=no"
6547 fi
6548 rm -f conftest*
6549 xe_check_libs=""
6550
6551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6552   echo "$ac_t""yes" 1>&6
6553   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6554 else
6555   echo "$ac_t""no" 1>&6
6556 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6557 fi
6558
6559
6560   fi
6561   libs_x="-lX11"
6562   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6563
6564     
6565 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6566 echo "configure:6567: checking for XShapeSelectInput in -lXext" >&5
6567 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6568
6569 xe_check_libs=" -lXext "
6570 cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573 /* Override any gcc2 internal prototype to avoid an error.  */
6574 /* We use char because int might match the return type of a gcc2
6575     builtin and then its argument prototype would still apply.  */
6576 char XShapeSelectInput();
6577
6578 int main() {
6579 XShapeSelectInput()
6580 ; return 0; }
6581 EOF
6582 if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6583   rm -rf conftest*
6584   eval "ac_cv_lib_$ac_lib_var=yes"
6585 else
6586   echo "configure: failed program was:" >&5
6587   cat conftest.$ac_ext >&5
6588   rm -rf conftest*
6589   eval "ac_cv_lib_$ac_lib_var=no"
6590 fi
6591 rm -f conftest*
6592 xe_check_libs=""
6593
6594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6595   echo "$ac_t""yes" 1>&6
6596   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6597 else
6598   echo "$ac_t""no" 1>&6
6599 fi
6600
6601
6602
6603     
6604 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6605 echo "configure:6606: checking for XtOpenDisplay in -lXt" >&5
6606 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6607
6608 xe_check_libs=" -lXt "
6609 cat > conftest.$ac_ext <<EOF
6610 #line 6611 "configure"
6611 #include "confdefs.h"
6612 /* Override any gcc2 internal prototype to avoid an error.  */
6613 /* We use char because int might match the return type of a gcc2
6614     builtin and then its argument prototype would still apply.  */
6615 char XtOpenDisplay();
6616
6617 int main() {
6618 XtOpenDisplay()
6619 ; return 0; }
6620 EOF
6621 if { (eval echo configure:6622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6622   rm -rf conftest*
6623   eval "ac_cv_lib_$ac_lib_var=yes"
6624 else
6625   echo "configure: failed program was:" >&5
6626   cat conftest.$ac_ext >&5
6627   rm -rf conftest*
6628   eval "ac_cv_lib_$ac_lib_var=no"
6629 fi
6630 rm -f conftest*
6631 xe_check_libs=""
6632
6633 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6634   echo "$ac_t""yes" 1>&6
6635   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6636 else
6637   echo "$ac_t""no" 1>&6
6638 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6639 fi
6640
6641
6642
6643   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6644 echo "configure:6645: checking the version of X11 being used" >&5
6645   cat > conftest.$ac_ext <<EOF
6646 #line 6647 "configure"
6647 #include "confdefs.h"
6648 #include <X11/Intrinsic.h>
6649     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6650 EOF
6651 if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6652 then
6653   ./conftest foobar; x11_release=$?
6654 else
6655   conftest_rc="$?"
6656   echo "configure: failed program was:" >&5
6657   cat conftest.$ac_ext >&5
6658   rm -fr conftest*
6659   x11_release=4
6660 fi
6661 rm -fr conftest*
6662   echo "$ac_t""R${x11_release}" 1>&6
6663   { test "$extra_verbose" = "yes" && cat << EOF
6664     Defining THIS_IS_X11R${x11_release}
6665 EOF
6666 cat >> confdefs.h <<EOF
6667 #define THIS_IS_X11R${x11_release} 1
6668 EOF
6669 }
6670
6671
6672   if test "${x11_release}" = "4"; then
6673     case "$with_widgets" in
6674       "" | "no") with_widgets=no ;;
6675       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6676     esac
6677   fi
6678
6679   for ac_func in XConvertCase
6680 do
6681 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6682 echo "configure:6683: checking for $ac_func" >&5
6683
6684 cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6687 /* System header to define __stub macros and hopefully few prototypes,
6688     which can conflict with char $ac_func(); below.  */
6689 #include <assert.h>
6690 /* Override any gcc2 internal prototype to avoid an error.  */
6691 /* We use char because int might match the return type of a gcc2
6692     builtin and then its argument prototype would still apply.  */
6693 char $ac_func();
6694
6695 int main() {
6696
6697 /* The GNU C library defines this for functions which it implements
6698     to always fail with ENOSYS.  Some functions are actually named
6699     something starting with __ and the normal name is an alias.  */
6700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6701 choke me
6702 #else
6703 $ac_func();
6704 #endif
6705
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_func_$ac_func=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_func_$ac_func=no"
6716 fi
6717 rm -f conftest*
6718
6719 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6720   echo "$ac_t""yes" 1>&6
6721     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6722   { test "$extra_verbose" = "yes" && cat << EOF
6723     Defining $ac_tr_func
6724 EOF
6725 cat >> confdefs.h <<EOF
6726 #define $ac_tr_func 1
6727 EOF
6728 }
6729  
6730 else
6731   echo "$ac_t""no" 1>&6
6732 fi
6733 done
6734
6735
6736   for ac_hdr in X11/Xlocale.h
6737 do
6738 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6739 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6740 echo "configure:6741: checking for $ac_hdr" >&5
6741
6742 cat > conftest.$ac_ext <<EOF
6743 #line 6744 "configure"
6744 #include "confdefs.h"
6745 #include <$ac_hdr>
6746 EOF
6747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6748 { (eval echo configure:6749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6750 if test -z "$ac_err"; then
6751   rm -rf conftest*
6752   eval "ac_cv_header_$ac_safe=yes"
6753 else
6754   echo "$ac_err" >&5
6755   echo "configure: failed program was:" >&5
6756   cat conftest.$ac_ext >&5
6757   rm -rf conftest*
6758   eval "ac_cv_header_$ac_safe=no"
6759 fi
6760 rm -f conftest*
6761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6762   echo "$ac_t""yes" 1>&6
6763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6764   { test "$extra_verbose" = "yes" && cat << EOF
6765     Defining $ac_tr_hdr
6766 EOF
6767 cat >> confdefs.h <<EOF
6768 #define $ac_tr_hdr 1
6769 EOF
6770 }
6771  
6772 else
6773   echo "$ac_t""no" 1>&6
6774 fi
6775 done
6776
6777
6778     for ac_func in XRegisterIMInstantiateCallback
6779 do
6780 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6781 echo "configure:6782: checking for $ac_func" >&5
6782
6783 cat > conftest.$ac_ext <<EOF
6784 #line 6785 "configure"
6785 #include "confdefs.h"
6786 /* System header to define __stub macros and hopefully few prototypes,
6787     which can conflict with char $ac_func(); below.  */
6788 #include <assert.h>
6789 /* Override any gcc2 internal prototype to avoid an error.  */
6790 /* We use char because int might match the return type of a gcc2
6791     builtin and then its argument prototype would still apply.  */
6792 char $ac_func();
6793
6794 int main() {
6795
6796 /* The GNU C library defines this for functions which it implements
6797     to always fail with ENOSYS.  Some functions are actually named
6798     something starting with __ and the normal name is an alias.  */
6799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6800 choke me
6801 #else
6802 $ac_func();
6803 #endif
6804
6805 ; return 0; }
6806 EOF
6807 if { (eval echo configure:6808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6808   rm -rf conftest*
6809   eval "ac_cv_func_$ac_func=yes"
6810 else
6811   echo "configure: failed program was:" >&5
6812   cat conftest.$ac_ext >&5
6813   rm -rf conftest*
6814   eval "ac_cv_func_$ac_func=no"
6815 fi
6816 rm -f conftest*
6817
6818 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6819   echo "$ac_t""yes" 1>&6
6820     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6821   { test "$extra_verbose" = "yes" && cat << EOF
6822     Defining $ac_tr_func
6823 EOF
6824 cat >> confdefs.h <<EOF
6825 #define $ac_tr_func 1
6826 EOF
6827 }
6828  
6829 else
6830   echo "$ac_t""no" 1>&6
6831 fi
6832 done
6833
6834   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6835 echo "configure:6836: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6836   cat > conftest.$ac_ext <<EOF
6837 #line 6838 "configure"
6838 #include "confdefs.h"
6839
6840 #define NeedFunctionPrototypes 1
6841 #include <X11/Xlib.h>
6842 extern Bool XRegisterIMInstantiateCallback(
6843    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6844
6845 int main() {
6846
6847 ; return 0; }
6848 EOF
6849 if { (eval echo configure:6850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6850   rm -rf conftest*
6851   echo "$ac_t""yes" 1>&6
6852 else
6853   echo "configure: failed program was:" >&5
6854   cat conftest.$ac_ext >&5
6855   rm -rf conftest*
6856   echo "$ac_t""no" 1>&6
6857    { test "$extra_verbose" = "yes" && cat << \EOF
6858     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6859 EOF
6860 cat >> confdefs.h <<\EOF
6861 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6862 EOF
6863 }
6864
6865 fi
6866 rm -f conftest*
6867
6868     test -z "$with_xmu" && { 
6869 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6870 echo "configure:6871: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6871 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6872
6873 xe_check_libs=" -lXmu "
6874 cat > conftest.$ac_ext <<EOF
6875 #line 6876 "configure"
6876 #include "confdefs.h"
6877 /* Override any gcc2 internal prototype to avoid an error.  */
6878 /* We use char because int might match the return type of a gcc2
6879     builtin and then its argument prototype would still apply.  */
6880 char XmuReadBitmapDataFromFile();
6881
6882 int main() {
6883 XmuReadBitmapDataFromFile()
6884 ; return 0; }
6885 EOF
6886 if { (eval echo configure:6887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6887   rm -rf conftest*
6888   eval "ac_cv_lib_$ac_lib_var=yes"
6889 else
6890   echo "configure: failed program was:" >&5
6891   cat conftest.$ac_ext >&5
6892   rm -rf conftest*
6893   eval "ac_cv_lib_$ac_lib_var=no"
6894 fi
6895 rm -f conftest*
6896 xe_check_libs=""
6897
6898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6899   echo "$ac_t""yes" 1>&6
6900   with_xmu=yes
6901 else
6902   echo "$ac_t""no" 1>&6
6903 with_xmu=no
6904 fi
6905
6906  }
6907   if test "$with_xmu" = "no"; then
6908     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6909    echo "    xemacs will be linked with \"xmu.o\""
6910  fi
6911   else
6912     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6913     { test "$extra_verbose" = "yes" && cat << \EOF
6914     Defining HAVE_XMU
6915 EOF
6916 cat >> confdefs.h <<\EOF
6917 #define HAVE_XMU 1
6918 EOF
6919 }
6920
6921   fi
6922
6923       
6924 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6925 echo "configure:6926: checking for main in -lXbsd" >&5
6926 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6927
6928 xe_check_libs=" -lXbsd "
6929 cat > conftest.$ac_ext <<EOF
6930 #line 6931 "configure"
6931 #include "confdefs.h"
6932
6933 int main() {
6934 main()
6935 ; return 0; }
6936 EOF
6937 if { (eval echo configure:6938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6938   rm -rf conftest*
6939   eval "ac_cv_lib_$ac_lib_var=yes"
6940 else
6941   echo "configure: failed program was:" >&5
6942   cat conftest.$ac_ext >&5
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=no"
6945 fi
6946 rm -f conftest*
6947 xe_check_libs=""
6948
6949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6950   echo "$ac_t""yes" 1>&6
6951   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6952 else
6953   echo "$ac_t""no" 1>&6
6954 fi
6955
6956
6957
6958     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6959         if test "$GCC" = "yes"; then
6960       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6961       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6962     else
6963       case "$CC" in
6964         "xlc" ) CC="xlc_r" ;;
6965         "xlC" ) CC="xlC_r" ;;
6966         "cc"  ) CC="cc_r" ;;
6967       esac
6968     fi
6969   fi
6970
6971 fi 
6972 if test "$with_msw" != "no"; then
6973   echo "checking for MS-Windows" 1>&6
6974 echo "configure:6975: checking for MS-Windows" >&5
6975   
6976 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6977 echo "configure:6978: checking for main in -lgdi32" >&5
6978 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6979
6980 xe_check_libs=" -lgdi32 "
6981 cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984
6985 int main() {
6986 main()
6987 ; return 0; }
6988 EOF
6989 if { (eval echo configure:6990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6990   rm -rf conftest*
6991   eval "ac_cv_lib_$ac_lib_var=yes"
6992 else
6993   echo "configure: failed program was:" >&5
6994   cat conftest.$ac_ext >&5
6995   rm -rf conftest*
6996   eval "ac_cv_lib_$ac_lib_var=no"
6997 fi
6998 rm -f conftest*
6999 xe_check_libs=""
7000
7001 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7002   echo "$ac_t""yes" 1>&6
7003   with_msw=yes
7004 else
7005   echo "$ac_t""no" 1>&6
7006 fi
7007
7008
7009   if test "$with_msw" = "yes"; then
7010     { test "$extra_verbose" = "yes" && cat << \EOF
7011     Defining HAVE_MS_WINDOWS
7012 EOF
7013 cat >> confdefs.h <<\EOF
7014 #define HAVE_MS_WINDOWS 1
7015 EOF
7016 }
7017
7018
7019         if test "$with_netinstall" = "yes"; then
7020       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7021       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7022       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7023     fi
7024
7025     install_pp="$blddir/lib-src/installexe.sh"
7026     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
7027     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7028     if test "$window_system" != x11; then
7029         window_system=msw
7030         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7031             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7032    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7033  fi
7034         test "$with_menubars"   != "no" && with_menubars=msw \
7035             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7036    echo "    xemacs will be linked with \"menubar-msw.o\""
7037  fi
7038         test "$with_toolbars"   != "no" && with_toolbars=msw \
7039             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7040    echo "    xemacs will be linked with \"toolbar-msw.o\""
7041  fi
7042         test "$with_dialogs"   != "no" && with_dialogs=msw \
7043             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7044    echo "    xemacs will be linked with \"dialog-msw.o\""
7045  fi
7046         test "$with_widgets"   != "no" && with_widgets=msw
7047     else
7048         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7049    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7050  fi
7051         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7052    echo "    xemacs will be linked with \"menubar-msw.o\""
7053  fi
7054         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7055    echo "    xemacs will be linked with \"toolbar-msw.o\""
7056  fi
7057         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7058    echo "    xemacs will be linked with \"dialog-msw.o\""
7059  fi
7060     fi
7061         cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 #include <fcntl.h>
7065     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7066 EOF
7067 if { (eval echo configure:7068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7068 then
7069   { test "$extra_verbose" = "yes" && cat << \EOF
7070     Defining HAVE_MSG_SELECT
7071 EOF
7072 cat >> confdefs.h <<\EOF
7073 #define HAVE_MSG_SELECT 1
7074 EOF
7075 }
7076
7077 else
7078   conftest_rc="$?"
7079   echo "configure: failed program was:" >&5
7080   cat conftest.$ac_ext >&5
7081 fi
7082 rm -fr conftest*
7083     with_file_coding=yes
7084     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
7085    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\""
7086  fi
7087   fi
7088 fi
7089
7090
7091
7092 test -z "$window_system" && window_system="none"
7093
7094 if test "$window_system" = "none"; then
7095   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7096   do
7097     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7098        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7099     fi
7100     eval "with_${feature}=no"
7101   done
7102 else
7103   test -z "$with_toolbars" && with_toolbars=yes
7104 fi
7105
7106 if test "$with_msw" != "yes"; then
7107   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7108   do
7109     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7110        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7111     fi
7112     eval "with_${feature}=no"
7113   done
7114 else
7115   :
7116 fi
7117
7118 if test "$with_x11" != "yes"; then
7119             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7120   do
7121     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7122        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7123     fi
7124     eval "with_${feature}=no"
7125   done
7126 fi
7127
7128 if test "$with_x11" = "yes"; then
7129   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7130 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7131 echo "configure:7132: checking for X11/extensions/shape.h" >&5
7132
7133 cat > conftest.$ac_ext <<EOF
7134 #line 7135 "configure"
7135 #include "confdefs.h"
7136 #include <X11/extensions/shape.h>
7137 EOF
7138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7139 { (eval echo configure:7140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7141 if test -z "$ac_err"; then
7142   rm -rf conftest*
7143   eval "ac_cv_header_$ac_safe=yes"
7144 else
7145   echo "$ac_err" >&5
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -rf conftest*
7149   eval "ac_cv_header_$ac_safe=no"
7150 fi
7151 rm -f conftest*
7152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7153   echo "$ac_t""yes" 1>&6
7154   
7155    { test "$extra_verbose" = "yes" && cat << \EOF
7156     Defining HAVE_BALLOON_HELP
7157 EOF
7158 cat >> confdefs.h <<\EOF
7159 #define HAVE_BALLOON_HELP 1
7160 EOF
7161 }
7162
7163    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7164    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7165  fi
7166 else
7167   echo "$ac_t""no" 1>&6
7168 fi
7169
7170 fi
7171
7172 bitmapdir=
7173
7174 case "$window_system" in
7175   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7176   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7177   gtk  )
7178        HAVE_X_WINDOWS=no
7179        test "$with_gnome" = "yes" && echo "  Using GNOME."
7180        test "$with_gnome" = "no" && echo "  Using GTK."
7181        ;;
7182   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7183 esac
7184
7185 case "$x_libraries" in *X11R4* )
7186   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7187   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7188 esac
7189
7190 echo "checking for WM_COMMAND option" 1>&6
7191 echo "configure:7192: checking for WM_COMMAND option" >&5;
7192 if test "$with_wmcommand" != "no"; then
7193   { test "$extra_verbose" = "yes" && cat << \EOF
7194     Defining HAVE_WMCOMMAND
7195 EOF
7196 cat >> confdefs.h <<\EOF
7197 #define HAVE_WMCOMMAND 1
7198 EOF
7199 }
7200
7201 fi
7202
7203 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7204 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7205 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7206 echo "configure:7207: checking for X11/Xauth.h" >&5
7207
7208 cat > conftest.$ac_ext <<EOF
7209 #line 7210 "configure"
7210 #include "confdefs.h"
7211 #include <X11/Xauth.h>
7212 EOF
7213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7214 { (eval echo configure:7215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7216 if test -z "$ac_err"; then
7217   rm -rf conftest*
7218   eval "ac_cv_header_$ac_safe=yes"
7219 else
7220   echo "$ac_err" >&5
7221   echo "configure: failed program was:" >&5
7222   cat conftest.$ac_ext >&5
7223   rm -rf conftest*
7224   eval "ac_cv_header_$ac_safe=no"
7225 fi
7226 rm -f conftest*
7227 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7228   echo "$ac_t""yes" 1>&6
7229   :
7230 else
7231   echo "$ac_t""no" 1>&6
7232 with_xauth=no
7233 fi
7234  }
7235 test -z "$with_xauth" && { 
7236 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7237 echo "configure:7238: checking for XauGetAuthByAddr in -lXau" >&5
7238 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7239
7240 xe_check_libs=" -lXau "
7241 cat > conftest.$ac_ext <<EOF
7242 #line 7243 "configure"
7243 #include "confdefs.h"
7244 /* Override any gcc2 internal prototype to avoid an error.  */
7245 /* We use char because int might match the return type of a gcc2
7246     builtin and then its argument prototype would still apply.  */
7247 char XauGetAuthByAddr();
7248
7249 int main() {
7250 XauGetAuthByAddr()
7251 ; return 0; }
7252 EOF
7253 if { (eval echo configure:7254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7254   rm -rf conftest*
7255   eval "ac_cv_lib_$ac_lib_var=yes"
7256 else
7257   echo "configure: failed program was:" >&5
7258   cat conftest.$ac_ext >&5
7259   rm -rf conftest*
7260   eval "ac_cv_lib_$ac_lib_var=no"
7261 fi
7262 rm -f conftest*
7263 xe_check_libs=""
7264
7265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7266   echo "$ac_t""yes" 1>&6
7267   :
7268 else
7269   echo "$ac_t""no" 1>&6
7270 with_xauth=no
7271 fi
7272
7273  }
7274 test -z "$with_xauth" && with_xauth=yes
7275 if test "$with_xauth" = "yes"; then
7276   { test "$extra_verbose" = "yes" && cat << \EOF
7277     Defining HAVE_XAUTH
7278 EOF
7279 cat >> confdefs.h <<\EOF
7280 #define HAVE_XAUTH 1
7281 EOF
7282 }
7283
7284   
7285 T=""
7286 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
7287 libs_xauth="$T"
7288
7289 fi
7290
7291
7292
7293
7294 if test "$with_tooltalk" != "no" ; then
7295       for dir in "" "Tt/" "desktop/" ; do
7296     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7297 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7298 echo "configure:7299: checking for ${dir}tt_c.h" >&5
7299
7300 cat > conftest.$ac_ext <<EOF
7301 #line 7302 "configure"
7302 #include "confdefs.h"
7303 #include <${dir}tt_c.h>
7304 EOF
7305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7306 { (eval echo configure:7307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7308 if test -z "$ac_err"; then
7309   rm -rf conftest*
7310   eval "ac_cv_header_$ac_safe=yes"
7311 else
7312   echo "$ac_err" >&5
7313   echo "configure: failed program was:" >&5
7314   cat conftest.$ac_ext >&5
7315   rm -rf conftest*
7316   eval "ac_cv_header_$ac_safe=no"
7317 fi
7318 rm -f conftest*
7319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7320   echo "$ac_t""yes" 1>&6
7321   tt_c_h_file="${dir}tt_c.h"; break
7322 else
7323   echo "$ac_t""no" 1>&6
7324 fi
7325
7326   done
7327   if test -z "$tt_c_h_file"; then
7328     if test "$with_tooltalk" = "yes"; then
7329       (echo "$progname: Usage error:"
7330 echo " " "Unable to find required tooltalk header files."
7331 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7332     fi
7333     with_tooltalk=no
7334   fi
7335 fi
7336 if test "$with_tooltalk" != "no" ; then
7337   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7338     
7339 xe_msg_checking="for tt_message_create in -ltt"
7340 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7341 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7342 echo "configure:7343: checking "$xe_msg_checking"" >&5
7343 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7344
7345 xe_check_libs=" -ltt $extra_libs"
7346 cat > conftest.$ac_ext <<EOF
7347 #line 7348 "configure"
7348 #include "confdefs.h"
7349 /* Override any gcc2 internal prototype to avoid an error.  */
7350 /* We use char because int might match the return type of a gcc2
7351     builtin and then its argument prototype would still apply.  */
7352 char tt_message_create();
7353
7354 int main() {
7355 tt_message_create()
7356 ; return 0; }
7357 EOF
7358 if { (eval echo configure:7359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7359   rm -rf conftest*
7360   eval "ac_cv_lib_$ac_lib_var=yes"
7361 else
7362   echo "configure: failed program was:" >&5
7363   cat conftest.$ac_ext >&5
7364   rm -rf conftest*
7365   eval "ac_cv_lib_$ac_lib_var=no"
7366 fi
7367 rm -f conftest*
7368 xe_check_libs=""
7369
7370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7371   echo "$ac_t""yes" 1>&6
7372   tt_libs="-ltt $extra_libs"; break
7373 else
7374   echo "$ac_t""no" 1>&6
7375 :
7376 fi
7377
7378
7379   done
7380   if test -z "$tt_libs"; then
7381     if test "$with_tooltalk" = "yes"; then
7382       (echo "$progname: Usage error:"
7383 echo " " "Unable to find required tooltalk libraries."
7384 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7385     fi
7386     with_tooltalk=no
7387   fi
7388 fi
7389 test -z "$with_tooltalk" && with_tooltalk=yes
7390 if test "$with_tooltalk" = "yes"; then
7391   { test "$extra_verbose" = "yes" && cat << \EOF
7392     Defining TOOLTALK
7393 EOF
7394 cat >> confdefs.h <<\EOF
7395 #define TOOLTALK 1
7396 EOF
7397 }
7398
7399   { test "$extra_verbose" = "yes" && cat << EOF
7400     Defining TT_C_H_FILE = "$tt_c_h_file"
7401 EOF
7402 cat >> confdefs.h <<EOF
7403 #define TT_C_H_FILE "$tt_c_h_file"
7404 EOF
7405 }
7406
7407   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7408   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7409    echo "    xemacs will be linked with \"tooltalk.o\""
7410  fi
7411 fi
7412
7413 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7414 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7415 echo "configure:7416: checking for Dt/Dt.h" >&5
7416
7417 cat > conftest.$ac_ext <<EOF
7418 #line 7419 "configure"
7419 #include "confdefs.h"
7420 #include <Dt/Dt.h>
7421 EOF
7422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7423 { (eval echo configure:7424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7425 if test -z "$ac_err"; then
7426   rm -rf conftest*
7427   eval "ac_cv_header_$ac_safe=yes"
7428 else
7429   echo "$ac_err" >&5
7430   echo "configure: failed program was:" >&5
7431   cat conftest.$ac_ext >&5
7432   rm -rf conftest*
7433   eval "ac_cv_header_$ac_safe=no"
7434 fi
7435 rm -f conftest*
7436 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7437   echo "$ac_t""yes" 1>&6
7438   :
7439 else
7440   echo "$ac_t""no" 1>&6
7441 with_cde=no
7442 fi
7443  }
7444 test -z "$with_cde" && { 
7445 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7446 echo "configure:7447: checking for DtDndDragStart in -lDtSvc" >&5
7447 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7448
7449 xe_check_libs=" -lDtSvc "
7450 cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 /* Override any gcc2 internal prototype to avoid an error.  */
7454 /* We use char because int might match the return type of a gcc2
7455     builtin and then its argument prototype would still apply.  */
7456 char DtDndDragStart();
7457
7458 int main() {
7459 DtDndDragStart()
7460 ; return 0; }
7461 EOF
7462 if { (eval echo configure:7463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463   rm -rf conftest*
7464   eval "ac_cv_lib_$ac_lib_var=yes"
7465 else
7466   echo "configure: failed program was:" >&5
7467   cat conftest.$ac_ext >&5
7468   rm -rf conftest*
7469   eval "ac_cv_lib_$ac_lib_var=no"
7470 fi
7471 rm -f conftest*
7472 xe_check_libs=""
7473
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7475   echo "$ac_t""yes" 1>&6
7476   :
7477 else
7478   echo "$ac_t""no" 1>&6
7479 with_cde=no
7480 fi
7481
7482  }
7483 test -z "$with_cde" && with_cde=yes
7484 if test "$with_dragndrop" = no; then
7485   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7486   with_cde=no
7487 fi
7488 if test "$with_cde" = "yes" ; then
7489   { test "$extra_verbose" = "yes" && cat << \EOF
7490     Defining HAVE_CDE
7491 EOF
7492 cat >> confdefs.h <<\EOF
7493 #define HAVE_CDE 1
7494 EOF
7495 }
7496
7497   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7498   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7499   with_tooltalk=yes # CDE requires Tooltalk
7500   need_motif=yes    # CDE requires Motif
7501 fi
7502
7503 test "$window_system" != "x11" && with_offix=no
7504 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7505   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7506   with_offix=no
7507 fi
7508 if test "$with_dragndrop" = no; then
7509   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7510   with_offix=no
7511 fi
7512 if test "$with_cde" = yes; then
7513   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7514   with_offix=no
7515 fi
7516 test -z "$with_offix" && with_offix=no
7517 if test "$with_offix" = "yes"; then
7518   { test "$extra_verbose" = "yes" && cat << \EOF
7519     Defining HAVE_OFFIX_DND
7520 EOF
7521 cat >> confdefs.h <<\EOF
7522 #define HAVE_OFFIX_DND 1
7523 EOF
7524 }
7525
7526   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7527   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7528 fi
7529 if test "$with_gtk" = "yes"; then
7530    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7531 fi
7532
7533 if test "$with_dragndrop" != "no" ; then
7534   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7535 echo "configure:7536: checking if drag and drop API is needed" >&5
7536   if test -n "$dragndrop_proto" ; then
7537     with_dragndrop=yes
7538     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7539     { test "$extra_verbose" = "yes" && cat << \EOF
7540     Defining HAVE_DRAGNDROP
7541 EOF
7542 cat >> confdefs.h <<\EOF
7543 #define HAVE_DRAGNDROP 1
7544 EOF
7545 }
7546
7547     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7548   else
7549     with_dragndrop=no
7550     echo "$ac_t""no" 1>&6
7551   fi
7552 fi
7553
7554 echo "checking for LDAP" 1>&6
7555 echo "configure:7556: checking for LDAP" >&5
7556 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7557 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7558 echo "configure:7559: checking for ldap.h" >&5
7559
7560 cat > conftest.$ac_ext <<EOF
7561 #line 7562 "configure"
7562 #include "confdefs.h"
7563 #include <ldap.h>
7564 EOF
7565 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7566 { (eval echo configure:7567: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7567 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7568 if test -z "$ac_err"; then
7569   rm -rf conftest*
7570   eval "ac_cv_header_$ac_safe=yes"
7571 else
7572   echo "$ac_err" >&5
7573   echo "configure: failed program was:" >&5
7574   cat conftest.$ac_ext >&5
7575   rm -rf conftest*
7576   eval "ac_cv_header_$ac_safe=no"
7577 fi
7578 rm -f conftest*
7579 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7580   echo "$ac_t""yes" 1>&6
7581   :
7582 else
7583   echo "$ac_t""no" 1>&6
7584 with_ldap=no
7585 fi
7586  }
7587 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7588 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7589 echo "configure:7590: checking for lber.h" >&5
7590
7591 cat > conftest.$ac_ext <<EOF
7592 #line 7593 "configure"
7593 #include "confdefs.h"
7594 #include <lber.h>
7595 EOF
7596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7597 { (eval echo configure:7598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7599 if test -z "$ac_err"; then
7600   rm -rf conftest*
7601   eval "ac_cv_header_$ac_safe=yes"
7602 else
7603   echo "$ac_err" >&5
7604   echo "configure: failed program was:" >&5
7605   cat conftest.$ac_ext >&5
7606   rm -rf conftest*
7607   eval "ac_cv_header_$ac_safe=no"
7608 fi
7609 rm -f conftest*
7610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7611   echo "$ac_t""yes" 1>&6
7612   :
7613 else
7614   echo "$ac_t""no" 1>&6
7615 with_ldap=no
7616 fi
7617  }
7618 if test "$with_ldap" != "no"; then
7619   
7620 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7621 echo "configure:7622: checking for ldap_search in -lldap" >&5
7622 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7623
7624 xe_check_libs=" -lldap "
7625 cat > conftest.$ac_ext <<EOF
7626 #line 7627 "configure"
7627 #include "confdefs.h"
7628 /* Override any gcc2 internal prototype to avoid an error.  */
7629 /* We use char because int might match the return type of a gcc2
7630     builtin and then its argument prototype would still apply.  */
7631 char ldap_search();
7632
7633 int main() {
7634 ldap_search()
7635 ; return 0; }
7636 EOF
7637 if { (eval echo configure:7638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7638   rm -rf conftest*
7639   eval "ac_cv_lib_$ac_lib_var=yes"
7640 else
7641   echo "configure: failed program was:" >&5
7642   cat conftest.$ac_ext >&5
7643   rm -rf conftest*
7644   eval "ac_cv_lib_$ac_lib_var=no"
7645 fi
7646 rm -f conftest*
7647 xe_check_libs=""
7648
7649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7650   echo "$ac_t""yes" 1>&6
7651   with_ldap_nolber=yes
7652 else
7653   echo "$ac_t""no" 1>&6
7654 with_ldap_nolber=no
7655 fi
7656
7657
7658   test "$with_ldap_nolber" = "no" && { 
7659 xe_msg_checking="for ldap_open in -lldap"
7660 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7661 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7662 echo "configure:7663: checking "$xe_msg_checking"" >&5
7663 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7664
7665 xe_check_libs=" -lldap -llber"
7666 cat > conftest.$ac_ext <<EOF
7667 #line 7668 "configure"
7668 #include "confdefs.h"
7669 /* Override any gcc2 internal prototype to avoid an error.  */
7670 /* We use char because int might match the return type of a gcc2
7671     builtin and then its argument prototype would still apply.  */
7672 char ldap_open();
7673
7674 int main() {
7675 ldap_open()
7676 ; return 0; }
7677 EOF
7678 if { (eval echo configure:7679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7679   rm -rf conftest*
7680   eval "ac_cv_lib_$ac_lib_var=yes"
7681 else
7682   echo "configure: failed program was:" >&5
7683   cat conftest.$ac_ext >&5
7684   rm -rf conftest*
7685   eval "ac_cv_lib_$ac_lib_var=no"
7686 fi
7687 rm -f conftest*
7688 xe_check_libs=""
7689
7690 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7691   echo "$ac_t""yes" 1>&6
7692   with_ldap_lber=yes
7693 else
7694   echo "$ac_t""no" 1>&6
7695 with_ldap_lber=no
7696 fi
7697
7698  }
7699   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7700 xe_msg_checking="for ldap_open in -lldap"
7701 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7702 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7703 echo "configure:7704: checking "$xe_msg_checking"" >&5
7704 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7705
7706 xe_check_libs=" -lldap -llber -lkrb"
7707 cat > conftest.$ac_ext <<EOF
7708 #line 7709 "configure"
7709 #include "confdefs.h"
7710 /* Override any gcc2 internal prototype to avoid an error.  */
7711 /* We use char because int might match the return type of a gcc2
7712     builtin and then its argument prototype would still apply.  */
7713 char ldap_open();
7714
7715 int main() {
7716 ldap_open()
7717 ; return 0; }
7718 EOF
7719 if { (eval echo configure:7720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7720   rm -rf conftest*
7721   eval "ac_cv_lib_$ac_lib_var=yes"
7722 else
7723   echo "configure: failed program was:" >&5
7724   cat conftest.$ac_ext >&5
7725   rm -rf conftest*
7726   eval "ac_cv_lib_$ac_lib_var=no"
7727 fi
7728 rm -f conftest*
7729 xe_check_libs=""
7730
7731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7732   echo "$ac_t""yes" 1>&6
7733   with_ldap_krb=yes
7734 else
7735   echo "$ac_t""no" 1>&6
7736 with_ldap_krb=no
7737 fi
7738
7739  }
7740   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7741 xe_msg_checking="for ldap_open in -lldap"
7742 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7743 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7744 echo "configure:7745: checking "$xe_msg_checking"" >&5
7745 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7746
7747 xe_check_libs=" -lldap -llber -lkrb -ldes"
7748 cat > conftest.$ac_ext <<EOF
7749 #line 7750 "configure"
7750 #include "confdefs.h"
7751 /* Override any gcc2 internal prototype to avoid an error.  */
7752 /* We use char because int might match the return type of a gcc2
7753     builtin and then its argument prototype would still apply.  */
7754 char ldap_open();
7755
7756 int main() {
7757 ldap_open()
7758 ; return 0; }
7759 EOF
7760 if { (eval echo configure:7761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7761   rm -rf conftest*
7762   eval "ac_cv_lib_$ac_lib_var=yes"
7763 else
7764   echo "configure: failed program was:" >&5
7765   cat conftest.$ac_ext >&5
7766   rm -rf conftest*
7767   eval "ac_cv_lib_$ac_lib_var=no"
7768 fi
7769 rm -f conftest*
7770 xe_check_libs=""
7771
7772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7773   echo "$ac_t""yes" 1>&6
7774   with_ldap_krbdes=yes
7775 else
7776   echo "$ac_t""no" 1>&6
7777 with_ldap_krbdes=no
7778 fi
7779
7780  }
7781   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
7782 fi
7783 if test "$with_ldap" = "yes"; then
7784   { test "$extra_verbose" = "yes" && cat << \EOF
7785     Defining HAVE_LDAP
7786 EOF
7787 cat >> confdefs.h <<\EOF
7788 #define HAVE_LDAP 1
7789 EOF
7790 }
7791
7792   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7793    echo "    xemacs will be linked with \"eldap.o\""
7794  fi
7795   if test "$with_ldap_nolber" = "yes" ; then
7796     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7797   else
7798     if test "$with_ldap_krb" = "yes" ; then
7799       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7800     fi
7801     if test "$with_ldap_krbdes" = "yes" ; then
7802       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7803       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7804     fi
7805     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7806     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7807   fi
7808   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7809 do
7810 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7811 echo "configure:7812: checking for $ac_func" >&5
7812
7813 cat > conftest.$ac_ext <<EOF
7814 #line 7815 "configure"
7815 #include "confdefs.h"
7816 /* System header to define __stub macros and hopefully few prototypes,
7817     which can conflict with char $ac_func(); below.  */
7818 #include <assert.h>
7819 /* Override any gcc2 internal prototype to avoid an error.  */
7820 /* We use char because int might match the return type of a gcc2
7821     builtin and then its argument prototype would still apply.  */
7822 char $ac_func();
7823
7824 int main() {
7825
7826 /* The GNU C library defines this for functions which it implements
7827     to always fail with ENOSYS.  Some functions are actually named
7828     something starting with __ and the normal name is an alias.  */
7829 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7830 choke me
7831 #else
7832 $ac_func();
7833 #endif
7834
7835 ; return 0; }
7836 EOF
7837 if { (eval echo configure:7838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7838   rm -rf conftest*
7839   eval "ac_cv_func_$ac_func=yes"
7840 else
7841   echo "configure: failed program was:" >&5
7842   cat conftest.$ac_ext >&5
7843   rm -rf conftest*
7844   eval "ac_cv_func_$ac_func=no"
7845 fi
7846 rm -f conftest*
7847
7848 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7849   echo "$ac_t""yes" 1>&6
7850     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7851   { test "$extra_verbose" = "yes" && cat << EOF
7852     Defining $ac_tr_func
7853 EOF
7854 cat >> confdefs.h <<EOF
7855 #define $ac_tr_func 1
7856 EOF
7857 }
7858  
7859 else
7860   echo "$ac_t""no" 1>&6
7861 fi
7862 done
7863
7864 fi
7865
7866 if test "$with_postgresql" != "no"; then
7867   echo "checking for PostgreSQL" 1>&6
7868 echo "configure:7869: checking for PostgreSQL" >&5
7869
7870   for header_dir in "" "pgsql/" "postgresql/"; do
7871     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7872 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7873 echo "configure:7874: checking for ${header_dir}libpq-fe.h" >&5
7874
7875 cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 #include <${header_dir}libpq-fe.h>
7879 EOF
7880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7881 { (eval echo configure:7882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7883 if test -z "$ac_err"; then
7884   rm -rf conftest*
7885   eval "ac_cv_header_$ac_safe=yes"
7886 else
7887   echo "$ac_err" >&5
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891   eval "ac_cv_header_$ac_safe=no"
7892 fi
7893 rm -f conftest*
7894 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7895   echo "$ac_t""yes" 1>&6
7896   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7897 else
7898   echo "$ac_t""no" 1>&6
7899 fi
7900
7901   done
7902
7903   test -n "$libpq_fe_h_file" && { 
7904 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7905 echo "configure:7906: checking for PQconnectdb in -lpq" >&5
7906 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7907
7908 xe_check_libs=" -lpq "
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* Override any gcc2 internal prototype to avoid an error.  */
7913 /* We use char because int might match the return type of a gcc2
7914     builtin and then its argument prototype would still apply.  */
7915 char PQconnectdb();
7916
7917 int main() {
7918 PQconnectdb()
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7922   rm -rf conftest*
7923   eval "ac_cv_lib_$ac_lib_var=yes"
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   eval "ac_cv_lib_$ac_lib_var=no"
7929 fi
7930 rm -f conftest*
7931 xe_check_libs=""
7932
7933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7934   echo "$ac_t""yes" 1>&6
7935   have_libpq=yes
7936 else
7937   echo "$ac_t""no" 1>&6
7938 fi
7939
7940  }
7941
7942   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7943     with_postgresql=yes
7944     { test "$extra_verbose" = "yes" && cat << \EOF
7945     Defining HAVE_POSTGRESQL
7946 EOF
7947 cat >> confdefs.h <<\EOF
7948 #define HAVE_POSTGRESQL 1
7949 EOF
7950 }
7951
7952     
7953 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7954 echo "configure:7955: checking for PQconnectStart in -lpq" >&5
7955 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7956
7957 xe_check_libs=" -lpq "
7958 cat > conftest.$ac_ext <<EOF
7959 #line 7960 "configure"
7960 #include "confdefs.h"
7961 /* Override any gcc2 internal prototype to avoid an error.  */
7962 /* We use char because int might match the return type of a gcc2
7963     builtin and then its argument prototype would still apply.  */
7964 char PQconnectStart();
7965
7966 int main() {
7967 PQconnectStart()
7968 ; return 0; }
7969 EOF
7970 if { (eval echo configure:7971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7971   rm -rf conftest*
7972   eval "ac_cv_lib_$ac_lib_var=yes"
7973 else
7974   echo "configure: failed program was:" >&5
7975   cat conftest.$ac_ext >&5
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=no"
7978 fi
7979 rm -f conftest*
7980 xe_check_libs=""
7981
7982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7983   echo "$ac_t""yes" 1>&6
7984   with_postgresqlv7=yes;
7985                  { test "$extra_verbose" = "yes" && cat << \EOF
7986     Defining HAVE_POSTGRESQLV7
7987 EOF
7988 cat >> confdefs.h <<\EOF
7989 #define HAVE_POSTGRESQLV7 1
7990 EOF
7991 }
7992
7993 else
7994   echo "$ac_t""no" 1>&6
7995 fi
7996
7997
7998     { test "$extra_verbose" = "yes" && cat << EOF
7999     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8000 EOF
8001 cat >> confdefs.h <<EOF
8002 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8003 EOF
8004 }
8005
8006     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8007     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8008    echo "    xemacs will be linked with \"postgresql.o\""
8009  fi
8010   elif test "$with_postgresql" = "yes"; then
8011     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8012   fi
8013 fi
8014
8015
8016 if test "$window_system" != "none"; then
8017   echo "checking for graphics libraries" 1>&6
8018 echo "configure:8019: checking for graphics libraries" >&5
8019
8020     xpm_problem=""
8021   if test -z "$with_xpm"; then
8022     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8023 echo "configure:8024: checking for Xpm - no older than 3.4f" >&5
8024     xe_check_libs=-lXpm
8025     cat > conftest.$ac_ext <<EOF
8026 #line 8027 "configure"
8027 #include "confdefs.h"
8028 #define XPM_NUMBERS
8029 #include <X11/xpm.h>
8030     int main(int c, char **v) {
8031     return c == 1 ? 0 :
8032       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8033       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8034 EOF
8035 if { (eval echo configure:8036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8036 then
8037   ./conftest dummy_arg; xpm_status=$?;
8038       if test "$xpm_status" = "0"; then
8039         with_xpm=yes;
8040       else
8041         with_xpm=no;
8042         if test "$xpm_status" = "1"; then
8043           xpm_problem="Xpm library version and header file version don't match!"
8044         elif test "$xpm_status" = "2"; then
8045           xpm_problem="Xpm library version is too old!"
8046         else
8047           xpm_problem="Internal xpm detection logic error!"
8048         fi
8049         echo "
8050 *** WARNING *** $xpm_problem
8051   I'm not touching that with a 10-foot pole!
8052   If you really want to use the installed version of Xpm, rerun
8053   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8054     fi
8055 else
8056   conftest_rc="$?"
8057   echo "configure: failed program was:" >&5
8058   cat conftest.$ac_ext >&5
8059   rm -fr conftest*
8060   with_xpm=no
8061 fi
8062 rm -fr conftest*
8063     xe_check_libs=
8064     echo "$ac_t""$with_xpm" 1>&6
8065   fi
8066   if test "$with_xpm" = "yes"; then
8067                 { test "$extra_verbose" = "yes" && cat << \EOF
8068     Defining HAVE_XPM
8069 EOF
8070 cat >> confdefs.h <<\EOF
8071 #define HAVE_XPM 1
8072 EOF
8073 }
8074
8075     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8076     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8077 echo "configure:8078: checking for \"FOR_MSW\" xpm" >&5
8078     xe_check_libs=-lXpm
8079     cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082
8083 int main() {
8084 XpmCreatePixmapFromData()
8085 ; return 0; }
8086 EOF
8087 if { (eval echo configure:8088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8088   rm -rf conftest*
8089   xpm_for_msw=no
8090 else
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   xpm_for_msw=yes
8095 fi
8096 rm -f conftest*
8097     xe_check_libs=
8098     echo "$ac_t""$xpm_for_msw" 1>&6
8099     if test "$xpm_for_msw" = "yes"; then
8100       { test "$extra_verbose" = "yes" && cat << \EOF
8101     Defining FOR_MSW
8102 EOF
8103 cat >> confdefs.h <<\EOF
8104 #define FOR_MSW 1
8105 EOF
8106 }
8107
8108     fi
8109   fi
8110
8111     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8112 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8113 echo "configure:8114: checking for compface.h" >&5
8114
8115 cat > conftest.$ac_ext <<EOF
8116 #line 8117 "configure"
8117 #include "confdefs.h"
8118 #include <compface.h>
8119 EOF
8120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8121 { (eval echo configure:8122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8123 if test -z "$ac_err"; then
8124   rm -rf conftest*
8125   eval "ac_cv_header_$ac_safe=yes"
8126 else
8127   echo "$ac_err" >&5
8128   echo "configure: failed program was:" >&5
8129   cat conftest.$ac_ext >&5
8130   rm -rf conftest*
8131   eval "ac_cv_header_$ac_safe=no"
8132 fi
8133 rm -f conftest*
8134 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8135   echo "$ac_t""yes" 1>&6
8136   :
8137 else
8138   echo "$ac_t""no" 1>&6
8139 with_xface=no
8140 fi
8141  }
8142   test -z "$with_xface" && { 
8143 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8144 echo "configure:8145: checking for UnGenFace in -lcompface" >&5
8145 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8146
8147 xe_check_libs=" -lcompface "
8148 cat > conftest.$ac_ext <<EOF
8149 #line 8150 "configure"
8150 #include "confdefs.h"
8151 /* Override any gcc2 internal prototype to avoid an error.  */
8152 /* We use char because int might match the return type of a gcc2
8153     builtin and then its argument prototype would still apply.  */
8154 char UnGenFace();
8155
8156 int main() {
8157 UnGenFace()
8158 ; return 0; }
8159 EOF
8160 if { (eval echo configure:8161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8161   rm -rf conftest*
8162   eval "ac_cv_lib_$ac_lib_var=yes"
8163 else
8164   echo "configure: failed program was:" >&5
8165   cat conftest.$ac_ext >&5
8166   rm -rf conftest*
8167   eval "ac_cv_lib_$ac_lib_var=no"
8168 fi
8169 rm -f conftest*
8170 xe_check_libs=""
8171
8172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8173   echo "$ac_t""yes" 1>&6
8174   : 
8175 else
8176   echo "$ac_t""no" 1>&6
8177 with_xface=no
8178 fi
8179
8180  }
8181   test -z "$with_xface" && with_xface=yes
8182   if test "$with_xface" = "yes"; then
8183     { test "$extra_verbose" = "yes" && cat << \EOF
8184     Defining HAVE_XFACE
8185 EOF
8186 cat >> confdefs.h <<\EOF
8187 #define HAVE_XFACE 1
8188 EOF
8189 }
8190
8191     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8192   fi
8193
8194         if test "$with_gif" != "no"; then
8195     with_gif="yes"
8196     { test "$extra_verbose" = "yes" && cat << \EOF
8197     Defining HAVE_GIF
8198 EOF
8199 cat >> confdefs.h <<\EOF
8200 #define HAVE_GIF 1
8201 EOF
8202 }
8203
8204     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8205    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8206  fi
8207   fi
8208
8209       if test "$with_png $with_tiff" != "no no"; then
8210     
8211 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8212 echo "configure:8213: checking for inflate in -lc" >&5
8213 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8214
8215 xe_check_libs=" -lc "
8216 cat > conftest.$ac_ext <<EOF
8217 #line 8218 "configure"
8218 #include "confdefs.h"
8219 /* Override any gcc2 internal prototype to avoid an error.  */
8220 /* We use char because int might match the return type of a gcc2
8221     builtin and then its argument prototype would still apply.  */
8222 char inflate();
8223
8224 int main() {
8225 inflate()
8226 ; return 0; }
8227 EOF
8228 if { (eval echo configure:8229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8229   rm -rf conftest*
8230   eval "ac_cv_lib_$ac_lib_var=yes"
8231 else
8232   echo "configure: failed program was:" >&5
8233   cat conftest.$ac_ext >&5
8234   rm -rf conftest*
8235   eval "ac_cv_lib_$ac_lib_var=no"
8236 fi
8237 rm -f conftest*
8238 xe_check_libs=""
8239
8240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8241   echo "$ac_t""yes" 1>&6
8242   :
8243 else
8244   echo "$ac_t""no" 1>&6
8245
8246 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8247 echo "configure:8248: checking for inflate in -lz" >&5
8248 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8249
8250 xe_check_libs=" -lz "
8251 cat > conftest.$ac_ext <<EOF
8252 #line 8253 "configure"
8253 #include "confdefs.h"
8254 /* Override any gcc2 internal prototype to avoid an error.  */
8255 /* We use char because int might match the return type of a gcc2
8256     builtin and then its argument prototype would still apply.  */
8257 char inflate();
8258
8259 int main() {
8260 inflate()
8261 ; return 0; }
8262 EOF
8263 if { (eval echo configure:8264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8264   rm -rf conftest*
8265   eval "ac_cv_lib_$ac_lib_var=yes"
8266 else
8267   echo "configure: failed program was:" >&5
8268   cat conftest.$ac_ext >&5
8269   rm -rf conftest*
8270   eval "ac_cv_lib_$ac_lib_var=no"
8271 fi
8272 rm -f conftest*
8273 xe_check_libs=""
8274
8275 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8276   echo "$ac_t""yes" 1>&6
8277   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8278 else
8279   echo "$ac_t""no" 1>&6
8280
8281 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8282 echo "configure:8283: checking for inflate in -lgz" >&5
8283 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8284
8285 xe_check_libs=" -lgz "
8286 cat > conftest.$ac_ext <<EOF
8287 #line 8288 "configure"
8288 #include "confdefs.h"
8289 /* Override any gcc2 internal prototype to avoid an error.  */
8290 /* We use char because int might match the return type of a gcc2
8291     builtin and then its argument prototype would still apply.  */
8292 char inflate();
8293
8294 int main() {
8295 inflate()
8296 ; return 0; }
8297 EOF
8298 if { (eval echo configure:8299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8299   rm -rf conftest*
8300   eval "ac_cv_lib_$ac_lib_var=yes"
8301 else
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=no"
8306 fi
8307 rm -f conftest*
8308 xe_check_libs=""
8309
8310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8311   echo "$ac_t""yes" 1>&6
8312   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8313 else
8314   echo "$ac_t""no" 1>&6
8315 fi
8316
8317
8318 fi
8319
8320
8321 fi
8322
8323
8324   fi
8325
8326     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8327 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8328 echo "configure:8329: checking for jpeglib.h" >&5
8329
8330 cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 #include <jpeglib.h>
8334 EOF
8335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8336 { (eval echo configure:8337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8338 if test -z "$ac_err"; then
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=yes"
8341 else
8342   echo "$ac_err" >&5
8343   echo "configure: failed program was:" >&5
8344   cat conftest.$ac_ext >&5
8345   rm -rf conftest*
8346   eval "ac_cv_header_$ac_safe=no"
8347 fi
8348 rm -f conftest*
8349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8350   echo "$ac_t""yes" 1>&6
8351   :
8352 else
8353   echo "$ac_t""no" 1>&6
8354 with_jpeg=no
8355 fi
8356  }
8357   test -z "$with_jpeg" && { 
8358 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8359 echo "configure:8360: checking for jpeg_destroy_decompress in -ljpeg" >&5
8360 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8361
8362 xe_check_libs=" -ljpeg "
8363 cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char jpeg_destroy_decompress();
8370
8371 int main() {
8372 jpeg_destroy_decompress()
8373 ; return 0; }
8374 EOF
8375 if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=yes"
8378 else
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=no"
8383 fi
8384 rm -f conftest*
8385 xe_check_libs=""
8386
8387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8388   echo "$ac_t""yes" 1>&6
8389   :
8390 else
8391   echo "$ac_t""no" 1>&6
8392 with_jpeg=no
8393 fi
8394
8395  }
8396   test -z "$with_jpeg" && with_jpeg=yes
8397   if test "$with_jpeg" = "yes"; then
8398     { test "$extra_verbose" = "yes" && cat << \EOF
8399     Defining HAVE_JPEG
8400 EOF
8401 cat >> confdefs.h <<\EOF
8402 #define HAVE_JPEG 1
8403 EOF
8404 }
8405
8406     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8407   fi
8408
8409     png_problem=""
8410   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8411 echo "configure:8412: checking for pow" >&5
8412
8413 cat > conftest.$ac_ext <<EOF
8414 #line 8415 "configure"
8415 #include "confdefs.h"
8416 /* System header to define __stub macros and hopefully few prototypes,
8417     which can conflict with char pow(); below.  */
8418 #include <assert.h>
8419 /* Override any gcc2 internal prototype to avoid an error.  */
8420 /* We use char because int might match the return type of a gcc2
8421     builtin and then its argument prototype would still apply.  */
8422 char pow();
8423
8424 int main() {
8425
8426 /* The GNU C library defines this for functions which it implements
8427     to always fail with ENOSYS.  Some functions are actually named
8428     something starting with __ and the normal name is an alias.  */
8429 #if defined (__stub_pow) || defined (__stub___pow)
8430 choke me
8431 #else
8432 pow();
8433 #endif
8434
8435 ; return 0; }
8436 EOF
8437 if { (eval echo configure:8438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8438   rm -rf conftest*
8439   eval "ac_cv_func_pow=yes"
8440 else
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_func_pow=no"
8445 fi
8446 rm -f conftest*
8447
8448 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8449   echo "$ac_t""yes" 1>&6
8450   :
8451 else
8452   echo "$ac_t""no" 1>&6
8453 with_png=no
8454 fi
8455  }
8456   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8457 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8458 echo "configure:8459: checking for png.h" >&5
8459
8460 cat > conftest.$ac_ext <<EOF
8461 #line 8462 "configure"
8462 #include "confdefs.h"
8463 #include <png.h>
8464 EOF
8465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8466 { (eval echo configure:8467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8468 if test -z "$ac_err"; then
8469   rm -rf conftest*
8470   eval "ac_cv_header_$ac_safe=yes"
8471 else
8472   echo "$ac_err" >&5
8473   echo "configure: failed program was:" >&5
8474   cat conftest.$ac_ext >&5
8475   rm -rf conftest*
8476   eval "ac_cv_header_$ac_safe=no"
8477 fi
8478 rm -f conftest*
8479 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8480   echo "$ac_t""yes" 1>&6
8481   :
8482 else
8483   echo "$ac_t""no" 1>&6
8484 with_png=no
8485 fi
8486  }
8487   test -z "$with_png" && { 
8488 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8489 echo "configure:8490: checking for png_read_image in -lpng" >&5
8490 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8491
8492 xe_check_libs=" -lpng "
8493 cat > conftest.$ac_ext <<EOF
8494 #line 8495 "configure"
8495 #include "confdefs.h"
8496 /* Override any gcc2 internal prototype to avoid an error.  */
8497 /* We use char because int might match the return type of a gcc2
8498     builtin and then its argument prototype would still apply.  */
8499 char png_read_image();
8500
8501 int main() {
8502 png_read_image()
8503 ; return 0; }
8504 EOF
8505 if { (eval echo configure:8506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8506   rm -rf conftest*
8507   eval "ac_cv_lib_$ac_lib_var=yes"
8508 else
8509   echo "configure: failed program was:" >&5
8510   cat conftest.$ac_ext >&5
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=no"
8513 fi
8514 rm -f conftest*
8515 xe_check_libs=""
8516
8517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8518   echo "$ac_t""yes" 1>&6
8519   :
8520 else
8521   echo "$ac_t""no" 1>&6
8522 with_png=no
8523 fi
8524
8525  }
8526   if test -z "$with_png"; then
8527     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8528 echo "configure:8529: checking for workable png version information" >&5
8529     xe_check_libs="-lpng -lz"
8530     cat > conftest.$ac_ext <<EOF
8531 #line 8532 "configure"
8532 #include "confdefs.h"
8533 #include <png.h>
8534     int main(int c, char **v) {
8535     if (c == 1) return 0;
8536     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8537     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8538 EOF
8539 if { (eval echo configure:8540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8540 then
8541   ./conftest dummy_arg; png_status=$?;
8542       if test "$png_status" = "0"; then
8543         with_png=yes;
8544       else
8545         with_png=no;
8546         if test "$png_status" = "1"; then
8547           png_problem="PNG library version and header file don't match!"
8548         elif test "$png_status" = "2"; then
8549           png_problem="PNG library version too old (pre 1.0.2)!"
8550         fi
8551         echo "
8552 *** WARNING *** $png_problem
8553   I'm not touching that with a 10-foot pole!
8554   If you really want to use the installed version of libPNG, rerun
8555   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8556     fi
8557 else
8558   conftest_rc="$?"
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -fr conftest*
8562   with_png=no
8563 fi
8564 rm -fr conftest*
8565     xe_check_libs=
8566     echo "$ac_t""$with_png" 1>&6
8567   fi
8568   if test "$with_png" = "yes"; then
8569     { test "$extra_verbose" = "yes" && cat << \EOF
8570     Defining HAVE_PNG
8571 EOF
8572 cat >> confdefs.h <<\EOF
8573 #define HAVE_PNG 1
8574 EOF
8575 }
8576
8577     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8578   fi
8579
8580     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8581 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8582 echo "configure:8583: checking for tiffio.h" >&5
8583
8584 cat > conftest.$ac_ext <<EOF
8585 #line 8586 "configure"
8586 #include "confdefs.h"
8587 #include <tiffio.h>
8588 EOF
8589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8590 { (eval echo configure:8591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8592 if test -z "$ac_err"; then
8593   rm -rf conftest*
8594   eval "ac_cv_header_$ac_safe=yes"
8595 else
8596   echo "$ac_err" >&5
8597   echo "configure: failed program was:" >&5
8598   cat conftest.$ac_ext >&5
8599   rm -rf conftest*
8600   eval "ac_cv_header_$ac_safe=no"
8601 fi
8602 rm -f conftest*
8603 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8604   echo "$ac_t""yes" 1>&6
8605   :
8606 else
8607   echo "$ac_t""no" 1>&6
8608 with_tiff=no
8609 fi
8610  }
8611   test -z "$with_tiff" && { 
8612 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8613 echo "configure:8614: checking for TIFFClientOpen in -ltiff" >&5
8614 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8615
8616 xe_check_libs=" -ltiff "
8617 cat > conftest.$ac_ext <<EOF
8618 #line 8619 "configure"
8619 #include "confdefs.h"
8620 /* Override any gcc2 internal prototype to avoid an error.  */
8621 /* We use char because int might match the return type of a gcc2
8622     builtin and then its argument prototype would still apply.  */
8623 char TIFFClientOpen();
8624
8625 int main() {
8626 TIFFClientOpen()
8627 ; return 0; }
8628 EOF
8629 if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8630   rm -rf conftest*
8631   eval "ac_cv_lib_$ac_lib_var=yes"
8632 else
8633   echo "configure: failed program was:" >&5
8634   cat conftest.$ac_ext >&5
8635   rm -rf conftest*
8636   eval "ac_cv_lib_$ac_lib_var=no"
8637 fi
8638 rm -f conftest*
8639 xe_check_libs=""
8640
8641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8642   echo "$ac_t""yes" 1>&6
8643   :
8644 else
8645   echo "$ac_t""no" 1>&6
8646 with_tiff=no
8647 fi
8648
8649  }
8650   test -z "$with_tiff" && with_tiff=yes
8651   if test "$with_tiff" = "yes"; then
8652     { test "$extra_verbose" = "yes" && cat << \EOF
8653     Defining HAVE_TIFF
8654 EOF
8655 cat >> confdefs.h <<\EOF
8656 #define HAVE_TIFF 1
8657 EOF
8658 }
8659
8660     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8661   fi
8662 fi
8663
8664
8665 if test "$with_gtk" = "yes"; then
8666     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8667 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8668 echo "configure:8669: checking for compface.h" >&5
8669
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 #include <compface.h>
8674 EOF
8675 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8676 { (eval echo configure:8677: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8677 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8678 if test -z "$ac_err"; then
8679   rm -rf conftest*
8680   eval "ac_cv_header_$ac_safe=yes"
8681 else
8682   echo "$ac_err" >&5
8683   echo "configure: failed program was:" >&5
8684   cat conftest.$ac_ext >&5
8685   rm -rf conftest*
8686   eval "ac_cv_header_$ac_safe=no"
8687 fi
8688 rm -f conftest*
8689 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8690   echo "$ac_t""yes" 1>&6
8691   :
8692 else
8693   echo "$ac_t""no" 1>&6
8694 with_xface=no
8695 fi
8696  }
8697   test -z "$with_xface" && { 
8698 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8699 echo "configure:8700: checking for UnGenFace in -lcompface" >&5
8700 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8701
8702 xe_check_libs=" -lcompface "
8703 cat > conftest.$ac_ext <<EOF
8704 #line 8705 "configure"
8705 #include "confdefs.h"
8706 /* Override any gcc2 internal prototype to avoid an error.  */
8707 /* We use char because int might match the return type of a gcc2
8708     builtin and then its argument prototype would still apply.  */
8709 char UnGenFace();
8710
8711 int main() {
8712 UnGenFace()
8713 ; return 0; }
8714 EOF
8715 if { (eval echo configure:8716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8716   rm -rf conftest*
8717   eval "ac_cv_lib_$ac_lib_var=yes"
8718 else
8719   echo "configure: failed program was:" >&5
8720   cat conftest.$ac_ext >&5
8721   rm -rf conftest*
8722   eval "ac_cv_lib_$ac_lib_var=no"
8723 fi
8724 rm -f conftest*
8725 xe_check_libs=""
8726
8727 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8728   echo "$ac_t""yes" 1>&6
8729   : 
8730 else
8731   echo "$ac_t""no" 1>&6
8732 with_xface=no
8733 fi
8734
8735  }
8736   test -z "$with_xface" && with_xface=yes
8737   if test "$with_xface" = "yes"; then
8738     { test "$extra_verbose" = "yes" && cat << \EOF
8739     Defining HAVE_XFACE
8740 EOF
8741 cat >> confdefs.h <<\EOF
8742 #define HAVE_XFACE 1
8743 EOF
8744 }
8745
8746     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8747   fi
8748 fi
8749
8750
8751
8752 if test "$with_x11" = "yes"; then
8753
8754   echo "checking for X11 graphics libraries" 1>&6
8755 echo "configure:8756: checking for X11 graphics libraries" >&5
8756
8757   echo "checking for the Athena widgets" 1>&6
8758 echo "configure:8759: checking for the Athena widgets" >&5
8759
8760     case "$with_athena" in
8761         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8762     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8763     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8764     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8765     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8766     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8767   esac
8768
8769     if test "$athena_3d" = "no"; then
8770     
8771 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8772 echo "configure:8773: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8773 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8774
8775 xe_check_libs=" -l$athena_variant "
8776 cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 /* Override any gcc2 internal prototype to avoid an error.  */
8780 /* We use char because int might match the return type of a gcc2
8781     builtin and then its argument prototype would still apply.  */
8782 char XawScrollbarSetThumb();
8783
8784 int main() {
8785 XawScrollbarSetThumb()
8786 ; return 0; }
8787 EOF
8788 if { (eval echo configure:8789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8789   rm -rf conftest*
8790   eval "ac_cv_lib_$ac_lib_var=yes"
8791 else
8792   echo "configure: failed program was:" >&5
8793   cat conftest.$ac_ext >&5
8794   rm -rf conftest*
8795   eval "ac_cv_lib_$ac_lib_var=no"
8796 fi
8797 rm -f conftest*
8798 xe_check_libs=""
8799
8800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8801   echo "$ac_t""yes" 1>&6
8802           
8803 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8804 echo "configure:8805: checking for threeDClassRec in -l$athena_variant" >&5
8805 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8806
8807 xe_check_libs=" -l$athena_variant "
8808 cat > conftest.$ac_ext <<EOF
8809 #line 8810 "configure"
8810 #include "confdefs.h"
8811 /* Override any gcc2 internal prototype to avoid an error.  */
8812 /* We use char because int might match the return type of a gcc2
8813     builtin and then its argument prototype would still apply.  */
8814 char threeDClassRec();
8815
8816 int main() {
8817 threeDClassRec()
8818 ; return 0; }
8819 EOF
8820 if { (eval echo configure:8821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8821   rm -rf conftest*
8822   eval "ac_cv_lib_$ac_lib_var=yes"
8823 else
8824   echo "configure: failed program was:" >&5
8825   cat conftest.$ac_ext >&5
8826   rm -rf conftest*
8827   eval "ac_cv_lib_$ac_lib_var=no"
8828 fi
8829 rm -f conftest*
8830 xe_check_libs=""
8831
8832 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8833   echo "$ac_t""yes" 1>&6
8834   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8835 else
8836   echo "$ac_t""no" 1>&6
8837 athena_lib=$athena_variant
8838 fi
8839
8840
8841       
8842 else
8843   echo "$ac_t""no" 1>&6
8844 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8845 fi
8846
8847
8848   else
8849         
8850 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8851 echo "configure:8852: checking for threeDClassRec in -l$athena_variant" >&5
8852 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8853
8854 xe_check_libs=" -l$athena_variant "
8855 cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 /* Override any gcc2 internal prototype to avoid an error.  */
8859 /* We use char because int might match the return type of a gcc2
8860     builtin and then its argument prototype would still apply.  */
8861 char threeDClassRec();
8862
8863 int main() {
8864 threeDClassRec()
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_lib_$ac_lib_var=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_lib_$ac_lib_var=no"
8875 fi
8876 rm -f conftest*
8877 xe_check_libs=""
8878
8879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8880   echo "$ac_t""yes" 1>&6
8881   athena_lib=$athena_variant
8882 else
8883   echo "$ac_t""no" 1>&6
8884 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8885 echo "configure:8886: checking for threeDClassRec in -lXaw" >&5
8886 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8887
8888 xe_check_libs=" -lXaw "
8889 cat > conftest.$ac_ext <<EOF
8890 #line 8891 "configure"
8891 #include "confdefs.h"
8892 /* Override any gcc2 internal prototype to avoid an error.  */
8893 /* We use char because int might match the return type of a gcc2
8894     builtin and then its argument prototype would still apply.  */
8895 char threeDClassRec();
8896
8897 int main() {
8898 threeDClassRec()
8899 ; return 0; }
8900 EOF
8901 if { (eval echo configure:8902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=yes"
8904 else
8905   echo "configure: failed program was:" >&5
8906   cat conftest.$ac_ext >&5
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=no"
8909 fi
8910 rm -f conftest*
8911 xe_check_libs=""
8912
8913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8914   echo "$ac_t""yes" 1>&6
8915   athena_lib=Xaw;
8916           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8917         
8918 else
8919   echo "$ac_t""no" 1>&6
8920 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8921 fi
8922
8923
8924 fi
8925
8926
8927   fi
8928
8929     if test "$athena_3d" = "no"; then
8930     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8931 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8932 echo "configure:8933: checking for X11/Xaw/ThreeD.h" >&5
8933
8934 cat > conftest.$ac_ext <<EOF
8935 #line 8936 "configure"
8936 #include "confdefs.h"
8937 #include <X11/Xaw/ThreeD.h>
8938 EOF
8939 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8940 { (eval echo configure:8941: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8941 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8942 if test -z "$ac_err"; then
8943   rm -rf conftest*
8944   eval "ac_cv_header_$ac_safe=yes"
8945 else
8946   echo "$ac_err" >&5
8947   echo "configure: failed program was:" >&5
8948   cat conftest.$ac_ext >&5
8949   rm -rf conftest*
8950   eval "ac_cv_header_$ac_safe=no"
8951 fi
8952 rm -f conftest*
8953 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8954   echo "$ac_t""yes" 1>&6
8955   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8956 else
8957   echo "$ac_t""no" 1>&6
8958 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8959 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8960 echo "configure:8961: checking for X11/Xaw/XawInit.h" >&5
8961
8962 cat > conftest.$ac_ext <<EOF
8963 #line 8964 "configure"
8964 #include "confdefs.h"
8965 #include <X11/Xaw/XawInit.h>
8966 EOF
8967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8968 { (eval echo configure:8969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8969 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8970 if test -z "$ac_err"; then
8971   rm -rf conftest*
8972   eval "ac_cv_header_$ac_safe=yes"
8973 else
8974   echo "$ac_err" >&5
8975   echo "configure: failed program was:" >&5
8976   cat conftest.$ac_ext >&5
8977   rm -rf conftest*
8978   eval "ac_cv_header_$ac_safe=no"
8979 fi
8980 rm -f conftest*
8981 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8982   echo "$ac_t""yes" 1>&6
8983   athena_h_path=X11/Xaw
8984 else
8985   echo "$ac_t""no" 1>&6
8986 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8987 fi
8988
8989 fi
8990
8991   else
8992             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8993 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8994 echo "configure:8995: checking for X11/$athena_variant/XawInit.h" >&5
8995
8996 cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 #include <X11/$athena_variant/XawInit.h>
9000 EOF
9001 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9002 { (eval echo configure:9003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9003 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9004 if test -z "$ac_err"; then
9005   rm -rf conftest*
9006   eval "ac_cv_header_$ac_safe=yes"
9007 else
9008   echo "$ac_err" >&5
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_header_$ac_safe=no"
9013 fi
9014 rm -f conftest*
9015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9016   echo "$ac_t""yes" 1>&6
9017   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9018 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9019 echo "configure:9020: checking for X11/$athena_variant/ThreeD.h" >&5
9020
9021 cat > conftest.$ac_ext <<EOF
9022 #line 9023 "configure"
9023 #include "confdefs.h"
9024 #include <X11/$athena_variant/ThreeD.h>
9025 EOF
9026 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9027 { (eval echo configure:9028: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9028 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9029 if test -z "$ac_err"; then
9030   rm -rf conftest*
9031   eval "ac_cv_header_$ac_safe=yes"
9032 else
9033   echo "$ac_err" >&5
9034   echo "configure: failed program was:" >&5
9035   cat conftest.$ac_ext >&5
9036   rm -rf conftest*
9037   eval "ac_cv_header_$ac_safe=no"
9038 fi
9039 rm -f conftest*
9040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042   athena_h_path=X11/$athena_variant
9043 else
9044   echo "$ac_t""no" 1>&6
9045 fi
9046
9047 else
9048   echo "$ac_t""no" 1>&6
9049 fi
9050
9051
9052         if test -z "$athena_h_path"; then
9053       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9054 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9055 echo "configure:9056: checking for $athena_variant/XawInit.h" >&5
9056
9057 cat > conftest.$ac_ext <<EOF
9058 #line 9059 "configure"
9059 #include "confdefs.h"
9060 #include <$athena_variant/XawInit.h>
9061 EOF
9062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9063 { (eval echo configure:9064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9065 if test -z "$ac_err"; then
9066   rm -rf conftest*
9067   eval "ac_cv_header_$ac_safe=yes"
9068 else
9069   echo "$ac_err" >&5
9070   echo "configure: failed program was:" >&5
9071   cat conftest.$ac_ext >&5
9072   rm -rf conftest*
9073   eval "ac_cv_header_$ac_safe=no"
9074 fi
9075 rm -f conftest*
9076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9077   echo "$ac_t""yes" 1>&6
9078   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9079 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9080 echo "configure:9081: checking for $athena_variant/ThreeD.h" >&5
9081
9082 cat > conftest.$ac_ext <<EOF
9083 #line 9084 "configure"
9084 #include "confdefs.h"
9085 #include <$athena_variant/ThreeD.h>
9086 EOF
9087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9088 { (eval echo configure:9089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9089 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9090 if test -z "$ac_err"; then
9091   rm -rf conftest*
9092   eval "ac_cv_header_$ac_safe=yes"
9093 else
9094   echo "$ac_err" >&5
9095   echo "configure: failed program was:" >&5
9096   cat conftest.$ac_ext >&5
9097   rm -rf conftest*
9098   eval "ac_cv_header_$ac_safe=no"
9099 fi
9100 rm -f conftest*
9101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9102   echo "$ac_t""yes" 1>&6
9103   athena_h_path=$athena_variant
9104 else
9105   echo "$ac_t""no" 1>&6
9106 fi
9107
9108 else
9109   echo "$ac_t""no" 1>&6
9110 fi
9111
9112     fi
9113
9114         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9115       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9116 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9117 echo "configure:9118: checking for X11/Xaw3d/XawInit.h" >&5
9118
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 #include <X11/Xaw3d/XawInit.h>
9123 EOF
9124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9125 { (eval echo configure:9126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9127 if test -z "$ac_err"; then
9128   rm -rf conftest*
9129   eval "ac_cv_header_$ac_safe=yes"
9130 else
9131   echo "$ac_err" >&5
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   eval "ac_cv_header_$ac_safe=no"
9136 fi
9137 rm -f conftest*
9138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9139   echo "$ac_t""yes" 1>&6
9140   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9141 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9142 echo "configure:9143: checking for X11/Xaw3d/ThreeD.h" >&5
9143
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <X11/Xaw3d/ThreeD.h>
9148 EOF
9149 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9150 { (eval echo configure:9151: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9151 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9152 if test -z "$ac_err"; then
9153   rm -rf conftest*
9154   eval "ac_cv_header_$ac_safe=yes"
9155 else
9156   echo "$ac_err" >&5
9157   echo "configure: failed program was:" >&5
9158   cat conftest.$ac_ext >&5
9159   rm -rf conftest*
9160   eval "ac_cv_header_$ac_safe=no"
9161 fi
9162 rm -f conftest*
9163 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9164   echo "$ac_t""yes" 1>&6
9165   
9166             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9167             athena_h_path=X11/Xaw3d
9168           
9169 else
9170   echo "$ac_t""no" 1>&6
9171 fi
9172
9173 else
9174   echo "$ac_t""no" 1>&6
9175 fi
9176
9177     fi
9178
9179         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9180       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9181 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9182 echo "configure:9183: checking for Xaw3d/XawInit.h" >&5
9183
9184 cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <Xaw3d/XawInit.h>
9188 EOF
9189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9190 { (eval echo configure:9191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9192 if test -z "$ac_err"; then
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=yes"
9195 else
9196   echo "$ac_err" >&5
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_header_$ac_safe=no"
9201 fi
9202 rm -f conftest*
9203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9204   echo "$ac_t""yes" 1>&6
9205   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9206 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9207 echo "configure:9208: checking for Xaw3d/ThreeD.h" >&5
9208
9209 cat > conftest.$ac_ext <<EOF
9210 #line 9211 "configure"
9211 #include "confdefs.h"
9212 #include <Xaw3d/ThreeD.h>
9213 EOF
9214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9215 { (eval echo configure:9216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9217 if test -z "$ac_err"; then
9218   rm -rf conftest*
9219   eval "ac_cv_header_$ac_safe=yes"
9220 else
9221   echo "$ac_err" >&5
9222   echo "configure: failed program was:" >&5
9223   cat conftest.$ac_ext >&5
9224   rm -rf conftest*
9225   eval "ac_cv_header_$ac_safe=no"
9226 fi
9227 rm -f conftest*
9228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9229   echo "$ac_t""yes" 1>&6
9230   
9231             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9232             athena_h_path=Xaw3d
9233           
9234 else
9235   echo "$ac_t""no" 1>&6
9236 fi
9237
9238 else
9239   echo "$ac_t""no" 1>&6
9240 fi
9241
9242     fi
9243
9244             if test -z "$athena_h_path"; then
9245       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9246 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9247 echo "configure:9248: checking for X11/Xaw/ThreeD.h" >&5
9248
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 #include <X11/Xaw/ThreeD.h>
9253 EOF
9254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9255 { (eval echo configure:9256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9257 if test -z "$ac_err"; then
9258   rm -rf conftest*
9259   eval "ac_cv_header_$ac_safe=yes"
9260 else
9261   echo "$ac_err" >&5
9262   echo "configure: failed program was:" >&5
9263   cat conftest.$ac_ext >&5
9264   rm -rf conftest*
9265   eval "ac_cv_header_$ac_safe=no"
9266 fi
9267 rm -f conftest*
9268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9269   echo "$ac_t""yes" 1>&6
9270   
9271           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9272           athena_h_path=X11/Xaw
9273         
9274 else
9275   echo "$ac_t""no" 1>&6
9276 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9277 fi
9278
9279     fi
9280   fi
9281
9282     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9283     have_xaw=yes
9284   else
9285     have_xaw=no
9286   fi
9287
9288     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9289 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9290 echo "configure:9291: checking for Xm/Xm.h" >&5
9291
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 #include <Xm/Xm.h>
9296 EOF
9297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9298 { (eval echo configure:9299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9300 if test -z "$ac_err"; then
9301   rm -rf conftest*
9302   eval "ac_cv_header_$ac_safe=yes"
9303 else
9304   echo "$ac_err" >&5
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=no"
9309 fi
9310 rm -f conftest*
9311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313   
9314 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9315 echo "configure:9316: checking for XmStringFree in -lXm" >&5
9316 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9317
9318 xe_check_libs=" -lXm "
9319 cat > conftest.$ac_ext <<EOF
9320 #line 9321 "configure"
9321 #include "confdefs.h"
9322 /* Override any gcc2 internal prototype to avoid an error.  */
9323 /* We use char because int might match the return type of a gcc2
9324     builtin and then its argument prototype would still apply.  */
9325 char XmStringFree();
9326
9327 int main() {
9328 XmStringFree()
9329 ; return 0; }
9330 EOF
9331 if { (eval echo configure:9332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9332   rm -rf conftest*
9333   eval "ac_cv_lib_$ac_lib_var=yes"
9334 else
9335   echo "configure: failed program was:" >&5
9336   cat conftest.$ac_ext >&5
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=no"
9339 fi
9340 rm -f conftest*
9341 xe_check_libs=""
9342
9343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9344   echo "$ac_t""yes" 1>&6
9345   have_motif=yes
9346 else
9347   echo "$ac_t""no" 1>&6
9348 have_motif=no
9349 fi
9350
9351
9352 else
9353   echo "$ac_t""no" 1>&6
9354 have_motif=no
9355 fi
9356
9357
9358   if test "$have_motif" = "yes"; then
9359         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9360 echo "configure:9361: checking for Lesstif" >&5
9361     cat > conftest.$ac_ext <<EOF
9362 #line 9363 "configure"
9363 #include "confdefs.h"
9364 #include <Xm/Xm.h>
9365 #ifdef LESSTIF_VERSION
9366 yes
9367 #endif
9368
9369 EOF
9370 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9371   egrep "yes" >/dev/null 2>&1; then
9372   rm -rf conftest*
9373   have_lesstif=yes
9374 else
9375   rm -rf conftest*
9376   have_lesstif=no
9377 fi
9378 rm -f conftest*
9379
9380   echo "$ac_t""$have_lesstif" 1>&6
9381   fi
9382
9383 fi 
9384
9385 case "$with_menubars" in "" | "yes" | "athena" )
9386   with_menubars="lucid" ;;
9387 esac
9388 case "$with_dialogs" in "" | "yes" | "lucid" )
9389   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9390   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9391   else with_dialogs=no
9392   fi ;;
9393 esac
9394 case "$with_scrollbars" in "" | "yes" )
9395   with_scrollbars="lucid" ;;
9396 esac
9397 case "$with_widgets" in "" | "yes" | "lucid")
9398   if   test "$have_motif" = "yes"; then with_widgets="motif"
9399   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9400   else with_widgets=no
9401   fi ;;
9402 esac
9403
9404 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9405
9406 case "$all_widgets" in
9407   *athena* )
9408     if test "$have_xaw" != "yes"; then
9409       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9410     fi
9411
9412         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9413
9414         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9415
9416                     { test "$extra_verbose" = "yes" && cat << EOF
9417     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9418 EOF
9419 cat >> confdefs.h <<EOF
9420 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9421 EOF
9422 }
9423
9424     { test "$extra_verbose" = "yes" && cat << EOF
9425     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9426 EOF
9427 cat >> confdefs.h <<EOF
9428 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9429 EOF
9430 }
9431
9432     { test "$extra_verbose" = "yes" && cat << EOF
9433     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9434 EOF
9435 cat >> confdefs.h <<EOF
9436 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9437 EOF
9438 }
9439
9440     { test "$extra_verbose" = "yes" && cat << EOF
9441     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9442 EOF
9443 cat >> confdefs.h <<EOF
9444 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9445 EOF
9446 }
9447
9448     { test "$extra_verbose" = "yes" && cat << EOF
9449     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9450 EOF
9451 cat >> confdefs.h <<EOF
9452 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9453 EOF
9454 }
9455
9456     { test "$extra_verbose" = "yes" && cat << EOF
9457     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9458 EOF
9459 cat >> confdefs.h <<EOF
9460 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9461 EOF
9462 }
9463
9464     { test "$extra_verbose" = "yes" && cat << EOF
9465     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9466 EOF
9467 cat >> confdefs.h <<EOF
9468 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9469 EOF
9470 }
9471
9472     { test "$extra_verbose" = "yes" && cat << EOF
9473     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9474 EOF
9475 cat >> confdefs.h <<EOF
9476 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9477 EOF
9478 }
9479
9480     { test "$extra_verbose" = "yes" && cat << EOF
9481     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9482 EOF
9483 cat >> confdefs.h <<EOF
9484 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9485 EOF
9486 }
9487
9488     { test "$extra_verbose" = "yes" && cat << EOF
9489     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9490 EOF
9491 cat >> confdefs.h <<EOF
9492 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9493 EOF
9494 }
9495
9496
9497     { test "$extra_verbose" = "yes" && cat << \EOF
9498     Defining LWLIB_USES_ATHENA
9499 EOF
9500 cat >> confdefs.h <<\EOF
9501 #define LWLIB_USES_ATHENA 1
9502 EOF
9503 }
9504
9505     { test "$extra_verbose" = "yes" && cat << \EOF
9506     Defining NEED_ATHENA
9507 EOF
9508 cat >> confdefs.h <<\EOF
9509 #define NEED_ATHENA 1
9510 EOF
9511 }
9512
9513     need_athena="yes"
9514
9515     if test "$athena_3d" = "yes"; then
9516       { test "$extra_verbose" = "yes" && cat << \EOF
9517     Defining HAVE_ATHENA_3D
9518 EOF
9519 cat >> confdefs.h <<\EOF
9520 #define HAVE_ATHENA_3D 1
9521 EOF
9522 }
9523
9524     fi
9525   ;;
9526 esac
9527
9528 case "$all_widgets" in *motif* )
9529   { test "$extra_verbose" = "yes" && cat << \EOF
9530     Defining LWLIB_USES_MOTIF
9531 EOF
9532 cat >> confdefs.h <<\EOF
9533 #define LWLIB_USES_MOTIF 1
9534 EOF
9535 }
9536
9537   { test "$extra_verbose" = "yes" && cat << \EOF
9538     Defining NEED_MOTIF
9539 EOF
9540 cat >> confdefs.h <<\EOF
9541 #define NEED_MOTIF 1
9542 EOF
9543 }
9544
9545   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9546   need_motif=yes ;;
9547 esac
9548
9549 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9550 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9551 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9552 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9553         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9554 case "$with_widgets" in athena* )
9555         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;;
9556 esac
9557 case "$all_widgets" in *lucid* )
9558   { test "$extra_verbose" = "yes" && cat << \EOF
9559     Defining NEED_LUCID
9560 EOF
9561 cat >> confdefs.h <<\EOF
9562 #define NEED_LUCID 1
9563 EOF
9564 }
9565
9566   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9567 esac
9568
9569
9570
9571 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9572     Defining LWLIB_SCROLLBARS_ATHENA
9573 EOF
9574 cat >> confdefs.h <<\EOF
9575 #define LWLIB_SCROLLBARS_ATHENA 1
9576 EOF
9577 }
9578
9579 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9580     Defining LWLIB_DIALOGS_ATHENA
9581 EOF
9582 cat >> confdefs.h <<\EOF
9583 #define LWLIB_DIALOGS_ATHENA 1
9584 EOF
9585 }
9586
9587
9588 if test "$athena_3d" = "yes"; then
9589   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9590     Defining LWLIB_SCROLLBARS_ATHENA3D
9591 EOF
9592 cat >> confdefs.h <<\EOF
9593 #define LWLIB_SCROLLBARS_ATHENA3D 1
9594 EOF
9595 }
9596
9597   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9598     Defining LWLIB_DIALOGS_ATHENA3D
9599 EOF
9600 cat >> confdefs.h <<\EOF
9601 #define LWLIB_DIALOGS_ATHENA3D 1
9602 EOF
9603 }
9604
9605 fi
9606
9607 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9608     Defining LWLIB_WIDGETS_ATHENA
9609 EOF
9610 cat >> confdefs.h <<\EOF
9611 #define LWLIB_WIDGETS_ATHENA 1
9612 EOF
9613 }
9614 ;; esac
9615 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9616         { test "$extra_verbose" = "yes" && cat << \EOF
9617     Defining LWLIB_TABS_LUCID
9618 EOF
9619 cat >> confdefs.h <<\EOF
9620 #define LWLIB_TABS_LUCID 1
9621 EOF
9622 }
9623
9624
9625 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9626     Defining HAVE_MENUBARS
9627 EOF
9628 cat >> confdefs.h <<\EOF
9629 #define HAVE_MENUBARS 1
9630 EOF
9631 }
9632
9633 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9634     Defining HAVE_SCROLLBARS
9635 EOF
9636 cat >> confdefs.h <<\EOF
9637 #define HAVE_SCROLLBARS 1
9638 EOF
9639 }
9640
9641 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9642     Defining HAVE_DIALOGS
9643 EOF
9644 cat >> confdefs.h <<\EOF
9645 #define HAVE_DIALOGS 1
9646 EOF
9647 }
9648
9649 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9650     Defining HAVE_TOOLBARS
9651 EOF
9652 cat >> confdefs.h <<\EOF
9653 #define HAVE_TOOLBARS 1
9654 EOF
9655 }
9656
9657 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9658     Defining HAVE_WIDGETS
9659 EOF
9660 cat >> confdefs.h <<\EOF
9661 #define HAVE_WIDGETS 1
9662 EOF
9663 }
9664
9665
9666 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9667     Defining LWLIB_MENUBARS_LUCID
9668 EOF
9669 cat >> confdefs.h <<\EOF
9670 #define LWLIB_MENUBARS_LUCID 1
9671 EOF
9672 }
9673
9674 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9675     Defining LWLIB_SCROLLBARS_LUCID
9676 EOF
9677 cat >> confdefs.h <<\EOF
9678 #define LWLIB_SCROLLBARS_LUCID 1
9679 EOF
9680 }
9681
9682
9683 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9684     Defining LWLIB_MENUBARS_MOTIF
9685 EOF
9686 cat >> confdefs.h <<\EOF
9687 #define LWLIB_MENUBARS_MOTIF 1
9688 EOF
9689 }
9690
9691 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9692     Defining LWLIB_SCROLLBARS_MOTIF
9693 EOF
9694 cat >> confdefs.h <<\EOF
9695 #define LWLIB_SCROLLBARS_MOTIF 1
9696 EOF
9697 }
9698
9699 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9700     Defining LWLIB_DIALOGS_MOTIF
9701 EOF
9702 cat >> confdefs.h <<\EOF
9703 #define LWLIB_DIALOGS_MOTIF 1
9704 EOF
9705 }
9706
9707 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9708     Defining LWLIB_WIDGETS_MOTIF
9709 EOF
9710 cat >> confdefs.h <<\EOF
9711 #define LWLIB_WIDGETS_MOTIF 1
9712 EOF
9713 }
9714
9715
9716 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9717    echo "    xemacs will be linked with \"menubar.o\""
9718  fi
9719 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9720    echo "    xemacs will be linked with \"scrollbar.o\""
9721  fi
9722 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9723    echo "    xemacs will be linked with \"dialog.o\""
9724  fi
9725 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9726    echo "    xemacs will be linked with \"toolbar.o\""
9727  fi
9728
9729 if test "$with_gtk" = "yes"; then
9730   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9731    echo "    xemacs will be linked with \"menubar-gtk.o\""
9732  fi
9733   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9734    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9735  fi
9736   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9737    echo "    xemacs will be linked with \"dialog-gtk.o\""
9738  fi
9739   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9740    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9741  fi
9742   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9743    echo "    xemacs will be linked with \"gui-gtk.o\""
9744  fi
9745 fi
9746
9747 if test "$with_x11" = "yes"; then
9748   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9749    echo "    xemacs will be linked with \"menubar-x.o\""
9750  fi
9751   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9752    echo "    xemacs will be linked with \"scrollbar-x.o\""
9753  fi
9754   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9755    echo "    xemacs will be linked with \"dialog-x.o\""
9756  fi
9757   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9758    echo "    xemacs will be linked with \"toolbar-x.o\""
9759  fi
9760   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9761    echo "    xemacs will be linked with \"gui-x.o\""
9762  fi
9763 fi
9764
9765
9766 test -z "$with_mule" && with_mule=no
9767 test -z "$with_file_coding" && with_file_coding=no
9768
9769
9770 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9771   { test "$extra_verbose" = "yes" && cat << \EOF
9772     Defining FILE_CODING
9773 EOF
9774 cat >> confdefs.h <<\EOF
9775 #define FILE_CODING 1
9776 EOF
9777 }
9778
9779   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9780    echo "    xemacs will be linked with \"file-coding.o\""
9781  fi
9782 fi
9783
9784 if test "$with_mule" = "yes" ; then
9785   echo "checking for Mule-related features" 1>&6
9786 echo "configure:9787: checking for Mule-related features" >&5
9787   { test "$extra_verbose" = "yes" && cat << \EOF
9788     Defining MULE
9789 EOF
9790 cat >> confdefs.h <<\EOF
9791 #define MULE 1
9792 EOF
9793 }
9794
9795   { test "$extra_verbose" = "yes" && cat << \EOF
9796     Defining FILE_CODING
9797 EOF
9798 cat >> confdefs.h <<\EOF
9799 #define FILE_CODING 1
9800 EOF
9801 }
9802
9803   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9804    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9805  fi
9806
9807     for ac_hdr in libintl.h
9808 do
9809 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9810 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9811 echo "configure:9812: checking for $ac_hdr" >&5
9812
9813 cat > conftest.$ac_ext <<EOF
9814 #line 9815 "configure"
9815 #include "confdefs.h"
9816 #include <$ac_hdr>
9817 EOF
9818 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9819 { (eval echo configure:9820: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9820 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9821 if test -z "$ac_err"; then
9822   rm -rf conftest*
9823   eval "ac_cv_header_$ac_safe=yes"
9824 else
9825   echo "$ac_err" >&5
9826   echo "configure: failed program was:" >&5
9827   cat conftest.$ac_ext >&5
9828   rm -rf conftest*
9829   eval "ac_cv_header_$ac_safe=no"
9830 fi
9831 rm -f conftest*
9832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9833   echo "$ac_t""yes" 1>&6
9834     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9835   { test "$extra_verbose" = "yes" && cat << EOF
9836     Defining $ac_tr_hdr
9837 EOF
9838 cat >> confdefs.h <<EOF
9839 #define $ac_tr_hdr 1
9840 EOF
9841 }
9842  
9843 else
9844   echo "$ac_t""no" 1>&6
9845 fi
9846 done
9847
9848   
9849 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9850 echo "configure:9851: checking for strerror in -lintl" >&5
9851 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9852
9853 xe_check_libs=" -lintl "
9854 cat > conftest.$ac_ext <<EOF
9855 #line 9856 "configure"
9856 #include "confdefs.h"
9857 /* Override any gcc2 internal prototype to avoid an error.  */
9858 /* We use char because int might match the return type of a gcc2
9859     builtin and then its argument prototype would still apply.  */
9860 char strerror();
9861
9862 int main() {
9863 strerror()
9864 ; return 0; }
9865 EOF
9866 if { (eval echo configure:9867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9867   rm -rf conftest*
9868   eval "ac_cv_lib_$ac_lib_var=yes"
9869 else
9870   echo "configure: failed program was:" >&5
9871   cat conftest.$ac_ext >&5
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=no"
9874 fi
9875 rm -f conftest*
9876 xe_check_libs=""
9877
9878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9879   echo "$ac_t""yes" 1>&6
9880     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9881     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9882   { test "$extra_verbose" = "yes" && cat << EOF
9883     Defining $ac_tr_lib
9884 EOF
9885 cat >> confdefs.h <<EOF
9886 #define $ac_tr_lib 1
9887 EOF
9888 }
9889
9890   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9891
9892 else
9893   echo "$ac_t""no" 1>&6
9894 fi
9895
9896
9897
9898   echo "checking for Mule input methods" 1>&6
9899 echo "configure:9900: checking for Mule input methods" >&5
9900         case "$with_xim" in "" | "yes" )
9901     echo "checking for XIM" 1>&6
9902 echo "configure:9903: checking for XIM" >&5
9903     
9904 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9905 echo "configure:9906: checking for XOpenIM in -lX11" >&5
9906 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9907
9908 xe_check_libs=" -lX11 "
9909 cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9912 /* Override any gcc2 internal prototype to avoid an error.  */
9913 /* We use char because int might match the return type of a gcc2
9914     builtin and then its argument prototype would still apply.  */
9915 char XOpenIM();
9916
9917 int main() {
9918 XOpenIM()
9919 ; return 0; }
9920 EOF
9921 if { (eval echo configure:9922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9922   rm -rf conftest*
9923   eval "ac_cv_lib_$ac_lib_var=yes"
9924 else
9925   echo "configure: failed program was:" >&5
9926   cat conftest.$ac_ext >&5
9927   rm -rf conftest*
9928   eval "ac_cv_lib_$ac_lib_var=no"
9929 fi
9930 rm -f conftest*
9931 xe_check_libs=""
9932
9933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9934   echo "$ac_t""yes" 1>&6
9935   with_xim=xlib
9936 else
9937   echo "$ac_t""no" 1>&6
9938 with_xim=no
9939 fi
9940
9941
9942         if test "$have_motif $have_lesstif" = "yes no"; then
9943       
9944 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9945 echo "configure:9946: checking for XmImMbLookupString in -lXm" >&5
9946 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9947
9948 xe_check_libs=" -lXm "
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 /* Override any gcc2 internal prototype to avoid an error.  */
9953 /* We use char because int might match the return type of a gcc2
9954     builtin and then its argument prototype would still apply.  */
9955 char XmImMbLookupString();
9956
9957 int main() {
9958 XmImMbLookupString()
9959 ; return 0; }
9960 EOF
9961 if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9962   rm -rf conftest*
9963   eval "ac_cv_lib_$ac_lib_var=yes"
9964 else
9965   echo "configure: failed program was:" >&5
9966   cat conftest.$ac_ext >&5
9967   rm -rf conftest*
9968   eval "ac_cv_lib_$ac_lib_var=no"
9969 fi
9970 rm -f conftest*
9971 xe_check_libs=""
9972
9973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9974   echo "$ac_t""yes" 1>&6
9975   with_xim=motif
9976 else
9977   echo "$ac_t""no" 1>&6
9978 fi
9979
9980
9981     fi ;;
9982   esac
9983   if test "$with_xim" != "no"; then
9984     { test "$extra_verbose" = "yes" && cat << \EOF
9985     Defining HAVE_XIM
9986 EOF
9987 cat >> confdefs.h <<\EOF
9988 #define HAVE_XIM 1
9989 EOF
9990 }
9991
9992     if test "$with_xim" = "xlib"; then
9993       { test "$extra_verbose" = "yes" && cat << \EOF
9994     Defining XIM_XLIB
9995 EOF
9996 cat >> confdefs.h <<\EOF
9997 #define XIM_XLIB 1
9998 EOF
9999 }
10000
10001       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10002    echo "    xemacs will be linked with \"input-method-xlib.o\""
10003  fi
10004     fi
10005     if test "$with_xim" = "motif"; then
10006       { test "$extra_verbose" = "yes" && cat << \EOF
10007     Defining XIM_MOTIF
10008 EOF
10009 cat >> confdefs.h <<\EOF
10010 #define XIM_MOTIF 1
10011 EOF
10012 }
10013
10014       need_motif=yes
10015       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10016    echo "    xemacs will be linked with \"input-method-motif.o\""
10017  fi
10018     fi
10019     if test "$with_xim" = "motif"; then
10020       with_xfs=no
10021     fi
10022   fi
10023
10024     if test "$with_xfs" = "yes" ; then
10025     echo "checking for XFontSet" 1>&6
10026 echo "configure:10027: checking for XFontSet" >&5
10027     
10028 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10029 echo "configure:10030: checking for XmbDrawString in -lX11" >&5
10030 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10031
10032 xe_check_libs=" -lX11 "
10033 cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036 /* Override any gcc2 internal prototype to avoid an error.  */
10037 /* We use char because int might match the return type of a gcc2
10038     builtin and then its argument prototype would still apply.  */
10039 char XmbDrawString();
10040
10041 int main() {
10042 XmbDrawString()
10043 ; return 0; }
10044 EOF
10045 if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=yes"
10048 else
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -rf conftest*
10052   eval "ac_cv_lib_$ac_lib_var=no"
10053 fi
10054 rm -f conftest*
10055 xe_check_libs=""
10056
10057 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10058   echo "$ac_t""yes" 1>&6
10059   :
10060 else
10061   echo "$ac_t""no" 1>&6
10062 with_xfs=no
10063 fi
10064
10065
10066     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10067       { test "$extra_verbose" = "yes" && cat << \EOF
10068     Defining USE_XFONTSET
10069 EOF
10070 cat >> confdefs.h <<\EOF
10071 #define USE_XFONTSET 1
10072 EOF
10073 }
10074
10075       if test "$with_xim" = "no" ; then
10076         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10077    echo "    xemacs will be linked with \"input-method-xlib.o\""
10078  fi
10079       fi
10080     fi
10081   fi 
10082     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10083   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10084 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10085 echo "configure:10086: checking for wnn/jllib.h" >&5
10086
10087 cat > conftest.$ac_ext <<EOF
10088 #line 10089 "configure"
10089 #include "confdefs.h"
10090 #include <wnn/jllib.h>
10091 EOF
10092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10093 { (eval echo configure:10094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10095 if test -z "$ac_err"; then
10096   rm -rf conftest*
10097   eval "ac_cv_header_$ac_safe=yes"
10098 else
10099   echo "$ac_err" >&5
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   eval "ac_cv_header_$ac_safe=no"
10104 fi
10105 rm -f conftest*
10106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10107   echo "$ac_t""yes" 1>&6
10108   :
10109 else
10110   echo "$ac_t""no" 1>&6
10111 with_wnn=no
10112 fi
10113  }
10114     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10115 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10116 echo "configure:10117: checking for wnn/commonhd.h" >&5
10117
10118 cat > conftest.$ac_ext <<EOF
10119 #line 10120 "configure"
10120 #include "confdefs.h"
10121 #include <wnn/commonhd.h>
10122 EOF
10123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10124 { (eval echo configure:10125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10126 if test -z "$ac_err"; then
10127   rm -rf conftest*
10128   eval "ac_cv_header_$ac_safe=yes"
10129 else
10130   echo "$ac_err" >&5
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_header_$ac_safe=no"
10135 fi
10136 rm -f conftest*
10137 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139   :
10140 else
10141   echo "$ac_t""no" 1>&6
10142 with_wnn=no
10143 fi
10144  }
10145     if test "$with_wnn" != "no"; then
10146     for ac_func in crypt
10147 do
10148 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10149 echo "configure:10150: checking for $ac_func" >&5
10150
10151 cat > conftest.$ac_ext <<EOF
10152 #line 10153 "configure"
10153 #include "confdefs.h"
10154 /* System header to define __stub macros and hopefully few prototypes,
10155     which can conflict with char $ac_func(); below.  */
10156 #include <assert.h>
10157 /* Override any gcc2 internal prototype to avoid an error.  */
10158 /* We use char because int might match the return type of a gcc2
10159     builtin and then its argument prototype would still apply.  */
10160 char $ac_func();
10161
10162 int main() {
10163
10164 /* The GNU C library defines this for functions which it implements
10165     to always fail with ENOSYS.  Some functions are actually named
10166     something starting with __ and the normal name is an alias.  */
10167 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10168 choke me
10169 #else
10170 $ac_func();
10171 #endif
10172
10173 ; return 0; }
10174 EOF
10175 if { (eval echo configure:10176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10176   rm -rf conftest*
10177   eval "ac_cv_func_$ac_func=yes"
10178 else
10179   echo "configure: failed program was:" >&5
10180   cat conftest.$ac_ext >&5
10181   rm -rf conftest*
10182   eval "ac_cv_func_$ac_func=no"
10183 fi
10184 rm -f conftest*
10185
10186 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10187   echo "$ac_t""yes" 1>&6
10188     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10189   { test "$extra_verbose" = "yes" && cat << EOF
10190     Defining $ac_tr_func
10191 EOF
10192 cat >> confdefs.h <<EOF
10193 #define $ac_tr_func 1
10194 EOF
10195 }
10196  
10197 else
10198   echo "$ac_t""no" 1>&6
10199 fi
10200 done
10201
10202     test "$ac_cv_func_crypt" != "yes" && { 
10203 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10204 echo "configure:10205: checking for crypt in -lcrypt" >&5
10205 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10206
10207 xe_check_libs=" -lcrypt "
10208 cat > conftest.$ac_ext <<EOF
10209 #line 10210 "configure"
10210 #include "confdefs.h"
10211 /* Override any gcc2 internal prototype to avoid an error.  */
10212 /* We use char because int might match the return type of a gcc2
10213     builtin and then its argument prototype would still apply.  */
10214 char crypt();
10215
10216 int main() {
10217 crypt()
10218 ; return 0; }
10219 EOF
10220 if { (eval echo configure:10221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10221   rm -rf conftest*
10222   eval "ac_cv_lib_$ac_lib_var=yes"
10223 else
10224   echo "configure: failed program was:" >&5
10225   cat conftest.$ac_ext >&5
10226   rm -rf conftest*
10227   eval "ac_cv_lib_$ac_lib_var=no"
10228 fi
10229 rm -f conftest*
10230 xe_check_libs=""
10231
10232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10233   echo "$ac_t""yes" 1>&6
10234     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10235     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10236   { test "$extra_verbose" = "yes" && cat << EOF
10237     Defining $ac_tr_lib
10238 EOF
10239 cat >> confdefs.h <<EOF
10240 #define $ac_tr_lib 1
10241 EOF
10242 }
10243
10244   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10245
10246 else
10247   echo "$ac_t""no" 1>&6
10248 fi
10249
10250  }
10251   fi
10252     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10253     
10254 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10255 echo "configure:10256: checking for jl_dic_list_e in -lwnn" >&5
10256 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10257
10258 xe_check_libs=" -lwnn "
10259 cat > conftest.$ac_ext <<EOF
10260 #line 10261 "configure"
10261 #include "confdefs.h"
10262 /* Override any gcc2 internal prototype to avoid an error.  */
10263 /* We use char because int might match the return type of a gcc2
10264     builtin and then its argument prototype would still apply.  */
10265 char jl_dic_list_e();
10266
10267 int main() {
10268 jl_dic_list_e()
10269 ; return 0; }
10270 EOF
10271 if { (eval echo configure:10272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10272   rm -rf conftest*
10273   eval "ac_cv_lib_$ac_lib_var=yes"
10274 else
10275   echo "configure: failed program was:" >&5
10276   cat conftest.$ac_ext >&5
10277   rm -rf conftest*
10278   eval "ac_cv_lib_$ac_lib_var=no"
10279 fi
10280 rm -f conftest*
10281 xe_check_libs=""
10282
10283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10284   echo "$ac_t""yes" 1>&6
10285   libwnn=wnn
10286 else
10287   echo "$ac_t""no" 1>&6
10288 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10289 echo "configure:10290: checking for jl_dic_list_e in -lwnn4" >&5
10290 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10291
10292 xe_check_libs=" -lwnn4 "
10293 cat > conftest.$ac_ext <<EOF
10294 #line 10295 "configure"
10295 #include "confdefs.h"
10296 /* Override any gcc2 internal prototype to avoid an error.  */
10297 /* We use char because int might match the return type of a gcc2
10298     builtin and then its argument prototype would still apply.  */
10299 char jl_dic_list_e();
10300
10301 int main() {
10302 jl_dic_list_e()
10303 ; return 0; }
10304 EOF
10305 if { (eval echo configure:10306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10306   rm -rf conftest*
10307   eval "ac_cv_lib_$ac_lib_var=yes"
10308 else
10309   echo "configure: failed program was:" >&5
10310   cat conftest.$ac_ext >&5
10311   rm -rf conftest*
10312   eval "ac_cv_lib_$ac_lib_var=no"
10313 fi
10314 rm -f conftest*
10315 xe_check_libs=""
10316
10317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10318   echo "$ac_t""yes" 1>&6
10319   libwnn=wnn4
10320 else
10321   echo "$ac_t""no" 1>&6
10322 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10323 echo "configure:10324: checking for jl_dic_list_e in -lwnn6" >&5
10324 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10325
10326 xe_check_libs=" -lwnn6 "
10327 cat > conftest.$ac_ext <<EOF
10328 #line 10329 "configure"
10329 #include "confdefs.h"
10330 /* Override any gcc2 internal prototype to avoid an error.  */
10331 /* We use char because int might match the return type of a gcc2
10332     builtin and then its argument prototype would still apply.  */
10333 char jl_dic_list_e();
10334
10335 int main() {
10336 jl_dic_list_e()
10337 ; return 0; }
10338 EOF
10339 if { (eval echo configure:10340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10340   rm -rf conftest*
10341   eval "ac_cv_lib_$ac_lib_var=yes"
10342 else
10343   echo "configure: failed program was:" >&5
10344   cat conftest.$ac_ext >&5
10345   rm -rf conftest*
10346   eval "ac_cv_lib_$ac_lib_var=no"
10347 fi
10348 rm -f conftest*
10349 xe_check_libs=""
10350
10351 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10352   echo "$ac_t""yes" 1>&6
10353   libwnn=wnn6
10354 else
10355   echo "$ac_t""no" 1>&6
10356 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10357 echo "configure:10358: checking for dic_list_e in -lwnn6_fromsrc" >&5
10358 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10359
10360 xe_check_libs=" -lwnn6_fromsrc "
10361 cat > conftest.$ac_ext <<EOF
10362 #line 10363 "configure"
10363 #include "confdefs.h"
10364 /* Override any gcc2 internal prototype to avoid an error.  */
10365 /* We use char because int might match the return type of a gcc2
10366     builtin and then its argument prototype would still apply.  */
10367 char dic_list_e();
10368
10369 int main() {
10370 dic_list_e()
10371 ; return 0; }
10372 EOF
10373 if { (eval echo configure:10374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10374   rm -rf conftest*
10375   eval "ac_cv_lib_$ac_lib_var=yes"
10376 else
10377   echo "configure: failed program was:" >&5
10378   cat conftest.$ac_ext >&5
10379   rm -rf conftest*
10380   eval "ac_cv_lib_$ac_lib_var=no"
10381 fi
10382 rm -f conftest*
10383 xe_check_libs=""
10384
10385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10386   echo "$ac_t""yes" 1>&6
10387   libwnn=wnn6_fromsrc
10388 else
10389   echo "$ac_t""no" 1>&6
10390 with_wnn=no
10391 fi
10392
10393
10394 fi
10395
10396
10397 fi
10398
10399
10400 fi
10401
10402
10403   fi
10404   test -z "$with_wnn" && with_wnn=yes
10405   if test "$with_wnn" = "yes"; then
10406     { test "$extra_verbose" = "yes" && cat << \EOF
10407     Defining HAVE_WNN
10408 EOF
10409 cat >> confdefs.h <<\EOF
10410 #define HAVE_WNN 1
10411 EOF
10412 }
10413
10414     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10415     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10416    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10417  fi
10418     if test "$with_wnn6" != "no"; then
10419       
10420 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10421 echo "configure:10422: checking for jl_fi_dic_list in -l$libwnn" >&5
10422 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10423
10424 xe_check_libs=" -l$libwnn "
10425 cat > conftest.$ac_ext <<EOF
10426 #line 10427 "configure"
10427 #include "confdefs.h"
10428 /* Override any gcc2 internal prototype to avoid an error.  */
10429 /* We use char because int might match the return type of a gcc2
10430     builtin and then its argument prototype would still apply.  */
10431 char jl_fi_dic_list();
10432
10433 int main() {
10434 jl_fi_dic_list()
10435 ; return 0; }
10436 EOF
10437 if { (eval echo configure:10438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10438   rm -rf conftest*
10439   eval "ac_cv_lib_$ac_lib_var=yes"
10440 else
10441   echo "configure: failed program was:" >&5
10442   cat conftest.$ac_ext >&5
10443   rm -rf conftest*
10444   eval "ac_cv_lib_$ac_lib_var=no"
10445 fi
10446 rm -f conftest*
10447 xe_check_libs=""
10448
10449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10450   echo "$ac_t""yes" 1>&6
10451   with_wnn6=yes
10452 else
10453   echo "$ac_t""no" 1>&6
10454 fi
10455
10456
10457       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10458     Defining WNN6
10459 EOF
10460 cat >> confdefs.h <<\EOF
10461 #define WNN6 1
10462 EOF
10463 }
10464
10465     fi
10466   fi
10467
10468     canna_includes_found=no
10469   if test "$with_canna" != "no"; then
10470     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10471 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10472 echo "configure:10473: checking for canna/jrkanji.h" >&5
10473
10474 cat > conftest.$ac_ext <<EOF
10475 #line 10476 "configure"
10476 #include "confdefs.h"
10477 #include <canna/jrkanji.h>
10478 EOF
10479 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10480 { (eval echo configure:10481: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10481 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10482 if test -z "$ac_err"; then
10483   rm -rf conftest*
10484   eval "ac_cv_header_$ac_safe=yes"
10485 else
10486   echo "$ac_err" >&5
10487   echo "configure: failed program was:" >&5
10488   cat conftest.$ac_ext >&5
10489   rm -rf conftest*
10490   eval "ac_cv_header_$ac_safe=no"
10491 fi
10492 rm -f conftest*
10493 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10494   echo "$ac_t""yes" 1>&6
10495   canna_includes_found=yes
10496 else
10497   echo "$ac_t""no" 1>&6
10498 fi
10499
10500   fi
10501   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10502       -d "/usr/local/canna/include"; then
10503     save_c_switch_site="$c_switch_site"
10504     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10505     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10506 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10507 echo "configure:10508: checking for canna/jrkanji.h" >&5
10508
10509 cat > conftest.$ac_ext <<EOF
10510 #line 10511 "configure"
10511 #include "confdefs.h"
10512 #include <canna/jrkanji.h>
10513 EOF
10514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10515 { (eval echo configure:10516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10517 if test -z "$ac_err"; then
10518   rm -rf conftest*
10519   eval "ac_cv_header_$ac_safe=yes"
10520 else
10521   echo "$ac_err" >&5
10522   echo "configure: failed program was:" >&5
10523   cat conftest.$ac_ext >&5
10524   rm -rf conftest*
10525   eval "ac_cv_header_$ac_safe=no"
10526 fi
10527 rm -f conftest*
10528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10529   echo "$ac_t""yes" 1>&6
10530   canna_includes_found=yes
10531 else
10532   echo "$ac_t""no" 1>&6
10533 fi
10534
10535     if test "$canna_includes_found" != "yes"; then
10536       c_switch_site="$save_c_switch_site"
10537       with_canna="no"
10538     fi
10539   fi
10540
10541   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10542 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10543 echo "configure:10544: checking for canna/RK.h" >&5
10544
10545 cat > conftest.$ac_ext <<EOF
10546 #line 10547 "configure"
10547 #include "confdefs.h"
10548 #include <canna/RK.h>
10549 EOF
10550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10551 { (eval echo configure:10552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10553 if test -z "$ac_err"; then
10554   rm -rf conftest*
10555   eval "ac_cv_header_$ac_safe=yes"
10556 else
10557   echo "$ac_err" >&5
10558   echo "configure: failed program was:" >&5
10559   cat conftest.$ac_ext >&5
10560   rm -rf conftest*
10561   eval "ac_cv_header_$ac_safe=no"
10562 fi
10563 rm -f conftest*
10564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566   :
10567 else
10568   echo "$ac_t""no" 1>&6
10569 with_canna=no
10570 fi
10571  }
10572   test -z "$with_canna" && { 
10573 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10574 echo "configure:10575: checking for RkBgnBun in -lRKC" >&5
10575 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10576
10577 xe_check_libs=" -lRKC "
10578 cat > conftest.$ac_ext <<EOF
10579 #line 10580 "configure"
10580 #include "confdefs.h"
10581 /* Override any gcc2 internal prototype to avoid an error.  */
10582 /* We use char because int might match the return type of a gcc2
10583     builtin and then its argument prototype would still apply.  */
10584 char RkBgnBun();
10585
10586 int main() {
10587 RkBgnBun()
10588 ; return 0; }
10589 EOF
10590 if { (eval echo configure:10591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10591   rm -rf conftest*
10592   eval "ac_cv_lib_$ac_lib_var=yes"
10593 else
10594   echo "configure: failed program was:" >&5
10595   cat conftest.$ac_ext >&5
10596   rm -rf conftest*
10597   eval "ac_cv_lib_$ac_lib_var=no"
10598 fi
10599 rm -f conftest*
10600 xe_check_libs=""
10601
10602 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10603   echo "$ac_t""yes" 1>&6
10604   :
10605 else
10606   echo "$ac_t""no" 1>&6
10607 with_canna=no
10608 fi
10609
10610  }
10611   test -z "$with_canna" && { 
10612 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10613 echo "configure:10614: checking for jrKanjiControl in -lcanna" >&5
10614 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10615
10616 xe_check_libs=" -lcanna "
10617 cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620 /* Override any gcc2 internal prototype to avoid an error.  */
10621 /* We use char because int might match the return type of a gcc2
10622     builtin and then its argument prototype would still apply.  */
10623 char jrKanjiControl();
10624
10625 int main() {
10626 jrKanjiControl()
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_lib_$ac_lib_var=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_lib_$ac_lib_var=no"
10637 fi
10638 rm -f conftest*
10639 xe_check_libs=""
10640
10641 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10642   echo "$ac_t""yes" 1>&6
10643   :
10644 else
10645   echo "$ac_t""no" 1>&6
10646 with_canna=no
10647 fi
10648
10649  }
10650   test -z "$with_canna" && with_canna=yes
10651   if test "$with_canna" = "yes"; then
10652     { test "$extra_verbose" = "yes" && cat << \EOF
10653     Defining HAVE_CANNA
10654 EOF
10655 cat >> confdefs.h <<\EOF
10656 #define HAVE_CANNA 1
10657 EOF
10658 }
10659
10660     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10661     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10662    echo "    xemacs will be linked with \"mule-canna.o\""
10663  fi
10664   fi
10665
10666 else   for feature in xim canna wnn; do
10667     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10668       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10669     fi
10670     eval "with_${feature}=no"
10671   done
10672 fi 
10673
10674 if test "$need_motif" = "yes" ; then
10675   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10676     
10677 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10678 echo "configure:10679: checking for layout_object_getvalue in -li18n" >&5
10679 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10680
10681 xe_check_libs=" -li18n "
10682 cat > conftest.$ac_ext <<EOF
10683 #line 10684 "configure"
10684 #include "confdefs.h"
10685 /* Override any gcc2 internal prototype to avoid an error.  */
10686 /* We use char because int might match the return type of a gcc2
10687     builtin and then its argument prototype would still apply.  */
10688 char layout_object_getvalue();
10689
10690 int main() {
10691 layout_object_getvalue()
10692 ; return 0; }
10693 EOF
10694 if { (eval echo configure:10695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10695   rm -rf conftest*
10696   eval "ac_cv_lib_$ac_lib_var=yes"
10697 else
10698   echo "configure: failed program was:" >&5
10699   cat conftest.$ac_ext >&5
10700   rm -rf conftest*
10701   eval "ac_cv_lib_$ac_lib_var=no"
10702 fi
10703 rm -f conftest*
10704 xe_check_libs=""
10705
10706 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10707   echo "$ac_t""yes" 1>&6
10708   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10709 else
10710   echo "$ac_t""no" 1>&6
10711 fi
10712
10713
10714   
10715 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10716     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10717   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10718   
10719         runpath="" runpath_dirs=""
10720   if test -n "$LD_RUN_PATH"; then
10721     runpath="$LD_RUN_PATH"
10722   elif test "$GCC" = "yes"; then
10723         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10724     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10725     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10726     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10727       case "$arg" in P,* | -L* | -R* )
10728         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10729           {
10730 xe_runpath_dir="$dir"
10731   test "$xe_runpath_dir" != "/lib"     -a \
10732         "$xe_runpath_dir" != "/usr/lib" -a \
10733         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10734   eval "$xe_add_unique_runpath_dir"
10735 }
10736         done ;;
10737       esac
10738     done
10739     ld_switch_run="$ld_switch_run_save"
10740     rm -f conftest*
10741   else
10742         for arg in $ld_switch_site $ld_switch_x_site; do
10743       case "$arg" in -L*) {
10744 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10745   test "$xe_runpath_dir" != "/lib"     -a \
10746         "$xe_runpath_dir" != "/usr/lib" -a \
10747         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10748   eval "$xe_add_unique_runpath_dir"
10749 };; esac
10750     done
10751         if test "$opsys $need_motif" = "sol2 yes"; then
10752       xe_runpath_dir="/opt/SUNWdt/lib";
10753       eval "$xe_add_unique_runpath_dir";
10754     fi
10755   fi 
10756   if test -n "$runpath"; then
10757     ld_switch_run="${dash_r}${runpath}"
10758     
10759 if test "$GCC" = "yes"; then
10760   set x $ld_switch_run; shift; ld_switch_run=""
10761   while test -n "$1"; do
10762     case $1 in
10763       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10764       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10765       -Xlinker* ) ;;
10766       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10767     esac
10768     shift
10769   done
10770 fi
10771     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10772   fi
10773 fi
10774
10775 fi
10776
10777 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
10778 do
10779 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10780 echo "configure:10781: checking for $ac_func" >&5
10781
10782 cat > conftest.$ac_ext <<EOF
10783 #line 10784 "configure"
10784 #include "confdefs.h"
10785 /* System header to define __stub macros and hopefully few prototypes,
10786     which can conflict with char $ac_func(); below.  */
10787 #include <assert.h>
10788 /* Override any gcc2 internal prototype to avoid an error.  */
10789 /* We use char because int might match the return type of a gcc2
10790     builtin and then its argument prototype would still apply.  */
10791 char $ac_func();
10792
10793 int main() {
10794
10795 /* The GNU C library defines this for functions which it implements
10796     to always fail with ENOSYS.  Some functions are actually named
10797     something starting with __ and the normal name is an alias.  */
10798 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10799 choke me
10800 #else
10801 $ac_func();
10802 #endif
10803
10804 ; return 0; }
10805 EOF
10806 if { (eval echo configure:10807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10807   rm -rf conftest*
10808   eval "ac_cv_func_$ac_func=yes"
10809 else
10810   echo "configure: failed program was:" >&5
10811   cat conftest.$ac_ext >&5
10812   rm -rf conftest*
10813   eval "ac_cv_func_$ac_func=no"
10814 fi
10815 rm -f conftest*
10816
10817 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10818   echo "$ac_t""yes" 1>&6
10819     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10820   { test "$extra_verbose" = "yes" && cat << EOF
10821     Defining $ac_tr_func
10822 EOF
10823 cat >> confdefs.h <<EOF
10824 #define $ac_tr_func 1
10825 EOF
10826 }
10827  
10828 else
10829   echo "$ac_t""no" 1>&6
10830 fi
10831 done
10832
10833
10834
10835 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10836 do
10837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10838 echo "configure:10839: checking for $ac_func" >&5
10839
10840 cat > conftest.$ac_ext <<EOF
10841 #line 10842 "configure"
10842 #include "confdefs.h"
10843 /* System header to define __stub macros and hopefully few prototypes,
10844     which can conflict with char $ac_func(); below.  */
10845 #include <assert.h>
10846 /* Override any gcc2 internal prototype to avoid an error.  */
10847 /* We use char because int might match the return type of a gcc2
10848     builtin and then its argument prototype would still apply.  */
10849 char $ac_func();
10850
10851 int main() {
10852
10853 /* The GNU C library defines this for functions which it implements
10854     to always fail with ENOSYS.  Some functions are actually named
10855     something starting with __ and the normal name is an alias.  */
10856 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10857 choke me
10858 #else
10859 $ac_func();
10860 #endif
10861
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10865   rm -rf conftest*
10866   eval "ac_cv_func_$ac_func=yes"
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_func_$ac_func=no"
10872 fi
10873 rm -f conftest*
10874
10875 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10876   echo "$ac_t""yes" 1>&6
10877     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10878   { test "$extra_verbose" = "yes" && cat << EOF
10879     Defining $ac_tr_func
10880 EOF
10881 cat >> confdefs.h <<EOF
10882 #define $ac_tr_func 1
10883 EOF
10884 }
10885  
10886 else
10887   echo "$ac_t""no" 1>&6
10888 fi
10889 done
10890
10891
10892 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10893 echo "configure:10894: checking for openpty" >&5
10894
10895 cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 /* System header to define __stub macros and hopefully few prototypes,
10899     which can conflict with char openpty(); below.  */
10900 #include <assert.h>
10901 /* Override any gcc2 internal prototype to avoid an error.  */
10902 /* We use char because int might match the return type of a gcc2
10903     builtin and then its argument prototype would still apply.  */
10904 char openpty();
10905
10906 int main() {
10907
10908 /* The GNU C library defines this for functions which it implements
10909     to always fail with ENOSYS.  Some functions are actually named
10910     something starting with __ and the normal name is an alias.  */
10911 #if defined (__stub_openpty) || defined (__stub___openpty)
10912 choke me
10913 #else
10914 openpty();
10915 #endif
10916
10917 ; return 0; }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10920   rm -rf conftest*
10921   eval "ac_cv_func_openpty=yes"
10922 else
10923   echo "configure: failed program was:" >&5
10924   cat conftest.$ac_ext >&5
10925   rm -rf conftest*
10926   eval "ac_cv_func_openpty=no"
10927 fi
10928 rm -f conftest*
10929
10930 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10931   echo "$ac_t""yes" 1>&6
10932   have_openpty=yes
10933 else
10934   echo "$ac_t""no" 1>&6
10935
10936   
10937 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10938 echo "configure:10939: checking for openpty in -lutil" >&5
10939 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10940
10941 xe_check_libs=" -lutil "
10942 cat > conftest.$ac_ext <<EOF
10943 #line 10944 "configure"
10944 #include "confdefs.h"
10945 /* Override any gcc2 internal prototype to avoid an error.  */
10946 /* We use char because int might match the return type of a gcc2
10947     builtin and then its argument prototype would still apply.  */
10948 char openpty();
10949
10950 int main() {
10951 openpty()
10952 ; return 0; }
10953 EOF
10954 if { (eval echo configure:10955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10955   rm -rf conftest*
10956   eval "ac_cv_lib_$ac_lib_var=yes"
10957 else
10958   echo "configure: failed program was:" >&5
10959   cat conftest.$ac_ext >&5
10960   rm -rf conftest*
10961   eval "ac_cv_lib_$ac_lib_var=no"
10962 fi
10963 rm -f conftest*
10964 xe_check_libs=""
10965
10966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10967   echo "$ac_t""yes" 1>&6
10968   have_openpty=yes need_libutil=yes
10969 else
10970   echo "$ac_t""no" 1>&6
10971 fi
10972
10973
10974 fi
10975
10976 if test "$have_openpty" = "yes"; then
10977   { test "$extra_verbose" = "yes" && cat << \EOF
10978     Defining HAVE_OPENPTY
10979 EOF
10980 cat >> confdefs.h <<\EOF
10981 #define HAVE_OPENPTY 1
10982 EOF
10983 }
10984
10985   for ac_hdr in pty.h libutil.h util.h
10986 do
10987 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10988 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10989 echo "configure:10990: checking for $ac_hdr" >&5
10990
10991 cat > conftest.$ac_ext <<EOF
10992 #line 10993 "configure"
10993 #include "confdefs.h"
10994 #include <$ac_hdr>
10995 EOF
10996 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10997 { (eval echo configure:10998: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10998 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10999 if test -z "$ac_err"; then
11000   rm -rf conftest*
11001   eval "ac_cv_header_$ac_safe=yes"
11002 else
11003   echo "$ac_err" >&5
11004   echo "configure: failed program was:" >&5
11005   cat conftest.$ac_ext >&5
11006   rm -rf conftest*
11007   eval "ac_cv_header_$ac_safe=no"
11008 fi
11009 rm -f conftest*
11010 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11011   echo "$ac_t""yes" 1>&6
11012     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11013   { test "$extra_verbose" = "yes" && cat << EOF
11014     Defining $ac_tr_hdr
11015 EOF
11016 cat >> confdefs.h <<EOF
11017 #define $ac_tr_hdr 1
11018 EOF
11019 }
11020  break
11021 else
11022   echo "$ac_t""no" 1>&6
11023 fi
11024 done
11025
11026   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11027 fi
11028
11029 for ac_hdr in stropts.h
11030 do
11031 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11032 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11033 echo "configure:11034: checking for $ac_hdr" >&5
11034
11035 cat > conftest.$ac_ext <<EOF
11036 #line 11037 "configure"
11037 #include "confdefs.h"
11038 #include <$ac_hdr>
11039 EOF
11040 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11041 { (eval echo configure:11042: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11042 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11043 if test -z "$ac_err"; then
11044   rm -rf conftest*
11045   eval "ac_cv_header_$ac_safe=yes"
11046 else
11047   echo "$ac_err" >&5
11048   echo "configure: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=no"
11052 fi
11053 rm -f conftest*
11054 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11055   echo "$ac_t""yes" 1>&6
11056     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11057   { test "$extra_verbose" = "yes" && cat << EOF
11058     Defining $ac_tr_hdr
11059 EOF
11060 cat >> confdefs.h <<EOF
11061 #define $ac_tr_hdr 1
11062 EOF
11063 }
11064  
11065 else
11066   echo "$ac_t""no" 1>&6
11067 fi
11068 done
11069
11070 if test "$ac_cv_header_stropts_h" = "yes"; then
11071   for ac_func in isastream
11072 do
11073 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11074 echo "configure:11075: checking for $ac_func" >&5
11075
11076 cat > conftest.$ac_ext <<EOF
11077 #line 11078 "configure"
11078 #include "confdefs.h"
11079 /* System header to define __stub macros and hopefully few prototypes,
11080     which can conflict with char $ac_func(); below.  */
11081 #include <assert.h>
11082 /* Override any gcc2 internal prototype to avoid an error.  */
11083 /* We use char because int might match the return type of a gcc2
11084     builtin and then its argument prototype would still apply.  */
11085 char $ac_func();
11086
11087 int main() {
11088
11089 /* The GNU C library defines this for functions which it implements
11090     to always fail with ENOSYS.  Some functions are actually named
11091     something starting with __ and the normal name is an alias.  */
11092 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11093 choke me
11094 #else
11095 $ac_func();
11096 #endif
11097
11098 ; return 0; }
11099 EOF
11100 if { (eval echo configure:11101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11101   rm -rf conftest*
11102   eval "ac_cv_func_$ac_func=yes"
11103 else
11104   echo "configure: failed program was:" >&5
11105   cat conftest.$ac_ext >&5
11106   rm -rf conftest*
11107   eval "ac_cv_func_$ac_func=no"
11108 fi
11109 rm -f conftest*
11110
11111 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11112   echo "$ac_t""yes" 1>&6
11113     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11114   { test "$extra_verbose" = "yes" && cat << EOF
11115     Defining $ac_tr_func
11116 EOF
11117 cat >> confdefs.h <<EOF
11118 #define $ac_tr_func 1
11119 EOF
11120 }
11121  
11122 else
11123   echo "$ac_t""no" 1>&6
11124 fi
11125 done
11126
11127   for ac_hdr in strtio.h
11128 do
11129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11131 echo "configure:11132: checking for $ac_hdr" >&5
11132
11133 cat > conftest.$ac_ext <<EOF
11134 #line 11135 "configure"
11135 #include "confdefs.h"
11136 #include <$ac_hdr>
11137 EOF
11138 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11139 { (eval echo configure:11140: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11140 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11141 if test -z "$ac_err"; then
11142   rm -rf conftest*
11143   eval "ac_cv_header_$ac_safe=yes"
11144 else
11145   echo "$ac_err" >&5
11146   echo "configure: failed program was:" >&5
11147   cat conftest.$ac_ext >&5
11148   rm -rf conftest*
11149   eval "ac_cv_header_$ac_safe=no"
11150 fi
11151 rm -f conftest*
11152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11155   { test "$extra_verbose" = "yes" && cat << EOF
11156     Defining $ac_tr_hdr
11157 EOF
11158 cat >> confdefs.h <<EOF
11159 #define $ac_tr_hdr 1
11160 EOF
11161 }
11162  
11163 else
11164   echo "$ac_t""no" 1>&6
11165 fi
11166 done
11167  fi
11168
11169 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11170    echo "    xemacs will be linked with \"realpath.o\""
11171  fi
11172
11173 for ac_func in getloadavg
11174 do
11175 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11176 echo "configure:11177: checking for $ac_func" >&5
11177
11178 cat > conftest.$ac_ext <<EOF
11179 #line 11180 "configure"
11180 #include "confdefs.h"
11181 /* System header to define __stub macros and hopefully few prototypes,
11182     which can conflict with char $ac_func(); below.  */
11183 #include <assert.h>
11184 /* Override any gcc2 internal prototype to avoid an error.  */
11185 /* We use char because int might match the return type of a gcc2
11186     builtin and then its argument prototype would still apply.  */
11187 char $ac_func();
11188
11189 int main() {
11190
11191 /* The GNU C library defines this for functions which it implements
11192     to always fail with ENOSYS.  Some functions are actually named
11193     something starting with __ and the normal name is an alias.  */
11194 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11195 choke me
11196 #else
11197 $ac_func();
11198 #endif
11199
11200 ; return 0; }
11201 EOF
11202 if { (eval echo configure:11203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11203   rm -rf conftest*
11204   eval "ac_cv_func_$ac_func=yes"
11205 else
11206   echo "configure: failed program was:" >&5
11207   cat conftest.$ac_ext >&5
11208   rm -rf conftest*
11209   eval "ac_cv_func_$ac_func=no"
11210 fi
11211 rm -f conftest*
11212
11213 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11214   echo "$ac_t""yes" 1>&6
11215     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11216   { test "$extra_verbose" = "yes" && cat << EOF
11217     Defining $ac_tr_func
11218 EOF
11219 cat >> confdefs.h <<EOF
11220 #define $ac_tr_func 1
11221 EOF
11222 }
11223  
11224 else
11225   echo "$ac_t""no" 1>&6
11226 fi
11227 done
11228
11229
11230 if test "$ac_cv_func_getloadavg" = "yes"; then
11231         for ac_hdr in sys/loadavg.h
11232 do
11233 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11234 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11235 echo "configure:11236: checking for $ac_hdr" >&5
11236
11237 cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240 #include <$ac_hdr>
11241 EOF
11242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11243 { (eval echo configure:11244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11245 if test -z "$ac_err"; then
11246   rm -rf conftest*
11247   eval "ac_cv_header_$ac_safe=yes"
11248 else
11249   echo "$ac_err" >&5
11250   echo "configure: failed program was:" >&5
11251   cat conftest.$ac_ext >&5
11252   rm -rf conftest*
11253   eval "ac_cv_header_$ac_safe=no"
11254 fi
11255 rm -f conftest*
11256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11257   echo "$ac_t""yes" 1>&6
11258     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11259   { test "$extra_verbose" = "yes" && cat << EOF
11260     Defining $ac_tr_hdr
11261 EOF
11262 cat >> confdefs.h <<EOF
11263 #define $ac_tr_hdr 1
11264 EOF
11265 }
11266  
11267 else
11268   echo "$ac_t""no" 1>&6
11269 fi
11270 done
11271
11272 else
11273     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11274    echo "    xemacs will be linked with \"getloadavg.o\""
11275  fi
11276
11277     
11278 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11279 echo "configure:11280: checking for kstat_open in -lkstat" >&5
11280 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11281
11282 xe_check_libs=" -lkstat "
11283 cat > conftest.$ac_ext <<EOF
11284 #line 11285 "configure"
11285 #include "confdefs.h"
11286 /* Override any gcc2 internal prototype to avoid an error.  */
11287 /* We use char because int might match the return type of a gcc2
11288     builtin and then its argument prototype would still apply.  */
11289 char kstat_open();
11290
11291 int main() {
11292 kstat_open()
11293 ; return 0; }
11294 EOF
11295 if { (eval echo configure:11296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11296   rm -rf conftest*
11297   eval "ac_cv_lib_$ac_lib_var=yes"
11298 else
11299   echo "configure: failed program was:" >&5
11300   cat conftest.$ac_ext >&5
11301   rm -rf conftest*
11302   eval "ac_cv_lib_$ac_lib_var=no"
11303 fi
11304 rm -f conftest*
11305 xe_check_libs=""
11306
11307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11308   echo "$ac_t""yes" 1>&6
11309     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11310     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11311   { test "$extra_verbose" = "yes" && cat << EOF
11312     Defining $ac_tr_lib
11313 EOF
11314 cat >> confdefs.h <<EOF
11315 #define $ac_tr_lib 1
11316 EOF
11317 }
11318
11319   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11320
11321 else
11322   echo "$ac_t""no" 1>&6
11323 fi
11324
11325
11326   for ac_hdr in kstat.h
11327 do
11328 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11329 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11330 echo "configure:11331: checking for $ac_hdr" >&5
11331
11332 cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335 #include <$ac_hdr>
11336 EOF
11337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11338 { (eval echo configure:11339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11340 if test -z "$ac_err"; then
11341   rm -rf conftest*
11342   eval "ac_cv_header_$ac_safe=yes"
11343 else
11344   echo "$ac_err" >&5
11345   echo "configure: failed program was:" >&5
11346   cat conftest.$ac_ext >&5
11347   rm -rf conftest*
11348   eval "ac_cv_header_$ac_safe=no"
11349 fi
11350 rm -f conftest*
11351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11352   echo "$ac_t""yes" 1>&6
11353     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11354   { test "$extra_verbose" = "yes" && cat << EOF
11355     Defining $ac_tr_hdr
11356 EOF
11357 cat >> confdefs.h <<EOF
11358 #define $ac_tr_hdr 1
11359 EOF
11360 }
11361  
11362 else
11363   echo "$ac_t""no" 1>&6
11364 fi
11365 done
11366
11367
11368     
11369 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11370 echo "configure:11371: checking for kvm_read in -lkvm" >&5
11371 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11372
11373 xe_check_libs=" -lkvm "
11374 cat > conftest.$ac_ext <<EOF
11375 #line 11376 "configure"
11376 #include "confdefs.h"
11377 /* Override any gcc2 internal prototype to avoid an error.  */
11378 /* We use char because int might match the return type of a gcc2
11379     builtin and then its argument prototype would still apply.  */
11380 char kvm_read();
11381
11382 int main() {
11383 kvm_read()
11384 ; return 0; }
11385 EOF
11386 if { (eval echo configure:11387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11387   rm -rf conftest*
11388   eval "ac_cv_lib_$ac_lib_var=yes"
11389 else
11390   echo "configure: failed program was:" >&5
11391   cat conftest.$ac_ext >&5
11392   rm -rf conftest*
11393   eval "ac_cv_lib_$ac_lib_var=no"
11394 fi
11395 rm -f conftest*
11396 xe_check_libs=""
11397
11398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11399   echo "$ac_t""yes" 1>&6
11400     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11402   { test "$extra_verbose" = "yes" && cat << EOF
11403     Defining $ac_tr_lib
11404 EOF
11405 cat >> confdefs.h <<EOF
11406 #define $ac_tr_lib 1
11407 EOF
11408 }
11409
11410   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11411
11412 else
11413   echo "$ac_t""no" 1>&6
11414 fi
11415
11416
11417 fi
11418
11419 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11420 echo "configure:11421: checking whether netdb declares h_errno" >&5
11421 cat > conftest.$ac_ext <<EOF
11422 #line 11423 "configure"
11423 #include "confdefs.h"
11424 #include <netdb.h>
11425 int main() {
11426 return h_errno;
11427 ; return 0; }
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11430   rm -rf conftest*
11431   echo "$ac_t""yes" 1>&6
11432    { test "$extra_verbose" = "yes" && cat << \EOF
11433     Defining HAVE_H_ERRNO
11434 EOF
11435 cat >> confdefs.h <<\EOF
11436 #define HAVE_H_ERRNO 1
11437 EOF
11438 }
11439
11440 else
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   echo "$ac_t""no" 1>&6
11445 fi
11446 rm -f conftest*
11447
11448 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11449 echo "configure:11450: checking for sigsetjmp" >&5
11450 cat > conftest.$ac_ext <<EOF
11451 #line 11452 "configure"
11452 #include "confdefs.h"
11453 #include <setjmp.h>
11454 int main() {
11455 sigjmp_buf bar; sigsetjmp (bar, 0);
11456 ; return 0; }
11457 EOF
11458 if { (eval echo configure:11459: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11459   rm -rf conftest*
11460   echo "$ac_t""yes" 1>&6
11461    { test "$extra_verbose" = "yes" && cat << \EOF
11462     Defining HAVE_SIGSETJMP
11463 EOF
11464 cat >> confdefs.h <<\EOF
11465 #define HAVE_SIGSETJMP 1
11466 EOF
11467 }
11468
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -rf conftest*
11473   echo "$ac_t""no" 1>&6
11474 fi
11475 rm -f conftest*
11476
11477 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11478 echo "configure:11479: checking whether localtime caches TZ" >&5
11479
11480 if test "$ac_cv_func_tzset" = "yes"; then
11481 cat > conftest.$ac_ext <<EOF
11482 #line 11483 "configure"
11483 #include "confdefs.h"
11484 #include <time.h>
11485 #if STDC_HEADERS
11486 # include <stdlib.h>
11487 #endif
11488 extern char **environ;
11489 unset_TZ ()
11490 {
11491   char **from, **to;
11492   for (to = from = environ; (*to = *from); from++)
11493     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11494       to++;
11495 }
11496 char TZ_GMT0[] = "TZ=GMT0";
11497 char TZ_PST8[] = "TZ=PST8";
11498 main()
11499 {
11500   time_t now = time ((time_t *) 0);
11501   int hour_GMT0, hour_unset;
11502   if (putenv (TZ_GMT0) != 0)
11503     exit (1);
11504   hour_GMT0 = localtime (&now)->tm_hour;
11505   unset_TZ ();
11506   hour_unset = localtime (&now)->tm_hour;
11507   if (putenv (TZ_PST8) != 0)
11508     exit (1);
11509   if (localtime (&now)->tm_hour == hour_GMT0)
11510     exit (1);
11511   unset_TZ ();
11512   if (localtime (&now)->tm_hour != hour_unset)
11513     exit (1);
11514   exit (0);
11515 }
11516 EOF
11517 if { (eval echo configure:11518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11518 then
11519   emacs_cv_localtime_cache=no
11520 else
11521   conftest_rc="$?"
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -fr conftest*
11525   emacs_cv_localtime_cache=yes
11526 fi
11527 rm -fr conftest*
11528 else
11529         # If we lack tzset, report that localtime does not cache TZ,
11530         # since we can't invalidate the cache if we don't have tzset.
11531         emacs_cv_localtime_cache=no
11532 fi
11533 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11534 if test $emacs_cv_localtime_cache = yes; then
11535   { test "$extra_verbose" = "yes" && cat << \EOF
11536     Defining LOCALTIME_CACHE
11537 EOF
11538 cat >> confdefs.h <<\EOF
11539 #define LOCALTIME_CACHE 1
11540 EOF
11541 }
11542
11543 fi
11544
11545 if test "$HAVE_TIMEVAL" = "yes"; then
11546 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11547 echo "configure:11548: checking whether gettimeofday accepts one or two arguments" >&5
11548 cat > conftest.$ac_ext <<EOF
11549 #line 11550 "configure"
11550 #include "confdefs.h"
11551
11552 #ifdef TIME_WITH_SYS_TIME
11553 #include <sys/time.h>
11554 #include <time.h>
11555 #else
11556 #ifdef HAVE_SYS_TIME_H
11557 #include <sys/time.h>
11558 #else
11559 #include <time.h>
11560 #endif
11561 #endif
11562   
11563 int main() {
11564
11565   struct timeval time;
11566   gettimeofday (&time, 0);
11567
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11571   rm -rf conftest*
11572   echo "$ac_t""two" 1>&6
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   echo "$ac_t""one" 1>&6
11578    { test "$extra_verbose" = "yes" && cat << \EOF
11579     Defining GETTIMEOFDAY_ONE_ARGUMENT
11580 EOF
11581 cat >> confdefs.h <<\EOF
11582 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11583 EOF
11584 }
11585
11586 fi
11587 rm -f conftest*
11588 fi
11589
11590
11591 echo $ac_n "checking for inline""... $ac_c" 1>&6
11592 echo "configure:11593: checking for inline" >&5
11593
11594 ac_cv_c_inline=no
11595 for ac_kw in inline __inline__ __inline; do
11596   cat > conftest.$ac_ext <<EOF
11597 #line 11598 "configure"
11598 #include "confdefs.h"
11599
11600 int main() {
11601 } $ac_kw foo() {
11602 ; return 0; }
11603 EOF
11604 if { (eval echo configure:11605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11605   rm -rf conftest*
11606   ac_cv_c_inline=$ac_kw; break
11607 else
11608   echo "configure: failed program was:" >&5
11609   cat conftest.$ac_ext >&5
11610 fi
11611 rm -f conftest*
11612 done
11613
11614
11615 echo "$ac_t""$ac_cv_c_inline" 1>&6
11616 case "$ac_cv_c_inline" in
11617   inline | yes) ;;
11618   no) { test "$extra_verbose" = "yes" && cat << \EOF
11619     Defining inline = 
11620 EOF
11621 cat >> confdefs.h <<\EOF
11622 #define inline 
11623 EOF
11624 }
11625  ;;
11626   *)  { test "$extra_verbose" = "yes" && cat << EOF
11627     Defining inline = $ac_cv_c_inline
11628 EOF
11629 cat >> confdefs.h <<EOF
11630 #define inline $ac_cv_c_inline
11631 EOF
11632 }
11633  ;;
11634 esac
11635
11636 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11637    echo "    xemacs will be linked with \"inline.o\""
11638  fi
11639
11640
11641 if test "$__DECC" != "yes"; then
11642   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11643 # for constant arguments.  Useless!
11644 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11645 echo "configure:11646: checking for working alloca.h" >&5
11646
11647 cat > conftest.$ac_ext <<EOF
11648 #line 11649 "configure"
11649 #include "confdefs.h"
11650 #include <alloca.h>
11651 int main() {
11652 char *p = alloca(2 * sizeof(int));
11653 ; return 0; }
11654 EOF
11655 if { (eval echo configure:11656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11656   rm -rf conftest*
11657   ac_cv_header_alloca_h=yes
11658 else
11659   echo "configure: failed program was:" >&5
11660   cat conftest.$ac_ext >&5
11661   rm -rf conftest*
11662   ac_cv_header_alloca_h=no
11663 fi
11664 rm -f conftest*
11665
11666 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11667 if test $ac_cv_header_alloca_h = yes; then
11668   { test "$extra_verbose" = "yes" && cat << \EOF
11669     Defining HAVE_ALLOCA_H
11670 EOF
11671 cat >> confdefs.h <<\EOF
11672 #define HAVE_ALLOCA_H 1
11673 EOF
11674 }
11675
11676 fi
11677
11678 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11679 echo "configure:11680: checking for alloca" >&5
11680
11681 cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684
11685 #ifdef __GNUC__
11686 # define alloca __builtin_alloca
11687 #else
11688 # ifdef _MSC_VER
11689 #  include <malloc.h>
11690 #  define alloca _alloca
11691 # else
11692 #  if HAVE_ALLOCA_H
11693 #   include <alloca.h>
11694 #  else
11695 #   ifdef _AIX
11696  #pragma alloca
11697 #   else
11698 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11699 char *alloca ();
11700 #    endif
11701 #   endif
11702 #  endif
11703 # endif
11704 #endif
11705
11706 int main() {
11707 char *p = (char *) alloca(1);
11708 ; return 0; }
11709 EOF
11710 if { (eval echo configure:11711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11711   rm -rf conftest*
11712   ac_cv_func_alloca_works=yes
11713 else
11714   echo "configure: failed program was:" >&5
11715   cat conftest.$ac_ext >&5
11716   rm -rf conftest*
11717   ac_cv_func_alloca_works=no
11718 fi
11719 rm -f conftest*
11720
11721 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11722 if test $ac_cv_func_alloca_works = yes; then
11723   { test "$extra_verbose" = "yes" && cat << \EOF
11724     Defining HAVE_ALLOCA
11725 EOF
11726 cat >> confdefs.h <<\EOF
11727 #define HAVE_ALLOCA 1
11728 EOF
11729 }
11730
11731 fi
11732
11733 if test $ac_cv_func_alloca_works = no; then
11734   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11735   # that cause trouble.  Some versions do not even contain alloca or
11736   # contain a buggy version.  If you still want to use their alloca,
11737   # use ar to extract alloca.o from them instead of compiling alloca.c.
11738   ALLOCA=alloca.${ac_objext}
11739   { test "$extra_verbose" = "yes" && cat << \EOF
11740     Defining C_ALLOCA
11741 EOF
11742 cat >> confdefs.h <<\EOF
11743 #define C_ALLOCA 1
11744 EOF
11745 }
11746
11747
11748 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11749 echo "configure:11750: checking whether alloca needs Cray hooks" >&5
11750
11751 cat > conftest.$ac_ext <<EOF
11752 #line 11753 "configure"
11753 #include "confdefs.h"
11754 #if defined(CRAY) && ! defined(CRAY2)
11755 webecray
11756 #else
11757 wenotbecray
11758 #endif
11759
11760 EOF
11761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11762   egrep "webecray" >/dev/null 2>&1; then
11763   rm -rf conftest*
11764   ac_cv_os_cray=yes
11765 else
11766   rm -rf conftest*
11767   ac_cv_os_cray=no
11768 fi
11769 rm -f conftest*
11770
11771
11772 echo "$ac_t""$ac_cv_os_cray" 1>&6
11773 if test $ac_cv_os_cray = yes; then
11774 for ac_func in _getb67 GETB67 getb67; do
11775   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11776 echo "configure:11777: checking for $ac_func" >&5
11777
11778 cat > conftest.$ac_ext <<EOF
11779 #line 11780 "configure"
11780 #include "confdefs.h"
11781 /* System header to define __stub macros and hopefully few prototypes,
11782     which can conflict with char $ac_func(); below.  */
11783 #include <assert.h>
11784 /* Override any gcc2 internal prototype to avoid an error.  */
11785 /* We use char because int might match the return type of a gcc2
11786     builtin and then its argument prototype would still apply.  */
11787 char $ac_func();
11788
11789 int main() {
11790
11791 /* The GNU C library defines this for functions which it implements
11792     to always fail with ENOSYS.  Some functions are actually named
11793     something starting with __ and the normal name is an alias.  */
11794 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11795 choke me
11796 #else
11797 $ac_func();
11798 #endif
11799
11800 ; return 0; }
11801 EOF
11802 if { (eval echo configure:11803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11803   rm -rf conftest*
11804   eval "ac_cv_func_$ac_func=yes"
11805 else
11806   echo "configure: failed program was:" >&5
11807   cat conftest.$ac_ext >&5
11808   rm -rf conftest*
11809   eval "ac_cv_func_$ac_func=no"
11810 fi
11811 rm -f conftest*
11812
11813 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11814   echo "$ac_t""yes" 1>&6
11815   { test "$extra_verbose" = "yes" && cat << EOF
11816     Defining CRAY_STACKSEG_END = $ac_func
11817 EOF
11818 cat >> confdefs.h <<EOF
11819 #define CRAY_STACKSEG_END $ac_func
11820 EOF
11821 }
11822
11823   break
11824 else
11825   echo "$ac_t""no" 1>&6
11826 fi
11827
11828 done
11829 fi
11830
11831 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11832 echo "configure:11833: checking stack direction for C alloca" >&5
11833
11834 cat > conftest.$ac_ext <<EOF
11835 #line 11836 "configure"
11836 #include "confdefs.h"
11837 find_stack_direction ()
11838 {
11839   static char *addr = 0;
11840   auto char dummy;
11841   if (addr == 0)
11842     {
11843       addr = &dummy;
11844       return find_stack_direction ();
11845     }
11846   else
11847     return (&dummy > addr) ? 1 : -1;
11848 }
11849 main ()
11850 {
11851   exit (find_stack_direction() < 0);
11852 }
11853 EOF
11854 if { (eval echo configure:11855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11855 then
11856   ac_cv_c_stack_direction=1
11857 else
11858   conftest_rc="$?"
11859   echo "configure: failed program was:" >&5
11860   cat conftest.$ac_ext >&5
11861   rm -fr conftest*
11862   ac_cv_c_stack_direction=-1
11863 fi
11864 rm -fr conftest*
11865
11866 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11867 { test "$extra_verbose" = "yes" && cat << EOF
11868     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11869 EOF
11870 cat >> confdefs.h <<EOF
11871 #define STACK_DIRECTION $ac_cv_c_stack_direction
11872 EOF
11873 }
11874
11875 fi
11876
11877   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11878    echo "    xemacs will be linked with \"$ALLOCA\""
11879  fi
11880 fi
11881
11882 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11883 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11884 echo "configure:11885: checking for vfork.h" >&5
11885
11886 cat > conftest.$ac_ext <<EOF
11887 #line 11888 "configure"
11888 #include "confdefs.h"
11889 #include <vfork.h>
11890 EOF
11891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11892 { (eval echo configure:11893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11894 if test -z "$ac_err"; then
11895   rm -rf conftest*
11896   eval "ac_cv_header_$ac_safe=yes"
11897 else
11898   echo "$ac_err" >&5
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -rf conftest*
11902   eval "ac_cv_header_$ac_safe=no"
11903 fi
11904 rm -f conftest*
11905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11906   echo "$ac_t""yes" 1>&6
11907   { test "$extra_verbose" = "yes" && cat << \EOF
11908     Defining HAVE_VFORK_H
11909 EOF
11910 cat >> confdefs.h <<\EOF
11911 #define HAVE_VFORK_H 1
11912 EOF
11913 }
11914
11915 else
11916   echo "$ac_t""no" 1>&6
11917 fi
11918
11919 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11920 echo "configure:11921: checking for working vfork" >&5
11921
11922 cat > conftest.$ac_ext <<EOF
11923 #line 11924 "configure"
11924 #include "confdefs.h"
11925 /* Thanks to Paul Eggert for this test.  */
11926 #include <stdio.h>
11927 #include <sys/types.h>
11928 #include <sys/stat.h>
11929 #ifdef HAVE_UNISTD_H
11930 #include <unistd.h>
11931 #endif
11932 #ifdef HAVE_VFORK_H
11933 #include <vfork.h>
11934 #endif
11935 /* On some sparc systems, changes by the child to local and incoming
11936    argument registers are propagated back to the parent.
11937    The compiler is told about this with #include <vfork.h>,
11938    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11939    Test for this by using a static variable whose address
11940    is put into a register that is clobbered by the vfork.  */
11941 static
11942 #ifdef __cplusplus
11943 sparc_address_test (int arg)
11944 #else
11945 sparc_address_test (arg) int arg;
11946 #endif
11947 {
11948   static pid_t child;
11949   if (!child) {
11950     child = vfork ();
11951     if (child < 0) {
11952       perror ("vfork");
11953       _exit(2);
11954     }
11955     if (!child) {
11956       arg = getpid();
11957       write(-1, "", 0);
11958       _exit (arg);
11959     }
11960   }
11961 }
11962 main() {
11963   pid_t parent = getpid ();
11964   pid_t child;
11965
11966   sparc_address_test ();
11967
11968   child = vfork ();
11969
11970   if (child == 0) {
11971     /* Here is another test for sparc vfork register problems.
11972        This test uses lots of local variables, at least
11973        as many local variables as main has allocated so far
11974        including compiler temporaries.  4 locals are enough for
11975        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11976        A buggy compiler should reuse the register of parent
11977        for one of the local variables, since it will think that
11978        parent can't possibly be used any more in this routine.
11979        Assigning to the local variable will thus munge parent
11980        in the parent process.  */
11981     pid_t
11982       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11983       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11984     /* Convince the compiler that p..p7 are live; otherwise, it might
11985        use the same hardware register for all 8 local variables.  */
11986     if (p != p1 || p != p2 || p != p3 || p != p4
11987         || p != p5 || p != p6 || p != p7)
11988       _exit(1);
11989
11990     /* On some systems (e.g. IRIX 3.3),
11991        vfork doesn't separate parent from child file descriptors.
11992        If the child closes a descriptor before it execs or exits,
11993        this munges the parent's descriptor as well.
11994        Test for this by closing stdout in the child.  */
11995     _exit(close(fileno(stdout)) != 0);
11996   } else {
11997     int status;
11998     struct stat st;
11999
12000     while (wait(&status) != child)
12001       ;
12002     exit(
12003          /* Was there some problem with vforking?  */
12004          child < 0
12005
12006          /* Did the child fail?  (This shouldn't happen.)  */
12007          || status
12008
12009          /* Did the vfork/compiler bug occur?  */
12010          || parent != getpid()
12011
12012          /* Did the file descriptor bug occur?  */
12013          || fstat(fileno(stdout), &st) != 0
12014          );
12015   }
12016 }
12017 EOF
12018 if { (eval echo configure:12019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12019 then
12020   ac_cv_func_vfork_works=yes
12021 else
12022   conftest_rc="$?"
12023   echo "configure: failed program was:" >&5
12024   cat conftest.$ac_ext >&5
12025   rm -fr conftest*
12026   ac_cv_func_vfork_works=no
12027 fi
12028 rm -fr conftest*
12029
12030 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12031 if test $ac_cv_func_vfork_works = no; then
12032   { test "$extra_verbose" = "yes" && cat << \EOF
12033     Defining vfork = fork
12034 EOF
12035 cat >> confdefs.h <<\EOF
12036 #define vfork fork
12037 EOF
12038 }
12039
12040 fi
12041
12042
12043 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12044 echo "configure:12045: checking for working strcoll" >&5
12045
12046 cat > conftest.$ac_ext <<EOF
12047 #line 12048 "configure"
12048 #include "confdefs.h"
12049 #include <string.h>
12050 main ()
12051 {
12052   exit (strcoll ("abc", "def") >= 0 ||
12053         strcoll ("ABC", "DEF") >= 0 ||
12054         strcoll ("123", "456") >= 0);
12055 }
12056 EOF
12057 if { (eval echo configure:12058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12058 then
12059   ac_cv_func_strcoll_works=yes
12060 else
12061   conftest_rc="$?"
12062   echo "configure: failed program was:" >&5
12063   cat conftest.$ac_ext >&5
12064   rm -fr conftest*
12065   ac_cv_func_strcoll_works=no
12066 fi
12067 rm -fr conftest*
12068
12069 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12070 if test $ac_cv_func_strcoll_works = yes; then
12071   { test "$extra_verbose" = "yes" && cat << \EOF
12072     Defining HAVE_STRCOLL
12073 EOF
12074 cat >> confdefs.h <<\EOF
12075 #define HAVE_STRCOLL 1
12076 EOF
12077 }
12078
12079 fi
12080
12081
12082 for ac_func in getpgrp
12083 do
12084 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12085 echo "configure:12086: checking for $ac_func" >&5
12086
12087 cat > conftest.$ac_ext <<EOF
12088 #line 12089 "configure"
12089 #include "confdefs.h"
12090 /* System header to define __stub macros and hopefully few prototypes,
12091     which can conflict with char $ac_func(); below.  */
12092 #include <assert.h>
12093 /* Override any gcc2 internal prototype to avoid an error.  */
12094 /* We use char because int might match the return type of a gcc2
12095     builtin and then its argument prototype would still apply.  */
12096 char $ac_func();
12097
12098 int main() {
12099
12100 /* The GNU C library defines this for functions which it implements
12101     to always fail with ENOSYS.  Some functions are actually named
12102     something starting with __ and the normal name is an alias.  */
12103 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12104 choke me
12105 #else
12106 $ac_func();
12107 #endif
12108
12109 ; return 0; }
12110 EOF
12111 if { (eval echo configure:12112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12112   rm -rf conftest*
12113   eval "ac_cv_func_$ac_func=yes"
12114 else
12115   echo "configure: failed program was:" >&5
12116   cat conftest.$ac_ext >&5
12117   rm -rf conftest*
12118   eval "ac_cv_func_$ac_func=no"
12119 fi
12120 rm -f conftest*
12121
12122 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12123   echo "$ac_t""yes" 1>&6
12124     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12125   { test "$extra_verbose" = "yes" && cat << EOF
12126     Defining $ac_tr_func
12127 EOF
12128 cat >> confdefs.h <<EOF
12129 #define $ac_tr_func 1
12130 EOF
12131 }
12132  
12133 else
12134   echo "$ac_t""no" 1>&6
12135 fi
12136 done
12137
12138 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12139 echo "configure:12140: checking whether getpgrp takes no argument" >&5
12140
12141 cat > conftest.$ac_ext <<EOF
12142 #line 12143 "configure"
12143 #include "confdefs.h"
12144
12145 /*
12146  * If this system has a BSD-style getpgrp(),
12147  * which takes a pid argument, exit unsuccessfully.
12148  *
12149  * Snarfed from Chet Ramey's bash pgrp.c test program
12150  */
12151 #include <stdio.h>
12152 #include <sys/types.h>
12153
12154 int     pid;
12155 int     pg1, pg2, pg3, pg4;
12156 int     ng, np, s, child;
12157
12158 main()
12159 {
12160         pid = getpid();
12161         pg1 = getpgrp(0);
12162         pg2 = getpgrp();
12163         pg3 = getpgrp(pid);
12164         pg4 = getpgrp(1);
12165
12166         /*
12167          * If all of these values are the same, it's pretty sure that
12168          * we're on a system that ignores getpgrp's first argument.
12169          */
12170         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12171                 exit(0);
12172
12173         child = fork();
12174         if (child < 0)
12175                 exit(1);
12176         else if (child == 0) {
12177                 np = getpid();
12178                 /*
12179                  * If this is Sys V, this will not work; pgrp will be
12180                  * set to np because setpgrp just changes a pgrp to be
12181                  * the same as the pid.
12182                  */
12183                 setpgrp(np, pg1);
12184                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12185                 if (ng == pg1) {
12186                         exit(1);
12187                 } else {
12188                         exit(0);
12189                 }
12190         } else {
12191                 wait(&s);
12192                 exit(s>>8);
12193         }
12194 }
12195
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12198 then
12199   ac_cv_func_getpgrp_void=yes
12200 else
12201   conftest_rc="$?"
12202   echo "configure: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   rm -fr conftest*
12205   ac_cv_func_getpgrp_void=no
12206 fi
12207 rm -fr conftest*
12208
12209
12210 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12211 if test $ac_cv_func_getpgrp_void = yes; then
12212   { test "$extra_verbose" = "yes" && cat << \EOF
12213     Defining GETPGRP_VOID
12214 EOF
12215 cat >> confdefs.h <<\EOF
12216 #define GETPGRP_VOID 1
12217 EOF
12218 }
12219
12220 fi
12221
12222
12223 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12224 echo "configure:12225: checking for working mmap" >&5
12225 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12226 cat > conftest.$ac_ext <<EOF
12227 #line 12228 "configure"
12228 #include "confdefs.h"
12229 #include <stdio.h>
12230 #include <unistd.h>
12231 #include <fcntl.h>
12232 #include <sys/mman.h>
12233
12234 #ifndef MAP_VARIABLE
12235 #define MAP_VARIABLE 0
12236 #endif
12237
12238 #ifndef MAP_FAILED
12239 #define MAP_FAILED -1
12240 #endif
12241
12242 int main (int argc, char *argv[])
12243 {
12244   int fd = -1;
12245   caddr_t p;
12246 #ifndef MAP_ANONYMOUS
12247   fd = open ("/dev/zero", O_RDWR);
12248   if (fd < 0)
12249     return 1;
12250 #define MAP_ANONYMOUS 0
12251 #endif
12252   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12253            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12254            fd, 0) != (void *) MAP_FAILED)
12255     return 0;
12256   perror ("conftest: mmap failed");
12257   return 1;
12258 }
12259 EOF
12260 if { (eval echo configure:12261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12261 then
12262   have_mmap=yes
12263 else
12264   conftest_rc="$?"
12265   echo "configure: failed program was:" >&5
12266   cat conftest.$ac_ext >&5
12267   rm -fr conftest*
12268   have_mmap=no
12269 fi
12270 rm -fr conftest* ;;
12271 esac
12272 echo "$ac_t""$have_mmap" 1>&6
12273 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12274     Defining HAVE_MMAP
12275 EOF
12276 cat >> confdefs.h <<\EOF
12277 #define HAVE_MMAP 1
12278 EOF
12279 }
12280
12281
12282 case "$opsys" in cygwin*) 
12283         test "$rel_alloc" = "default" && rel_alloc=no ;;
12284 esac
12285 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12286 if test "$rel_alloc $have_mmap" = "default yes"; then
12287   if test "$doug_lea_malloc" = "yes"; then
12288         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12289 echo "configure:12290: checking for M_MMAP_THRESHOLD" >&5
12290     cat > conftest.$ac_ext <<EOF
12291 #line 12292 "configure"
12292 #include "confdefs.h"
12293 #include <malloc.h>
12294 int main() {
12295
12296 #ifndef M_MMAP_THRESHOLD
12297 #error No M_MMAP_THRESHOLD :-(
12298 !@+$%^&*_)(_ - unlikely to compile...
12299 #endif
12300
12301 ; return 0; }
12302 EOF
12303 if { (eval echo configure:12304: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12304   rm -rf conftest*
12305   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12306 else
12307   echo "configure: failed program was:" >&5
12308   cat conftest.$ac_ext >&5
12309   rm -rf conftest*
12310   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12311 fi
12312 rm -f conftest*
12313   else
12314     rel_alloc=yes
12315   fi
12316 fi
12317 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12318     Defining REL_ALLOC
12319 EOF
12320 cat >> confdefs.h <<\EOF
12321 #define REL_ALLOC 1
12322 EOF
12323 }
12324
12325
12326 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12327 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12328 echo "configure:12329: checking for termios.h" >&5
12329
12330 cat > conftest.$ac_ext <<EOF
12331 #line 12332 "configure"
12332 #include "confdefs.h"
12333 #include <termios.h>
12334 EOF
12335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12336 { (eval echo configure:12337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12338 if test -z "$ac_err"; then
12339   rm -rf conftest*
12340   eval "ac_cv_header_$ac_safe=yes"
12341 else
12342   echo "$ac_err" >&5
12343   echo "configure: failed program was:" >&5
12344   cat conftest.$ac_ext >&5
12345   rm -rf conftest*
12346   eval "ac_cv_header_$ac_safe=no"
12347 fi
12348 rm -f conftest*
12349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12350   echo "$ac_t""yes" 1>&6
12351   { test "$extra_verbose" = "yes" && cat << \EOF
12352     Defining HAVE_TERMIOS
12353 EOF
12354 cat >> confdefs.h <<\EOF
12355 #define HAVE_TERMIOS 1
12356 EOF
12357 }
12358
12359   { test "$extra_verbose" = "yes" && cat << \EOF
12360     Defining SIGNALS_VIA_CHARACTERS
12361 EOF
12362 cat >> confdefs.h <<\EOF
12363 #define SIGNALS_VIA_CHARACTERS 1
12364 EOF
12365 }
12366
12367   { test "$extra_verbose" = "yes" && cat << \EOF
12368     Defining NO_TERMIO
12369 EOF
12370 cat >> confdefs.h <<\EOF
12371 #define NO_TERMIO 1
12372 EOF
12373 }
12374
12375 else
12376   echo "$ac_t""no" 1>&6
12377 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12378 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12379 echo "configure:12380: checking for termio.h" >&5
12380
12381 cat > conftest.$ac_ext <<EOF
12382 #line 12383 "configure"
12383 #include "confdefs.h"
12384 #include <termio.h>
12385 EOF
12386 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12387 { (eval echo configure:12388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12388 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12389 if test -z "$ac_err"; then
12390   rm -rf conftest*
12391   eval "ac_cv_header_$ac_safe=yes"
12392 else
12393   echo "$ac_err" >&5
12394   echo "configure: failed program was:" >&5
12395   cat conftest.$ac_ext >&5
12396   rm -rf conftest*
12397   eval "ac_cv_header_$ac_safe=no"
12398 fi
12399 rm -f conftest*
12400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12401   echo "$ac_t""yes" 1>&6
12402   { test "$extra_verbose" = "yes" && cat << \EOF
12403     Defining HAVE_TERMIO
12404 EOF
12405 cat >> confdefs.h <<\EOF
12406 #define HAVE_TERMIO 1
12407 EOF
12408 }
12409
12410 else
12411   echo "$ac_t""no" 1>&6
12412 fi
12413
12414 fi
12415
12416
12417
12418 echo $ac_n "checking for socket""... $ac_c" 1>&6
12419 echo "configure:12420: checking for socket" >&5
12420
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 /* System header to define __stub macros and hopefully few prototypes,
12425     which can conflict with char socket(); below.  */
12426 #include <assert.h>
12427 /* Override any gcc2 internal prototype to avoid an error.  */
12428 /* We use char because int might match the return type of a gcc2
12429     builtin and then its argument prototype would still apply.  */
12430 char socket();
12431
12432 int main() {
12433
12434 /* The GNU C library defines this for functions which it implements
12435     to always fail with ENOSYS.  Some functions are actually named
12436     something starting with __ and the normal name is an alias.  */
12437 #if defined (__stub_socket) || defined (__stub___socket)
12438 choke me
12439 #else
12440 socket();
12441 #endif
12442
12443 ; return 0; }
12444 EOF
12445 if { (eval echo configure:12446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12446   rm -rf conftest*
12447   eval "ac_cv_func_socket=yes"
12448 else
12449   echo "configure: failed program was:" >&5
12450   cat conftest.$ac_ext >&5
12451   rm -rf conftest*
12452   eval "ac_cv_func_socket=no"
12453 fi
12454 rm -f conftest*
12455
12456 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12457   echo "$ac_t""yes" 1>&6
12458   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12459 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12460 echo "configure:12461: checking for netinet/in.h" >&5
12461
12462 cat > conftest.$ac_ext <<EOF
12463 #line 12464 "configure"
12464 #include "confdefs.h"
12465 #include <netinet/in.h>
12466 EOF
12467 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12468 { (eval echo configure:12469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12469 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12470 if test -z "$ac_err"; then
12471   rm -rf conftest*
12472   eval "ac_cv_header_$ac_safe=yes"
12473 else
12474   echo "$ac_err" >&5
12475   echo "configure: failed program was:" >&5
12476   cat conftest.$ac_ext >&5
12477   rm -rf conftest*
12478   eval "ac_cv_header_$ac_safe=no"
12479 fi
12480 rm -f conftest*
12481 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12482   echo "$ac_t""yes" 1>&6
12483   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12484 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12485 echo "configure:12486: checking for arpa/inet.h" >&5
12486
12487 cat > conftest.$ac_ext <<EOF
12488 #line 12489 "configure"
12489 #include "confdefs.h"
12490 #include <arpa/inet.h>
12491 EOF
12492 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12493 { (eval echo configure:12494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12494 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12495 if test -z "$ac_err"; then
12496   rm -rf conftest*
12497   eval "ac_cv_header_$ac_safe=yes"
12498 else
12499   echo "$ac_err" >&5
12500   echo "configure: failed program was:" >&5
12501   cat conftest.$ac_ext >&5
12502   rm -rf conftest*
12503   eval "ac_cv_header_$ac_safe=no"
12504 fi
12505 rm -f conftest*
12506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12507   echo "$ac_t""yes" 1>&6
12508   
12509   { test "$extra_verbose" = "yes" && cat << \EOF
12510     Defining HAVE_SOCKETS
12511 EOF
12512 cat >> confdefs.h <<\EOF
12513 #define HAVE_SOCKETS 1
12514 EOF
12515 }
12516
12517       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12518 echo "configure:12519: checking "for sun_len member in struct sockaddr_un"" >&5
12519       cat > conftest.$ac_ext <<EOF
12520 #line 12521 "configure"
12521 #include "confdefs.h"
12522
12523 #include <sys/types.h>
12524 #include <sys/socket.h>
12525 #include <sys/un.h>
12526       
12527 int main() {
12528 static struct sockaddr_un x; x.sun_len = 1;
12529 ; return 0; }
12530 EOF
12531 if { (eval echo configure:12532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12532   rm -rf conftest*
12533   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12534     Defining HAVE_SOCKADDR_SUN_LEN
12535 EOF
12536 cat >> confdefs.h <<\EOF
12537 #define HAVE_SOCKADDR_SUN_LEN 1
12538 EOF
12539 }
12540
12541 else
12542   echo "configure: failed program was:" >&5
12543   cat conftest.$ac_ext >&5
12544   rm -rf conftest*
12545   echo "$ac_t""no" 1>&6
12546 fi
12547 rm -f conftest*
12548       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12549 echo "configure:12550: checking "for ip_mreq struct in netinet/in.h"" >&5
12550       cat > conftest.$ac_ext <<EOF
12551 #line 12552 "configure"
12552 #include "confdefs.h"
12553
12554 #include <sys/types.h>
12555 #include <netinet/in.h>
12556       
12557 int main() {
12558 static struct ip_mreq x;
12559 ; return 0; }
12560 EOF
12561 if { (eval echo configure:12562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12562   rm -rf conftest*
12563   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12564     Defining HAVE_MULTICAST
12565 EOF
12566 cat >> confdefs.h <<\EOF
12567 #define HAVE_MULTICAST 1
12568 EOF
12569 }
12570
12571 else
12572   echo "configure: failed program was:" >&5
12573   cat conftest.$ac_ext >&5
12574   rm -rf conftest*
12575   echo "$ac_t""no" 1>&6
12576 fi
12577 rm -f conftest*
12578 else
12579   echo "$ac_t""no" 1>&6
12580 fi
12581
12582 else
12583   echo "$ac_t""no" 1>&6
12584 fi
12585
12586 else
12587   echo "$ac_t""no" 1>&6
12588 fi
12589
12590
12591 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12592 echo "configure:12593: checking for msgget" >&5
12593
12594 cat > conftest.$ac_ext <<EOF
12595 #line 12596 "configure"
12596 #include "confdefs.h"
12597 /* System header to define __stub macros and hopefully few prototypes,
12598     which can conflict with char msgget(); below.  */
12599 #include <assert.h>
12600 /* Override any gcc2 internal prototype to avoid an error.  */
12601 /* We use char because int might match the return type of a gcc2
12602     builtin and then its argument prototype would still apply.  */
12603 char msgget();
12604
12605 int main() {
12606
12607 /* The GNU C library defines this for functions which it implements
12608     to always fail with ENOSYS.  Some functions are actually named
12609     something starting with __ and the normal name is an alias.  */
12610 #if defined (__stub_msgget) || defined (__stub___msgget)
12611 choke me
12612 #else
12613 msgget();
12614 #endif
12615
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   eval "ac_cv_func_msgget=yes"
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   eval "ac_cv_func_msgget=no"
12626 fi
12627 rm -f conftest*
12628
12629 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12630   echo "$ac_t""yes" 1>&6
12631   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12632 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12633 echo "configure:12634: checking for sys/ipc.h" >&5
12634
12635 cat > conftest.$ac_ext <<EOF
12636 #line 12637 "configure"
12637 #include "confdefs.h"
12638 #include <sys/ipc.h>
12639 EOF
12640 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12641 { (eval echo configure:12642: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12642 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12643 if test -z "$ac_err"; then
12644   rm -rf conftest*
12645   eval "ac_cv_header_$ac_safe=yes"
12646 else
12647   echo "$ac_err" >&5
12648   echo "configure: failed program was:" >&5
12649   cat conftest.$ac_ext >&5
12650   rm -rf conftest*
12651   eval "ac_cv_header_$ac_safe=no"
12652 fi
12653 rm -f conftest*
12654 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12655   echo "$ac_t""yes" 1>&6
12656   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12657 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12658 echo "configure:12659: checking for sys/msg.h" >&5
12659
12660 cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 #include <sys/msg.h>
12664 EOF
12665 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12666 { (eval echo configure:12667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12667 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12668 if test -z "$ac_err"; then
12669   rm -rf conftest*
12670   eval "ac_cv_header_$ac_safe=yes"
12671 else
12672   echo "$ac_err" >&5
12673   echo "configure: failed program was:" >&5
12674   cat conftest.$ac_ext >&5
12675   rm -rf conftest*
12676   eval "ac_cv_header_$ac_safe=no"
12677 fi
12678 rm -f conftest*
12679 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12680   echo "$ac_t""yes" 1>&6
12681   { test "$extra_verbose" = "yes" && cat << \EOF
12682     Defining HAVE_SYSVIPC
12683 EOF
12684 cat >> confdefs.h <<\EOF
12685 #define HAVE_SYSVIPC 1
12686 EOF
12687 }
12688
12689 else
12690   echo "$ac_t""no" 1>&6
12691 fi
12692
12693 else
12694   echo "$ac_t""no" 1>&6
12695 fi
12696
12697 else
12698   echo "$ac_t""no" 1>&6
12699 fi
12700
12701
12702 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12703 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12704 echo "configure:12705: checking for dirent.h" >&5
12705
12706 cat > conftest.$ac_ext <<EOF
12707 #line 12708 "configure"
12708 #include "confdefs.h"
12709 #include <dirent.h>
12710 EOF
12711 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12712 { (eval echo configure:12713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12713 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12714 if test -z "$ac_err"; then
12715   rm -rf conftest*
12716   eval "ac_cv_header_$ac_safe=yes"
12717 else
12718   echo "$ac_err" >&5
12719   echo "configure: failed program was:" >&5
12720   cat conftest.$ac_ext >&5
12721   rm -rf conftest*
12722   eval "ac_cv_header_$ac_safe=no"
12723 fi
12724 rm -f conftest*
12725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12726   echo "$ac_t""yes" 1>&6
12727   { test "$extra_verbose" = "yes" && cat << \EOF
12728     Defining SYSV_SYSTEM_DIR
12729 EOF
12730 cat >> confdefs.h <<\EOF
12731 #define SYSV_SYSTEM_DIR 1
12732 EOF
12733 }
12734
12735 else
12736   echo "$ac_t""no" 1>&6
12737 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12738 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12739 echo "configure:12740: checking for sys/dir.h" >&5
12740
12741 cat > conftest.$ac_ext <<EOF
12742 #line 12743 "configure"
12743 #include "confdefs.h"
12744 #include <sys/dir.h>
12745 EOF
12746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12747 { (eval echo configure:12748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12749 if test -z "$ac_err"; then
12750   rm -rf conftest*
12751   eval "ac_cv_header_$ac_safe=yes"
12752 else
12753   echo "$ac_err" >&5
12754   echo "configure: failed program was:" >&5
12755   cat conftest.$ac_ext >&5
12756   rm -rf conftest*
12757   eval "ac_cv_header_$ac_safe=no"
12758 fi
12759 rm -f conftest*
12760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12761   echo "$ac_t""yes" 1>&6
12762   :
12763 else
12764   echo "$ac_t""no" 1>&6
12765 { test "$extra_verbose" = "yes" && cat << \EOF
12766     Defining NONSYSTEM_DIR_LIBRARY
12767 EOF
12768 cat >> confdefs.h <<\EOF
12769 #define NONSYSTEM_DIR_LIBRARY 1
12770 EOF
12771 }
12772
12773 fi
12774
12775 fi
12776
12777
12778 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12779 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12780 echo "configure:12781: checking for nlist.h" >&5
12781
12782 cat > conftest.$ac_ext <<EOF
12783 #line 12784 "configure"
12784 #include "confdefs.h"
12785 #include <nlist.h>
12786 EOF
12787 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12788 { (eval echo configure:12789: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12789 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12790 if test -z "$ac_err"; then
12791   rm -rf conftest*
12792   eval "ac_cv_header_$ac_safe=yes"
12793 else
12794   echo "$ac_err" >&5
12795   echo "configure: failed program was:" >&5
12796   cat conftest.$ac_ext >&5
12797   rm -rf conftest*
12798   eval "ac_cv_header_$ac_safe=no"
12799 fi
12800 rm -f conftest*
12801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12802   echo "$ac_t""yes" 1>&6
12803   { test "$extra_verbose" = "yes" && cat << \EOF
12804     Defining NLIST_STRUCT
12805 EOF
12806 cat >> confdefs.h <<\EOF
12807 #define NLIST_STRUCT 1
12808 EOF
12809 }
12810
12811 else
12812   echo "$ac_t""no" 1>&6
12813 fi
12814
12815
12816
12817 echo "checking "for sound support"" 1>&6
12818 echo "configure:12819: checking "for sound support"" >&5
12819 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12820
12821 if test "$with_native_sound" != "no"; then
12822     if test -n "$native_sound_lib"; then
12823     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12824 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12825 echo "configure:12826: checking for multimedia/audio_device.h" >&5
12826
12827 cat > conftest.$ac_ext <<EOF
12828 #line 12829 "configure"
12829 #include "confdefs.h"
12830 #include <multimedia/audio_device.h>
12831 EOF
12832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12833 { (eval echo configure:12834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12835 if test -z "$ac_err"; then
12836   rm -rf conftest*
12837   eval "ac_cv_header_$ac_safe=yes"
12838 else
12839   echo "$ac_err" >&5
12840   echo "configure: failed program was:" >&5
12841   cat conftest.$ac_ext >&5
12842   rm -rf conftest*
12843   eval "ac_cv_header_$ac_safe=no"
12844 fi
12845 rm -f conftest*
12846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12847   echo "$ac_t""yes" 1>&6
12848   sound_found=yes sound_cflags=""
12849       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12850    echo "    xemacs will be linked with \"sunplay.o\""
12851  fi
12852 else
12853   echo "$ac_t""no" 1>&6
12854 fi
12855
12856   fi
12857
12858     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12859     sound_found=yes
12860     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12861    echo "    xemacs will be linked with \"sunplay.o\""
12862  fi
12863     if test -d "/usr/demo/SOUND/include"
12864       then sound_cflags="-I/usr/demo/SOUND/include"
12865       else sound_cflags="-I/usr/demo/SOUND"
12866     fi
12867     if test -z "$native_sound_lib" ; then
12868       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12869         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12870         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12871       fi
12872     fi
12873   fi
12874
12875     if test -z "$sound_found"; then
12876     case "$canonical" in
12877     *-sgi-* )
12878       if test -z "$native_sound_lib"; then
12879         
12880 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12881 echo "configure:12882: checking for ALopenport in -laudio" >&5
12882 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12883
12884 xe_check_libs=" -laudio "
12885 cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 /* Override any gcc2 internal prototype to avoid an error.  */
12889 /* We use char because int might match the return type of a gcc2
12890     builtin and then its argument prototype would still apply.  */
12891 char ALopenport();
12892
12893 int main() {
12894 ALopenport()
12895 ; return 0; }
12896 EOF
12897 if { (eval echo configure:12898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12898   rm -rf conftest*
12899   eval "ac_cv_lib_$ac_lib_var=yes"
12900 else
12901   echo "configure: failed program was:" >&5
12902   cat conftest.$ac_ext >&5
12903   rm -rf conftest*
12904   eval "ac_cv_lib_$ac_lib_var=no"
12905 fi
12906 rm -f conftest*
12907 xe_check_libs=""
12908
12909 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12910   echo "$ac_t""yes" 1>&6
12911   native_sound_lib="-laudio"
12912 else
12913   echo "$ac_t""no" 1>&6
12914 fi
12915
12916
12917       fi
12918       if test -n "$native_sound_lib"; then
12919         sound_found=yes sound_cflags=""
12920         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12921    echo "    xemacs will be linked with \"sgiplay.o\""
12922  fi
12923       fi ;;
12924     hppa*-hp-hpux* )
12925       if test -z "$native_sound_lib"; then
12926         
12927 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12928 echo "configure:12929: checking for AOpenAudio in -lAlib" >&5
12929 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12930
12931 xe_check_libs=" -lAlib "
12932 cat > conftest.$ac_ext <<EOF
12933 #line 12934 "configure"
12934 #include "confdefs.h"
12935 /* Override any gcc2 internal prototype to avoid an error.  */
12936 /* We use char because int might match the return type of a gcc2
12937     builtin and then its argument prototype would still apply.  */
12938 char AOpenAudio();
12939
12940 int main() {
12941 AOpenAudio()
12942 ; return 0; }
12943 EOF
12944 if { (eval echo configure:12945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12945   rm -rf conftest*
12946   eval "ac_cv_lib_$ac_lib_var=yes"
12947 else
12948   echo "configure: failed program was:" >&5
12949   cat conftest.$ac_ext >&5
12950   rm -rf conftest*
12951   eval "ac_cv_lib_$ac_lib_var=no"
12952 fi
12953 rm -f conftest*
12954 xe_check_libs=""
12955
12956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12957   echo "$ac_t""yes" 1>&6
12958   native_sound_lib="-lAlib"
12959 else
12960   echo "$ac_t""no" 1>&6
12961 fi
12962
12963
12964       fi
12965       if test -n "$native_sound_lib"; then
12966         sound_found=yes
12967         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12968    echo "    xemacs will be linked with \"hpplay.o\""
12969  fi
12970         if test "$GCC" = "yes" # Kludge city
12971           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12972           else sound_cflags="+e -I/usr/audio/examples"
12973         fi
12974       fi ;;
12975     esac
12976   fi
12977
12978     if test -z "$sound_found"; then
12979     for dir in "machine" "sys" "linux"; do
12980       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12981 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12982 echo "configure:12983: checking for ${dir}/soundcard.h" >&5
12983
12984 cat > conftest.$ac_ext <<EOF
12985 #line 12986 "configure"
12986 #include "confdefs.h"
12987 #include <${dir}/soundcard.h>
12988 EOF
12989 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12990 { (eval echo configure:12991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12991 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12992 if test -z "$ac_err"; then
12993   rm -rf conftest*
12994   eval "ac_cv_header_$ac_safe=yes"
12995 else
12996   echo "$ac_err" >&5
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   eval "ac_cv_header_$ac_safe=no"
13001 fi
13002 rm -f conftest*
13003 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13004   echo "$ac_t""yes" 1>&6
13005   sound_found=yes
13006        need_miscplay=yes
13007         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13008    echo "    xemacs will be linked with \"linuxplay.o\""
13009  fi
13010         { test "$extra_verbose" = "yes" && cat << EOF
13011     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13012 EOF
13013 cat >> confdefs.h <<EOF
13014 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13015 EOF
13016 }
13017
13018         break
13019 else
13020   echo "$ac_t""no" 1>&6
13021 fi
13022
13023     done
13024   fi
13025
13026     if test -z "$sound_found"; then
13027     if test "$with_msw" = "yes"; then
13028     sound_found=yes
13029     native_sound_lib=
13030     fi
13031   fi
13032
13033   test "$sound_found" = "yes" && with_native_sound=yes
13034 fi
13035
13036 if test "$with_native_sound" = "yes"; then
13037   { test "$extra_verbose" = "yes" && cat << \EOF
13038     Defining HAVE_NATIVE_SOUND
13039 EOF
13040 cat >> confdefs.h <<\EOF
13041 #define HAVE_NATIVE_SOUND 1
13042 EOF
13043 }
13044
13045   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13046 fi
13047
13048 if test "$with_nas_sound" != "no"; then
13049   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13050 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13051 echo "configure:13052: checking for audio/audiolib.h" >&5
13052
13053 cat > conftest.$ac_ext <<EOF
13054 #line 13055 "configure"
13055 #include "confdefs.h"
13056 #include <audio/audiolib.h>
13057 EOF
13058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13059 { (eval echo configure:13060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13061 if test -z "$ac_err"; then
13062   rm -rf conftest*
13063   eval "ac_cv_header_$ac_safe=yes"
13064 else
13065   echo "$ac_err" >&5
13066   echo "configure: failed program was:" >&5
13067   cat conftest.$ac_ext >&5
13068   rm -rf conftest*
13069   eval "ac_cv_header_$ac_safe=no"
13070 fi
13071 rm -f conftest*
13072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13073   echo "$ac_t""yes" 1>&6
13074   
13075     
13076 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13077 echo "configure:13078: checking for AuOpenServer in -laudio" >&5
13078 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13079
13080 xe_check_libs=" -laudio "
13081 cat > conftest.$ac_ext <<EOF
13082 #line 13083 "configure"
13083 #include "confdefs.h"
13084 /* Override any gcc2 internal prototype to avoid an error.  */
13085 /* We use char because int might match the return type of a gcc2
13086     builtin and then its argument prototype would still apply.  */
13087 char AuOpenServer();
13088
13089 int main() {
13090 AuOpenServer()
13091 ; return 0; }
13092 EOF
13093 if { (eval echo configure:13094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13094   rm -rf conftest*
13095   eval "ac_cv_lib_$ac_lib_var=yes"
13096 else
13097   echo "configure: failed program was:" >&5
13098   cat conftest.$ac_ext >&5
13099   rm -rf conftest*
13100   eval "ac_cv_lib_$ac_lib_var=no"
13101 fi
13102 rm -f conftest*
13103 xe_check_libs=""
13104
13105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13106   echo "$ac_t""yes" 1>&6
13107   have_nas_sound=yes
13108 else
13109   echo "$ac_t""no" 1>&6
13110 fi
13111
13112
13113 else
13114   echo "$ac_t""no" 1>&6
13115 fi
13116
13117   if test "$have_nas_sound" = "yes"; then
13118     with_nas_sound=yes
13119     { test "$extra_verbose" = "yes" && cat << \EOF
13120     Defining HAVE_NAS_SOUND
13121 EOF
13122 cat >> confdefs.h <<\EOF
13123 #define HAVE_NAS_SOUND 1
13124 EOF
13125 }
13126
13127     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13128    echo "    xemacs will be linked with \"nas.o\""
13129  fi
13130     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13131             cat > conftest.$ac_ext <<EOF
13132 #line 13133 "configure"
13133 #include "confdefs.h"
13134 #include <audio/Xtutil.h>
13135 EOF
13136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13137   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13138   :
13139 else
13140   rm -rf conftest*
13141   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13142     Defining NAS_NO_ERROR_JUMP
13143 EOF
13144 cat >> confdefs.h <<\EOF
13145 #define NAS_NO_ERROR_JUMP 1
13146 EOF
13147 }
13148
13149 fi
13150 rm -f conftest*
13151
13152   else
13153     test "$with_nas_sound" = "yes" && \
13154       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13155     with_nas_sound=no
13156   fi
13157 fi
13158
13159 if test "$with_esd_sound" != "no"; then
13160   # Extract the first word of "esd-config", so it can be a program name with args.
13161 set dummy esd-config; ac_word=$2
13162 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13163 echo "configure:13164: checking for $ac_word" >&5
13164
13165 if test -n "$have_esd_config"; then
13166   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13167 else
13168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13169   ac_dummy="$PATH"
13170   for ac_dir in $ac_dummy; do
13171     test -z "$ac_dir" && ac_dir=.
13172     if test -f $ac_dir/$ac_word; then
13173       ac_cv_prog_have_esd_config="yes"
13174       break
13175     fi
13176   done
13177   IFS="$ac_save_ifs"
13178   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13179 fi
13180 have_esd_config="$ac_cv_prog_have_esd_config"
13181 if test -n "$have_esd_config"; then
13182   echo "$ac_t""$have_esd_config" 1>&6
13183 else
13184   echo "$ac_t""no" 1>&6
13185 fi
13186
13187   if test "$have_esd_config" = "yes"; then
13188     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13189     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
13190     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13191     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13192 echo "configure:13193: checking for esd_play_stream" >&5
13193
13194 cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197 /* System header to define __stub macros and hopefully few prototypes,
13198     which can conflict with char esd_play_stream(); below.  */
13199 #include <assert.h>
13200 /* Override any gcc2 internal prototype to avoid an error.  */
13201 /* We use char because int might match the return type of a gcc2
13202     builtin and then its argument prototype would still apply.  */
13203 char esd_play_stream();
13204
13205 int main() {
13206
13207 /* The GNU C library defines this for functions which it implements
13208     to always fail with ENOSYS.  Some functions are actually named
13209     something starting with __ and the normal name is an alias.  */
13210 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13211 choke me
13212 #else
13213 esd_play_stream();
13214 #endif
13215
13216 ; return 0; }
13217 EOF
13218 if { (eval echo configure:13219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13219   rm -rf conftest*
13220   eval "ac_cv_func_esd_play_stream=yes"
13221 else
13222   echo "configure: failed program was:" >&5
13223   cat conftest.$ac_ext >&5
13224   rm -rf conftest*
13225   eval "ac_cv_func_esd_play_stream=no"
13226 fi
13227 rm -f conftest*
13228
13229 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13230   echo "$ac_t""yes" 1>&6
13231   have_esd_sound=yes
13232 else
13233   echo "$ac_t""no" 1>&6
13234 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13235 fi
13236
13237   fi
13238
13239   if test "$have_esd_sound" = "yes"; then
13240     with_esd_sound=yes
13241     need_miscplay=yes
13242     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13243    echo "    xemacs will be linked with \"esd.o\""
13244  fi
13245     { test "$extra_verbose" = "yes" && cat << \EOF
13246     Defining HAVE_ESD_SOUND
13247 EOF
13248 cat >> confdefs.h <<\EOF
13249 #define HAVE_ESD_SOUND 1
13250 EOF
13251 }
13252
13253   else
13254     test "$with_esd_sound" = "yes" && \
13255       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13256     with_esd_sound=no
13257   fi
13258 fi
13259
13260 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13261    echo "    xemacs will be linked with \"miscplay.o\""
13262  fi
13263
13264
13265 test -z "$with_tty" && with_tty=yes
13266
13267 if test "$with_tty" = "yes"  ; then
13268   echo "checking for TTY-related features" 1>&6
13269 echo "configure:13270: checking for TTY-related features" >&5
13270   { test "$extra_verbose" = "yes" && cat << \EOF
13271     Defining HAVE_TTY
13272 EOF
13273 cat >> confdefs.h <<\EOF
13274 #define HAVE_TTY 1
13275 EOF
13276 }
13277
13278   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
13279    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\""
13280  fi
13281
13282     if test -z "$with_ncurses"; then
13283     
13284 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13285 echo "configure:13286: checking for tgetent in -lncurses" >&5
13286 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13287
13288 xe_check_libs=" -lncurses "
13289 cat > conftest.$ac_ext <<EOF
13290 #line 13291 "configure"
13291 #include "confdefs.h"
13292 /* Override any gcc2 internal prototype to avoid an error.  */
13293 /* We use char because int might match the return type of a gcc2
13294     builtin and then its argument prototype would still apply.  */
13295 char tgetent();
13296
13297 int main() {
13298 tgetent()
13299 ; return 0; }
13300 EOF
13301 if { (eval echo configure:13302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13302   rm -rf conftest*
13303   eval "ac_cv_lib_$ac_lib_var=yes"
13304 else
13305   echo "configure: failed program was:" >&5
13306   cat conftest.$ac_ext >&5
13307   rm -rf conftest*
13308   eval "ac_cv_lib_$ac_lib_var=no"
13309 fi
13310 rm -f conftest*
13311 xe_check_libs=""
13312
13313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13314   echo "$ac_t""yes" 1>&6
13315   with_ncurses=yes
13316 else
13317   echo "$ac_t""no" 1>&6
13318 with_ncurses=no
13319 fi
13320
13321
13322   fi
13323   if test "$with_ncurses" = "yes"; then
13324     { test "$extra_verbose" = "yes" && cat << \EOF
13325     Defining HAVE_NCURSES
13326 EOF
13327 cat >> confdefs.h <<\EOF
13328 #define HAVE_NCURSES 1
13329 EOF
13330 }
13331
13332     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13333 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13334 echo "configure:13335: checking for ncurses/curses.h" >&5
13335
13336 cat > conftest.$ac_ext <<EOF
13337 #line 13338 "configure"
13338 #include "confdefs.h"
13339 #include <ncurses/curses.h>
13340 EOF
13341 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13342 { (eval echo configure:13343: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13343 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13344 if test -z "$ac_err"; then
13345   rm -rf conftest*
13346   eval "ac_cv_header_$ac_safe=yes"
13347 else
13348   echo "$ac_err" >&5
13349   echo "configure: failed program was:" >&5
13350   cat conftest.$ac_ext >&5
13351   rm -rf conftest*
13352   eval "ac_cv_header_$ac_safe=no"
13353 fi
13354 rm -f conftest*
13355 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13356   echo "$ac_t""yes" 1>&6
13357   curses_h_file=ncurses/curses.h
13358 else
13359   echo "$ac_t""no" 1>&6
13360 fi
13361
13362     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13363 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13364 echo "configure:13365: checking for ncurses/term.h" >&5
13365
13366 cat > conftest.$ac_ext <<EOF
13367 #line 13368 "configure"
13368 #include "confdefs.h"
13369 #include <ncurses/term.h>
13370 EOF
13371 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13372 { (eval echo configure:13373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13373 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13374 if test -z "$ac_err"; then
13375   rm -rf conftest*
13376   eval "ac_cv_header_$ac_safe=yes"
13377 else
13378   echo "$ac_err" >&5
13379   echo "configure: failed program was:" >&5
13380   cat conftest.$ac_ext >&5
13381   rm -rf conftest*
13382   eval "ac_cv_header_$ac_safe=no"
13383 fi
13384 rm -f conftest*
13385 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13386   echo "$ac_t""yes" 1>&6
13387   term_h_file=ncurses/term.h
13388 else
13389   echo "$ac_t""no" 1>&6
13390 fi
13391
13392     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13393    echo "    xemacs will be linked with \"terminfo.o\""
13394  fi
13395     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13396
13397     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13398                         save_c_switch_site="$c_switch_site"
13399       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13400       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13401 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13402 echo "configure:13403: checking for ncurses/curses.h" >&5
13403
13404 cat > conftest.$ac_ext <<EOF
13405 #line 13406 "configure"
13406 #include "confdefs.h"
13407 #include <ncurses/curses.h>
13408 EOF
13409 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13410 { (eval echo configure:13411: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13411 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13412 if test -z "$ac_err"; then
13413   rm -rf conftest*
13414   eval "ac_cv_header_$ac_safe=yes"
13415 else
13416   echo "$ac_err" >&5
13417   echo "configure: failed program was:" >&5
13418   cat conftest.$ac_ext >&5
13419   rm -rf conftest*
13420   eval "ac_cv_header_$ac_safe=no"
13421 fi
13422 rm -f conftest*
13423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13424   echo "$ac_t""yes" 1>&6
13425   curses_h_file=ncurses/curses.h
13426 else
13427   echo "$ac_t""no" 1>&6
13428 fi
13429
13430       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13431         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13432         else c_switch_site="$save_c_switch_site"
13433       fi
13434     fi
13435   else         if test "$have_terminfo" = "yes"; then
13436       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13437    echo "    xemacs will be linked with \"terminfo.o\""
13438  fi
13439       if test -n "$libs_termcap"; then
13440         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13441       else
13442         for lib in curses termlib termcap; do
13443           
13444 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13445 echo "configure:13446: checking for tgetent in -l$lib" >&5
13446 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13447
13448 xe_check_libs=" -l$lib "
13449 cat > conftest.$ac_ext <<EOF
13450 #line 13451 "configure"
13451 #include "confdefs.h"
13452 /* Override any gcc2 internal prototype to avoid an error.  */
13453 /* We use char because int might match the return type of a gcc2
13454     builtin and then its argument prototype would still apply.  */
13455 char tgetent();
13456
13457 int main() {
13458 tgetent()
13459 ; return 0; }
13460 EOF
13461 if { (eval echo configure:13462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13462   rm -rf conftest*
13463   eval "ac_cv_lib_$ac_lib_var=yes"
13464 else
13465   echo "configure: failed program was:" >&5
13466   cat conftest.$ac_ext >&5
13467   rm -rf conftest*
13468   eval "ac_cv_lib_$ac_lib_var=no"
13469 fi
13470 rm -f conftest*
13471 xe_check_libs=""
13472
13473 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13474   echo "$ac_t""yes" 1>&6
13475   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13476 else
13477   echo "$ac_t""no" 1>&6
13478 fi
13479
13480
13481         done
13482       fi
13483     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13484    echo "    xemacs will be linked with \"tparam.o\""
13485  fi
13486                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13487       if test -n "$libs_termcap"; then
13488         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13489       else
13490         
13491 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13492 echo "configure:13493: checking for tgetent in -lcurses" >&5
13493 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13494
13495 xe_check_libs=" -lcurses "
13496 cat > conftest.$ac_ext <<EOF
13497 #line 13498 "configure"
13498 #include "confdefs.h"
13499 /* Override any gcc2 internal prototype to avoid an error.  */
13500 /* We use char because int might match the return type of a gcc2
13501     builtin and then its argument prototype would still apply.  */
13502 char tgetent();
13503
13504 int main() {
13505 tgetent()
13506 ; return 0; }
13507 EOF
13508 if { (eval echo configure:13509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13509   rm -rf conftest*
13510   eval "ac_cv_lib_$ac_lib_var=yes"
13511 else
13512   echo "configure: failed program was:" >&5
13513   cat conftest.$ac_ext >&5
13514   rm -rf conftest*
13515   eval "ac_cv_lib_$ac_lib_var=no"
13516 fi
13517 rm -f conftest*
13518 xe_check_libs=""
13519
13520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13521   echo "$ac_t""yes" 1>&6
13522   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13523 else
13524   echo "$ac_t""no" 1>&6
13525 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13526 echo "configure:13527: checking for tgetent in -ltermcap" >&5
13527 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13528
13529 xe_check_libs=" -ltermcap "
13530 cat > conftest.$ac_ext <<EOF
13531 #line 13532 "configure"
13532 #include "confdefs.h"
13533 /* Override any gcc2 internal prototype to avoid an error.  */
13534 /* We use char because int might match the return type of a gcc2
13535     builtin and then its argument prototype would still apply.  */
13536 char tgetent();
13537
13538 int main() {
13539 tgetent()
13540 ; return 0; }
13541 EOF
13542 if { (eval echo configure:13543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13543   rm -rf conftest*
13544   eval "ac_cv_lib_$ac_lib_var=yes"
13545 else
13546   echo "configure: failed program was:" >&5
13547   cat conftest.$ac_ext >&5
13548   rm -rf conftest*
13549   eval "ac_cv_lib_$ac_lib_var=no"
13550 fi
13551 rm -f conftest*
13552 xe_check_libs=""
13553
13554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13555   echo "$ac_t""yes" 1>&6
13556   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13557 else
13558   echo "$ac_t""no" 1>&6
13559 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13560    echo "    xemacs will be linked with \"termcap.o\""
13561  fi
13562 fi
13563
13564
13565 fi
13566
13567
13568       fi
13569     fi
13570   fi
13571   { test "$extra_verbose" = "yes" && cat << EOF
13572     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13573 EOF
13574 cat >> confdefs.h <<EOF
13575 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13576 EOF
13577 }
13578
13579   { test "$extra_verbose" = "yes" && cat << EOF
13580     Defining TERM_H_FILE = "${term_h_file-term.h}"
13581 EOF
13582 cat >> confdefs.h <<EOF
13583 #define TERM_H_FILE "${term_h_file-term.h}"
13584 EOF
13585 }
13586
13587
13588     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13589 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13590 echo "configure:13591: checking for gpm.h" >&5
13591
13592 cat > conftest.$ac_ext <<EOF
13593 #line 13594 "configure"
13594 #include "confdefs.h"
13595 #include <gpm.h>
13596 EOF
13597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13598 { (eval echo configure:13599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13600 if test -z "$ac_err"; then
13601   rm -rf conftest*
13602   eval "ac_cv_header_$ac_safe=yes"
13603 else
13604   echo "$ac_err" >&5
13605   echo "configure: failed program was:" >&5
13606   cat conftest.$ac_ext >&5
13607   rm -rf conftest*
13608   eval "ac_cv_header_$ac_safe=no"
13609 fi
13610 rm -f conftest*
13611 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13612   echo "$ac_t""yes" 1>&6
13613   :
13614 else
13615   echo "$ac_t""no" 1>&6
13616 with_gpm=no
13617 fi
13618  }
13619   test -z "$with_gpm" && { 
13620 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13621 echo "configure:13622: checking for Gpm_Open in -lgpm" >&5
13622 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13623
13624 xe_check_libs=" -lgpm "
13625 cat > conftest.$ac_ext <<EOF
13626 #line 13627 "configure"
13627 #include "confdefs.h"
13628 /* Override any gcc2 internal prototype to avoid an error.  */
13629 /* We use char because int might match the return type of a gcc2
13630     builtin and then its argument prototype would still apply.  */
13631 char Gpm_Open();
13632
13633 int main() {
13634 Gpm_Open()
13635 ; return 0; }
13636 EOF
13637 if { (eval echo configure:13638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13638   rm -rf conftest*
13639   eval "ac_cv_lib_$ac_lib_var=yes"
13640 else
13641   echo "configure: failed program was:" >&5
13642   cat conftest.$ac_ext >&5
13643   rm -rf conftest*
13644   eval "ac_cv_lib_$ac_lib_var=no"
13645 fi
13646 rm -f conftest*
13647 xe_check_libs=""
13648
13649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13650   echo "$ac_t""yes" 1>&6
13651   with_gpm=yes
13652 else
13653   echo "$ac_t""no" 1>&6
13654 with_gpm=no
13655 fi
13656
13657  }
13658   if test "$with_gpm" = "yes"; then
13659     { test "$extra_verbose" = "yes" && cat << \EOF
13660     Defining HAVE_GPM
13661 EOF
13662 cat >> confdefs.h <<\EOF
13663 #define HAVE_GPM 1
13664 EOF
13665 }
13666
13667     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13668    echo "    xemacs will be linked with \"gpmevent.o\""
13669  fi
13670     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13671   fi
13672
13673 else   for feature in ncurses gpm; do
13674     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13675       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13676     fi
13677     eval "with_${feature}=no"
13678   done
13679 fi 
13680 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13681    echo "    xemacs will be linked with \"event-unixoid.o\""
13682  fi
13683
13684
13685 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13686   != "no no no" && echo "checking for database support" 1>&6
13687 echo "configure:13688: checking for database support" >&5
13688
13689 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13690   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13691 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13692 echo "configure:13693: checking for ndbm.h" >&5
13693
13694 cat > conftest.$ac_ext <<EOF
13695 #line 13696 "configure"
13696 #include "confdefs.h"
13697 #include <ndbm.h>
13698 EOF
13699 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13700 { (eval echo configure:13701: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13701 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13702 if test -z "$ac_err"; then
13703   rm -rf conftest*
13704   eval "ac_cv_header_$ac_safe=yes"
13705 else
13706   echo "$ac_err" >&5
13707   echo "configure: failed program was:" >&5
13708   cat conftest.$ac_ext >&5
13709   rm -rf conftest*
13710   eval "ac_cv_header_$ac_safe=no"
13711 fi
13712 rm -f conftest*
13713 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13714   echo "$ac_t""yes" 1>&6
13715   :
13716 else
13717   echo "$ac_t""no" 1>&6
13718
13719     test "$with_database_gdbm" = "yes" -o \
13720          "$with_database_dbm"  = "yes" && \
13721       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13722     with_database_gdbm=no with_database_dbm=no
13723 fi
13724
13725 fi
13726
13727 if test "$with_database_gdbm" != "no"; then
13728   
13729 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13730 echo "configure:13731: checking for dbm_open in -lgdbm" >&5
13731 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13732
13733 xe_check_libs=" -lgdbm "
13734 cat > conftest.$ac_ext <<EOF
13735 #line 13736 "configure"
13736 #include "confdefs.h"
13737 /* Override any gcc2 internal prototype to avoid an error.  */
13738 /* We use char because int might match the return type of a gcc2
13739     builtin and then its argument prototype would still apply.  */
13740 char dbm_open();
13741
13742 int main() {
13743 dbm_open()
13744 ; return 0; }
13745 EOF
13746 if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13747   rm -rf conftest*
13748   eval "ac_cv_lib_$ac_lib_var=yes"
13749 else
13750   echo "configure: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   rm -rf conftest*
13753   eval "ac_cv_lib_$ac_lib_var=no"
13754 fi
13755 rm -f conftest*
13756 xe_check_libs=""
13757
13758 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13759   echo "$ac_t""yes" 1>&6
13760   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13761 else
13762   echo "$ac_t""no" 1>&6
13763 if test "$with_database_gdbm" = "yes"; then
13764      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13765    fi
13766    with_database_gdbm=no
13767 fi
13768
13769
13770 fi
13771
13772 if test "$with_database_dbm" != "no"; then
13773   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13774 echo "configure:13775: checking for dbm_open" >&5
13775
13776 cat > conftest.$ac_ext <<EOF
13777 #line 13778 "configure"
13778 #include "confdefs.h"
13779 /* System header to define __stub macros and hopefully few prototypes,
13780     which can conflict with char dbm_open(); below.  */
13781 #include <assert.h>
13782 /* Override any gcc2 internal prototype to avoid an error.  */
13783 /* We use char because int might match the return type of a gcc2
13784     builtin and then its argument prototype would still apply.  */
13785 char dbm_open();
13786
13787 int main() {
13788
13789 /* The GNU C library defines this for functions which it implements
13790     to always fail with ENOSYS.  Some functions are actually named
13791     something starting with __ and the normal name is an alias.  */
13792 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13793 choke me
13794 #else
13795 dbm_open();
13796 #endif
13797
13798 ; return 0; }
13799 EOF
13800 if { (eval echo configure:13801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13801   rm -rf conftest*
13802   eval "ac_cv_func_dbm_open=yes"
13803 else
13804   echo "configure: failed program was:" >&5
13805   cat conftest.$ac_ext >&5
13806   rm -rf conftest*
13807   eval "ac_cv_func_dbm_open=no"
13808 fi
13809 rm -f conftest*
13810
13811 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13812   echo "$ac_t""yes" 1>&6
13813   with_database_dbm=yes libdbm=
13814 else
13815   echo "$ac_t""no" 1>&6
13816
13817     
13818 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13819 echo "configure:13820: checking for dbm_open in -ldbm" >&5
13820 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13821
13822 xe_check_libs=" -ldbm "
13823 cat > conftest.$ac_ext <<EOF
13824 #line 13825 "configure"
13825 #include "confdefs.h"
13826 /* Override any gcc2 internal prototype to avoid an error.  */
13827 /* We use char because int might match the return type of a gcc2
13828     builtin and then its argument prototype would still apply.  */
13829 char dbm_open();
13830
13831 int main() {
13832 dbm_open()
13833 ; return 0; }
13834 EOF
13835 if { (eval echo configure:13836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13836   rm -rf conftest*
13837   eval "ac_cv_lib_$ac_lib_var=yes"
13838 else
13839   echo "configure: failed program was:" >&5
13840   cat conftest.$ac_ext >&5
13841   rm -rf conftest*
13842   eval "ac_cv_lib_$ac_lib_var=no"
13843 fi
13844 rm -f conftest*
13845 xe_check_libs=""
13846
13847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13848   echo "$ac_t""yes" 1>&6
13849   with_database_dbm=yes libdbm=-ldbm
13850 else
13851   echo "$ac_t""no" 1>&6
13852 test "$with_database_dbm" = "yes" && \
13853         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13854       with_database_dbm=no
13855 fi
13856
13857
13858 fi
13859
13860 fi
13861
13862 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13863 test "$with_database_gdbm" = "yes" -o \
13864      "$with_database_dbm"  = "yes" && \
13865   { test "$extra_verbose" = "yes" && cat << \EOF
13866     Defining HAVE_DBM
13867 EOF
13868 cat >> confdefs.h <<\EOF
13869 #define HAVE_DBM 1
13870 EOF
13871 }
13872
13873
13874 if test "$with_database_berkdb" != "no"; then
13875   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13876 echo "configure:13877: checking for Berkeley db.h" >&5
13877   for header in "db/db.h" "db.h"; do
13878     cat > conftest.$ac_ext <<EOF
13879 #line 13880 "configure"
13880 #include "confdefs.h"
13881
13882 #include <stdlib.h>
13883 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13884 #ifdef HAVE_INTTYPES_H
13885 #define __BIT_TYPES_DEFINED__
13886 #include <inttypes.h>
13887 typedef uint8_t  u_int8_t;
13888 typedef uint16_t u_int16_t;
13889 typedef uint32_t u_int32_t;
13890 #ifdef WE_DONT_NEED_QUADS
13891 typedef uint64_t u_int64_t;
13892 #endif
13893 #endif
13894 #endif
13895 #include <$header>
13896
13897 int main() {
13898
13899 ; return 0; }
13900 EOF
13901 if { (eval echo configure:13902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13902   rm -rf conftest*
13903   db_h_file="$header"; break
13904 else
13905   echo "configure: failed program was:" >&5
13906   cat conftest.$ac_ext >&5
13907 fi
13908 rm -f conftest*
13909   done
13910   if test -z "$db_h_file"
13911   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13912   else echo "$ac_t""$db_h_file" 1>&6
13913   fi
13914
13915   if test "$with_database_berkdb" != "no"; then
13916     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13917 echo "configure:13918: checking for Berkeley DB version" >&5
13918     cat > conftest.$ac_ext <<EOF
13919 #line 13920 "configure"
13920 #include "confdefs.h"
13921 #include <$db_h_file>
13922 #if DB_VERSION_MAJOR > 1
13923 yes
13924 #endif
13925
13926 EOF
13927 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13928   egrep "yes" >/dev/null 2>&1; then
13929   rm -rf conftest*
13930   cat > conftest.$ac_ext <<EOF
13931 #line 13932 "configure"
13932 #include "confdefs.h"
13933 #include <$db_h_file>
13934 #if DB_VERSION_MAJOR > 2
13935 yes
13936 #endif
13937
13938 EOF
13939 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13940   egrep "yes" >/dev/null 2>&1; then
13941   rm -rf conftest*
13942   echo "$ac_t""3" 1>&6; dbfunc=db_create
13943 else
13944   rm -rf conftest*
13945   
13946     echo "$ac_t""2" 1>&6; dbfunc=db_open
13947 fi
13948 rm -f conftest*
13949
13950 else
13951   rm -rf conftest*
13952   
13953     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13954 fi
13955 rm -f conftest*
13956
13957     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13958 echo "configure:13959: checking for $dbfunc" >&5
13959
13960 cat > conftest.$ac_ext <<EOF
13961 #line 13962 "configure"
13962 #include "confdefs.h"
13963 /* System header to define __stub macros and hopefully few prototypes,
13964     which can conflict with char $dbfunc(); below.  */
13965 #include <assert.h>
13966 /* Override any gcc2 internal prototype to avoid an error.  */
13967 /* We use char because int might match the return type of a gcc2
13968     builtin and then its argument prototype would still apply.  */
13969 char $dbfunc();
13970
13971 int main() {
13972
13973 /* The GNU C library defines this for functions which it implements
13974     to always fail with ENOSYS.  Some functions are actually named
13975     something starting with __ and the normal name is an alias.  */
13976 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13977 choke me
13978 #else
13979 $dbfunc();
13980 #endif
13981
13982 ; return 0; }
13983 EOF
13984 if { (eval echo configure:13985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13985   rm -rf conftest*
13986   eval "ac_cv_func_$dbfunc=yes"
13987 else
13988   echo "configure: failed program was:" >&5
13989   cat conftest.$ac_ext >&5
13990   rm -rf conftest*
13991   eval "ac_cv_func_$dbfunc=no"
13992 fi
13993 rm -f conftest*
13994
13995 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13996   echo "$ac_t""yes" 1>&6
13997   with_database_berkdb=yes need_libdb=no
13998 else
13999   echo "$ac_t""no" 1>&6
14000
14001     
14002 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14003 echo "configure:14004: checking for $dbfunc in -ldb" >&5
14004 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14005
14006 xe_check_libs=" -ldb "
14007 cat > conftest.$ac_ext <<EOF
14008 #line 14009 "configure"
14009 #include "confdefs.h"
14010 /* Override any gcc2 internal prototype to avoid an error.  */
14011 /* We use char because int might match the return type of a gcc2
14012     builtin and then its argument prototype would still apply.  */
14013 char $dbfunc();
14014
14015 int main() {
14016 $dbfunc()
14017 ; return 0; }
14018 EOF
14019 if { (eval echo configure:14020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14020   rm -rf conftest*
14021   eval "ac_cv_lib_$ac_lib_var=yes"
14022 else
14023   echo "configure: failed program was:" >&5
14024   cat conftest.$ac_ext >&5
14025   rm -rf conftest*
14026   eval "ac_cv_lib_$ac_lib_var=no"
14027 fi
14028 rm -f conftest*
14029 xe_check_libs=""
14030
14031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14032   echo "$ac_t""yes" 1>&6
14033   with_database_berkdb=yes need_libdb=yes
14034 else
14035   echo "$ac_t""no" 1>&6
14036 fi
14037
14038
14039 fi
14040
14041   fi
14042
14043   if test "$with_database_berkdb" = "yes"; then
14044     { test "$extra_verbose" = "yes" && cat << EOF
14045     Defining DB_H_FILE = "$db_h_file"
14046 EOF
14047 cat >> confdefs.h <<EOF
14048 #define DB_H_FILE "$db_h_file"
14049 EOF
14050 }
14051
14052     { test "$extra_verbose" = "yes" && cat << \EOF
14053     Defining HAVE_BERKELEY_DB
14054 EOF
14055 cat >> confdefs.h <<\EOF
14056 #define HAVE_BERKELEY_DB 1
14057 EOF
14058 }
14059
14060     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14061   else with_database_berkdb=no
14062   fi
14063 fi
14064
14065 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14066      != "no no no"; then
14067   { test "$extra_verbose" = "yes" && cat << \EOF
14068     Defining HAVE_DATABASE
14069 EOF
14070 cat >> confdefs.h <<\EOF
14071 #define HAVE_DATABASE 1
14072 EOF
14073 }
14074
14075   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14076    echo "    xemacs will be linked with \"database.o\""
14077  fi
14078 fi
14079
14080 if test "$with_socks" = "yes"; then
14081   
14082 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14083 echo "configure:14084: checking for SOCKSinit in -lsocks" >&5
14084 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14085
14086 xe_check_libs=" -lsocks "
14087 cat > conftest.$ac_ext <<EOF
14088 #line 14089 "configure"
14089 #include "confdefs.h"
14090 /* Override any gcc2 internal prototype to avoid an error.  */
14091 /* We use char because int might match the return type of a gcc2
14092     builtin and then its argument prototype would still apply.  */
14093 char SOCKSinit();
14094
14095 int main() {
14096 SOCKSinit()
14097 ; return 0; }
14098 EOF
14099 if { (eval echo configure:14100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14100   rm -rf conftest*
14101   eval "ac_cv_lib_$ac_lib_var=yes"
14102 else
14103   echo "configure: failed program was:" >&5
14104   cat conftest.$ac_ext >&5
14105   rm -rf conftest*
14106   eval "ac_cv_lib_$ac_lib_var=no"
14107 fi
14108 rm -f conftest*
14109 xe_check_libs=""
14110
14111 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14112   echo "$ac_t""yes" 1>&6
14113     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14114     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14115   { test "$extra_verbose" = "yes" && cat << EOF
14116     Defining $ac_tr_lib
14117 EOF
14118 cat >> confdefs.h <<EOF
14119 #define $ac_tr_lib 1
14120 EOF
14121 }
14122
14123   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14124
14125 else
14126   echo "$ac_t""no" 1>&6
14127 fi
14128
14129
14130   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14131     Defining HAVE_SOCKS
14132 EOF
14133 cat >> confdefs.h <<\EOF
14134 #define HAVE_SOCKS 1
14135 EOF
14136 }
14137
14138 fi
14139
14140 if test "$usage_tracking" = "yes"; then
14141   { test "$extra_verbose" = "yes" && cat << \EOF
14142     Defining USAGE_TRACKING
14143 EOF
14144 cat >> confdefs.h <<\EOF
14145 #define USAGE_TRACKING 1
14146 EOF
14147 }
14148
14149   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14150 fi
14151
14152 if test "$with_modules" != "no"; then
14153   echo "checking for module support" 1>&6
14154 echo "configure:14155: checking for module support" >&5
14155
14156     if test "$with_msw" = "yes"; then
14157     have_dl=yes;
14158   else
14159         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14160 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14161 echo "configure:14162: checking for dlfcn.h" >&5
14162
14163 cat > conftest.$ac_ext <<EOF
14164 #line 14165 "configure"
14165 #include "confdefs.h"
14166 #include <dlfcn.h>
14167 EOF
14168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14169 { (eval echo configure:14170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14171 if test -z "$ac_err"; then
14172   rm -rf conftest*
14173   eval "ac_cv_header_$ac_safe=yes"
14174 else
14175   echo "$ac_err" >&5
14176   echo "configure: failed program was:" >&5
14177   cat conftest.$ac_ext >&5
14178   rm -rf conftest*
14179   eval "ac_cv_header_$ac_safe=no"
14180 fi
14181 rm -f conftest*
14182 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14183   echo "$ac_t""yes" 1>&6
14184   
14185       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14186 echo "configure:14187: checking for dlopen in -lc" >&5
14187       cat > conftest.$ac_ext <<EOF
14188 #line 14189 "configure"
14189 #include "confdefs.h"
14190 #include <dlfcn.h>
14191 int main() {
14192         dlopen ("", 0);
14193 ; return 0; }
14194 EOF
14195 if { (eval echo configure:14196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14196   rm -rf conftest*
14197    have_dl=yes 
14198 else
14199   echo "configure: failed program was:" >&5
14200   cat conftest.$ac_ext >&5
14201   rm -rf conftest*
14202   
14203       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14204 echo "configure:14205: checking for dlopen in -ldl" >&5
14205       ac_save_LIBS="$LIBS"
14206       LIBS="-ldl $LIBS"
14207       cat > conftest.$ac_ext <<EOF
14208 #line 14209 "configure"
14209 #include "confdefs.h"
14210 #include <dlfcn.h>
14211 int main() {
14212         dlopen ("", 0);
14213 ; return 0; }
14214 EOF
14215 if { (eval echo configure:14216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14216   rm -rf conftest*
14217    have_dl=yes 
14218 else
14219   echo "configure: failed program was:" >&5
14220   cat conftest.$ac_ext >&5
14221   rm -rf conftest*
14222   LIBS="$ac_save_LIBS"
14223 fi
14224 rm -f conftest*
14225       ac_save_LIBS=
14226 fi
14227 rm -f conftest*
14228 else
14229   echo "$ac_t""no" 1>&6
14230 fi
14231
14232     if test -n "$have_dl"; then
14233       { test "$extra_verbose" = "yes" && cat << \EOF
14234     Defining HAVE_DLOPEN
14235 EOF
14236 cat >> confdefs.h <<\EOF
14237 #define HAVE_DLOPEN 1
14238 EOF
14239 }
14240
14241     else
14242       
14243 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14244 echo "configure:14245: checking for shl_load in -ldld" >&5
14245 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14246
14247 xe_check_libs=" -ldld "
14248 cat > conftest.$ac_ext <<EOF
14249 #line 14250 "configure"
14250 #include "confdefs.h"
14251 /* Override any gcc2 internal prototype to avoid an error.  */
14252 /* We use char because int might match the return type of a gcc2
14253     builtin and then its argument prototype would still apply.  */
14254 char shl_load();
14255
14256 int main() {
14257 shl_load()
14258 ; return 0; }
14259 EOF
14260 if { (eval echo configure:14261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14261   rm -rf conftest*
14262   eval "ac_cv_lib_$ac_lib_var=yes"
14263 else
14264   echo "configure: failed program was:" >&5
14265   cat conftest.$ac_ext >&5
14266   rm -rf conftest*
14267   eval "ac_cv_lib_$ac_lib_var=no"
14268 fi
14269 rm -f conftest*
14270 xe_check_libs=""
14271
14272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14273   echo "$ac_t""yes" 1>&6
14274   libdl=dld have_dl=yes;
14275         { test "$extra_verbose" = "yes" && cat << \EOF
14276     Defining HAVE_SHL_LOAD
14277 EOF
14278 cat >> confdefs.h <<\EOF
14279 #define HAVE_SHL_LOAD 1
14280 EOF
14281 }
14282
14283 else
14284   echo "$ac_t""no" 1>&6
14285
14286 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14287 echo "configure:14288: checking for dld_init in -ldld" >&5
14288 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14289
14290 xe_check_libs=" -ldld "
14291 cat > conftest.$ac_ext <<EOF
14292 #line 14293 "configure"
14293 #include "confdefs.h"
14294 /* Override any gcc2 internal prototype to avoid an error.  */
14295 /* We use char because int might match the return type of a gcc2
14296     builtin and then its argument prototype would still apply.  */
14297 char dld_init();
14298
14299 int main() {
14300 dld_init()
14301 ; return 0; }
14302 EOF
14303 if { (eval echo configure:14304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14304   rm -rf conftest*
14305   eval "ac_cv_lib_$ac_lib_var=yes"
14306 else
14307   echo "configure: failed program was:" >&5
14308   cat conftest.$ac_ext >&5
14309   rm -rf conftest*
14310   eval "ac_cv_lib_$ac_lib_var=no"
14311 fi
14312 rm -f conftest*
14313 xe_check_libs=""
14314
14315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14316   echo "$ac_t""yes" 1>&6
14317   libdl=dld have_dl=yes;
14318         { test "$extra_verbose" = "yes" && cat << \EOF
14319     Defining HAVE_DLD_INIT
14320 EOF
14321 cat >> confdefs.h <<\EOF
14322 #define HAVE_DLD_INIT 1
14323 EOF
14324 }
14325
14326 else
14327   echo "$ac_t""no" 1>&6
14328 fi
14329
14330
14331 fi
14332
14333
14334     fi
14335   fi 
14336   if test -n "$have_dl"; then
14337         
14338 dll_ld=
14339 dll_ldflags=
14340 dll_cflags=
14341 dll_post=
14342 dll_ldo="-o"
14343 ld_dynamic_link_flags=
14344 xehost=$canonical
14345 xealias=$internal_configuration
14346
14347 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14348 echo "configure:14349: checking how to build dynamic libraries for ${xehost}" >&5
14349 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14350 case "$xehost" in
14351 *-*-linux-gnu*) ;;
14352 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14353 esac
14354
14355 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14356 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14357 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14358
14359 case "$xehost_os" in
14360 aix3*)
14361   # AIX sometimes has problems with the GCC collect2 program.  For some
14362   # reason, if we set the COLLECT_NAMES environment variable, the problems
14363   # vanish in a puff of smoke.
14364   if test "${COLLECT_NAMES+set}" != set; then
14365     COLLECT_NAMES=
14366     export COLLECT_NAMES
14367   fi
14368   ;;
14369 esac
14370
14371 # Now see if the compiler is really GCC.
14372 if test "$GCC" = "yes"; then
14373   XEGCC=yes
14374 else
14375   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14376 echo "configure:14377: checking checking whether we are using GNU C" >&5
14377   cat > conftest.$ac_ext <<EOF
14378 #line 14379 "configure"
14379 #include "confdefs.h"
14380
14381 #ifdef __GNUC__
14382   yes;
14383 #endif
14384
14385 EOF
14386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14387   egrep "yes" >/dev/null 2>&1; then
14388   rm -rf conftest*
14389   XEGCC=yes
14390 else
14391   rm -rf conftest*
14392   XEGCC=no
14393 fi
14394 rm -f conftest*
14395
14396   echo "$ac_t""${XEGCC}" 1>&6
14397 fi
14398
14399 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14400 echo "configure:14401: checking how to produce PIC code" >&5
14401 wl=
14402
14403 can_build_shared=yes
14404 if test "$XEGCC" = yes; then
14405   wl='-Wl,'
14406
14407   case "$xehost_os" in
14408   aix[3-9]* | irix[5-9]* | osf[3-9])
14409     # PIC is the default for these OSes.
14410     ;;
14411
14412   os2*)
14413     # We can build DLLs from non-PIC.
14414     ;;
14415   amigaos*)
14416     # FIXME: we need at least 68020 code to build shared libraries, but
14417     # adding the `-m68020' flag to GCC prevents building anything better,
14418     # like `-m68040'.
14419     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14420     ;;
14421   *cygwin* | *mingw* )
14422     # PIC is the default
14423     ;;
14424   *)
14425     dll_cflags='-fPIC'
14426     ;;
14427   esac
14428 else
14429   # PORTME Check for PIC flags for the system compiler.
14430   case "$xehost_os" in
14431   hpux9* | hpux1[0-9]*)
14432     # Is there a better link_static_flag that works with the bundled CC?
14433     wl='-Wl,'
14434     dll_cflags='+Z'
14435     ;;
14436
14437   irix[5-9]*)
14438     wl='-Wl,'
14439     # PIC (with -KPIC) is the default.
14440     ;;
14441
14442   os2*)
14443     # We can build DLLs from non-PIC.
14444     ;;
14445
14446   osf[3-9]*)
14447     # All OSF/1 code is PIC.
14448     wl='-Wl,'
14449     ;;
14450
14451   aix[3-9]*)
14452     # All AIX code is PIC.
14453     wl='-Wl,'
14454     ;;
14455
14456   sco3.2v5*)
14457     dll_cflags='-belf -Kpic'
14458     wl='-Wl,'
14459     ;;
14460
14461   unixware*)
14462     dll_cflags="-KPIC"
14463     wl="-Wl,"
14464     ;;
14465
14466   sysv4*)
14467     dll_cflags="-KPIC"
14468     wl="-Wl,"
14469     ;;
14470
14471   sysv5*)
14472     dll_cflags="-KPIC"
14473     wl="-Wl,"
14474     ;;
14475
14476   solaris2*)
14477     dll_cflags='-KPIC'
14478     wl='-Wl,'
14479     ;;
14480
14481   sunos4*)
14482     dll_cflags='-PIC'
14483     wl='-Qoption ld '
14484     ;;
14485
14486   uts4*)
14487     dll_cflags='-pic'
14488     ;;
14489
14490   *)
14491     can_build_shared=no
14492     ;;
14493   esac
14494 fi
14495
14496 if test -n "$dll_cflags"; then
14497   echo "$ac_t""${dll_cflags}" 1>&6
14498
14499   # Check to make sure the dll_cflags actually works.
14500   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14501 echo "configure:14502: checking if PIC flag ${dll_cflags} really works" >&5
14502   save_CFLAGS="$CFLAGS"
14503   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14504   cat > conftest.$ac_ext <<EOF
14505 #line 14506 "configure"
14506 #include "confdefs.h"
14507
14508 int main() {
14509 int x=0;
14510 ; return 0; }
14511 EOF
14512 if { (eval echo configure:14513: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14513   rm -rf conftest*
14514   
14515     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14516     # reports no error.  So, we need to grep stderr for (Bundled).
14517     if grep '(Bundled)' config.log >/dev/null; then
14518       echo "$ac_t""no" 1>&6
14519       can_build_shared=no
14520       dll_cflags=
14521     else
14522       echo "$ac_t""yes" 1>&6
14523     fi
14524 else
14525   echo "configure: failed program was:" >&5
14526   cat conftest.$ac_ext >&5
14527   rm -rf conftest*
14528   echo "$ac_t""no" 1>&6
14529     can_build_shared=no
14530     dll_cflags=
14531 fi
14532 rm -f conftest*
14533   CFLAGS="$save_CFLAGS"
14534 else
14535   echo "$ac_t""none" 1>&6
14536 fi
14537
14538 if test "$can_build_shared" = "yes"; then
14539 cc_produces_so=no
14540 xldf=
14541 xcldf=
14542 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14543 echo "configure:14544: checking if C compiler can produce shared libraries" >&5
14544 if test "$XEGCC" = yes; then
14545   xcldf="-shared"
14546   xldf="-shared"
14547 else # Not using GCC
14548   case "$xehost_os" in
14549     aix[3-9]*)
14550       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14551       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14552       ;;
14553
14554     freebsd2* | netbsd* | openbsd*)
14555       xldf="-Bshareable"
14556       xcldf="${wl}-Bshareable"
14557       ;;
14558
14559     freebsd3*)
14560       xcldf="-shared"
14561       ;;
14562
14563     hpux*)
14564       xldf="-b +s"
14565       xcldf="${wl}-b ${wl}+s"
14566       ;;
14567
14568     irix[5-9]* | osf[3-9]*)
14569       xcldf="${wl}-shared"
14570       xldf="-shared"
14571       ;;
14572
14573     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14574       xcldf="-G"
14575       xldf="-G"
14576       ;;
14577
14578     sunos4*)
14579       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14580       xldf="-assert pure-text -Bstatic"
14581       ;;
14582   esac
14583 fi # End if if we are using gcc
14584
14585 if test -n "$xcldf"; then
14586   save_LDFLAGS=$LDFLAGS
14587   save_LIBS=$LIBS
14588   save_xe_libs=$xe_libs
14589   LDFLAGS="$xcldf $LDFLAGS"
14590   LIBS=
14591   xe_libs=
14592   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14593   cat > conftest.$ac_ext <<EOF
14594 #line 14595 "configure"
14595 #include "confdefs.h"
14596
14597 int main() {
14598 int x=0;
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   cc_produces_so=yes
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   cc_produces_so=no
14609 fi
14610 rm -f conftest*
14611   LDFLAGS=$save_LDFLAGS
14612   LIBS=$save_LIBS
14613   xe_libs=$save_xe_libs
14614   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14615 else
14616   cc_produces_so=no
14617 fi
14618 echo "$ac_t""${cc_produces_so}" 1>&6
14619
14620 LTLD=$LD
14621 if test -z "$LTLD"; then
14622   ac_prog=ld
14623   if test "$XEGCC" = yes; then
14624     # Check if gcc -print-prog-name=ld gives a path.
14625     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14626 echo "configure:14627: checking for ld used by GCC" >&5
14627     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14628     case "$ac_prog" in
14629     # Accept absolute paths.
14630     /*)
14631       if test -z "$LTLD"; then
14632         case "$ac_prog" in
14633           *gcc-lib*) LTLD="$CC"
14634                      ;;
14635           *)         LTLD="$ac_prog"
14636                      ;;
14637         esac
14638       fi
14639       ;;
14640     "")
14641       # If it fails, then pretend we aren't using GCC.
14642       ac_prog=ld
14643       ;;
14644     *)
14645       # If it is relative, then search for the first ld in PATH.
14646       with_gnu_ld=unknown
14647       ;;
14648     esac
14649   else
14650     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14651 echo "configure:14652: checking for GNU ld" >&5
14652   fi
14653
14654   if test -z "$LTLD"; then
14655     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14656     for ac_dir in $PATH; do
14657       test -z "$ac_dir" && ac_dir=.
14658       if test -f "$ac_dir/$ac_prog"; then
14659         LTLD="$ac_dir/$ac_prog"
14660         # Check to see if the program is GNU ld.  I'd rather use --version,
14661         # but apparently some GNU ld's only accept -v.
14662         # Break only if it was the GNU/non-GNU ld that we prefer.
14663         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14664           xe_gnu_ld=yes
14665         else
14666           xe_gnu_ld=no
14667         fi
14668       fi
14669     done
14670     IFS="$ac_save_ifs"
14671   fi
14672
14673   if test -n "$LTLD"; then
14674     echo "$ac_t""${LTLD}" 1>&6
14675   else
14676     echo "$ac_t""no" 1>&6
14677   fi
14678
14679   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14680     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14681     exit 1
14682   fi
14683 fi
14684
14685 ld_dynamic_link_flags=
14686
14687 # Check to see if it really is or isn't GNU ld.
14688 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14689 echo "configure:14690: checking if the linker is GNU ld" >&5
14690 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14691 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14692   xe_gnu_ld=yes
14693 else
14694   xe_gnu_ld=no
14695 fi
14696 echo "$ac_t""${xe_gnu_ld}" 1>&6
14697
14698 case "$xehost_os" in
14699   amigaos* | sunos4*)
14700     # On these operating systems, we should treat GNU ld like the system ld.
14701     gnu_ld_acts_native=yes
14702     ;;
14703   *)
14704     gnu_ld_acts_native=no
14705     ;;
14706 esac
14707
14708 if test "$cc_produces_so" = "yes"; then
14709   dll_ld=$CC
14710   dll_ldflags=$xcldf
14711   can_build_shared=yes
14712   ld_shlibs=yes
14713 else
14714   # OK - only NOW do we futz about with ld.
14715   # See if the linker supports building shared libraries.
14716   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14717 echo "configure:14718: checking whether the linker supports shared libraries" >&5
14718   dll_ld=$CC
14719   dll_ldflags=$LDFLAGS
14720   ld_shlibs=yes
14721   can_build_shared=yes
14722   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14723     # See if GNU ld supports shared libraries.
14724     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14725       dll_ld=$CC
14726       dll_ldflags="-shared"
14727       ld_shlibs=yes
14728     else
14729       ld_shlibs=no
14730     fi
14731   else
14732     # PORTME fill in a description of your system's linker (not GNU ld)
14733     case "$xehost_os" in
14734     aix3*)
14735       dll_ld=$LTLD
14736       dll_ldflags=$xldf
14737       ;;
14738
14739     aix[4-9]*)
14740       dll_ldflags=$xcldf
14741       ;;
14742
14743     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14744     # support.  Future versions do this automatically, but an explicit c++rt0.o
14745     # doesn't break anything, and helps significantly (at the cost of a little
14746     # extra space).
14747     freebsd2.2*)
14748       dll_ld=$LTLD
14749       dll_ldflags=$xldf
14750       dll_post="/usr/lib/c++rt0.o"
14751       ;;
14752
14753     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14754     freebsd2*)
14755       dll_ld=$LTLD
14756       dll_ldflags="-Bshareable"
14757       ;;
14758
14759     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14760     freebsd3*)
14761       dll_ldflags="-shared"
14762       ;;
14763
14764     hpux*)
14765       dll_ld=$LTLD
14766       dll_ldflags=$xldf
14767       ;;
14768
14769     irix[5-9]*)
14770       dll_ld=$LTLD
14771       dll_ldflags=$xldf
14772       ;;
14773
14774     netbsd*)
14775       # Tested with NetBSD 1.2 ld
14776       dll_ld=$LTLD
14777       dll_ldflags=$xldf
14778       ;;
14779
14780     openbsd*)
14781       dll_ld=$LTLD
14782       dll_ldflags=$xldf
14783       ;;
14784
14785     osf3* | osf4*)
14786       dll_ld=$LTLD
14787       dll_ldflags=$xldf
14788       ;;
14789
14790     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14791     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14792       dll_ld=$LTLD
14793       case "$dll_ld" in
14794         *gcc*) dll_ldflags="-shared"
14795                dll_ld=$CC
14796                ;;
14797         *)     dll_ldflags="-G"
14798                ;;
14799       esac
14800       ;;
14801
14802     sunos4*)
14803       if test "$XEGCC" = yes; then
14804         dll_ld=$CC
14805       else
14806         dll_ld=$LTLD
14807       fi
14808       dll_ldflags=$xldf
14809       ;;
14810
14811     uts4*)
14812       dll_ld=$LTLD
14813       dll_ldflags="-G"
14814       ;;
14815
14816     bsdi*)
14817       dll_ldflags="-r"
14818       dll_ld="shlicc2"
14819       ;;
14820
14821     *)
14822       ld_shlibs=no
14823       can_build_shared=no
14824       ;;
14825     esac
14826   fi
14827   echo "$ac_t""${ld_shlibs}" 1>&6
14828   if test "$ld_shlibs" = "no"; then
14829     can_build_shared=no
14830   fi
14831 fi # End of if cc_produces_so = no
14832
14833
14834 if test "$xe_gnu_ld" = yes; then
14835   if test "$ld_shlibs" = yes; then
14836     ld_dynamic_link_flags="${wl}-export-dynamic"
14837   fi
14838 fi
14839
14840 if test -z "$ld_dynamic_link_flags"; then
14841   case "$xehost_os" in
14842   aix[3-9]*)
14843     ld_dynamic_link_flags=
14844     ;;
14845
14846   freebsd2.2*)
14847     ld_dynamic_link_flags=
14848     ;;
14849
14850   freebsd2*)
14851     ld_dynamic_link_flags=
14852     ;;
14853
14854   freebsd3*)
14855     ld_dynamic_link_flags=
14856     ;;
14857
14858   hpux*)
14859     ld_dynamic_link_flags="${wl}-E"
14860     ;;
14861
14862   irix[5-9]*)
14863     ld_dynamic_link_flags=
14864     ;;
14865
14866   netbsd*)
14867     ld_dynamic_link_flags=
14868     ;;
14869
14870   openbsd*)
14871     ld_dynamic_link_flags=
14872     ;;
14873
14874   osf3* | osf4*)
14875     ld_dynamic_link_flags=
14876     ;;
14877
14878   solaris2* | solaris7*)
14879     ld_dynamic_link_flags=
14880     ;;
14881
14882   sco3.2v5* | unixware* | sysv5* | sysv4*)
14883     ld_dynamic_link_flags="${wl}-Bexport"
14884     ;;
14885
14886   sunos4*)
14887     ld_dynamic_link_flags=
14888     ;;
14889
14890   uts4*)
14891     ld_dynamic_link_flags=
14892     ;;
14893
14894   bsdi*)
14895     ld_dynamic_link_flags=
14896     ;;
14897
14898   esac
14899 fi # End of if -z ld_dynamic_link_flags
14900 fi # End of if test "$can_build_shared" = "yes"
14901
14902
14903
14904
14905
14906
14907
14908
14909   fi
14910
14911   if test "$can_build_shared" = "yes"; then
14912     { test "$extra_verbose" = "yes" && cat << \EOF
14913     Defining HAVE_SHLIB
14914 EOF
14915 cat >> confdefs.h <<\EOF
14916 #define HAVE_SHLIB 1
14917 EOF
14918 }
14919
14920     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14921    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14922  fi
14923     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14924     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14925     for ac_func in dlerror _dlerror
14926 do
14927 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14928 echo "configure:14929: checking for $ac_func" >&5
14929
14930 cat > conftest.$ac_ext <<EOF
14931 #line 14932 "configure"
14932 #include "confdefs.h"
14933 /* System header to define __stub macros and hopefully few prototypes,
14934     which can conflict with char $ac_func(); below.  */
14935 #include <assert.h>
14936 /* Override any gcc2 internal prototype to avoid an error.  */
14937 /* We use char because int might match the return type of a gcc2
14938     builtin and then its argument prototype would still apply.  */
14939 char $ac_func();
14940
14941 int main() {
14942
14943 /* The GNU C library defines this for functions which it implements
14944     to always fail with ENOSYS.  Some functions are actually named
14945     something starting with __ and the normal name is an alias.  */
14946 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14947 choke me
14948 #else
14949 $ac_func();
14950 #endif
14951
14952 ; return 0; }
14953 EOF
14954 if { (eval echo configure:14955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14955   rm -rf conftest*
14956   eval "ac_cv_func_$ac_func=yes"
14957 else
14958   echo "configure: failed program was:" >&5
14959   cat conftest.$ac_ext >&5
14960   rm -rf conftest*
14961   eval "ac_cv_func_$ac_func=no"
14962 fi
14963 rm -f conftest*
14964
14965 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14966   echo "$ac_t""yes" 1>&6
14967     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14968   { test "$extra_verbose" = "yes" && cat << EOF
14969     Defining $ac_tr_func
14970 EOF
14971 cat >> confdefs.h <<EOF
14972 #define $ac_tr_func 1
14973 EOF
14974 }
14975  
14976 else
14977   echo "$ac_t""no" 1>&6
14978 fi
14979 done
14980
14981     with_modules=yes
14982   else
14983     if test "$with_modules" = "yes"; then
14984       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14985     else
14986       echo "configure: warning: "Module support cannot be provided."" 1>&2
14987     fi
14988     with_modules=no
14989   fi
14990 fi
14991
14992 cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 int main(int c,char *v[]){return 0;}
14996 EOF
14997 if { (eval echo configure:14998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14998 then
14999   :
15000 else
15001   conftest_rc="$?"
15002   echo "configure: failed program was:" >&5
15003   cat conftest.$ac_ext >&5
15004   rm -fr conftest*
15005   
15006   echo ""
15007   echo "*** PANIC *** The C compiler can no longer build working executables."
15008   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15009   echo "*** PANIC *** The most likely reason for this problem is that configure"
15010   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15011   echo "*** PANIC *** found at run time."
15012   echo "*** PANIC ***"
15013   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15014   echo "*** PANIC *** On other systems, try telling configure where to find the"
15015   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15016   echo "*** PANIC ***"
15017   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15018   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15019   echo "*** PANIC *** on your system.  Don't do that."
15020   exit 1
15021 fi
15022 rm -fr conftest*
15023
15024 if test "$win32_processes" = "yes"; then
15025   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15026    echo "    xemacs will be linked with \"process-nt.o\""
15027  fi
15028 else
15029   { test "$extra_verbose" = "yes" && cat << \EOF
15030     Defining HAVE_UNIX_PROCESSES
15031 EOF
15032 cat >> confdefs.h <<\EOF
15033 #define HAVE_UNIX_PROCESSES 1
15034 EOF
15035 }
15036
15037   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15038    echo "    xemacs will be linked with \"process-unix.o\""
15039  fi
15040 fi
15041
15042
15043
15044 T=""
15045 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15046 CFLAGS="$T"
15047
15048
15049 T=""
15050 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15051 extra_objs="$T"
15052
15053
15054 T=""
15055 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
15056 c_switch_general="$T"
15057
15058
15059 T=""
15060 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
15061 c_switch_window_system="$T"
15062
15063
15064 T=""
15065 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15066 c_switch_all="$T"
15067
15068
15069 T=""
15070 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
15071 ld_switch_general="$T"
15072
15073
15074 T=""
15075 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15076 ld_switch_window_system="$T"
15077
15078
15079 T=""
15080 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15081 ld_switch_all="$T"
15082
15083
15084 T=""
15085 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15086 ld_libs_general="$T"
15087
15088
15089 T=""
15090 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
15091 ld_libs_window_system="$T"
15092
15093
15094 T=""
15095 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15096 ld_libs_all="$T"
15097
15098
15099
15100 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15101 internal_makefile_list="Makefile.in"
15102 SUBDIR_MAKEFILES=''
15103 test -d lock || mkdir lock
15104 for dir in $MAKE_SUBDIR; do
15105   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15106         test -d "$d" || mkdir "$d"; cd "$d"
15107       done ) ;;
15108    * ) test -d "$dir" || mkdir "$dir" ;;
15109   esac
15110   
15111 T=""
15112 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15113 SUBDIR_MAKEFILES="$T"
15114
15115   
15116 T=""
15117 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15118 internal_makefile_list="$T"
15119
15120 done
15121
15122
15123
15124
15125 for dir in src/s src/m; do
15126   if test ! -d "$dir" ; then
15127     echo Making symbolic link to "$srcdir/$dir"
15128     ${LN_S} "$srcdir/$dir" "$dir"
15129   fi
15130 done
15131
15132 if test "$extra_verbose" = "yes"; then
15133   echo ""
15134   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
15135   echo ""
15136 fi
15137
15138
15139 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15140   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15141   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15142 fi
15143
15144 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15145   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15146   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15147 fi
15148
15149 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15150   test "$extra_verbose" = "yes" && echo "creating TAGS"
15151   echo "\f
15152 $srcdir/TAGS,include" > "TAGS"
15153 fi
15154
15155 if test "$__SUNPRO_C" = "yes"; then
15156   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15157   ( echo "# For use with Sun WorkShop's Source browser."
15158     echo "# See sbquery(1) and sbinit(4) for more information"
15159     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15160   ) > .sbinit
15161 fi
15162
15163 rm -f core
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184 PREFIX=$prefix
15185 while true; do
15186   case "$PREFIX" in
15187     *\$* ) eval "PREFIX=$PREFIX" ;;
15188     *) break ;;
15189   esac
15190 done
15191
15192
15193
15194
15195 EXEC_PREFIX=$exec_prefix
15196 while true; do
15197   case "$EXEC_PREFIX" in
15198     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15199     *) break ;;
15200   esac
15201 done
15202
15203
15204
15205
15206 INFODIR=$infodir
15207 while true; do
15208   case "$INFODIR" in
15209     *\$* ) eval "INFODIR=$INFODIR" ;;
15210     *) break ;;
15211   esac
15212 done
15213
15214
15215
15216
15217 INFOPATH=$infopath
15218 while true; do
15219   case "$INFOPATH" in
15220     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15221     *) break ;;
15222   esac
15223 done
15224
15225
15226
15227
15228 PACKAGE_PATH=$package_path
15229 while true; do
15230   case "$PACKAGE_PATH" in
15231     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15232     *) break ;;
15233   esac
15234 done
15235
15236
15237
15238
15239 LISPDIR=$lispdir
15240 while true; do
15241   case "$LISPDIR" in
15242     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15243     *) break ;;
15244   esac
15245 done
15246
15247
15248
15249
15250 MODULEDIR=$moduledir
15251 while true; do
15252   case "$MODULEDIR" in
15253     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15254     *) break ;;
15255   esac
15256 done
15257
15258
15259
15260
15261 SITELISPDIR=$sitelispdir
15262 while true; do
15263   case "$SITELISPDIR" in
15264     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15265     *) break ;;
15266   esac
15267 done
15268
15269
15270
15271
15272 SITEMODULEDIR=$sitemoduledir
15273 while true; do
15274   case "$SITEMODULEDIR" in
15275     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15276     *) break ;;
15277   esac
15278 done
15279
15280
15281
15282
15283 ETCDIR=$etcdir
15284 while true; do
15285   case "$ETCDIR" in
15286     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15287     *) break ;;
15288   esac
15289 done
15290
15291
15292
15293
15294 DOCDIR=$docdir
15295 while true; do
15296   case "$DOCDIR" in
15297     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15298     *) break ;;
15299   esac
15300 done
15301
15302
15303
15304
15305 ARCHLIBDIR=$archlibdir
15306 while true; do
15307   case "$ARCHLIBDIR" in
15308     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15309     *) break ;;
15310   esac
15311 done
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15333
15334
15335
15336
15337
15338
15339
15340 : ${XEMACS_CC:=$CC}
15341
15342
15343 if test "$with_prefix" = "yes"; then
15344   { test "$extra_verbose" = "yes" && cat << \EOF
15345     Defining PREFIX_USER_DEFINED
15346 EOF
15347 cat >> confdefs.h <<\EOF
15348 #define PREFIX_USER_DEFINED 1
15349 EOF
15350 }
15351
15352 fi
15353
15354 if test "$with_site_lisp" = "no"; then
15355   { test "$extra_verbose" = "yes" && cat << \EOF
15356     Defining INHIBIT_SITE_LISP
15357 EOF
15358 cat >> confdefs.h <<\EOF
15359 #define INHIBIT_SITE_LISP 1
15360 EOF
15361 }
15362
15363 fi
15364 if test "$with_site_modules" = "no"; then
15365   { test "$extra_verbose" = "yes" && cat << \EOF
15366     Defining INHIBIT_SITE_MODULES
15367 EOF
15368 cat >> confdefs.h <<\EOF
15369 #define INHIBIT_SITE_MODULES 1
15370 EOF
15371 }
15372
15373 fi
15374
15375
15376 T=""
15377 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15378 ac_configure_args="$T"
15379
15380 { test "$extra_verbose" = "yes" && cat << EOF
15381     Defining EMACS_CONFIGURATION = "$configuration"
15382 EOF
15383 cat >> confdefs.h <<EOF
15384 #define EMACS_CONFIGURATION "$configuration"
15385 EOF
15386 }
15387
15388 { test "$extra_verbose" = "yes" && cat << EOF
15389     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15390 EOF
15391 cat >> confdefs.h <<EOF
15392 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15393 EOF
15394 }
15395
15396
15397
15398 null_string=""
15399 { test "$extra_verbose" = "yes" && cat << EOF
15400     Defining LD_SWITCH_X_SITE = $null_string
15401 EOF
15402 cat >> confdefs.h <<EOF
15403 #define LD_SWITCH_X_SITE $null_string
15404 EOF
15405 }
15406
15407 { test "$extra_verbose" = "yes" && cat << EOF
15408     Defining LD_SWITCH_X_SITE_AUX = $null_string
15409 EOF
15410 cat >> confdefs.h <<EOF
15411 #define LD_SWITCH_X_SITE_AUX $null_string
15412 EOF
15413 }
15414
15415 { test "$extra_verbose" = "yes" && cat << EOF
15416     Defining C_SWITCH_X_SITE = $null_string
15417 EOF
15418 cat >> confdefs.h <<EOF
15419 #define C_SWITCH_X_SITE $null_string
15420 EOF
15421 }
15422
15423 { test "$extra_verbose" = "yes" && cat << EOF
15424     Defining LD_SWITCH_SITE = $null_string
15425 EOF
15426 cat >> confdefs.h <<EOF
15427 #define LD_SWITCH_SITE $null_string
15428 EOF
15429 }
15430
15431 { test "$extra_verbose" = "yes" && cat << EOF
15432     Defining C_SWITCH_SITE = $null_string
15433 EOF
15434 cat >> confdefs.h <<EOF
15435 #define C_SWITCH_SITE $null_string
15436 EOF
15437 }
15438
15439
15440
15441 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15442     Defining GNU_MALLOC
15443 EOF
15444 cat >> confdefs.h <<\EOF
15445 #define GNU_MALLOC 1
15446 EOF
15447 }
15448
15449 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15450     Defining USE_SYSTEM_MALLOC
15451 EOF
15452 cat >> confdefs.h <<\EOF
15453 #define USE_SYSTEM_MALLOC 1
15454 EOF
15455 }
15456
15457 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15458     Defining USE_DEBUG_MALLOC
15459 EOF
15460 cat >> confdefs.h <<\EOF
15461 #define USE_DEBUG_MALLOC 1
15462 EOF
15463 }
15464
15465                                               { test "$extra_verbose" = "yes" && cat << \EOF
15466     Defining USE_SYSTEM_MALLOC
15467 EOF
15468 cat >> confdefs.h <<\EOF
15469 #define USE_SYSTEM_MALLOC 1
15470 EOF
15471 }
15472
15473 fi
15474 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15475     Defining I18N3
15476 EOF
15477 cat >> confdefs.h <<\EOF
15478 #define I18N3 1
15479 EOF
15480 }
15481
15482 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15483     Defining USE_GCC
15484 EOF
15485 cat >> confdefs.h <<\EOF
15486 #define USE_GCC 1
15487 EOF
15488 }
15489
15490 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15491     Defining EXTERNAL_WIDGET
15492 EOF
15493 cat >> confdefs.h <<\EOF
15494 #define EXTERNAL_WIDGET 1
15495 EOF
15496 }
15497
15498 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15499     Defining QUICK_BUILD
15500 EOF
15501 cat >> confdefs.h <<\EOF
15502 #define QUICK_BUILD 1
15503 EOF
15504 }
15505
15506 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15507     Defining PURIFY
15508 EOF
15509 cat >> confdefs.h <<\EOF
15510 #define PURIFY 1
15511 EOF
15512 }
15513
15514 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15515     Defining QUANTIFY
15516 EOF
15517 cat >> confdefs.h <<\EOF
15518 #define QUANTIFY 1
15519 EOF
15520 }
15521
15522 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15523     Defining MAIL_USE_POP
15524 EOF
15525 cat >> confdefs.h <<\EOF
15526 #define MAIL_USE_POP 1
15527 EOF
15528 }
15529
15530 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15531     Defining KERBEROS
15532 EOF
15533 cat >> confdefs.h <<\EOF
15534 #define KERBEROS 1
15535 EOF
15536 }
15537
15538 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15539     Defining HESIOD
15540 EOF
15541 cat >> confdefs.h <<\EOF
15542 #define HESIOD 1
15543 EOF
15544 }
15545
15546 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15547     Defining USE_UNION_TYPE
15548 EOF
15549 cat >> confdefs.h <<\EOF
15550 #define USE_UNION_TYPE 1
15551 EOF
15552 }
15553
15554 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15555     Defining PDUMP
15556 EOF
15557 cat >> confdefs.h <<\EOF
15558 #define PDUMP 1
15559 EOF
15560 }
15561
15562
15563
15564 (
15565 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15566 else
15567   echo "uname -a: `uname -a`"
15568 fi
15569 echo ""
15570 echo "$0 $quoted_arguments"
15571 ) > Installation
15572
15573 if test ! -z ${emacs_beta_version} ; then
15574   if test -z "${emacs_is_beta}" ; then
15575         xemacs_betaname=".${emacs_beta_version}"
15576   else
15577         xemacs_betaname="-b${emacs_beta_version}"
15578   fi
15579 else
15580   xemacs_betaname=""
15581 fi
15582
15583 (
15584 echo "
15585
15586 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15587 "
15588 echo "
15589 Compilation / Installation:"
15590 echo "  Source code location:              $srcdir"
15591 echo "  Installation prefix:               $prefix"
15592 if test -n "$site_includes"; then
15593   echo "  Additional header files:           $site_includes"
15594 fi
15595 if test -n "$site_libraries"; then
15596   echo "  Additional libraries:              $site_libraries"
15597 fi
15598 if test -n "$site_prefixes"; then
15599   echo "  Additional prefixes:               $site_prefixes"
15600 fi
15601 if test -n "$runpath"; then
15602   echo "  Runtime library search path:       $runpath"
15603 fi
15604
15605 if test -n "$opsysfile"
15606 then echo "  Operating system description file: \`$opsysfile'"
15607 else echo "  Not using any operating system description file"
15608 fi
15609 if test -n "$machfile"
15610 then echo "  Machine description file:          \`$machfile'"
15611 else echo "  Not using any machine description file"
15612 fi
15613
15614 echo "  Compiler:                          $CC $CFLAGS"
15615 echo "  Relocating allocator for buffers:  $rel_alloc"
15616 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15617
15618 echo "
15619 Window System:"
15620 if test "$with_msw" = "yes"; then
15621   echo "  Compiling in support for the Microsoft window system."
15622 fi
15623 if test "$with_x11" = "yes"; then
15624   echo "  Compiling in support for the X window system:"
15625   echo "    - X Windows headers location:                 $x_includes"
15626   echo "    - X Windows libraries location:               $x_libraries"
15627   if test "$with_xauth" != yes; then
15628     echo "    - Xau (X authority) not available."
15629   fi
15630   if test "$with_xmu" != yes; then
15631     echo "    - Xmu library not available; substituting equivalent routines."
15632   fi
15633   if test "$with_wmcommand" != no; then
15634     echo "    - Handling WM_COMMAND properly."
15635   fi
15636 fi
15637 if test "$need_athena" = "yes"; then
15638   echo "  Compiling in support for the Athena widget set:"
15639   echo "    - Athena headers location:                    $athena_h_path"
15640   echo "    - Athena library to link:                     $athena_lib"
15641 fi
15642 case "$with_menubars" in
15643   gtk   ) echo "  Using GTK menubars."   ;;
15644   lucid ) echo "  Using Lucid menubars." ;;
15645   motif ) echo "  Using Motif menubars."
15646           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15647           echo "             We recommend using the Lucid menubar instead."
15648           echo "             Re-run configure with --with-menubars='lucid'." ;;
15649     msw ) echo "  Using MS-Windows menubars." ;;
15650 esac
15651 case "$with_scrollbars" in
15652   gtk    ) echo "  Using GTK scrollbars."        ;;
15653   lucid  ) echo "  Using Lucid scrollbars."      ;;
15654   motif  ) echo "  Using Motif scrollbars."      ;;
15655   athena ) echo "  Using Athena scrollbars."     ;;
15656      msw ) echo "  Using MS-Windows scrollbars." ;;
15657 esac
15658 case "$with_dialogs" in
15659   gtk    ) echo "  Using GTK dialog boxes." ;;
15660   motif  ) echo "  Using Motif dialog boxes."
15661            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15662              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15663              echo "             We recommend using the Athena dialog boxes instead."
15664              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15665              echo "             Read the PROBLEMS file for more information."
15666            fi; fi ;;
15667   athena ) echo "  Using Athena dialog boxes."     ;;
15668      msw ) echo "  Using MS-Windows dialog boxes." ;;
15669 esac
15670 case "$with_widgets" in
15671   gtk    ) echo "  Using GTK native widgets."        ;;
15672   motif  ) echo "  Using Motif native widgets."      ;;
15673   athena ) echo "  Using Athena native widgets."     ;;
15674      msw ) echo "  Using MS-Windows native widgets." ;;
15675 esac
15676 if test "$with_dragndrop" = yes; then
15677   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15678   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15679 fi
15680
15681 echo "
15682 TTY:"
15683 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15684 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15685
15686 echo "
15687 Images:"
15688 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15689 if test "$with_xpm" = yes; then
15690   echo "  Compiling in support for XPM  images."
15691 elif test "$with_x11" = yes; then
15692   echo "  WARNING: -----------------------------------------------------------"
15693   echo "  WARNING: Compiling without XPM image support."
15694   if test "$xpm_problem" != ""; then
15695     echo "  Reason: $xpm_problem"
15696   fi
15697   echo "  WARNING: You should strongly consider installing XPM."
15698   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15699   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15700   echo "  WARNING: -----------------------------------------------------------"
15701 fi
15702 if test "$with_png" = yes; then
15703   echo "  Compiling in support for PNG  images."
15704 elif test "$window_system" != "none"; then
15705   echo "  WARNING: -----------------------------------------------------------"
15706   echo "  WARNING: Compiling without PNG image support."
15707   if test "$png_problem" != ""; then
15708     echo "  Reason: $png_problem"
15709   fi
15710   echo "  WARNING: You should strongly consider installing the PNG libraries."
15711   echo "  WARNING: Otherwise certain images and glyphs may not display."
15712   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15713   echo "  WARNING: -----------------------------------------------------------"
15714 fi
15715 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15716 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15717 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15718
15719 echo "
15720 Sound:"
15721 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15722 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15723 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15724 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15725
15726 echo "
15727 Databases:"
15728 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15729 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15730 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15731 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15732 if test "$with_postgresql" = yes; then
15733   echo "  Compiling in support for PostgreSQL."
15734   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15735   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15736 fi
15737
15738 echo "
15739 Internationalization:"
15740 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15741 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15742 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15743 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15744 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15745 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15746 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15747 if test "$with_wnn" = yes; then
15748   echo "  Compiling in support for the WNN input method on Mule."
15749   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15750 fi
15751 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15752
15753 echo "
15754 Mail:"
15755 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15756 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15757 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15758 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15759
15760 echo "
15761 Other Features:"
15762 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15763 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15764 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15765 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15766 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15767 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15768 test "$pdump" = yes && echo "  Using the new portable dumper."
15769 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15770 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15771 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15772   != "no no no no no no"; then
15773   echo "  WARNING: ---------------------------------------------------------"
15774   echo "  WARNING: Compiling in support for runtime error checking."
15775   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15776   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15777   echo "  WARNING: ---------------------------------------------------------"
15778 fi
15779 echo ""
15780 ) | tee -a Installation
15781 echo ""
15782
15783
15784 # Remove any trailing slashes in these variables.
15785 test -n "$prefix" &&
15786   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15787 test -n "$exec_prefix" &&
15788   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15789
15790
15791 for file in $internal_makefile_list; do
15792   test "$file" = src/Makefile.in && \
15793     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15794   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15795 done
15796 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15797 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
15798
15799 trap '' 1 2 15
15800
15801 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15802
15803 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15804 # Let make expand exec_prefix.
15805 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15806
15807 # Any assignment to VPATH causes Sun make to only execute
15808 # the first set of double-colon rules, so remove it if not needed.
15809 # If there is a colon in the path, we need to keep it.
15810 if test "x$srcdir" = x.; then
15811   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15812 fi
15813
15814 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15815
15816 DEFS=-DHAVE_CONFIG_H
15817
15818 # Without the "./", some shells look in PATH for config.status.
15819 : ${CONFIG_STATUS=./config.status}
15820
15821 echo creating $CONFIG_STATUS
15822 rm -f $CONFIG_STATUS
15823 cat > $CONFIG_STATUS <<EOF
15824 #! /bin/sh
15825 # Generated automatically by configure.
15826 # Run this file to recreate the current configuration.
15827 # This directory was configured as follows,
15828 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15829 #
15830 # $0 $ac_configure_args
15831 #
15832 # Compiler output produced by configure, useful for debugging
15833 # configure, is in ./config.log if it exists.
15834
15835 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15836 for ac_option
15837 do
15838   case "\$ac_option" in
15839   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15840     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15841     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15842   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15843     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15844     exit 0 ;;
15845   -help | --help | --hel | --he | --h)
15846     echo "\$ac_cs_usage"; exit 0 ;;
15847   *) echo "\$ac_cs_usage"; exit 1 ;;
15848   esac
15849 done
15850
15851 ac_given_srcdir=$srcdir
15852 ac_given_INSTALL="$INSTALL"
15853
15854 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15855 EOF
15856 cat >> $CONFIG_STATUS <<EOF
15857
15858 # Protect against being on the right side of a sed subst in config.status.
15859 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15860  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15861 $ac_vpsub
15862 $extrasub
15863 s%@SHELL@%$SHELL%g
15864 s%@CFLAGS@%$CFLAGS%g
15865 s%@CPPFLAGS@%$CPPFLAGS%g
15866 s%@CXXFLAGS@%$CXXFLAGS%g
15867 s%@FFLAGS@%$FFLAGS%g
15868 s%@DEFS@%$DEFS%g
15869 s%@LDFLAGS@%$LDFLAGS%g
15870 s%@LIBS@%$LIBS%g
15871 s%@exec_prefix@%$exec_prefix%g
15872 s%@prefix@%$prefix%g
15873 s%@program_transform_name@%$program_transform_name%g
15874 s%@bindir@%$bindir%g
15875 s%@sbindir@%$sbindir%g
15876 s%@libexecdir@%$libexecdir%g
15877 s%@datadir@%$datadir%g
15878 s%@sysconfdir@%$sysconfdir%g
15879 s%@sharedstatedir@%$sharedstatedir%g
15880 s%@localstatedir@%$localstatedir%g
15881 s%@libdir@%$libdir%g
15882 s%@includedir@%$includedir%g
15883 s%@oldincludedir@%$oldincludedir%g
15884 s%@infodir@%$infodir%g
15885 s%@mandir@%$mandir%g
15886 s%@LN_S@%$LN_S%g
15887 s%@blddir@%$blddir%g
15888 s%@CC@%$CC%g
15889 s%@CPP@%$CPP%g
15890 s%@start_flags@%$start_flags%g
15891 s%@ld_switch_shared@%$ld_switch_shared%g
15892 s%@start_files@%$start_files%g
15893 s%@ld@%$ld%g
15894 s%@lib_gcc@%$lib_gcc%g
15895 s%@RANLIB@%$RANLIB%g
15896 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15897 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15898 s%@INSTALL_DATA@%$INSTALL_DATA%g
15899 s%@YACC@%$YACC%g
15900 s%@SET_MAKE@%$SET_MAKE%g
15901 s%@GTK_CONFIG@%$GTK_CONFIG%g
15902 s%@X_CFLAGS@%$X_CFLAGS%g
15903 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15904 s%@X_LIBS@%$X_LIBS%g
15905 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15906 s%@install_pp@%$install_pp%g
15907 s%@libs_xauth@%$libs_xauth%g
15908 s%@dnd_objs@%$dnd_objs%g
15909 s%@lwlib_objs@%$lwlib_objs%g
15910 s%@ALLOCA@%$ALLOCA%g
15911 s%@have_esd_config@%$have_esd_config%g
15912 s%@dll_ld@%$dll_ld%g
15913 s%@dll_cflags@%$dll_cflags%g
15914 s%@dll_ldflags@%$dll_ldflags%g
15915 s%@dll_post@%$dll_post%g
15916 s%@dll_ldo@%$dll_ldo%g
15917 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15918 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15919 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15920 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15921 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15922 s%@PROGNAME@%$PROGNAME%g
15923 s%@version@%$version%g
15924 s%@configuration@%$configuration%g
15925 s%@canonical@%$canonical%g
15926 s%@inststaticdir@%$inststaticdir%g
15927 s%@instvardir@%$instvardir%g
15928 s%@srcdir@%$srcdir%g
15929 s%@pkgdir@%$pkgdir%g
15930 s%@statedir@%$statedir%g
15931 s%@extra_includes@%$extra_includes%g
15932 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15933 s%@PREFIX@%$PREFIX%g
15934 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15935 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15936 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15937 s%@INFODIR@%$INFODIR%g
15938 s%@infopath@%$infopath%g
15939 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15940 s%@INFOPATH@%$INFOPATH%g
15941 s%@package_path@%$package_path%g
15942 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15943 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15944 s%@lispdir@%$lispdir%g
15945 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15946 s%@LISPDIR@%$LISPDIR%g
15947 s%@moduledir@%$moduledir%g
15948 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15949 s%@MODULEDIR@%$MODULEDIR%g
15950 s%@sitelispdir@%$sitelispdir%g
15951 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15952 s%@SITELISPDIR@%$SITELISPDIR%g
15953 s%@sitemoduledir@%$sitemoduledir%g
15954 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15955 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15956 s%@etcdir@%$etcdir%g
15957 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15958 s%@ETCDIR@%$ETCDIR%g
15959 s%@docdir@%$docdir%g
15960 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15961 s%@DOCDIR@%$DOCDIR%g
15962 s%@archlibdir@%$archlibdir%g
15963 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15964 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15965 s%@bitmapdir@%$bitmapdir%g
15966 s%@extra_objs@%$extra_objs%g
15967 s%@machfile@%$machfile%g
15968 s%@opsysfile@%$opsysfile%g
15969 s%@c_switch_general@%$c_switch_general%g
15970 s%@c_switch_window_system@%$c_switch_window_system%g
15971 s%@c_switch_all@%$c_switch_all%g
15972 s%@ld_switch_general@%$ld_switch_general%g
15973 s%@ld_switch_window_system@%$ld_switch_window_system%g
15974 s%@ld_switch_all@%$ld_switch_all%g
15975 s%@ld_libs_general@%$ld_libs_general%g
15976 s%@ld_libs_window_system@%$ld_libs_window_system%g
15977 s%@ld_libs_all@%$ld_libs_all%g
15978 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15979 s%@native_sound_lib@%$native_sound_lib%g
15980 s%@sound_cflags@%$sound_cflags%g
15981 s%@dynodump_arch@%$dynodump_arch%g
15982 s%@XEMACS_CC@%$XEMACS_CC%g
15983 s%@internal_makefile_list@%$internal_makefile_list%g
15984
15985 CEOF
15986 EOF
15987
15988 cat >> $CONFIG_STATUS <<\EOF
15989
15990 # Split the substitutions into bite-sized pieces for seds with
15991 # small command number limits, like on Digital OSF/1 and HP-UX.
15992 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15993 ac_file=1 # Number of current file.
15994 ac_beg=1 # First line for current file.
15995 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15996 ac_more_lines=:
15997 ac_sed_cmds=""
15998 while $ac_more_lines; do
15999   if test $ac_beg -gt 1; then
16000     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16001   else
16002     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16003   fi
16004   if test ! -s conftest.s$ac_file; then
16005     ac_more_lines=false
16006     rm -f conftest.s$ac_file
16007   else
16008     if test -z "$ac_sed_cmds"; then
16009       ac_sed_cmds="sed -f conftest.s$ac_file"
16010     else
16011       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16012     fi
16013     ac_file=`expr $ac_file + 1`
16014     ac_beg=$ac_end
16015     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16016   fi
16017 done
16018 if test -z "$ac_sed_cmds"; then
16019   ac_sed_cmds=cat
16020 fi
16021 EOF
16022
16023 cat >> $CONFIG_STATUS <<EOF
16024
16025 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16026 EOF
16027 cat >> $CONFIG_STATUS <<\EOF
16028 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16029   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16030   case "$ac_file" in
16031   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16032        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16033   *) ac_file_in="${ac_file}.in" ;;
16034   esac
16035
16036   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16037
16038   # Remove last slash and all that follows it.  Not all systems have dirname.
16039   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16040   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16041     # The file is in a subdirectory.
16042     test ! -d "$ac_dir" && mkdir "$ac_dir"
16043     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16044     # A "../" for each directory in $ac_dir_suffix.
16045     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16046   else
16047     ac_dir_suffix= ac_dots=
16048   fi
16049
16050   case "$ac_given_srcdir" in
16051   .)  srcdir=.
16052       if test -z "$ac_dots"; then top_srcdir=.
16053       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16054   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16055   *) # Relative path.
16056     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16057     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16058   esac
16059
16060   case "$ac_given_INSTALL" in
16061   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16062   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16063   esac
16064
16065   echo creating "$ac_file"
16066   rm -f "$ac_file"
16067   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16068   case "$ac_file" in
16069   *Makefile*) ac_comsub="1i\\
16070 # $configure_input" ;;
16071   *) ac_comsub= ;;
16072   esac
16073
16074   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16075   sed -e "$ac_comsub
16076 s%@configure_input@%$configure_input%g
16077 s%@srcdir@%$srcdir%g
16078 s%@top_srcdir@%$top_srcdir%g
16079 s%@INSTALL@%$INSTALL%g
16080 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16081 fi; done
16082 rm -f conftest.s*
16083
16084 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16085 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16086 #
16087 # ac_d sets the value in "#define NAME VALUE" lines.
16088 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16089 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16090 ac_dC='\3'
16091 ac_dD='%g'
16092 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16093 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16094 ac_uB='\([      ]\)%\1#\2define\3'
16095 ac_uC=' '
16096 ac_uD='\4%g'
16097 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16098 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16099 ac_eB='$%\1#\2define\3'
16100 ac_eC=' '
16101 ac_eD='%g'
16102
16103 if test "${CONFIG_HEADERS+set}" != set; then
16104 EOF
16105 cat >> $CONFIG_STATUS <<EOF
16106   CONFIG_HEADERS="src/config.h lwlib/config.h"
16107 EOF
16108 cat >> $CONFIG_STATUS <<\EOF
16109 fi
16110 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16111   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16112   case "$ac_file" in
16113   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16114        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16115   *) ac_file_in="${ac_file}.in" ;;
16116   esac
16117
16118   echo creating $ac_file
16119
16120   rm -f conftest.frag conftest.in conftest.out
16121   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16122   cat $ac_file_inputs > conftest.in
16123
16124 EOF
16125
16126 # Transform confdefs.h into a sed script conftest.vals that substitutes
16127 # the proper values into config.h.in to produce config.h.  And first:
16128 # Protect against being on the right side of a sed subst in config.status.
16129 # Protect against being in an unquoted here document in config.status.
16130 rm -f conftest.vals
16131 cat > conftest.hdr <<\EOF
16132 s/[\\&%]/\\&/g
16133 s%[\\$`]%\\&%g
16134 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16135 s%ac_d%ac_u%gp
16136 s%ac_u%ac_e%gp
16137 EOF
16138 sed -n -f conftest.hdr confdefs.h > conftest.vals
16139 rm -f conftest.hdr
16140
16141 # This sed command replaces #undef with comments.  This is necessary, for
16142 # example, in the case of _POSIX_SOURCE, which is predefined and required
16143 # on some systems where configure will not decide to define it.
16144 cat >> conftest.vals <<\EOF
16145 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16146 EOF
16147
16148 # Break up conftest.vals because some shells have a limit on
16149 # the size of here documents, and old seds have small limits too.
16150
16151 rm -f conftest.tail
16152 while :
16153 do
16154   ac_lines=`grep -c . conftest.vals`
16155   # grep -c gives empty output for an empty file on some AIX systems.
16156   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16157   # Write a limited-size here document to conftest.frag.
16158   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16159   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16160   echo 'CEOF
16161   sed -f conftest.frag conftest.in > conftest.out
16162   rm -f conftest.in
16163   mv conftest.out conftest.in
16164 ' >> $CONFIG_STATUS
16165   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16166   rm -f conftest.vals
16167   mv conftest.tail conftest.vals
16168 done
16169 rm -f conftest.vals
16170
16171 cat >> $CONFIG_STATUS <<\EOF
16172   rm -f conftest.frag conftest.h
16173   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16174   cat conftest.in >> conftest.h
16175   rm -f conftest.in
16176   if cmp -s $ac_file conftest.h 2>/dev/null; then
16177     echo "$ac_file is unchanged"
16178     rm -f conftest.h
16179   else
16180     # Remove last slash and all that follows it.  Not all systems have dirname.
16181       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16182       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16183       # The file is in a subdirectory.
16184       test ! -d "$ac_dir" && mkdir "$ac_dir"
16185     fi
16186     rm -f $ac_file
16187     mv conftest.h $ac_file
16188   fi
16189 fi; done
16190
16191 EOF
16192 cat >> $CONFIG_STATUS <<EOF
16193 CPP="$CPP"
16194  top_srcdir="$srcdir"
16195  MAKE_SUBDIR="$MAKE_SUBDIR"
16196
16197 EOF
16198 cat >> $CONFIG_STATUS <<\EOF
16199 for dir in . $MAKE_SUBDIR; do
16200   (
16201     cd $dir
16202     rm -f junk.c
16203     < Makefile.in \
16204       sed -e '/^# Generated/d' \
16205           -e 's%/\*\*/#.*%%' \
16206           -e 's/^ *# */#/' \
16207           -e '/^##/d' \
16208           -e '/^#/ {
16209 p
16210 d
16211 }'        \
16212           -e '/./ {
16213 s/\([\"]\)/\\\1/g
16214 s/^/"/
16215 s/$/"/
16216 }'  > junk.c;
16217
16218
16219
16220     echo creating $dir/Makefile
16221 $CPP -I. -I${top_srcdir}/src  junk.c \
16222   | sed -e 's/^\#.*//'          \
16223         -e 's/^[        ][      ]*$//'\
16224         -e 's/^ /       /'              \
16225         -e '/^[ \f]*$/d' \
16226         -e '/^\"/ {
16227         s/\\\([\"]\)/\1/g
16228         s/^[    ]*\"//
16229         s/\"[   ]*$//
16230 }' > Makefile.new
16231     chmod 444 Makefile.new
16232     mv -f Makefile.new Makefile
16233
16234     echo creating $dir/GNUmakefile
16235 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16236   | sed -e 's/^\#.*//'          \
16237         -e 's/^[        ][      ]*$//'\
16238         -e 's/^ /       /'              \
16239         -e '/^[ \f]*$/d' \
16240         -e '/^\"/ {
16241         s/\\\([\"]\)/\1/g
16242         s/^[    ]*\"//
16243         s/\"[   ]*$//
16244 }' > Makefile.new
16245     chmod 444 Makefile.new
16246     mv -f Makefile.new GNUmakefile
16247
16248     rm -f junk.c
16249   )
16250 done
16251
16252 sed < config.status >> lib-src/config.values \
16253   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16254   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16255   -e 's/^\([^ ]*\) $/\1 ""/' \
16256   -e 's/ 1$/ t/'
16257
16258
16259 exit 0
16260 EOF
16261 chmod +x $CONFIG_STATUS
16262 rm -fr confdefs* $ac_clean_files
16263 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1