XEmacs 21.4.8 "Honest Recruiter".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19 ### Note: this script has not yet been ported to autoconf version 2.5x.
20
21 ### This file is part of XEmacs.
22
23 ### XEmacs is free software; you can redistribute it and/or modify it
24 ### under the terms of the GNU General Public License as published by
25 ### the Free Software Foundation; either version 2, or (at your
26 ### option) any later version.
27
28 ### XEmacs is distributed in the hope that it will be useful, but
29 ### WITHOUT ANY WARRANTY; without even the implied warranty of
30 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
31 ### General Public License for more details.
32
33 ### You should have received a copy of the GNU General Public License
34 ### along with XEmacs; see the file COPYING.  If not, write to the Free
35 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
36 ### 02111-1307, USA.
37
38 ### For usage, run `./configure --help'
39 ### For more detailed information on building and installing XEmacs,
40 ### read the file `INSTALL'.
41 ###
42 ### If configure succeeds, it leaves its status in config.status.
43 ### A log of configuration tests can be found in config.log.
44 ### If configure fails after disturbing the status quo,
45 ###     config.status is removed.
46
47 ac_help="$ac_help
48   --with-x                use the X Window System"
49
50
51
52 if test -n "$ZSH_VERSION"; then
53     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
54   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
55   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
56   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
57       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
58 elif test -n "$BASH_VERSION"; then
59     set -o posix
60   unset CDPATH
61 else
62   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
63 fi
64
65 exec_prefix=NONE
66 host=NONE
67 no_create=
68 nonopt=NONE
69 no_recursion=
70 prefix=NONE
71 program_prefix=NONE
72 program_suffix=NONE
73 program_transform_name=s,x,x,
74 silent=
75 site=
76 srcdir=
77 target=NONE
78 verbose=
79 x_includes=NONE
80 x_libraries=NONE
81
82 subdirs=
83 MFLAGS= MAKEFLAGS=
84 SHELL=${CONFIG_SHELL-/bin/sh}
85 ac_max_here_lines=12
86
87 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
88
89 # File descriptor usage:
90 # 0 standard input
91 # 1 file creation
92 # 2 errors and warnings
93 # 3 some systems may open it to /dev/tty
94 # 4 used on the Kubota Titan
95 # 6 checking for... messages and results
96 # 5 compiler messages saved in config.log
97 if test "$silent" = yes; then
98   exec 6>/dev/null
99 else
100   exec 6>&1
101 fi
102 exec 5>./config.log
103
104 echo "\
105 This file contains any messages produced by compilers while
106 running configure, to aid debugging if configure makes a mistake.
107 " 1>&5
108
109 # Strip out --no-create and --no-recursion so they do not pile up.
110 # Also quote any args containing shell metacharacters.
111 ac_configure_args=
112 for ac_arg
113 do
114   case "$ac_arg" in
115   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
116   | --no-cr | --no-c) ;;
117   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
118   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
119   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
120   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
121   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
122   esac
123 done
124
125 # NLS nuisances.
126 # Only set these to C if already set.  These must not be set unconditionally
127 # because not all systems understand e.g. LANG=C (notably SCO).
128 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
129 # Non-C LC_CTYPE values break the ctype check.
130 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
131 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
132 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
133 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
134
135 # confdefs.h avoids OS command line length limits that DEFS can exceed.
136 rm -rf conftest* confdefs.h
137 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
138 echo > confdefs.h
139
140 # A filename unique to this package, relative to the directory that
141 # configure is in, which we can look for to find out if srcdir is correct.
142 ac_unique_file=src/lisp.h
143
144 # Find the source files, if location was not specified.
145 if test -z "$srcdir"; then
146   ac_srcdir_defaulted=yes
147   # Try the directory containing this script, then its parent.
148   ac_prog=$0
149   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
150   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
151   srcdir=$ac_confdir
152   if test ! -r $srcdir/$ac_unique_file; then
153     srcdir=..
154   fi
155 else
156   ac_srcdir_defaulted=no
157 fi
158 if test ! -r $srcdir/$ac_unique_file; then
159   if test "$ac_srcdir_defaulted" = yes; then
160     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
161   else
162     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
163   fi
164 fi
165 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
166
167 # Prefer explicitly selected file to automatically selected ones.
168 if test -z "$CONFIG_SITE"; then
169   if test "x$prefix" != xNONE; then
170     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
171   else
172     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
173   fi
174 fi
175 for ac_site_file in $CONFIG_SITE; do
176   if test -r "$ac_site_file"; then
177     echo "loading site script $ac_site_file"
178     . "$ac_site_file"
179   fi
180 done
181
182
183 ac_ext=c
184 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
185 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
186 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
187 ac_cpp='$CPP '"$xe_cppflags"
188 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
189 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
190 cross_compiling=no
191
192 ac_exeext=
193 ac_objext=o
194 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
195   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
196   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
197     ac_n= ac_c='
198 ' ac_t='        '
199   else
200     ac_n=-n ac_c= ac_t=
201   fi
202 else
203   ac_n= ac_c='\c' ac_t=
204 fi
205
206
207 progname="`echo $0 | sed 's:^\./\./:\./:'`"
208
209
210 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
211 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
212
213 prefix='/usr/local'
214 exec_prefix='${prefix}'
215 bindir='${exec_prefix}/bin'
216 datadir='${prefix}/lib'
217 statedir='${prefix}/lib'
218 libdir='${exec_prefix}/lib'
219 mandir='${prefix}/man/man1'
220 inststaticdir='${PROGNAME}'
221 instvardir='${PROGNAME}-${version}'
222 infodir='${datadir}/${instvardir}/info'
223 infopath=''
224 install_pp=''
225 lispdir='${datadir}/${instvardir}/lisp'
226 moduledir='${libdir}/${instvardir}/${configuration}/modules'
227 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
228 sitemoduledir='${libdir}/${inststaticdir}/site-modules'
229 pkgdir='${datadir}/${instvardir}/lisp'
230 package_path=''
231 etcdir='${datadir}/${instvardir}/etc'
232 archlibdir='${libdir}/${instvardir}/${configuration}'
233 docdir='${archlibdir}'
234 with_netinstall="no"
235 with_prefix='yes'
236 with_site_lisp='no'
237 with_site_modules='yes'
238 with_menubars=''
239 with_scrollbars=''
240 with_widgets=''
241 with_dialogs=''
242 with_file_coding=''
243 cpp='' cppflags='' libs='' ldflags=''
244 extra_includes=''
245 dynamic=''
246 with_x11=''
247 with_msw=''
248 rel_alloc='default'
249 with_system_malloc='default'
250 with_dlmalloc='default'
251 with_esd_sound='no'
252 native_sound_lib=''
253 with_gtk='no'
254 with_gnome='no'
255 use_assertions="yes"
256 with_toolbars=""
257 with_tty=""
258 use_union_type="no"
259 with_dnet=""
260 pdump="no"
261 with_dragndrop="no"
262 with_ipv6_cname="no"
263
264
265
266
267 arguments="$@"
268
269 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
270 quoted_arguments=
271 for i in "$@"; do
272    case "$i" in
273    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
274    | --no-cr | --no-c) ;;
275    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
276    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
277    *)
278    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
279    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
280    esac
281 done
282
283 while test $# != 0; do
284   arg="$1"; shift
285   case "$arg" in
286     --no-create|--no-recursion) ;;
287         -* )
288             case "$arg" in
289         -*=*)
290           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
291           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
292           valomitted=no
293         ;;
294                                                                           -*)
295                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
296           val="yes" valomitted=yes
297         ;;
298       esac
299
300             optname="$opt"
301       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
302
303             case "${valomitted}-${opt}" in yes-without_* )
304         opt=`echo $opt | sed 's/without/with/'`
305         valomitted="no" val="no" ;;
306       esac
307
308             case "$opt" in
309
310         with_site_lisp  | \
311         with_prefix     | \
312         with_site_modules | \
313         with_x          | \
314         with_x11        | \
315         with_gtk        | \
316         with_gnome      | \
317         with_msw        | \
318         with_gcc        | \
319         dynamic         | \
320         with_ncurses    | \
321         with_dnet       | \
322         with_socks      | \
323         with_dragndrop  | \
324         with_cde        | \
325         with_offix      | \
326         with_gpm        | \
327         with_xpm        | \
328         with_xface      | \
329         with_gif        | \
330         with_jpeg       | \
331         with_png        | \
332         with_tiff       | \
333         with_wmcommand  | \
334         with_xmu        | \
335         with_purify     | \
336         with_quantify   | \
337         with_toolbars   | \
338         with_tty        | \
339         with_xfs        | \
340         with_i18n3      | \
341         with_mule       | \
342         with_file_coding| \
343         with_canna      | \
344         with_wnn        | \
345         with_wnn6       | \
346         with_workshop   | \
347         with_sparcworks | \
348         with_tooltalk   | \
349         with_ldap       | \
350         with_postgresql | \
351         with_pop        | \
352         with_kerberos   | \
353         with_hesiod     | \
354         with_dnet       | \
355         with_infodock   | \
356         with_netinstall | \
357         with_ipv6_cname | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         quick_build )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 Option \`all' or \`none' must be first in the list.
474 The default is to autodetect native and NAS sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               glyphs )     error_check_glyphs=yes ;;
555               noglyphs )   error_check_glyphs=no ;;
556
557               * ) bogus_error_check=yes ;;
558             esac
559             if test "$bogus_error_check" -o \
560                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
561                 if test "$error_check_default" = yes ; then
562                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
563                 else
564                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
565                 fi
566                 (echo "$progname: Usage error:"
567 echo " " "Valid types for the \`--$optname' option are:
568   $types."
569 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
570             elif test -n "$new_default" ; then
571                 error_check_extents=$new_default
572                 error_check_typecheck=$new_default
573                 error_check_bufpos=$new_default
574                 error_check_gc=$new_default
575                 error_check_malloc=$new_default
576                 error_check_byte_code=$new_default
577                 error_check_glyphs=$new_default
578                 new_default=    # reset this
579             fi
580             echeck_notfirst=true
581           done
582         ;;
583
584                                 
585                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
586         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
587         archlibdir | docdir | package_path | moduledir )
588                    if test "$valomitted" = "yes"; then
589              if test "$#" = 0; then
590                  (echo "$progname: Usage error:"
591 echo " " "The \`--$optname' option requires a value."
592 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
593              fi
594              val="$1"; shift
595            fi
596            eval "$opt=\"$val\""
597
598                            case "$opt" in
599                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
600     Defining EXEC_PREFIX_USER_DEFINED
601 EOF
602 cat >> confdefs.h <<\EOF
603 #define EXEC_PREFIX_USER_DEFINED 1
604 EOF
605 }
606  ;;
607              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
608     Defining LISPDIR_USER_DEFINED
609 EOF
610 cat >> confdefs.h <<\EOF
611 #define LISPDIR_USER_DEFINED 1
612 EOF
613 }
614  ;;
615              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
616     Defining SITELISPDIR_USER_DEFINED
617 EOF
618 cat >> confdefs.h <<\EOF
619 #define SITELISPDIR_USER_DEFINED 1
620 EOF
621 }
622  ;;
623              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
624     Defining MODULEDIR_USER_DEFINED
625 EOF
626 cat >> confdefs.h <<\EOF
627 #define MODULEDIR_USER_DEFINED 1
628 EOF
629 }
630  ;;
631              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
632     Defining ETCDIR_USER_DEFINED
633 EOF
634 cat >> confdefs.h <<\EOF
635 #define ETCDIR_USER_DEFINED 1
636 EOF
637 }
638  ;;
639              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
640     Defining INFODIR_USER_DEFINED
641 EOF
642 cat >> confdefs.h <<\EOF
643 #define INFODIR_USER_DEFINED 1
644 EOF
645 }
646  ;;
647              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
648     Defining INFOPATH_USER_DEFINED
649 EOF
650 cat >> confdefs.h <<\EOF
651 #define INFOPATH_USER_DEFINED 1
652 EOF
653 }
654  ;;
655              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining PACKAGE_PATH_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define PACKAGE_PATH_USER_DEFINED 1
660 EOF
661 }
662  ;;
663              datadir )
664                 { test "$extra_verbose" = "yes" && cat << \EOF
665     Defining INFODIR_USER_DEFINED
666 EOF
667 cat >> confdefs.h <<\EOF
668 #define INFODIR_USER_DEFINED 1
669 EOF
670 }
671
672                 { test "$extra_verbose" = "yes" && cat << \EOF
673     Defining LISPDIR_USER_DEFINED
674 EOF
675 cat >> confdefs.h <<\EOF
676 #define LISPDIR_USER_DEFINED 1
677 EOF
678 }
679
680                 { test "$extra_verbose" = "yes" && cat << \EOF
681     Defining MODULEDIR_USER_DEFINED
682 EOF
683 cat >> confdefs.h <<\EOF
684 #define MODULEDIR_USER_DEFINED 1
685 EOF
686 }
687
688                 { test "$extra_verbose" = "yes" && cat << \EOF
689     Defining ETCDIR_USER_DEFINED
690 EOF
691 cat >> confdefs.h <<\EOF
692 #define ETCDIR_USER_DEFINED 1
693 EOF
694 }
695
696                 { test "$extra_verbose" = "yes" && cat << \EOF
697     Defining DOCDIR_USER_DEFINED
698 EOF
699 cat >> confdefs.h <<\EOF
700 #define DOCDIR_USER_DEFINED 1
701 EOF
702 }
703
704                 { test "$extra_verbose" = "yes" && cat << \EOF
705     Defining ARCHLIBDIR_USER_DEFINED
706 EOF
707 cat >> confdefs.h <<\EOF
708 #define ARCHLIBDIR_USER_DEFINED 1
709 EOF
710 }
711  ;;
712              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
713     Defining DOCDIR_USER_DEFINED
714 EOF
715 cat >> confdefs.h <<\EOF
716 #define DOCDIR_USER_DEFINED 1
717 EOF
718 }
719  ;;
720              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
721     Defining ARCHLIBDIR_USER_DEFINED
722 EOF
723 cat >> confdefs.h <<\EOF
724 #define ARCHLIBDIR_USER_DEFINED 1
725 EOF
726 }
727  ;;
728            esac
729         ;;
730
731                 "no_create" ) ;;
732
733                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
734
735                 "with_menubars"   | \
736         "with_scrollbars" | \
737         "with_dialogs"    | \
738         "with_widgets" )
739           case "$val" in
740             l | lu | luc | luci | lucid )               val=lucid  ;;
741             mo | mot | moti | motif )                   val=motif  ;;
742             a | at | ath | athe | athen | athena )      val=athena ;;
743             n | no | non | none )                       val=no     ;;
744             y | ye | yes )                              val=yes    ;;
745                         "")                                             val=yes    ;;
746             g | gt | gtk )                              val=gtk    ;;
747             ms | msw )                                  val=msw    ;;
748             * ) (echo "$progname: Usage error:"
749 echo " " "The \`--$optname' option must have one of these values:
750   \`gtk', \`lucid', \`motif', \`athena', \`yes', or \`no'."
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752           esac
753           eval "$opt=\"$val\""
754         ;;
755
756                 "use_minimal_tagbits" | \
757         "use_indexed_lrecord_implementation" | \
758         "run_in_place"  | \
759         "const_is_losing" | \
760         "with_gnu_make" )
761           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
762         ;;
763
764                 * ) (echo "$progname: Usage error:"
765 echo " " "Unrecognized option: $arg"
766 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
767
768       esac
769     ;;
770
771         *-*-*) configuration="$arg" ;;
772
773         *) (echo "$progname: Usage error:"
774 echo " " "Unrecognized argument: $arg"
775 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
776
777   esac
778 done
779
780
781 test -n "$cpp"      && CPP="$cpp"
782 test -n "$cppflags" && CPPFLAGS="$cppflags"
783 test -n "$libs"     && LIBS="$libs"
784 test -n "$ldflags"  && LDFLAGS="$ldflags"
785
786 eval set x "$quoted_arguments"; shift
787
788 test "$extra_verbose" = "yes" && verbose=yes
789
790 test -n "$with_x" && with_x11="$with_x"
791
792 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
793   test "$with_system_malloc" = "default" && with_system_malloc=yes
794 fi
795
796
797
798 if test "$with_cde $with_tooltalk" = "yes no"; then
799   (echo "$progname: Usage error:"
800 echo " " "--with-cde requires --with-tooltalk"
801 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
802 elif test "$with_tooltalk" = "no" ; then with_cde=no
803 elif test "$with_cde" = "yes"; then with_tooltalk=yes
804 fi
805
806
807 case "$srcdir" in
808
809     "" )
810     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
811       if test -f "$dir/src/lisp.h" -a \
812               -f "$dir/lisp/version.el" ; then
813         srcdir="$dir"
814         break
815       fi
816     done
817     if test -z "$srcdir" ; then
818       (echo "$progname: Usage error:"
819 echo " " "Neither the current directory nor its parent seem to
820   contain the XEmacs sources.  If you do not want to build XEmacs in its
821   source tree, you should run \`$progname' in the directory in which
822   you wish to build XEmacs, using the \`--srcdir' option to say where the
823   sources may be found."
824 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
825     fi
826   ;;
827
828     * )
829     if test ! -f "$srcdir/src/lisp.h" -o \
830             ! -f "$srcdir/lisp/version.el" ; then
831       (echo "$progname: Usage error:"
832 echo " " "The directory specified with the \`--srcdir' option,
833   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
834   either run the \`$progname' script at the top of the XEmacs source
835   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837     fi
838   ;;
839 esac
840
841 if test -z "$configuration"; then
842     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
843   if test -z "$configuration"; then
844     (echo "$progname: Usage error:"
845 echo " " "XEmacs has not been ported to this host type.
846 Try explicitly specifying the CONFIGURATION when rerunning configure."
847 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
848   fi
849 fi
850
851 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
852 echo "configure:853: checking whether ln -s works" >&5
853
854 rm -f conftestdata
855 if ln -s X conftestdata 2>/dev/null
856 then
857   rm -f conftestdata
858   ac_cv_prog_LN_S="ln -s"
859 else
860   ac_cv_prog_LN_S=ln
861 fi
862 LN_S="$ac_cv_prog_LN_S"
863 if test "$ac_cv_prog_LN_S" = "ln -s"; then
864   echo "$ac_t""yes" 1>&6
865 else
866   echo "$ac_t""no" 1>&6
867 fi
868
869
870 for dir in lisp etc man info tests; do
871   if test ! -d "$dir" ; then
872     echo Making symbolic link to "$srcdir/$dir"
873     ${LN_S} "$srcdir/$dir" "$dir"
874   fi
875 done
876
877
878 absolute_pwd="`pwd`";
879 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
880 then blddir="$PWD"
881 else blddir="$absolute_pwd"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   blddir=`echo "$blddir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi
886 fi
887
888
889 case "$srcdir" in
890   /* ) ;;
891   .  ) srcdir="$blddir" ;;
892   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
893   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
894   srcdir=`echo "$srcdir" | \
895    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
896 fi ;;
897 esac
898
899 if test `pwd` != `sh -c cd $srcdir && pwd`  \
900    && test -f "$srcdir/src/config.h"; then
901   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
902    echo "   as a build directory right now; it has been configured in its own"
903    echo "   right.  To configure in another directory as well, you MUST"
904    echo "   use GNU make.  If you do not have GNU make, then you must"
905    echo "   now do \`make distclean' in $srcdir,"
906    echo "   and then run $progname again.") >&2
907   extrasub='/^VPATH[     ]*=/c\
908 vpath %.c $(srcdir)\
909 vpath %.h $(srcdir)\
910 vpath %.y $(srcdir)\
911 vpath %.l $(srcdir)\
912 vpath %.s $(srcdir)\
913 vpath %.in $(srcdir)'
914 fi
915
916 . "$srcdir/version.sh" || exit 1;
917 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
918 : "${extra_verbose=$beta}"
919 version="${emacs_major_version}.${emacs_minor_version}"
920 { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_MAJOR_VERSION = $emacs_major_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_MAJOR_VERSION $emacs_major_version
925 EOF
926 }
927
928 { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_MINOR_VERSION = $emacs_minor_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_MINOR_VERSION $emacs_minor_version
933 EOF
934 }
935
936 if test -n "$emacs_beta_version" ; then
937   if test "$beta" = "yes"; then
938         version="${version}-b${emacs_beta_version}"
939         { test "$extra_verbose" = "yes" && cat << EOF
940     Defining EMACS_BETA_VERSION = $emacs_beta_version
941 EOF
942 cat >> confdefs.h <<EOF
943 #define EMACS_BETA_VERSION $emacs_beta_version
944 EOF
945 }
946
947   else
948         version="${version}.${emacs_beta_version}"
949         { test "$extra_verbose" = "yes" && cat << EOF
950     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
951 EOF
952 cat >> confdefs.h <<EOF
953 #define EMACS_PATCH_LEVEL $emacs_beta_version
954 EOF
955 }
956
957   fi
958 fi
959 { test "$extra_verbose" = "yes" && cat << EOF
960     Defining XEMACS_CODENAME = "$xemacs_codename"
961 EOF
962 cat >> confdefs.h <<EOF
963 #define XEMACS_CODENAME "$xemacs_codename"
964 EOF
965 }
966
967 { test "$extra_verbose" = "yes" && cat << EOF
968     Defining EMACS_VERSION = "$version"
969 EOF
970 cat >> confdefs.h <<EOF
971 #define EMACS_VERSION "$version"
972 EOF
973 }
974
975
976 if test "$with_infodock" = "yes"; then
977   if test ! -f ../../ID-INSTALL; then
978     echo "Cannot build InfoDock without InfoDock sources"
979     with_infodock=no
980   fi
981 fi
982
983 if test "$with_infodock" = "yes"; then
984       { test "$extra_verbose" = "yes" && cat << EOF
985     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
986 EOF
987 cat >> confdefs.h <<EOF
988 #define INFODOCK_MAJOR_VERSION $infodock_major_version
989 EOF
990 }
991
992   { test "$extra_verbose" = "yes" && cat << EOF
993     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
994 EOF
995 cat >> confdefs.h <<EOF
996 #define INFODOCK_MINOR_VERSION $infodock_minor_version
997 EOF
998 }
999
1000   { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define INFODOCK_BUILD_VERSION $infodock_build_version
1005 EOF
1006 }
1007
1008   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1009   PROGNAME=infodock
1010   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1011 else
1012   PROGNAME=xemacs
1013 fi
1014
1015 { test "$extra_verbose" = "yes" && cat << EOF
1016     Defining EMACS_PROGNAME = "$PROGNAME"
1017 EOF
1018 cat >> confdefs.h <<EOF
1019 #define EMACS_PROGNAME "$PROGNAME"
1020 EOF
1021 }
1022
1023
1024 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1025 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1026     Defining ERROR_CHECK_EXTENTS
1027 EOF
1028 cat >> confdefs.h <<\EOF
1029 #define ERROR_CHECK_EXTENTS 1
1030 EOF
1031 }
1032
1033 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1034     Defining ERROR_CHECK_TYPECHECK
1035 EOF
1036 cat >> confdefs.h <<\EOF
1037 #define ERROR_CHECK_TYPECHECK 1
1038 EOF
1039 }
1040
1041 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1042     Defining ERROR_CHECK_BUFPOS
1043 EOF
1044 cat >> confdefs.h <<\EOF
1045 #define ERROR_CHECK_BUFPOS 1
1046 EOF
1047 }
1048
1049 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1050     Defining ERROR_CHECK_GC
1051 EOF
1052 cat >> confdefs.h <<\EOF
1053 #define ERROR_CHECK_GC 1
1054 EOF
1055 }
1056
1057 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1058     Defining ERROR_CHECK_MALLOC
1059 EOF
1060 cat >> confdefs.h <<\EOF
1061 #define ERROR_CHECK_MALLOC 1
1062 EOF
1063 }
1064
1065 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1066     Defining ERROR_CHECK_BYTE_CODE
1067 EOF
1068 cat >> confdefs.h <<\EOF
1069 #define ERROR_CHECK_BYTE_CODE 1
1070 EOF
1071 }
1072
1073 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1074     Defining ERROR_CHECK_GLYPHS
1075 EOF
1076 cat >> confdefs.h <<\EOF
1077 #define ERROR_CHECK_GLYPHS 1
1078 EOF
1079 }
1080
1081 if test "${debug:=$beta}" = "yes"; then
1082   use_assertions=yes memory_usage_stats=yes
1083   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1084    echo "    xemacs will be linked with \"debug.o\""
1085  fi
1086   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1087    echo "    xemacs will be linked with \"tests.o\""
1088  fi
1089   { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining DEBUG_XEMACS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define DEBUG_XEMACS 1
1094 EOF
1095 }
1096
1097 fi
1098 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1099     Defining USE_ASSERTIONS
1100 EOF
1101 cat >> confdefs.h <<\EOF
1102 #define USE_ASSERTIONS 1
1103 EOF
1104 }
1105
1106 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1107     Defining MEMORY_USAGE_STATS
1108 EOF
1109 cat >> confdefs.h <<\EOF
1110 #define MEMORY_USAGE_STATS 1
1111 EOF
1112 }
1113
1114
1115
1116 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1117 echo "configure:1118: checking "host system type"" >&5
1118 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1119 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1120 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1121 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1122 echo "$ac_t""$configuration" 1>&6
1123
1124
1125
1126
1127
1128 machine='' opsys=''
1129
1130 case "$canonical" in
1131   sparc-*-*        ) machine=sparc ;;
1132   alpha*-*-*       ) machine=alpha ;;
1133   vax-*-*          ) machine=vax ;;
1134   mips-dec-*       ) machine=pmax ;;
1135   mips-sgi-irix6*  ) machine=iris6d ;;
1136   mips-sgi-*       ) machine=iris4d ;;
1137   mips*-linux      ) machine=mips ;;
1138   romp-ibm-*       ) machine=ibmrt ;;
1139   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1140   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1141   powerpc*-*       ) machine=powerpc ;;
1142   hppa-*-*         ) machine=hp800 ;;
1143   m88k-dg-*        ) machine=aviion ;;
1144   m68*-sony-*      ) machine=news ;;
1145   mips-sony-*      ) machine=news-risc ;;
1146   clipper-*        ) machine=clipper ;;
1147   arm*             ) machine=arm ;;
1148   ns32k-*          ) machine=ns32000 ;;
1149 esac
1150
1151 case "$canonical" in
1152   *-*-linux*    ) opsys=linux ;;
1153   *-*-netbsd*   ) opsys=netbsd ;;
1154   *-*-openbsd*  ) opsys=openbsd ;;
1155   *-*-nextstep* ) opsys=nextstep ;;
1156   *-*-vms       ) opsys=vms ;;
1157
1158     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1159   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1160   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1161   *-dec-osf3*                ) opsys=decosf3-1 ;;
1162   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1163
1164     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1165   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1166   *-*-ultrix* )         opsys=ultrix4-3 ;;
1167
1168     *-*-aix3.1*  ) opsys=aix3-1 ;;
1169   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1170   *-*-aix3*    ) opsys=aix3-2   ;;
1171   *-*-aix4.0*  ) opsys=aix4     ;;
1172   *-*-aix4.1*  ) opsys=aix4-1   ;;
1173   *-*-aix4*    ) opsys=aix4-2   ;;
1174
1175     *-gnu* )                    opsys=gnu    ;;
1176   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1177   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1178   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1179   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1180   *-*-aos*   )                  opsys=bsd4-3 ;;
1181   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1182   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1183   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1184   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1185   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1186   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1187         if test -z "$NON_GNU_CPP" ; then
1188           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1189             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1190           done
1191         fi
1192         opsys=usg5-4-2 ;;
1193     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1194     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1195 esac
1196
1197 case "$canonical" in
1198
1199     *-*-netbsd* )
1200     case "$canonical" in
1201       i[3-9]86-*-netbsd*) machine=intel386 ;;
1202       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1203                                             machine=hp9000s300 ;;
1204       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1205       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1206     esac
1207   ;;
1208
1209     *-*-openbsd* )
1210     case "${canonical}" in
1211       i386-*-openbsd*)          machine=intel386 ;;
1212       m68k-*-openbsd*)          machine=hp9000s300 ;;
1213       mipsel-*-openbsd*)        machine=pmax ;;
1214      esac
1215    ;;
1216
1217     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1218   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1219
1220     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1221   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1222
1223     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1224
1225     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1226
1227     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1228
1229     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1230
1231     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1232
1233     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1234   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1235   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1236
1237   
1238     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1239
1240     *-convex-bsd* | *-convex-convexos* )
1241     machine=convex opsys=bsd4-3
1242     NON_GNU_CPP="cc -E -P"
1243   ;;
1244
1245     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1246
1247     *-*-darwin*)
1248     opsys=darwin
1249     RANLIB="ranlib -c"     pdump=yes              ;;
1250
1251     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1252   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1253   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1254   m88k-dg-dgux*                           ) opsys=dgux     ;;
1255
1256     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1257   m88k-motorola-sysv4* )
1258                     machine=delta88k opsys=usg5-4-2
1259   ;;
1260   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1261
1262     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1263   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1264
1265     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1266
1267     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1268   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1269   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1270
1271       m88k-harris-cxux* )
1272         case "`uname -r`" in
1273        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1274        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1275     esac
1276     NON_GNU_CPP="/lib/cpp"
1277   ;;
1278     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1279     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1280
1281     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1282
1283     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1284
1285     *-hp-hpux* )
1286         case "$canonical" in
1287       m68*  ) machine=hp9000s300 ;;
1288       hppa* ) machine=hp800      ;;
1289     esac
1290
1291     case "$canonical" in
1292       *-hp-hpux7*  )  opsys=hpux   ;;
1293       *-hp-hpux8*  )  opsys=hpux8  ;;
1294       *-hp-hpux9*  )  opsys=hpux9  ;;
1295       *-hp-hpux10* )  opsys=hpux10 ;;
1296       *-hp-hpux11* )  opsys=hpux11 ;;
1297       *            )  opsys=hpux   ;;
1298     esac
1299
1300         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1301    echo "    xemacs will be linked with \"strcat.o\""
1302  fi ;; esac
1303
1304     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1305         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1306     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1307
1308     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1309   ;;
1310
1311     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1312   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1313
1314     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1315   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1316   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1317   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1318   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1319   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1320
1321     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1322   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1323
1324     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1325
1326     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1327
1328     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1329
1330     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1331
1332       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1333
1334     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1335
1336     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1337
1338     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1339
1340     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1341
1342         mips-mips-usg* ) machine=mips4 ;;
1343   mips-mips-riscos4 )
1344     machine=mips4
1345     NON_GNU_CC="cc -systype bsd43"
1346     NON_GNU_CPP="cc -systype bsd43 -E"
1347     case "$canonical" in
1348       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1349       mips-mips-riscos5* ) opsys=riscos5 ;;
1350     esac
1351   ;;
1352   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1353   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1354
1355     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1356
1357     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1358
1359     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1360   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1361
1362     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1363
1364     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1365
1366     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1367
1368     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1369
1370     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1371   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1372
1373     mips-siemens-sysv* | mips-sni-sysv*)
1374     machine=mips-siemens opsys=usg5-4
1375     NON_GNU_CC=/usr/ccs/bin/cc
1376     NON_GNU_CPP=/usr/ccs/lib/cpp
1377   ;;
1378
1379     mips-nec-sysv*)
1380     machine=mips-nec
1381     NON_GNU_CC=/usr/ccs/bin/cc
1382     NON_GNU_CPP=/usr/ccs/lib/cpp
1383   ;;
1384
1385       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1386   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1387     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1388   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1389   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1390   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1391   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1392   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1393   mips-sgi-irix*      ) opsys=irix5-0 ;;
1394
1395     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1396   *-sony-news* ) opsys=newsos5 ;;
1397
1398     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1399
1400     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1401         case "$canonical" in
1402       m68*-sunos1* )             machine=sun1     ;;
1403       m68*-sunos2* )             machine=sun2     ;;
1404       m68* )                     machine=sun3     ;;
1405       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1406       i*86-*-* )                 machine=intel386 ;;
1407       rs6000* )                  machine=rs6000   ;;
1408     esac
1409
1410         case "$canonical" in *-sunos5*)
1411       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1412     esac
1413
1414                     case "$canonical" in
1415       *-sunos4* )
1416         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1417         : ;;
1418       *-solaris2* )
1419         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1420         RANLIB=':' ;;
1421     esac
1422
1423     case "$canonical" in
1424       *-solaris*          )
1425         opsys=sol2
1426         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1427         { test "$extra_verbose" = "yes" && cat << EOF
1428     Defining OS_RELEASE = $os_release
1429 EOF
1430 cat >> confdefs.h <<EOF
1431 #define OS_RELEASE $os_release
1432 EOF
1433 }
1434  ;;
1435
1436             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1437       *-sunos4.0*         ) opsys=sunos4-0      ;;
1438       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1439       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1440       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1441       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1442       *-mach*             ) opsys=mach-bsd4-3   ;;
1443       *                   ) opsys=bsd4-2        ;;
1444     esac
1445
1446     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1447
1448         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1449   ;;
1450
1451     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1452
1453     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1454   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1455
1456     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1457
1458     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1459
1460     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1461       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1462
1463     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1464
1465     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1466
1467     vax-dec-* )
1468     case "$canonical" in
1469       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1470       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1471       *-mach* )                         opsys=mach-bsd4-3 ;;
1472     esac
1473   ;;
1474
1475     ns16k-whitechapel-* ) machine=mg1 ;;
1476
1477     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1478
1479     i[3-9]86-*-* )
1480     machine=intel386
1481     case "$canonical" in
1482       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1483       *-isc2.2* )               opsys=isc2-2 ;;
1484       *-isc4.0* )               opsys=isc4-0 ;;
1485       *-isc4.* )                opsys=isc4-1
1486                                 GCC_TEST_OPTIONS=-posix
1487                                 NON_GCC_TEST_OPTIONS=-Xp
1488                                 ;;
1489       *-isc* )                  opsys=isc3-0 ;;
1490       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1491       *-esix* )                 opsys=esix ;;
1492       *-mach* )                 opsys=mach-bsd4-3 ;;
1493       *-xenix* )                opsys=xenix ;;
1494       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1495       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1496       *-bsdi4* )                opsys=bsdos4 ;;
1497       *-bsdi3* )                opsys=bsdos3 ;;
1498       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1499       *-bsdi2* )                opsys=bsdos2 ;;
1500       *-sco3.2v5* )             opsys=sco5 ;;
1501       *-sysv5* )                opsys=sco7 ;;
1502       *-386bsd* )               opsys=386bsd ;;
1503       *-freebsd* )              opsys=freebsd ;;
1504       *-nextstep* )             opsys=nextstep ;;
1505       *-pc-cygwin* )            opsys=cygwin32 ;;
1506       *-pc-mingw* )             opsys=mingw32 ;
1507                                 test -z "$with_tty" && with_tty="no";;
1508           esac
1509   ;;
1510
1511     m68k-*-linux* ) machine=m68k opsys=linux ;;
1512
1513 esac
1514
1515 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1516
1517 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1518
1519 if test -r "${srcdir}/src/m/${machine}.h"; then
1520   machfile="m/${machine}.h"
1521   { test "$extra_verbose" = "yes" && cat << EOF
1522     Defining config_machfile = "$machfile"
1523 EOF
1524 cat >> confdefs.h <<EOF
1525 #define config_machfile "$machfile"
1526 EOF
1527 }
1528
1529 else
1530   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1531   echo "Using configure-time autodetection only."
1532 fi
1533
1534 if test -r "${srcdir}/src/s/${opsys}.h"; then
1535   opsysfile="s/${opsys}.h"
1536   { test "$extra_verbose" = "yes" && cat << EOF
1537     Defining config_opsysfile = "$opsysfile"
1538 EOF
1539 cat >> confdefs.h <<EOF
1540 #define config_opsysfile "$opsysfile"
1541 EOF
1542 }
1543
1544 else
1545   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1546   echo "Using configure-time autodetection only."
1547 fi
1548
1549
1550 if test -z "$dynamic"; then
1551   case "$opsys" in
1552     hpux* | sunos4* ) dynamic=no ;;
1553     *) dynamic=yes ;;
1554   esac
1555 fi
1556 if test "$dynamic" = "yes"; then
1557   case "$opsys" in
1558     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1559     decosf* ) ld_call_shared="-call_shared" ;;
1560   esac
1561 else   case "$opsys" in
1562     sol2 )
1563       echo "Static linking is not supported on Solaris 2."
1564       echo "Rerun configure without specifying --dynamic=no."
1565       exit 1 ;;
1566     linux   ) ld_call_shared="-Bstatic" ;;
1567     decosf* ) ld_call_shared="-non_shared" ;;
1568   esac
1569 fi
1570
1571 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1572
1573 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1574 { test "$extra_verbose" = "yes" && cat << EOF
1575     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1576 EOF
1577 cat >> confdefs.h <<EOF
1578 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1579 EOF
1580 }
1581
1582
1583
1584 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1585 if test "$with_workshop $with_tooltalk" = "yes no"; then
1586   (echo "$progname: Usage error:"
1587 echo " " "--with-workshop requires --with-tooltalk"
1588 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1589 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1590 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1591 fi
1592
1593 if test "$with_workshop" = "yes"; then
1594   { test "$extra_verbose" = "yes" && cat << \EOF
1595     Defining SUNPRO
1596 EOF
1597 cat >> confdefs.h <<\EOF
1598 #define SUNPRO 1
1599 EOF
1600 }
1601
1602   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1603    echo "    xemacs will be linked with \"sunpro.o\""
1604  fi
1605 fi
1606
1607 if test "$with_clash_detection" != "no"; then
1608   { test "$extra_verbose" = "yes" && cat << \EOF
1609     Defining CLASH_DETECTION
1610 EOF
1611 cat >> confdefs.h <<\EOF
1612 #define CLASH_DETECTION 1
1613 EOF
1614 }
1615
1616   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1617    echo "    xemacs will be linked with \"filelock.o\""
1618  fi
1619 fi
1620
1621 test -n "$compiler" && CC="$compiler"
1622 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1623 fi
1624
1625 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1626 if test "${CFLAGS-unset}" != unset
1627   then cflags_specified=yes;
1628   else cflags_specified=no;
1629 fi
1630
1631 xe_save_CFLAGS="$CFLAGS"
1632
1633 # Extract the first word of "gcc", so it can be a program name with args.
1634 set dummy gcc; ac_word=$2
1635 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1636 echo "configure:1637: checking for $ac_word" >&5
1637
1638 if test -n "$CC"; then
1639   ac_cv_prog_CC="$CC" # Let the user override the test.
1640 else
1641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1642   ac_dummy="$PATH"
1643   for ac_dir in $ac_dummy; do
1644     test -z "$ac_dir" && ac_dir=.
1645     if test -f $ac_dir/$ac_word; then
1646       ac_cv_prog_CC="gcc"
1647       break
1648     fi
1649   done
1650   IFS="$ac_save_ifs"
1651 fi
1652 CC="$ac_cv_prog_CC"
1653 if test -n "$CC"; then
1654   echo "$ac_t""$CC" 1>&6
1655 else
1656   echo "$ac_t""no" 1>&6
1657 fi
1658
1659 if test -z "$CC"; then
1660   # Extract the first word of "cc", so it can be a program name with args.
1661 set dummy cc; ac_word=$2
1662 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1663 echo "configure:1664: checking for $ac_word" >&5
1664
1665 if test -n "$CC"; then
1666   ac_cv_prog_CC="$CC" # Let the user override the test.
1667 else
1668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1669   ac_prog_rejected=no
1670   ac_dummy="$PATH"
1671   for ac_dir in $ac_dummy; do
1672     test -z "$ac_dir" && ac_dir=.
1673     if test -f $ac_dir/$ac_word; then
1674       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1675         ac_prog_rejected=yes
1676         continue
1677       fi
1678       ac_cv_prog_CC="cc"
1679       break
1680     fi
1681   done
1682   IFS="$ac_save_ifs"
1683 if test $ac_prog_rejected = yes; then
1684   # We found a bogon in the path, so make sure we never use it.
1685   set dummy $ac_cv_prog_CC
1686   shift
1687   if test $# -gt 0; then
1688     # We chose a different compiler from the bogus one.
1689     # However, it has the same basename, so the bogon will be chosen
1690     # first if we set CC to just the basename; use the full file name.
1691     shift
1692     set dummy "$ac_dir/$ac_word" "$@"
1693     shift
1694     ac_cv_prog_CC="$@"
1695   fi
1696 fi
1697 fi
1698 CC="$ac_cv_prog_CC"
1699 if test -n "$CC"; then
1700   echo "$ac_t""$CC" 1>&6
1701 else
1702   echo "$ac_t""no" 1>&6
1703 fi
1704
1705   if test -z "$CC"; then
1706     case "`uname -s`" in
1707     *win32* | *WIN32*)
1708       # Extract the first word of "cl", so it can be a program name with args.
1709 set dummy cl; ac_word=$2
1710 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1711 echo "configure:1712: checking for $ac_word" >&5
1712
1713 if test -n "$CC"; then
1714   ac_cv_prog_CC="$CC" # Let the user override the test.
1715 else
1716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1717   ac_dummy="$PATH"
1718   for ac_dir in $ac_dummy; do
1719     test -z "$ac_dir" && ac_dir=.
1720     if test -f $ac_dir/$ac_word; then
1721       ac_cv_prog_CC="cl"
1722       break
1723     fi
1724   done
1725   IFS="$ac_save_ifs"
1726 fi
1727 CC="$ac_cv_prog_CC"
1728 if test -n "$CC"; then
1729   echo "$ac_t""$CC" 1>&6
1730 else
1731   echo "$ac_t""no" 1>&6
1732 fi
1733  ;;
1734     esac
1735   fi
1736   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1737 fi
1738
1739 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1740 echo "configure:1741: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1741
1742 ac_ext=c
1743 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1744 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1745 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1746 ac_cpp='$CPP '"$xe_cppflags"
1747 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1748 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1749 cross_compiling=no
1750
1751 cat > conftest.$ac_ext << EOF
1752
1753 #line 1754 "configure"
1754 #include "confdefs.h"
1755
1756 main(){return(0);}
1757 EOF
1758 if { (eval echo configure:1759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1759   ac_cv_prog_cc_works=yes
1760   # If we can't run a trivial program, we are probably using a cross compiler.
1761   if (./conftest; exit) 2>/dev/null; then
1762     ac_cv_prog_cc_cross=no
1763   else
1764     ac_cv_prog_cc_cross=yes
1765   fi
1766 else
1767   echo "configure: failed program was:" >&5
1768   cat conftest.$ac_ext >&5
1769   ac_cv_prog_cc_works=no
1770 fi
1771 rm -fr conftest*
1772 ac_ext=c
1773 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1774 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1775 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1776 ac_cpp='$CPP '"$xe_cppflags"
1777 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1778 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1779 cross_compiling=no
1780
1781 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1782 if test $ac_cv_prog_cc_works = no; then
1783   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1784 fi
1785 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1786 echo "configure:1787: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1787 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1788 cross_compiling=$ac_cv_prog_cc_cross
1789
1790 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1791 echo "configure:1792: checking whether we are using GNU C" >&5
1792
1793 cat > conftest.c <<EOF
1794 #ifdef __GNUC__
1795   yes;
1796 #endif
1797 EOF
1798 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1799   ac_cv_prog_gcc=yes
1800 else
1801   ac_cv_prog_gcc=no
1802 fi
1803
1804 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1805
1806 if test $ac_cv_prog_gcc = yes; then
1807   GCC=yes
1808 else
1809   GCC=
1810 fi
1811
1812 ac_test_CFLAGS="${CFLAGS+set}"
1813 ac_save_CFLAGS="$CFLAGS"
1814 CFLAGS=
1815 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1816 echo "configure:1817: checking whether ${CC-cc} accepts -g" >&5
1817
1818 echo 'void f(){}' > conftest.c
1819 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1820   ac_cv_prog_cc_g=yes
1821 else
1822   ac_cv_prog_cc_g=no
1823 fi
1824 rm -f conftest*
1825
1826
1827 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1828 if test "$ac_test_CFLAGS" = set; then
1829   CFLAGS="$ac_save_CFLAGS"
1830 elif test $ac_cv_prog_cc_g = yes; then
1831   if test "$GCC" = yes; then
1832     CFLAGS="-g -O2"
1833   else
1834     CFLAGS="-g"
1835   fi
1836 else
1837   if test "$GCC" = yes; then
1838     CFLAGS="-O2"
1839   else
1840     CFLAGS=
1841   fi
1842 fi
1843  
1844 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1845   CC=${NON_GNU_CC-cc}
1846   # Extract the first word of "gcc", so it can be a program name with args.
1847 set dummy gcc; ac_word=$2
1848 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1849 echo "configure:1850: checking for $ac_word" >&5
1850
1851 if test -n "$CC"; then
1852   ac_cv_prog_CC="$CC" # Let the user override the test.
1853 else
1854   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1855   ac_dummy="$PATH"
1856   for ac_dir in $ac_dummy; do
1857     test -z "$ac_dir" && ac_dir=.
1858     if test -f $ac_dir/$ac_word; then
1859       ac_cv_prog_CC="gcc"
1860       break
1861     fi
1862   done
1863   IFS="$ac_save_ifs"
1864 fi
1865 CC="$ac_cv_prog_CC"
1866 if test -n "$CC"; then
1867   echo "$ac_t""$CC" 1>&6
1868 else
1869   echo "$ac_t""no" 1>&6
1870 fi
1871
1872 if test -z "$CC"; then
1873   # Extract the first word of "cc", so it can be a program name with args.
1874 set dummy cc; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877
1878 if test -n "$CC"; then
1879   ac_cv_prog_CC="$CC" # Let the user override the test.
1880 else
1881   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1882   ac_prog_rejected=no
1883   ac_dummy="$PATH"
1884   for ac_dir in $ac_dummy; do
1885     test -z "$ac_dir" && ac_dir=.
1886     if test -f $ac_dir/$ac_word; then
1887       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1888         ac_prog_rejected=yes
1889         continue
1890       fi
1891       ac_cv_prog_CC="cc"
1892       break
1893     fi
1894   done
1895   IFS="$ac_save_ifs"
1896 if test $ac_prog_rejected = yes; then
1897   # We found a bogon in the path, so make sure we never use it.
1898   set dummy $ac_cv_prog_CC
1899   shift
1900   if test $# -gt 0; then
1901     # We chose a different compiler from the bogus one.
1902     # However, it has the same basename, so the bogon will be chosen
1903     # first if we set CC to just the basename; use the full file name.
1904     shift
1905     set dummy "$ac_dir/$ac_word" "$@"
1906     shift
1907     ac_cv_prog_CC="$@"
1908   fi
1909 fi
1910 fi
1911 CC="$ac_cv_prog_CC"
1912 if test -n "$CC"; then
1913   echo "$ac_t""$CC" 1>&6
1914 else
1915   echo "$ac_t""no" 1>&6
1916 fi
1917
1918   if test -z "$CC"; then
1919     case "`uname -s`" in
1920     *win32* | *WIN32*)
1921       # Extract the first word of "cl", so it can be a program name with args.
1922 set dummy cl; ac_word=$2
1923 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1924 echo "configure:1925: checking for $ac_word" >&5
1925
1926 if test -n "$CC"; then
1927   ac_cv_prog_CC="$CC" # Let the user override the test.
1928 else
1929   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1930   ac_dummy="$PATH"
1931   for ac_dir in $ac_dummy; do
1932     test -z "$ac_dir" && ac_dir=.
1933     if test -f $ac_dir/$ac_word; then
1934       ac_cv_prog_CC="cl"
1935       break
1936     fi
1937   done
1938   IFS="$ac_save_ifs"
1939 fi
1940 CC="$ac_cv_prog_CC"
1941 if test -n "$CC"; then
1942   echo "$ac_t""$CC" 1>&6
1943 else
1944   echo "$ac_t""no" 1>&6
1945 fi
1946  ;;
1947     esac
1948   fi
1949   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1950 fi
1951
1952 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1953 echo "configure:1954: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1954
1955 ac_ext=c
1956 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1957 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1958 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1959 ac_cpp='$CPP '"$xe_cppflags"
1960 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1961 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1962 cross_compiling=no
1963
1964 cat > conftest.$ac_ext << EOF
1965
1966 #line 1967 "configure"
1967 #include "confdefs.h"
1968
1969 main(){return(0);}
1970 EOF
1971 if { (eval echo configure:1972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1972   ac_cv_prog_cc_works=yes
1973   # If we can't run a trivial program, we are probably using a cross compiler.
1974   if (./conftest; exit) 2>/dev/null; then
1975     ac_cv_prog_cc_cross=no
1976   else
1977     ac_cv_prog_cc_cross=yes
1978   fi
1979 else
1980   echo "configure: failed program was:" >&5
1981   cat conftest.$ac_ext >&5
1982   ac_cv_prog_cc_works=no
1983 fi
1984 rm -fr conftest*
1985 ac_ext=c
1986 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1987 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1988 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1989 ac_cpp='$CPP '"$xe_cppflags"
1990 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1991 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1992 cross_compiling=no
1993
1994 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1995 if test $ac_cv_prog_cc_works = no; then
1996   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1997 fi
1998 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1999 echo "configure:2000: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2000 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2001 cross_compiling=$ac_cv_prog_cc_cross
2002
2003 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2004 echo "configure:2005: checking whether we are using GNU C" >&5
2005
2006 cat > conftest.c <<EOF
2007 #ifdef __GNUC__
2008   yes;
2009 #endif
2010 EOF
2011 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2012   ac_cv_prog_gcc=yes
2013 else
2014   ac_cv_prog_gcc=no
2015 fi
2016
2017 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2018
2019 if test $ac_cv_prog_gcc = yes; then
2020   GCC=yes
2021 else
2022   GCC=
2023 fi
2024
2025 ac_test_CFLAGS="${CFLAGS+set}"
2026 ac_save_CFLAGS="$CFLAGS"
2027 CFLAGS=
2028 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2029 echo "configure:2030: checking whether ${CC-cc} accepts -g" >&5
2030
2031 echo 'void f(){}' > conftest.c
2032 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2033   ac_cv_prog_cc_g=yes
2034 else
2035   ac_cv_prog_cc_g=no
2036 fi
2037 rm -f conftest*
2038
2039
2040 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2041 if test "$ac_test_CFLAGS" = set; then
2042   CFLAGS="$ac_save_CFLAGS"
2043 elif test $ac_cv_prog_cc_g = yes; then
2044   if test "$GCC" = yes; then
2045     CFLAGS="-g -O2"
2046   else
2047     CFLAGS="-g"
2048   fi
2049 else
2050   if test "$GCC" = yes; then
2051     CFLAGS="-O2"
2052   else
2053     CFLAGS=
2054   fi
2055 fi
2056
2057 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2058   CC=gcc
2059   # Extract the first word of "gcc", so it can be a program name with args.
2060 set dummy gcc; ac_word=$2
2061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2062 echo "configure:2063: checking for $ac_word" >&5
2063
2064 if test -n "$CC"; then
2065   ac_cv_prog_CC="$CC" # Let the user override the test.
2066 else
2067   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2068   ac_dummy="$PATH"
2069   for ac_dir in $ac_dummy; do
2070     test -z "$ac_dir" && ac_dir=.
2071     if test -f $ac_dir/$ac_word; then
2072       ac_cv_prog_CC="gcc"
2073       break
2074     fi
2075   done
2076   IFS="$ac_save_ifs"
2077 fi
2078 CC="$ac_cv_prog_CC"
2079 if test -n "$CC"; then
2080   echo "$ac_t""$CC" 1>&6
2081 else
2082   echo "$ac_t""no" 1>&6
2083 fi
2084
2085 if test -z "$CC"; then
2086   # Extract the first word of "cc", so it can be a program name with args.
2087 set dummy cc; ac_word=$2
2088 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2089 echo "configure:2090: checking for $ac_word" >&5
2090
2091 if test -n "$CC"; then
2092   ac_cv_prog_CC="$CC" # Let the user override the test.
2093 else
2094   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2095   ac_prog_rejected=no
2096   ac_dummy="$PATH"
2097   for ac_dir in $ac_dummy; do
2098     test -z "$ac_dir" && ac_dir=.
2099     if test -f $ac_dir/$ac_word; then
2100       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2101         ac_prog_rejected=yes
2102         continue
2103       fi
2104       ac_cv_prog_CC="cc"
2105       break
2106     fi
2107   done
2108   IFS="$ac_save_ifs"
2109 if test $ac_prog_rejected = yes; then
2110   # We found a bogon in the path, so make sure we never use it.
2111   set dummy $ac_cv_prog_CC
2112   shift
2113   if test $# -gt 0; then
2114     # We chose a different compiler from the bogus one.
2115     # However, it has the same basename, so the bogon will be chosen
2116     # first if we set CC to just the basename; use the full file name.
2117     shift
2118     set dummy "$ac_dir/$ac_word" "$@"
2119     shift
2120     ac_cv_prog_CC="$@"
2121   fi
2122 fi
2123 fi
2124 CC="$ac_cv_prog_CC"
2125 if test -n "$CC"; then
2126   echo "$ac_t""$CC" 1>&6
2127 else
2128   echo "$ac_t""no" 1>&6
2129 fi
2130
2131   if test -z "$CC"; then
2132     case "`uname -s`" in
2133     *win32* | *WIN32*)
2134       # Extract the first word of "cl", so it can be a program name with args.
2135 set dummy cl; ac_word=$2
2136 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2137 echo "configure:2138: checking for $ac_word" >&5
2138
2139 if test -n "$CC"; then
2140   ac_cv_prog_CC="$CC" # Let the user override the test.
2141 else
2142   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2143   ac_dummy="$PATH"
2144   for ac_dir in $ac_dummy; do
2145     test -z "$ac_dir" && ac_dir=.
2146     if test -f $ac_dir/$ac_word; then
2147       ac_cv_prog_CC="cl"
2148       break
2149     fi
2150   done
2151   IFS="$ac_save_ifs"
2152 fi
2153 CC="$ac_cv_prog_CC"
2154 if test -n "$CC"; then
2155   echo "$ac_t""$CC" 1>&6
2156 else
2157   echo "$ac_t""no" 1>&6
2158 fi
2159  ;;
2160     esac
2161   fi
2162   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2163 fi
2164
2165 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2166 echo "configure:2167: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2167
2168 ac_ext=c
2169 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2170 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2171 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2172 ac_cpp='$CPP '"$xe_cppflags"
2173 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2174 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2175 cross_compiling=no
2176
2177 cat > conftest.$ac_ext << EOF
2178
2179 #line 2180 "configure"
2180 #include "confdefs.h"
2181
2182 main(){return(0);}
2183 EOF
2184 if { (eval echo configure:2185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2185   ac_cv_prog_cc_works=yes
2186   # If we can't run a trivial program, we are probably using a cross compiler.
2187   if (./conftest; exit) 2>/dev/null; then
2188     ac_cv_prog_cc_cross=no
2189   else
2190     ac_cv_prog_cc_cross=yes
2191   fi
2192 else
2193   echo "configure: failed program was:" >&5
2194   cat conftest.$ac_ext >&5
2195   ac_cv_prog_cc_works=no
2196 fi
2197 rm -fr conftest*
2198 ac_ext=c
2199 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2200 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2201 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2202 ac_cpp='$CPP '"$xe_cppflags"
2203 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2204 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2205 cross_compiling=no
2206
2207 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2208 if test $ac_cv_prog_cc_works = no; then
2209   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2210 fi
2211 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2212 echo "configure:2213: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2213 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2214 cross_compiling=$ac_cv_prog_cc_cross
2215
2216 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2217 echo "configure:2218: checking whether we are using GNU C" >&5
2218
2219 cat > conftest.c <<EOF
2220 #ifdef __GNUC__
2221   yes;
2222 #endif
2223 EOF
2224 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2225   ac_cv_prog_gcc=yes
2226 else
2227   ac_cv_prog_gcc=no
2228 fi
2229
2230 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2231
2232 if test $ac_cv_prog_gcc = yes; then
2233   GCC=yes
2234 else
2235   GCC=
2236 fi
2237
2238 ac_test_CFLAGS="${CFLAGS+set}"
2239 ac_save_CFLAGS="$CFLAGS"
2240 CFLAGS=
2241 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2242 echo "configure:2243: checking whether ${CC-cc} accepts -g" >&5
2243
2244 echo 'void f(){}' > conftest.c
2245 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2246   ac_cv_prog_cc_g=yes
2247 else
2248   ac_cv_prog_cc_g=no
2249 fi
2250 rm -f conftest*
2251
2252
2253 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2254 if test "$ac_test_CFLAGS" = set; then
2255   CFLAGS="$ac_save_CFLAGS"
2256 elif test $ac_cv_prog_cc_g = yes; then
2257   if test "$GCC" = yes; then
2258     CFLAGS="-g -O2"
2259   else
2260     CFLAGS="-g"
2261   fi
2262 else
2263   if test "$GCC" = yes; then
2264     CFLAGS="-O2"
2265   else
2266     CFLAGS=
2267   fi
2268 fi
2269
2270 fi
2271 CFLAGS="$xe_save_CFLAGS"
2272
2273
2274 test -n "$CPP" -a -d "$CPP" && CPP=
2275
2276 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2277
2278 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2279 echo "configure:2280: checking how to run the C preprocessor" >&5
2280 # On Suns, sometimes $CPP names a directory.
2281 if test -n "$CPP" && test -d "$CPP"; then
2282   CPP=
2283 fi
2284 if test -z "$CPP"; then
2285
2286   # This must be in double quotes, not single quotes, because CPP may get
2287   # substituted into the Makefile and "${CC-cc}" will confuse make.
2288   CPP="${CC-cc} -E"
2289   # On the NeXT, cc -E runs the code through the compiler's parser,
2290   # not just through cpp.
2291   cat > conftest.$ac_ext <<EOF
2292 #line 2293 "configure"
2293 #include "confdefs.h"
2294 #include <assert.h>
2295 Syntax Error
2296 EOF
2297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2298 { (eval echo configure:2299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2300 if test -z "$ac_err"; then
2301   :
2302 else
2303   echo "$ac_err" >&5
2304   echo "configure: failed program was:" >&5
2305   cat conftest.$ac_ext >&5
2306   rm -rf conftest*
2307   CPP="${CC-cc} -E -traditional-cpp"
2308   cat > conftest.$ac_ext <<EOF
2309 #line 2310 "configure"
2310 #include "confdefs.h"
2311 #include <assert.h>
2312 Syntax Error
2313 EOF
2314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2315 { (eval echo configure:2316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2317 if test -z "$ac_err"; then
2318   :
2319 else
2320   echo "$ac_err" >&5
2321   echo "configure: failed program was:" >&5
2322   cat conftest.$ac_ext >&5
2323   rm -rf conftest*
2324   CPP="${CC-cc} -nologo -E"
2325   cat > conftest.$ac_ext <<EOF
2326 #line 2327 "configure"
2327 #include "confdefs.h"
2328 #include <assert.h>
2329 Syntax Error
2330 EOF
2331 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2332 { (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2333 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2334 if test -z "$ac_err"; then
2335   :
2336 else
2337   echo "$ac_err" >&5
2338   echo "configure: failed program was:" >&5
2339   cat conftest.$ac_ext >&5
2340   rm -rf conftest*
2341   CPP=/lib/cpp
2342 fi
2343 rm -f conftest*
2344 fi
2345 rm -f conftest*
2346 fi
2347 rm -f conftest*
2348   ac_cv_prog_CPP="$CPP"
2349   CPP="$ac_cv_prog_CPP"
2350 else
2351   ac_cv_prog_CPP="$CPP"
2352 fi
2353 echo "$ac_t""$CPP" 1>&6
2354
2355
2356
2357 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2358 echo "configure:2359: checking for AIX" >&5
2359 cat > conftest.$ac_ext <<EOF
2360 #line 2361 "configure"
2361 #include "confdefs.h"
2362 #ifdef _AIX
2363   yes
2364 #endif
2365
2366 EOF
2367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2368   egrep "yes" >/dev/null 2>&1; then
2369   rm -rf conftest*
2370   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2371     Defining _ALL_SOURCE
2372 EOF
2373 cat >> confdefs.h <<\EOF
2374 #define _ALL_SOURCE 1
2375 EOF
2376 }
2377
2378 else
2379   rm -rf conftest*
2380   echo "$ac_t""no" 1>&6
2381 fi
2382 rm -f conftest*
2383
2384  
2385
2386 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2387 echo "configure:2388: checking for GNU libc" >&5
2388 cat > conftest.$ac_ext <<EOF
2389 #line 2390 "configure"
2390 #include "confdefs.h"
2391 #include <features.h>
2392 int main() {
2393
2394 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2395 #error Not a GNU libc system :-(
2396 ******* ======= ******** &&&&&&&&
2397 #endif
2398
2399 ; return 0; }
2400 EOF
2401 if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2402   rm -rf conftest*
2403   have_glibc=yes
2404 else
2405   echo "configure: failed program was:" >&5
2406   cat conftest.$ac_ext >&5
2407   rm -rf conftest*
2408   have_glibc=no
2409 fi
2410 rm -f conftest*
2411 echo "$ac_t""$have_glibc" 1>&6
2412 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2413     Defining _GNU_SOURCE
2414 EOF
2415 cat >> confdefs.h <<\EOF
2416 #define _GNU_SOURCE 1
2417 EOF
2418 }
2419
2420
2421 case "$opsys" in
2422   sol2)
2423    { test "$extra_verbose" = "yes" && cat << \EOF
2424     Defining __EXTENSIONS__
2425 EOF
2426 cat >> confdefs.h <<\EOF
2427 #define __EXTENSIONS__ 1
2428 EOF
2429 }
2430
2431       if test "$os_release" -ge 55; then
2432      { test "$extra_verbose" = "yes" && cat << \EOF
2433     Defining _XOPEN_SOURCE = 500
2434 EOF
2435 cat >> confdefs.h <<\EOF
2436 #define _XOPEN_SOURCE 500
2437 EOF
2438 }
2439
2440      { test "$extra_verbose" = "yes" && cat << \EOF
2441     Defining _XOPEN_SOURCE_EXTENDED
2442 EOF
2443 cat >> confdefs.h <<\EOF
2444 #define _XOPEN_SOURCE_EXTENDED 1
2445 EOF
2446 }
2447
2448    fi ;;
2449   linux)
2450     { test "$extra_verbose" = "yes" && cat << \EOF
2451     Defining _POSIX_C_SOURCE = 199506L
2452 EOF
2453 cat >> confdefs.h <<\EOF
2454 #define _POSIX_C_SOURCE 199506L
2455 EOF
2456 }
2457
2458     { test "$extra_verbose" = "yes" && cat << \EOF
2459     Defining _XOPEN_SOURCE = 500
2460 EOF
2461 cat >> confdefs.h <<\EOF
2462 #define _XOPEN_SOURCE 500
2463 EOF
2464 }
2465
2466     { test "$extra_verbose" = "yes" && cat << \EOF
2467     Defining _XOPEN_SOURCE_EXTENDED
2468 EOF
2469 cat >> confdefs.h <<\EOF
2470 #define _XOPEN_SOURCE_EXTENDED 1
2471 EOF
2472 }
2473
2474     ;;
2475 esac
2476
2477 cat > conftest.$ac_ext <<EOF
2478 #line 2479 "configure"
2479 #include "confdefs.h"
2480 int main () {
2481 #if defined __SUNPRO_C
2482 return 11;
2483 #elif defined __DECC
2484 return 12;
2485 #elif defined __USLC__ && defined __SCO_VERSION__
2486 return 13;
2487 #else
2488 return 0;
2489 #endif
2490 }
2491 EOF
2492 if { (eval echo configure:2493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2493 then
2494   :
2495 else
2496   conftest_rc="$?"
2497   echo "configure: failed program was:" >&5
2498   cat conftest.$ac_ext >&5
2499   rm -fr conftest*
2500   case "$conftest_rc" in
2501   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2502   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2503   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2504 esac
2505 fi
2506 rm -fr conftest*
2507
2508
2509
2510
2511 echo "Extracting information from the machine- and system-dependent headers..."
2512
2513 tempcname="conftest.c"
2514
2515
2516
2517 cat > $tempcname < confdefs.h
2518 cat >> $tempcname <<EOF
2519 #define NOT_C_CODE
2520 #define C_SWITCH_SITE
2521 #define C_SWITCH_X_SITE
2522 #define LD_SWITCH_SITE
2523 #define LD_SWITCH_X_SITE
2524 #define LD_SWITCH_X_SITE_AUX
2525 #define OS_RELEASE $os_release
2526
2527 #ifdef config_opsysfile
2528 #include "$srcdir/src/$opsysfile"
2529 #endif
2530
2531 #ifdef config_machfile
2532 #include "$srcdir/src/$machfile"
2533 #endif
2534
2535 #ifndef LIBS_MACHINE
2536 #define LIBS_MACHINE
2537 #endif
2538 configure___ libs_machine=LIBS_MACHINE
2539
2540 #ifndef LIBS_SYSTEM
2541 #define LIBS_SYSTEM
2542 #endif
2543 configure___ libs_system=LIBS_SYSTEM
2544
2545 #ifndef LIBS_TERMCAP
2546 #define LIBS_TERMCAP
2547 #endif
2548 configure___ libs_termcap=LIBS_TERMCAP
2549
2550 #ifndef LIB_STANDARD
2551 #define LIB_STANDARD
2552 #endif
2553 configure___ libs_standard=LIB_STANDARD
2554
2555
2556 #ifndef OBJECTS_MACHINE
2557 #define OBJECTS_MACHINE
2558 #endif
2559 configure___ objects_machine=OBJECTS_MACHINE
2560
2561 #ifndef OBJECTS_SYSTEM
2562 #define OBJECTS_SYSTEM
2563 #endif
2564 configure___ objects_system=OBJECTS_SYSTEM
2565
2566
2567 #ifndef C_SWITCH_MACHINE
2568 #define C_SWITCH_MACHINE
2569 #endif
2570 configure___ c_switch_machine=C_SWITCH_MACHINE
2571
2572 #ifndef C_SWITCH_SYSTEM
2573 #define C_SWITCH_SYSTEM
2574 #endif
2575 configure___ c_switch_system=C_SWITCH_SYSTEM
2576
2577
2578 #ifndef LD_SWITCH_MACHINE
2579 #define LD_SWITCH_MACHINE
2580 #endif
2581 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2582
2583 #ifndef LD_SWITCH_SYSTEM
2584 #define LD_SWITCH_SYSTEM
2585 #endif
2586 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2587
2588
2589 #ifndef UNEXEC
2590 #define UNEXEC "unexec.o"
2591 #endif
2592 configure___ unexec=UNEXEC
2593
2594
2595 #ifndef LD_SWITCH_SHARED
2596 #define LD_SWITCH_SHARED "-c"
2597 #endif
2598 configure___ ld_switch_shared=LD_SWITCH_SHARED
2599
2600
2601 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2602 configure___ ordinary_ld=ORDINARY_LD
2603
2604 #ifdef ORDINARY_LINK
2605 #define LD ORDINARY_LD
2606 #else /* no ORDINARY LINK */
2607 #ifdef COFF_ENCAPSULATE
2608 #define LD "\$(CC) -nostdlib"
2609 #else /* not COFF_ENCAPSULATE */
2610 #ifdef LINKER
2611 #define LD LINKER
2612 #else /* ! defined (LINKER) */
2613 #define LD "ld"
2614 #endif /* ! defined (LINKER) */
2615 #endif /* ! defined (COFF_ENCAPSULATE) */
2616 #endif /* not ORDINARY_LINK */
2617 configure___ ld=LD
2618
2619 #ifndef LIB_GCC
2620 #define LIB_GCC
2621 #endif
2622 configure___ lib_gcc=LIB_GCC
2623
2624 #ifndef LD_TEXT_START_ADDR
2625 #define LD_TEXT_START_ADDR
2626 #endif
2627 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2628
2629
2630 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2631 #ifdef NO_REMAP
2632 #ifdef COFF_ENCAPSULATE
2633 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2634 #else /* ! defined (COFF_ENCAPSULATE) */
2635 #define START_FILES "pre-crt0.o /lib/crt0.o"
2636 #endif /* ! defined (COFF_ENCAPSULATE) */
2637 #else /* ! defined (NO_REMAP) */
2638 #define START_FILES "ecrt0.o"
2639 #endif /* ! defined (NO_REMAP) */
2640 #endif /* no ORDINARY_LINK */
2641 #ifndef START_FILES
2642 #define START_FILES
2643 #endif
2644 configure___ start_files=START_FILES
2645
2646 #ifdef ORDINARY_LINK
2647 configure___ ordinary_link=yes
2648 #else
2649 configure___ ordinary_link=no
2650 #endif
2651
2652 #ifdef SYSTEM_MALLOC
2653 configure___ system_malloc=yes
2654 #else
2655 configure___ system_malloc=no
2656 #endif
2657
2658 #ifdef TERMINFO
2659 configure___ have_terminfo=yes
2660 #else
2661 configure___ have_terminfo=no
2662 #endif
2663
2664 #ifdef MAIL_USE_FLOCK
2665 configure___ mail_use_flock=yes
2666 #else
2667 configure___ mail_use_flock=no
2668 #endif
2669
2670 #ifdef MAIL_USE_LOCKF
2671 configure___ mail_use_lockf=yes
2672 #else
2673 configure___ mail_use_lockf=no
2674 #endif
2675
2676 #ifdef MAIL_USE_LOCKING
2677 configure___ mail_use_locking=yes
2678 #else
2679 configure___ mail_use_locking=no
2680 #endif
2681
2682 #ifdef HAVE_WIN32_PROCESSES
2683 configure___ win32_processes=yes
2684 #else
2685 configure___ win32_processes=no
2686 #endif
2687
2688 EOF
2689
2690 CPP=`eval "echo $CPP $CPPFLAGS"`
2691 eval `$CPP -Isrc $tempcname \
2692         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2693
2694 rm $tempcname
2695
2696 if test "$pdump" = "yes"; then
2697   ordinary_link="yes"
2698   ld="${ordinary_ld}"
2699   start_files=
2700   libs_standard=
2701   unexec=
2702   lib_gcc=
2703 fi
2704
2705 test "$extra_verbose" = "yes" && \
2706   for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
2707
2708 case "$opsys" in mingw* | cygwin*)
2709   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2710   cygwin_include=`eval "dirname $cygwin_include"` ;
2711   cygwin_include="-I$cygwin_include/../include" ;
2712   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2713   case "$opsys" in mingw*)
2714     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2715   esac
2716   ;;
2717 esac
2718
2719 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2720
2721
2722 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2723
2724 if test "$__USLC__" = yes; then
2725   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2726 echo "configure:2727: checking for whether the -Kalloca compiler flag is needed" >&5
2727   need_kalloca=no
2728   cat > conftest.$ac_ext <<EOF
2729 #line 2730 "configure"
2730 #include "confdefs.h"
2731
2732 int main() {
2733 void *x = alloca(4);
2734 ; return 0; }
2735 EOF
2736 if { (eval echo configure:2737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2737   rm -rf conftest*
2738   :
2739 else
2740   echo "configure: failed program was:" >&5
2741   cat conftest.$ac_ext >&5
2742   rm -rf conftest*
2743   
2744     xe_save_c_switch_system="$c_switch_system"
2745     c_switch_system="$c_switch_system -Kalloca"
2746     cat > conftest.$ac_ext <<EOF
2747 #line 2748 "configure"
2748 #include "confdefs.h"
2749
2750 int main() {
2751 void *x = alloca(4);
2752 ; return 0; }
2753 EOF
2754 if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755   rm -rf conftest*
2756    need_kalloca=yes 
2757 else
2758   echo "configure: failed program was:" >&5
2759   cat conftest.$ac_ext >&5
2760 fi
2761 rm -f conftest*
2762     c_switch_system="$xe_save_c_switch_system"
2763 fi
2764 rm -f conftest*
2765   echo "$ac_t""$need_kalloca" 1>&6
2766   test "$need_kalloca" = "yes" && c_switch_system="$c_switch_system -Kalloca" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-Kalloca\" to \$c_switch_system"; fi
2767 fi
2768
2769 if test "$cflags_specified" = "no"; then
2770       if   test "$GCC" = "yes"; then
2771     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes"
2772         CFLAGS="$CFLAGS -Wsign-compare"
2773                 if test "$xemacs_compiler" != "g++"; then
2774       CFLAGS="$CFLAGS -Wshadow"
2775     fi
2776             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2777               elif test "$__SUNPRO_C" = "yes"; then
2778     case "$opsys" in
2779       sol2    ) CFLAGS="-v -xO4" ;;
2780       sunos4* ) CFLAGS="-xO2";;
2781     esac
2782   elif test "$__DECC" = "yes"; then
2783     CFLAGS="-O3"
2784   elif test "$CC" = "xlc"; then
2785     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2786     else
2787     CFLAGS="-O" ;  fi
2788 fi
2789
2790 if test "$GCC" = "yes"; then
2791 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2792 echo "configure:2793: checking for buggy gcc versions" >&5
2793 GCC_VERSION=`$CC --version`
2794 case `uname -s`:`uname -m`:$GCC_VERSION in
2795                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2796                         case "$CFLAGS" in
2797             *-O2*|*-O3*)
2798                 case "$CFLAGS" in
2799                     *-fno-schedule-insns*) ;;
2800                     *)
2801                         echo "$ac_t""yes" 1>&6
2802                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2803                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2804                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2805                         ;;
2806                 esac
2807                 ;;
2808         esac
2809         ;;
2810                     Linux:alpha:egcs-2.91.*)
2811         echo "$ac_t""yes" 1>&6
2812         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2813         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2814         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2815         ;;
2816     *:i*86*:2.7.2*)
2817         case "$CFLAGS" in
2818             *-O2*|*-O3*)
2819                 case "$GCC_VERSION" in
2820                     2.7.2)
2821                         case "$CFLAGS" in
2822                             *-fno-strength-reduce*) ;;
2823                             *)
2824                                 echo "$ac_t""yes" 1>&6
2825                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2826                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2827                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2828                                 ;;
2829                         esac
2830                         ;;
2831                 esac
2832                 case "$CFLAGS" in
2833                  *-fno-caller-saves*) ;;
2834                  *)
2835                     echo "$ac_t""yes" 1>&6
2836                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2837                     echo "configure: warning: -fno-caller-saves." 1>&2
2838                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2839                     ;;
2840                 esac
2841                 ;;
2842         esac
2843         ;;
2844 esac
2845 echo "$ac_t""no" 1>&6
2846 fi
2847
2848
2849 if test "$GCC" = "yes"; then
2850   set x $ld_switch_system; shift; ld_switch_system=""
2851   while test -n "$1"; do
2852     case $1 in
2853       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2854       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2855       -Xlinker* ) ;;
2856       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2857     esac
2858     shift
2859   done
2860 fi
2861
2862 if test "$GCC" = "yes"; then
2863   set x $ld_switch_machine; shift; ld_switch_machine=""
2864   while test -n "$1"; do
2865     case $1 in
2866       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2867       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2868       -Xlinker* ) ;;
2869       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2870     esac
2871     shift
2872   done
2873 fi
2874
2875 if test "$GCC" = "yes"; then
2876   set x $LDFLAGS; shift; LDFLAGS=""
2877   while test -n "$1"; do
2878     case $1 in
2879       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2880       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2881       -Xlinker* ) ;;
2882       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2883     esac
2884     shift
2885   done
2886 fi
2887
2888 if test "$GCC" = "yes"; then
2889   set x $ld_call_shared; shift; ld_call_shared=""
2890   while test -n "$1"; do
2891     case $1 in
2892       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2893       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2894       -Xlinker* ) ;;
2895       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2896     esac
2897     shift
2898   done
2899 fi
2900
2901 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2902    echo "    xemacs will be linked with \"$objects_machine\""
2903  fi
2904 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2905    echo "    xemacs will be linked with \"$objects_system\""
2906  fi
2907 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2908    echo "    xemacs will be linked with \"$unexec\""
2909  fi
2910 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2911    echo "    xemacs will be linked with \"dumper.o\""
2912  fi
2913
2914 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2915 echo "configure:2916: checking for dynodump" >&5
2916 if test "$unexec" != "unexsol2.o"; then
2917   echo "$ac_t""no" 1>&6
2918 else
2919   echo "$ac_t""yes" 1>&6
2920   { test "$extra_verbose" = "yes" && cat << \EOF
2921     Defining DYNODUMP
2922 EOF
2923 cat >> confdefs.h <<\EOF
2924 #define DYNODUMP 1
2925 EOF
2926 }
2927
2928   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2929   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2930   case "$machine" in
2931     sparc   ) dynodump_arch=sparc ;;
2932     *86*    ) dynodump_arch=i386  ;;
2933     powerpc ) dynodump_arch=ppc   ;;
2934   esac
2935     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
2936 fi
2937
2938
2939 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2940
2941 if test "$unexec" = "unexaix.o"; then
2942   if   test "$dynamic" = "no"; then
2943   start_flags="-Wl,-bnso,-bnodelcsect"
2944   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2945   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2946     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2947   done
2948   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2949     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2950   done
2951   
2952 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2953 echo "configure:2954: checking for terminateAndUnload in -lC" >&5
2954 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2955
2956 xe_check_libs=" -lC "
2957 cat > conftest.$ac_ext <<EOF
2958 #line 2959 "configure"
2959 #include "confdefs.h"
2960 /* Override any gcc2 internal prototype to avoid an error.  */
2961 /* We use char because int might match the return type of a gcc2
2962     builtin and then its argument prototype would still apply.  */
2963 char terminateAndUnload();
2964
2965 int main() {
2966 terminateAndUnload()
2967 ; return 0; }
2968 EOF
2969 if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2970   rm -rf conftest*
2971   eval "ac_cv_lib_$ac_lib_var=yes"
2972 else
2973   echo "configure: failed program was:" >&5
2974   cat conftest.$ac_ext >&5
2975   rm -rf conftest*
2976   eval "ac_cv_lib_$ac_lib_var=no"
2977 fi
2978 rm -f conftest*
2979 xe_check_libs=""
2980
2981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2982   echo "$ac_t""yes" 1>&6
2983   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2984 else
2985   echo "$ac_t""no" 1>&6
2986 fi
2987
2988
2989   fi
2990 elif test -n "$ld_text_start_addr"; then
2991   start_flags="-T $ld_text_start_addr -e __start"
2992 fi
2993
2994
2995
2996
2997 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2998  test -z "$linker" &&  linker='$(CC) -nostdlib'
2999  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3000 fi
3001 test "$GCC" != "yes" && lib_gcc=
3002
3003
3004
3005
3006
3007 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3008 if test -n "$site_libraries"; then
3009   for arg in $site_libraries; do
3010     case "$arg" in
3011      -* ) ;;
3012      * ) test -d "$arg" || \
3013            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3014        arg="-L${arg}" ;;
3015     esac
3016     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3017   done
3018 fi
3019
3020 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3021 if test -n "$site_includes"; then
3022   for arg in $site_includes; do
3023     case "$arg" in
3024       -* ) ;;
3025       * ) test -d "$arg" || \
3026            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3027       arg="-I${arg}" ;;
3028     esac
3029     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3030   done
3031 fi
3032
3033 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3034 if test -n "$site_prefixes"; then
3035   for dir in $site_prefixes; do
3036     lib_dir="${dir}/lib"
3037     inc_dir="${dir}/include"
3038     if test ! -d "$dir"; then
3039       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3040     elif test ! -d "$lib_dir"; then
3041       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3042     else
3043       if test -d "$inc_dir"; then
3044         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
3045       fi
3046       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
3047     fi
3048   done
3049 fi
3050
3051
3052 for dir in "/usr/ccs/lib"; do
3053   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
3054 done
3055
3056 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3057 if test -n "$site_runtime_libraries"; then
3058   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3059   export LD_RUN_PATH
3060 fi
3061
3062
3063
3064
3065
3066 if test -n "$add_runtime_path"; then :;
3067 elif test "$dynamic" = "no"; then add_runtime_path=no
3068 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3069 else case "$opsys" in
3070        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3071        * ) add_runtime_path=no ;;
3072      esac
3073 fi
3074
3075 if test "$add_runtime_path" = "yes"; then
3076       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3077 echo "configure:3078: checking "for runtime libraries flag"" >&5
3078   case "$opsys" in
3079     sol2 ) dash_r="-R" ;;
3080     decosf* | linux* | irix*) dash_r="-rpath " ;;
3081     *)
3082       dash_r=""
3083       for try_dash_r in "-R" "-R " "-rpath "; do
3084         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3085         
3086 if test "$GCC" = "yes"; then
3087   set x $xe_check_libs; shift; xe_check_libs=""
3088   while test -n "$1"; do
3089     case $1 in
3090       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3091       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3092       -Xlinker* ) ;;
3093       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3094     esac
3095     shift
3096   done
3097 fi
3098         cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101
3102 int main() {
3103
3104 ; return 0; }
3105 EOF
3106 if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3107   rm -rf conftest*
3108   dash_r="$try_dash_r"
3109 else
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112 fi
3113 rm -f conftest*
3114         xe_check_libs=""
3115         test -n "$dash_r" && break
3116       done ;;
3117   esac
3118   if test -n "$dash_r";
3119     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3120     else echo "$ac_t""NONE" 1>&6
3121   fi
3122 fi
3123
3124 xe_add_unique_runpath_dir='
3125   xe_add_p=yes
3126   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3127   done
3128   if test "$xe_add_p" = "yes"; then
3129     test -n "$runpath" && runpath="${runpath}:"
3130     runpath="${runpath}${xe_runpath_dir}"
3131     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3132   fi'
3133
3134
3135
3136
3137 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3138     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3139   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3140   
3141         runpath="" runpath_dirs=""
3142   if test -n "$LD_RUN_PATH"; then
3143     runpath="$LD_RUN_PATH"
3144   elif test "$GCC" = "yes"; then
3145         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3146     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3147     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3148     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3149       case "$arg" in P,* | -L* | -R* )
3150         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3151           {
3152 xe_runpath_dir="$dir"
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 }
3158         done ;;
3159       esac
3160     done
3161     ld_switch_run="$ld_switch_run_save"
3162     rm -f conftest*
3163   else
3164         for arg in $ld_switch_site $ld_switch_x_site; do
3165       case "$arg" in -L*) {
3166 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3167   test "$xe_runpath_dir" != "/lib"     -a \
3168         "$xe_runpath_dir" != "/usr/lib" -a \
3169         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3170   eval "$xe_add_unique_runpath_dir"
3171 };; esac
3172     done
3173         if test "$opsys $need_motif" = "sol2 yes"; then
3174       xe_runpath_dir="/opt/SUNWdt/lib";
3175       eval "$xe_add_unique_runpath_dir";
3176     fi
3177   fi 
3178   if test -n "$runpath"; then
3179     ld_switch_run="${dash_r}${runpath}"
3180     
3181 if test "$GCC" = "yes"; then
3182   set x $ld_switch_run; shift; ld_switch_run=""
3183   while test -n "$1"; do
3184     case $1 in
3185       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3186       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3187       -Xlinker* ) ;;
3188       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3189     esac
3190     shift
3191   done
3192 fi
3193     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3194   fi
3195 fi
3196
3197
3198
3199 GNU_MALLOC=yes
3200 if test "$with_dlmalloc" != "no"; then
3201         doug_lea_malloc=yes
3202 else
3203         doug_lea_malloc=no
3204 fi
3205 after_morecore_hook_exists=yes
3206 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3207 echo "configure:3208: checking for malloc_set_state" >&5
3208
3209 cat > conftest.$ac_ext <<EOF
3210 #line 3211 "configure"
3211 #include "confdefs.h"
3212 /* System header to define __stub macros and hopefully few prototypes,
3213     which can conflict with char malloc_set_state(); below.  */
3214 #include <assert.h>
3215 /* Override any gcc2 internal prototype to avoid an error.  */
3216 /* We use char because int might match the return type of a gcc2
3217     builtin and then its argument prototype would still apply.  */
3218 char malloc_set_state();
3219
3220 int main() {
3221
3222 /* The GNU C library defines this for functions which it implements
3223     to always fail with ENOSYS.  Some functions are actually named
3224     something starting with __ and the normal name is an alias.  */
3225 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3226 choke me
3227 #else
3228 malloc_set_state();
3229 #endif
3230
3231 ; return 0; }
3232 EOF
3233 if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3234   rm -rf conftest*
3235   eval "ac_cv_func_malloc_set_state=yes"
3236 else
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239   rm -rf conftest*
3240   eval "ac_cv_func_malloc_set_state=no"
3241 fi
3242 rm -f conftest*
3243
3244 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3245   echo "$ac_t""yes" 1>&6
3246   :
3247 else
3248   echo "$ac_t""no" 1>&6
3249 doug_lea_malloc=no
3250 fi
3251
3252 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3253 echo "configure:3254: checking whether __after_morecore_hook exists" >&5
3254 cat > conftest.$ac_ext <<EOF
3255 #line 3256 "configure"
3256 #include "confdefs.h"
3257 extern void (* __after_morecore_hook)();
3258 int main() {
3259 __after_morecore_hook = 0
3260 ; return 0; }
3261 EOF
3262 if { (eval echo configure:3263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3263   rm -rf conftest*
3264   echo "$ac_t""yes" 1>&6
3265 else
3266   echo "configure: failed program was:" >&5
3267   cat conftest.$ac_ext >&5
3268   rm -rf conftest*
3269   echo "$ac_t""no" 1>&6
3270    after_morecore_hook_exists=no
3271 fi
3272 rm -f conftest*
3273 if test "$system_malloc" = "yes" ; then
3274   GNU_MALLOC=no
3275   GNU_MALLOC_reason="
3276     - The GNU allocators don't work with this system configuration."
3277 elif test "$with_system_malloc" = "yes" ; then
3278   GNU_MALLOC=no
3279   GNU_MALLOC_reason="
3280     - User chose not to use GNU allocators."
3281 elif test "$with_debug_malloc" = "yes" ; then
3282   GNU_MALLOC=no
3283   GNU_MALLOC_reason="
3284     - User chose to use Debugging Malloc."
3285 fi
3286
3287 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3288   GNU_MALLOC_reason="
3289     - Using Doug Lea's new malloc from the GNU C Library."
3290   { test "$extra_verbose" = "yes" && cat << \EOF
3291     Defining DOUG_LEA_MALLOC
3292 EOF
3293 cat >> confdefs.h <<\EOF
3294 #define DOUG_LEA_MALLOC 1
3295 EOF
3296 }
3297
3298   if test "$after_morecore_hook_exists" = "no" ; then
3299     GNU_MALLOC_reason="
3300     - Using Doug Lea's new malloc from the Linux C Library."
3301     { test "$extra_verbose" = "yes" && cat << \EOF
3302     Defining _NO_MALLOC_WARNING_
3303 EOF
3304 cat >> confdefs.h <<\EOF
3305 #define _NO_MALLOC_WARNING_ 1
3306 EOF
3307 }
3308
3309   fi
3310 fi
3311
3312
3313
3314
3315 # Extract the first word of "ranlib", so it can be a program name with args.
3316 set dummy ranlib; ac_word=$2
3317 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3318 echo "configure:3319: checking for $ac_word" >&5
3319
3320 if test -n "$RANLIB"; then
3321   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3322 else
3323   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3324   ac_dummy="$PATH"
3325   for ac_dir in $ac_dummy; do
3326     test -z "$ac_dir" && ac_dir=.
3327     if test -f $ac_dir/$ac_word; then
3328       ac_cv_prog_RANLIB="ranlib"
3329       break
3330     fi
3331   done
3332   IFS="$ac_save_ifs"
3333   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3334 fi
3335 RANLIB="$ac_cv_prog_RANLIB"
3336 if test -n "$RANLIB"; then
3337   echo "$ac_t""$RANLIB" 1>&6
3338 else
3339   echo "$ac_t""no" 1>&6
3340 fi
3341
3342 ac_aux_dir=
3343 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3344   if test -f $ac_dir/install-sh; then
3345     ac_aux_dir=$ac_dir
3346     ac_install_sh="$ac_aux_dir/install-sh -c"
3347     break
3348   elif test -f $ac_dir/install.sh; then
3349     ac_aux_dir=$ac_dir
3350     ac_install_sh="$ac_aux_dir/install.sh -c"
3351     break
3352   fi
3353 done
3354 if test -z "$ac_aux_dir"; then
3355   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3356 fi
3357 ac_config_guess=$ac_aux_dir/config.guess
3358 ac_config_sub=$ac_aux_dir/config.sub
3359 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3360
3361 # Find a good install program.  We prefer a C program (faster),
3362 # so one script is as good as another.  But avoid the broken or
3363 # incompatible versions:
3364 # SysV /etc/install, /usr/sbin/install
3365 # SunOS /usr/etc/install
3366 # IRIX /sbin/install
3367 # AIX /bin/install
3368 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3369 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3370 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3371 # ./install, which can be erroneously created by make from ./install.sh.
3372 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3373 echo "configure:3374: checking for a BSD compatible install" >&5
3374 if test -z "$INSTALL"; then
3375
3376   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3377   for ac_dir in $PATH; do
3378     # Account for people who put trailing slashes in PATH elements.
3379     case "$ac_dir/" in
3380     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3381     *)
3382       # OSF1 and SCO ODT 3.0 have their own names for install.
3383       # Don't use installbsd from OSF since it installs stuff as root
3384       # by default.
3385       for ac_prog in ginstall scoinst install; do
3386         if test -f $ac_dir/$ac_prog; then
3387           if test $ac_prog = install &&
3388             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3389             # AIX install.  It has an incompatible calling convention.
3390             :
3391           else
3392             ac_cv_path_install="$ac_dir/$ac_prog -c"
3393             break 2
3394           fi
3395         fi
3396       done
3397       ;;
3398     esac
3399   done
3400   IFS="$ac_save_IFS"
3401
3402   if test "${ac_cv_path_install+set}" = set; then
3403     INSTALL="$ac_cv_path_install"
3404   else
3405     # As a last resort, use the slow shell script.  We don't cache a
3406     # path for INSTALL within a source directory, because that will
3407     # break other packages using the cache if that directory is
3408     # removed, or if the path is relative.
3409     INSTALL="$ac_install_sh"
3410   fi
3411 fi
3412 echo "$ac_t""$INSTALL" 1>&6
3413
3414 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3415 # It thinks the first close brace ends the variable substitution.
3416 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3417
3418 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3419
3420 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3421
3422 for ac_prog in 'bison -y' byacc
3423 do
3424 # Extract the first word of "$ac_prog", so it can be a program name with args.
3425 set dummy $ac_prog; ac_word=$2
3426 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3427 echo "configure:3428: checking for $ac_word" >&5
3428
3429 if test -n "$YACC"; then
3430   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3431 else
3432   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3433   ac_dummy="$PATH"
3434   for ac_dir in $ac_dummy; do
3435     test -z "$ac_dir" && ac_dir=.
3436     if test -f $ac_dir/$ac_word; then
3437       ac_cv_prog_YACC="$ac_prog"
3438       break
3439     fi
3440   done
3441   IFS="$ac_save_ifs"
3442 fi
3443 YACC="$ac_cv_prog_YACC"
3444 if test -n "$YACC"; then
3445   echo "$ac_t""$YACC" 1>&6
3446 else
3447   echo "$ac_t""no" 1>&6
3448 fi
3449
3450 test -n "$YACC" && break
3451 done
3452 test -n "$YACC" || YACC="yacc"
3453
3454
3455 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 
3456 do
3457 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3458 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3459 echo "configure:3460: checking for $ac_hdr" >&5
3460
3461 cat > conftest.$ac_ext <<EOF
3462 #line 3463 "configure"
3463 #include "confdefs.h"
3464 #include <$ac_hdr>
3465 EOF
3466 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3467 { (eval echo configure:3468: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3468 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3469 if test -z "$ac_err"; then
3470   rm -rf conftest*
3471   eval "ac_cv_header_$ac_safe=yes"
3472 else
3473   echo "$ac_err" >&5
3474   echo "configure: failed program was:" >&5
3475   cat conftest.$ac_ext >&5
3476   rm -rf conftest*
3477   eval "ac_cv_header_$ac_safe=no"
3478 fi
3479 rm -f conftest*
3480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3481   echo "$ac_t""yes" 1>&6
3482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3483   { test "$extra_verbose" = "yes" && cat << EOF
3484     Defining $ac_tr_hdr
3485 EOF
3486 cat >> confdefs.h <<EOF
3487 #define $ac_tr_hdr 1
3488 EOF
3489 }
3490  
3491 else
3492   echo "$ac_t""no" 1>&6
3493 fi
3494 done
3495
3496 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3497 echo "configure:3498: checking for sys/wait.h that is POSIX.1 compatible" >&5
3498
3499 cat > conftest.$ac_ext <<EOF
3500 #line 3501 "configure"
3501 #include "confdefs.h"
3502 #include <sys/types.h>
3503 #include <sys/wait.h>
3504 #ifndef WEXITSTATUS
3505 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3506 #endif
3507 #ifndef WIFEXITED
3508 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3509 #endif
3510 int main() {
3511 int s;
3512 wait (&s);
3513 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3514 ; return 0; }
3515 EOF
3516 if { (eval echo configure:3517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3517   rm -rf conftest*
3518   ac_cv_header_sys_wait_h=yes
3519 else
3520   echo "configure: failed program was:" >&5
3521   cat conftest.$ac_ext >&5
3522   rm -rf conftest*
3523   ac_cv_header_sys_wait_h=no
3524 fi
3525 rm -f conftest*
3526
3527 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3528 if test $ac_cv_header_sys_wait_h = yes; then
3529   { test "$extra_verbose" = "yes" && cat << \EOF
3530     Defining HAVE_SYS_WAIT_H
3531 EOF
3532 cat >> confdefs.h <<\EOF
3533 #define HAVE_SYS_WAIT_H 1
3534 EOF
3535 }
3536
3537 fi
3538
3539 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3540 echo "configure:3541: checking for ANSI C header files" >&5
3541
3542 cat > conftest.$ac_ext <<EOF
3543 #line 3544 "configure"
3544 #include "confdefs.h"
3545 #include <stdlib.h>
3546 #include <stdarg.h>
3547 #include <string.h>
3548 #include <float.h>
3549 EOF
3550 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3551 { (eval echo configure:3552: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3552 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3553 if test -z "$ac_err"; then
3554   rm -rf conftest*
3555   ac_cv_header_stdc=yes
3556 else
3557   echo "$ac_err" >&5
3558   echo "configure: failed program was:" >&5
3559   cat conftest.$ac_ext >&5
3560   rm -rf conftest*
3561   ac_cv_header_stdc=no
3562 fi
3563 rm -f conftest*
3564
3565 if test $ac_cv_header_stdc = yes; then
3566   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3567 cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 #include <string.h>
3571 EOF
3572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3573   egrep "memchr" >/dev/null 2>&1; then
3574   :
3575 else
3576   rm -rf conftest*
3577   ac_cv_header_stdc=no
3578 fi
3579 rm -f conftest*
3580
3581 fi
3582
3583 if test $ac_cv_header_stdc = yes; then
3584   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3585 cat > conftest.$ac_ext <<EOF
3586 #line 3587 "configure"
3587 #include "confdefs.h"
3588 #include <stdlib.h>
3589 EOF
3590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3591   egrep "free" >/dev/null 2>&1; then
3592   :
3593 else
3594   rm -rf conftest*
3595   ac_cv_header_stdc=no
3596 fi
3597 rm -f conftest*
3598
3599 fi
3600
3601 if test $ac_cv_header_stdc = yes; then
3602   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <ctype.h>
3607 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3608 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3609 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3610 int main () { int i; for (i = 0; i < 256; i++)
3611 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3612 exit (0); }
3613
3614 EOF
3615 if { (eval echo configure:3616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3616 then
3617   :
3618 else
3619   conftest_rc="$?"
3620   echo "configure: failed program was:" >&5
3621   cat conftest.$ac_ext >&5
3622   rm -fr conftest*
3623   ac_cv_header_stdc=no
3624 fi
3625 rm -fr conftest*
3626 fi
3627
3628 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3629 if test $ac_cv_header_stdc = yes; then
3630   { test "$extra_verbose" = "yes" && cat << \EOF
3631     Defining STDC_HEADERS
3632 EOF
3633 cat >> confdefs.h <<\EOF
3634 #define STDC_HEADERS 1
3635 EOF
3636 }
3637
3638 fi
3639
3640 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3641 echo "configure:3642: checking whether time.h and sys/time.h may both be included" >&5
3642
3643 cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #include <sys/types.h>
3647 #include <sys/time.h>
3648 #include <time.h>
3649 int main() {
3650 struct tm *tp;
3651 ; return 0; }
3652 EOF
3653 if { (eval echo configure:3654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3654   rm -rf conftest*
3655   ac_cv_header_time=yes
3656 else
3657   echo "configure: failed program was:" >&5
3658   cat conftest.$ac_ext >&5
3659   rm -rf conftest*
3660   ac_cv_header_time=no
3661 fi
3662 rm -f conftest*
3663
3664 echo "$ac_t""$ac_cv_header_time" 1>&6
3665 if test $ac_cv_header_time = yes; then
3666   { test "$extra_verbose" = "yes" && cat << \EOF
3667     Defining TIME_WITH_SYS_TIME
3668 EOF
3669 cat >> confdefs.h <<\EOF
3670 #define TIME_WITH_SYS_TIME 1
3671 EOF
3672 }
3673
3674 fi
3675
3676 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3677 echo "configure:3678: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3678
3679 cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <sys/types.h>
3683 #include <signal.h>
3684 /* NetBSD declares sys_siglist in unistd.h.  */
3685 #ifdef HAVE_UNISTD_H
3686 #include <unistd.h>
3687 #endif
3688 int main() {
3689 char *msg = *(sys_siglist + 1);
3690 ; return 0; }
3691 EOF
3692 if { (eval echo configure:3693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3693   rm -rf conftest*
3694   ac_cv_decl_sys_siglist=yes
3695 else
3696   echo "configure: failed program was:" >&5
3697   cat conftest.$ac_ext >&5
3698   rm -rf conftest*
3699   ac_cv_decl_sys_siglist=no
3700 fi
3701 rm -f conftest*
3702
3703 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3704 if test $ac_cv_decl_sys_siglist = yes; then
3705   { test "$extra_verbose" = "yes" && cat << \EOF
3706     Defining SYS_SIGLIST_DECLARED
3707 EOF
3708 cat >> confdefs.h <<\EOF
3709 #define SYS_SIGLIST_DECLARED 1
3710 EOF
3711 }
3712
3713 fi
3714
3715
3716
3717 echo $ac_n "checking for utime""... $ac_c" 1>&6
3718 echo "configure:3719: checking for utime" >&5
3719 cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722 #include <sys/types.h>
3723 #include <utime.h>
3724 int main() {
3725 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3726 ; return 0; }
3727 EOF
3728 if { (eval echo configure:3729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3729   rm -rf conftest*
3730   echo "$ac_t""yes" 1>&6
3731    { test "$extra_verbose" = "yes" && cat << \EOF
3732     Defining HAVE_UTIME
3733 EOF
3734 cat >> confdefs.h <<\EOF
3735 #define HAVE_UTIME 1
3736 EOF
3737 }
3738
3739 else
3740   echo "configure: failed program was:" >&5
3741   cat conftest.$ac_ext >&5
3742   rm -rf conftest*
3743   echo "$ac_t""no" 1>&6
3744       for ac_func in utimes
3745 do
3746 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3747 echo "configure:3748: checking for $ac_func" >&5
3748
3749 cat > conftest.$ac_ext <<EOF
3750 #line 3751 "configure"
3751 #include "confdefs.h"
3752 /* System header to define __stub macros and hopefully few prototypes,
3753     which can conflict with char $ac_func(); below.  */
3754 #include <assert.h>
3755 /* Override any gcc2 internal prototype to avoid an error.  */
3756 /* We use char because int might match the return type of a gcc2
3757     builtin and then its argument prototype would still apply.  */
3758 char $ac_func();
3759
3760 int main() {
3761
3762 /* The GNU C library defines this for functions which it implements
3763     to always fail with ENOSYS.  Some functions are actually named
3764     something starting with __ and the normal name is an alias.  */
3765 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3766 choke me
3767 #else
3768 $ac_func();
3769 #endif
3770
3771 ; return 0; }
3772 EOF
3773 if { (eval echo configure:3774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3774   rm -rf conftest*
3775   eval "ac_cv_func_$ac_func=yes"
3776 else
3777   echo "configure: failed program was:" >&5
3778   cat conftest.$ac_ext >&5
3779   rm -rf conftest*
3780   eval "ac_cv_func_$ac_func=no"
3781 fi
3782 rm -f conftest*
3783
3784 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3785   echo "$ac_t""yes" 1>&6
3786     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3787   { test "$extra_verbose" = "yes" && cat << EOF
3788     Defining $ac_tr_func
3789 EOF
3790 cat >> confdefs.h <<EOF
3791 #define $ac_tr_func 1
3792 EOF
3793 }
3794  
3795 else
3796   echo "$ac_t""no" 1>&6
3797 fi
3798 done
3799
3800 fi
3801 rm -f conftest*
3802
3803
3804 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3805 echo "configure:3806: checking return type of signal handlers" >&5
3806
3807 cat > conftest.$ac_ext <<EOF
3808 #line 3809 "configure"
3809 #include "confdefs.h"
3810 #include <sys/types.h>
3811 #include <signal.h>
3812 #ifdef signal
3813 #undef signal
3814 #endif
3815 #ifdef __cplusplus
3816 extern "C" void (*signal (int, void (*)(int)))(int);
3817 #else
3818 void (*signal ()) ();
3819 #endif
3820
3821 int main() {
3822 int i;
3823 ; return 0; }
3824 EOF
3825 if { (eval echo configure:3826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826   rm -rf conftest*
3827   ac_cv_type_signal=void
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831   rm -rf conftest*
3832   ac_cv_type_signal=int
3833 fi
3834 rm -f conftest*
3835
3836 echo "$ac_t""$ac_cv_type_signal" 1>&6
3837 { test "$extra_verbose" = "yes" && cat << EOF
3838     Defining RETSIGTYPE = $ac_cv_type_signal
3839 EOF
3840 cat >> confdefs.h <<EOF
3841 #define RETSIGTYPE $ac_cv_type_signal
3842 EOF
3843 }
3844
3845
3846 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3847 echo "configure:3848: checking for size_t" >&5
3848
3849 cat > conftest.$ac_ext <<EOF
3850 #line 3851 "configure"
3851 #include "confdefs.h"
3852 #include <sys/types.h>
3853 #if STDC_HEADERS
3854 #include <stdlib.h>
3855 #include <stddef.h>
3856 #endif
3857 EOF
3858 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3859   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3860   rm -rf conftest*
3861   ac_cv_type_size_t=yes
3862 else
3863   rm -rf conftest*
3864   ac_cv_type_size_t=no
3865 fi
3866 rm -f conftest*
3867
3868 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3869 if test $ac_cv_type_size_t = no; then
3870   { test "$extra_verbose" = "yes" && cat << \EOF
3871     Defining size_t = unsigned
3872 EOF
3873 cat >> confdefs.h <<\EOF
3874 #define size_t unsigned
3875 EOF
3876 }
3877
3878 fi
3879
3880 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3881 echo "configure:3882: checking for pid_t" >&5
3882
3883 cat > conftest.$ac_ext <<EOF
3884 #line 3885 "configure"
3885 #include "confdefs.h"
3886 #include <sys/types.h>
3887 #if STDC_HEADERS
3888 #include <stdlib.h>
3889 #include <stddef.h>
3890 #endif
3891 EOF
3892 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3893   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3894   rm -rf conftest*
3895   ac_cv_type_pid_t=yes
3896 else
3897   rm -rf conftest*
3898   ac_cv_type_pid_t=no
3899 fi
3900 rm -f conftest*
3901
3902 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3903 if test $ac_cv_type_pid_t = no; then
3904   { test "$extra_verbose" = "yes" && cat << \EOF
3905     Defining pid_t = int
3906 EOF
3907 cat >> confdefs.h <<\EOF
3908 #define pid_t int
3909 EOF
3910 }
3911
3912 fi
3913
3914 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3915 echo "configure:3916: checking for uid_t in sys/types.h" >&5
3916
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 #include <sys/types.h>
3921 EOF
3922 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3923   egrep "uid_t" >/dev/null 2>&1; then
3924   rm -rf conftest*
3925   ac_cv_type_uid_t=yes
3926 else
3927   rm -rf conftest*
3928   ac_cv_type_uid_t=no
3929 fi
3930 rm -f conftest*
3931
3932
3933 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3934 if test $ac_cv_type_uid_t = no; then
3935   { test "$extra_verbose" = "yes" && cat << \EOF
3936     Defining uid_t = int
3937 EOF
3938 cat >> confdefs.h <<\EOF
3939 #define uid_t int
3940 EOF
3941 }
3942
3943   { test "$extra_verbose" = "yes" && cat << \EOF
3944     Defining gid_t = int
3945 EOF
3946 cat >> confdefs.h <<\EOF
3947 #define gid_t int
3948 EOF
3949 }
3950
3951 fi
3952
3953 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3954 echo "configure:3955: checking for mode_t" >&5
3955
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3959 #include <sys/types.h>
3960 #if STDC_HEADERS
3961 #include <stdlib.h>
3962 #include <stddef.h>
3963 #endif
3964 EOF
3965 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3966   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3967   rm -rf conftest*
3968   ac_cv_type_mode_t=yes
3969 else
3970   rm -rf conftest*
3971   ac_cv_type_mode_t=no
3972 fi
3973 rm -f conftest*
3974
3975 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3976 if test $ac_cv_type_mode_t = no; then
3977   { test "$extra_verbose" = "yes" && cat << \EOF
3978     Defining mode_t = int
3979 EOF
3980 cat >> confdefs.h <<\EOF
3981 #define mode_t int
3982 EOF
3983 }
3984
3985 fi
3986
3987 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3988 echo "configure:3989: checking for off_t" >&5
3989
3990 cat > conftest.$ac_ext <<EOF
3991 #line 3992 "configure"
3992 #include "confdefs.h"
3993 #include <sys/types.h>
3994 #if STDC_HEADERS
3995 #include <stdlib.h>
3996 #include <stddef.h>
3997 #endif
3998 EOF
3999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4000   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4001   rm -rf conftest*
4002   ac_cv_type_off_t=yes
4003 else
4004   rm -rf conftest*
4005   ac_cv_type_off_t=no
4006 fi
4007 rm -f conftest*
4008
4009 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4010 if test $ac_cv_type_off_t = no; then
4011   { test "$extra_verbose" = "yes" && cat << \EOF
4012     Defining off_t = long
4013 EOF
4014 cat >> confdefs.h <<\EOF
4015 #define off_t long
4016 EOF
4017 }
4018
4019 fi
4020
4021 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4022 echo "configure:4023: checking for ssize_t" >&5
4023
4024 cat > conftest.$ac_ext <<EOF
4025 #line 4026 "configure"
4026 #include "confdefs.h"
4027 #include <sys/types.h>
4028 #if STDC_HEADERS
4029 #include <stdlib.h>
4030 #include <stddef.h>
4031 #endif
4032 EOF
4033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4034   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4035   rm -rf conftest*
4036   ac_cv_type_ssize_t=yes
4037 else
4038   rm -rf conftest*
4039   ac_cv_type_ssize_t=no
4040 fi
4041 rm -f conftest*
4042
4043 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4044 if test $ac_cv_type_ssize_t = no; then
4045   { test "$extra_verbose" = "yes" && cat << \EOF
4046     Defining ssize_t = int
4047 EOF
4048 cat >> confdefs.h <<\EOF
4049 #define ssize_t int
4050 EOF
4051 }
4052
4053 fi
4054
4055
4056 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4057 echo "configure:4058: checking for socklen_t" >&5
4058 cat > conftest.$ac_ext <<EOF
4059 #line 4060 "configure"
4060 #include "confdefs.h"
4061 #include <sys/socket.h>
4062 socklen_t x;
4063
4064 int main() {
4065
4066 ; return 0; }
4067 EOF
4068 if { (eval echo configure:4069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4069   rm -rf conftest*
4070   echo "$ac_t""yes" 1>&6
4071 else
4072   echo "configure: failed program was:" >&5
4073   cat conftest.$ac_ext >&5
4074   rm -rf conftest*
4075   
4076 cat > conftest.$ac_ext <<EOF
4077 #line 4078 "configure"
4078 #include "confdefs.h"
4079 #include <sys/socket.h>
4080 int accept (int, struct sockaddr *, size_t *);
4081
4082 int main() {
4083
4084 ; return 0; }
4085 EOF
4086 if { (eval echo configure:4087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4087   rm -rf conftest*
4088   
4089 echo "$ac_t""size_t" 1>&6
4090 { test "$extra_verbose" = "yes" && cat << \EOF
4091     Defining socklen_t = size_t
4092 EOF
4093 cat >> confdefs.h <<\EOF
4094 #define socklen_t size_t
4095 EOF
4096 }
4097
4098 else
4099   echo "configure: failed program was:" >&5
4100   cat conftest.$ac_ext >&5
4101   rm -rf conftest*
4102   
4103 echo "$ac_t""int" 1>&6
4104 { test "$extra_verbose" = "yes" && cat << \EOF
4105     Defining socklen_t = int
4106 EOF
4107 cat >> confdefs.h <<\EOF
4108 #define socklen_t int
4109 EOF
4110 }
4111
4112 fi
4113 rm -f conftest*
4114 fi
4115 rm -f conftest*
4116
4117 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4118 echo "configure:4119: checking for struct timeval" >&5
4119 cat > conftest.$ac_ext <<EOF
4120 #line 4121 "configure"
4121 #include "confdefs.h"
4122 #ifdef TIME_WITH_SYS_TIME
4123 #include <sys/time.h>
4124 #include <time.h>
4125 #else
4126 #ifdef HAVE_SYS_TIME_H
4127 #include <sys/time.h>
4128 #else
4129 #include <time.h>
4130 #endif
4131 #endif
4132 int main() {
4133 static struct timeval x; x.tv_sec = x.tv_usec;
4134 ; return 0; }
4135 EOF
4136 if { (eval echo configure:4137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4137   rm -rf conftest*
4138   echo "$ac_t""yes" 1>&6
4139   HAVE_TIMEVAL=yes
4140   { test "$extra_verbose" = "yes" && cat << \EOF
4141     Defining HAVE_TIMEVAL
4142 EOF
4143 cat >> confdefs.h <<\EOF
4144 #define HAVE_TIMEVAL 1
4145 EOF
4146 }
4147
4148 else
4149   echo "configure: failed program was:" >&5
4150   cat conftest.$ac_ext >&5
4151   rm -rf conftest*
4152   echo "$ac_t""no" 1>&6
4153    HAVE_TIMEVAL=no
4154 fi
4155 rm -f conftest*
4156
4157 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4158 echo "configure:4159: checking whether struct tm is in sys/time.h or time.h" >&5
4159
4160 cat > conftest.$ac_ext <<EOF
4161 #line 4162 "configure"
4162 #include "confdefs.h"
4163 #include <sys/types.h>
4164 #include <time.h>
4165 int main() {
4166 struct tm *tp; tp->tm_sec;
4167 ; return 0; }
4168 EOF
4169 if { (eval echo configure:4170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4170   rm -rf conftest*
4171   ac_cv_struct_tm=time.h
4172 else
4173   echo "configure: failed program was:" >&5
4174   cat conftest.$ac_ext >&5
4175   rm -rf conftest*
4176   ac_cv_struct_tm=sys/time.h
4177 fi
4178 rm -f conftest*
4179
4180 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4181 if test $ac_cv_struct_tm = sys/time.h; then
4182   { test "$extra_verbose" = "yes" && cat << \EOF
4183     Defining TM_IN_SYS_TIME
4184 EOF
4185 cat >> confdefs.h <<\EOF
4186 #define TM_IN_SYS_TIME 1
4187 EOF
4188 }
4189
4190 fi
4191
4192 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4193 echo "configure:4194: checking for tm_zone in struct tm" >&5
4194
4195 cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <sys/types.h>
4199 #include <$ac_cv_struct_tm>
4200 int main() {
4201 struct tm tm; tm.tm_zone;
4202 ; return 0; }
4203 EOF
4204 if { (eval echo configure:4205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4205   rm -rf conftest*
4206   ac_cv_struct_tm_zone=yes
4207 else
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   ac_cv_struct_tm_zone=no
4212 fi
4213 rm -f conftest*
4214
4215 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4216 if test "$ac_cv_struct_tm_zone" = yes; then
4217   { test "$extra_verbose" = "yes" && cat << \EOF
4218     Defining HAVE_TM_ZONE
4219 EOF
4220 cat >> confdefs.h <<\EOF
4221 #define HAVE_TM_ZONE 1
4222 EOF
4223 }
4224
4225 else
4226   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4227 echo "configure:4228: checking for tzname" >&5
4228
4229 cat > conftest.$ac_ext <<EOF
4230 #line 4231 "configure"
4231 #include "confdefs.h"
4232 #include <time.h>
4233 #ifndef tzname /* For SGI.  */
4234 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4235 #endif
4236 int main() {
4237 atoi(*tzname);
4238 ; return 0; }
4239 EOF
4240 if { (eval echo configure:4241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4241   rm -rf conftest*
4242   ac_cv_var_tzname=yes
4243 else
4244   echo "configure: failed program was:" >&5
4245   cat conftest.$ac_ext >&5
4246   rm -rf conftest*
4247   ac_cv_var_tzname=no
4248 fi
4249 rm -f conftest*
4250
4251 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4252   if test $ac_cv_var_tzname = yes; then
4253     { test "$extra_verbose" = "yes" && cat << \EOF
4254     Defining HAVE_TZNAME
4255 EOF
4256 cat >> confdefs.h <<\EOF
4257 #define HAVE_TZNAME 1
4258 EOF
4259 }
4260
4261   fi
4262 fi
4263
4264
4265 echo $ac_n "checking for working const""... $ac_c" 1>&6
4266 echo "configure:4267: checking for working const" >&5
4267
4268 cat > conftest.$ac_ext <<EOF
4269 #line 4270 "configure"
4270 #include "confdefs.h"
4271
4272 int main() {
4273
4274 /* Ultrix mips cc rejects this.  */
4275 typedef int charset[2]; const charset x;
4276 /* SunOS 4.1.1 cc rejects this.  */
4277 char const *const *ccp;
4278 char **p;
4279 /* NEC SVR4.0.2 mips cc rejects this.  */
4280 struct point {int x, y;};
4281 static struct point const zero = {0,0};
4282 /* AIX XL C 1.02.0.0 rejects this.
4283    It does not let you subtract one const X* pointer from another in an arm
4284    of an if-expression whose if-part is not a constant expression */
4285 const char *g = "string";
4286 ccp = &g + (g ? g-g : 0);
4287 /* HPUX 7.0 cc rejects these. */
4288 ++ccp;
4289 p = (char**) ccp;
4290 ccp = (char const *const *) p;
4291 { /* SCO 3.2v4 cc rejects this.  */
4292   char *t;
4293   char const *s = 0 ? (char *) 0 : (char const *) 0;
4294
4295   *t++ = 0;
4296 }
4297 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4298   int x[] = {25, 17};
4299   const int *foo = &x[0];
4300   ++foo;
4301 }
4302 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4303   typedef const int *iptr;
4304   iptr p = 0;
4305   ++p;
4306 }
4307 { /* AIX XL C 1.02.0.0 rejects this saying
4308      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4309   struct s { int j; const int *ap[3]; };
4310   struct s *b; b->j = 5;
4311 }
4312 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4313   const int foo = 10;
4314 }
4315
4316 ; return 0; }
4317 EOF
4318 if { (eval echo configure:4319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4319   rm -rf conftest*
4320   ac_cv_c_const=yes
4321 else
4322   echo "configure: failed program was:" >&5
4323   cat conftest.$ac_ext >&5
4324   rm -rf conftest*
4325   ac_cv_c_const=no
4326 fi
4327 rm -f conftest*
4328
4329 echo "$ac_t""$ac_cv_c_const" 1>&6
4330 if test $ac_cv_c_const = no; then
4331   { test "$extra_verbose" = "yes" && cat << \EOF
4332     Defining const = 
4333 EOF
4334 cat >> confdefs.h <<\EOF
4335 #define const 
4336 EOF
4337 }
4338
4339 fi
4340
4341
4342 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4343 echo "configure:4344: checking whether ${MAKE-make} sets \${MAKE}" >&5
4344 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4345
4346 cat > conftestmake <<\EOF
4347 all:
4348         @echo 'ac_maketemp="${MAKE}"'
4349 EOF
4350 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4351 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4352 if test -n "$ac_maketemp"; then
4353   eval ac_cv_prog_make_${ac_make}_set=yes
4354 else
4355   eval ac_cv_prog_make_${ac_make}_set=no
4356 fi
4357 rm -f conftestmake
4358 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4359   echo "$ac_t""yes" 1>&6
4360   SET_MAKE=
4361 else
4362   echo "$ac_t""no" 1>&6
4363   SET_MAKE="MAKE=${MAKE-make}"
4364 fi
4365
4366
4367 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4368 echo "configure:4369: checking whether byte ordering is bigendian" >&5
4369
4370 ac_cv_c_bigendian=unknown
4371 # See if sys/param.h defines the BYTE_ORDER macro.
4372 cat > conftest.$ac_ext <<EOF
4373 #line 4374 "configure"
4374 #include "confdefs.h"
4375 #include <sys/types.h>
4376 #include <sys/param.h>
4377 int main() {
4378
4379 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4380  bogus endian macros
4381 #endif
4382 ; return 0; }
4383 EOF
4384 if { (eval echo configure:4385: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4385   rm -rf conftest*
4386   # It does; now see whether it defined to BIG_ENDIAN or not.
4387 cat > conftest.$ac_ext <<EOF
4388 #line 4389 "configure"
4389 #include "confdefs.h"
4390 #include <sys/types.h>
4391 #include <sys/param.h>
4392 int main() {
4393
4394 #if BYTE_ORDER != BIG_ENDIAN
4395  not big endian
4396 #endif
4397 ; return 0; }
4398 EOF
4399 if { (eval echo configure:4400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4400   rm -rf conftest*
4401   ac_cv_c_bigendian=yes
4402 else
4403   echo "configure: failed program was:" >&5
4404   cat conftest.$ac_ext >&5
4405   rm -rf conftest*
4406   ac_cv_c_bigendian=no
4407 fi
4408 rm -f conftest*
4409 else
4410   echo "configure: failed program was:" >&5
4411   cat conftest.$ac_ext >&5
4412 fi
4413 rm -f conftest*
4414 if test $ac_cv_c_bigendian = unknown; then
4415 cat > conftest.$ac_ext <<EOF
4416 #line 4417 "configure"
4417 #include "confdefs.h"
4418 main () {
4419   /* Are we little or big endian?  From Harbison&Steele.  */
4420   union
4421   {
4422     long l;
4423     char c[sizeof (long)];
4424   } u;
4425   u.l = 1;
4426   exit (u.c[sizeof (long) - 1] == 1);
4427 }
4428 EOF
4429 if { (eval echo configure:4430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4430 then
4431   ac_cv_c_bigendian=no
4432 else
4433   conftest_rc="$?"
4434   echo "configure: failed program was:" >&5
4435   cat conftest.$ac_ext >&5
4436   rm -fr conftest*
4437   ac_cv_c_bigendian=yes
4438 fi
4439 rm -fr conftest*
4440 fi
4441
4442 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4443 if test $ac_cv_c_bigendian = yes; then
4444   { test "$extra_verbose" = "yes" && cat << \EOF
4445     Defining WORDS_BIGENDIAN
4446 EOF
4447 cat >> confdefs.h <<\EOF
4448 #define WORDS_BIGENDIAN 1
4449 EOF
4450 }
4451
4452 fi
4453
4454
4455 echo $ac_n "checking size of short""... $ac_c" 1>&6
4456 echo "configure:4457: checking size of short" >&5
4457
4458 cat > conftest.$ac_ext <<EOF
4459 #line 4460 "configure"
4460 #include "confdefs.h"
4461 #include <stdio.h>
4462 #include <sys/types.h>
4463 main()
4464 {
4465   FILE *f=fopen("conftestval", "w");
4466   if (!f) exit(1);
4467   fprintf(f, "%d\n", sizeof(short));
4468   exit(0);
4469 }
4470 EOF
4471 if { (eval echo configure:4472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4472 then
4473   ac_cv_sizeof_short=`cat conftestval`
4474 else
4475   conftest_rc="$?"
4476   echo "configure: failed program was:" >&5
4477   cat conftest.$ac_ext >&5
4478   rm -fr conftest*
4479   ac_cv_sizeof_short=0
4480 fi
4481 rm -fr conftest*
4482 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4483 { test "$extra_verbose" = "yes" && cat << EOF
4484     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4485 EOF
4486 cat >> confdefs.h <<EOF
4487 #define SIZEOF_SHORT $ac_cv_sizeof_short
4488 EOF
4489 }
4490
4491
4492 if test "$ac_cv_sizeof_short" = 0; then
4493   echo ""
4494   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4495   echo "*** PANIC *** Please examine config.log for compilation errors."
4496   exit 1
4497 fi
4498 echo $ac_n "checking size of int""... $ac_c" 1>&6
4499 echo "configure:4500: checking size of int" >&5
4500
4501 cat > conftest.$ac_ext <<EOF
4502 #line 4503 "configure"
4503 #include "confdefs.h"
4504 #include <stdio.h>
4505 #include <sys/types.h>
4506 main()
4507 {
4508   FILE *f=fopen("conftestval", "w");
4509   if (!f) exit(1);
4510   fprintf(f, "%d\n", sizeof(int));
4511   exit(0);
4512 }
4513 EOF
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4515 then
4516   ac_cv_sizeof_int=`cat conftestval`
4517 else
4518   conftest_rc="$?"
4519   echo "configure: failed program was:" >&5
4520   cat conftest.$ac_ext >&5
4521   rm -fr conftest*
4522   ac_cv_sizeof_int=0
4523 fi
4524 rm -fr conftest*
4525 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4526 { test "$extra_verbose" = "yes" && cat << EOF
4527     Defining SIZEOF_INT = $ac_cv_sizeof_int
4528 EOF
4529 cat >> confdefs.h <<EOF
4530 #define SIZEOF_INT $ac_cv_sizeof_int
4531 EOF
4532 }
4533
4534
4535 echo $ac_n "checking size of long""... $ac_c" 1>&6
4536 echo "configure:4537: checking size of long" >&5
4537
4538 cat > conftest.$ac_ext <<EOF
4539 #line 4540 "configure"
4540 #include "confdefs.h"
4541 #include <stdio.h>
4542 #include <sys/types.h>
4543 main()
4544 {
4545   FILE *f=fopen("conftestval", "w");
4546   if (!f) exit(1);
4547   fprintf(f, "%d\n", sizeof(long));
4548   exit(0);
4549 }
4550 EOF
4551 if { (eval echo configure:4552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4552 then
4553   ac_cv_sizeof_long=`cat conftestval`
4554 else
4555   conftest_rc="$?"
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558   rm -fr conftest*
4559   ac_cv_sizeof_long=0
4560 fi
4561 rm -fr conftest*
4562 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4563 { test "$extra_verbose" = "yes" && cat << EOF
4564     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4565 EOF
4566 cat >> confdefs.h <<EOF
4567 #define SIZEOF_LONG $ac_cv_sizeof_long
4568 EOF
4569 }
4570
4571
4572 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4573 echo "configure:4574: checking size of long long" >&5
4574
4575 cat > conftest.$ac_ext <<EOF
4576 #line 4577 "configure"
4577 #include "confdefs.h"
4578 #include <stdio.h>
4579 #include <sys/types.h>
4580 main()
4581 {
4582   FILE *f=fopen("conftestval", "w");
4583   if (!f) exit(1);
4584   fprintf(f, "%d\n", sizeof(long long));
4585   exit(0);
4586 }
4587 EOF
4588 if { (eval echo configure:4589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4589 then
4590   ac_cv_sizeof_long_long=`cat conftestval`
4591 else
4592   conftest_rc="$?"
4593   echo "configure: failed program was:" >&5
4594   cat conftest.$ac_ext >&5
4595   rm -fr conftest*
4596   ac_cv_sizeof_long_long=0
4597 fi
4598 rm -fr conftest*
4599 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4600 { test "$extra_verbose" = "yes" && cat << EOF
4601     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4602 EOF
4603 cat >> confdefs.h <<EOF
4604 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4605 EOF
4606 }
4607
4608
4609 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4610 echo "configure:4611: checking size of void *" >&5
4611
4612 cat > conftest.$ac_ext <<EOF
4613 #line 4614 "configure"
4614 #include "confdefs.h"
4615 #include <stdio.h>
4616 #include <sys/types.h>
4617 main()
4618 {
4619   FILE *f=fopen("conftestval", "w");
4620   if (!f) exit(1);
4621   fprintf(f, "%d\n", sizeof(void *));
4622   exit(0);
4623 }
4624 EOF
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4626 then
4627   ac_cv_sizeof_void_p=`cat conftestval`
4628 else
4629   conftest_rc="$?"
4630   echo "configure: failed program was:" >&5
4631   cat conftest.$ac_ext >&5
4632   rm -fr conftest*
4633   ac_cv_sizeof_void_p=0
4634 fi
4635 rm -fr conftest*
4636 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4637 { test "$extra_verbose" = "yes" && cat << EOF
4638     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4639 EOF
4640 cat >> confdefs.h <<EOF
4641 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4642 EOF
4643 }
4644
4645
4646
4647 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4648 echo "configure:4649: checking for long file names" >&5
4649
4650 ac_cv_sys_long_file_names=yes
4651 # Test for long file names in all the places we know might matter:
4652 #      .                the current directory, where building will happen
4653 #      $prefix/lib      where we will be installing things
4654 #      $exec_prefix/lib likewise
4655 # eval it to expand exec_prefix.
4656 #      $TMPDIR          if set, where it might want to write temporary files
4657 # if $TMPDIR is not set:
4658 #      /tmp             where it might want to write temporary files
4659 #      /var/tmp         likewise
4660 #      /usr/tmp         likewise
4661 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4662   ac_tmpdirs="$TMPDIR"
4663 else
4664   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4665 fi
4666 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4667   test -d $ac_dir || continue
4668   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4669   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4670   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4671   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4672   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4673     ac_cv_sys_long_file_names=no
4674     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4675     break
4676   fi
4677   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4678 done
4679
4680 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4681 if test $ac_cv_sys_long_file_names = yes; then
4682   { test "$extra_verbose" = "yes" && cat << \EOF
4683     Defining HAVE_LONG_FILE_NAMES
4684 EOF
4685 cat >> confdefs.h <<\EOF
4686 #define HAVE_LONG_FILE_NAMES 1
4687 EOF
4688 }
4689
4690 fi
4691
4692
4693 echo $ac_n "checking for sin""... $ac_c" 1>&6
4694 echo "configure:4695: checking for sin" >&5
4695
4696 cat > conftest.$ac_ext <<EOF
4697 #line 4698 "configure"
4698 #include "confdefs.h"
4699 /* System header to define __stub macros and hopefully few prototypes,
4700     which can conflict with char sin(); below.  */
4701 #include <assert.h>
4702 /* Override any gcc2 internal prototype to avoid an error.  */
4703 /* We use char because int might match the return type of a gcc2
4704     builtin and then its argument prototype would still apply.  */
4705 char sin();
4706
4707 int main() {
4708
4709 /* The GNU C library defines this for functions which it implements
4710     to always fail with ENOSYS.  Some functions are actually named
4711     something starting with __ and the normal name is an alias.  */
4712 #if defined (__stub_sin) || defined (__stub___sin)
4713 choke me
4714 #else
4715 sin();
4716 #endif
4717
4718 ; return 0; }
4719 EOF
4720 if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4721   rm -rf conftest*
4722   eval "ac_cv_func_sin=yes"
4723 else
4724   echo "configure: failed program was:" >&5
4725   cat conftest.$ac_ext >&5
4726   rm -rf conftest*
4727   eval "ac_cv_func_sin=no"
4728 fi
4729 rm -f conftest*
4730
4731 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4732   echo "$ac_t""yes" 1>&6
4733   :
4734 else
4735   echo "$ac_t""no" 1>&6
4736
4737 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4738 echo "configure:4739: checking for sin in -lm" >&5
4739 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4740
4741 xe_check_libs=" -lm "
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 /* Override any gcc2 internal prototype to avoid an error.  */
4746 /* We use char because int might match the return type of a gcc2
4747     builtin and then its argument prototype would still apply.  */
4748 char sin();
4749
4750 int main() {
4751 sin()
4752 ; return 0; }
4753 EOF
4754 if { (eval echo configure:4755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4755   rm -rf conftest*
4756   eval "ac_cv_lib_$ac_lib_var=yes"
4757 else
4758   echo "configure: failed program was:" >&5
4759   cat conftest.$ac_ext >&5
4760   rm -rf conftest*
4761   eval "ac_cv_lib_$ac_lib_var=no"
4762 fi
4763 rm -f conftest*
4764 xe_check_libs=""
4765
4766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4767   echo "$ac_t""yes" 1>&6
4768     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4769     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4770   { test "$extra_verbose" = "yes" && cat << EOF
4771     Defining $ac_tr_lib
4772 EOF
4773 cat >> confdefs.h <<EOF
4774 #define $ac_tr_lib 1
4775 EOF
4776 }
4777
4778   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4779
4780 else
4781   echo "$ac_t""no" 1>&6
4782 fi
4783
4784
4785 fi
4786
4787
4788 { test "$extra_verbose" = "yes" && cat << \EOF
4789     Defining LISP_FLOAT_TYPE
4790 EOF
4791 cat >> confdefs.h <<\EOF
4792 #define LISP_FLOAT_TYPE 1
4793 EOF
4794 }
4795
4796
4797 cat > conftest.$ac_ext <<EOF
4798 #line 4799 "configure"
4799 #include "confdefs.h"
4800 #include <math.h>
4801 int main() {
4802 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4803 ; return 0; }
4804 EOF
4805 if { (eval echo configure:4806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4806   rm -rf conftest*
4807   { test "$extra_verbose" = "yes" && cat << \EOF
4808     Defining HAVE_INVERSE_HYPERBOLIC
4809 EOF
4810 cat >> confdefs.h <<\EOF
4811 #define HAVE_INVERSE_HYPERBOLIC 1
4812 EOF
4813 }
4814
4815 else
4816   echo "configure: failed program was:" >&5
4817   cat conftest.$ac_ext >&5
4818 fi
4819 rm -f conftest*
4820
4821 echo "checking type of mail spool file locking" 1>&6
4822 echo "configure:4823: checking type of mail spool file locking" >&5
4823 for ac_func in lockf flock
4824 do
4825 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4826 echo "configure:4827: checking for $ac_func" >&5
4827
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 /* System header to define __stub macros and hopefully few prototypes,
4832     which can conflict with char $ac_func(); below.  */
4833 #include <assert.h>
4834 /* Override any gcc2 internal prototype to avoid an error.  */
4835 /* We use char because int might match the return type of a gcc2
4836     builtin and then its argument prototype would still apply.  */
4837 char $ac_func();
4838
4839 int main() {
4840
4841 /* The GNU C library defines this for functions which it implements
4842     to always fail with ENOSYS.  Some functions are actually named
4843     something starting with __ and the normal name is an alias.  */
4844 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4845 choke me
4846 #else
4847 $ac_func();
4848 #endif
4849
4850 ; return 0; }
4851 EOF
4852 if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4853   rm -rf conftest*
4854   eval "ac_cv_func_$ac_func=yes"
4855 else
4856   echo "configure: failed program was:" >&5
4857   cat conftest.$ac_ext >&5
4858   rm -rf conftest*
4859   eval "ac_cv_func_$ac_func=no"
4860 fi
4861 rm -f conftest*
4862
4863 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4864   echo "$ac_t""yes" 1>&6
4865     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4866   { test "$extra_verbose" = "yes" && cat << EOF
4867     Defining $ac_tr_func
4868 EOF
4869 cat >> confdefs.h <<EOF
4870 #define $ac_tr_func 1
4871 EOF
4872 }
4873  
4874 else
4875   echo "$ac_t""no" 1>&6
4876 fi
4877 done
4878
4879 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4880 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4881 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4882 if   test -z "$mail_locking"; then
4883   case "$opsys" in cygwin* | mingw*)
4884     mail_locking=pop ;;
4885   esac
4886 fi
4887
4888 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4889     Defining MAIL_LOCK_LOCKF
4890 EOF
4891 cat >> confdefs.h <<\EOF
4892 #define MAIL_LOCK_LOCKF 1
4893 EOF
4894 }
4895
4896 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4897     Defining MAIL_LOCK_FLOCK
4898 EOF
4899 cat >> confdefs.h <<\EOF
4900 #define MAIL_LOCK_FLOCK 1
4901 EOF
4902 }
4903
4904 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4905     Defining MAIL_LOCK_LOCKING
4906 EOF
4907 cat >> confdefs.h <<\EOF
4908 #define MAIL_LOCK_LOCKING 1
4909 EOF
4910 }
4911
4912 elif test "$mail_locking" = "pop"; then
4913   with_pop=yes
4914   mail_locking=
4915 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4916     Defining MAIL_LOCK_DOT
4917 EOF
4918 cat >> confdefs.h <<\EOF
4919 #define MAIL_LOCK_DOT 1
4920 EOF
4921 }
4922
4923 fi
4924 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4925   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4926 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4927   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4928 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4929   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4930
4931 case "$opsys" in decosf*)
4932   
4933 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4934 echo "configure:4935: checking for cma_open in -lpthreads" >&5
4935 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4936
4937 xe_check_libs=" -lpthreads "
4938 cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 /* Override any gcc2 internal prototype to avoid an error.  */
4942 /* We use char because int might match the return type of a gcc2
4943     builtin and then its argument prototype would still apply.  */
4944 char cma_open();
4945
4946 int main() {
4947 cma_open()
4948 ; return 0; }
4949 EOF
4950 if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4951   rm -rf conftest*
4952   eval "ac_cv_lib_$ac_lib_var=yes"
4953 else
4954   echo "configure: failed program was:" >&5
4955   cat conftest.$ac_ext >&5
4956   rm -rf conftest*
4957   eval "ac_cv_lib_$ac_lib_var=no"
4958 fi
4959 rm -f conftest*
4960 xe_check_libs=""
4961
4962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4963   echo "$ac_t""yes" 1>&6
4964     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4965     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4966   { test "$extra_verbose" = "yes" && cat << EOF
4967     Defining $ac_tr_lib
4968 EOF
4969 cat >> confdefs.h <<EOF
4970 #define $ac_tr_lib 1
4971 EOF
4972 }
4973
4974   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4975
4976 else
4977   echo "$ac_t""no" 1>&6
4978 fi
4979
4980
4981   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4982     c_switch_site="$c_switch_site -threads" ;;
4983 esac
4984
4985
4986 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4987 echo "configure:4988: checking whether the -xildoff compiler flag is required" >&5
4988 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4989   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4990     then echo "$ac_t""no" 1>&6;
4991     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
4992   fi
4993   else echo "$ac_t""no" 1>&6
4994 fi
4995
4996 if test "$opsys" = "sol2"; then
4997   if test "$os_release" -ge 56; then
4998     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4999 echo "configure:5000: checking for \"-z ignore\" linker flag" >&5
5000     case "`ld -h 2>&1`" in
5001       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
5002         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
5003       *) echo "$ac_t""no" 1>&6 ;;
5004     esac
5005   fi
5006 fi
5007
5008 if test "$pdump" != "yes"; then
5009   echo $ac_n "checking for \"-z nocombreloc\" linker flag""... $ac_c" 1>&6
5010 echo "configure:5011: checking for \"-z nocombreloc\" linker flag" >&5
5011   case "`ld --help 2>&1`" in
5012     *-z\ nocombreloc* ) echo "$ac_t""yes" 1>&6
5013       ld_switch_site="-z nocombreloc $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z nocombreloc\" to \$ld_switch_site"; fi ;;
5014     *) echo "$ac_t""no" 1>&6 ;;
5015   esac
5016 fi
5017
5018
5019 echo "checking "for specified window system"" 1>&6
5020 echo "configure:5021: checking "for specified window system"" >&5
5021
5022
5023 GNOME_CONFIG=no
5024 GTK_CONFIG=no
5025
5026 if test "$with_gnome" != "no"; then
5027    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5028 echo "configure:5029: checking for GNOME configuration script" >&5
5029    for possible in gnome-config
5030    do
5031       possible_version=`${possible} --version 2> /dev/null`
5032       if test "x${possible_version}" != "x"; then
5033               GNOME_CONFIG="${possible}"
5034               with_gnome=yes
5035               with_gtk=yes
5036               break
5037       fi
5038    done
5039    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5040 fi
5041
5042 if test "${GNOME_CONFIG}" != "no"; then
5043       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5044       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5045       { test "$extra_verbose" = "yes" && cat << \EOF
5046     Defining HAVE_GNOME
5047 EOF
5048 cat >> confdefs.h <<\EOF
5049 #define HAVE_GNOME 1
5050 EOF
5051 }
5052
5053       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5054       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5055 fi
5056
5057 if test "$with_gtk" != "no";then
5058    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5059 echo "configure:5060: checking for GTK configuration script" >&5
5060    for possible in gtk12-config gtk14-config gtk-config
5061    do
5062       possible_version=`${possible} --version 2> /dev/null`
5063       if test "x${possible_version}" != "x"; then
5064               GTK_CONFIG="${possible}"
5065       fi
5066       case "${possible_version}" in
5067         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5068         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5069         1.2.*)
5070                 with_gtk=yes
5071                 break
5072                 ;;
5073         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5074       esac
5075    done
5076    echo "$ac_t""${GTK_CONFIG}" 1>&6
5077 fi
5078
5079 if test "${GTK_CONFIG}" != "no"; then
5080       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5081 echo "configure:5082: checking gtk version" >&5
5082       GTK_VERSION=`${GTK_CONFIG} --version`
5083       echo "$ac_t""${GTK_VERSION}" 1>&6
5084
5085       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5086 echo "configure:5087: checking gtk libs" >&5
5087       GTK_LIBS=`${GTK_CONFIG} --libs`
5088       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5089       echo "$ac_t""${GTK_LIBS}" 1>&6
5090
5091       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5092 echo "configure:5093: checking gtk cflags" >&5
5093       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5094       if test "$GCC" = "yes"; then
5095         GTK_CFLAGS="${GTK_CFLAGS} -Wno-shadow"
5096       fi
5097       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5098       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5099
5100       
5101 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5102 echo "configure:5103: checking for main in -lgdk_imlib" >&5
5103 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5104
5105 xe_check_libs=" -lgdk_imlib "
5106 cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109
5110 int main() {
5111 main()
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   eval "ac_cv_lib_$ac_lib_var=yes"
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   eval "ac_cv_lib_$ac_lib_var=no"
5122 fi
5123 rm -f conftest*
5124 xe_check_libs=""
5125
5126 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5127   echo "$ac_t""yes" 1>&6
5128   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5129 else
5130   echo "$ac_t""no" 1>&6
5131 fi
5132
5133
5134       
5135 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5136 echo "configure:5137: checking for Imlib_init in -lImlib" >&5
5137 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5138
5139 xe_check_libs=" -lImlib "
5140 cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143 /* Override any gcc2 internal prototype to avoid an error.  */
5144 /* We use char because int might match the return type of a gcc2
5145     builtin and then its argument prototype would still apply.  */
5146 char Imlib_init();
5147
5148 int main() {
5149 Imlib_init()
5150 ; return 0; }
5151 EOF
5152 if { (eval echo configure:5153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5153   rm -rf conftest*
5154   eval "ac_cv_lib_$ac_lib_var=yes"
5155 else
5156   echo "configure: failed program was:" >&5
5157   cat conftest.$ac_ext >&5
5158   rm -rf conftest*
5159   eval "ac_cv_lib_$ac_lib_var=no"
5160 fi
5161 rm -f conftest*
5162 xe_check_libs=""
5163
5164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5165   echo "$ac_t""yes" 1>&6
5166   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5167 else
5168   echo "$ac_t""no" 1>&6
5169 fi
5170
5171
5172       for ac_func in gdk_imlib_init
5173 do
5174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5175 echo "configure:5176: checking for $ac_func" >&5
5176
5177 cat > conftest.$ac_ext <<EOF
5178 #line 5179 "configure"
5179 #include "confdefs.h"
5180 /* System header to define __stub macros and hopefully few prototypes,
5181     which can conflict with char $ac_func(); below.  */
5182 #include <assert.h>
5183 /* Override any gcc2 internal prototype to avoid an error.  */
5184 /* We use char because int might match the return type of a gcc2
5185     builtin and then its argument prototype would still apply.  */
5186 char $ac_func();
5187
5188 int main() {
5189
5190 /* The GNU C library defines this for functions which it implements
5191     to always fail with ENOSYS.  Some functions are actually named
5192     something starting with __ and the normal name is an alias.  */
5193 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5194 choke me
5195 #else
5196 $ac_func();
5197 #endif
5198
5199 ; return 0; }
5200 EOF
5201 if { (eval echo configure:5202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5202   rm -rf conftest*
5203   eval "ac_cv_func_$ac_func=yes"
5204 else
5205   echo "configure: failed program was:" >&5
5206   cat conftest.$ac_ext >&5
5207   rm -rf conftest*
5208   eval "ac_cv_func_$ac_func=no"
5209 fi
5210 rm -f conftest*
5211
5212 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5213   echo "$ac_t""yes" 1>&6
5214     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5215   { test "$extra_verbose" = "yes" && cat << EOF
5216     Defining $ac_tr_func
5217 EOF
5218 cat >> confdefs.h <<EOF
5219 #define $ac_tr_func 1
5220 EOF
5221 }
5222  
5223 else
5224   echo "$ac_t""no" 1>&6
5225 fi
5226 done
5227
5228
5229       { test "$extra_verbose" = "yes" && cat << \EOF
5230     Defining HAVE_XPM
5231 EOF
5232 cat >> confdefs.h <<\EOF
5233 #define HAVE_XPM 1
5234 EOF
5235 }
5236
5237       { test "$extra_verbose" = "yes" && cat << \EOF
5238     Defining HAVE_GTK
5239 EOF
5240 cat >> confdefs.h <<\EOF
5241 #define HAVE_GTK 1
5242 EOF
5243 }
5244
5245       
5246
5247       window_system=gtk
5248       with_gtk=yes
5249       with_x11=no
5250
5251       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5252       test "${with_toolbars}" != no && with_toolbars=gtk
5253       test "${with_menubars}" != "no" && with_menubars=gtk
5254       test "${with_dialogs}" != "no" && with_dialogs=gtk
5255       test "${with_widgets}" != "no" && with_widgets=gtk
5256
5257       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5258    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5259  fi
5260       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5261    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5262  fi
5263       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5264    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5265  fi
5266       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5267    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5268  fi
5269
5270             OLD_CFLAGS="${CFLAGS}"
5271       OLD_CPPFLAGS="${CPPFLAGS}"
5272       OLD_LDFLAGS="${LDFLAGS}"
5273       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5274       CPPFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5275       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5276       for ac_hdr in glade/glade.h glade.h
5277 do
5278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5280 echo "configure:5281: checking for $ac_hdr" >&5
5281
5282 cat > conftest.$ac_ext <<EOF
5283 #line 5284 "configure"
5284 #include "confdefs.h"
5285 #include <$ac_hdr>
5286 EOF
5287 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5288 { (eval echo configure:5289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5289 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5290 if test -z "$ac_err"; then
5291   rm -rf conftest*
5292   eval "ac_cv_header_$ac_safe=yes"
5293 else
5294   echo "$ac_err" >&5
5295   echo "configure: failed program was:" >&5
5296   cat conftest.$ac_ext >&5
5297   rm -rf conftest*
5298   eval "ac_cv_header_$ac_safe=no"
5299 fi
5300 rm -f conftest*
5301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5302   echo "$ac_t""yes" 1>&6
5303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5304   { test "$extra_verbose" = "yes" && cat << EOF
5305     Defining $ac_tr_hdr
5306 EOF
5307 cat >> confdefs.h <<EOF
5308 #define $ac_tr_hdr 1
5309 EOF
5310 }
5311  
5312 else
5313   echo "$ac_t""no" 1>&6
5314 fi
5315 done
5316
5317       
5318 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5319 echo "configure:5320: checking for main in -lxml" >&5
5320 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5321
5322 xe_check_libs=" -lxml "
5323 cat > conftest.$ac_ext <<EOF
5324 #line 5325 "configure"
5325 #include "confdefs.h"
5326
5327 int main() {
5328 main()
5329 ; return 0; }
5330 EOF
5331 if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5332   rm -rf conftest*
5333   eval "ac_cv_lib_$ac_lib_var=yes"
5334 else
5335   echo "configure: failed program was:" >&5
5336   cat conftest.$ac_ext >&5
5337   rm -rf conftest*
5338   eval "ac_cv_lib_$ac_lib_var=no"
5339 fi
5340 rm -f conftest*
5341 xe_check_libs=""
5342
5343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5344   echo "$ac_t""yes" 1>&6
5345   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5346 else
5347   echo "$ac_t""no" 1>&6
5348 fi
5349
5350
5351       
5352 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5353 echo "configure:5354: checking for main in -lglade" >&5
5354 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5355
5356 xe_check_libs=" -lglade "
5357 cat > conftest.$ac_ext <<EOF
5358 #line 5359 "configure"
5359 #include "confdefs.h"
5360
5361 int main() {
5362 main()
5363 ; return 0; }
5364 EOF
5365 if { (eval echo configure:5366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5366   rm -rf conftest*
5367   eval "ac_cv_lib_$ac_lib_var=yes"
5368 else
5369   echo "configure: failed program was:" >&5
5370   cat conftest.$ac_ext >&5
5371   rm -rf conftest*
5372   eval "ac_cv_lib_$ac_lib_var=no"
5373 fi
5374 rm -f conftest*
5375 xe_check_libs=""
5376
5377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5378   echo "$ac_t""yes" 1>&6
5379   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5380 else
5381   echo "$ac_t""no" 1>&6
5382 fi
5383
5384
5385       
5386 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5387 echo "configure:5388: checking for main in -lglade-gnome" >&5
5388 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5389
5390 xe_check_libs=" -lglade-gnome "
5391 cat > conftest.$ac_ext <<EOF
5392 #line 5393 "configure"
5393 #include "confdefs.h"
5394
5395 int main() {
5396 main()
5397 ; return 0; }
5398 EOF
5399 if { (eval echo configure:5400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5400   rm -rf conftest*
5401   eval "ac_cv_lib_$ac_lib_var=yes"
5402 else
5403   echo "configure: failed program was:" >&5
5404   cat conftest.$ac_ext >&5
5405   rm -rf conftest*
5406   eval "ac_cv_lib_$ac_lib_var=no"
5407 fi
5408 rm -f conftest*
5409 xe_check_libs=""
5410
5411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5412   echo "$ac_t""yes" 1>&6
5413   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5414 else
5415   echo "$ac_t""no" 1>&6
5416 fi
5417
5418
5419       cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 #include <glade/glade-xml.h>
5423 EOF
5424 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5425   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5426   rm -rf conftest*
5427   echo "$ac_t""yes" 1>&6
5428                        { test "$extra_verbose" = "yes" && cat << \EOF
5429     Defining LIBGLADE_XML_TXTDOMAIN = 1
5430 EOF
5431 cat >> confdefs.h <<\EOF
5432 #define LIBGLADE_XML_TXTDOMAIN 1
5433 EOF
5434 }
5435
5436 else
5437   rm -rf conftest*
5438   echo "$ac_t""no" 1>&6
5439 fi
5440 rm -f conftest*
5441
5442       CFLAGS="${OLD_CFLAGS}"
5443       CPPFLAGS="${OLD_CPPFLAGS}"
5444       LDFLAGS="${OLD_LDFLAGS}"
5445 fi
5446
5447
5448 if test "$with_x11" != "no"; then
5449     test "$x_includes $x_libraries" != "NONE NONE" && \
5450    window_system=x11 with_x11=yes
5451
5452         
5453       if test "$x_includes $x_libraries" = "NONE NONE" \
5454     -a -n "$OPENWINHOME" \
5455     -a "$OPENWINHOME" != "/usr/openwin" \
5456     -a -d "$OPENWINHOME"; then
5457       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5458       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5459       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5460   fi
5461
5462   if test "$x_includes" = "NONE"; then
5463                     for dir in "/usr/X11" "/usr/X11R6"; do
5464       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5465     done
5466   fi
5467
5468   if test "$x_libraries" = "NONE"; then
5469     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5470       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5471     done
5472   fi
5473
5474   # If we find X, set shell vars x_includes and x_libraries to the
5475 # paths, otherwise set no_x=yes.
5476 # Uses ac_ vars as temps to allow command line to override cache and checks.
5477 # --without-x overrides everything else, but does not touch the cache.
5478 echo $ac_n "checking for X""... $ac_c" 1>&6
5479 echo "configure:5480: checking for X" >&5
5480
5481 # Check whether --with-x or --without-x was given.
5482 if test "${with_x+set}" = set; then
5483   withval="$with_x"
5484   :
5485 fi
5486
5487 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5488 if test "x$with_x" = xno; then
5489   # The user explicitly disabled X.
5490   have_x=disabled
5491 else
5492   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5493     # Both variables are already set.
5494     have_x=yes
5495   else
5496
5497 # One or both of the vars are not set, and there is no cached value.
5498 ac_x_includes=NO ac_x_libraries=NO
5499 rm -fr conftestdir
5500 if mkdir conftestdir; then
5501   cd conftestdir
5502   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5503   cat > Imakefile <<'EOF'
5504 acfindx:
5505         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5506 EOF
5507   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5508     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5509     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5510     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5511     for ac_extension in a so sl; do
5512       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5513         test -f $ac_im_libdir/libX11.$ac_extension; then
5514         ac_im_usrlibdir=$ac_im_libdir; break
5515       fi
5516     done
5517     # Screen out bogus values from the imake configuration.  They are
5518     # bogus both because they are the default anyway, and because
5519     # using them would break gcc on systems where it needs fixed includes.
5520     case "$ac_im_incroot" in
5521         /usr/include) ;;
5522         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5523     esac
5524     case "$ac_im_usrlibdir" in
5525         /usr/lib | /lib) ;;
5526         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5527     esac
5528   fi
5529   cd ..
5530   rm -fr conftestdir
5531 fi
5532
5533 if test "$ac_x_includes" = NO; then
5534   # Guess where to find include files, by looking for this one X11 .h file.
5535   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5536
5537   # First, try using that file with no special directory specified.
5538 cat > conftest.$ac_ext <<EOF
5539 #line 5540 "configure"
5540 #include "confdefs.h"
5541 #include <$x_direct_test_include>
5542 EOF
5543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5544 { (eval echo configure:5545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5546 if test -z "$ac_err"; then
5547   rm -rf conftest*
5548   # We can compile using X headers with no special include directory.
5549 ac_x_includes=
5550 else
5551   echo "$ac_err" >&5
5552   echo "configure: failed program was:" >&5
5553   cat conftest.$ac_ext >&5
5554   rm -rf conftest*
5555   # Look for the header file in a standard set of common directories.
5556 # Check X11 before X11Rn because it is often a symlink to the current release.
5557   for ac_dir in               \
5558     /usr/X11/include          \
5559     /usr/X11R6/include        \
5560     /usr/X11R5/include        \
5561     /usr/X11R4/include        \
5562                               \
5563     /usr/include/X11          \
5564     /usr/include/X11R6        \
5565     /usr/include/X11R5        \
5566     /usr/include/X11R4        \
5567                               \
5568     /usr/local/X11/include    \
5569     /usr/local/X11R6/include  \
5570     /usr/local/X11R5/include  \
5571     /usr/local/X11R4/include  \
5572                               \
5573     /usr/local/include/X11    \
5574     /usr/local/include/X11R6  \
5575     /usr/local/include/X11R5  \
5576     /usr/local/include/X11R4  \
5577                               \
5578     /usr/X386/include         \
5579     /usr/x386/include         \
5580     /usr/XFree86/include/X11  \
5581                               \
5582     /usr/include              \
5583     /usr/local/include        \
5584     /usr/unsupported/include  \
5585     /usr/athena/include       \
5586     /usr/local/x11r5/include  \
5587     /usr/lpp/Xamples/include  \
5588                               \
5589     /usr/openwin/include      \
5590     /usr/openwin/share/include \
5591     ; \
5592   do
5593     if test -r "$ac_dir/$x_direct_test_include"; then
5594       ac_x_includes=$ac_dir
5595       break
5596     fi
5597   done
5598 fi
5599 rm -f conftest*
5600 fi # $ac_x_includes = NO
5601
5602 if test "$ac_x_libraries" = NO; then
5603   # Check for the libraries.
5604
5605   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5606   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5607
5608   # See if we find them without any special options.
5609   # Don't add to $LIBS permanently.
5610   ac_save_LIBS="$LIBS"
5611   LIBS="-l$x_direct_test_library $LIBS"
5612 cat > conftest.$ac_ext <<EOF
5613 #line 5614 "configure"
5614 #include "confdefs.h"
5615
5616 int main() {
5617 ${x_direct_test_function}()
5618 ; return 0; }
5619 EOF
5620 if { (eval echo configure:5621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5621   rm -rf conftest*
5622   LIBS="$ac_save_LIBS"
5623 # We can link X programs with no special library path.
5624 ac_x_libraries=
5625 else
5626   echo "configure: failed program was:" >&5
5627   cat conftest.$ac_ext >&5
5628   rm -rf conftest*
5629   LIBS="$ac_save_LIBS"
5630 # First see if replacing the include by lib works.
5631 # Check X11 before X11Rn because it is often a symlink to the current release.
5632 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5633     /usr/X11/lib          \
5634     /usr/X11R6/lib        \
5635     /usr/X11R5/lib        \
5636     /usr/X11R4/lib        \
5637                           \
5638     /usr/lib/X11          \
5639     /usr/lib/X11R6        \
5640     /usr/lib/X11R5        \
5641     /usr/lib/X11R4        \
5642                           \
5643     /usr/local/X11/lib    \
5644     /usr/local/X11R6/lib  \
5645     /usr/local/X11R5/lib  \
5646     /usr/local/X11R4/lib  \
5647                           \
5648     /usr/local/lib/X11    \
5649     /usr/local/lib/X11R6  \
5650     /usr/local/lib/X11R5  \
5651     /usr/local/lib/X11R4  \
5652                           \
5653     /usr/X386/lib         \
5654     /usr/x386/lib         \
5655     /usr/XFree86/lib/X11  \
5656                           \
5657     /usr/lib              \
5658     /usr/local/lib        \
5659     /usr/unsupported/lib  \
5660     /usr/athena/lib       \
5661     /usr/local/x11r5/lib  \
5662     /usr/lpp/Xamples/lib  \
5663     /lib/usr/lib/X11      \
5664                           \
5665     /usr/openwin/lib      \
5666     /usr/openwin/share/lib \
5667     ; \
5668 do
5669   for ac_extension in a so sl; do
5670     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5671       ac_x_libraries=$ac_dir
5672       break 2
5673     fi
5674   done
5675 done
5676 fi
5677 rm -f conftest*
5678 fi # $ac_x_libraries = NO
5679
5680 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5681   # Didn't find X anywhere.  Cache the known absence of X.
5682   ac_cv_have_x="have_x=no"
5683 else
5684   # Record where we found X for the cache.
5685   ac_cv_have_x="have_x=yes \
5686                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5687 fi
5688   fi
5689   eval "$ac_cv_have_x"
5690 fi # $with_x != no
5691
5692 if test "$have_x" != yes; then
5693   echo "$ac_t""$have_x" 1>&6
5694   no_x=yes
5695 else
5696   # If each of the values was on the command line, it overrides each guess.
5697   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5698   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5699   # Update the cache value to reflect the command line values.
5700   ac_cv_have_x="have_x=yes \
5701                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5702   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5703 fi
5704
5705 if test "$no_x" = yes; then
5706   # Not all programs may use this symbol, but it does not hurt to define it.
5707   { test "$extra_verbose" = "yes" && cat << \EOF
5708     Defining X_DISPLAY_MISSING
5709 EOF
5710 cat >> confdefs.h <<\EOF
5711 #define X_DISPLAY_MISSING 1
5712 EOF
5713 }
5714
5715   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5716 else
5717   if test -n "$x_includes"; then
5718     X_CFLAGS="$X_CFLAGS -I$x_includes"
5719   fi
5720
5721   # It would also be nice to do this for all -L options, not just this one.
5722   if test -n "$x_libraries"; then
5723     X_LIBS="$X_LIBS -L$x_libraries"
5724     # For Solaris; some versions of Sun CC require a space after -R and
5725     # others require no space.  Words are not sufficient . . . .
5726     case "`(uname -sr) 2>/dev/null`" in
5727     "SunOS 5"*)
5728       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5729 echo "configure:5730: checking whether -R must be followed by a space" >&5
5730       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5731       cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5734
5735 int main() {
5736
5737 ; return 0; }
5738 EOF
5739 if { (eval echo configure:5740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5740   rm -rf conftest*
5741   ac_R_nospace=yes
5742 else
5743   echo "configure: failed program was:" >&5
5744   cat conftest.$ac_ext >&5
5745   rm -rf conftest*
5746   ac_R_nospace=no
5747 fi
5748 rm -f conftest*
5749       if test $ac_R_nospace = yes; then
5750         echo "$ac_t""no" 1>&6
5751         X_LIBS="$X_LIBS -R$x_libraries"
5752       else
5753         LIBS="$ac_xsave_LIBS -R $x_libraries"
5754         cat > conftest.$ac_ext <<EOF
5755 #line 5756 "configure"
5756 #include "confdefs.h"
5757
5758 int main() {
5759
5760 ; return 0; }
5761 EOF
5762 if { (eval echo configure:5763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5763   rm -rf conftest*
5764   ac_R_space=yes
5765 else
5766   echo "configure: failed program was:" >&5
5767   cat conftest.$ac_ext >&5
5768   rm -rf conftest*
5769   ac_R_space=no
5770 fi
5771 rm -f conftest*
5772         if test $ac_R_space = yes; then
5773           echo "$ac_t""yes" 1>&6
5774           X_LIBS="$X_LIBS -R $x_libraries"
5775         else
5776           echo "$ac_t""neither works" 1>&6
5777         fi
5778       fi
5779       LIBS="$ac_xsave_LIBS"
5780     esac
5781   fi
5782
5783   # Check for system-dependent libraries X programs must link with.
5784   # Do this before checking for the system-independent R6 libraries
5785   # (-lICE), since we may need -lsocket or whatever for X linking.
5786
5787   if test "$ISC" = yes; then
5788     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5789   else
5790     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5791     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5792     # the Alpha needs dnet_stub (dnet does not exist).
5793     if test "$with_dnet" = "no" ; then
5794 ac_cv_lib_dnet_dnet_ntoa=no
5795 else
5796
5797 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5798 echo "configure:5799: checking for dnet_ntoa in -ldnet" >&5
5799 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5800
5801 xe_check_libs=" -ldnet "
5802 cat > conftest.$ac_ext <<EOF
5803 #line 5804 "configure"
5804 #include "confdefs.h"
5805 /* Override any gcc2 internal prototype to avoid an error.  */
5806 /* We use char because int might match the return type of a gcc2
5807     builtin and then its argument prototype would still apply.  */
5808 char dnet_ntoa();
5809
5810 int main() {
5811 dnet_ntoa()
5812 ; return 0; }
5813 EOF
5814 if { (eval echo configure:5815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5815   rm -rf conftest*
5816   eval "ac_cv_lib_$ac_lib_var=yes"
5817 else
5818   echo "configure: failed program was:" >&5
5819   cat conftest.$ac_ext >&5
5820   rm -rf conftest*
5821   eval "ac_cv_lib_$ac_lib_var=no"
5822 fi
5823 rm -f conftest*
5824 xe_check_libs=""
5825
5826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5827   echo "$ac_t""yes" 1>&6
5828   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5829 else
5830   echo "$ac_t""no" 1>&6
5831 fi
5832
5833 fi
5834
5835     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5836       
5837 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5838 echo "configure:5839: checking for dnet_ntoa in -ldnet_stub" >&5
5839 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5840
5841 xe_check_libs=" -ldnet_stub "
5842 cat > conftest.$ac_ext <<EOF
5843 #line 5844 "configure"
5844 #include "confdefs.h"
5845 /* Override any gcc2 internal prototype to avoid an error.  */
5846 /* We use char because int might match the return type of a gcc2
5847     builtin and then its argument prototype would still apply.  */
5848 char dnet_ntoa();
5849
5850 int main() {
5851 dnet_ntoa()
5852 ; return 0; }
5853 EOF
5854 if { (eval echo configure:5855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5855   rm -rf conftest*
5856   eval "ac_cv_lib_$ac_lib_var=yes"
5857 else
5858   echo "configure: failed program was:" >&5
5859   cat conftest.$ac_ext >&5
5860   rm -rf conftest*
5861   eval "ac_cv_lib_$ac_lib_var=no"
5862 fi
5863 rm -f conftest*
5864 xe_check_libs=""
5865
5866 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5867   echo "$ac_t""yes" 1>&6
5868   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5869 else
5870   echo "$ac_t""no" 1>&6
5871 fi
5872
5873
5874     fi
5875
5876     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5877     # to get the SysV transport functions.
5878     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5879     # needs -lnsl.
5880     # The nsl library prevents programs from opening the X display
5881     # on Irix 5.2, according to dickey@clark.net.
5882     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5883 echo "configure:5884: checking for gethostbyname" >&5
5884
5885 cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 /* System header to define __stub macros and hopefully few prototypes,
5889     which can conflict with char gethostbyname(); below.  */
5890 #include <assert.h>
5891 /* Override any gcc2 internal prototype to avoid an error.  */
5892 /* We use char because int might match the return type of a gcc2
5893     builtin and then its argument prototype would still apply.  */
5894 char gethostbyname();
5895
5896 int main() {
5897
5898 /* The GNU C library defines this for functions which it implements
5899     to always fail with ENOSYS.  Some functions are actually named
5900     something starting with __ and the normal name is an alias.  */
5901 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5902 choke me
5903 #else
5904 gethostbyname();
5905 #endif
5906
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_func_gethostbyname=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_func_gethostbyname=no"
5917 fi
5918 rm -f conftest*
5919
5920 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5921   echo "$ac_t""yes" 1>&6
5922   :
5923 else
5924   echo "$ac_t""no" 1>&6
5925 fi
5926
5927     if test $ac_cv_func_gethostbyname = no; then
5928       
5929 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5930 echo "configure:5931: checking for gethostbyname in -lnsl" >&5
5931 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5932
5933 xe_check_libs=" -lnsl "
5934 cat > conftest.$ac_ext <<EOF
5935 #line 5936 "configure"
5936 #include "confdefs.h"
5937 /* Override any gcc2 internal prototype to avoid an error.  */
5938 /* We use char because int might match the return type of a gcc2
5939     builtin and then its argument prototype would still apply.  */
5940 char gethostbyname();
5941
5942 int main() {
5943 gethostbyname()
5944 ; return 0; }
5945 EOF
5946 if { (eval echo configure:5947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5947   rm -rf conftest*
5948   eval "ac_cv_lib_$ac_lib_var=yes"
5949 else
5950   echo "configure: failed program was:" >&5
5951   cat conftest.$ac_ext >&5
5952   rm -rf conftest*
5953   eval "ac_cv_lib_$ac_lib_var=no"
5954 fi
5955 rm -f conftest*
5956 xe_check_libs=""
5957
5958 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5959   echo "$ac_t""yes" 1>&6
5960   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5961 else
5962   echo "$ac_t""no" 1>&6
5963 fi
5964
5965
5966     fi
5967
5968     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5969     # socket/setsockopt and other routines are undefined under SCO ODT
5970     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5971     # on later versions), says simon@lia.di.epfl.ch: it contains
5972     # gethostby* variants that don't use the nameserver (or something).
5973     # -lsocket must be given before -lnsl if both are needed.
5974     # We assume that if connect needs -lnsl, so does gethostbyname.
5975     echo $ac_n "checking for connect""... $ac_c" 1>&6
5976 echo "configure:5977: checking for connect" >&5
5977
5978 cat > conftest.$ac_ext <<EOF
5979 #line 5980 "configure"
5980 #include "confdefs.h"
5981 /* System header to define __stub macros and hopefully few prototypes,
5982     which can conflict with char connect(); below.  */
5983 #include <assert.h>
5984 /* Override any gcc2 internal prototype to avoid an error.  */
5985 /* We use char because int might match the return type of a gcc2
5986     builtin and then its argument prototype would still apply.  */
5987 char connect();
5988
5989 int main() {
5990
5991 /* The GNU C library defines this for functions which it implements
5992     to always fail with ENOSYS.  Some functions are actually named
5993     something starting with __ and the normal name is an alias.  */
5994 #if defined (__stub_connect) || defined (__stub___connect)
5995 choke me
5996 #else
5997 connect();
5998 #endif
5999
6000 ; return 0; }
6001 EOF
6002 if { (eval echo configure:6003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6003   rm -rf conftest*
6004   eval "ac_cv_func_connect=yes"
6005 else
6006   echo "configure: failed program was:" >&5
6007   cat conftest.$ac_ext >&5
6008   rm -rf conftest*
6009   eval "ac_cv_func_connect=no"
6010 fi
6011 rm -f conftest*
6012
6013 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6014   echo "$ac_t""yes" 1>&6
6015   :
6016 else
6017   echo "$ac_t""no" 1>&6
6018 fi
6019
6020     if test $ac_cv_func_connect = no; then
6021       
6022 xe_msg_checking="for connect in -lsocket"
6023 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6024 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6025 echo "configure:6026: checking "$xe_msg_checking"" >&5
6026 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6027
6028 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6029 cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 /* Override any gcc2 internal prototype to avoid an error.  */
6033 /* We use char because int might match the return type of a gcc2
6034     builtin and then its argument prototype would still apply.  */
6035 char connect();
6036
6037 int main() {
6038 connect()
6039 ; return 0; }
6040 EOF
6041 if { (eval echo configure:6042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6042   rm -rf conftest*
6043   eval "ac_cv_lib_$ac_lib_var=yes"
6044 else
6045   echo "configure: failed program was:" >&5
6046   cat conftest.$ac_ext >&5
6047   rm -rf conftest*
6048   eval "ac_cv_lib_$ac_lib_var=no"
6049 fi
6050 rm -f conftest*
6051 xe_check_libs=""
6052
6053 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6054   echo "$ac_t""yes" 1>&6
6055   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6056 else
6057   echo "$ac_t""no" 1>&6
6058 fi
6059
6060
6061     fi
6062
6063     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6064     echo $ac_n "checking for remove""... $ac_c" 1>&6
6065 echo "configure:6066: checking for remove" >&5
6066
6067 cat > conftest.$ac_ext <<EOF
6068 #line 6069 "configure"
6069 #include "confdefs.h"
6070 /* System header to define __stub macros and hopefully few prototypes,
6071     which can conflict with char remove(); below.  */
6072 #include <assert.h>
6073 /* Override any gcc2 internal prototype to avoid an error.  */
6074 /* We use char because int might match the return type of a gcc2
6075     builtin and then its argument prototype would still apply.  */
6076 char remove();
6077
6078 int main() {
6079
6080 /* The GNU C library defines this for functions which it implements
6081     to always fail with ENOSYS.  Some functions are actually named
6082     something starting with __ and the normal name is an alias.  */
6083 #if defined (__stub_remove) || defined (__stub___remove)
6084 choke me
6085 #else
6086 remove();
6087 #endif
6088
6089 ; return 0; }
6090 EOF
6091 if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6092   rm -rf conftest*
6093   eval "ac_cv_func_remove=yes"
6094 else
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -rf conftest*
6098   eval "ac_cv_func_remove=no"
6099 fi
6100 rm -f conftest*
6101
6102 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6103   echo "$ac_t""yes" 1>&6
6104   :
6105 else
6106   echo "$ac_t""no" 1>&6
6107 fi
6108
6109     if test $ac_cv_func_remove = no; then
6110       
6111 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6112 echo "configure:6113: checking for remove in -lposix" >&5
6113 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6114
6115 xe_check_libs=" -lposix "
6116 cat > conftest.$ac_ext <<EOF
6117 #line 6118 "configure"
6118 #include "confdefs.h"
6119 /* Override any gcc2 internal prototype to avoid an error.  */
6120 /* We use char because int might match the return type of a gcc2
6121     builtin and then its argument prototype would still apply.  */
6122 char remove();
6123
6124 int main() {
6125 remove()
6126 ; return 0; }
6127 EOF
6128 if { (eval echo configure:6129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6129   rm -rf conftest*
6130   eval "ac_cv_lib_$ac_lib_var=yes"
6131 else
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   eval "ac_cv_lib_$ac_lib_var=no"
6136 fi
6137 rm -f conftest*
6138 xe_check_libs=""
6139
6140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6141   echo "$ac_t""yes" 1>&6
6142   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6143 else
6144   echo "$ac_t""no" 1>&6
6145 fi
6146
6147
6148     fi
6149
6150     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6151     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6152 echo "configure:6153: checking for shmat" >&5
6153
6154 cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 /* System header to define __stub macros and hopefully few prototypes,
6158     which can conflict with char shmat(); below.  */
6159 #include <assert.h>
6160 /* Override any gcc2 internal prototype to avoid an error.  */
6161 /* We use char because int might match the return type of a gcc2
6162     builtin and then its argument prototype would still apply.  */
6163 char shmat();
6164
6165 int main() {
6166
6167 /* The GNU C library defines this for functions which it implements
6168     to always fail with ENOSYS.  Some functions are actually named
6169     something starting with __ and the normal name is an alias.  */
6170 #if defined (__stub_shmat) || defined (__stub___shmat)
6171 choke me
6172 #else
6173 shmat();
6174 #endif
6175
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_func_shmat=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_func_shmat=no"
6186 fi
6187 rm -f conftest*
6188
6189 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6190   echo "$ac_t""yes" 1>&6
6191   :
6192 else
6193   echo "$ac_t""no" 1>&6
6194 fi
6195
6196     if test $ac_cv_func_shmat = no; then
6197       
6198 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6199 echo "configure:6200: checking for shmat in -lipc" >&5
6200 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6201
6202 xe_check_libs=" -lipc "
6203 cat > conftest.$ac_ext <<EOF
6204 #line 6205 "configure"
6205 #include "confdefs.h"
6206 /* Override any gcc2 internal prototype to avoid an error.  */
6207 /* We use char because int might match the return type of a gcc2
6208     builtin and then its argument prototype would still apply.  */
6209 char shmat();
6210
6211 int main() {
6212 shmat()
6213 ; return 0; }
6214 EOF
6215 if { (eval echo configure:6216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6216   rm -rf conftest*
6217   eval "ac_cv_lib_$ac_lib_var=yes"
6218 else
6219   echo "configure: failed program was:" >&5
6220   cat conftest.$ac_ext >&5
6221   rm -rf conftest*
6222   eval "ac_cv_lib_$ac_lib_var=no"
6223 fi
6224 rm -f conftest*
6225 xe_check_libs=""
6226
6227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6228   echo "$ac_t""yes" 1>&6
6229   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6230 else
6231   echo "$ac_t""no" 1>&6
6232 fi
6233
6234
6235     fi
6236   fi
6237
6238   # Check for libraries that X11R6 Xt/Xaw programs need.
6239   ac_save_LDFLAGS="$LDFLAGS"
6240   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6241   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6242   # check for ICE first), but we must link in the order -lSM -lICE or
6243   # we get undefined symbols.  So assume we have SM if we have ICE.
6244   # These have to be linked with before -lX11, unlike the other
6245   # libraries we check for below, so use a different variable.
6246   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6247   
6248 xe_msg_checking="for IceConnectionNumber in -lICE"
6249 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6250 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6251 echo "configure:6252: checking "$xe_msg_checking"" >&5
6252 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6253
6254 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6255 cat > conftest.$ac_ext <<EOF
6256 #line 6257 "configure"
6257 #include "confdefs.h"
6258 /* Override any gcc2 internal prototype to avoid an error.  */
6259 /* We use char because int might match the return type of a gcc2
6260     builtin and then its argument prototype would still apply.  */
6261 char IceConnectionNumber();
6262
6263 int main() {
6264 IceConnectionNumber()
6265 ; return 0; }
6266 EOF
6267 if { (eval echo configure:6268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6268   rm -rf conftest*
6269   eval "ac_cv_lib_$ac_lib_var=yes"
6270 else
6271   echo "configure: failed program was:" >&5
6272   cat conftest.$ac_ext >&5
6273   rm -rf conftest*
6274   eval "ac_cv_lib_$ac_lib_var=no"
6275 fi
6276 rm -f conftest*
6277 xe_check_libs=""
6278
6279 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6280   echo "$ac_t""yes" 1>&6
6281   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6282 else
6283   echo "$ac_t""no" 1>&6
6284 fi
6285
6286
6287   LDFLAGS="$ac_save_LDFLAGS"
6288
6289 fi
6290  # Autoconf claims to find X library and include dirs for us.
6291   if test "$no_x" = "yes"
6292   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6293   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6294   fi
6295 fi
6296
6297
6298 if test "$with_x11" = "yes"; then
6299   { test "$extra_verbose" = "yes" && cat << \EOF
6300     Defining HAVE_X_WINDOWS
6301 EOF
6302 cat >> confdefs.h <<\EOF
6303 #define HAVE_X_WINDOWS 1
6304 EOF
6305 }
6306
6307   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6308   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6309
6310       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6311     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6312     if test -d "$lib_dir" -a -d "$inc_dir"; then
6313       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6314         x_libraries="$lib_dir $x_libraries"
6315         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6316       esac
6317       case "$x_includes" in "$inc_dir"* ) ;; *)
6318         x_includes="$inc_dir $x_includes"
6319         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6320       esac
6321       break;       fi
6322   done
6323
6324     for rel in "X11R6" "X11R5" "X11R4"; do
6325     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6326     if test -d "$lib_dir" -a -d "$inc_dir"; then
6327       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6328         x_libraries="$x_libraries $lib_dir"
6329         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6330       esac
6331       case "$x_includes" in "$inc_dir"* ) ;; *)
6332         x_includes="$x_includes $inc_dir"
6333         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6334       esac
6335       break;     fi
6336   done
6337
6338     case "$opsys" in
6339   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 ;;
6340   esac
6341
6342   ld_switch_x_site="$X_LIBS"
6343
6344   
6345 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6346     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6347   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6348   
6349         runpath="" runpath_dirs=""
6350   if test -n "$LD_RUN_PATH"; then
6351     runpath="$LD_RUN_PATH"
6352   elif test "$GCC" = "yes"; then
6353         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6354     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6355     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6356     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6357       case "$arg" in P,* | -L* | -R* )
6358         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6359           {
6360 xe_runpath_dir="$dir"
6361   test "$xe_runpath_dir" != "/lib"     -a \
6362         "$xe_runpath_dir" != "/usr/lib" -a \
6363         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6364   eval "$xe_add_unique_runpath_dir"
6365 }
6366         done ;;
6367       esac
6368     done
6369     ld_switch_run="$ld_switch_run_save"
6370     rm -f conftest*
6371   else
6372         for arg in $ld_switch_site $ld_switch_x_site; do
6373       case "$arg" in -L*) {
6374 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6375   test "$xe_runpath_dir" != "/lib"     -a \
6376         "$xe_runpath_dir" != "/usr/lib" -a \
6377         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6378   eval "$xe_add_unique_runpath_dir"
6379 };; esac
6380     done
6381         if test "$opsys $need_motif" = "sol2 yes"; then
6382       xe_runpath_dir="/opt/SUNWdt/lib";
6383       eval "$xe_add_unique_runpath_dir";
6384     fi
6385   fi 
6386   if test -n "$runpath"; then
6387     ld_switch_run="${dash_r}${runpath}"
6388     
6389 if test "$GCC" = "yes"; then
6390   set x $ld_switch_run; shift; ld_switch_run=""
6391   while test -n "$1"; do
6392     case $1 in
6393       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6394       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6395       -Xlinker* ) ;;
6396       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6397     esac
6398     shift
6399   done
6400 fi
6401     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6402   fi
6403 fi
6404
6405
6406   if test "$extra_verbose" = "yes"; then
6407     echo; echo "X11 compilation variables:"
6408     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6409     echo
6410   fi
6411
6412             bitmapdirs=
6413   if test "$x_includes" != NONE; then
6414     for i in $x_includes; do
6415       if test -d "$i/bitmaps"; then
6416         bitmapdirs="$i/bitmaps:$bitmapdirs"
6417       fi
6418       if test -d "$i/X11/bitmaps"; then
6419         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6420       fi
6421     done
6422     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6423   fi
6424   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6425     Defining BITMAPDIR = "$bitmapdirs"
6426 EOF
6427 cat >> confdefs.h <<EOF
6428 #define BITMAPDIR "$bitmapdirs"
6429 EOF
6430 }
6431
6432
6433     echo "checking for X defines extracted by xmkmf" 1>&6
6434 echo "configure:6435: checking for X defines extracted by xmkmf" >&5
6435   rm -fr conftestdir
6436   if mkdir conftestdir; then
6437     cd conftestdir
6438     cat > Imakefile <<'EOF'
6439 xetest:
6440         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6441 EOF
6442     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6443       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6444       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6445     fi
6446     cd ..
6447     rm -fr conftestdir
6448     for word in $xmkmf_defines; do
6449       case "$word" in 
6450       -D__STDC__*) ;;
6451       -D* )
6452         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6453         case "$word" in
6454           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6455           *     ) val=1 ;;
6456         esac
6457         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6458           if test "$val" = "1"
6459             then { test "$extra_verbose" = "yes" && cat << EOF
6460     Defining $sym
6461 EOF
6462 cat >> confdefs.h <<EOF
6463 #define $sym 1
6464 EOF
6465 }
6466
6467             else { test "$extra_verbose" = "yes" && cat << EOF
6468     Defining $sym = $val
6469 EOF
6470 cat >> confdefs.h <<EOF
6471 #define $sym $val
6472 EOF
6473 }
6474
6475           fi
6476         fi  ;;
6477       esac
6478     done
6479   fi
6480
6481     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6482 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6483 echo "configure:6484: checking for X11/Intrinsic.h" >&5
6484
6485 cat > conftest.$ac_ext <<EOF
6486 #line 6487 "configure"
6487 #include "confdefs.h"
6488 #include <X11/Intrinsic.h>
6489 EOF
6490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6491 { (eval echo configure:6492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6493 if test -z "$ac_err"; then
6494   rm -rf conftest*
6495   eval "ac_cv_header_$ac_safe=yes"
6496 else
6497   echo "$ac_err" >&5
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_header_$ac_safe=no"
6502 fi
6503 rm -f conftest*
6504 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6505   echo "$ac_t""yes" 1>&6
6506   :
6507 else
6508   echo "$ac_t""no" 1>&6
6509 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6510 fi
6511
6512
6513       
6514 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6515 echo "configure:6516: checking for XOpenDisplay in -lX11" >&5
6516 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6517
6518 xe_check_libs=" -lX11 "
6519 cat > conftest.$ac_ext <<EOF
6520 #line 6521 "configure"
6521 #include "confdefs.h"
6522 /* Override any gcc2 internal prototype to avoid an error.  */
6523 /* We use char because int might match the return type of a gcc2
6524     builtin and then its argument prototype would still apply.  */
6525 char XOpenDisplay();
6526
6527 int main() {
6528 XOpenDisplay()
6529 ; return 0; }
6530 EOF
6531 if { (eval echo configure:6532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6532   rm -rf conftest*
6533   eval "ac_cv_lib_$ac_lib_var=yes"
6534 else
6535   echo "configure: failed program was:" >&5
6536   cat conftest.$ac_ext >&5
6537   rm -rf conftest*
6538   eval "ac_cv_lib_$ac_lib_var=no"
6539 fi
6540 rm -f conftest*
6541 xe_check_libs=""
6542
6543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6544   echo "$ac_t""yes" 1>&6
6545   have_lib_x11=yes
6546 else
6547   echo "$ac_t""no" 1>&6
6548 fi
6549
6550
6551   if test "$have_lib_x11" != "yes"; then
6552     
6553 xe_msg_checking="for XGetFontProperty in -lX11"
6554 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6555 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6556 echo "configure:6557: checking "$xe_msg_checking"" >&5
6557 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6558
6559 xe_check_libs=" -lX11 -b i486-linuxaout"
6560 cat > conftest.$ac_ext <<EOF
6561 #line 6562 "configure"
6562 #include "confdefs.h"
6563 /* Override any gcc2 internal prototype to avoid an error.  */
6564 /* We use char because int might match the return type of a gcc2
6565     builtin and then its argument prototype would still apply.  */
6566 char XGetFontProperty();
6567
6568 int main() {
6569 XGetFontProperty()
6570 ; return 0; }
6571 EOF
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6573   rm -rf conftest*
6574   eval "ac_cv_lib_$ac_lib_var=yes"
6575 else
6576   echo "configure: failed program was:" >&5
6577   cat conftest.$ac_ext >&5
6578   rm -rf conftest*
6579   eval "ac_cv_lib_$ac_lib_var=no"
6580 fi
6581 rm -f conftest*
6582 xe_check_libs=""
6583
6584 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6585   echo "$ac_t""yes" 1>&6
6586   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6587 else
6588   echo "$ac_t""no" 1>&6
6589 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6590 fi
6591
6592
6593   fi
6594   libs_x="-lX11"
6595   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6596
6597     
6598 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6599 echo "configure:6600: checking for XShapeSelectInput in -lXext" >&5
6600 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6601
6602 xe_check_libs=" -lXext "
6603 cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 /* Override any gcc2 internal prototype to avoid an error.  */
6607 /* We use char because int might match the return type of a gcc2
6608     builtin and then its argument prototype would still apply.  */
6609 char XShapeSelectInput();
6610
6611 int main() {
6612 XShapeSelectInput()
6613 ; return 0; }
6614 EOF
6615 if { (eval echo configure:6616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6616   rm -rf conftest*
6617   eval "ac_cv_lib_$ac_lib_var=yes"
6618 else
6619   echo "configure: failed program was:" >&5
6620   cat conftest.$ac_ext >&5
6621   rm -rf conftest*
6622   eval "ac_cv_lib_$ac_lib_var=no"
6623 fi
6624 rm -f conftest*
6625 xe_check_libs=""
6626
6627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6628   echo "$ac_t""yes" 1>&6
6629   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6630 else
6631   echo "$ac_t""no" 1>&6
6632 fi
6633
6634
6635
6636     
6637 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6638 echo "configure:6639: checking for XtOpenDisplay in -lXt" >&5
6639 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6640
6641 xe_check_libs=" -lXt "
6642 cat > conftest.$ac_ext <<EOF
6643 #line 6644 "configure"
6644 #include "confdefs.h"
6645 /* Override any gcc2 internal prototype to avoid an error.  */
6646 /* We use char because int might match the return type of a gcc2
6647     builtin and then its argument prototype would still apply.  */
6648 char XtOpenDisplay();
6649
6650 int main() {
6651 XtOpenDisplay()
6652 ; return 0; }
6653 EOF
6654 if { (eval echo configure:6655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6655   rm -rf conftest*
6656   eval "ac_cv_lib_$ac_lib_var=yes"
6657 else
6658   echo "configure: failed program was:" >&5
6659   cat conftest.$ac_ext >&5
6660   rm -rf conftest*
6661   eval "ac_cv_lib_$ac_lib_var=no"
6662 fi
6663 rm -f conftest*
6664 xe_check_libs=""
6665
6666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6667   echo "$ac_t""yes" 1>&6
6668   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6669 else
6670   echo "$ac_t""no" 1>&6
6671 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6672 fi
6673
6674
6675
6676   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6677 echo "configure:6678: checking the version of X11 being used" >&5
6678   cat > conftest.$ac_ext <<EOF
6679 #line 6680 "configure"
6680 #include "confdefs.h"
6681 #include <X11/Intrinsic.h>
6682     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6683 EOF
6684 if { (eval echo configure:6685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6685 then
6686   ./conftest foobar; x11_release=$?
6687 else
6688   conftest_rc="$?"
6689   echo "configure: failed program was:" >&5
6690   cat conftest.$ac_ext >&5
6691   rm -fr conftest*
6692   x11_release=4
6693 fi
6694 rm -fr conftest*
6695   echo "$ac_t""R${x11_release}" 1>&6
6696   { test "$extra_verbose" = "yes" && cat << EOF
6697     Defining THIS_IS_X11R${x11_release}
6698 EOF
6699 cat >> confdefs.h <<EOF
6700 #define THIS_IS_X11R${x11_release} 1
6701 EOF
6702 }
6703
6704
6705   if test "${x11_release}" = "4"; then
6706     case "$with_widgets" in
6707       "" | "no") with_widgets=no ;;
6708       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6709     esac
6710   fi
6711
6712   for ac_func in XConvertCase
6713 do
6714 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6715 echo "configure:6716: checking for $ac_func" >&5
6716
6717 cat > conftest.$ac_ext <<EOF
6718 #line 6719 "configure"
6719 #include "confdefs.h"
6720 /* System header to define __stub macros and hopefully few prototypes,
6721     which can conflict with char $ac_func(); below.  */
6722 #include <assert.h>
6723 /* Override any gcc2 internal prototype to avoid an error.  */
6724 /* We use char because int might match the return type of a gcc2
6725     builtin and then its argument prototype would still apply.  */
6726 char $ac_func();
6727
6728 int main() {
6729
6730 /* The GNU C library defines this for functions which it implements
6731     to always fail with ENOSYS.  Some functions are actually named
6732     something starting with __ and the normal name is an alias.  */
6733 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6734 choke me
6735 #else
6736 $ac_func();
6737 #endif
6738
6739 ; return 0; }
6740 EOF
6741 if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6742   rm -rf conftest*
6743   eval "ac_cv_func_$ac_func=yes"
6744 else
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -rf conftest*
6748   eval "ac_cv_func_$ac_func=no"
6749 fi
6750 rm -f conftest*
6751
6752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6753   echo "$ac_t""yes" 1>&6
6754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6755   { test "$extra_verbose" = "yes" && cat << EOF
6756     Defining $ac_tr_func
6757 EOF
6758 cat >> confdefs.h <<EOF
6759 #define $ac_tr_func 1
6760 EOF
6761 }
6762  
6763 else
6764   echo "$ac_t""no" 1>&6
6765 fi
6766 done
6767
6768
6769   for ac_hdr in X11/Xlocale.h
6770 do
6771 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6772 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6773 echo "configure:6774: checking for $ac_hdr" >&5
6774
6775 cat > conftest.$ac_ext <<EOF
6776 #line 6777 "configure"
6777 #include "confdefs.h"
6778 #include <$ac_hdr>
6779 EOF
6780 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6781 { (eval echo configure:6782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6782 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6783 if test -z "$ac_err"; then
6784   rm -rf conftest*
6785   eval "ac_cv_header_$ac_safe=yes"
6786 else
6787   echo "$ac_err" >&5
6788   echo "configure: failed program was:" >&5
6789   cat conftest.$ac_ext >&5
6790   rm -rf conftest*
6791   eval "ac_cv_header_$ac_safe=no"
6792 fi
6793 rm -f conftest*
6794 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6795   echo "$ac_t""yes" 1>&6
6796     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6797   { test "$extra_verbose" = "yes" && cat << EOF
6798     Defining $ac_tr_hdr
6799 EOF
6800 cat >> confdefs.h <<EOF
6801 #define $ac_tr_hdr 1
6802 EOF
6803 }
6804  
6805 else
6806   echo "$ac_t""no" 1>&6
6807 fi
6808 done
6809
6810
6811     for ac_func in XRegisterIMInstantiateCallback
6812 do
6813 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6814 echo "configure:6815: checking for $ac_func" >&5
6815
6816 cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6819 /* System header to define __stub macros and hopefully few prototypes,
6820     which can conflict with char $ac_func(); below.  */
6821 #include <assert.h>
6822 /* Override any gcc2 internal prototype to avoid an error.  */
6823 /* We use char because int might match the return type of a gcc2
6824     builtin and then its argument prototype would still apply.  */
6825 char $ac_func();
6826
6827 int main() {
6828
6829 /* The GNU C library defines this for functions which it implements
6830     to always fail with ENOSYS.  Some functions are actually named
6831     something starting with __ and the normal name is an alias.  */
6832 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6833 choke me
6834 #else
6835 $ac_func();
6836 #endif
6837
6838 ; return 0; }
6839 EOF
6840 if { (eval echo configure:6841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6841   rm -rf conftest*
6842   eval "ac_cv_func_$ac_func=yes"
6843 else
6844   echo "configure: failed program was:" >&5
6845   cat conftest.$ac_ext >&5
6846   rm -rf conftest*
6847   eval "ac_cv_func_$ac_func=no"
6848 fi
6849 rm -f conftest*
6850
6851 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6852   echo "$ac_t""yes" 1>&6
6853     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6854   { test "$extra_verbose" = "yes" && cat << EOF
6855     Defining $ac_tr_func
6856 EOF
6857 cat >> confdefs.h <<EOF
6858 #define $ac_tr_func 1
6859 EOF
6860 }
6861  
6862 else
6863   echo "$ac_t""no" 1>&6
6864 fi
6865 done
6866
6867   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6868 echo "configure:6869: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6869   cat > conftest.$ac_ext <<EOF
6870 #line 6871 "configure"
6871 #include "confdefs.h"
6872
6873 #define NeedFunctionPrototypes 1
6874 #include <X11/Xlib.h>
6875 extern Bool XRegisterIMInstantiateCallback(
6876    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6877
6878 int main() {
6879
6880 ; return 0; }
6881 EOF
6882 if { (eval echo configure:6883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6883   rm -rf conftest*
6884   echo "$ac_t""yes" 1>&6
6885 else
6886   echo "configure: failed program was:" >&5
6887   cat conftest.$ac_ext >&5
6888   rm -rf conftest*
6889   echo "$ac_t""no" 1>&6
6890    { test "$extra_verbose" = "yes" && cat << \EOF
6891     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6892 EOF
6893 cat >> confdefs.h <<\EOF
6894 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6895 EOF
6896 }
6897
6898 fi
6899 rm -f conftest*
6900
6901     test -z "$with_xmu" && { 
6902 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6903 echo "configure:6904: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6904 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6905
6906 xe_check_libs=" -lXmu "
6907 cat > conftest.$ac_ext <<EOF
6908 #line 6909 "configure"
6909 #include "confdefs.h"
6910 /* Override any gcc2 internal prototype to avoid an error.  */
6911 /* We use char because int might match the return type of a gcc2
6912     builtin and then its argument prototype would still apply.  */
6913 char XmuReadBitmapDataFromFile();
6914
6915 int main() {
6916 XmuReadBitmapDataFromFile()
6917 ; return 0; }
6918 EOF
6919 if { (eval echo configure:6920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6920   rm -rf conftest*
6921   eval "ac_cv_lib_$ac_lib_var=yes"
6922 else
6923   echo "configure: failed program was:" >&5
6924   cat conftest.$ac_ext >&5
6925   rm -rf conftest*
6926   eval "ac_cv_lib_$ac_lib_var=no"
6927 fi
6928 rm -f conftest*
6929 xe_check_libs=""
6930
6931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6932   echo "$ac_t""yes" 1>&6
6933   with_xmu=yes
6934 else
6935   echo "$ac_t""no" 1>&6
6936 with_xmu=no
6937 fi
6938
6939  }
6940   if test "$with_xmu" = "no"; then
6941     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6942    echo "    xemacs will be linked with \"xmu.o\""
6943  fi
6944   else
6945     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6946     { test "$extra_verbose" = "yes" && cat << \EOF
6947     Defining HAVE_XMU
6948 EOF
6949 cat >> confdefs.h <<\EOF
6950 #define HAVE_XMU 1
6951 EOF
6952 }
6953
6954   fi
6955
6956       
6957 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6958 echo "configure:6959: checking for main in -lXbsd" >&5
6959 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6960
6961 xe_check_libs=" -lXbsd "
6962 cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6965
6966 int main() {
6967 main()
6968 ; return 0; }
6969 EOF
6970 if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6971   rm -rf conftest*
6972   eval "ac_cv_lib_$ac_lib_var=yes"
6973 else
6974   echo "configure: failed program was:" >&5
6975   cat conftest.$ac_ext >&5
6976   rm -rf conftest*
6977   eval "ac_cv_lib_$ac_lib_var=no"
6978 fi
6979 rm -f conftest*
6980 xe_check_libs=""
6981
6982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6983   echo "$ac_t""yes" 1>&6
6984   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6985 else
6986   echo "$ac_t""no" 1>&6
6987 fi
6988
6989
6990
6991     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6992         if test "$GCC" = "yes"; then
6993       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6994       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6995     else
6996       case "$CC" in
6997         "xlc" ) CC="xlc_r" ;;
6998         "xlC" ) CC="xlC_r" ;;
6999         "cc"  ) CC="cc_r" ;;
7000       esac
7001     fi
7002   fi
7003
7004 fi 
7005 if test "$with_msw" != "no"; then
7006   echo "checking for MS-Windows" 1>&6
7007 echo "configure:7008: checking for MS-Windows" >&5
7008   
7009 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
7010 echo "configure:7011: checking for main in -lgdi32" >&5
7011 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
7012
7013 xe_check_libs=" -lgdi32 "
7014 cat > conftest.$ac_ext <<EOF
7015 #line 7016 "configure"
7016 #include "confdefs.h"
7017
7018 int main() {
7019 main()
7020 ; return 0; }
7021 EOF
7022 if { (eval echo configure:7023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7023   rm -rf conftest*
7024   eval "ac_cv_lib_$ac_lib_var=yes"
7025 else
7026   echo "configure: failed program was:" >&5
7027   cat conftest.$ac_ext >&5
7028   rm -rf conftest*
7029   eval "ac_cv_lib_$ac_lib_var=no"
7030 fi
7031 rm -f conftest*
7032 xe_check_libs=""
7033
7034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7035   echo "$ac_t""yes" 1>&6
7036   with_msw=yes
7037 else
7038   echo "$ac_t""no" 1>&6
7039 fi
7040
7041
7042   if test "$with_msw" = "yes"; then
7043     { test "$extra_verbose" = "yes" && cat << \EOF
7044     Defining HAVE_MS_WINDOWS
7045 EOF
7046 cat >> confdefs.h <<\EOF
7047 #define HAVE_MS_WINDOWS 1
7048 EOF
7049 }
7050
7051
7052         if test "$with_netinstall" = "yes"; then
7053       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7054       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7055       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7056     fi
7057
7058     install_pp="$blddir/lib-src/installexe.sh"
7059     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
7060     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7061     if test "$window_system" != x11; then
7062         window_system=msw
7063         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7064             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7065    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7066  fi
7067         test "$with_menubars"   != "no" && with_menubars=msw \
7068             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7069    echo "    xemacs will be linked with \"menubar-msw.o\""
7070  fi
7071         test "$with_toolbars"   != "no" && with_toolbars=msw \
7072             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7073    echo "    xemacs will be linked with \"toolbar-msw.o\""
7074  fi
7075         test "$with_dialogs"   != "no" && with_dialogs=msw \
7076             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7077    echo "    xemacs will be linked with \"dialog-msw.o\""
7078  fi
7079         test "$with_widgets"   != "no" && with_widgets=msw
7080     else
7081         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7082    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7083  fi
7084         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7085    echo "    xemacs will be linked with \"menubar-msw.o\""
7086  fi
7087         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7088    echo "    xemacs will be linked with \"toolbar-msw.o\""
7089  fi
7090         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7091    echo "    xemacs will be linked with \"dialog-msw.o\""
7092  fi
7093     fi
7094         cat > conftest.$ac_ext <<EOF
7095 #line 7096 "configure"
7096 #include "confdefs.h"
7097 #include <fcntl.h>
7098     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7099 EOF
7100 if { (eval echo configure:7101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7101 then
7102   need_event_unixoid=yes; { test "$extra_verbose" = "yes" && cat << \EOF
7103     Defining HAVE_MSG_SELECT
7104 EOF
7105 cat >> confdefs.h <<\EOF
7106 #define HAVE_MSG_SELECT 1
7107 EOF
7108 }
7109
7110 else
7111   conftest_rc="$?"
7112   echo "configure: failed program was:" >&5
7113   cat conftest.$ac_ext >&5
7114 fi
7115 rm -fr conftest*
7116     with_file_coding=yes
7117     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
7118    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\""
7119  fi
7120   fi
7121 fi
7122
7123
7124
7125 test -z "$window_system" && window_system="none"
7126
7127 if test "$window_system" = "none"; then
7128   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7129   do
7130     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7131        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7132     fi
7133     eval "with_${feature}=no"
7134   done
7135 else
7136   test -z "$with_toolbars" && with_toolbars=yes
7137 fi
7138
7139 if test "$with_msw" != "yes"; then
7140   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7141   do
7142     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7143        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7144     fi
7145     eval "with_${feature}=no"
7146   done
7147 else
7148   :
7149 fi
7150
7151 if test "$with_x11" != "yes"; then
7152             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7153   do
7154     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7155        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7156     fi
7157     eval "with_${feature}=no"
7158   done
7159 fi
7160
7161 if test "$with_x11" = "yes"; then
7162   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7163 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7164 echo "configure:7165: checking for X11/extensions/shape.h" >&5
7165
7166 cat > conftest.$ac_ext <<EOF
7167 #line 7168 "configure"
7168 #include "confdefs.h"
7169 #include <X11/extensions/shape.h>
7170 EOF
7171 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7172 { (eval echo configure:7173: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7173 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7174 if test -z "$ac_err"; then
7175   rm -rf conftest*
7176   eval "ac_cv_header_$ac_safe=yes"
7177 else
7178   echo "$ac_err" >&5
7179   echo "configure: failed program was:" >&5
7180   cat conftest.$ac_ext >&5
7181   rm -rf conftest*
7182   eval "ac_cv_header_$ac_safe=no"
7183 fi
7184 rm -f conftest*
7185 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7186   echo "$ac_t""yes" 1>&6
7187   
7188    { test "$extra_verbose" = "yes" && cat << \EOF
7189     Defining HAVE_BALLOON_HELP
7190 EOF
7191 cat >> confdefs.h <<\EOF
7192 #define HAVE_BALLOON_HELP 1
7193 EOF
7194 }
7195
7196    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7197    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7198  fi
7199 else
7200   echo "$ac_t""no" 1>&6
7201 fi
7202
7203 fi
7204
7205 bitmapdir=
7206
7207 case "$window_system" in
7208   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7209   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7210   gtk  )
7211        HAVE_X_WINDOWS=no
7212        test "$with_gnome" = "yes" && echo "  Using GNOME."
7213        test "$with_gnome" = "no" && echo "  Using GTK."
7214        ;;
7215   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7216 esac
7217
7218 case "$x_libraries" in *X11R4* )
7219   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7220   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7221 esac
7222
7223 echo "checking for WM_COMMAND option" 1>&6
7224 echo "configure:7225: checking for WM_COMMAND option" >&5;
7225 if test "$with_wmcommand" != "no"; then
7226   { test "$extra_verbose" = "yes" && cat << \EOF
7227     Defining HAVE_WMCOMMAND
7228 EOF
7229 cat >> confdefs.h <<\EOF
7230 #define HAVE_WMCOMMAND 1
7231 EOF
7232 }
7233
7234 fi
7235
7236 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7237 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7238 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7239 echo "configure:7240: checking for X11/Xauth.h" >&5
7240
7241 cat > conftest.$ac_ext <<EOF
7242 #line 7243 "configure"
7243 #include "confdefs.h"
7244 #include <X11/Xauth.h>
7245 EOF
7246 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7247 { (eval echo configure:7248: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7248 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7249 if test -z "$ac_err"; then
7250   rm -rf conftest*
7251   eval "ac_cv_header_$ac_safe=yes"
7252 else
7253   echo "$ac_err" >&5
7254   echo "configure: failed program was:" >&5
7255   cat conftest.$ac_ext >&5
7256   rm -rf conftest*
7257   eval "ac_cv_header_$ac_safe=no"
7258 fi
7259 rm -f conftest*
7260 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7261   echo "$ac_t""yes" 1>&6
7262   :
7263 else
7264   echo "$ac_t""no" 1>&6
7265 with_xauth=no
7266 fi
7267  }
7268 test -z "$with_xauth" && { 
7269 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7270 echo "configure:7271: checking for XauGetAuthByAddr in -lXau" >&5
7271 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7272
7273 xe_check_libs=" -lXau "
7274 cat > conftest.$ac_ext <<EOF
7275 #line 7276 "configure"
7276 #include "confdefs.h"
7277 /* Override any gcc2 internal prototype to avoid an error.  */
7278 /* We use char because int might match the return type of a gcc2
7279     builtin and then its argument prototype would still apply.  */
7280 char XauGetAuthByAddr();
7281
7282 int main() {
7283 XauGetAuthByAddr()
7284 ; return 0; }
7285 EOF
7286 if { (eval echo configure:7287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7287   rm -rf conftest*
7288   eval "ac_cv_lib_$ac_lib_var=yes"
7289 else
7290   echo "configure: failed program was:" >&5
7291   cat conftest.$ac_ext >&5
7292   rm -rf conftest*
7293   eval "ac_cv_lib_$ac_lib_var=no"
7294 fi
7295 rm -f conftest*
7296 xe_check_libs=""
7297
7298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7299   echo "$ac_t""yes" 1>&6
7300   :
7301 else
7302   echo "$ac_t""no" 1>&6
7303 with_xauth=no
7304 fi
7305
7306  }
7307 test -z "$with_xauth" && with_xauth=yes
7308 if test "$with_xauth" = "yes"; then
7309   { test "$extra_verbose" = "yes" && cat << \EOF
7310     Defining HAVE_XAUTH
7311 EOF
7312 cat >> confdefs.h <<\EOF
7313 #define HAVE_XAUTH 1
7314 EOF
7315 }
7316
7317   
7318 T=""
7319 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
7320 libs_xauth="$T"
7321
7322 fi
7323
7324
7325
7326
7327 if test "$with_tooltalk" != "no" ; then
7328       for dir in "" "Tt/" "desktop/" ; do
7329     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7330 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7331 echo "configure:7332: checking for ${dir}tt_c.h" >&5
7332
7333 cat > conftest.$ac_ext <<EOF
7334 #line 7335 "configure"
7335 #include "confdefs.h"
7336 #include <${dir}tt_c.h>
7337 EOF
7338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7339 { (eval echo configure:7340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7341 if test -z "$ac_err"; then
7342   rm -rf conftest*
7343   eval "ac_cv_header_$ac_safe=yes"
7344 else
7345   echo "$ac_err" >&5
7346   echo "configure: failed program was:" >&5
7347   cat conftest.$ac_ext >&5
7348   rm -rf conftest*
7349   eval "ac_cv_header_$ac_safe=no"
7350 fi
7351 rm -f conftest*
7352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7353   echo "$ac_t""yes" 1>&6
7354   tt_c_h_file="${dir}tt_c.h"; break
7355 else
7356   echo "$ac_t""no" 1>&6
7357 fi
7358
7359   done
7360   if test -z "$tt_c_h_file"; then
7361     if test "$with_tooltalk" = "yes"; then
7362       (echo "$progname: Usage error:"
7363 echo " " "Unable to find required tooltalk header files."
7364 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7365     fi
7366     with_tooltalk=no
7367   fi
7368 fi
7369 if test "$with_tooltalk" != "no" ; then
7370   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7371     
7372 xe_msg_checking="for tt_message_create in -ltt"
7373 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7374 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7375 echo "configure:7376: checking "$xe_msg_checking"" >&5
7376 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7377
7378 xe_check_libs=" -ltt $extra_libs"
7379 cat > conftest.$ac_ext <<EOF
7380 #line 7381 "configure"
7381 #include "confdefs.h"
7382 /* Override any gcc2 internal prototype to avoid an error.  */
7383 /* We use char because int might match the return type of a gcc2
7384     builtin and then its argument prototype would still apply.  */
7385 char tt_message_create();
7386
7387 int main() {
7388 tt_message_create()
7389 ; return 0; }
7390 EOF
7391 if { (eval echo configure:7392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7392   rm -rf conftest*
7393   eval "ac_cv_lib_$ac_lib_var=yes"
7394 else
7395   echo "configure: failed program was:" >&5
7396   cat conftest.$ac_ext >&5
7397   rm -rf conftest*
7398   eval "ac_cv_lib_$ac_lib_var=no"
7399 fi
7400 rm -f conftest*
7401 xe_check_libs=""
7402
7403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7404   echo "$ac_t""yes" 1>&6
7405   tt_libs="-ltt $extra_libs"; break
7406 else
7407   echo "$ac_t""no" 1>&6
7408 :
7409 fi
7410
7411
7412   done
7413   if test -z "$tt_libs"; then
7414     if test "$with_tooltalk" = "yes"; then
7415       (echo "$progname: Usage error:"
7416 echo " " "Unable to find required tooltalk libraries."
7417 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7418     fi
7419     with_tooltalk=no
7420   fi
7421 fi
7422 test -z "$with_tooltalk" && with_tooltalk=yes
7423 if test "$with_tooltalk" = "yes"; then
7424   { test "$extra_verbose" = "yes" && cat << \EOF
7425     Defining TOOLTALK
7426 EOF
7427 cat >> confdefs.h <<\EOF
7428 #define TOOLTALK 1
7429 EOF
7430 }
7431
7432   { test "$extra_verbose" = "yes" && cat << EOF
7433     Defining TT_C_H_FILE = "$tt_c_h_file"
7434 EOF
7435 cat >> confdefs.h <<EOF
7436 #define TT_C_H_FILE "$tt_c_h_file"
7437 EOF
7438 }
7439
7440   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7441   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7442    echo "    xemacs will be linked with \"tooltalk.o\""
7443  fi
7444 fi
7445
7446 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7447 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7448 echo "configure:7449: checking for Dt/Dt.h" >&5
7449
7450 cat > conftest.$ac_ext <<EOF
7451 #line 7452 "configure"
7452 #include "confdefs.h"
7453 #include <Dt/Dt.h>
7454 EOF
7455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7456 { (eval echo configure:7457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7458 if test -z "$ac_err"; then
7459   rm -rf conftest*
7460   eval "ac_cv_header_$ac_safe=yes"
7461 else
7462   echo "$ac_err" >&5
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_header_$ac_safe=no"
7467 fi
7468 rm -f conftest*
7469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7470   echo "$ac_t""yes" 1>&6
7471   :
7472 else
7473   echo "$ac_t""no" 1>&6
7474 with_cde=no
7475 fi
7476  }
7477 test -z "$with_cde" && { 
7478 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7479 echo "configure:7480: checking for DtDndDragStart in -lDtSvc" >&5
7480 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7481
7482 xe_check_libs=" -lDtSvc "
7483 cat > conftest.$ac_ext <<EOF
7484 #line 7485 "configure"
7485 #include "confdefs.h"
7486 /* Override any gcc2 internal prototype to avoid an error.  */
7487 /* We use char because int might match the return type of a gcc2
7488     builtin and then its argument prototype would still apply.  */
7489 char DtDndDragStart();
7490
7491 int main() {
7492 DtDndDragStart()
7493 ; return 0; }
7494 EOF
7495 if { (eval echo configure:7496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7496   rm -rf conftest*
7497   eval "ac_cv_lib_$ac_lib_var=yes"
7498 else
7499   echo "configure: failed program was:" >&5
7500   cat conftest.$ac_ext >&5
7501   rm -rf conftest*
7502   eval "ac_cv_lib_$ac_lib_var=no"
7503 fi
7504 rm -f conftest*
7505 xe_check_libs=""
7506
7507 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7508   echo "$ac_t""yes" 1>&6
7509   :
7510 else
7511   echo "$ac_t""no" 1>&6
7512 with_cde=no
7513 fi
7514
7515  }
7516 test -z "$with_cde" && with_cde=yes
7517 if test "$with_dragndrop" = no; then
7518   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7519   with_cde=no
7520 fi
7521 if test "$with_cde" = "yes" ; then
7522   { test "$extra_verbose" = "yes" && cat << \EOF
7523     Defining HAVE_CDE
7524 EOF
7525 cat >> confdefs.h <<\EOF
7526 #define HAVE_CDE 1
7527 EOF
7528 }
7529
7530   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7531   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7532   with_tooltalk=yes # CDE requires Tooltalk
7533   need_motif=yes    # CDE requires Motif
7534 fi
7535
7536 test "$window_system" != "x11" && with_offix=no
7537 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7538   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7539   with_offix=no
7540 fi
7541 if test "$with_dragndrop" = no; then
7542   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7543   with_offix=no
7544 fi
7545 if test "$with_cde" = yes; then
7546   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7547   with_offix=no
7548 fi
7549 test -z "$with_offix" && with_offix=no
7550 if test "$with_offix" = "yes"; then
7551   { test "$extra_verbose" = "yes" && cat << \EOF
7552     Defining HAVE_OFFIX_DND
7553 EOF
7554 cat >> confdefs.h <<\EOF
7555 #define HAVE_OFFIX_DND 1
7556 EOF
7557 }
7558
7559   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7560   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7561 fi
7562 if test "$with_gtk" = "yes"; then
7563    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7564 fi
7565
7566 if test "$with_dragndrop" != "no" ; then
7567   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7568 echo "configure:7569: checking if drag and drop API is needed" >&5
7569   if test -n "$dragndrop_proto" ; then
7570     with_dragndrop=yes
7571     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7572     { test "$extra_verbose" = "yes" && cat << \EOF
7573     Defining HAVE_DRAGNDROP
7574 EOF
7575 cat >> confdefs.h <<\EOF
7576 #define HAVE_DRAGNDROP 1
7577 EOF
7578 }
7579
7580     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7581   else
7582     with_dragndrop=no
7583     echo "$ac_t""no" 1>&6
7584   fi
7585 fi
7586
7587 echo "checking for LDAP" 1>&6
7588 echo "configure:7589: checking for LDAP" >&5
7589 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7590 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7591 echo "configure:7592: checking for ldap.h" >&5
7592
7593 cat > conftest.$ac_ext <<EOF
7594 #line 7595 "configure"
7595 #include "confdefs.h"
7596 #include <ldap.h>
7597 EOF
7598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7599 { (eval echo configure:7600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7601 if test -z "$ac_err"; then
7602   rm -rf conftest*
7603   eval "ac_cv_header_$ac_safe=yes"
7604 else
7605   echo "$ac_err" >&5
7606   echo "configure: failed program was:" >&5
7607   cat conftest.$ac_ext >&5
7608   rm -rf conftest*
7609   eval "ac_cv_header_$ac_safe=no"
7610 fi
7611 rm -f conftest*
7612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7613   echo "$ac_t""yes" 1>&6
7614   :
7615 else
7616   echo "$ac_t""no" 1>&6
7617 with_ldap=no
7618 fi
7619  }
7620 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7621 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7622 echo "configure:7623: checking for lber.h" >&5
7623
7624 cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7627 #include <lber.h>
7628 EOF
7629 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7630 { (eval echo configure:7631: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7631 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7632 if test -z "$ac_err"; then
7633   rm -rf conftest*
7634   eval "ac_cv_header_$ac_safe=yes"
7635 else
7636   echo "$ac_err" >&5
7637   echo "configure: failed program was:" >&5
7638   cat conftest.$ac_ext >&5
7639   rm -rf conftest*
7640   eval "ac_cv_header_$ac_safe=no"
7641 fi
7642 rm -f conftest*
7643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7644   echo "$ac_t""yes" 1>&6
7645   :
7646 else
7647   echo "$ac_t""no" 1>&6
7648 with_ldap=no
7649 fi
7650  }
7651 if test "$with_ldap" != "no"; then
7652   
7653 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7654 echo "configure:7655: checking for ldap_search in -lldap" >&5
7655 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7656
7657 xe_check_libs=" -lldap "
7658 cat > conftest.$ac_ext <<EOF
7659 #line 7660 "configure"
7660 #include "confdefs.h"
7661 /* Override any gcc2 internal prototype to avoid an error.  */
7662 /* We use char because int might match the return type of a gcc2
7663     builtin and then its argument prototype would still apply.  */
7664 char ldap_search();
7665
7666 int main() {
7667 ldap_search()
7668 ; return 0; }
7669 EOF
7670 if { (eval echo configure:7671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7671   rm -rf conftest*
7672   eval "ac_cv_lib_$ac_lib_var=yes"
7673 else
7674   echo "configure: failed program was:" >&5
7675   cat conftest.$ac_ext >&5
7676   rm -rf conftest*
7677   eval "ac_cv_lib_$ac_lib_var=no"
7678 fi
7679 rm -f conftest*
7680 xe_check_libs=""
7681
7682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7683   echo "$ac_t""yes" 1>&6
7684   with_ldap_nolber=yes
7685 else
7686   echo "$ac_t""no" 1>&6
7687 with_ldap_nolber=no
7688 fi
7689
7690
7691   test "$with_ldap_nolber" = "no" && { 
7692 xe_msg_checking="for ldap_open in -lldap"
7693 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7694 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7695 echo "configure:7696: checking "$xe_msg_checking"" >&5
7696 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7697
7698 xe_check_libs=" -lldap -llber"
7699 cat > conftest.$ac_ext <<EOF
7700 #line 7701 "configure"
7701 #include "confdefs.h"
7702 /* Override any gcc2 internal prototype to avoid an error.  */
7703 /* We use char because int might match the return type of a gcc2
7704     builtin and then its argument prototype would still apply.  */
7705 char ldap_open();
7706
7707 int main() {
7708 ldap_open()
7709 ; return 0; }
7710 EOF
7711 if { (eval echo configure:7712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7712   rm -rf conftest*
7713   eval "ac_cv_lib_$ac_lib_var=yes"
7714 else
7715   echo "configure: failed program was:" >&5
7716   cat conftest.$ac_ext >&5
7717   rm -rf conftest*
7718   eval "ac_cv_lib_$ac_lib_var=no"
7719 fi
7720 rm -f conftest*
7721 xe_check_libs=""
7722
7723 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7724   echo "$ac_t""yes" 1>&6
7725   with_ldap_lber=yes
7726 else
7727   echo "$ac_t""no" 1>&6
7728 with_ldap_lber=no
7729 fi
7730
7731  }
7732   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7733 xe_msg_checking="for ldap_open in -lldap"
7734 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7735 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7736 echo "configure:7737: checking "$xe_msg_checking"" >&5
7737 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7738
7739 xe_check_libs=" -lldap -llber -lkrb"
7740 cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 /* Override any gcc2 internal prototype to avoid an error.  */
7744 /* We use char because int might match the return type of a gcc2
7745     builtin and then its argument prototype would still apply.  */
7746 char ldap_open();
7747
7748 int main() {
7749 ldap_open()
7750 ; return 0; }
7751 EOF
7752 if { (eval echo configure:7753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7753   rm -rf conftest*
7754   eval "ac_cv_lib_$ac_lib_var=yes"
7755 else
7756   echo "configure: failed program was:" >&5
7757   cat conftest.$ac_ext >&5
7758   rm -rf conftest*
7759   eval "ac_cv_lib_$ac_lib_var=no"
7760 fi
7761 rm -f conftest*
7762 xe_check_libs=""
7763
7764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7765   echo "$ac_t""yes" 1>&6
7766   with_ldap_krb=yes
7767 else
7768   echo "$ac_t""no" 1>&6
7769 with_ldap_krb=no
7770 fi
7771
7772  }
7773   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7774 xe_msg_checking="for ldap_open in -lldap"
7775 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7776 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7777 echo "configure:7778: checking "$xe_msg_checking"" >&5
7778 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7779
7780 xe_check_libs=" -lldap -llber -lkrb -ldes"
7781 cat > conftest.$ac_ext <<EOF
7782 #line 7783 "configure"
7783 #include "confdefs.h"
7784 /* Override any gcc2 internal prototype to avoid an error.  */
7785 /* We use char because int might match the return type of a gcc2
7786     builtin and then its argument prototype would still apply.  */
7787 char ldap_open();
7788
7789 int main() {
7790 ldap_open()
7791 ; return 0; }
7792 EOF
7793 if { (eval echo configure:7794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7794   rm -rf conftest*
7795   eval "ac_cv_lib_$ac_lib_var=yes"
7796 else
7797   echo "configure: failed program was:" >&5
7798   cat conftest.$ac_ext >&5
7799   rm -rf conftest*
7800   eval "ac_cv_lib_$ac_lib_var=no"
7801 fi
7802 rm -f conftest*
7803 xe_check_libs=""
7804
7805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7806   echo "$ac_t""yes" 1>&6
7807   with_ldap_krbdes=yes
7808 else
7809   echo "$ac_t""no" 1>&6
7810 with_ldap_krbdes=no
7811 fi
7812
7813  }
7814   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
7815 fi
7816 if test "$with_ldap" = "yes"; then
7817   { test "$extra_verbose" = "yes" && cat << \EOF
7818     Defining HAVE_LDAP
7819 EOF
7820 cat >> confdefs.h <<\EOF
7821 #define HAVE_LDAP 1
7822 EOF
7823 }
7824
7825   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7826    echo "    xemacs will be linked with \"eldap.o\""
7827  fi
7828   if test "$with_ldap_nolber" = "yes" ; then
7829     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7830   else
7831     if test "$with_ldap_krb" = "yes" ; then
7832       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7833     fi
7834     if test "$with_ldap_krbdes" = "yes" ; then
7835       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7836       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7837     fi
7838     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7839     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7840   fi
7841   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7842 do
7843 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7844 echo "configure:7845: checking for $ac_func" >&5
7845
7846 cat > conftest.$ac_ext <<EOF
7847 #line 7848 "configure"
7848 #include "confdefs.h"
7849 /* System header to define __stub macros and hopefully few prototypes,
7850     which can conflict with char $ac_func(); below.  */
7851 #include <assert.h>
7852 /* Override any gcc2 internal prototype to avoid an error.  */
7853 /* We use char because int might match the return type of a gcc2
7854     builtin and then its argument prototype would still apply.  */
7855 char $ac_func();
7856
7857 int main() {
7858
7859 /* The GNU C library defines this for functions which it implements
7860     to always fail with ENOSYS.  Some functions are actually named
7861     something starting with __ and the normal name is an alias.  */
7862 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7863 choke me
7864 #else
7865 $ac_func();
7866 #endif
7867
7868 ; return 0; }
7869 EOF
7870 if { (eval echo configure:7871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7871   rm -rf conftest*
7872   eval "ac_cv_func_$ac_func=yes"
7873 else
7874   echo "configure: failed program was:" >&5
7875   cat conftest.$ac_ext >&5
7876   rm -rf conftest*
7877   eval "ac_cv_func_$ac_func=no"
7878 fi
7879 rm -f conftest*
7880
7881 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7882   echo "$ac_t""yes" 1>&6
7883     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7884   { test "$extra_verbose" = "yes" && cat << EOF
7885     Defining $ac_tr_func
7886 EOF
7887 cat >> confdefs.h <<EOF
7888 #define $ac_tr_func 1
7889 EOF
7890 }
7891  
7892 else
7893   echo "$ac_t""no" 1>&6
7894 fi
7895 done
7896
7897 fi
7898
7899 if test "$with_postgresql" != "no"; then
7900   echo "checking for PostgreSQL" 1>&6
7901 echo "configure:7902: checking for PostgreSQL" >&5
7902
7903   for header_dir in "" "pgsql/" "postgresql/"; do
7904     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7905 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7906 echo "configure:7907: checking for ${header_dir}libpq-fe.h" >&5
7907
7908 cat > conftest.$ac_ext <<EOF
7909 #line 7910 "configure"
7910 #include "confdefs.h"
7911 #include <${header_dir}libpq-fe.h>
7912 EOF
7913 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7914 { (eval echo configure:7915: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7915 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7916 if test -z "$ac_err"; then
7917   rm -rf conftest*
7918   eval "ac_cv_header_$ac_safe=yes"
7919 else
7920   echo "$ac_err" >&5
7921   echo "configure: failed program was:" >&5
7922   cat conftest.$ac_ext >&5
7923   rm -rf conftest*
7924   eval "ac_cv_header_$ac_safe=no"
7925 fi
7926 rm -f conftest*
7927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7928   echo "$ac_t""yes" 1>&6
7929   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7930 else
7931   echo "$ac_t""no" 1>&6
7932 fi
7933
7934   done
7935
7936   test -n "$libpq_fe_h_file" && { 
7937 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7938 echo "configure:7939: checking for PQconnectdb in -lpq" >&5
7939 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7940
7941 xe_check_libs=" -lpq "
7942 cat > conftest.$ac_ext <<EOF
7943 #line 7944 "configure"
7944 #include "confdefs.h"
7945 /* Override any gcc2 internal prototype to avoid an error.  */
7946 /* We use char because int might match the return type of a gcc2
7947     builtin and then its argument prototype would still apply.  */
7948 char PQconnectdb();
7949
7950 int main() {
7951 PQconnectdb()
7952 ; return 0; }
7953 EOF
7954 if { (eval echo configure:7955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7955   rm -rf conftest*
7956   eval "ac_cv_lib_$ac_lib_var=yes"
7957 else
7958   echo "configure: failed program was:" >&5
7959   cat conftest.$ac_ext >&5
7960   rm -rf conftest*
7961   eval "ac_cv_lib_$ac_lib_var=no"
7962 fi
7963 rm -f conftest*
7964 xe_check_libs=""
7965
7966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7967   echo "$ac_t""yes" 1>&6
7968   have_libpq=yes
7969 else
7970   echo "$ac_t""no" 1>&6
7971 fi
7972
7973  }
7974
7975   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7976     with_postgresql=yes
7977     { test "$extra_verbose" = "yes" && cat << \EOF
7978     Defining HAVE_POSTGRESQL
7979 EOF
7980 cat >> confdefs.h <<\EOF
7981 #define HAVE_POSTGRESQL 1
7982 EOF
7983 }
7984
7985     
7986 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7987 echo "configure:7988: checking for PQconnectStart in -lpq" >&5
7988 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7989
7990 xe_check_libs=" -lpq "
7991 cat > conftest.$ac_ext <<EOF
7992 #line 7993 "configure"
7993 #include "confdefs.h"
7994 /* Override any gcc2 internal prototype to avoid an error.  */
7995 /* We use char because int might match the return type of a gcc2
7996     builtin and then its argument prototype would still apply.  */
7997 char PQconnectStart();
7998
7999 int main() {
8000 PQconnectStart()
8001 ; return 0; }
8002 EOF
8003 if { (eval echo configure:8004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8004   rm -rf conftest*
8005   eval "ac_cv_lib_$ac_lib_var=yes"
8006 else
8007   echo "configure: failed program was:" >&5
8008   cat conftest.$ac_ext >&5
8009   rm -rf conftest*
8010   eval "ac_cv_lib_$ac_lib_var=no"
8011 fi
8012 rm -f conftest*
8013 xe_check_libs=""
8014
8015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8016   echo "$ac_t""yes" 1>&6
8017   with_postgresqlv7=yes;
8018                  { test "$extra_verbose" = "yes" && cat << \EOF
8019     Defining HAVE_POSTGRESQLV7
8020 EOF
8021 cat >> confdefs.h <<\EOF
8022 #define HAVE_POSTGRESQLV7 1
8023 EOF
8024 }
8025
8026 else
8027   echo "$ac_t""no" 1>&6
8028 fi
8029
8030
8031     { test "$extra_verbose" = "yes" && cat << EOF
8032     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8033 EOF
8034 cat >> confdefs.h <<EOF
8035 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8036 EOF
8037 }
8038
8039     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8040     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8041    echo "    xemacs will be linked with \"postgresql.o\""
8042  fi
8043   elif test "$with_postgresql" = "yes"; then
8044     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8045   fi
8046 fi
8047
8048
8049 if test "$window_system" != "none"; then
8050   echo "checking for graphics libraries" 1>&6
8051 echo "configure:8052: checking for graphics libraries" >&5
8052
8053       libpath_xpm=
8054   incpath_xpm=
8055   case "$opsys" in 
8056     cygwin*)
8057       cygwin_top=`eval "gcc -print-file-name=libc.a"` ;
8058       cygwin_top=`eval "dirname ${cygwin_top}"`;
8059       cygwin_top="${cygwin_top}/..";
8060       case "$window_system" in
8061                 x11)  ;;
8062                 msw) libpath_xpm="-L${cygwin_top}/lib/noX"
8063              incpath_xpm="-I${cygwin_top}/include/noX"
8064               ;;
8065                 gtk)  ;;
8066                 none) ;;
8067                 *)    ;;
8068       esac
8069       ;;
8070         *) ;;
8071   esac
8072     xpm_problem=""
8073   if test -z "$with_xpm"; then
8074     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8075     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8076     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8077 echo "configure:8078: checking for Xpm - no older than 3.4f" >&5
8078     xe_check_libs=-lXpm
8079     cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 #define XPM_NUMBERS
8083 #include <X11/xpm.h>
8084     int main(int c, char **v) {
8085     return c == 1 ? 0 :
8086       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8087       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8088 EOF
8089 if { (eval echo configure:8090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8090 then
8091   ./conftest dummy_arg; xpm_status=$?;
8092       if test "$xpm_status" = "0"; then
8093         with_xpm=yes;
8094       else
8095         with_xpm=no;
8096         if test "$xpm_status" = "1"; then
8097           xpm_problem="Xpm library version and header file version don't match!"
8098         elif test "$xpm_status" = "2"; then
8099           xpm_problem="Xpm library version is too old!"
8100         else
8101           xpm_problem="Internal xpm detection logic error!"
8102         fi
8103         echo "
8104 *** WARNING *** $xpm_problem
8105   I'm not touching that with a 10-foot pole!
8106   If you really want to use the installed version of Xpm, rerun
8107   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8108     fi
8109 else
8110   conftest_rc="$?"
8111   echo "configure: failed program was:" >&5
8112   cat conftest.$ac_ext >&5
8113   rm -fr conftest*
8114   with_xpm=no
8115 fi
8116 rm -fr conftest*
8117     xe_check_libs=
8118     echo "$ac_t""$with_xpm" 1>&6
8119   fi
8120   if test "$with_xpm" = "yes"; then
8121                 { test "$extra_verbose" = "yes" && cat << \EOF
8122     Defining HAVE_XPM
8123 EOF
8124 cat >> confdefs.h <<\EOF
8125 #define HAVE_XPM 1
8126 EOF
8127 }
8128
8129     LDFLAGS=""$libpath_xpm" $LDFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libpath_xpm"\" to \$LDFLAGS"; fi
8130     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8131     CFLAGS=""$incpath_xpm" $CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$incpath_xpm"\" to \$CFLAGS"; fi
8132     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8133 echo "configure:8134: checking for \"FOR_MSW\" xpm" >&5
8134     xe_check_libs=-lXpm
8135     cat > conftest.$ac_ext <<EOF
8136 #line 8137 "configure"
8137 #include "confdefs.h"
8138
8139 int main() {
8140 XpmCreatePixmapFromData()
8141 ; return 0; }
8142 EOF
8143 if { (eval echo configure:8144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8144   rm -rf conftest*
8145   xpm_for_msw=no
8146 else
8147   echo "configure: failed program was:" >&5
8148   cat conftest.$ac_ext >&5
8149   rm -rf conftest*
8150   xpm_for_msw=yes
8151 fi
8152 rm -f conftest*
8153     xe_check_libs=
8154     echo "$ac_t""$xpm_for_msw" 1>&6
8155     if test "$xpm_for_msw" = "yes"; then
8156       { test "$extra_verbose" = "yes" && cat << \EOF
8157     Defining FOR_MSW
8158 EOF
8159 cat >> confdefs.h <<\EOF
8160 #define FOR_MSW 1
8161 EOF
8162 }
8163
8164     fi
8165   fi
8166
8167     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8168 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8169 echo "configure:8170: checking for compface.h" >&5
8170
8171 cat > conftest.$ac_ext <<EOF
8172 #line 8173 "configure"
8173 #include "confdefs.h"
8174 #include <compface.h>
8175 EOF
8176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8177 { (eval echo configure:8178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8179 if test -z "$ac_err"; then
8180   rm -rf conftest*
8181   eval "ac_cv_header_$ac_safe=yes"
8182 else
8183   echo "$ac_err" >&5
8184   echo "configure: failed program was:" >&5
8185   cat conftest.$ac_ext >&5
8186   rm -rf conftest*
8187   eval "ac_cv_header_$ac_safe=no"
8188 fi
8189 rm -f conftest*
8190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8191   echo "$ac_t""yes" 1>&6
8192   :
8193 else
8194   echo "$ac_t""no" 1>&6
8195 with_xface=no
8196 fi
8197  }
8198   test -z "$with_xface" && { 
8199 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8200 echo "configure:8201: checking for UnGenFace in -lcompface" >&5
8201 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8202
8203 xe_check_libs=" -lcompface "
8204 cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 /* Override any gcc2 internal prototype to avoid an error.  */
8208 /* We use char because int might match the return type of a gcc2
8209     builtin and then its argument prototype would still apply.  */
8210 char UnGenFace();
8211
8212 int main() {
8213 UnGenFace()
8214 ; return 0; }
8215 EOF
8216 if { (eval echo configure:8217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8217   rm -rf conftest*
8218   eval "ac_cv_lib_$ac_lib_var=yes"
8219 else
8220   echo "configure: failed program was:" >&5
8221   cat conftest.$ac_ext >&5
8222   rm -rf conftest*
8223   eval "ac_cv_lib_$ac_lib_var=no"
8224 fi
8225 rm -f conftest*
8226 xe_check_libs=""
8227
8228 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8229   echo "$ac_t""yes" 1>&6
8230   : 
8231 else
8232   echo "$ac_t""no" 1>&6
8233 with_xface=no
8234 fi
8235
8236  }
8237   test -z "$with_xface" && with_xface=yes
8238   if test "$with_xface" = "yes"; then
8239     { test "$extra_verbose" = "yes" && cat << \EOF
8240     Defining HAVE_XFACE
8241 EOF
8242 cat >> confdefs.h <<\EOF
8243 #define HAVE_XFACE 1
8244 EOF
8245 }
8246
8247     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8248   fi
8249
8250         if test "$with_gif" != "no"; then
8251     with_gif="yes"
8252     { test "$extra_verbose" = "yes" && cat << \EOF
8253     Defining HAVE_GIF
8254 EOF
8255 cat >> confdefs.h <<\EOF
8256 #define HAVE_GIF 1
8257 EOF
8258 }
8259
8260     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8261    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8262  fi
8263   fi
8264
8265       if test "$with_png $with_tiff" != "no no"; then
8266     
8267 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8268 echo "configure:8269: checking for inflate in -lc" >&5
8269 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8270
8271 xe_check_libs=" -lc "
8272 cat > conftest.$ac_ext <<EOF
8273 #line 8274 "configure"
8274 #include "confdefs.h"
8275 /* Override any gcc2 internal prototype to avoid an error.  */
8276 /* We use char because int might match the return type of a gcc2
8277     builtin and then its argument prototype would still apply.  */
8278 char inflate();
8279
8280 int main() {
8281 inflate()
8282 ; return 0; }
8283 EOF
8284 if { (eval echo configure:8285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8285   rm -rf conftest*
8286   eval "ac_cv_lib_$ac_lib_var=yes"
8287 else
8288   echo "configure: failed program was:" >&5
8289   cat conftest.$ac_ext >&5
8290   rm -rf conftest*
8291   eval "ac_cv_lib_$ac_lib_var=no"
8292 fi
8293 rm -f conftest*
8294 xe_check_libs=""
8295
8296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8297   echo "$ac_t""yes" 1>&6
8298   :
8299 else
8300   echo "$ac_t""no" 1>&6
8301
8302 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8303 echo "configure:8304: checking for inflate in -lz" >&5
8304 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8305
8306 xe_check_libs=" -lz "
8307 cat > conftest.$ac_ext <<EOF
8308 #line 8309 "configure"
8309 #include "confdefs.h"
8310 /* Override any gcc2 internal prototype to avoid an error.  */
8311 /* We use char because int might match the return type of a gcc2
8312     builtin and then its argument prototype would still apply.  */
8313 char inflate();
8314
8315 int main() {
8316 inflate()
8317 ; return 0; }
8318 EOF
8319 if { (eval echo configure:8320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8320   rm -rf conftest*
8321   eval "ac_cv_lib_$ac_lib_var=yes"
8322 else
8323   echo "configure: failed program was:" >&5
8324   cat conftest.$ac_ext >&5
8325   rm -rf conftest*
8326   eval "ac_cv_lib_$ac_lib_var=no"
8327 fi
8328 rm -f conftest*
8329 xe_check_libs=""
8330
8331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8332   echo "$ac_t""yes" 1>&6
8333   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8334 else
8335   echo "$ac_t""no" 1>&6
8336
8337 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8338 echo "configure:8339: checking for inflate in -lgz" >&5
8339 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8340
8341 xe_check_libs=" -lgz "
8342 cat > conftest.$ac_ext <<EOF
8343 #line 8344 "configure"
8344 #include "confdefs.h"
8345 /* Override any gcc2 internal prototype to avoid an error.  */
8346 /* We use char because int might match the return type of a gcc2
8347     builtin and then its argument prototype would still apply.  */
8348 char inflate();
8349
8350 int main() {
8351 inflate()
8352 ; return 0; }
8353 EOF
8354 if { (eval echo configure:8355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8355   rm -rf conftest*
8356   eval "ac_cv_lib_$ac_lib_var=yes"
8357 else
8358   echo "configure: failed program was:" >&5
8359   cat conftest.$ac_ext >&5
8360   rm -rf conftest*
8361   eval "ac_cv_lib_$ac_lib_var=no"
8362 fi
8363 rm -f conftest*
8364 xe_check_libs=""
8365
8366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8367   echo "$ac_t""yes" 1>&6
8368   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8369 else
8370   echo "$ac_t""no" 1>&6
8371 fi
8372
8373
8374 fi
8375
8376
8377 fi
8378
8379
8380   fi
8381
8382     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8383 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8384 echo "configure:8385: checking for jpeglib.h" >&5
8385
8386 cat > conftest.$ac_ext <<EOF
8387 #line 8388 "configure"
8388 #include "confdefs.h"
8389 #include <jpeglib.h>
8390 EOF
8391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8392 { (eval echo configure:8393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8394 if test -z "$ac_err"; then
8395   rm -rf conftest*
8396   eval "ac_cv_header_$ac_safe=yes"
8397 else
8398   echo "$ac_err" >&5
8399   echo "configure: failed program was:" >&5
8400   cat conftest.$ac_ext >&5
8401   rm -rf conftest*
8402   eval "ac_cv_header_$ac_safe=no"
8403 fi
8404 rm -f conftest*
8405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407   :
8408 else
8409   echo "$ac_t""no" 1>&6
8410 with_jpeg=no
8411 fi
8412  }
8413   test -z "$with_jpeg" && { 
8414 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8415 echo "configure:8416: checking for jpeg_destroy_decompress in -ljpeg" >&5
8416 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8417
8418 xe_check_libs=" -ljpeg "
8419 cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 /* Override any gcc2 internal prototype to avoid an error.  */
8423 /* We use char because int might match the return type of a gcc2
8424     builtin and then its argument prototype would still apply.  */
8425 char jpeg_destroy_decompress();
8426
8427 int main() {
8428 jpeg_destroy_decompress()
8429 ; return 0; }
8430 EOF
8431 if { (eval echo configure:8432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8432   rm -rf conftest*
8433   eval "ac_cv_lib_$ac_lib_var=yes"
8434 else
8435   echo "configure: failed program was:" >&5
8436   cat conftest.$ac_ext >&5
8437   rm -rf conftest*
8438   eval "ac_cv_lib_$ac_lib_var=no"
8439 fi
8440 rm -f conftest*
8441 xe_check_libs=""
8442
8443 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8444   echo "$ac_t""yes" 1>&6
8445   :
8446 else
8447   echo "$ac_t""no" 1>&6
8448 with_jpeg=no
8449 fi
8450
8451  }
8452   test -z "$with_jpeg" && with_jpeg=yes
8453   if test "$with_jpeg" = "yes"; then
8454     { test "$extra_verbose" = "yes" && cat << \EOF
8455     Defining HAVE_JPEG
8456 EOF
8457 cat >> confdefs.h <<\EOF
8458 #define HAVE_JPEG 1
8459 EOF
8460 }
8461
8462     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8463   fi
8464
8465     png_problem=""
8466   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8467 echo "configure:8468: checking for pow" >&5
8468
8469 cat > conftest.$ac_ext <<EOF
8470 #line 8471 "configure"
8471 #include "confdefs.h"
8472 /* System header to define __stub macros and hopefully few prototypes,
8473     which can conflict with char pow(); below.  */
8474 #include <assert.h>
8475 /* Override any gcc2 internal prototype to avoid an error.  */
8476 /* We use char because int might match the return type of a gcc2
8477     builtin and then its argument prototype would still apply.  */
8478 char pow();
8479
8480 int main() {
8481
8482 /* The GNU C library defines this for functions which it implements
8483     to always fail with ENOSYS.  Some functions are actually named
8484     something starting with __ and the normal name is an alias.  */
8485 #if defined (__stub_pow) || defined (__stub___pow)
8486 choke me
8487 #else
8488 pow();
8489 #endif
8490
8491 ; return 0; }
8492 EOF
8493 if { (eval echo configure:8494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8494   rm -rf conftest*
8495   eval "ac_cv_func_pow=yes"
8496 else
8497   echo "configure: failed program was:" >&5
8498   cat conftest.$ac_ext >&5
8499   rm -rf conftest*
8500   eval "ac_cv_func_pow=no"
8501 fi
8502 rm -f conftest*
8503
8504 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8505   echo "$ac_t""yes" 1>&6
8506   :
8507 else
8508   echo "$ac_t""no" 1>&6
8509 with_png=no
8510 fi
8511  }
8512   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8513 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8514 echo "configure:8515: checking for png.h" >&5
8515
8516 cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <png.h>
8520 EOF
8521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8522 { (eval echo configure:8523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8524 if test -z "$ac_err"; then
8525   rm -rf conftest*
8526   eval "ac_cv_header_$ac_safe=yes"
8527 else
8528   echo "$ac_err" >&5
8529   echo "configure: failed program was:" >&5
8530   cat conftest.$ac_ext >&5
8531   rm -rf conftest*
8532   eval "ac_cv_header_$ac_safe=no"
8533 fi
8534 rm -f conftest*
8535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8536   echo "$ac_t""yes" 1>&6
8537   :
8538 else
8539   echo "$ac_t""no" 1>&6
8540 with_png=no
8541 fi
8542  }
8543   test -z "$with_png" && { 
8544 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8545 echo "configure:8546: checking for png_read_image in -lpng" >&5
8546 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8547
8548 xe_check_libs=" -lpng "
8549 cat > conftest.$ac_ext <<EOF
8550 #line 8551 "configure"
8551 #include "confdefs.h"
8552 /* Override any gcc2 internal prototype to avoid an error.  */
8553 /* We use char because int might match the return type of a gcc2
8554     builtin and then its argument prototype would still apply.  */
8555 char png_read_image();
8556
8557 int main() {
8558 png_read_image()
8559 ; return 0; }
8560 EOF
8561 if { (eval echo configure:8562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8562   rm -rf conftest*
8563   eval "ac_cv_lib_$ac_lib_var=yes"
8564 else
8565   echo "configure: failed program was:" >&5
8566   cat conftest.$ac_ext >&5
8567   rm -rf conftest*
8568   eval "ac_cv_lib_$ac_lib_var=no"
8569 fi
8570 rm -f conftest*
8571 xe_check_libs=""
8572
8573 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8574   echo "$ac_t""yes" 1>&6
8575   :
8576 else
8577   echo "$ac_t""no" 1>&6
8578 with_png=no
8579 fi
8580
8581  }
8582   if test -z "$with_png"; then
8583     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8584 echo "configure:8585: checking for workable png version information" >&5
8585     xe_check_libs="-lpng -lz"
8586     cat > conftest.$ac_ext <<EOF
8587 #line 8588 "configure"
8588 #include "confdefs.h"
8589 #include <png.h>
8590     int main(int c, char **v) {
8591     if (c == 1) return 0;
8592     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8593     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8594 EOF
8595 if { (eval echo configure:8596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8596 then
8597   ./conftest dummy_arg; png_status=$?;
8598       if test "$png_status" = "0"; then
8599         with_png=yes;
8600       else
8601         with_png=no;
8602         if test "$png_status" = "1"; then
8603           png_problem="PNG library version and header file don't match!"
8604         elif test "$png_status" = "2"; then
8605           png_problem="PNG library version too old (pre 1.0.2)!"
8606         fi
8607         echo "
8608 *** WARNING *** $png_problem
8609   I'm not touching that with a 10-foot pole!
8610   If you really want to use the installed version of libPNG, rerun
8611   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8612     fi
8613 else
8614   conftest_rc="$?"
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -fr conftest*
8618   with_png=no
8619 fi
8620 rm -fr conftest*
8621     xe_check_libs=
8622     echo "$ac_t""$with_png" 1>&6
8623   fi
8624   if test "$with_png" = "yes"; then
8625     { test "$extra_verbose" = "yes" && cat << \EOF
8626     Defining HAVE_PNG
8627 EOF
8628 cat >> confdefs.h <<\EOF
8629 #define HAVE_PNG 1
8630 EOF
8631 }
8632
8633     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8634   fi
8635
8636     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8637 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8638 echo "configure:8639: checking for tiffio.h" >&5
8639
8640 cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 #include <tiffio.h>
8644 EOF
8645 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8646 { (eval echo configure:8647: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8647 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8648 if test -z "$ac_err"; then
8649   rm -rf conftest*
8650   eval "ac_cv_header_$ac_safe=yes"
8651 else
8652   echo "$ac_err" >&5
8653   echo "configure: failed program was:" >&5
8654   cat conftest.$ac_ext >&5
8655   rm -rf conftest*
8656   eval "ac_cv_header_$ac_safe=no"
8657 fi
8658 rm -f conftest*
8659 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8660   echo "$ac_t""yes" 1>&6
8661   :
8662 else
8663   echo "$ac_t""no" 1>&6
8664 with_tiff=no
8665 fi
8666  }
8667   test -z "$with_tiff" && { 
8668 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8669 echo "configure:8670: checking for TIFFClientOpen in -ltiff" >&5
8670 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8671
8672 xe_check_libs=" -ltiff "
8673 cat > conftest.$ac_ext <<EOF
8674 #line 8675 "configure"
8675 #include "confdefs.h"
8676 /* Override any gcc2 internal prototype to avoid an error.  */
8677 /* We use char because int might match the return type of a gcc2
8678     builtin and then its argument prototype would still apply.  */
8679 char TIFFClientOpen();
8680
8681 int main() {
8682 TIFFClientOpen()
8683 ; return 0; }
8684 EOF
8685 if { (eval echo configure:8686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8686   rm -rf conftest*
8687   eval "ac_cv_lib_$ac_lib_var=yes"
8688 else
8689   echo "configure: failed program was:" >&5
8690   cat conftest.$ac_ext >&5
8691   rm -rf conftest*
8692   eval "ac_cv_lib_$ac_lib_var=no"
8693 fi
8694 rm -f conftest*
8695 xe_check_libs=""
8696
8697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8698   echo "$ac_t""yes" 1>&6
8699   :
8700 else
8701   echo "$ac_t""no" 1>&6
8702 with_tiff=no
8703 fi
8704
8705  }
8706   test -z "$with_tiff" && with_tiff=yes
8707   if test "$with_tiff" = "yes"; then
8708     { test "$extra_verbose" = "yes" && cat << \EOF
8709     Defining HAVE_TIFF
8710 EOF
8711 cat >> confdefs.h <<\EOF
8712 #define HAVE_TIFF 1
8713 EOF
8714 }
8715
8716     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8717   fi
8718 fi
8719
8720
8721 if test "$with_gtk" = "yes"; then
8722     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8723 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8724 echo "configure:8725: checking for compface.h" >&5
8725
8726 cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 #include <compface.h>
8730 EOF
8731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8732 { (eval echo configure:8733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8734 if test -z "$ac_err"; then
8735   rm -rf conftest*
8736   eval "ac_cv_header_$ac_safe=yes"
8737 else
8738   echo "$ac_err" >&5
8739   echo "configure: failed program was:" >&5
8740   cat conftest.$ac_ext >&5
8741   rm -rf conftest*
8742   eval "ac_cv_header_$ac_safe=no"
8743 fi
8744 rm -f conftest*
8745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8746   echo "$ac_t""yes" 1>&6
8747   :
8748 else
8749   echo "$ac_t""no" 1>&6
8750 with_xface=no
8751 fi
8752  }
8753   test -z "$with_xface" && { 
8754 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8755 echo "configure:8756: checking for UnGenFace in -lcompface" >&5
8756 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8757
8758 xe_check_libs=" -lcompface "
8759 cat > conftest.$ac_ext <<EOF
8760 #line 8761 "configure"
8761 #include "confdefs.h"
8762 /* Override any gcc2 internal prototype to avoid an error.  */
8763 /* We use char because int might match the return type of a gcc2
8764     builtin and then its argument prototype would still apply.  */
8765 char UnGenFace();
8766
8767 int main() {
8768 UnGenFace()
8769 ; return 0; }
8770 EOF
8771 if { (eval echo configure:8772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8772   rm -rf conftest*
8773   eval "ac_cv_lib_$ac_lib_var=yes"
8774 else
8775   echo "configure: failed program was:" >&5
8776   cat conftest.$ac_ext >&5
8777   rm -rf conftest*
8778   eval "ac_cv_lib_$ac_lib_var=no"
8779 fi
8780 rm -f conftest*
8781 xe_check_libs=""
8782
8783 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8784   echo "$ac_t""yes" 1>&6
8785   : 
8786 else
8787   echo "$ac_t""no" 1>&6
8788 with_xface=no
8789 fi
8790
8791  }
8792   test -z "$with_xface" && with_xface=yes
8793   if test "$with_xface" = "yes"; then
8794     { test "$extra_verbose" = "yes" && cat << \EOF
8795     Defining HAVE_XFACE
8796 EOF
8797 cat >> confdefs.h <<\EOF
8798 #define HAVE_XFACE 1
8799 EOF
8800 }
8801
8802     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8803   fi
8804 fi
8805
8806
8807
8808 if test "$with_x11" = "yes"; then
8809   echo "checking for X11 graphics libraries" 1>&6
8810 echo "configure:8811: checking for X11 graphics libraries" >&5
8811 fi
8812
8813 case "$with_widgets" in
8814   "yes" | "athena")             detect_athena=yes ;;
8815    *)                           detect_athena=no ;;
8816 esac
8817
8818 if test "$with_x11" = "yes" -a "$detect_athena" = "yes" ; then
8819   echo "checking for the Athena widgets" 1>&6
8820 echo "configure:8821: checking for the Athena widgets" >&5
8821
8822     case "$with_athena" in
8823         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8824     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8825     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8826     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8827     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8828     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8829   esac
8830
8831     if test "$athena_3d" = "no"; then
8832     
8833 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8834 echo "configure:8835: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8835 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8836
8837 xe_check_libs=" -l$athena_variant "
8838 cat > conftest.$ac_ext <<EOF
8839 #line 8840 "configure"
8840 #include "confdefs.h"
8841 /* Override any gcc2 internal prototype to avoid an error.  */
8842 /* We use char because int might match the return type of a gcc2
8843     builtin and then its argument prototype would still apply.  */
8844 char XawScrollbarSetThumb();
8845
8846 int main() {
8847 XawScrollbarSetThumb()
8848 ; return 0; }
8849 EOF
8850 if { (eval echo configure:8851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8851   rm -rf conftest*
8852   eval "ac_cv_lib_$ac_lib_var=yes"
8853 else
8854   echo "configure: failed program was:" >&5
8855   cat conftest.$ac_ext >&5
8856   rm -rf conftest*
8857   eval "ac_cv_lib_$ac_lib_var=no"
8858 fi
8859 rm -f conftest*
8860 xe_check_libs=""
8861
8862 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8863   echo "$ac_t""yes" 1>&6
8864           
8865 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8866 echo "configure:8867: checking for threeDClassRec in -l$athena_variant" >&5
8867 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8868
8869 xe_check_libs=" -l$athena_variant "
8870 cat > conftest.$ac_ext <<EOF
8871 #line 8872 "configure"
8872 #include "confdefs.h"
8873 /* Override any gcc2 internal prototype to avoid an error.  */
8874 /* We use char because int might match the return type of a gcc2
8875     builtin and then its argument prototype would still apply.  */
8876 char threeDClassRec();
8877
8878 int main() {
8879 threeDClassRec()
8880 ; return 0; }
8881 EOF
8882 if { (eval echo configure:8883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8883   rm -rf conftest*
8884   eval "ac_cv_lib_$ac_lib_var=yes"
8885 else
8886   echo "configure: failed program was:" >&5
8887   cat conftest.$ac_ext >&5
8888   rm -rf conftest*
8889   eval "ac_cv_lib_$ac_lib_var=no"
8890 fi
8891 rm -f conftest*
8892 xe_check_libs=""
8893
8894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8895   echo "$ac_t""yes" 1>&6
8896   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8897 else
8898   echo "$ac_t""no" 1>&6
8899 athena_lib=$athena_variant
8900 fi
8901
8902
8903       
8904 else
8905   echo "$ac_t""no" 1>&6
8906 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8907 fi
8908
8909
8910   else
8911         
8912 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8913 echo "configure:8914: checking for threeDClassRec in -l$athena_variant" >&5
8914 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8915
8916 xe_check_libs=" -l$athena_variant "
8917 cat > conftest.$ac_ext <<EOF
8918 #line 8919 "configure"
8919 #include "confdefs.h"
8920 /* Override any gcc2 internal prototype to avoid an error.  */
8921 /* We use char because int might match the return type of a gcc2
8922     builtin and then its argument prototype would still apply.  */
8923 char threeDClassRec();
8924
8925 int main() {
8926 threeDClassRec()
8927 ; return 0; }
8928 EOF
8929 if { (eval echo configure:8930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8930   rm -rf conftest*
8931   eval "ac_cv_lib_$ac_lib_var=yes"
8932 else
8933   echo "configure: failed program was:" >&5
8934   cat conftest.$ac_ext >&5
8935   rm -rf conftest*
8936   eval "ac_cv_lib_$ac_lib_var=no"
8937 fi
8938 rm -f conftest*
8939 xe_check_libs=""
8940
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8942   echo "$ac_t""yes" 1>&6
8943   athena_lib=$athena_variant
8944 else
8945   echo "$ac_t""no" 1>&6
8946 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8947 echo "configure:8948: checking for threeDClassRec in -lXaw" >&5
8948 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8949
8950 xe_check_libs=" -lXaw "
8951 cat > conftest.$ac_ext <<EOF
8952 #line 8953 "configure"
8953 #include "confdefs.h"
8954 /* Override any gcc2 internal prototype to avoid an error.  */
8955 /* We use char because int might match the return type of a gcc2
8956     builtin and then its argument prototype would still apply.  */
8957 char threeDClassRec();
8958
8959 int main() {
8960 threeDClassRec()
8961 ; return 0; }
8962 EOF
8963 if { (eval echo configure:8964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8964   rm -rf conftest*
8965   eval "ac_cv_lib_$ac_lib_var=yes"
8966 else
8967   echo "configure: failed program was:" >&5
8968   cat conftest.$ac_ext >&5
8969   rm -rf conftest*
8970   eval "ac_cv_lib_$ac_lib_var=no"
8971 fi
8972 rm -f conftest*
8973 xe_check_libs=""
8974
8975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8976   echo "$ac_t""yes" 1>&6
8977   athena_lib=Xaw;
8978           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8979         
8980 else
8981   echo "$ac_t""no" 1>&6
8982 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8983 fi
8984
8985
8986 fi
8987
8988
8989   fi
8990
8991     if test "$athena_3d" = "no"; then
8992     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8993 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8994 echo "configure:8995: checking for X11/Xaw/ThreeD.h" >&5
8995
8996 cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 #include <X11/Xaw/ThreeD.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   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9018 else
9019   echo "$ac_t""no" 1>&6
9020 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
9021 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
9022 echo "configure:9023: checking for X11/Xaw/XawInit.h" >&5
9023
9024 cat > conftest.$ac_ext <<EOF
9025 #line 9026 "configure"
9026 #include "confdefs.h"
9027 #include <X11/Xaw/XawInit.h>
9028 EOF
9029 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9030 { (eval echo configure:9031: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9031 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9032 if test -z "$ac_err"; then
9033   rm -rf conftest*
9034   eval "ac_cv_header_$ac_safe=yes"
9035 else
9036   echo "$ac_err" >&5
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_header_$ac_safe=no"
9041 fi
9042 rm -f conftest*
9043 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9044   echo "$ac_t""yes" 1>&6
9045   athena_h_path=X11/Xaw
9046 else
9047   echo "$ac_t""no" 1>&6
9048 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
9049 fi
9050
9051 fi
9052
9053   else
9054             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9055 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
9056 echo "configure:9057: checking for X11/$athena_variant/XawInit.h" >&5
9057
9058 cat > conftest.$ac_ext <<EOF
9059 #line 9060 "configure"
9060 #include "confdefs.h"
9061 #include <X11/$athena_variant/XawInit.h>
9062 EOF
9063 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9064 { (eval echo configure:9065: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9065 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9066 if test -z "$ac_err"; then
9067   rm -rf conftest*
9068   eval "ac_cv_header_$ac_safe=yes"
9069 else
9070   echo "$ac_err" >&5
9071   echo "configure: failed program was:" >&5
9072   cat conftest.$ac_ext >&5
9073   rm -rf conftest*
9074   eval "ac_cv_header_$ac_safe=no"
9075 fi
9076 rm -f conftest*
9077 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9078   echo "$ac_t""yes" 1>&6
9079   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9080 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9081 echo "configure:9082: checking for X11/$athena_variant/ThreeD.h" >&5
9082
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 #include <X11/$athena_variant/ThreeD.h>
9087 EOF
9088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9089 { (eval echo configure:9090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9091 if test -z "$ac_err"; then
9092   rm -rf conftest*
9093   eval "ac_cv_header_$ac_safe=yes"
9094 else
9095   echo "$ac_err" >&5
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_header_$ac_safe=no"
9100 fi
9101 rm -f conftest*
9102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9103   echo "$ac_t""yes" 1>&6
9104   athena_h_path=X11/$athena_variant
9105 else
9106   echo "$ac_t""no" 1>&6
9107 fi
9108
9109 else
9110   echo "$ac_t""no" 1>&6
9111 fi
9112
9113
9114         if test -z "$athena_h_path"; then
9115       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9116 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9117 echo "configure:9118: checking for $athena_variant/XawInit.h" >&5
9118
9119 cat > conftest.$ac_ext <<EOF
9120 #line 9121 "configure"
9121 #include "confdefs.h"
9122 #include <$athena_variant/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 "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9141 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9142 echo "configure:9143: checking for $athena_variant/ThreeD.h" >&5
9143
9144 cat > conftest.$ac_ext <<EOF
9145 #line 9146 "configure"
9146 #include "confdefs.h"
9147 #include <$athena_variant/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   athena_h_path=$athena_variant
9166 else
9167   echo "$ac_t""no" 1>&6
9168 fi
9169
9170 else
9171   echo "$ac_t""no" 1>&6
9172 fi
9173
9174     fi
9175
9176         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9177       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9178 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9179 echo "configure:9180: checking for X11/Xaw3d/XawInit.h" >&5
9180
9181 cat > conftest.$ac_ext <<EOF
9182 #line 9183 "configure"
9183 #include "confdefs.h"
9184 #include <X11/Xaw3d/XawInit.h>
9185 EOF
9186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9187 { (eval echo configure:9188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9189 if test -z "$ac_err"; then
9190   rm -rf conftest*
9191   eval "ac_cv_header_$ac_safe=yes"
9192 else
9193   echo "$ac_err" >&5
9194   echo "configure: failed program was:" >&5
9195   cat conftest.$ac_ext >&5
9196   rm -rf conftest*
9197   eval "ac_cv_header_$ac_safe=no"
9198 fi
9199 rm -f conftest*
9200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9201   echo "$ac_t""yes" 1>&6
9202   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9203 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9204 echo "configure:9205: checking for X11/Xaw3d/ThreeD.h" >&5
9205
9206 cat > conftest.$ac_ext <<EOF
9207 #line 9208 "configure"
9208 #include "confdefs.h"
9209 #include <X11/Xaw3d/ThreeD.h>
9210 EOF
9211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9212 { (eval echo configure:9213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9214 if test -z "$ac_err"; then
9215   rm -rf conftest*
9216   eval "ac_cv_header_$ac_safe=yes"
9217 else
9218   echo "$ac_err" >&5
9219   echo "configure: failed program was:" >&5
9220   cat conftest.$ac_ext >&5
9221   rm -rf conftest*
9222   eval "ac_cv_header_$ac_safe=no"
9223 fi
9224 rm -f conftest*
9225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9226   echo "$ac_t""yes" 1>&6
9227   
9228             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9229             athena_h_path=X11/Xaw3d
9230           
9231 else
9232   echo "$ac_t""no" 1>&6
9233 fi
9234
9235 else
9236   echo "$ac_t""no" 1>&6
9237 fi
9238
9239     fi
9240
9241         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9242       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9243 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9244 echo "configure:9245: checking for Xaw3d/XawInit.h" >&5
9245
9246 cat > conftest.$ac_ext <<EOF
9247 #line 9248 "configure"
9248 #include "confdefs.h"
9249 #include <Xaw3d/XawInit.h>
9250 EOF
9251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9252 { (eval echo configure:9253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9254 if test -z "$ac_err"; then
9255   rm -rf conftest*
9256   eval "ac_cv_header_$ac_safe=yes"
9257 else
9258   echo "$ac_err" >&5
9259   echo "configure: failed program was:" >&5
9260   cat conftest.$ac_ext >&5
9261   rm -rf conftest*
9262   eval "ac_cv_header_$ac_safe=no"
9263 fi
9264 rm -f conftest*
9265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9268 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9269 echo "configure:9270: checking for Xaw3d/ThreeD.h" >&5
9270
9271 cat > conftest.$ac_ext <<EOF
9272 #line 9273 "configure"
9273 #include "confdefs.h"
9274 #include <Xaw3d/ThreeD.h>
9275 EOF
9276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9277 { (eval echo configure:9278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9279 if test -z "$ac_err"; then
9280   rm -rf conftest*
9281   eval "ac_cv_header_$ac_safe=yes"
9282 else
9283   echo "$ac_err" >&5
9284   echo "configure: failed program was:" >&5
9285   cat conftest.$ac_ext >&5
9286   rm -rf conftest*
9287   eval "ac_cv_header_$ac_safe=no"
9288 fi
9289 rm -f conftest*
9290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9291   echo "$ac_t""yes" 1>&6
9292   
9293             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9294             athena_h_path=Xaw3d
9295           
9296 else
9297   echo "$ac_t""no" 1>&6
9298 fi
9299
9300 else
9301   echo "$ac_t""no" 1>&6
9302 fi
9303
9304     fi
9305
9306             if test -z "$athena_h_path"; then
9307       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9308 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9309 echo "configure:9310: checking for X11/Xaw/ThreeD.h" >&5
9310
9311 cat > conftest.$ac_ext <<EOF
9312 #line 9313 "configure"
9313 #include "confdefs.h"
9314 #include <X11/Xaw/ThreeD.h>
9315 EOF
9316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9317 { (eval echo configure:9318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9319 if test -z "$ac_err"; then
9320   rm -rf conftest*
9321   eval "ac_cv_header_$ac_safe=yes"
9322 else
9323   echo "$ac_err" >&5
9324   echo "configure: failed program was:" >&5
9325   cat conftest.$ac_ext >&5
9326   rm -rf conftest*
9327   eval "ac_cv_header_$ac_safe=no"
9328 fi
9329 rm -f conftest*
9330 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9331   echo "$ac_t""yes" 1>&6
9332   
9333           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9334           athena_h_path=X11/Xaw
9335         
9336 else
9337   echo "$ac_t""no" 1>&6
9338 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9339 fi
9340
9341     fi
9342   fi
9343
9344     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9345     have_xaw=yes
9346   else
9347     have_xaw=no
9348   fi
9349
9350 else
9351   have_xaw=no
9352 fi 
9353 if test "$with_x11" = "yes"; then
9354     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9355 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9356 echo "configure:9357: checking for Xm/Xm.h" >&5
9357
9358 cat > conftest.$ac_ext <<EOF
9359 #line 9360 "configure"
9360 #include "confdefs.h"
9361 #include <Xm/Xm.h>
9362 EOF
9363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9364 { (eval echo configure:9365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9366 if test -z "$ac_err"; then
9367   rm -rf conftest*
9368   eval "ac_cv_header_$ac_safe=yes"
9369 else
9370   echo "$ac_err" >&5
9371   echo "configure: failed program was:" >&5
9372   cat conftest.$ac_ext >&5
9373   rm -rf conftest*
9374   eval "ac_cv_header_$ac_safe=no"
9375 fi
9376 rm -f conftest*
9377 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9378   echo "$ac_t""yes" 1>&6
9379   
9380 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9381 echo "configure:9382: checking for XmStringFree in -lXm" >&5
9382 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9383
9384 xe_check_libs=" -lXm "
9385 cat > conftest.$ac_ext <<EOF
9386 #line 9387 "configure"
9387 #include "confdefs.h"
9388 /* Override any gcc2 internal prototype to avoid an error.  */
9389 /* We use char because int might match the return type of a gcc2
9390     builtin and then its argument prototype would still apply.  */
9391 char XmStringFree();
9392
9393 int main() {
9394 XmStringFree()
9395 ; return 0; }
9396 EOF
9397 if { (eval echo configure:9398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9398   rm -rf conftest*
9399   eval "ac_cv_lib_$ac_lib_var=yes"
9400 else
9401   echo "configure: failed program was:" >&5
9402   cat conftest.$ac_ext >&5
9403   rm -rf conftest*
9404   eval "ac_cv_lib_$ac_lib_var=no"
9405 fi
9406 rm -f conftest*
9407 xe_check_libs=""
9408
9409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9410   echo "$ac_t""yes" 1>&6
9411   have_motif=yes
9412 else
9413   echo "$ac_t""no" 1>&6
9414 have_motif=no
9415 fi
9416
9417
9418 else
9419   echo "$ac_t""no" 1>&6
9420 have_motif=no
9421 fi
9422
9423
9424   if test "$have_motif" = "yes"; then
9425         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9426 echo "configure:9427: checking for Lesstif" >&5
9427     cat > conftest.$ac_ext <<EOF
9428 #line 9429 "configure"
9429 #include "confdefs.h"
9430 #include <Xm/Xm.h>
9431 #ifdef LESSTIF_VERSION
9432 yes
9433 #endif
9434
9435 EOF
9436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9437   egrep "yes" >/dev/null 2>&1; then
9438   rm -rf conftest*
9439   have_lesstif=yes
9440 else
9441   rm -rf conftest*
9442   have_lesstif=no
9443 fi
9444 rm -f conftest*
9445
9446   echo "$ac_t""$have_lesstif" 1>&6
9447   fi
9448
9449 fi 
9450
9451 case "$with_menubars" in "" | "yes" | "athena" )
9452   with_menubars="lucid" ;;
9453 esac
9454 case "$with_dialogs" in "" | "yes" | "lucid" )
9455   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9456   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9457   else with_dialogs=no
9458   fi ;;
9459 esac
9460 case "$with_scrollbars" in "" | "yes" )
9461   with_scrollbars="lucid" ;;
9462 esac
9463 case "$with_widgets" in "" | "yes" | "lucid")
9464   if   test "$have_motif" = "yes"; then with_widgets="motif"
9465   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9466   else with_widgets=no
9467   fi ;;
9468 esac
9469
9470 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9471
9472 case "$all_widgets" in
9473   *athena* )
9474     if test "$have_xaw" != "yes"; then
9475       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9476     fi
9477
9478         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9479
9480         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9481
9482                     { test "$extra_verbose" = "yes" && cat << EOF
9483     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9484 EOF
9485 cat >> confdefs.h <<EOF
9486 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9487 EOF
9488 }
9489
9490     { test "$extra_verbose" = "yes" && cat << EOF
9491     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9492 EOF
9493 cat >> confdefs.h <<EOF
9494 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9495 EOF
9496 }
9497
9498     { test "$extra_verbose" = "yes" && cat << EOF
9499     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9500 EOF
9501 cat >> confdefs.h <<EOF
9502 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9503 EOF
9504 }
9505
9506     { test "$extra_verbose" = "yes" && cat << EOF
9507     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9508 EOF
9509 cat >> confdefs.h <<EOF
9510 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9511 EOF
9512 }
9513
9514     { test "$extra_verbose" = "yes" && cat << EOF
9515     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9516 EOF
9517 cat >> confdefs.h <<EOF
9518 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9519 EOF
9520 }
9521
9522     { test "$extra_verbose" = "yes" && cat << EOF
9523     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9524 EOF
9525 cat >> confdefs.h <<EOF
9526 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9527 EOF
9528 }
9529
9530     { test "$extra_verbose" = "yes" && cat << EOF
9531     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9532 EOF
9533 cat >> confdefs.h <<EOF
9534 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9535 EOF
9536 }
9537
9538     { test "$extra_verbose" = "yes" && cat << EOF
9539     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9540 EOF
9541 cat >> confdefs.h <<EOF
9542 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9543 EOF
9544 }
9545
9546     { test "$extra_verbose" = "yes" && cat << EOF
9547     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9548 EOF
9549 cat >> confdefs.h <<EOF
9550 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9551 EOF
9552 }
9553
9554     { test "$extra_verbose" = "yes" && cat << EOF
9555     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9556 EOF
9557 cat >> confdefs.h <<EOF
9558 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9559 EOF
9560 }
9561
9562
9563     { test "$extra_verbose" = "yes" && cat << \EOF
9564     Defining LWLIB_USES_ATHENA
9565 EOF
9566 cat >> confdefs.h <<\EOF
9567 #define LWLIB_USES_ATHENA 1
9568 EOF
9569 }
9570
9571     { test "$extra_verbose" = "yes" && cat << \EOF
9572     Defining NEED_ATHENA
9573 EOF
9574 cat >> confdefs.h <<\EOF
9575 #define NEED_ATHENA 1
9576 EOF
9577 }
9578
9579     need_athena="yes"
9580
9581     if test "$athena_3d" = "yes"; then
9582       { test "$extra_verbose" = "yes" && cat << \EOF
9583     Defining HAVE_ATHENA_3D
9584 EOF
9585 cat >> confdefs.h <<\EOF
9586 #define HAVE_ATHENA_3D 1
9587 EOF
9588 }
9589
9590     fi
9591   ;;
9592 esac
9593
9594 case "$all_widgets" in *motif* )
9595   { test "$extra_verbose" = "yes" && cat << \EOF
9596     Defining LWLIB_USES_MOTIF
9597 EOF
9598 cat >> confdefs.h <<\EOF
9599 #define LWLIB_USES_MOTIF 1
9600 EOF
9601 }
9602
9603   { test "$extra_verbose" = "yes" && cat << \EOF
9604     Defining NEED_MOTIF
9605 EOF
9606 cat >> confdefs.h <<\EOF
9607 #define NEED_MOTIF 1
9608 EOF
9609 }
9610
9611   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9612   need_motif=yes ;;
9613 esac
9614
9615 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9616 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9617 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9618 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9619         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9620 case "$with_widgets" in athena* )
9621         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;;
9622 esac
9623 case "$all_widgets" in *lucid* )
9624   { test "$extra_verbose" = "yes" && cat << \EOF
9625     Defining NEED_LUCID
9626 EOF
9627 cat >> confdefs.h <<\EOF
9628 #define NEED_LUCID 1
9629 EOF
9630 }
9631
9632   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9633 esac
9634
9635
9636
9637 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9638     Defining LWLIB_SCROLLBARS_ATHENA
9639 EOF
9640 cat >> confdefs.h <<\EOF
9641 #define LWLIB_SCROLLBARS_ATHENA 1
9642 EOF
9643 }
9644
9645 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9646     Defining LWLIB_DIALOGS_ATHENA
9647 EOF
9648 cat >> confdefs.h <<\EOF
9649 #define LWLIB_DIALOGS_ATHENA 1
9650 EOF
9651 }
9652
9653
9654 if test "$athena_3d" = "yes"; then
9655   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9656     Defining LWLIB_SCROLLBARS_ATHENA3D
9657 EOF
9658 cat >> confdefs.h <<\EOF
9659 #define LWLIB_SCROLLBARS_ATHENA3D 1
9660 EOF
9661 }
9662
9663   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9664     Defining LWLIB_DIALOGS_ATHENA3D
9665 EOF
9666 cat >> confdefs.h <<\EOF
9667 #define LWLIB_DIALOGS_ATHENA3D 1
9668 EOF
9669 }
9670
9671 fi
9672
9673 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9674     Defining LWLIB_WIDGETS_ATHENA
9675 EOF
9676 cat >> confdefs.h <<\EOF
9677 #define LWLIB_WIDGETS_ATHENA 1
9678 EOF
9679 }
9680 ;; esac
9681 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9682         { test "$extra_verbose" = "yes" && cat << \EOF
9683     Defining LWLIB_TABS_LUCID
9684 EOF
9685 cat >> confdefs.h <<\EOF
9686 #define LWLIB_TABS_LUCID 1
9687 EOF
9688 }
9689
9690
9691 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9692     Defining HAVE_MENUBARS
9693 EOF
9694 cat >> confdefs.h <<\EOF
9695 #define HAVE_MENUBARS 1
9696 EOF
9697 }
9698
9699 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9700     Defining HAVE_SCROLLBARS
9701 EOF
9702 cat >> confdefs.h <<\EOF
9703 #define HAVE_SCROLLBARS 1
9704 EOF
9705 }
9706
9707 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9708     Defining HAVE_DIALOGS
9709 EOF
9710 cat >> confdefs.h <<\EOF
9711 #define HAVE_DIALOGS 1
9712 EOF
9713 }
9714
9715 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9716     Defining HAVE_TOOLBARS
9717 EOF
9718 cat >> confdefs.h <<\EOF
9719 #define HAVE_TOOLBARS 1
9720 EOF
9721 }
9722
9723 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9724     Defining HAVE_WIDGETS
9725 EOF
9726 cat >> confdefs.h <<\EOF
9727 #define HAVE_WIDGETS 1
9728 EOF
9729 }
9730
9731
9732 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9733     Defining LWLIB_MENUBARS_LUCID
9734 EOF
9735 cat >> confdefs.h <<\EOF
9736 #define LWLIB_MENUBARS_LUCID 1
9737 EOF
9738 }
9739
9740 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9741     Defining LWLIB_SCROLLBARS_LUCID
9742 EOF
9743 cat >> confdefs.h <<\EOF
9744 #define LWLIB_SCROLLBARS_LUCID 1
9745 EOF
9746 }
9747
9748
9749 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9750     Defining LWLIB_MENUBARS_MOTIF
9751 EOF
9752 cat >> confdefs.h <<\EOF
9753 #define LWLIB_MENUBARS_MOTIF 1
9754 EOF
9755 }
9756
9757 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9758     Defining LWLIB_SCROLLBARS_MOTIF
9759 EOF
9760 cat >> confdefs.h <<\EOF
9761 #define LWLIB_SCROLLBARS_MOTIF 1
9762 EOF
9763 }
9764
9765 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9766     Defining LWLIB_DIALOGS_MOTIF
9767 EOF
9768 cat >> confdefs.h <<\EOF
9769 #define LWLIB_DIALOGS_MOTIF 1
9770 EOF
9771 }
9772
9773 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9774     Defining LWLIB_WIDGETS_MOTIF
9775 EOF
9776 cat >> confdefs.h <<\EOF
9777 #define LWLIB_WIDGETS_MOTIF 1
9778 EOF
9779 }
9780
9781
9782 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9783    echo "    xemacs will be linked with \"menubar.o\""
9784  fi
9785 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9786    echo "    xemacs will be linked with \"scrollbar.o\""
9787  fi
9788 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9789    echo "    xemacs will be linked with \"dialog.o\""
9790  fi
9791 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9792    echo "    xemacs will be linked with \"toolbar.o\""
9793  fi
9794
9795 if test "$with_gtk" = "yes"; then
9796   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9797    echo "    xemacs will be linked with \"menubar-gtk.o\""
9798  fi
9799   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9800    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9801  fi
9802   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9803    echo "    xemacs will be linked with \"dialog-gtk.o\""
9804  fi
9805   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9806    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9807  fi
9808   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9809    echo "    xemacs will be linked with \"gui-gtk.o\""
9810  fi
9811 fi
9812
9813 if test "$with_x11" = "yes"; then
9814   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9815    echo "    xemacs will be linked with \"menubar-x.o\""
9816  fi
9817   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9818    echo "    xemacs will be linked with \"scrollbar-x.o\""
9819  fi
9820   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"dialog-x.o\""
9822  fi
9823   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9824    echo "    xemacs will be linked with \"toolbar-x.o\""
9825  fi
9826   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9827    echo "    xemacs will be linked with \"gui-x.o\""
9828  fi
9829 fi
9830
9831
9832 test -z "$with_mule" && with_mule=no
9833 test -z "$with_file_coding" && with_file_coding=no
9834
9835
9836 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9837   { test "$extra_verbose" = "yes" && cat << \EOF
9838     Defining FILE_CODING
9839 EOF
9840 cat >> confdefs.h <<\EOF
9841 #define FILE_CODING 1
9842 EOF
9843 }
9844
9845   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9846    echo "    xemacs will be linked with \"file-coding.o\""
9847  fi
9848 fi
9849
9850 if test "$with_mule" = "yes" ; then
9851   echo "checking for Mule-related features" 1>&6
9852 echo "configure:9853: checking for Mule-related features" >&5
9853   { test "$extra_verbose" = "yes" && cat << \EOF
9854     Defining MULE
9855 EOF
9856 cat >> confdefs.h <<\EOF
9857 #define MULE 1
9858 EOF
9859 }
9860
9861   { test "$extra_verbose" = "yes" && cat << \EOF
9862     Defining FILE_CODING
9863 EOF
9864 cat >> confdefs.h <<\EOF
9865 #define FILE_CODING 1
9866 EOF
9867 }
9868
9869   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9870    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
9871  fi
9872
9873     for ac_hdr in libintl.h
9874 do
9875 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9876 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9877 echo "configure:9878: checking for $ac_hdr" >&5
9878
9879 cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882 #include <$ac_hdr>
9883 EOF
9884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9885 { (eval echo configure:9886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9887 if test -z "$ac_err"; then
9888   rm -rf conftest*
9889   eval "ac_cv_header_$ac_safe=yes"
9890 else
9891   echo "$ac_err" >&5
9892   echo "configure: failed program was:" >&5
9893   cat conftest.$ac_ext >&5
9894   rm -rf conftest*
9895   eval "ac_cv_header_$ac_safe=no"
9896 fi
9897 rm -f conftest*
9898 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9899   echo "$ac_t""yes" 1>&6
9900     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9901   { test "$extra_verbose" = "yes" && cat << EOF
9902     Defining $ac_tr_hdr
9903 EOF
9904 cat >> confdefs.h <<EOF
9905 #define $ac_tr_hdr 1
9906 EOF
9907 }
9908  
9909 else
9910   echo "$ac_t""no" 1>&6
9911 fi
9912 done
9913
9914   
9915 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9916 echo "configure:9917: checking for strerror in -lintl" >&5
9917 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9918
9919 xe_check_libs=" -lintl "
9920 cat > conftest.$ac_ext <<EOF
9921 #line 9922 "configure"
9922 #include "confdefs.h"
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char strerror();
9927
9928 int main() {
9929 strerror()
9930 ; return 0; }
9931 EOF
9932 if { (eval echo configure:9933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9933   rm -rf conftest*
9934   eval "ac_cv_lib_$ac_lib_var=yes"
9935 else
9936   echo "configure: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   rm -rf conftest*
9939   eval "ac_cv_lib_$ac_lib_var=no"
9940 fi
9941 rm -f conftest*
9942 xe_check_libs=""
9943
9944 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9945   echo "$ac_t""yes" 1>&6
9946     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9947     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9948   { test "$extra_verbose" = "yes" && cat << EOF
9949     Defining $ac_tr_lib
9950 EOF
9951 cat >> confdefs.h <<EOF
9952 #define $ac_tr_lib 1
9953 EOF
9954 }
9955
9956   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9957
9958 else
9959   echo "$ac_t""no" 1>&6
9960 fi
9961
9962
9963
9964   echo "checking for Mule input methods" 1>&6
9965 echo "configure:9966: checking for Mule input methods" >&5
9966         case "$with_xim" in "" | "yes" )
9967     echo "checking for XIM" 1>&6
9968 echo "configure:9969: checking for XIM" >&5
9969     
9970 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9971 echo "configure:9972: checking for XOpenIM in -lX11" >&5
9972 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9973
9974 xe_check_libs=" -lX11 "
9975 cat > conftest.$ac_ext <<EOF
9976 #line 9977 "configure"
9977 #include "confdefs.h"
9978 /* Override any gcc2 internal prototype to avoid an error.  */
9979 /* We use char because int might match the return type of a gcc2
9980     builtin and then its argument prototype would still apply.  */
9981 char XOpenIM();
9982
9983 int main() {
9984 XOpenIM()
9985 ; return 0; }
9986 EOF
9987 if { (eval echo configure:9988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9988   rm -rf conftest*
9989   eval "ac_cv_lib_$ac_lib_var=yes"
9990 else
9991   echo "configure: failed program was:" >&5
9992   cat conftest.$ac_ext >&5
9993   rm -rf conftest*
9994   eval "ac_cv_lib_$ac_lib_var=no"
9995 fi
9996 rm -f conftest*
9997 xe_check_libs=""
9998
9999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10000   echo "$ac_t""yes" 1>&6
10001   with_xim=xlib
10002 else
10003   echo "$ac_t""no" 1>&6
10004 with_xim=no
10005 fi
10006
10007
10008         if test "$have_motif $have_lesstif" = "yes no"; then
10009       
10010 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
10011 echo "configure:10012: checking for XmImMbLookupString in -lXm" >&5
10012 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
10013
10014 xe_check_libs=" -lXm "
10015 cat > conftest.$ac_ext <<EOF
10016 #line 10017 "configure"
10017 #include "confdefs.h"
10018 /* Override any gcc2 internal prototype to avoid an error.  */
10019 /* We use char because int might match the return type of a gcc2
10020     builtin and then its argument prototype would still apply.  */
10021 char XmImMbLookupString();
10022
10023 int main() {
10024 XmImMbLookupString()
10025 ; return 0; }
10026 EOF
10027 if { (eval echo configure:10028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10028   rm -rf conftest*
10029   eval "ac_cv_lib_$ac_lib_var=yes"
10030 else
10031   echo "configure: failed program was:" >&5
10032   cat conftest.$ac_ext >&5
10033   rm -rf conftest*
10034   eval "ac_cv_lib_$ac_lib_var=no"
10035 fi
10036 rm -f conftest*
10037 xe_check_libs=""
10038
10039 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10040   echo "$ac_t""yes" 1>&6
10041   with_xim=motif
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045
10046
10047     fi ;;
10048   esac
10049   if test "$with_xim" != "no"; then
10050     { test "$extra_verbose" = "yes" && cat << \EOF
10051     Defining HAVE_XIM
10052 EOF
10053 cat >> confdefs.h <<\EOF
10054 #define HAVE_XIM 1
10055 EOF
10056 }
10057
10058     if test "$with_xim" = "xlib"; then
10059       { test "$extra_verbose" = "yes" && cat << \EOF
10060     Defining XIM_XLIB
10061 EOF
10062 cat >> confdefs.h <<\EOF
10063 #define XIM_XLIB 1
10064 EOF
10065 }
10066
10067       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10068    echo "    xemacs will be linked with \"input-method-xlib.o\""
10069  fi
10070     fi
10071     if test "$with_xim" = "motif"; then
10072       { test "$extra_verbose" = "yes" && cat << \EOF
10073     Defining XIM_MOTIF
10074 EOF
10075 cat >> confdefs.h <<\EOF
10076 #define XIM_MOTIF 1
10077 EOF
10078 }
10079
10080       need_motif=yes
10081       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10082    echo "    xemacs will be linked with \"input-method-motif.o\""
10083  fi
10084     fi
10085     if test "$with_xim" = "motif"; then
10086       with_xfs=no
10087     fi
10088   fi
10089
10090     if test "$with_xfs" = "yes" ; then
10091     echo "checking for XFontSet" 1>&6
10092 echo "configure:10093: checking for XFontSet" >&5
10093     
10094 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10095 echo "configure:10096: checking for XmbDrawString in -lX11" >&5
10096 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10097
10098 xe_check_libs=" -lX11 "
10099 cat > conftest.$ac_ext <<EOF
10100 #line 10101 "configure"
10101 #include "confdefs.h"
10102 /* Override any gcc2 internal prototype to avoid an error.  */
10103 /* We use char because int might match the return type of a gcc2
10104     builtin and then its argument prototype would still apply.  */
10105 char XmbDrawString();
10106
10107 int main() {
10108 XmbDrawString()
10109 ; return 0; }
10110 EOF
10111 if { (eval echo configure:10112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10112   rm -rf conftest*
10113   eval "ac_cv_lib_$ac_lib_var=yes"
10114 else
10115   echo "configure: failed program was:" >&5
10116   cat conftest.$ac_ext >&5
10117   rm -rf conftest*
10118   eval "ac_cv_lib_$ac_lib_var=no"
10119 fi
10120 rm -f conftest*
10121 xe_check_libs=""
10122
10123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10124   echo "$ac_t""yes" 1>&6
10125   :
10126 else
10127   echo "$ac_t""no" 1>&6
10128 with_xfs=no
10129 fi
10130
10131
10132     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10133       { test "$extra_verbose" = "yes" && cat << \EOF
10134     Defining USE_XFONTSET
10135 EOF
10136 cat >> confdefs.h <<\EOF
10137 #define USE_XFONTSET 1
10138 EOF
10139 }
10140
10141       if test "$with_xim" = "no" ; then
10142         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10143    echo "    xemacs will be linked with \"input-method-xlib.o\""
10144  fi
10145       fi
10146     fi
10147   fi 
10148     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10149   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10150 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10151 echo "configure:10152: checking for wnn/jllib.h" >&5
10152
10153 cat > conftest.$ac_ext <<EOF
10154 #line 10155 "configure"
10155 #include "confdefs.h"
10156 #include <wnn/jllib.h>
10157 EOF
10158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10159 { (eval echo configure:10160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10161 if test -z "$ac_err"; then
10162   rm -rf conftest*
10163   eval "ac_cv_header_$ac_safe=yes"
10164 else
10165   echo "$ac_err" >&5
10166   echo "configure: failed program was:" >&5
10167   cat conftest.$ac_ext >&5
10168   rm -rf conftest*
10169   eval "ac_cv_header_$ac_safe=no"
10170 fi
10171 rm -f conftest*
10172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10173   echo "$ac_t""yes" 1>&6
10174   :
10175 else
10176   echo "$ac_t""no" 1>&6
10177 with_wnn=no
10178 fi
10179  }
10180     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10181 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10182 echo "configure:10183: checking for wnn/commonhd.h" >&5
10183
10184 cat > conftest.$ac_ext <<EOF
10185 #line 10186 "configure"
10186 #include "confdefs.h"
10187 #include <wnn/commonhd.h>
10188 EOF
10189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10190 { (eval echo configure:10191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10192 if test -z "$ac_err"; then
10193   rm -rf conftest*
10194   eval "ac_cv_header_$ac_safe=yes"
10195 else
10196   echo "$ac_err" >&5
10197   echo "configure: failed program was:" >&5
10198   cat conftest.$ac_ext >&5
10199   rm -rf conftest*
10200   eval "ac_cv_header_$ac_safe=no"
10201 fi
10202 rm -f conftest*
10203 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10204   echo "$ac_t""yes" 1>&6
10205   :
10206 else
10207   echo "$ac_t""no" 1>&6
10208 with_wnn=no
10209 fi
10210  }
10211     if test "$with_wnn" != "no"; then
10212     for ac_func in crypt
10213 do
10214 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10215 echo "configure:10216: checking for $ac_func" >&5
10216
10217 cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 /* System header to define __stub macros and hopefully few prototypes,
10221     which can conflict with char $ac_func(); below.  */
10222 #include <assert.h>
10223 /* Override any gcc2 internal prototype to avoid an error.  */
10224 /* We use char because int might match the return type of a gcc2
10225     builtin and then its argument prototype would still apply.  */
10226 char $ac_func();
10227
10228 int main() {
10229
10230 /* The GNU C library defines this for functions which it implements
10231     to always fail with ENOSYS.  Some functions are actually named
10232     something starting with __ and the normal name is an alias.  */
10233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10234 choke me
10235 #else
10236 $ac_func();
10237 #endif
10238
10239 ; return 0; }
10240 EOF
10241 if { (eval echo configure:10242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10242   rm -rf conftest*
10243   eval "ac_cv_func_$ac_func=yes"
10244 else
10245   echo "configure: failed program was:" >&5
10246   cat conftest.$ac_ext >&5
10247   rm -rf conftest*
10248   eval "ac_cv_func_$ac_func=no"
10249 fi
10250 rm -f conftest*
10251
10252 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10253   echo "$ac_t""yes" 1>&6
10254     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10255   { test "$extra_verbose" = "yes" && cat << EOF
10256     Defining $ac_tr_func
10257 EOF
10258 cat >> confdefs.h <<EOF
10259 #define $ac_tr_func 1
10260 EOF
10261 }
10262  
10263 else
10264   echo "$ac_t""no" 1>&6
10265 fi
10266 done
10267
10268     test "$ac_cv_func_crypt" != "yes" && { 
10269 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10270 echo "configure:10271: checking for crypt in -lcrypt" >&5
10271 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10272
10273 xe_check_libs=" -lcrypt "
10274 cat > conftest.$ac_ext <<EOF
10275 #line 10276 "configure"
10276 #include "confdefs.h"
10277 /* Override any gcc2 internal prototype to avoid an error.  */
10278 /* We use char because int might match the return type of a gcc2
10279     builtin and then its argument prototype would still apply.  */
10280 char crypt();
10281
10282 int main() {
10283 crypt()
10284 ; return 0; }
10285 EOF
10286 if { (eval echo configure:10287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10287   rm -rf conftest*
10288   eval "ac_cv_lib_$ac_lib_var=yes"
10289 else
10290   echo "configure: failed program was:" >&5
10291   cat conftest.$ac_ext >&5
10292   rm -rf conftest*
10293   eval "ac_cv_lib_$ac_lib_var=no"
10294 fi
10295 rm -f conftest*
10296 xe_check_libs=""
10297
10298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10299   echo "$ac_t""yes" 1>&6
10300     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10302   { test "$extra_verbose" = "yes" && cat << EOF
10303     Defining $ac_tr_lib
10304 EOF
10305 cat >> confdefs.h <<EOF
10306 #define $ac_tr_lib 1
10307 EOF
10308 }
10309
10310   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10311
10312 else
10313   echo "$ac_t""no" 1>&6
10314 fi
10315
10316  }
10317   fi
10318     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10319     
10320 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10321 echo "configure:10322: checking for jl_dic_list_e in -lwnn" >&5
10322 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10323
10324 xe_check_libs=" -lwnn "
10325 cat > conftest.$ac_ext <<EOF
10326 #line 10327 "configure"
10327 #include "confdefs.h"
10328 /* Override any gcc2 internal prototype to avoid an error.  */
10329 /* We use char because int might match the return type of a gcc2
10330     builtin and then its argument prototype would still apply.  */
10331 char jl_dic_list_e();
10332
10333 int main() {
10334 jl_dic_list_e()
10335 ; return 0; }
10336 EOF
10337 if { (eval echo configure:10338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10338   rm -rf conftest*
10339   eval "ac_cv_lib_$ac_lib_var=yes"
10340 else
10341   echo "configure: failed program was:" >&5
10342   cat conftest.$ac_ext >&5
10343   rm -rf conftest*
10344   eval "ac_cv_lib_$ac_lib_var=no"
10345 fi
10346 rm -f conftest*
10347 xe_check_libs=""
10348
10349 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10350   echo "$ac_t""yes" 1>&6
10351   libwnn=wnn
10352 else
10353   echo "$ac_t""no" 1>&6
10354 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10355 echo "configure:10356: checking for jl_dic_list_e in -lwnn4" >&5
10356 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10357
10358 xe_check_libs=" -lwnn4 "
10359 cat > conftest.$ac_ext <<EOF
10360 #line 10361 "configure"
10361 #include "confdefs.h"
10362 /* Override any gcc2 internal prototype to avoid an error.  */
10363 /* We use char because int might match the return type of a gcc2
10364     builtin and then its argument prototype would still apply.  */
10365 char jl_dic_list_e();
10366
10367 int main() {
10368 jl_dic_list_e()
10369 ; return 0; }
10370 EOF
10371 if { (eval echo configure:10372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10372   rm -rf conftest*
10373   eval "ac_cv_lib_$ac_lib_var=yes"
10374 else
10375   echo "configure: failed program was:" >&5
10376   cat conftest.$ac_ext >&5
10377   rm -rf conftest*
10378   eval "ac_cv_lib_$ac_lib_var=no"
10379 fi
10380 rm -f conftest*
10381 xe_check_libs=""
10382
10383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10384   echo "$ac_t""yes" 1>&6
10385   libwnn=wnn4
10386 else
10387   echo "$ac_t""no" 1>&6
10388 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10389 echo "configure:10390: checking for jl_dic_list_e in -lwnn6" >&5
10390 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10391
10392 xe_check_libs=" -lwnn6 "
10393 cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 /* Override any gcc2 internal prototype to avoid an error.  */
10397 /* We use char because int might match the return type of a gcc2
10398     builtin and then its argument prototype would still apply.  */
10399 char jl_dic_list_e();
10400
10401 int main() {
10402 jl_dic_list_e()
10403 ; return 0; }
10404 EOF
10405 if { (eval echo configure:10406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10406   rm -rf conftest*
10407   eval "ac_cv_lib_$ac_lib_var=yes"
10408 else
10409   echo "configure: failed program was:" >&5
10410   cat conftest.$ac_ext >&5
10411   rm -rf conftest*
10412   eval "ac_cv_lib_$ac_lib_var=no"
10413 fi
10414 rm -f conftest*
10415 xe_check_libs=""
10416
10417 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10418   echo "$ac_t""yes" 1>&6
10419   libwnn=wnn6
10420 else
10421   echo "$ac_t""no" 1>&6
10422 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10423 echo "configure:10424: checking for dic_list_e in -lwnn6_fromsrc" >&5
10424 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10425
10426 xe_check_libs=" -lwnn6_fromsrc "
10427 cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 /* Override any gcc2 internal prototype to avoid an error.  */
10431 /* We use char because int might match the return type of a gcc2
10432     builtin and then its argument prototype would still apply.  */
10433 char dic_list_e();
10434
10435 int main() {
10436 dic_list_e()
10437 ; return 0; }
10438 EOF
10439 if { (eval echo configure:10440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10440   rm -rf conftest*
10441   eval "ac_cv_lib_$ac_lib_var=yes"
10442 else
10443   echo "configure: failed program was:" >&5
10444   cat conftest.$ac_ext >&5
10445   rm -rf conftest*
10446   eval "ac_cv_lib_$ac_lib_var=no"
10447 fi
10448 rm -f conftest*
10449 xe_check_libs=""
10450
10451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10452   echo "$ac_t""yes" 1>&6
10453   libwnn=wnn6_fromsrc
10454 else
10455   echo "$ac_t""no" 1>&6
10456 with_wnn=no
10457 fi
10458
10459
10460 fi
10461
10462
10463 fi
10464
10465
10466 fi
10467
10468
10469   fi
10470   test -z "$with_wnn" && with_wnn=yes
10471   if test "$with_wnn" = "yes"; then
10472     { test "$extra_verbose" = "yes" && cat << \EOF
10473     Defining HAVE_WNN
10474 EOF
10475 cat >> confdefs.h <<\EOF
10476 #define HAVE_WNN 1
10477 EOF
10478 }
10479
10480     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10481     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10482    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10483  fi
10484     if test "$with_wnn6" != "no"; then
10485       
10486 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10487 echo "configure:10488: checking for jl_fi_dic_list in -l$libwnn" >&5
10488 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10489
10490 xe_check_libs=" -l$libwnn "
10491 cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494 /* Override any gcc2 internal prototype to avoid an error.  */
10495 /* We use char because int might match the return type of a gcc2
10496     builtin and then its argument prototype would still apply.  */
10497 char jl_fi_dic_list();
10498
10499 int main() {
10500 jl_fi_dic_list()
10501 ; return 0; }
10502 EOF
10503 if { (eval echo configure:10504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10504   rm -rf conftest*
10505   eval "ac_cv_lib_$ac_lib_var=yes"
10506 else
10507   echo "configure: failed program was:" >&5
10508   cat conftest.$ac_ext >&5
10509   rm -rf conftest*
10510   eval "ac_cv_lib_$ac_lib_var=no"
10511 fi
10512 rm -f conftest*
10513 xe_check_libs=""
10514
10515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10516   echo "$ac_t""yes" 1>&6
10517   with_wnn6=yes
10518 else
10519   echo "$ac_t""no" 1>&6
10520 fi
10521
10522
10523       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10524     Defining WNN6
10525 EOF
10526 cat >> confdefs.h <<\EOF
10527 #define WNN6 1
10528 EOF
10529 }
10530
10531     fi
10532   fi
10533
10534     canna_includes_found=no
10535   if test "$with_canna" != "no"; then
10536     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10537 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10538 echo "configure:10539: checking for canna/jrkanji.h" >&5
10539
10540 cat > conftest.$ac_ext <<EOF
10541 #line 10542 "configure"
10542 #include "confdefs.h"
10543 #include <canna/jrkanji.h>
10544 EOF
10545 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10546 { (eval echo configure:10547: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10547 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10548 if test -z "$ac_err"; then
10549   rm -rf conftest*
10550   eval "ac_cv_header_$ac_safe=yes"
10551 else
10552   echo "$ac_err" >&5
10553   echo "configure: failed program was:" >&5
10554   cat conftest.$ac_ext >&5
10555   rm -rf conftest*
10556   eval "ac_cv_header_$ac_safe=no"
10557 fi
10558 rm -f conftest*
10559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10560   echo "$ac_t""yes" 1>&6
10561   canna_includes_found=yes
10562 else
10563   echo "$ac_t""no" 1>&6
10564 fi
10565
10566   fi
10567   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10568       -d "/usr/local/canna/include"; then
10569     save_c_switch_site="$c_switch_site"
10570     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10571     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10572 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10573 echo "configure:10574: checking for canna/jrkanji.h" >&5
10574
10575 cat > conftest.$ac_ext <<EOF
10576 #line 10577 "configure"
10577 #include "confdefs.h"
10578 #include <canna/jrkanji.h>
10579 EOF
10580 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10581 { (eval echo configure:10582: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10582 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10583 if test -z "$ac_err"; then
10584   rm -rf conftest*
10585   eval "ac_cv_header_$ac_safe=yes"
10586 else
10587   echo "$ac_err" >&5
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_header_$ac_safe=no"
10592 fi
10593 rm -f conftest*
10594 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10595   echo "$ac_t""yes" 1>&6
10596   canna_includes_found=yes
10597 else
10598   echo "$ac_t""no" 1>&6
10599 fi
10600
10601     if test "$canna_includes_found" != "yes"; then
10602       c_switch_site="$save_c_switch_site"
10603       with_canna="no"
10604     fi
10605   fi
10606
10607   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10608 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10609 echo "configure:10610: checking for canna/RK.h" >&5
10610
10611 cat > conftest.$ac_ext <<EOF
10612 #line 10613 "configure"
10613 #include "confdefs.h"
10614 #include <canna/RK.h>
10615 EOF
10616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10617 { (eval echo configure:10618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10619 if test -z "$ac_err"; then
10620   rm -rf conftest*
10621   eval "ac_cv_header_$ac_safe=yes"
10622 else
10623   echo "$ac_err" >&5
10624   echo "configure: failed program was:" >&5
10625   cat conftest.$ac_ext >&5
10626   rm -rf conftest*
10627   eval "ac_cv_header_$ac_safe=no"
10628 fi
10629 rm -f conftest*
10630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10631   echo "$ac_t""yes" 1>&6
10632   :
10633 else
10634   echo "$ac_t""no" 1>&6
10635 with_canna=no
10636 fi
10637  }
10638   test -z "$with_canna" && { 
10639 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10640 echo "configure:10641: checking for RkBgnBun in -lRKC" >&5
10641 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10642
10643 xe_check_libs=" -lRKC "
10644 cat > conftest.$ac_ext <<EOF
10645 #line 10646 "configure"
10646 #include "confdefs.h"
10647 /* Override any gcc2 internal prototype to avoid an error.  */
10648 /* We use char because int might match the return type of a gcc2
10649     builtin and then its argument prototype would still apply.  */
10650 char RkBgnBun();
10651
10652 int main() {
10653 RkBgnBun()
10654 ; return 0; }
10655 EOF
10656 if { (eval echo configure:10657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10657   rm -rf conftest*
10658   eval "ac_cv_lib_$ac_lib_var=yes"
10659 else
10660   echo "configure: failed program was:" >&5
10661   cat conftest.$ac_ext >&5
10662   rm -rf conftest*
10663   eval "ac_cv_lib_$ac_lib_var=no"
10664 fi
10665 rm -f conftest*
10666 xe_check_libs=""
10667
10668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10669   echo "$ac_t""yes" 1>&6
10670   :
10671 else
10672   echo "$ac_t""no" 1>&6
10673 with_canna=no
10674 fi
10675
10676  }
10677   test -z "$with_canna" && { 
10678 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10679 echo "configure:10680: checking for jrKanjiControl in -lcanna" >&5
10680 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10681
10682 xe_check_libs=" -lcanna "
10683 cat > conftest.$ac_ext <<EOF
10684 #line 10685 "configure"
10685 #include "confdefs.h"
10686 /* Override any gcc2 internal prototype to avoid an error.  */
10687 /* We use char because int might match the return type of a gcc2
10688     builtin and then its argument prototype would still apply.  */
10689 char jrKanjiControl();
10690
10691 int main() {
10692 jrKanjiControl()
10693 ; return 0; }
10694 EOF
10695 if { (eval echo configure:10696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10696   rm -rf conftest*
10697   eval "ac_cv_lib_$ac_lib_var=yes"
10698 else
10699   echo "configure: failed program was:" >&5
10700   cat conftest.$ac_ext >&5
10701   rm -rf conftest*
10702   eval "ac_cv_lib_$ac_lib_var=no"
10703 fi
10704 rm -f conftest*
10705 xe_check_libs=""
10706
10707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10708   echo "$ac_t""yes" 1>&6
10709   :
10710 else
10711   echo "$ac_t""no" 1>&6
10712 with_canna=no
10713 fi
10714
10715  }
10716   test -z "$with_canna" && with_canna=yes
10717   if test "$with_canna" = "yes"; then
10718     { test "$extra_verbose" = "yes" && cat << \EOF
10719     Defining HAVE_CANNA
10720 EOF
10721 cat >> confdefs.h <<\EOF
10722 #define HAVE_CANNA 1
10723 EOF
10724 }
10725
10726     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10727     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10728    echo "    xemacs will be linked with \"mule-canna.o\""
10729  fi
10730   fi
10731
10732 else   for feature in xim canna wnn; do
10733     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10734       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10735     fi
10736     eval "with_${feature}=no"
10737   done
10738 fi 
10739
10740 if test "$need_motif" = "yes" ; then
10741   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10742     
10743 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10744 echo "configure:10745: checking for layout_object_getvalue in -li18n" >&5
10745 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10746
10747 xe_check_libs=" -li18n "
10748 cat > conftest.$ac_ext <<EOF
10749 #line 10750 "configure"
10750 #include "confdefs.h"
10751 /* Override any gcc2 internal prototype to avoid an error.  */
10752 /* We use char because int might match the return type of a gcc2
10753     builtin and then its argument prototype would still apply.  */
10754 char layout_object_getvalue();
10755
10756 int main() {
10757 layout_object_getvalue()
10758 ; return 0; }
10759 EOF
10760 if { (eval echo configure:10761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10761   rm -rf conftest*
10762   eval "ac_cv_lib_$ac_lib_var=yes"
10763 else
10764   echo "configure: failed program was:" >&5
10765   cat conftest.$ac_ext >&5
10766   rm -rf conftest*
10767   eval "ac_cv_lib_$ac_lib_var=no"
10768 fi
10769 rm -f conftest*
10770 xe_check_libs=""
10771
10772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10773   echo "$ac_t""yes" 1>&6
10774   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10775 else
10776   echo "$ac_t""no" 1>&6
10777 fi
10778
10779
10780   
10781 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10782     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10783   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10784   
10785         runpath="" runpath_dirs=""
10786   if test -n "$LD_RUN_PATH"; then
10787     runpath="$LD_RUN_PATH"
10788   elif test "$GCC" = "yes"; then
10789         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10790     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10791     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10792     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10793       case "$arg" in P,* | -L* | -R* )
10794         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10795           {
10796 xe_runpath_dir="$dir"
10797   test "$xe_runpath_dir" != "/lib"     -a \
10798         "$xe_runpath_dir" != "/usr/lib" -a \
10799         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10800   eval "$xe_add_unique_runpath_dir"
10801 }
10802         done ;;
10803       esac
10804     done
10805     ld_switch_run="$ld_switch_run_save"
10806     rm -f conftest*
10807   else
10808         for arg in $ld_switch_site $ld_switch_x_site; do
10809       case "$arg" in -L*) {
10810 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10811   test "$xe_runpath_dir" != "/lib"     -a \
10812         "$xe_runpath_dir" != "/usr/lib" -a \
10813         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10814   eval "$xe_add_unique_runpath_dir"
10815 };; esac
10816     done
10817         if test "$opsys $need_motif" = "sol2 yes"; then
10818       xe_runpath_dir="/opt/SUNWdt/lib";
10819       eval "$xe_add_unique_runpath_dir";
10820     fi
10821   fi 
10822   if test -n "$runpath"; then
10823     ld_switch_run="${dash_r}${runpath}"
10824     
10825 if test "$GCC" = "yes"; then
10826   set x $ld_switch_run; shift; ld_switch_run=""
10827   while test -n "$1"; do
10828     case $1 in
10829       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10830       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10831       -Xlinker* ) ;;
10832       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10833     esac
10834     shift
10835   done
10836 fi
10837     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10838   fi
10839 fi
10840
10841 fi
10842
10843 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
10844 do
10845 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10846 echo "configure:10847: checking for $ac_func" >&5
10847
10848 cat > conftest.$ac_ext <<EOF
10849 #line 10850 "configure"
10850 #include "confdefs.h"
10851 /* System header to define __stub macros and hopefully few prototypes,
10852     which can conflict with char $ac_func(); below.  */
10853 #include <assert.h>
10854 /* Override any gcc2 internal prototype to avoid an error.  */
10855 /* We use char because int might match the return type of a gcc2
10856     builtin and then its argument prototype would still apply.  */
10857 char $ac_func();
10858
10859 int main() {
10860
10861 /* The GNU C library defines this for functions which it implements
10862     to always fail with ENOSYS.  Some functions are actually named
10863     something starting with __ and the normal name is an alias.  */
10864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10865 choke me
10866 #else
10867 $ac_func();
10868 #endif
10869
10870 ; return 0; }
10871 EOF
10872 if { (eval echo configure:10873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10873   rm -rf conftest*
10874   eval "ac_cv_func_$ac_func=yes"
10875 else
10876   echo "configure: failed program was:" >&5
10877   cat conftest.$ac_ext >&5
10878   rm -rf conftest*
10879   eval "ac_cv_func_$ac_func=no"
10880 fi
10881 rm -f conftest*
10882
10883 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10884   echo "$ac_t""yes" 1>&6
10885     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10886   { test "$extra_verbose" = "yes" && cat << EOF
10887     Defining $ac_tr_func
10888 EOF
10889 cat >> confdefs.h <<EOF
10890 #define $ac_tr_func 1
10891 EOF
10892 }
10893  
10894 else
10895   echo "$ac_t""no" 1>&6
10896 fi
10897 done
10898
10899
10900
10901 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10902 do
10903 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10904 echo "configure:10905: checking for $ac_func" >&5
10905
10906 cat > conftest.$ac_ext <<EOF
10907 #line 10908 "configure"
10908 #include "confdefs.h"
10909 /* System header to define __stub macros and hopefully few prototypes,
10910     which can conflict with char $ac_func(); below.  */
10911 #include <assert.h>
10912 /* Override any gcc2 internal prototype to avoid an error.  */
10913 /* We use char because int might match the return type of a gcc2
10914     builtin and then its argument prototype would still apply.  */
10915 char $ac_func();
10916
10917 int main() {
10918
10919 /* The GNU C library defines this for functions which it implements
10920     to always fail with ENOSYS.  Some functions are actually named
10921     something starting with __ and the normal name is an alias.  */
10922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10923 choke me
10924 #else
10925 $ac_func();
10926 #endif
10927
10928 ; return 0; }
10929 EOF
10930 if { (eval echo configure:10931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10931   rm -rf conftest*
10932   eval "ac_cv_func_$ac_func=yes"
10933 else
10934   echo "configure: failed program was:" >&5
10935   cat conftest.$ac_ext >&5
10936   rm -rf conftest*
10937   eval "ac_cv_func_$ac_func=no"
10938 fi
10939 rm -f conftest*
10940
10941 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10942   echo "$ac_t""yes" 1>&6
10943     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10944   { test "$extra_verbose" = "yes" && cat << EOF
10945     Defining $ac_tr_func
10946 EOF
10947 cat >> confdefs.h <<EOF
10948 #define $ac_tr_func 1
10949 EOF
10950 }
10951  
10952 else
10953   echo "$ac_t""no" 1>&6
10954 fi
10955 done
10956
10957
10958 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10959 echo "configure:10960: checking for openpty" >&5
10960
10961 cat > conftest.$ac_ext <<EOF
10962 #line 10963 "configure"
10963 #include "confdefs.h"
10964 /* System header to define __stub macros and hopefully few prototypes,
10965     which can conflict with char openpty(); below.  */
10966 #include <assert.h>
10967 /* Override any gcc2 internal prototype to avoid an error.  */
10968 /* We use char because int might match the return type of a gcc2
10969     builtin and then its argument prototype would still apply.  */
10970 char openpty();
10971
10972 int main() {
10973
10974 /* The GNU C library defines this for functions which it implements
10975     to always fail with ENOSYS.  Some functions are actually named
10976     something starting with __ and the normal name is an alias.  */
10977 #if defined (__stub_openpty) || defined (__stub___openpty)
10978 choke me
10979 #else
10980 openpty();
10981 #endif
10982
10983 ; return 0; }
10984 EOF
10985 if { (eval echo configure:10986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10986   rm -rf conftest*
10987   eval "ac_cv_func_openpty=yes"
10988 else
10989   echo "configure: failed program was:" >&5
10990   cat conftest.$ac_ext >&5
10991   rm -rf conftest*
10992   eval "ac_cv_func_openpty=no"
10993 fi
10994 rm -f conftest*
10995
10996 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10997   echo "$ac_t""yes" 1>&6
10998   have_openpty=yes
10999 else
11000   echo "$ac_t""no" 1>&6
11001
11002   
11003 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
11004 echo "configure:11005: checking for openpty in -lutil" >&5
11005 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
11006
11007 xe_check_libs=" -lutil "
11008 cat > conftest.$ac_ext <<EOF
11009 #line 11010 "configure"
11010 #include "confdefs.h"
11011 /* Override any gcc2 internal prototype to avoid an error.  */
11012 /* We use char because int might match the return type of a gcc2
11013     builtin and then its argument prototype would still apply.  */
11014 char openpty();
11015
11016 int main() {
11017 openpty()
11018 ; return 0; }
11019 EOF
11020 if { (eval echo configure:11021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11021   rm -rf conftest*
11022   eval "ac_cv_lib_$ac_lib_var=yes"
11023 else
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_lib_$ac_lib_var=no"
11028 fi
11029 rm -f conftest*
11030 xe_check_libs=""
11031
11032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11033   echo "$ac_t""yes" 1>&6
11034   have_openpty=yes need_libutil=yes
11035 else
11036   echo "$ac_t""no" 1>&6
11037 fi
11038
11039
11040 fi
11041
11042 if test "$have_openpty" = "yes"; then
11043   { test "$extra_verbose" = "yes" && cat << \EOF
11044     Defining HAVE_OPENPTY
11045 EOF
11046 cat >> confdefs.h <<\EOF
11047 #define HAVE_OPENPTY 1
11048 EOF
11049 }
11050
11051   for ac_hdr in pty.h libutil.h util.h
11052 do
11053 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11054 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11055 echo "configure:11056: checking for $ac_hdr" >&5
11056
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 #include <$ac_hdr>
11061 EOF
11062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11063 { (eval echo configure:11064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11065 if test -z "$ac_err"; then
11066   rm -rf conftest*
11067   eval "ac_cv_header_$ac_safe=yes"
11068 else
11069   echo "$ac_err" >&5
11070   echo "configure: failed program was:" >&5
11071   cat conftest.$ac_ext >&5
11072   rm -rf conftest*
11073   eval "ac_cv_header_$ac_safe=no"
11074 fi
11075 rm -f conftest*
11076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11077   echo "$ac_t""yes" 1>&6
11078     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11079   { test "$extra_verbose" = "yes" && cat << EOF
11080     Defining $ac_tr_hdr
11081 EOF
11082 cat >> confdefs.h <<EOF
11083 #define $ac_tr_hdr 1
11084 EOF
11085 }
11086  break
11087 else
11088   echo "$ac_t""no" 1>&6
11089 fi
11090 done
11091
11092   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11093 fi
11094
11095 for ac_hdr in stropts.h
11096 do
11097 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11098 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11099 echo "configure:11100: checking for $ac_hdr" >&5
11100
11101 cat > conftest.$ac_ext <<EOF
11102 #line 11103 "configure"
11103 #include "confdefs.h"
11104 #include <$ac_hdr>
11105 EOF
11106 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11107 { (eval echo configure:11108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11108 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11109 if test -z "$ac_err"; then
11110   rm -rf conftest*
11111   eval "ac_cv_header_$ac_safe=yes"
11112 else
11113   echo "$ac_err" >&5
11114   echo "configure: failed program was:" >&5
11115   cat conftest.$ac_ext >&5
11116   rm -rf conftest*
11117   eval "ac_cv_header_$ac_safe=no"
11118 fi
11119 rm -f conftest*
11120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11121   echo "$ac_t""yes" 1>&6
11122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11123   { test "$extra_verbose" = "yes" && cat << EOF
11124     Defining $ac_tr_hdr
11125 EOF
11126 cat >> confdefs.h <<EOF
11127 #define $ac_tr_hdr 1
11128 EOF
11129 }
11130  
11131 else
11132   echo "$ac_t""no" 1>&6
11133 fi
11134 done
11135
11136 if test "$ac_cv_header_stropts_h" = "yes"; then
11137   for ac_func in isastream
11138 do
11139 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11140 echo "configure:11141: checking for $ac_func" >&5
11141
11142 cat > conftest.$ac_ext <<EOF
11143 #line 11144 "configure"
11144 #include "confdefs.h"
11145 /* System header to define __stub macros and hopefully few prototypes,
11146     which can conflict with char $ac_func(); below.  */
11147 #include <assert.h>
11148 /* Override any gcc2 internal prototype to avoid an error.  */
11149 /* We use char because int might match the return type of a gcc2
11150     builtin and then its argument prototype would still apply.  */
11151 char $ac_func();
11152
11153 int main() {
11154
11155 /* The GNU C library defines this for functions which it implements
11156     to always fail with ENOSYS.  Some functions are actually named
11157     something starting with __ and the normal name is an alias.  */
11158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11159 choke me
11160 #else
11161 $ac_func();
11162 #endif
11163
11164 ; return 0; }
11165 EOF
11166 if { (eval echo configure:11167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11167   rm -rf conftest*
11168   eval "ac_cv_func_$ac_func=yes"
11169 else
11170   echo "configure: failed program was:" >&5
11171   cat conftest.$ac_ext >&5
11172   rm -rf conftest*
11173   eval "ac_cv_func_$ac_func=no"
11174 fi
11175 rm -f conftest*
11176
11177 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11178   echo "$ac_t""yes" 1>&6
11179     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11180   { test "$extra_verbose" = "yes" && cat << EOF
11181     Defining $ac_tr_func
11182 EOF
11183 cat >> confdefs.h <<EOF
11184 #define $ac_tr_func 1
11185 EOF
11186 }
11187  
11188 else
11189   echo "$ac_t""no" 1>&6
11190 fi
11191 done
11192
11193   for ac_hdr in strtio.h
11194 do
11195 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11196 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11197 echo "configure:11198: checking for $ac_hdr" >&5
11198
11199 cat > conftest.$ac_ext <<EOF
11200 #line 11201 "configure"
11201 #include "confdefs.h"
11202 #include <$ac_hdr>
11203 EOF
11204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11205 { (eval echo configure:11206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11207 if test -z "$ac_err"; then
11208   rm -rf conftest*
11209   eval "ac_cv_header_$ac_safe=yes"
11210 else
11211   echo "$ac_err" >&5
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   eval "ac_cv_header_$ac_safe=no"
11216 fi
11217 rm -f conftest*
11218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11219   echo "$ac_t""yes" 1>&6
11220     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11221   { test "$extra_verbose" = "yes" && cat << EOF
11222     Defining $ac_tr_hdr
11223 EOF
11224 cat >> confdefs.h <<EOF
11225 #define $ac_tr_hdr 1
11226 EOF
11227 }
11228  
11229 else
11230   echo "$ac_t""no" 1>&6
11231 fi
11232 done
11233  fi
11234
11235 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11236    echo "    xemacs will be linked with \"realpath.o\""
11237  fi
11238
11239 for ac_func in getloadavg
11240 do
11241 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11242 echo "configure:11243: checking for $ac_func" >&5
11243
11244 cat > conftest.$ac_ext <<EOF
11245 #line 11246 "configure"
11246 #include "confdefs.h"
11247 /* System header to define __stub macros and hopefully few prototypes,
11248     which can conflict with char $ac_func(); below.  */
11249 #include <assert.h>
11250 /* Override any gcc2 internal prototype to avoid an error.  */
11251 /* We use char because int might match the return type of a gcc2
11252     builtin and then its argument prototype would still apply.  */
11253 char $ac_func();
11254
11255 int main() {
11256
11257 /* The GNU C library defines this for functions which it implements
11258     to always fail with ENOSYS.  Some functions are actually named
11259     something starting with __ and the normal name is an alias.  */
11260 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11261 choke me
11262 #else
11263 $ac_func();
11264 #endif
11265
11266 ; return 0; }
11267 EOF
11268 if { (eval echo configure:11269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11269   rm -rf conftest*
11270   eval "ac_cv_func_$ac_func=yes"
11271 else
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_func_$ac_func=no"
11276 fi
11277 rm -f conftest*
11278
11279 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11280   echo "$ac_t""yes" 1>&6
11281     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11282   { test "$extra_verbose" = "yes" && cat << EOF
11283     Defining $ac_tr_func
11284 EOF
11285 cat >> confdefs.h <<EOF
11286 #define $ac_tr_func 1
11287 EOF
11288 }
11289  
11290 else
11291   echo "$ac_t""no" 1>&6
11292 fi
11293 done
11294
11295
11296 if test "$ac_cv_func_getloadavg" = "yes"; then
11297         for ac_hdr in sys/loadavg.h
11298 do
11299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11301 echo "configure:11302: checking for $ac_hdr" >&5
11302
11303 cat > conftest.$ac_ext <<EOF
11304 #line 11305 "configure"
11305 #include "confdefs.h"
11306 #include <$ac_hdr>
11307 EOF
11308 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11309 { (eval echo configure:11310: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11310 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11311 if test -z "$ac_err"; then
11312   rm -rf conftest*
11313   eval "ac_cv_header_$ac_safe=yes"
11314 else
11315   echo "$ac_err" >&5
11316   echo "configure: failed program was:" >&5
11317   cat conftest.$ac_ext >&5
11318   rm -rf conftest*
11319   eval "ac_cv_header_$ac_safe=no"
11320 fi
11321 rm -f conftest*
11322 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11323   echo "$ac_t""yes" 1>&6
11324     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11325   { test "$extra_verbose" = "yes" && cat << EOF
11326     Defining $ac_tr_hdr
11327 EOF
11328 cat >> confdefs.h <<EOF
11329 #define $ac_tr_hdr 1
11330 EOF
11331 }
11332  
11333 else
11334   echo "$ac_t""no" 1>&6
11335 fi
11336 done
11337
11338 else
11339     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11340    echo "    xemacs will be linked with \"getloadavg.o\""
11341  fi
11342
11343     
11344 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11345 echo "configure:11346: checking for kstat_open in -lkstat" >&5
11346 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11347
11348 xe_check_libs=" -lkstat "
11349 cat > conftest.$ac_ext <<EOF
11350 #line 11351 "configure"
11351 #include "confdefs.h"
11352 /* Override any gcc2 internal prototype to avoid an error.  */
11353 /* We use char because int might match the return type of a gcc2
11354     builtin and then its argument prototype would still apply.  */
11355 char kstat_open();
11356
11357 int main() {
11358 kstat_open()
11359 ; return 0; }
11360 EOF
11361 if { (eval echo configure:11362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11362   rm -rf conftest*
11363   eval "ac_cv_lib_$ac_lib_var=yes"
11364 else
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   eval "ac_cv_lib_$ac_lib_var=no"
11369 fi
11370 rm -f conftest*
11371 xe_check_libs=""
11372
11373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11374   echo "$ac_t""yes" 1>&6
11375     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11376     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11377   { test "$extra_verbose" = "yes" && cat << EOF
11378     Defining $ac_tr_lib
11379 EOF
11380 cat >> confdefs.h <<EOF
11381 #define $ac_tr_lib 1
11382 EOF
11383 }
11384
11385   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11386
11387 else
11388   echo "$ac_t""no" 1>&6
11389 fi
11390
11391
11392   for ac_hdr in kstat.h
11393 do
11394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11396 echo "configure:11397: checking for $ac_hdr" >&5
11397
11398 cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <$ac_hdr>
11402 EOF
11403 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11404 { (eval echo configure:11405: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11405 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11406 if test -z "$ac_err"; then
11407   rm -rf conftest*
11408   eval "ac_cv_header_$ac_safe=yes"
11409 else
11410   echo "$ac_err" >&5
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   eval "ac_cv_header_$ac_safe=no"
11415 fi
11416 rm -f conftest*
11417 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11418   echo "$ac_t""yes" 1>&6
11419     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11420   { test "$extra_verbose" = "yes" && cat << EOF
11421     Defining $ac_tr_hdr
11422 EOF
11423 cat >> confdefs.h <<EOF
11424 #define $ac_tr_hdr 1
11425 EOF
11426 }
11427  
11428 else
11429   echo "$ac_t""no" 1>&6
11430 fi
11431 done
11432
11433
11434     
11435 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11436 echo "configure:11437: checking for kvm_read in -lkvm" >&5
11437 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11438
11439 xe_check_libs=" -lkvm "
11440 cat > conftest.$ac_ext <<EOF
11441 #line 11442 "configure"
11442 #include "confdefs.h"
11443 /* Override any gcc2 internal prototype to avoid an error.  */
11444 /* We use char because int might match the return type of a gcc2
11445     builtin and then its argument prototype would still apply.  */
11446 char kvm_read();
11447
11448 int main() {
11449 kvm_read()
11450 ; return 0; }
11451 EOF
11452 if { (eval echo configure:11453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11453   rm -rf conftest*
11454   eval "ac_cv_lib_$ac_lib_var=yes"
11455 else
11456   echo "configure: failed program was:" >&5
11457   cat conftest.$ac_ext >&5
11458   rm -rf conftest*
11459   eval "ac_cv_lib_$ac_lib_var=no"
11460 fi
11461 rm -f conftest*
11462 xe_check_libs=""
11463
11464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11465   echo "$ac_t""yes" 1>&6
11466     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11467     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11468   { test "$extra_verbose" = "yes" && cat << EOF
11469     Defining $ac_tr_lib
11470 EOF
11471 cat >> confdefs.h <<EOF
11472 #define $ac_tr_lib 1
11473 EOF
11474 }
11475
11476   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11477
11478 else
11479   echo "$ac_t""no" 1>&6
11480 fi
11481
11482
11483 fi
11484
11485 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11486 echo "configure:11487: checking whether netdb declares h_errno" >&5
11487 cat > conftest.$ac_ext <<EOF
11488 #line 11489 "configure"
11489 #include "confdefs.h"
11490 #include <netdb.h>
11491 int main() {
11492 return h_errno;
11493 ; return 0; }
11494 EOF
11495 if { (eval echo configure:11496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11496   rm -rf conftest*
11497   echo "$ac_t""yes" 1>&6
11498    { test "$extra_verbose" = "yes" && cat << \EOF
11499     Defining HAVE_H_ERRNO
11500 EOF
11501 cat >> confdefs.h <<\EOF
11502 #define HAVE_H_ERRNO 1
11503 EOF
11504 }
11505
11506 else
11507   echo "configure: failed program was:" >&5
11508   cat conftest.$ac_ext >&5
11509   rm -rf conftest*
11510   echo "$ac_t""no" 1>&6
11511 fi
11512 rm -f conftest*
11513
11514 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11515 echo "configure:11516: checking for sigsetjmp" >&5
11516 cat > conftest.$ac_ext <<EOF
11517 #line 11518 "configure"
11518 #include "confdefs.h"
11519 #include <setjmp.h>
11520 int main() {
11521 sigjmp_buf bar; sigsetjmp (bar, 0);
11522 ; return 0; }
11523 EOF
11524 if { (eval echo configure:11525: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11525   rm -rf conftest*
11526   echo "$ac_t""yes" 1>&6
11527    { test "$extra_verbose" = "yes" && cat << \EOF
11528     Defining HAVE_SIGSETJMP
11529 EOF
11530 cat >> confdefs.h <<\EOF
11531 #define HAVE_SIGSETJMP 1
11532 EOF
11533 }
11534
11535 else
11536   echo "configure: failed program was:" >&5
11537   cat conftest.$ac_ext >&5
11538   rm -rf conftest*
11539   echo "$ac_t""no" 1>&6
11540 fi
11541 rm -f conftest*
11542
11543 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11544 echo "configure:11545: checking whether localtime caches TZ" >&5
11545
11546 if test "$ac_cv_func_tzset" = "yes"; then
11547 cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 #include <time.h>
11551 #if STDC_HEADERS
11552 # include <stdlib.h>
11553 #endif
11554 extern char **environ;
11555 unset_TZ ()
11556 {
11557   char **from, **to;
11558   for (to = from = environ; (*to = *from); from++)
11559     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11560       to++;
11561 }
11562 char TZ_GMT0[] = "TZ=GMT0";
11563 char TZ_PST8[] = "TZ=PST8";
11564 main()
11565 {
11566   time_t now = time ((time_t *) 0);
11567   int hour_GMT0, hour_unset;
11568   if (putenv (TZ_GMT0) != 0)
11569     exit (1);
11570   hour_GMT0 = localtime (&now)->tm_hour;
11571   unset_TZ ();
11572   hour_unset = localtime (&now)->tm_hour;
11573   if (putenv (TZ_PST8) != 0)
11574     exit (1);
11575   if (localtime (&now)->tm_hour == hour_GMT0)
11576     exit (1);
11577   unset_TZ ();
11578   if (localtime (&now)->tm_hour != hour_unset)
11579     exit (1);
11580   exit (0);
11581 }
11582 EOF
11583 if { (eval echo configure:11584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11584 then
11585   emacs_cv_localtime_cache=no
11586 else
11587   conftest_rc="$?"
11588   echo "configure: failed program was:" >&5
11589   cat conftest.$ac_ext >&5
11590   rm -fr conftest*
11591   emacs_cv_localtime_cache=yes
11592 fi
11593 rm -fr conftest*
11594 else
11595         # If we lack tzset, report that localtime does not cache TZ,
11596         # since we can't invalidate the cache if we don't have tzset.
11597         emacs_cv_localtime_cache=no
11598 fi
11599 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11600 if test $emacs_cv_localtime_cache = yes; then
11601   { test "$extra_verbose" = "yes" && cat << \EOF
11602     Defining LOCALTIME_CACHE
11603 EOF
11604 cat >> confdefs.h <<\EOF
11605 #define LOCALTIME_CACHE 1
11606 EOF
11607 }
11608
11609 fi
11610
11611 if test "$HAVE_TIMEVAL" = "yes"; then
11612 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11613 echo "configure:11614: checking whether gettimeofday accepts one or two arguments" >&5
11614 cat > conftest.$ac_ext <<EOF
11615 #line 11616 "configure"
11616 #include "confdefs.h"
11617
11618 #ifdef TIME_WITH_SYS_TIME
11619 #include <sys/time.h>
11620 #include <time.h>
11621 #else
11622 #ifdef HAVE_SYS_TIME_H
11623 #include <sys/time.h>
11624 #else
11625 #include <time.h>
11626 #endif
11627 #endif
11628   
11629 int main() {
11630
11631   struct timeval time;
11632   gettimeofday (&time, 0);
11633
11634 ; return 0; }
11635 EOF
11636 if { (eval echo configure:11637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11637   rm -rf conftest*
11638   echo "$ac_t""two" 1>&6
11639 else
11640   echo "configure: failed program was:" >&5
11641   cat conftest.$ac_ext >&5
11642   rm -rf conftest*
11643   echo "$ac_t""one" 1>&6
11644    { test "$extra_verbose" = "yes" && cat << \EOF
11645     Defining GETTIMEOFDAY_ONE_ARGUMENT
11646 EOF
11647 cat >> confdefs.h <<\EOF
11648 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11649 EOF
11650 }
11651
11652 fi
11653 rm -f conftest*
11654 fi
11655
11656
11657 echo $ac_n "checking for inline""... $ac_c" 1>&6
11658 echo "configure:11659: checking for inline" >&5
11659
11660 ac_cv_c_inline=no
11661 for ac_kw in inline __inline__ __inline; do
11662   cat > conftest.$ac_ext <<EOF
11663 #line 11664 "configure"
11664 #include "confdefs.h"
11665
11666 int main() {
11667 } $ac_kw foo() {
11668 ; return 0; }
11669 EOF
11670 if { (eval echo configure:11671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11671   rm -rf conftest*
11672   ac_cv_c_inline=$ac_kw; break
11673 else
11674   echo "configure: failed program was:" >&5
11675   cat conftest.$ac_ext >&5
11676 fi
11677 rm -f conftest*
11678 done
11679
11680
11681 echo "$ac_t""$ac_cv_c_inline" 1>&6
11682 case "$ac_cv_c_inline" in
11683   inline | yes) ;;
11684   no) { test "$extra_verbose" = "yes" && cat << \EOF
11685     Defining inline = 
11686 EOF
11687 cat >> confdefs.h <<\EOF
11688 #define inline 
11689 EOF
11690 }
11691  ;;
11692   *)  { test "$extra_verbose" = "yes" && cat << EOF
11693     Defining inline = $ac_cv_c_inline
11694 EOF
11695 cat >> confdefs.h <<EOF
11696 #define inline $ac_cv_c_inline
11697 EOF
11698 }
11699  ;;
11700 esac
11701
11702 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11703    echo "    xemacs will be linked with \"inline.o\""
11704  fi
11705
11706
11707 if test "$__DECC" != "yes"; then
11708   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11709 # for constant arguments.  Useless!
11710 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11711 echo "configure:11712: checking for working alloca.h" >&5
11712
11713 cat > conftest.$ac_ext <<EOF
11714 #line 11715 "configure"
11715 #include "confdefs.h"
11716 #include <alloca.h>
11717 int main() {
11718 char *p = alloca(2 * sizeof(int));
11719 ; return 0; }
11720 EOF
11721 if { (eval echo configure:11722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11722   rm -rf conftest*
11723   ac_cv_header_alloca_h=yes
11724 else
11725   echo "configure: failed program was:" >&5
11726   cat conftest.$ac_ext >&5
11727   rm -rf conftest*
11728   ac_cv_header_alloca_h=no
11729 fi
11730 rm -f conftest*
11731
11732 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11733 if test $ac_cv_header_alloca_h = yes; then
11734   { test "$extra_verbose" = "yes" && cat << \EOF
11735     Defining HAVE_ALLOCA_H
11736 EOF
11737 cat >> confdefs.h <<\EOF
11738 #define HAVE_ALLOCA_H 1
11739 EOF
11740 }
11741
11742 fi
11743
11744 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11745 echo "configure:11746: checking for alloca" >&5
11746
11747 cat > conftest.$ac_ext <<EOF
11748 #line 11749 "configure"
11749 #include "confdefs.h"
11750
11751 #ifdef __GNUC__
11752 # define alloca __builtin_alloca
11753 #else
11754 # ifdef _MSC_VER
11755 #  include <malloc.h>
11756 #  define alloca _alloca
11757 # else
11758 #  if HAVE_ALLOCA_H
11759 #   include <alloca.h>
11760 #  else
11761 #   ifdef _AIX
11762  #pragma alloca
11763 #   else
11764 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11765 char *alloca ();
11766 #    endif
11767 #   endif
11768 #  endif
11769 # endif
11770 #endif
11771
11772 int main() {
11773 char *p = (char *) alloca(1);
11774 ; return 0; }
11775 EOF
11776 if { (eval echo configure:11777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11777   rm -rf conftest*
11778   ac_cv_func_alloca_works=yes
11779 else
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -rf conftest*
11783   ac_cv_func_alloca_works=no
11784 fi
11785 rm -f conftest*
11786
11787 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11788 if test $ac_cv_func_alloca_works = yes; then
11789   { test "$extra_verbose" = "yes" && cat << \EOF
11790     Defining HAVE_ALLOCA
11791 EOF
11792 cat >> confdefs.h <<\EOF
11793 #define HAVE_ALLOCA 1
11794 EOF
11795 }
11796
11797 fi
11798
11799 if test $ac_cv_func_alloca_works = no; then
11800   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11801   # that cause trouble.  Some versions do not even contain alloca or
11802   # contain a buggy version.  If you still want to use their alloca,
11803   # use ar to extract alloca.o from them instead of compiling alloca.c.
11804   ALLOCA=alloca.${ac_objext}
11805   { test "$extra_verbose" = "yes" && cat << \EOF
11806     Defining C_ALLOCA
11807 EOF
11808 cat >> confdefs.h <<\EOF
11809 #define C_ALLOCA 1
11810 EOF
11811 }
11812
11813
11814 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11815 echo "configure:11816: checking whether alloca needs Cray hooks" >&5
11816
11817 cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 #if defined(CRAY) && ! defined(CRAY2)
11821 webecray
11822 #else
11823 wenotbecray
11824 #endif
11825
11826 EOF
11827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11828   egrep "webecray" >/dev/null 2>&1; then
11829   rm -rf conftest*
11830   ac_cv_os_cray=yes
11831 else
11832   rm -rf conftest*
11833   ac_cv_os_cray=no
11834 fi
11835 rm -f conftest*
11836
11837
11838 echo "$ac_t""$ac_cv_os_cray" 1>&6
11839 if test $ac_cv_os_cray = yes; then
11840 for ac_func in _getb67 GETB67 getb67; do
11841   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11842 echo "configure:11843: checking for $ac_func" >&5
11843
11844 cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847 /* System header to define __stub macros and hopefully few prototypes,
11848     which can conflict with char $ac_func(); below.  */
11849 #include <assert.h>
11850 /* Override any gcc2 internal prototype to avoid an error.  */
11851 /* We use char because int might match the return type of a gcc2
11852     builtin and then its argument prototype would still apply.  */
11853 char $ac_func();
11854
11855 int main() {
11856
11857 /* The GNU C library defines this for functions which it implements
11858     to always fail with ENOSYS.  Some functions are actually named
11859     something starting with __ and the normal name is an alias.  */
11860 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11861 choke me
11862 #else
11863 $ac_func();
11864 #endif
11865
11866 ; return 0; }
11867 EOF
11868 if { (eval echo configure:11869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11869   rm -rf conftest*
11870   eval "ac_cv_func_$ac_func=yes"
11871 else
11872   echo "configure: failed program was:" >&5
11873   cat conftest.$ac_ext >&5
11874   rm -rf conftest*
11875   eval "ac_cv_func_$ac_func=no"
11876 fi
11877 rm -f conftest*
11878
11879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11880   echo "$ac_t""yes" 1>&6
11881   { test "$extra_verbose" = "yes" && cat << EOF
11882     Defining CRAY_STACKSEG_END = $ac_func
11883 EOF
11884 cat >> confdefs.h <<EOF
11885 #define CRAY_STACKSEG_END $ac_func
11886 EOF
11887 }
11888
11889   break
11890 else
11891   echo "$ac_t""no" 1>&6
11892 fi
11893
11894 done
11895 fi
11896
11897 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11898 echo "configure:11899: checking stack direction for C alloca" >&5
11899
11900 cat > conftest.$ac_ext <<EOF
11901 #line 11902 "configure"
11902 #include "confdefs.h"
11903 find_stack_direction ()
11904 {
11905   static char *addr = 0;
11906   auto char dummy;
11907   if (addr == 0)
11908     {
11909       addr = &dummy;
11910       return find_stack_direction ();
11911     }
11912   else
11913     return (&dummy > addr) ? 1 : -1;
11914 }
11915 main ()
11916 {
11917   exit (find_stack_direction() < 0);
11918 }
11919 EOF
11920 if { (eval echo configure:11921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11921 then
11922   ac_cv_c_stack_direction=1
11923 else
11924   conftest_rc="$?"
11925   echo "configure: failed program was:" >&5
11926   cat conftest.$ac_ext >&5
11927   rm -fr conftest*
11928   ac_cv_c_stack_direction=-1
11929 fi
11930 rm -fr conftest*
11931
11932 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11933 { test "$extra_verbose" = "yes" && cat << EOF
11934     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11935 EOF
11936 cat >> confdefs.h <<EOF
11937 #define STACK_DIRECTION $ac_cv_c_stack_direction
11938 EOF
11939 }
11940
11941 fi
11942
11943   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11944    echo "    xemacs will be linked with \"$ALLOCA\""
11945  fi
11946 fi
11947
11948 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11949 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11950 echo "configure:11951: checking for vfork.h" >&5
11951
11952 cat > conftest.$ac_ext <<EOF
11953 #line 11954 "configure"
11954 #include "confdefs.h"
11955 #include <vfork.h>
11956 EOF
11957 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11958 { (eval echo configure:11959: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11959 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11960 if test -z "$ac_err"; then
11961   rm -rf conftest*
11962   eval "ac_cv_header_$ac_safe=yes"
11963 else
11964   echo "$ac_err" >&5
11965   echo "configure: failed program was:" >&5
11966   cat conftest.$ac_ext >&5
11967   rm -rf conftest*
11968   eval "ac_cv_header_$ac_safe=no"
11969 fi
11970 rm -f conftest*
11971 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11972   echo "$ac_t""yes" 1>&6
11973   { test "$extra_verbose" = "yes" && cat << \EOF
11974     Defining HAVE_VFORK_H
11975 EOF
11976 cat >> confdefs.h <<\EOF
11977 #define HAVE_VFORK_H 1
11978 EOF
11979 }
11980
11981 else
11982   echo "$ac_t""no" 1>&6
11983 fi
11984
11985 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11986 echo "configure:11987: checking for working vfork" >&5
11987
11988 cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 /* Thanks to Paul Eggert for this test.  */
11992 #include <stdio.h>
11993 #include <sys/types.h>
11994 #include <sys/stat.h>
11995 #ifdef HAVE_UNISTD_H
11996 #include <unistd.h>
11997 #endif
11998 #ifdef HAVE_VFORK_H
11999 #include <vfork.h>
12000 #endif
12001 /* On some sparc systems, changes by the child to local and incoming
12002    argument registers are propagated back to the parent.
12003    The compiler is told about this with #include <vfork.h>,
12004    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
12005    Test for this by using a static variable whose address
12006    is put into a register that is clobbered by the vfork.  */
12007 static
12008 #ifdef __cplusplus
12009 sparc_address_test (int arg)
12010 #else
12011 sparc_address_test (arg) int arg;
12012 #endif
12013 {
12014   static pid_t child;
12015   if (!child) {
12016     child = vfork ();
12017     if (child < 0) {
12018       perror ("vfork");
12019       _exit(2);
12020     }
12021     if (!child) {
12022       arg = getpid();
12023       write(-1, "", 0);
12024       _exit (arg);
12025     }
12026   }
12027 }
12028 main() {
12029   pid_t parent = getpid ();
12030   pid_t child;
12031
12032   sparc_address_test ();
12033
12034   child = vfork ();
12035
12036   if (child == 0) {
12037     /* Here is another test for sparc vfork register problems.
12038        This test uses lots of local variables, at least
12039        as many local variables as main has allocated so far
12040        including compiler temporaries.  4 locals are enough for
12041        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12042        A buggy compiler should reuse the register of parent
12043        for one of the local variables, since it will think that
12044        parent can't possibly be used any more in this routine.
12045        Assigning to the local variable will thus munge parent
12046        in the parent process.  */
12047     pid_t
12048       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12049       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12050     /* Convince the compiler that p..p7 are live; otherwise, it might
12051        use the same hardware register for all 8 local variables.  */
12052     if (p != p1 || p != p2 || p != p3 || p != p4
12053         || p != p5 || p != p6 || p != p7)
12054       _exit(1);
12055
12056     /* On some systems (e.g. IRIX 3.3),
12057        vfork doesn't separate parent from child file descriptors.
12058        If the child closes a descriptor before it execs or exits,
12059        this munges the parent's descriptor as well.
12060        Test for this by closing stdout in the child.  */
12061     _exit(close(fileno(stdout)) != 0);
12062   } else {
12063     int status;
12064     struct stat st;
12065
12066     while (wait(&status) != child)
12067       ;
12068     exit(
12069          /* Was there some problem with vforking?  */
12070          child < 0
12071
12072          /* Did the child fail?  (This shouldn't happen.)  */
12073          || status
12074
12075          /* Did the vfork/compiler bug occur?  */
12076          || parent != getpid()
12077
12078          /* Did the file descriptor bug occur?  */
12079          || fstat(fileno(stdout), &st) != 0
12080          );
12081   }
12082 }
12083 EOF
12084 if { (eval echo configure:12085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12085 then
12086   ac_cv_func_vfork_works=yes
12087 else
12088   conftest_rc="$?"
12089   echo "configure: failed program was:" >&5
12090   cat conftest.$ac_ext >&5
12091   rm -fr conftest*
12092   ac_cv_func_vfork_works=no
12093 fi
12094 rm -fr conftest*
12095
12096 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12097 if test $ac_cv_func_vfork_works = no; then
12098   { test "$extra_verbose" = "yes" && cat << \EOF
12099     Defining vfork = fork
12100 EOF
12101 cat >> confdefs.h <<\EOF
12102 #define vfork fork
12103 EOF
12104 }
12105
12106 fi
12107
12108
12109 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12110 echo "configure:12111: checking for working strcoll" >&5
12111
12112 cat > conftest.$ac_ext <<EOF
12113 #line 12114 "configure"
12114 #include "confdefs.h"
12115 #include <string.h>
12116 main ()
12117 {
12118   exit (strcoll ("abc", "def") >= 0 ||
12119         strcoll ("ABC", "DEF") >= 0 ||
12120         strcoll ("123", "456") >= 0);
12121 }
12122 EOF
12123 if { (eval echo configure:12124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12124 then
12125   ac_cv_func_strcoll_works=yes
12126 else
12127   conftest_rc="$?"
12128   echo "configure: failed program was:" >&5
12129   cat conftest.$ac_ext >&5
12130   rm -fr conftest*
12131   ac_cv_func_strcoll_works=no
12132 fi
12133 rm -fr conftest*
12134
12135 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12136 if test $ac_cv_func_strcoll_works = yes; then
12137   { test "$extra_verbose" = "yes" && cat << \EOF
12138     Defining HAVE_STRCOLL
12139 EOF
12140 cat >> confdefs.h <<\EOF
12141 #define HAVE_STRCOLL 1
12142 EOF
12143 }
12144
12145 fi
12146
12147
12148 for ac_func in getpgrp
12149 do
12150 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12151 echo "configure:12152: checking for $ac_func" >&5
12152
12153 cat > conftest.$ac_ext <<EOF
12154 #line 12155 "configure"
12155 #include "confdefs.h"
12156 /* System header to define __stub macros and hopefully few prototypes,
12157     which can conflict with char $ac_func(); below.  */
12158 #include <assert.h>
12159 /* Override any gcc2 internal prototype to avoid an error.  */
12160 /* We use char because int might match the return type of a gcc2
12161     builtin and then its argument prototype would still apply.  */
12162 char $ac_func();
12163
12164 int main() {
12165
12166 /* The GNU C library defines this for functions which it implements
12167     to always fail with ENOSYS.  Some functions are actually named
12168     something starting with __ and the normal name is an alias.  */
12169 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12170 choke me
12171 #else
12172 $ac_func();
12173 #endif
12174
12175 ; return 0; }
12176 EOF
12177 if { (eval echo configure:12178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12178   rm -rf conftest*
12179   eval "ac_cv_func_$ac_func=yes"
12180 else
12181   echo "configure: failed program was:" >&5
12182   cat conftest.$ac_ext >&5
12183   rm -rf conftest*
12184   eval "ac_cv_func_$ac_func=no"
12185 fi
12186 rm -f conftest*
12187
12188 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12189   echo "$ac_t""yes" 1>&6
12190     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12191   { test "$extra_verbose" = "yes" && cat << EOF
12192     Defining $ac_tr_func
12193 EOF
12194 cat >> confdefs.h <<EOF
12195 #define $ac_tr_func 1
12196 EOF
12197 }
12198  
12199 else
12200   echo "$ac_t""no" 1>&6
12201 fi
12202 done
12203
12204 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12205 echo "configure:12206: checking whether getpgrp takes no argument" >&5
12206
12207 cat > conftest.$ac_ext <<EOF
12208 #line 12209 "configure"
12209 #include "confdefs.h"
12210
12211 /*
12212  * If this system has a BSD-style getpgrp(),
12213  * which takes a pid argument, exit unsuccessfully.
12214  *
12215  * Snarfed from Chet Ramey's bash pgrp.c test program
12216  */
12217 #include <stdio.h>
12218 #include <sys/types.h>
12219
12220 int     pid;
12221 int     pg1, pg2, pg3, pg4;
12222 int     ng, np, s, child;
12223
12224 main()
12225 {
12226         pid = getpid();
12227         pg1 = getpgrp(0);
12228         pg2 = getpgrp();
12229         pg3 = getpgrp(pid);
12230         pg4 = getpgrp(1);
12231
12232         /*
12233          * If all of these values are the same, it's pretty sure that
12234          * we're on a system that ignores getpgrp's first argument.
12235          */
12236         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12237                 exit(0);
12238
12239         child = fork();
12240         if (child < 0)
12241                 exit(1);
12242         else if (child == 0) {
12243                 np = getpid();
12244                 /*
12245                  * If this is Sys V, this will not work; pgrp will be
12246                  * set to np because setpgrp just changes a pgrp to be
12247                  * the same as the pid.
12248                  */
12249                 setpgrp(np, pg1);
12250                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12251                 if (ng == pg1) {
12252                         exit(1);
12253                 } else {
12254                         exit(0);
12255                 }
12256         } else {
12257                 wait(&s);
12258                 exit(s>>8);
12259         }
12260 }
12261
12262 EOF
12263 if { (eval echo configure:12264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12264 then
12265   ac_cv_func_getpgrp_void=yes
12266 else
12267   conftest_rc="$?"
12268   echo "configure: failed program was:" >&5
12269   cat conftest.$ac_ext >&5
12270   rm -fr conftest*
12271   ac_cv_func_getpgrp_void=no
12272 fi
12273 rm -fr conftest*
12274
12275
12276 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12277 if test $ac_cv_func_getpgrp_void = yes; then
12278   { test "$extra_verbose" = "yes" && cat << \EOF
12279     Defining GETPGRP_VOID
12280 EOF
12281 cat >> confdefs.h <<\EOF
12282 #define GETPGRP_VOID 1
12283 EOF
12284 }
12285
12286 fi
12287
12288
12289 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12290 echo "configure:12291: checking for working mmap" >&5
12291 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12292 cat > conftest.$ac_ext <<EOF
12293 #line 12294 "configure"
12294 #include "confdefs.h"
12295 #include <stdio.h>
12296 #include <unistd.h>
12297 #include <fcntl.h>
12298 #include <sys/mman.h>
12299
12300 #ifndef MAP_VARIABLE
12301 #define MAP_VARIABLE 0
12302 #endif
12303
12304 #ifndef MAP_FAILED
12305 #define MAP_FAILED -1
12306 #endif
12307
12308 int main (int argc, char *argv[])
12309 {
12310   int fd = -1;
12311   caddr_t p;
12312 #ifndef MAP_ANONYMOUS
12313   fd = open ("/dev/zero", O_RDWR);
12314   if (fd < 0)
12315     return 1;
12316 #define MAP_ANONYMOUS 0
12317 #endif
12318   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12319            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12320            fd, 0) != (void *) MAP_FAILED)
12321     return 0;
12322   perror ("conftest: mmap failed");
12323   return 1;
12324 }
12325 EOF
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12327 then
12328   have_mmap=yes
12329 else
12330   conftest_rc="$?"
12331   echo "configure: failed program was:" >&5
12332   cat conftest.$ac_ext >&5
12333   rm -fr conftest*
12334   have_mmap=no
12335 fi
12336 rm -fr conftest* ;;
12337 esac
12338 echo "$ac_t""$have_mmap" 1>&6
12339 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12340     Defining HAVE_MMAP
12341 EOF
12342 cat >> confdefs.h <<\EOF
12343 #define HAVE_MMAP 1
12344 EOF
12345 }
12346
12347
12348 case "$opsys" in cygwin*) 
12349         test "$rel_alloc" = "default" && rel_alloc=no ;;
12350 esac
12351 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12352 if test "$rel_alloc $have_mmap" = "default yes"; then
12353   if test "$doug_lea_malloc" = "yes"; then
12354         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12355 echo "configure:12356: checking for M_MMAP_THRESHOLD" >&5
12356     cat > conftest.$ac_ext <<EOF
12357 #line 12358 "configure"
12358 #include "confdefs.h"
12359 #include <malloc.h>
12360 int main() {
12361
12362 #ifndef M_MMAP_THRESHOLD
12363 #error No M_MMAP_THRESHOLD :-(
12364 !@+$%^&*_)(_ - unlikely to compile...
12365 #endif
12366
12367 ; return 0; }
12368 EOF
12369 if { (eval echo configure:12370: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12370   rm -rf conftest*
12371   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12372 else
12373   echo "configure: failed program was:" >&5
12374   cat conftest.$ac_ext >&5
12375   rm -rf conftest*
12376   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12377 fi
12378 rm -f conftest*
12379   else
12380     rel_alloc=yes
12381   fi
12382 fi
12383 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12384     Defining REL_ALLOC
12385 EOF
12386 cat >> confdefs.h <<\EOF
12387 #define REL_ALLOC 1
12388 EOF
12389 }
12390
12391
12392 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12393 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12394 echo "configure:12395: checking for termios.h" >&5
12395
12396 cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 #include <termios.h>
12400 EOF
12401 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12402 { (eval echo configure:12403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12403 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12404 if test -z "$ac_err"; then
12405   rm -rf conftest*
12406   eval "ac_cv_header_$ac_safe=yes"
12407 else
12408   echo "$ac_err" >&5
12409   echo "configure: failed program was:" >&5
12410   cat conftest.$ac_ext >&5
12411   rm -rf conftest*
12412   eval "ac_cv_header_$ac_safe=no"
12413 fi
12414 rm -f conftest*
12415 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12416   echo "$ac_t""yes" 1>&6
12417   { test "$extra_verbose" = "yes" && cat << \EOF
12418     Defining HAVE_TERMIOS
12419 EOF
12420 cat >> confdefs.h <<\EOF
12421 #define HAVE_TERMIOS 1
12422 EOF
12423 }
12424
12425   { test "$extra_verbose" = "yes" && cat << \EOF
12426     Defining SIGNALS_VIA_CHARACTERS
12427 EOF
12428 cat >> confdefs.h <<\EOF
12429 #define SIGNALS_VIA_CHARACTERS 1
12430 EOF
12431 }
12432
12433   { test "$extra_verbose" = "yes" && cat << \EOF
12434     Defining NO_TERMIO
12435 EOF
12436 cat >> confdefs.h <<\EOF
12437 #define NO_TERMIO 1
12438 EOF
12439 }
12440
12441 else
12442   echo "$ac_t""no" 1>&6
12443 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12444 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12445 echo "configure:12446: checking for termio.h" >&5
12446
12447 cat > conftest.$ac_ext <<EOF
12448 #line 12449 "configure"
12449 #include "confdefs.h"
12450 #include <termio.h>
12451 EOF
12452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12453 { (eval echo configure:12454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12455 if test -z "$ac_err"; then
12456   rm -rf conftest*
12457   eval "ac_cv_header_$ac_safe=yes"
12458 else
12459   echo "$ac_err" >&5
12460   echo "configure: failed program was:" >&5
12461   cat conftest.$ac_ext >&5
12462   rm -rf conftest*
12463   eval "ac_cv_header_$ac_safe=no"
12464 fi
12465 rm -f conftest*
12466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12467   echo "$ac_t""yes" 1>&6
12468   { test "$extra_verbose" = "yes" && cat << \EOF
12469     Defining HAVE_TERMIO
12470 EOF
12471 cat >> confdefs.h <<\EOF
12472 #define HAVE_TERMIO 1
12473 EOF
12474 }
12475
12476 else
12477   echo "$ac_t""no" 1>&6
12478 fi
12479
12480 fi
12481
12482
12483
12484 echo $ac_n "checking for socket""... $ac_c" 1>&6
12485 echo "configure:12486: checking for socket" >&5
12486
12487 cat > conftest.$ac_ext <<EOF
12488 #line 12489 "configure"
12489 #include "confdefs.h"
12490 /* System header to define __stub macros and hopefully few prototypes,
12491     which can conflict with char socket(); below.  */
12492 #include <assert.h>
12493 /* Override any gcc2 internal prototype to avoid an error.  */
12494 /* We use char because int might match the return type of a gcc2
12495     builtin and then its argument prototype would still apply.  */
12496 char socket();
12497
12498 int main() {
12499
12500 /* The GNU C library defines this for functions which it implements
12501     to always fail with ENOSYS.  Some functions are actually named
12502     something starting with __ and the normal name is an alias.  */
12503 #if defined (__stub_socket) || defined (__stub___socket)
12504 choke me
12505 #else
12506 socket();
12507 #endif
12508
12509 ; return 0; }
12510 EOF
12511 if { (eval echo configure:12512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12512   rm -rf conftest*
12513   eval "ac_cv_func_socket=yes"
12514 else
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   eval "ac_cv_func_socket=no"
12519 fi
12520 rm -f conftest*
12521
12522 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12523   echo "$ac_t""yes" 1>&6
12524   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12525 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12526 echo "configure:12527: checking for netinet/in.h" >&5
12527
12528 cat > conftest.$ac_ext <<EOF
12529 #line 12530 "configure"
12530 #include "confdefs.h"
12531 #include <netinet/in.h>
12532 EOF
12533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12534 { (eval echo configure:12535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12536 if test -z "$ac_err"; then
12537   rm -rf conftest*
12538   eval "ac_cv_header_$ac_safe=yes"
12539 else
12540   echo "$ac_err" >&5
12541   echo "configure: failed program was:" >&5
12542   cat conftest.$ac_ext >&5
12543   rm -rf conftest*
12544   eval "ac_cv_header_$ac_safe=no"
12545 fi
12546 rm -f conftest*
12547 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12548   echo "$ac_t""yes" 1>&6
12549   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12550 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12551 echo "configure:12552: checking for arpa/inet.h" >&5
12552
12553 cat > conftest.$ac_ext <<EOF
12554 #line 12555 "configure"
12555 #include "confdefs.h"
12556 #include <arpa/inet.h>
12557 EOF
12558 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12559 { (eval echo configure:12560: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12560 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12561 if test -z "$ac_err"; then
12562   rm -rf conftest*
12563   eval "ac_cv_header_$ac_safe=yes"
12564 else
12565   echo "$ac_err" >&5
12566   echo "configure: failed program was:" >&5
12567   cat conftest.$ac_ext >&5
12568   rm -rf conftest*
12569   eval "ac_cv_header_$ac_safe=no"
12570 fi
12571 rm -f conftest*
12572 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12573   echo "$ac_t""yes" 1>&6
12574   
12575   { test "$extra_verbose" = "yes" && cat << \EOF
12576     Defining HAVE_SOCKETS
12577 EOF
12578 cat >> confdefs.h <<\EOF
12579 #define HAVE_SOCKETS 1
12580 EOF
12581 }
12582
12583       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12584 echo "configure:12585: checking "for sun_len member in struct sockaddr_un"" >&5
12585       cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588
12589 #include <sys/types.h>
12590 #include <sys/socket.h>
12591 #include <sys/un.h>
12592       
12593 int main() {
12594 static struct sockaddr_un x; x.sun_len = 1;
12595 ; return 0; }
12596 EOF
12597 if { (eval echo configure:12598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12598   rm -rf conftest*
12599   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12600     Defining HAVE_SOCKADDR_SUN_LEN
12601 EOF
12602 cat >> confdefs.h <<\EOF
12603 #define HAVE_SOCKADDR_SUN_LEN 1
12604 EOF
12605 }
12606
12607 else
12608   echo "configure: failed program was:" >&5
12609   cat conftest.$ac_ext >&5
12610   rm -rf conftest*
12611   echo "$ac_t""no" 1>&6
12612 fi
12613 rm -f conftest*
12614       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12615 echo "configure:12616: checking "for ip_mreq struct in netinet/in.h"" >&5
12616       cat > conftest.$ac_ext <<EOF
12617 #line 12618 "configure"
12618 #include "confdefs.h"
12619
12620 #include <sys/types.h>
12621 #include <netinet/in.h>
12622       
12623 int main() {
12624 static struct ip_mreq x;
12625 ; return 0; }
12626 EOF
12627 if { (eval echo configure:12628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12628   rm -rf conftest*
12629   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12630     Defining HAVE_MULTICAST
12631 EOF
12632 cat >> confdefs.h <<\EOF
12633 #define HAVE_MULTICAST 1
12634 EOF
12635 }
12636
12637 else
12638   echo "configure: failed program was:" >&5
12639   cat conftest.$ac_ext >&5
12640   rm -rf conftest*
12641   echo "$ac_t""no" 1>&6
12642 fi
12643 rm -f conftest*
12644 else
12645   echo "$ac_t""no" 1>&6
12646 fi
12647
12648 else
12649   echo "$ac_t""no" 1>&6
12650 fi
12651
12652 else
12653   echo "$ac_t""no" 1>&6
12654 fi
12655
12656
12657 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12658 echo "configure:12659: checking for msgget" >&5
12659
12660 cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 /* System header to define __stub macros and hopefully few prototypes,
12664     which can conflict with char msgget(); below.  */
12665 #include <assert.h>
12666 /* Override any gcc2 internal prototype to avoid an error.  */
12667 /* We use char because int might match the return type of a gcc2
12668     builtin and then its argument prototype would still apply.  */
12669 char msgget();
12670
12671 int main() {
12672
12673 /* The GNU C library defines this for functions which it implements
12674     to always fail with ENOSYS.  Some functions are actually named
12675     something starting with __ and the normal name is an alias.  */
12676 #if defined (__stub_msgget) || defined (__stub___msgget)
12677 choke me
12678 #else
12679 msgget();
12680 #endif
12681
12682 ; return 0; }
12683 EOF
12684 if { (eval echo configure:12685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12685   rm -rf conftest*
12686   eval "ac_cv_func_msgget=yes"
12687 else
12688   echo "configure: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   rm -rf conftest*
12691   eval "ac_cv_func_msgget=no"
12692 fi
12693 rm -f conftest*
12694
12695 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12696   echo "$ac_t""yes" 1>&6
12697   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12698 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12699 echo "configure:12700: checking for sys/ipc.h" >&5
12700
12701 cat > conftest.$ac_ext <<EOF
12702 #line 12703 "configure"
12703 #include "confdefs.h"
12704 #include <sys/ipc.h>
12705 EOF
12706 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12707 { (eval echo configure:12708: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12708 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12709 if test -z "$ac_err"; then
12710   rm -rf conftest*
12711   eval "ac_cv_header_$ac_safe=yes"
12712 else
12713   echo "$ac_err" >&5
12714   echo "configure: failed program was:" >&5
12715   cat conftest.$ac_ext >&5
12716   rm -rf conftest*
12717   eval "ac_cv_header_$ac_safe=no"
12718 fi
12719 rm -f conftest*
12720 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12721   echo "$ac_t""yes" 1>&6
12722   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12723 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12724 echo "configure:12725: checking for sys/msg.h" >&5
12725
12726 cat > conftest.$ac_ext <<EOF
12727 #line 12728 "configure"
12728 #include "confdefs.h"
12729 #include <sys/msg.h>
12730 EOF
12731 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12732 { (eval echo configure:12733: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12733 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12734 if test -z "$ac_err"; then
12735   rm -rf conftest*
12736   eval "ac_cv_header_$ac_safe=yes"
12737 else
12738   echo "$ac_err" >&5
12739   echo "configure: failed program was:" >&5
12740   cat conftest.$ac_ext >&5
12741   rm -rf conftest*
12742   eval "ac_cv_header_$ac_safe=no"
12743 fi
12744 rm -f conftest*
12745 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12746   echo "$ac_t""yes" 1>&6
12747   { test "$extra_verbose" = "yes" && cat << \EOF
12748     Defining HAVE_SYSVIPC
12749 EOF
12750 cat >> confdefs.h <<\EOF
12751 #define HAVE_SYSVIPC 1
12752 EOF
12753 }
12754
12755 else
12756   echo "$ac_t""no" 1>&6
12757 fi
12758
12759 else
12760   echo "$ac_t""no" 1>&6
12761 fi
12762
12763 else
12764   echo "$ac_t""no" 1>&6
12765 fi
12766
12767
12768 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12769 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12770 echo "configure:12771: checking for dirent.h" >&5
12771
12772 cat > conftest.$ac_ext <<EOF
12773 #line 12774 "configure"
12774 #include "confdefs.h"
12775 #include <dirent.h>
12776 EOF
12777 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12778 { (eval echo configure:12779: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12779 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12780 if test -z "$ac_err"; then
12781   rm -rf conftest*
12782   eval "ac_cv_header_$ac_safe=yes"
12783 else
12784   echo "$ac_err" >&5
12785   echo "configure: failed program was:" >&5
12786   cat conftest.$ac_ext >&5
12787   rm -rf conftest*
12788   eval "ac_cv_header_$ac_safe=no"
12789 fi
12790 rm -f conftest*
12791 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12792   echo "$ac_t""yes" 1>&6
12793   { test "$extra_verbose" = "yes" && cat << \EOF
12794     Defining SYSV_SYSTEM_DIR
12795 EOF
12796 cat >> confdefs.h <<\EOF
12797 #define SYSV_SYSTEM_DIR 1
12798 EOF
12799 }
12800
12801 else
12802   echo "$ac_t""no" 1>&6
12803 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12804 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12805 echo "configure:12806: checking for sys/dir.h" >&5
12806
12807 cat > conftest.$ac_ext <<EOF
12808 #line 12809 "configure"
12809 #include "confdefs.h"
12810 #include <sys/dir.h>
12811 EOF
12812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12813 { (eval echo configure:12814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12815 if test -z "$ac_err"; then
12816   rm -rf conftest*
12817   eval "ac_cv_header_$ac_safe=yes"
12818 else
12819   echo "$ac_err" >&5
12820   echo "configure: failed program was:" >&5
12821   cat conftest.$ac_ext >&5
12822   rm -rf conftest*
12823   eval "ac_cv_header_$ac_safe=no"
12824 fi
12825 rm -f conftest*
12826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12827   echo "$ac_t""yes" 1>&6
12828   :
12829 else
12830   echo "$ac_t""no" 1>&6
12831 { test "$extra_verbose" = "yes" && cat << \EOF
12832     Defining NONSYSTEM_DIR_LIBRARY
12833 EOF
12834 cat >> confdefs.h <<\EOF
12835 #define NONSYSTEM_DIR_LIBRARY 1
12836 EOF
12837 }
12838
12839 fi
12840
12841 fi
12842
12843
12844 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12845 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12846 echo "configure:12847: checking for nlist.h" >&5
12847
12848 cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 #include <nlist.h>
12852 EOF
12853 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12854 { (eval echo configure:12855: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12855 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12856 if test -z "$ac_err"; then
12857   rm -rf conftest*
12858   eval "ac_cv_header_$ac_safe=yes"
12859 else
12860   echo "$ac_err" >&5
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -rf conftest*
12864   eval "ac_cv_header_$ac_safe=no"
12865 fi
12866 rm -f conftest*
12867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12868   echo "$ac_t""yes" 1>&6
12869   { test "$extra_verbose" = "yes" && cat << \EOF
12870     Defining NLIST_STRUCT
12871 EOF
12872 cat >> confdefs.h <<\EOF
12873 #define NLIST_STRUCT 1
12874 EOF
12875 }
12876
12877 else
12878   echo "$ac_t""no" 1>&6
12879 fi
12880
12881
12882
12883 echo "checking "for sound support"" 1>&6
12884 echo "configure:12885: checking "for sound support"" >&5
12885 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12886
12887 if test "$with_native_sound" != "no"; then
12888     if test -n "$native_sound_lib"; then
12889     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12890 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12891 echo "configure:12892: checking for multimedia/audio_device.h" >&5
12892
12893 cat > conftest.$ac_ext <<EOF
12894 #line 12895 "configure"
12895 #include "confdefs.h"
12896 #include <multimedia/audio_device.h>
12897 EOF
12898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12899 { (eval echo configure:12900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12901 if test -z "$ac_err"; then
12902   rm -rf conftest*
12903   eval "ac_cv_header_$ac_safe=yes"
12904 else
12905   echo "$ac_err" >&5
12906   echo "configure: failed program was:" >&5
12907   cat conftest.$ac_ext >&5
12908   rm -rf conftest*
12909   eval "ac_cv_header_$ac_safe=no"
12910 fi
12911 rm -f conftest*
12912 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12913   echo "$ac_t""yes" 1>&6
12914   sound_found=yes sound_cflags=""
12915       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12916    echo "    xemacs will be linked with \"sunplay.o\""
12917  fi
12918 else
12919   echo "$ac_t""no" 1>&6
12920 fi
12921
12922   fi
12923
12924     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12925     sound_found=yes
12926     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12927    echo "    xemacs will be linked with \"sunplay.o\""
12928  fi
12929     if test -d "/usr/demo/SOUND/include"
12930       then sound_cflags="-I/usr/demo/SOUND/include"
12931       else sound_cflags="-I/usr/demo/SOUND"
12932     fi
12933     if test -z "$native_sound_lib" ; then
12934       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12935         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12936         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12937       fi
12938     fi
12939   fi
12940
12941     if test -z "$sound_found"; then
12942     case "$canonical" in
12943     *-sgi-* )
12944       if test -z "$native_sound_lib"; then
12945         
12946 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12947 echo "configure:12948: checking for ALopenport in -laudio" >&5
12948 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12949
12950 xe_check_libs=" -laudio "
12951 cat > conftest.$ac_ext <<EOF
12952 #line 12953 "configure"
12953 #include "confdefs.h"
12954 /* Override any gcc2 internal prototype to avoid an error.  */
12955 /* We use char because int might match the return type of a gcc2
12956     builtin and then its argument prototype would still apply.  */
12957 char ALopenport();
12958
12959 int main() {
12960 ALopenport()
12961 ; return 0; }
12962 EOF
12963 if { (eval echo configure:12964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12964   rm -rf conftest*
12965   eval "ac_cv_lib_$ac_lib_var=yes"
12966 else
12967   echo "configure: failed program was:" >&5
12968   cat conftest.$ac_ext >&5
12969   rm -rf conftest*
12970   eval "ac_cv_lib_$ac_lib_var=no"
12971 fi
12972 rm -f conftest*
12973 xe_check_libs=""
12974
12975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12976   echo "$ac_t""yes" 1>&6
12977   native_sound_lib="-laudio"
12978 else
12979   echo "$ac_t""no" 1>&6
12980 fi
12981
12982
12983       fi
12984       if test -n "$native_sound_lib"; then
12985         sound_found=yes sound_cflags=""
12986         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12987    echo "    xemacs will be linked with \"sgiplay.o\""
12988  fi
12989       fi ;;
12990     hppa*-hp-hpux* )
12991       if test -z "$native_sound_lib"; then
12992         
12993 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12994 echo "configure:12995: checking for AOpenAudio in -lAlib" >&5
12995 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12996
12997 xe_check_libs=" -lAlib "
12998 cat > conftest.$ac_ext <<EOF
12999 #line 13000 "configure"
13000 #include "confdefs.h"
13001 /* Override any gcc2 internal prototype to avoid an error.  */
13002 /* We use char because int might match the return type of a gcc2
13003     builtin and then its argument prototype would still apply.  */
13004 char AOpenAudio();
13005
13006 int main() {
13007 AOpenAudio()
13008 ; return 0; }
13009 EOF
13010 if { (eval echo configure:13011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13011   rm -rf conftest*
13012   eval "ac_cv_lib_$ac_lib_var=yes"
13013 else
13014   echo "configure: failed program was:" >&5
13015   cat conftest.$ac_ext >&5
13016   rm -rf conftest*
13017   eval "ac_cv_lib_$ac_lib_var=no"
13018 fi
13019 rm -f conftest*
13020 xe_check_libs=""
13021
13022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13023   echo "$ac_t""yes" 1>&6
13024   native_sound_lib="-lAlib"
13025 else
13026   echo "$ac_t""no" 1>&6
13027 fi
13028
13029
13030       fi
13031       if test -n "$native_sound_lib"; then
13032         sound_found=yes
13033         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13034    echo "    xemacs will be linked with \"hpplay.o\""
13035  fi
13036         if test "$GCC" = "yes" # Kludge city
13037           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13038           else sound_cflags="+e -I/usr/audio/examples"
13039         fi
13040       fi ;;
13041     esac
13042   fi
13043
13044     if test -z "$sound_found"; then
13045     if test "$with_msw" = "yes"; then
13046     sound_found=yes
13047     native_sound_lib=
13048     fi
13049   fi
13050
13051     if test -z "$sound_found"; then
13052     for dir in "machine" "sys" "linux"; do
13053       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13054 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13055 echo "configure:13056: checking for ${dir}/soundcard.h" >&5
13056
13057 cat > conftest.$ac_ext <<EOF
13058 #line 13059 "configure"
13059 #include "confdefs.h"
13060 #include <${dir}/soundcard.h>
13061 EOF
13062 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13063 { (eval echo configure:13064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13064 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13065 if test -z "$ac_err"; then
13066   rm -rf conftest*
13067   eval "ac_cv_header_$ac_safe=yes"
13068 else
13069   echo "$ac_err" >&5
13070   echo "configure: failed program was:" >&5
13071   cat conftest.$ac_ext >&5
13072   rm -rf conftest*
13073   eval "ac_cv_header_$ac_safe=no"
13074 fi
13075 rm -f conftest*
13076 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13077   echo "$ac_t""yes" 1>&6
13078   sound_found=yes
13079        need_miscplay=yes
13080         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13081    echo "    xemacs will be linked with \"linuxplay.o\""
13082  fi
13083         { test "$extra_verbose" = "yes" && cat << EOF
13084     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13085 EOF
13086 cat >> confdefs.h <<EOF
13087 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13088 EOF
13089 }
13090
13091         break
13092 else
13093   echo "$ac_t""no" 1>&6
13094 fi
13095
13096     done
13097   fi
13098
13099   test "$sound_found" = "yes" && with_native_sound=yes
13100 fi
13101
13102 if test "$with_native_sound" = "yes"; then
13103   { test "$extra_verbose" = "yes" && cat << \EOF
13104     Defining HAVE_NATIVE_SOUND
13105 EOF
13106 cat >> confdefs.h <<\EOF
13107 #define HAVE_NATIVE_SOUND 1
13108 EOF
13109 }
13110
13111   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13112 fi
13113
13114 if test "$with_nas_sound" != "no"; then
13115   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13116 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13117 echo "configure:13118: checking for audio/audiolib.h" >&5
13118
13119 cat > conftest.$ac_ext <<EOF
13120 #line 13121 "configure"
13121 #include "confdefs.h"
13122 #include <audio/audiolib.h>
13123 EOF
13124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13125 { (eval echo configure:13126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13127 if test -z "$ac_err"; then
13128   rm -rf conftest*
13129   eval "ac_cv_header_$ac_safe=yes"
13130 else
13131   echo "$ac_err" >&5
13132   echo "configure: failed program was:" >&5
13133   cat conftest.$ac_ext >&5
13134   rm -rf conftest*
13135   eval "ac_cv_header_$ac_safe=no"
13136 fi
13137 rm -f conftest*
13138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13139   echo "$ac_t""yes" 1>&6
13140   
13141     
13142 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13143 echo "configure:13144: checking for AuOpenServer in -laudio" >&5
13144 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13145
13146 xe_check_libs=" -laudio "
13147 cat > conftest.$ac_ext <<EOF
13148 #line 13149 "configure"
13149 #include "confdefs.h"
13150 /* Override any gcc2 internal prototype to avoid an error.  */
13151 /* We use char because int might match the return type of a gcc2
13152     builtin and then its argument prototype would still apply.  */
13153 char AuOpenServer();
13154
13155 int main() {
13156 AuOpenServer()
13157 ; return 0; }
13158 EOF
13159 if { (eval echo configure:13160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13160   rm -rf conftest*
13161   eval "ac_cv_lib_$ac_lib_var=yes"
13162 else
13163   echo "configure: failed program was:" >&5
13164   cat conftest.$ac_ext >&5
13165   rm -rf conftest*
13166   eval "ac_cv_lib_$ac_lib_var=no"
13167 fi
13168 rm -f conftest*
13169 xe_check_libs=""
13170
13171 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13172   echo "$ac_t""yes" 1>&6
13173   have_nas_sound=yes
13174 else
13175   echo "$ac_t""no" 1>&6
13176 fi
13177
13178
13179 else
13180   echo "$ac_t""no" 1>&6
13181 fi
13182
13183   if test "$have_nas_sound" = "yes"; then
13184     with_nas_sound=yes
13185     { test "$extra_verbose" = "yes" && cat << \EOF
13186     Defining HAVE_NAS_SOUND
13187 EOF
13188 cat >> confdefs.h <<\EOF
13189 #define HAVE_NAS_SOUND 1
13190 EOF
13191 }
13192
13193     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13194    echo "    xemacs will be linked with \"nas.o\""
13195  fi
13196     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13197             cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 #include <audio/Xtutil.h>
13201 EOF
13202 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13203   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13204   :
13205 else
13206   rm -rf conftest*
13207   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13208     Defining NAS_NO_ERROR_JUMP
13209 EOF
13210 cat >> confdefs.h <<\EOF
13211 #define NAS_NO_ERROR_JUMP 1
13212 EOF
13213 }
13214
13215 fi
13216 rm -f conftest*
13217
13218   else
13219     test "$with_nas_sound" = "yes" && \
13220       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13221     with_nas_sound=no
13222   fi
13223 fi
13224
13225 if test "$with_esd_sound" != "no"; then
13226   # Extract the first word of "esd-config", so it can be a program name with args.
13227 set dummy esd-config; ac_word=$2
13228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13229 echo "configure:13230: checking for $ac_word" >&5
13230
13231 if test -n "$have_esd_config"; then
13232   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13233 else
13234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13235   ac_dummy="$PATH"
13236   for ac_dir in $ac_dummy; do
13237     test -z "$ac_dir" && ac_dir=.
13238     if test -f $ac_dir/$ac_word; then
13239       ac_cv_prog_have_esd_config="yes"
13240       break
13241     fi
13242   done
13243   IFS="$ac_save_ifs"
13244   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13245 fi
13246 have_esd_config="$ac_cv_prog_have_esd_config"
13247 if test -n "$have_esd_config"; then
13248   echo "$ac_t""$have_esd_config" 1>&6
13249 else
13250   echo "$ac_t""no" 1>&6
13251 fi
13252
13253   if test "$have_esd_config" = "yes"; then
13254     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13255     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
13256     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13257     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13258 echo "configure:13259: checking for esd_play_stream" >&5
13259
13260 cat > conftest.$ac_ext <<EOF
13261 #line 13262 "configure"
13262 #include "confdefs.h"
13263 /* System header to define __stub macros and hopefully few prototypes,
13264     which can conflict with char esd_play_stream(); below.  */
13265 #include <assert.h>
13266 /* Override any gcc2 internal prototype to avoid an error.  */
13267 /* We use char because int might match the return type of a gcc2
13268     builtin and then its argument prototype would still apply.  */
13269 char esd_play_stream();
13270
13271 int main() {
13272
13273 /* The GNU C library defines this for functions which it implements
13274     to always fail with ENOSYS.  Some functions are actually named
13275     something starting with __ and the normal name is an alias.  */
13276 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13277 choke me
13278 #else
13279 esd_play_stream();
13280 #endif
13281
13282 ; return 0; }
13283 EOF
13284 if { (eval echo configure:13285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13285   rm -rf conftest*
13286   eval "ac_cv_func_esd_play_stream=yes"
13287 else
13288   echo "configure: failed program was:" >&5
13289   cat conftest.$ac_ext >&5
13290   rm -rf conftest*
13291   eval "ac_cv_func_esd_play_stream=no"
13292 fi
13293 rm -f conftest*
13294
13295 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13296   echo "$ac_t""yes" 1>&6
13297   have_esd_sound=yes
13298 else
13299   echo "$ac_t""no" 1>&6
13300 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13301 fi
13302
13303   fi
13304
13305   if test "$have_esd_sound" = "yes"; then
13306     with_esd_sound=yes
13307     need_miscplay=yes
13308     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13309    echo "    xemacs will be linked with \"esd.o\""
13310  fi
13311     { test "$extra_verbose" = "yes" && cat << \EOF
13312     Defining HAVE_ESD_SOUND
13313 EOF
13314 cat >> confdefs.h <<\EOF
13315 #define HAVE_ESD_SOUND 1
13316 EOF
13317 }
13318
13319   else
13320     test "$with_esd_sound" = "yes" && \
13321       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13322     with_esd_sound=no
13323   fi
13324 fi
13325
13326 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13327    echo "    xemacs will be linked with \"miscplay.o\""
13328  fi
13329
13330
13331 test -z "$with_tty" && with_tty=yes
13332
13333 if test "$with_tty" = "yes"  ; then
13334   echo "checking for TTY-related features" 1>&6
13335 echo "configure:13336: checking for TTY-related features" >&5
13336   { test "$extra_verbose" = "yes" && cat << \EOF
13337     Defining HAVE_TTY
13338 EOF
13339 cat >> confdefs.h <<\EOF
13340 #define HAVE_TTY 1
13341 EOF
13342 }
13343
13344   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
13345    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\""
13346  fi
13347
13348     if test -z "$with_ncurses"; then
13349     
13350 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13351 echo "configure:13352: checking for tgetent in -lncurses" >&5
13352 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13353
13354 xe_check_libs=" -lncurses "
13355 cat > conftest.$ac_ext <<EOF
13356 #line 13357 "configure"
13357 #include "confdefs.h"
13358 /* Override any gcc2 internal prototype to avoid an error.  */
13359 /* We use char because int might match the return type of a gcc2
13360     builtin and then its argument prototype would still apply.  */
13361 char tgetent();
13362
13363 int main() {
13364 tgetent()
13365 ; return 0; }
13366 EOF
13367 if { (eval echo configure:13368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13368   rm -rf conftest*
13369   eval "ac_cv_lib_$ac_lib_var=yes"
13370 else
13371   echo "configure: failed program was:" >&5
13372   cat conftest.$ac_ext >&5
13373   rm -rf conftest*
13374   eval "ac_cv_lib_$ac_lib_var=no"
13375 fi
13376 rm -f conftest*
13377 xe_check_libs=""
13378
13379 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13380   echo "$ac_t""yes" 1>&6
13381   with_ncurses=yes
13382 else
13383   echo "$ac_t""no" 1>&6
13384 with_ncurses=no
13385 fi
13386
13387
13388   fi
13389   if test "$with_ncurses" = "yes"; then
13390     { test "$extra_verbose" = "yes" && cat << \EOF
13391     Defining HAVE_NCURSES
13392 EOF
13393 cat >> confdefs.h <<\EOF
13394 #define HAVE_NCURSES 1
13395 EOF
13396 }
13397
13398     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13399 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13400 echo "configure:13401: checking for ncurses/curses.h" >&5
13401
13402 cat > conftest.$ac_ext <<EOF
13403 #line 13404 "configure"
13404 #include "confdefs.h"
13405 #include <ncurses/curses.h>
13406 EOF
13407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13408 { (eval echo configure:13409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13410 if test -z "$ac_err"; then
13411   rm -rf conftest*
13412   eval "ac_cv_header_$ac_safe=yes"
13413 else
13414   echo "$ac_err" >&5
13415   echo "configure: failed program was:" >&5
13416   cat conftest.$ac_ext >&5
13417   rm -rf conftest*
13418   eval "ac_cv_header_$ac_safe=no"
13419 fi
13420 rm -f conftest*
13421 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13422   echo "$ac_t""yes" 1>&6
13423   curses_h_file=ncurses/curses.h
13424 else
13425   echo "$ac_t""no" 1>&6
13426 fi
13427
13428     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13429 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13430 echo "configure:13431: checking for ncurses/term.h" >&5
13431
13432 cat > conftest.$ac_ext <<EOF
13433 #line 13434 "configure"
13434 #include "confdefs.h"
13435 #include <ncurses/term.h>
13436 EOF
13437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13438 { (eval echo configure:13439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13440 if test -z "$ac_err"; then
13441   rm -rf conftest*
13442   eval "ac_cv_header_$ac_safe=yes"
13443 else
13444   echo "$ac_err" >&5
13445   echo "configure: failed program was:" >&5
13446   cat conftest.$ac_ext >&5
13447   rm -rf conftest*
13448   eval "ac_cv_header_$ac_safe=no"
13449 fi
13450 rm -f conftest*
13451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13452   echo "$ac_t""yes" 1>&6
13453   term_h_file=ncurses/term.h
13454 else
13455   echo "$ac_t""no" 1>&6
13456 fi
13457
13458     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13459    echo "    xemacs will be linked with \"terminfo.o\""
13460  fi
13461     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13462
13463     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13464                         save_c_switch_site="$c_switch_site"
13465       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13466       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13467 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13468 echo "configure:13469: checking for ncurses/curses.h" >&5
13469
13470 cat > conftest.$ac_ext <<EOF
13471 #line 13472 "configure"
13472 #include "confdefs.h"
13473 #include <ncurses/curses.h>
13474 EOF
13475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13476 { (eval echo configure:13477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13478 if test -z "$ac_err"; then
13479   rm -rf conftest*
13480   eval "ac_cv_header_$ac_safe=yes"
13481 else
13482   echo "$ac_err" >&5
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -rf conftest*
13486   eval "ac_cv_header_$ac_safe=no"
13487 fi
13488 rm -f conftest*
13489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13490   echo "$ac_t""yes" 1>&6
13491   curses_h_file=ncurses/curses.h
13492 else
13493   echo "$ac_t""no" 1>&6
13494 fi
13495
13496       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13497         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13498         else c_switch_site="$save_c_switch_site"
13499       fi
13500     fi
13501   else         if test "$have_terminfo" = "yes"; then
13502       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13503    echo "    xemacs will be linked with \"terminfo.o\""
13504  fi
13505       if test -n "$libs_termcap"; then
13506         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13507       else
13508         for lib in curses termlib termcap; do
13509           
13510 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13511 echo "configure:13512: checking for tgetent in -l$lib" >&5
13512 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13513
13514 xe_check_libs=" -l$lib "
13515 cat > conftest.$ac_ext <<EOF
13516 #line 13517 "configure"
13517 #include "confdefs.h"
13518 /* Override any gcc2 internal prototype to avoid an error.  */
13519 /* We use char because int might match the return type of a gcc2
13520     builtin and then its argument prototype would still apply.  */
13521 char tgetent();
13522
13523 int main() {
13524 tgetent()
13525 ; return 0; }
13526 EOF
13527 if { (eval echo configure:13528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13528   rm -rf conftest*
13529   eval "ac_cv_lib_$ac_lib_var=yes"
13530 else
13531   echo "configure: failed program was:" >&5
13532   cat conftest.$ac_ext >&5
13533   rm -rf conftest*
13534   eval "ac_cv_lib_$ac_lib_var=no"
13535 fi
13536 rm -f conftest*
13537 xe_check_libs=""
13538
13539 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13540   echo "$ac_t""yes" 1>&6
13541   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13542 else
13543   echo "$ac_t""no" 1>&6
13544 fi
13545
13546
13547         done
13548       fi
13549     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13550    echo "    xemacs will be linked with \"tparam.o\""
13551  fi
13552                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13553       if test -n "$libs_termcap"; then
13554         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13555       else
13556         
13557 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13558 echo "configure:13559: checking for tgetent in -lcurses" >&5
13559 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13560
13561 xe_check_libs=" -lcurses "
13562 cat > conftest.$ac_ext <<EOF
13563 #line 13564 "configure"
13564 #include "confdefs.h"
13565 /* Override any gcc2 internal prototype to avoid an error.  */
13566 /* We use char because int might match the return type of a gcc2
13567     builtin and then its argument prototype would still apply.  */
13568 char tgetent();
13569
13570 int main() {
13571 tgetent()
13572 ; return 0; }
13573 EOF
13574 if { (eval echo configure:13575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13575   rm -rf conftest*
13576   eval "ac_cv_lib_$ac_lib_var=yes"
13577 else
13578   echo "configure: failed program was:" >&5
13579   cat conftest.$ac_ext >&5
13580   rm -rf conftest*
13581   eval "ac_cv_lib_$ac_lib_var=no"
13582 fi
13583 rm -f conftest*
13584 xe_check_libs=""
13585
13586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13587   echo "$ac_t""yes" 1>&6
13588   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13589 else
13590   echo "$ac_t""no" 1>&6
13591 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13592 echo "configure:13593: checking for tgetent in -ltermcap" >&5
13593 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13594
13595 xe_check_libs=" -ltermcap "
13596 cat > conftest.$ac_ext <<EOF
13597 #line 13598 "configure"
13598 #include "confdefs.h"
13599 /* Override any gcc2 internal prototype to avoid an error.  */
13600 /* We use char because int might match the return type of a gcc2
13601     builtin and then its argument prototype would still apply.  */
13602 char tgetent();
13603
13604 int main() {
13605 tgetent()
13606 ; return 0; }
13607 EOF
13608 if { (eval echo configure:13609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13609   rm -rf conftest*
13610   eval "ac_cv_lib_$ac_lib_var=yes"
13611 else
13612   echo "configure: failed program was:" >&5
13613   cat conftest.$ac_ext >&5
13614   rm -rf conftest*
13615   eval "ac_cv_lib_$ac_lib_var=no"
13616 fi
13617 rm -f conftest*
13618 xe_check_libs=""
13619
13620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13621   echo "$ac_t""yes" 1>&6
13622   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13623 else
13624   echo "$ac_t""no" 1>&6
13625 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13626    echo "    xemacs will be linked with \"termcap.o\""
13627  fi
13628 fi
13629
13630
13631 fi
13632
13633
13634       fi
13635     fi
13636   fi
13637   { test "$extra_verbose" = "yes" && cat << EOF
13638     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13639 EOF
13640 cat >> confdefs.h <<EOF
13641 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13642 EOF
13643 }
13644
13645   { test "$extra_verbose" = "yes" && cat << EOF
13646     Defining TERM_H_FILE = "${term_h_file-term.h}"
13647 EOF
13648 cat >> confdefs.h <<EOF
13649 #define TERM_H_FILE "${term_h_file-term.h}"
13650 EOF
13651 }
13652
13653
13654     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13655 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13656 echo "configure:13657: checking for gpm.h" >&5
13657
13658 cat > conftest.$ac_ext <<EOF
13659 #line 13660 "configure"
13660 #include "confdefs.h"
13661 #include <gpm.h>
13662 EOF
13663 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13664 { (eval echo configure:13665: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13665 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13666 if test -z "$ac_err"; then
13667   rm -rf conftest*
13668   eval "ac_cv_header_$ac_safe=yes"
13669 else
13670   echo "$ac_err" >&5
13671   echo "configure: failed program was:" >&5
13672   cat conftest.$ac_ext >&5
13673   rm -rf conftest*
13674   eval "ac_cv_header_$ac_safe=no"
13675 fi
13676 rm -f conftest*
13677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13678   echo "$ac_t""yes" 1>&6
13679   :
13680 else
13681   echo "$ac_t""no" 1>&6
13682 with_gpm=no
13683 fi
13684  }
13685   test -z "$with_gpm" && { 
13686 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13687 echo "configure:13688: checking for Gpm_Open in -lgpm" >&5
13688 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13689
13690 xe_check_libs=" -lgpm "
13691 cat > conftest.$ac_ext <<EOF
13692 #line 13693 "configure"
13693 #include "confdefs.h"
13694 /* Override any gcc2 internal prototype to avoid an error.  */
13695 /* We use char because int might match the return type of a gcc2
13696     builtin and then its argument prototype would still apply.  */
13697 char Gpm_Open();
13698
13699 int main() {
13700 Gpm_Open()
13701 ; return 0; }
13702 EOF
13703 if { (eval echo configure:13704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13704   rm -rf conftest*
13705   eval "ac_cv_lib_$ac_lib_var=yes"
13706 else
13707   echo "configure: failed program was:" >&5
13708   cat conftest.$ac_ext >&5
13709   rm -rf conftest*
13710   eval "ac_cv_lib_$ac_lib_var=no"
13711 fi
13712 rm -f conftest*
13713 xe_check_libs=""
13714
13715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13716   echo "$ac_t""yes" 1>&6
13717   with_gpm=yes
13718 else
13719   echo "$ac_t""no" 1>&6
13720 with_gpm=no
13721 fi
13722
13723  }
13724   if test "$with_gpm" = "yes"; then
13725     { test "$extra_verbose" = "yes" && cat << \EOF
13726     Defining HAVE_GPM
13727 EOF
13728 cat >> confdefs.h <<\EOF
13729 #define HAVE_GPM 1
13730 EOF
13731 }
13732
13733     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13734    echo "    xemacs will be linked with \"gpmevent.o\""
13735  fi
13736     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13737   fi
13738
13739 else   for feature in ncurses gpm; do
13740     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13741       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13742     fi
13743     eval "with_${feature}=no"
13744   done
13745 fi 
13746 test "$with_x11" = "yes" -o "$with_tty" = "yes" -o "$need_event_unixoid" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13747    echo "    xemacs will be linked with \"event-unixoid.o\""
13748  fi
13749
13750
13751 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13752   != "no no no" && echo "checking for database support" 1>&6
13753 echo "configure:13754: checking for database support" >&5
13754
13755 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13756   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13757 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13758 echo "configure:13759: checking for ndbm.h" >&5
13759
13760 cat > conftest.$ac_ext <<EOF
13761 #line 13762 "configure"
13762 #include "confdefs.h"
13763 #include <ndbm.h>
13764 EOF
13765 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13766 { (eval echo configure:13767: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13767 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13768 if test -z "$ac_err"; then
13769   rm -rf conftest*
13770   eval "ac_cv_header_$ac_safe=yes"
13771 else
13772   echo "$ac_err" >&5
13773   echo "configure: failed program was:" >&5
13774   cat conftest.$ac_ext >&5
13775   rm -rf conftest*
13776   eval "ac_cv_header_$ac_safe=no"
13777 fi
13778 rm -f conftest*
13779 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13780   echo "$ac_t""yes" 1>&6
13781   :
13782 else
13783   echo "$ac_t""no" 1>&6
13784
13785     test "$with_database_gdbm" = "yes" -o \
13786          "$with_database_dbm"  = "yes" && \
13787       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13788     with_database_gdbm=no with_database_dbm=no
13789 fi
13790
13791 fi
13792
13793 if test "$with_database_gdbm" != "no"; then
13794   
13795 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13796 echo "configure:13797: checking for dbm_open in -lgdbm" >&5
13797 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13798
13799 xe_check_libs=" -lgdbm "
13800 cat > conftest.$ac_ext <<EOF
13801 #line 13802 "configure"
13802 #include "confdefs.h"
13803 /* Override any gcc2 internal prototype to avoid an error.  */
13804 /* We use char because int might match the return type of a gcc2
13805     builtin and then its argument prototype would still apply.  */
13806 char dbm_open();
13807
13808 int main() {
13809 dbm_open()
13810 ; return 0; }
13811 EOF
13812 if { (eval echo configure:13813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13813   rm -rf conftest*
13814   eval "ac_cv_lib_$ac_lib_var=yes"
13815 else
13816   echo "configure: failed program was:" >&5
13817   cat conftest.$ac_ext >&5
13818   rm -rf conftest*
13819   eval "ac_cv_lib_$ac_lib_var=no"
13820 fi
13821 rm -f conftest*
13822 xe_check_libs=""
13823
13824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13825   echo "$ac_t""yes" 1>&6
13826   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13827 else
13828   echo "$ac_t""no" 1>&6
13829 if test "$with_database_gdbm" = "yes"; then
13830      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13831    fi
13832    with_database_gdbm=no
13833 fi
13834
13835
13836 fi
13837
13838 if test "$with_database_dbm" != "no"; then
13839   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13840 echo "configure:13841: checking for dbm_open" >&5
13841
13842 cat > conftest.$ac_ext <<EOF
13843 #line 13844 "configure"
13844 #include "confdefs.h"
13845 /* System header to define __stub macros and hopefully few prototypes,
13846     which can conflict with char dbm_open(); below.  */
13847 #include <assert.h>
13848 /* Override any gcc2 internal prototype to avoid an error.  */
13849 /* We use char because int might match the return type of a gcc2
13850     builtin and then its argument prototype would still apply.  */
13851 char dbm_open();
13852
13853 int main() {
13854
13855 /* The GNU C library defines this for functions which it implements
13856     to always fail with ENOSYS.  Some functions are actually named
13857     something starting with __ and the normal name is an alias.  */
13858 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13859 choke me
13860 #else
13861 dbm_open();
13862 #endif
13863
13864 ; return 0; }
13865 EOF
13866 if { (eval echo configure:13867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13867   rm -rf conftest*
13868   eval "ac_cv_func_dbm_open=yes"
13869 else
13870   echo "configure: failed program was:" >&5
13871   cat conftest.$ac_ext >&5
13872   rm -rf conftest*
13873   eval "ac_cv_func_dbm_open=no"
13874 fi
13875 rm -f conftest*
13876
13877 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13878   echo "$ac_t""yes" 1>&6
13879   with_database_dbm=yes libdbm=
13880 else
13881   echo "$ac_t""no" 1>&6
13882
13883     
13884 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13885 echo "configure:13886: checking for dbm_open in -ldbm" >&5
13886 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13887
13888 xe_check_libs=" -ldbm "
13889 cat > conftest.$ac_ext <<EOF
13890 #line 13891 "configure"
13891 #include "confdefs.h"
13892 /* Override any gcc2 internal prototype to avoid an error.  */
13893 /* We use char because int might match the return type of a gcc2
13894     builtin and then its argument prototype would still apply.  */
13895 char dbm_open();
13896
13897 int main() {
13898 dbm_open()
13899 ; return 0; }
13900 EOF
13901 if { (eval echo configure:13902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13902   rm -rf conftest*
13903   eval "ac_cv_lib_$ac_lib_var=yes"
13904 else
13905   echo "configure: failed program was:" >&5
13906   cat conftest.$ac_ext >&5
13907   rm -rf conftest*
13908   eval "ac_cv_lib_$ac_lib_var=no"
13909 fi
13910 rm -f conftest*
13911 xe_check_libs=""
13912
13913 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13914   echo "$ac_t""yes" 1>&6
13915   with_database_dbm=yes libdbm=-ldbm
13916 else
13917   echo "$ac_t""no" 1>&6
13918 test "$with_database_dbm" = "yes" && \
13919         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13920       with_database_dbm=no
13921 fi
13922
13923
13924 fi
13925
13926 fi
13927
13928 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13929 test "$with_database_gdbm" = "yes" -o \
13930      "$with_database_dbm"  = "yes" && \
13931   { test "$extra_verbose" = "yes" && cat << \EOF
13932     Defining HAVE_DBM
13933 EOF
13934 cat >> confdefs.h <<\EOF
13935 #define HAVE_DBM 1
13936 EOF
13937 }
13938
13939
13940 if test "$with_database_berkdb" != "no"; then
13941   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13942 echo "configure:13943: checking for Berkeley db.h" >&5
13943   for header in "db/db.h" "db.h"; do
13944     cat > conftest.$ac_ext <<EOF
13945 #line 13946 "configure"
13946 #include "confdefs.h"
13947
13948 #include <stdlib.h>
13949 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13950 #ifdef HAVE_INTTYPES_H
13951 #define __BIT_TYPES_DEFINED__
13952 #include <inttypes.h>
13953 typedef uint8_t  u_int8_t;
13954 typedef uint16_t u_int16_t;
13955 typedef uint32_t u_int32_t;
13956 #ifdef WE_DONT_NEED_QUADS
13957 typedef uint64_t u_int64_t;
13958 #endif
13959 #endif
13960 #endif
13961 #include <$header>
13962
13963 int main() {
13964
13965 ; return 0; }
13966 EOF
13967 if { (eval echo configure:13968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13968   rm -rf conftest*
13969   db_h_file="$header"; break
13970 else
13971   echo "configure: failed program was:" >&5
13972   cat conftest.$ac_ext >&5
13973 fi
13974 rm -f conftest*
13975   done
13976   if test -z "$db_h_file"
13977   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13978   else echo "$ac_t""$db_h_file" 1>&6
13979   fi
13980
13981   if test "$with_database_berkdb" != "no"; then
13982     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13983 echo "configure:13984: checking for Berkeley DB version" >&5
13984     cat > conftest.$ac_ext <<EOF
13985 #line 13986 "configure"
13986 #include "confdefs.h"
13987 #include <$db_h_file>
13988 #if DB_VERSION_MAJOR > 1
13989 yes
13990 #endif
13991
13992 EOF
13993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13994   egrep "yes" >/dev/null 2>&1; then
13995   rm -rf conftest*
13996   cat > conftest.$ac_ext <<EOF
13997 #line 13998 "configure"
13998 #include "confdefs.h"
13999 #include <$db_h_file>
14000 #if DB_VERSION_MAJOR > 2
14001 yes
14002 #endif
14003
14004 EOF
14005 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14006   egrep "yes" >/dev/null 2>&1; then
14007   rm -rf conftest*
14008   echo "$ac_t""3" 1>&6; dbfunc=db_create
14009 else
14010   rm -rf conftest*
14011   
14012     echo "$ac_t""2" 1>&6; dbfunc=db_open
14013 fi
14014 rm -f conftest*
14015
14016 else
14017   rm -rf conftest*
14018   
14019     echo "$ac_t""1" 1>&6; dbfunc=dbopen
14020 fi
14021 rm -f conftest*
14022
14023     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
14024 echo "configure:14025: checking for $dbfunc" >&5
14025
14026 cat > conftest.$ac_ext <<EOF
14027 #line 14028 "configure"
14028 #include "confdefs.h"
14029 /* System header to define __stub macros and hopefully few prototypes,
14030     which can conflict with char $dbfunc(); below.  */
14031 #include <assert.h>
14032 /* Override any gcc2 internal prototype to avoid an error.  */
14033 /* We use char because int might match the return type of a gcc2
14034     builtin and then its argument prototype would still apply.  */
14035 char $dbfunc();
14036
14037 int main() {
14038
14039 /* The GNU C library defines this for functions which it implements
14040     to always fail with ENOSYS.  Some functions are actually named
14041     something starting with __ and the normal name is an alias.  */
14042 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14043 choke me
14044 #else
14045 $dbfunc();
14046 #endif
14047
14048 ; return 0; }
14049 EOF
14050 if { (eval echo configure:14051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14051   rm -rf conftest*
14052   eval "ac_cv_func_$dbfunc=yes"
14053 else
14054   echo "configure: failed program was:" >&5
14055   cat conftest.$ac_ext >&5
14056   rm -rf conftest*
14057   eval "ac_cv_func_$dbfunc=no"
14058 fi
14059 rm -f conftest*
14060
14061 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14062   echo "$ac_t""yes" 1>&6
14063   with_database_berkdb=yes need_libdb=no
14064 else
14065   echo "$ac_t""no" 1>&6
14066
14067     
14068 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14069 echo "configure:14070: checking for $dbfunc in -ldb" >&5
14070 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14071
14072 xe_check_libs=" -ldb "
14073 cat > conftest.$ac_ext <<EOF
14074 #line 14075 "configure"
14075 #include "confdefs.h"
14076 /* Override any gcc2 internal prototype to avoid an error.  */
14077 /* We use char because int might match the return type of a gcc2
14078     builtin and then its argument prototype would still apply.  */
14079 char $dbfunc();
14080
14081 int main() {
14082 $dbfunc()
14083 ; return 0; }
14084 EOF
14085 if { (eval echo configure:14086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14086   rm -rf conftest*
14087   eval "ac_cv_lib_$ac_lib_var=yes"
14088 else
14089   echo "configure: failed program was:" >&5
14090   cat conftest.$ac_ext >&5
14091   rm -rf conftest*
14092   eval "ac_cv_lib_$ac_lib_var=no"
14093 fi
14094 rm -f conftest*
14095 xe_check_libs=""
14096
14097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14098   echo "$ac_t""yes" 1>&6
14099   with_database_berkdb=yes need_libdb=yes
14100 else
14101   echo "$ac_t""no" 1>&6
14102 fi
14103
14104
14105 fi
14106
14107   fi
14108
14109   if test "$with_database_berkdb" = "yes"; then
14110     { test "$extra_verbose" = "yes" && cat << EOF
14111     Defining DB_H_FILE = "$db_h_file"
14112 EOF
14113 cat >> confdefs.h <<EOF
14114 #define DB_H_FILE "$db_h_file"
14115 EOF
14116 }
14117
14118     { test "$extra_verbose" = "yes" && cat << \EOF
14119     Defining HAVE_BERKELEY_DB
14120 EOF
14121 cat >> confdefs.h <<\EOF
14122 #define HAVE_BERKELEY_DB 1
14123 EOF
14124 }
14125
14126     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14127   else with_database_berkdb=no
14128   fi
14129 fi
14130
14131 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14132      != "no no no"; then
14133   { test "$extra_verbose" = "yes" && cat << \EOF
14134     Defining HAVE_DATABASE
14135 EOF
14136 cat >> confdefs.h <<\EOF
14137 #define HAVE_DATABASE 1
14138 EOF
14139 }
14140
14141   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14142    echo "    xemacs will be linked with \"database.o\""
14143  fi
14144 fi
14145
14146 if test "$with_socks" = "yes"; then
14147   
14148 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14149 echo "configure:14150: checking for SOCKSinit in -lsocks" >&5
14150 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14151
14152 xe_check_libs=" -lsocks "
14153 cat > conftest.$ac_ext <<EOF
14154 #line 14155 "configure"
14155 #include "confdefs.h"
14156 /* Override any gcc2 internal prototype to avoid an error.  */
14157 /* We use char because int might match the return type of a gcc2
14158     builtin and then its argument prototype would still apply.  */
14159 char SOCKSinit();
14160
14161 int main() {
14162 SOCKSinit()
14163 ; return 0; }
14164 EOF
14165 if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14166   rm -rf conftest*
14167   eval "ac_cv_lib_$ac_lib_var=yes"
14168 else
14169   echo "configure: failed program was:" >&5
14170   cat conftest.$ac_ext >&5
14171   rm -rf conftest*
14172   eval "ac_cv_lib_$ac_lib_var=no"
14173 fi
14174 rm -f conftest*
14175 xe_check_libs=""
14176
14177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14178   echo "$ac_t""yes" 1>&6
14179     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14180     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14181   { test "$extra_verbose" = "yes" && cat << EOF
14182     Defining $ac_tr_lib
14183 EOF
14184 cat >> confdefs.h <<EOF
14185 #define $ac_tr_lib 1
14186 EOF
14187 }
14188
14189   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14190
14191 else
14192   echo "$ac_t""no" 1>&6
14193 fi
14194
14195
14196   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14197     Defining HAVE_SOCKS
14198 EOF
14199 cat >> confdefs.h <<\EOF
14200 #define HAVE_SOCKS 1
14201 EOF
14202 }
14203
14204 fi
14205
14206 if test "$usage_tracking" = "yes"; then
14207   { test "$extra_verbose" = "yes" && cat << \EOF
14208     Defining USAGE_TRACKING
14209 EOF
14210 cat >> confdefs.h <<\EOF
14211 #define USAGE_TRACKING 1
14212 EOF
14213 }
14214
14215   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14216 fi
14217
14218 if test "$with_modules" != "no"; then
14219   echo "checking for module support" 1>&6
14220 echo "configure:14221: checking for module support" >&5
14221
14222     if test "$with_msw" = "yes"; then
14223     have_dl=yes;
14224   else
14225         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14226 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14227 echo "configure:14228: checking for dlfcn.h" >&5
14228
14229 cat > conftest.$ac_ext <<EOF
14230 #line 14231 "configure"
14231 #include "confdefs.h"
14232 #include <dlfcn.h>
14233 EOF
14234 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14235 { (eval echo configure:14236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14236 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14237 if test -z "$ac_err"; then
14238   rm -rf conftest*
14239   eval "ac_cv_header_$ac_safe=yes"
14240 else
14241   echo "$ac_err" >&5
14242   echo "configure: failed program was:" >&5
14243   cat conftest.$ac_ext >&5
14244   rm -rf conftest*
14245   eval "ac_cv_header_$ac_safe=no"
14246 fi
14247 rm -f conftest*
14248 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14249   echo "$ac_t""yes" 1>&6
14250   
14251       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14252 echo "configure:14253: checking for dlopen in -lc" >&5
14253       cat > conftest.$ac_ext <<EOF
14254 #line 14255 "configure"
14255 #include "confdefs.h"
14256 #include <dlfcn.h>
14257 int main() {
14258         dlopen ("", 0);
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262   rm -rf conftest*
14263    have_dl=yes 
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   
14269       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14270 echo "configure:14271: checking for dlopen in -ldl" >&5
14271       ac_save_LIBS="$LIBS"
14272       LIBS="-ldl $LIBS"
14273       cat > conftest.$ac_ext <<EOF
14274 #line 14275 "configure"
14275 #include "confdefs.h"
14276 #include <dlfcn.h>
14277 int main() {
14278         dlopen ("", 0);
14279 ; return 0; }
14280 EOF
14281 if { (eval echo configure:14282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14282   rm -rf conftest*
14283    have_dl=yes 
14284 else
14285   echo "configure: failed program was:" >&5
14286   cat conftest.$ac_ext >&5
14287   rm -rf conftest*
14288   LIBS="$ac_save_LIBS"
14289 fi
14290 rm -f conftest*
14291       ac_save_LIBS=
14292 fi
14293 rm -f conftest*
14294 else
14295   echo "$ac_t""no" 1>&6
14296 fi
14297
14298     if test -n "$have_dl"; then
14299       { test "$extra_verbose" = "yes" && cat << \EOF
14300     Defining HAVE_DLOPEN
14301 EOF
14302 cat >> confdefs.h <<\EOF
14303 #define HAVE_DLOPEN 1
14304 EOF
14305 }
14306
14307     else
14308       
14309 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14310 echo "configure:14311: checking for shl_load in -ldld" >&5
14311 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14312
14313 xe_check_libs=" -ldld "
14314 cat > conftest.$ac_ext <<EOF
14315 #line 14316 "configure"
14316 #include "confdefs.h"
14317 /* Override any gcc2 internal prototype to avoid an error.  */
14318 /* We use char because int might match the return type of a gcc2
14319     builtin and then its argument prototype would still apply.  */
14320 char shl_load();
14321
14322 int main() {
14323 shl_load()
14324 ; return 0; }
14325 EOF
14326 if { (eval echo configure:14327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14327   rm -rf conftest*
14328   eval "ac_cv_lib_$ac_lib_var=yes"
14329 else
14330   echo "configure: failed program was:" >&5
14331   cat conftest.$ac_ext >&5
14332   rm -rf conftest*
14333   eval "ac_cv_lib_$ac_lib_var=no"
14334 fi
14335 rm -f conftest*
14336 xe_check_libs=""
14337
14338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14339   echo "$ac_t""yes" 1>&6
14340   libdl=dld have_dl=yes;
14341         { test "$extra_verbose" = "yes" && cat << \EOF
14342     Defining HAVE_SHL_LOAD
14343 EOF
14344 cat >> confdefs.h <<\EOF
14345 #define HAVE_SHL_LOAD 1
14346 EOF
14347 }
14348
14349 else
14350   echo "$ac_t""no" 1>&6
14351
14352 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14353 echo "configure:14354: checking for dld_init in -ldld" >&5
14354 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14355
14356 xe_check_libs=" -ldld "
14357 cat > conftest.$ac_ext <<EOF
14358 #line 14359 "configure"
14359 #include "confdefs.h"
14360 /* Override any gcc2 internal prototype to avoid an error.  */
14361 /* We use char because int might match the return type of a gcc2
14362     builtin and then its argument prototype would still apply.  */
14363 char dld_init();
14364
14365 int main() {
14366 dld_init()
14367 ; return 0; }
14368 EOF
14369 if { (eval echo configure:14370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14370   rm -rf conftest*
14371   eval "ac_cv_lib_$ac_lib_var=yes"
14372 else
14373   echo "configure: failed program was:" >&5
14374   cat conftest.$ac_ext >&5
14375   rm -rf conftest*
14376   eval "ac_cv_lib_$ac_lib_var=no"
14377 fi
14378 rm -f conftest*
14379 xe_check_libs=""
14380
14381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14382   echo "$ac_t""yes" 1>&6
14383   libdl=dld have_dl=yes;
14384         { test "$extra_verbose" = "yes" && cat << \EOF
14385     Defining HAVE_DLD_INIT
14386 EOF
14387 cat >> confdefs.h <<\EOF
14388 #define HAVE_DLD_INIT 1
14389 EOF
14390 }
14391
14392 else
14393   echo "$ac_t""no" 1>&6
14394 fi
14395
14396
14397 fi
14398
14399
14400     fi
14401   fi 
14402   if test -n "$have_dl"; then
14403         
14404 dll_ld=
14405 dll_ldflags=
14406 dll_cflags=
14407 dll_post=
14408 dll_ldo="-o"
14409 ld_dynamic_link_flags=
14410 xehost=$canonical
14411 xealias=$internal_configuration
14412
14413 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14414 echo "configure:14415: checking how to build dynamic libraries for ${xehost}" >&5
14415 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14416 case "$xehost" in
14417 *-*-linux-gnu*) ;;
14418 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14419 esac
14420
14421 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14422 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14423 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14424
14425 case "$xehost_os" in
14426 aix3*)
14427   # AIX sometimes has problems with the GCC collect2 program.  For some
14428   # reason, if we set the COLLECT_NAMES environment variable, the problems
14429   # vanish in a puff of smoke.
14430   if test "${COLLECT_NAMES+set}" != set; then
14431     COLLECT_NAMES=
14432     export COLLECT_NAMES
14433   fi
14434   ;;
14435 esac
14436
14437 # Now see if the compiler is really GCC.
14438 if test "$GCC" = "yes"; then
14439   XEGCC=yes
14440 else
14441   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14442 echo "configure:14443: checking checking whether we are using GNU C" >&5
14443   cat > conftest.$ac_ext <<EOF
14444 #line 14445 "configure"
14445 #include "confdefs.h"
14446
14447 #ifdef __GNUC__
14448   yes;
14449 #endif
14450
14451 EOF
14452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14453   egrep "yes" >/dev/null 2>&1; then
14454   rm -rf conftest*
14455   XEGCC=yes
14456 else
14457   rm -rf conftest*
14458   XEGCC=no
14459 fi
14460 rm -f conftest*
14461
14462   echo "$ac_t""${XEGCC}" 1>&6
14463 fi
14464
14465 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14466 echo "configure:14467: checking how to produce PIC code" >&5
14467 wl=
14468
14469 can_build_shared=yes
14470 if test "$XEGCC" = yes; then
14471   wl='-Wl,'
14472
14473   case "$xehost_os" in
14474   aix[3-9]* | irix[5-9]* | osf[3-9])
14475     # PIC is the default for these OSes.
14476     ;;
14477
14478   os2*)
14479     # We can build DLLs from non-PIC.
14480     ;;
14481   amigaos*)
14482     # FIXME: we need at least 68020 code to build shared libraries, but
14483     # adding the `-m68020' flag to GCC prevents building anything better,
14484     # like `-m68040'.
14485     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14486     ;;
14487   *cygwin* | *mingw* )
14488     # PIC is the default
14489     ;;
14490   *)
14491     dll_cflags='-fPIC'
14492     ;;
14493   esac
14494 else
14495   # PORTME Check for PIC flags for the system compiler.
14496   case "$xehost_os" in
14497   hpux9* | hpux1[0-9]*)
14498     # Is there a better link_static_flag that works with the bundled CC?
14499     wl='-Wl,'
14500     dll_cflags='+Z'
14501     ;;
14502
14503   irix[5-9]*)
14504     wl='-Wl,'
14505     # PIC (with -KPIC) is the default.
14506     ;;
14507
14508   os2*)
14509     # We can build DLLs from non-PIC.
14510     ;;
14511
14512   osf[3-9]*)
14513     # All OSF/1 code is PIC.
14514     wl='-Wl,'
14515     ;;
14516
14517   aix[3-9]*)
14518     # All AIX code is PIC.
14519     wl='-Wl,'
14520     ;;
14521
14522   sco3.2v5*)
14523     dll_cflags='-belf -Kpic'
14524     wl='-Wl,'
14525     ;;
14526
14527   unixware*)
14528     dll_cflags="-KPIC"
14529     wl="-Wl,"
14530     ;;
14531
14532   sysv4*)
14533     dll_cflags="-KPIC"
14534     wl="-Wl,"
14535     ;;
14536
14537   sysv5*)
14538     dll_cflags="-KPIC"
14539     wl="-Wl,"
14540     ;;
14541
14542   solaris2*)
14543     dll_cflags='-KPIC'
14544     wl='-Wl,'
14545     ;;
14546
14547   sunos4*)
14548     dll_cflags='-PIC'
14549     wl='-Qoption ld '
14550     ;;
14551
14552   uts4*)
14553     dll_cflags='-pic'
14554     ;;
14555
14556   *)
14557     can_build_shared=no
14558     ;;
14559   esac
14560 fi
14561
14562 if test -n "$dll_cflags"; then
14563   echo "$ac_t""${dll_cflags}" 1>&6
14564
14565   # Check to make sure the dll_cflags actually works.
14566   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14567 echo "configure:14568: checking if PIC flag ${dll_cflags} really works" >&5
14568   save_CFLAGS="$CFLAGS"
14569   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14570   cat > conftest.$ac_ext <<EOF
14571 #line 14572 "configure"
14572 #include "confdefs.h"
14573
14574 int main() {
14575 int x=0;
14576 ; return 0; }
14577 EOF
14578 if { (eval echo configure:14579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14579   rm -rf conftest*
14580   
14581     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14582     # reports no error.  So, we need to grep stderr for (Bundled).
14583     if grep '(Bundled)' config.log >/dev/null; then
14584       echo "$ac_t""no" 1>&6
14585       can_build_shared=no
14586       dll_cflags=
14587     else
14588       echo "$ac_t""yes" 1>&6
14589     fi
14590 else
14591   echo "configure: failed program was:" >&5
14592   cat conftest.$ac_ext >&5
14593   rm -rf conftest*
14594   echo "$ac_t""no" 1>&6
14595     can_build_shared=no
14596     dll_cflags=
14597 fi
14598 rm -f conftest*
14599   CFLAGS="$save_CFLAGS"
14600 else
14601   echo "$ac_t""none" 1>&6
14602 fi
14603
14604 if test "$can_build_shared" = "yes"; then
14605 cc_produces_so=no
14606 xldf=
14607 xcldf=
14608 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14609 echo "configure:14610: checking if C compiler can produce shared libraries" >&5
14610 if test "$XEGCC" = yes; then
14611   xcldf="-shared"
14612   xldf="-shared"
14613 else # Not using GCC
14614   case "$xehost_os" in
14615     aix[3-9]*)
14616       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14617       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14618       ;;
14619
14620     freebsd2* | netbsd* | openbsd*)
14621       xldf="-Bshareable"
14622       xcldf="${wl}-Bshareable"
14623       ;;
14624
14625     freebsd3*)
14626       xcldf="-shared"
14627       ;;
14628
14629     hpux*)
14630       xldf="-b +s"
14631       xcldf="${wl}-b ${wl}+s"
14632       ;;
14633
14634     irix[5-9]* | osf[3-9]*)
14635       xcldf="${wl}-shared"
14636       xldf="-shared"
14637       ;;
14638
14639     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14640       xcldf="-G"
14641       xldf="-G"
14642       ;;
14643
14644     sunos4*)
14645       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14646       xldf="-assert pure-text -Bstatic"
14647       ;;
14648   esac
14649 fi # End if if we are using gcc
14650
14651 if test -n "$xcldf"; then
14652   save_LDFLAGS=$LDFLAGS
14653   save_LIBS=$LIBS
14654   save_xe_libs=$xe_libs
14655   LDFLAGS="$xcldf $LDFLAGS"
14656   LIBS=
14657   xe_libs=
14658   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14659   cat > conftest.$ac_ext <<EOF
14660 #line 14661 "configure"
14661 #include "confdefs.h"
14662
14663 int main() {
14664 int x=0;
14665 ; return 0; }
14666 EOF
14667 if { (eval echo configure:14668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14668   rm -rf conftest*
14669   cc_produces_so=yes
14670 else
14671   echo "configure: failed program was:" >&5
14672   cat conftest.$ac_ext >&5
14673   rm -rf conftest*
14674   cc_produces_so=no
14675 fi
14676 rm -f conftest*
14677   LDFLAGS=$save_LDFLAGS
14678   LIBS=$save_LIBS
14679   xe_libs=$save_xe_libs
14680   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14681 else
14682   cc_produces_so=no
14683 fi
14684 echo "$ac_t""${cc_produces_so}" 1>&6
14685
14686 LTLD=$LD
14687 if test -z "$LTLD"; then
14688   ac_prog=ld
14689   if test "$XEGCC" = yes; then
14690     # Check if gcc -print-prog-name=ld gives a path.
14691     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14692 echo "configure:14693: checking for ld used by GCC" >&5
14693     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14694     case "$ac_prog" in
14695     # Accept absolute paths.
14696     /*)
14697       if test -z "$LTLD"; then
14698 #        case "$ac_prog" in
14699 #          *gcc-lib*) LTLD="$CC"
14700 #                     ;;
14701 #          *)
14702          LTLD="$ac_prog"
14703 #                     ;;
14704 #        esac
14705       fi
14706       ;;
14707     "")
14708       # If it fails, then pretend we aren't using GCC.
14709       ac_prog=ld
14710       ;;
14711     *)
14712       # If it is relative, then search for the first ld in PATH.
14713       with_gnu_ld=unknown
14714       ;;
14715     esac
14716   else
14717     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14718 echo "configure:14719: checking for GNU ld" >&5
14719   fi
14720
14721   if test -z "$LTLD"; then
14722     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14723     for ac_dir in $PATH; do
14724       test -z "$ac_dir" && ac_dir=.
14725       if test -f "$ac_dir/$ac_prog"; then
14726         LTLD="$ac_dir/$ac_prog"
14727         # Check to see if the program is GNU ld.  I'd rather use --version,
14728         # but apparently some GNU ld's only accept -v.
14729         # Break only if it was the GNU/non-GNU ld that we prefer.
14730         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14731           xe_gnu_ld=yes
14732         else
14733           xe_gnu_ld=no
14734         fi
14735       fi
14736     done
14737     IFS="$ac_save_ifs"
14738   fi
14739
14740   if test -n "$LTLD"; then
14741     echo "$ac_t""${LTLD}" 1>&6
14742   else
14743     echo "$ac_t""no" 1>&6
14744   fi
14745
14746   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14747     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14748     exit 1
14749   fi
14750 fi
14751
14752 ld_dynamic_link_flags=
14753
14754 # Check to see if it really is or isn't GNU ld.
14755 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14756 echo "configure:14757: checking if the linker is GNU ld" >&5
14757 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14758 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14759   xe_gnu_ld=yes
14760 else
14761   xe_gnu_ld=no
14762 fi
14763 echo "$ac_t""${xe_gnu_ld}" 1>&6
14764
14765 case "$xehost_os" in
14766   amigaos* | sunos4*)
14767     # On these operating systems, we should treat GNU ld like the system ld.
14768     gnu_ld_acts_native=yes
14769     ;;
14770   *)
14771     gnu_ld_acts_native=no
14772     ;;
14773 esac
14774
14775 if test "$cc_produces_so" = "yes"; then
14776   dll_ld=$CC
14777   dll_ldflags=$xcldf
14778   can_build_shared=yes
14779   ld_shlibs=yes
14780 else
14781   # OK - only NOW do we futz about with ld.
14782   # See if the linker supports building shared libraries.
14783   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14784 echo "configure:14785: checking whether the linker supports shared libraries" >&5
14785   dll_ld=$CC
14786   dll_ldflags=$LDFLAGS
14787   ld_shlibs=yes
14788   can_build_shared=yes
14789   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14790     # See if GNU ld supports shared libraries.
14791     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14792       dll_ld=$CC
14793       dll_ldflags="-shared"
14794       ld_shlibs=yes
14795     else
14796       ld_shlibs=no
14797     fi
14798   else
14799     # PORTME fill in a description of your system's linker (not GNU ld)
14800     case "$xehost_os" in
14801     aix3*)
14802       dll_ld=$LTLD
14803       dll_ldflags=$xldf
14804       ;;
14805
14806     aix[4-9]*)
14807       dll_ldflags=$xcldf
14808       ;;
14809
14810     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14811     # support.  Future versions do this automatically, but an explicit c++rt0.o
14812     # doesn't break anything, and helps significantly (at the cost of a little
14813     # extra space).
14814     freebsd2.2*)
14815       dll_ld=$LTLD
14816       dll_ldflags=$xldf
14817       dll_post="/usr/lib/c++rt0.o"
14818       ;;
14819
14820     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14821     freebsd2*)
14822       dll_ld=$LTLD
14823       dll_ldflags="-Bshareable"
14824       ;;
14825
14826     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14827     freebsd3*)
14828       dll_ldflags="-shared"
14829       ;;
14830
14831     hpux*)
14832       dll_ld=$LTLD
14833       dll_ldflags=$xldf
14834       ;;
14835
14836     irix[5-9]*)
14837       dll_ld=$LTLD
14838       dll_ldflags=$xldf
14839       ;;
14840
14841     netbsd*)
14842       # Tested with NetBSD 1.2 ld
14843       dll_ld=$LTLD
14844       dll_ldflags=$xldf
14845       ;;
14846
14847     openbsd*)
14848       dll_ld=$LTLD
14849       dll_ldflags=$xldf
14850       ;;
14851
14852     osf3* | osf4*)
14853       dll_ld=$LTLD
14854       dll_ldflags=$xldf
14855       ;;
14856
14857     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14858     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14859       dll_ld=$LTLD
14860       case "$dll_ld" in
14861         *gcc*) dll_ldflags="-shared"
14862                dll_ld=$CC
14863                ;;
14864         *)     dll_ldflags="-G"
14865                ;;
14866       esac
14867       ;;
14868
14869     sunos4*)
14870       if test "$XEGCC" = yes; then
14871         dll_ld=$CC
14872       else
14873         dll_ld=$LTLD
14874       fi
14875       dll_ldflags=$xldf
14876       ;;
14877
14878     uts4*)
14879       dll_ld=$LTLD
14880       dll_ldflags="-G"
14881       ;;
14882
14883     bsdi*)
14884       dll_ldflags="-r"
14885       dll_ld="shlicc2"
14886       ;;
14887
14888     *)
14889       ld_shlibs=no
14890       can_build_shared=no
14891       ;;
14892     esac
14893   fi
14894   echo "$ac_t""${ld_shlibs}" 1>&6
14895   if test "$ld_shlibs" = "no"; then
14896     can_build_shared=no
14897   fi
14898 fi # End of if cc_produces_so = no
14899
14900
14901 if test "$xe_gnu_ld" = yes; then
14902   if test "$ld_shlibs" = yes; then
14903     ld_dynamic_link_flags="${wl}-export-dynamic"
14904   fi
14905 fi
14906
14907 if test -z "$ld_dynamic_link_flags"; then
14908   case "$xehost_os" in
14909   aix[3-9]*)
14910     ld_dynamic_link_flags=
14911     ;;
14912
14913   freebsd2.2*)
14914     ld_dynamic_link_flags=
14915     ;;
14916
14917   freebsd2*)
14918     ld_dynamic_link_flags=
14919     ;;
14920
14921   freebsd3*)
14922     ld_dynamic_link_flags=
14923     ;;
14924
14925   hpux*)
14926     ld_dynamic_link_flags="${wl}-E"
14927     ;;
14928
14929   irix[5-9]*)
14930     ld_dynamic_link_flags=
14931     ;;
14932
14933   netbsd*)
14934     ld_dynamic_link_flags=
14935     ;;
14936
14937   openbsd*)
14938     ld_dynamic_link_flags=
14939     ;;
14940
14941   osf3* | osf4*)
14942     ld_dynamic_link_flags=
14943     ;;
14944
14945   solaris2* | solaris7*)
14946     ld_dynamic_link_flags=
14947     ;;
14948
14949   sco3.2v5* | unixware* | sysv5* | sysv4*)
14950     ld_dynamic_link_flags="${wl}-Bexport"
14951     ;;
14952
14953   sunos4*)
14954     ld_dynamic_link_flags=
14955     ;;
14956
14957   uts4*)
14958     ld_dynamic_link_flags=
14959     ;;
14960
14961   bsdi*)
14962     ld_dynamic_link_flags=
14963     ;;
14964
14965   esac
14966 fi # End of if -z ld_dynamic_link_flags
14967 fi # End of if test "$can_build_shared" = "yes"
14968
14969
14970
14971
14972
14973
14974
14975
14976   fi
14977
14978   if test "$can_build_shared" = "yes"; then
14979     { test "$extra_verbose" = "yes" && cat << \EOF
14980     Defining HAVE_SHLIB
14981 EOF
14982 cat >> confdefs.h <<\EOF
14983 #define HAVE_SHLIB 1
14984 EOF
14985 }
14986
14987     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14988    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14989  fi
14990     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14991     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14992     for ac_func in dlerror _dlerror
14993 do
14994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14995 echo "configure:14996: checking for $ac_func" >&5
14996
14997 cat > conftest.$ac_ext <<EOF
14998 #line 14999 "configure"
14999 #include "confdefs.h"
15000 /* System header to define __stub macros and hopefully few prototypes,
15001     which can conflict with char $ac_func(); below.  */
15002 #include <assert.h>
15003 /* Override any gcc2 internal prototype to avoid an error.  */
15004 /* We use char because int might match the return type of a gcc2
15005     builtin and then its argument prototype would still apply.  */
15006 char $ac_func();
15007
15008 int main() {
15009
15010 /* The GNU C library defines this for functions which it implements
15011     to always fail with ENOSYS.  Some functions are actually named
15012     something starting with __ and the normal name is an alias.  */
15013 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15014 choke me
15015 #else
15016 $ac_func();
15017 #endif
15018
15019 ; return 0; }
15020 EOF
15021 if { (eval echo configure:15022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15022   rm -rf conftest*
15023   eval "ac_cv_func_$ac_func=yes"
15024 else
15025   echo "configure: failed program was:" >&5
15026   cat conftest.$ac_ext >&5
15027   rm -rf conftest*
15028   eval "ac_cv_func_$ac_func=no"
15029 fi
15030 rm -f conftest*
15031
15032 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15033   echo "$ac_t""yes" 1>&6
15034     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15035   { test "$extra_verbose" = "yes" && cat << EOF
15036     Defining $ac_tr_func
15037 EOF
15038 cat >> confdefs.h <<EOF
15039 #define $ac_tr_func 1
15040 EOF
15041 }
15042  
15043 else
15044   echo "$ac_t""no" 1>&6
15045 fi
15046 done
15047
15048     with_modules=yes
15049   else
15050     if test "$with_modules" = "yes"; then
15051       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15052     else
15053       echo "configure: warning: "Module support cannot be provided."" 1>&2
15054     fi
15055     with_modules=no
15056   fi
15057 fi
15058
15059 cat > conftest.$ac_ext <<EOF
15060 #line 15061 "configure"
15061 #include "confdefs.h"
15062 int main(int c,char *v[]){return 0;}
15063 EOF
15064 if { (eval echo configure:15065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15065 then
15066   :
15067 else
15068   conftest_rc="$?"
15069   echo "configure: failed program was:" >&5
15070   cat conftest.$ac_ext >&5
15071   rm -fr conftest*
15072   
15073   echo ""
15074   echo "*** PANIC *** The C compiler can no longer build working executables."
15075   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15076   echo "*** PANIC *** The most likely reason for this problem is that configure"
15077   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15078   echo "*** PANIC *** found at run time."
15079   echo "*** PANIC ***"
15080   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15081   echo "*** PANIC *** On other systems, try telling configure where to find the"
15082   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15083   echo "*** PANIC ***"
15084   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15085   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15086   echo "*** PANIC *** on your system.  Don't do that."
15087   exit 1
15088 fi
15089 rm -fr conftest*
15090
15091 if test "$win32_processes" = "yes"; then
15092   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15093    echo "    xemacs will be linked with \"process-nt.o\""
15094  fi
15095 else
15096   { test "$extra_verbose" = "yes" && cat << \EOF
15097     Defining HAVE_UNIX_PROCESSES
15098 EOF
15099 cat >> confdefs.h <<\EOF
15100 #define HAVE_UNIX_PROCESSES 1
15101 EOF
15102 }
15103
15104   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15105    echo "    xemacs will be linked with \"process-unix.o\""
15106  fi
15107 fi
15108
15109
15110
15111 T=""
15112 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15113 CFLAGS="$T"
15114
15115
15116 T=""
15117 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15118 extra_objs="$T"
15119
15120
15121 T=""
15122 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
15123 c_switch_general="$T"
15124
15125
15126 T=""
15127 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
15128 c_switch_window_system="$T"
15129
15130
15131 T=""
15132 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15133 c_switch_all="$T"
15134
15135
15136 T=""
15137 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
15138 ld_switch_general="$T"
15139
15140
15141 T=""
15142 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15143 ld_switch_window_system="$T"
15144
15145
15146 T=""
15147 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15148 ld_switch_all="$T"
15149
15150
15151 T=""
15152 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15153 ld_libs_general="$T"
15154
15155
15156 T=""
15157 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
15158 ld_libs_window_system="$T"
15159
15160
15161 T=""
15162 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15163 ld_libs_all="$T"
15164
15165
15166
15167 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15168 internal_makefile_list="Makefile.in"
15169 SUBDIR_MAKEFILES=''
15170 test -d lock || mkdir lock
15171 for dir in $MAKE_SUBDIR; do
15172   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15173         test -d "$d" || mkdir "$d"; cd "$d"
15174       done ) ;;
15175    * ) test -d "$dir" || mkdir "$dir" ;;
15176   esac
15177   
15178 T=""
15179 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15180 SUBDIR_MAKEFILES="$T"
15181
15182   
15183 T=""
15184 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15185 internal_makefile_list="$T"
15186
15187 done
15188
15189
15190
15191
15192 for dir in src/s src/m; do
15193   if test ! -d "$dir" ; then
15194     echo Making symbolic link to "$srcdir/$dir"
15195     ${LN_S} "$srcdir/$dir" "$dir"
15196   fi
15197 done
15198
15199 if test "$extra_verbose" = "yes"; then
15200   echo ""
15201   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
15202   echo ""
15203 fi
15204
15205
15206 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15207   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15208   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15209 fi
15210
15211 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15212   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15213   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15214 fi
15215
15216 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15217   test "$extra_verbose" = "yes" && echo "creating TAGS"
15218   echo "\f
15219 $srcdir/TAGS,include" > "TAGS"
15220 fi
15221
15222 if test "$__SUNPRO_C" = "yes"; then
15223   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15224   ( echo "# For use with Sun WorkShop's Source browser."
15225     echo "# See sbquery(1) and sbinit(4) for more information"
15226     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15227   ) > .sbinit
15228 fi
15229
15230 rm -f core
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251 PREFIX=$prefix
15252 while true; do
15253   case "$PREFIX" in
15254     *\$* ) eval "PREFIX=$PREFIX" ;;
15255     *) break ;;
15256   esac
15257 done
15258
15259
15260
15261
15262 EXEC_PREFIX=$exec_prefix
15263 while true; do
15264   case "$EXEC_PREFIX" in
15265     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15266     *) break ;;
15267   esac
15268 done
15269
15270
15271
15272
15273 INFODIR=$infodir
15274 while true; do
15275   case "$INFODIR" in
15276     *\$* ) eval "INFODIR=$INFODIR" ;;
15277     *) break ;;
15278   esac
15279 done
15280
15281
15282
15283
15284 INFOPATH=$infopath
15285 while true; do
15286   case "$INFOPATH" in
15287     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15288     *) break ;;
15289   esac
15290 done
15291
15292
15293
15294
15295 PACKAGE_PATH=$package_path
15296 while true; do
15297   case "$PACKAGE_PATH" in
15298     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15299     *) break ;;
15300   esac
15301 done
15302
15303
15304
15305
15306 LISPDIR=$lispdir
15307 while true; do
15308   case "$LISPDIR" in
15309     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15310     *) break ;;
15311   esac
15312 done
15313
15314
15315
15316
15317 MODULEDIR=$moduledir
15318 while true; do
15319   case "$MODULEDIR" in
15320     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15321     *) break ;;
15322   esac
15323 done
15324
15325
15326
15327
15328 SITELISPDIR=$sitelispdir
15329 while true; do
15330   case "$SITELISPDIR" in
15331     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15332     *) break ;;
15333   esac
15334 done
15335
15336
15337
15338
15339 SITEMODULEDIR=$sitemoduledir
15340 while true; do
15341   case "$SITEMODULEDIR" in
15342     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15343     *) break ;;
15344   esac
15345 done
15346
15347
15348
15349
15350 ETCDIR=$etcdir
15351 while true; do
15352   case "$ETCDIR" in
15353     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15354     *) break ;;
15355   esac
15356 done
15357
15358
15359
15360
15361 DOCDIR=$docdir
15362 while true; do
15363   case "$DOCDIR" in
15364     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15365     *) break ;;
15366   esac
15367 done
15368
15369
15370
15371
15372 ARCHLIBDIR=$archlibdir
15373 while true; do
15374   case "$ARCHLIBDIR" in
15375     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15376     *) break ;;
15377   esac
15378 done
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15400
15401
15402
15403
15404
15405
15406
15407 : ${XEMACS_CC:=$CC}
15408
15409
15410 if test "$with_prefix" = "yes"; then
15411   { test "$extra_verbose" = "yes" && cat << \EOF
15412     Defining PREFIX_USER_DEFINED
15413 EOF
15414 cat >> confdefs.h <<\EOF
15415 #define PREFIX_USER_DEFINED 1
15416 EOF
15417 }
15418
15419 fi
15420
15421 if test "$with_site_lisp" = "no"; then
15422   { test "$extra_verbose" = "yes" && cat << \EOF
15423     Defining INHIBIT_SITE_LISP
15424 EOF
15425 cat >> confdefs.h <<\EOF
15426 #define INHIBIT_SITE_LISP 1
15427 EOF
15428 }
15429
15430 fi
15431 if test "$with_site_modules" = "no"; then
15432   { test "$extra_verbose" = "yes" && cat << \EOF
15433     Defining INHIBIT_SITE_MODULES
15434 EOF
15435 cat >> confdefs.h <<\EOF
15436 #define INHIBIT_SITE_MODULES 1
15437 EOF
15438 }
15439
15440 fi
15441
15442
15443 T=""
15444 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15445 ac_configure_args="$T"
15446
15447 { test "$extra_verbose" = "yes" && cat << EOF
15448     Defining EMACS_CONFIGURATION = "$configuration"
15449 EOF
15450 cat >> confdefs.h <<EOF
15451 #define EMACS_CONFIGURATION "$configuration"
15452 EOF
15453 }
15454
15455 { test "$extra_verbose" = "yes" && cat << EOF
15456     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15457 EOF
15458 cat >> confdefs.h <<EOF
15459 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15460 EOF
15461 }
15462
15463
15464
15465 null_string=""
15466 { test "$extra_verbose" = "yes" && cat << EOF
15467     Defining LD_SWITCH_X_SITE = $null_string
15468 EOF
15469 cat >> confdefs.h <<EOF
15470 #define LD_SWITCH_X_SITE $null_string
15471 EOF
15472 }
15473
15474 { test "$extra_verbose" = "yes" && cat << EOF
15475     Defining LD_SWITCH_X_SITE_AUX = $null_string
15476 EOF
15477 cat >> confdefs.h <<EOF
15478 #define LD_SWITCH_X_SITE_AUX $null_string
15479 EOF
15480 }
15481
15482 { test "$extra_verbose" = "yes" && cat << EOF
15483     Defining C_SWITCH_X_SITE = $null_string
15484 EOF
15485 cat >> confdefs.h <<EOF
15486 #define C_SWITCH_X_SITE $null_string
15487 EOF
15488 }
15489
15490 { test "$extra_verbose" = "yes" && cat << EOF
15491     Defining LD_SWITCH_SITE = $null_string
15492 EOF
15493 cat >> confdefs.h <<EOF
15494 #define LD_SWITCH_SITE $null_string
15495 EOF
15496 }
15497
15498 { test "$extra_verbose" = "yes" && cat << EOF
15499     Defining C_SWITCH_SITE = $null_string
15500 EOF
15501 cat >> confdefs.h <<EOF
15502 #define C_SWITCH_SITE $null_string
15503 EOF
15504 }
15505
15506
15507
15508 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15509     Defining GNU_MALLOC
15510 EOF
15511 cat >> confdefs.h <<\EOF
15512 #define GNU_MALLOC 1
15513 EOF
15514 }
15515
15516 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15517     Defining USE_SYSTEM_MALLOC
15518 EOF
15519 cat >> confdefs.h <<\EOF
15520 #define USE_SYSTEM_MALLOC 1
15521 EOF
15522 }
15523
15524 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15525     Defining USE_DEBUG_MALLOC
15526 EOF
15527 cat >> confdefs.h <<\EOF
15528 #define USE_DEBUG_MALLOC 1
15529 EOF
15530 }
15531
15532                                               { test "$extra_verbose" = "yes" && cat << \EOF
15533     Defining USE_SYSTEM_MALLOC
15534 EOF
15535 cat >> confdefs.h <<\EOF
15536 #define USE_SYSTEM_MALLOC 1
15537 EOF
15538 }
15539
15540 fi
15541 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15542     Defining I18N3
15543 EOF
15544 cat >> confdefs.h <<\EOF
15545 #define I18N3 1
15546 EOF
15547 }
15548
15549 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15550     Defining USE_GCC
15551 EOF
15552 cat >> confdefs.h <<\EOF
15553 #define USE_GCC 1
15554 EOF
15555 }
15556
15557 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15558     Defining EXTERNAL_WIDGET
15559 EOF
15560 cat >> confdefs.h <<\EOF
15561 #define EXTERNAL_WIDGET 1
15562 EOF
15563 }
15564
15565 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15566     Defining QUICK_BUILD
15567 EOF
15568 cat >> confdefs.h <<\EOF
15569 #define QUICK_BUILD 1
15570 EOF
15571 }
15572
15573 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15574     Defining PURIFY
15575 EOF
15576 cat >> confdefs.h <<\EOF
15577 #define PURIFY 1
15578 EOF
15579 }
15580
15581 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15582     Defining QUANTIFY
15583 EOF
15584 cat >> confdefs.h <<\EOF
15585 #define QUANTIFY 1
15586 EOF
15587 }
15588
15589 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15590     Defining MAIL_USE_POP
15591 EOF
15592 cat >> confdefs.h <<\EOF
15593 #define MAIL_USE_POP 1
15594 EOF
15595 }
15596
15597 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15598     Defining KERBEROS
15599 EOF
15600 cat >> confdefs.h <<\EOF
15601 #define KERBEROS 1
15602 EOF
15603 }
15604
15605 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15606     Defining HESIOD
15607 EOF
15608 cat >> confdefs.h <<\EOF
15609 #define HESIOD 1
15610 EOF
15611 }
15612
15613 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15614     Defining USE_UNION_TYPE
15615 EOF
15616 cat >> confdefs.h <<\EOF
15617 #define USE_UNION_TYPE 1
15618 EOF
15619 }
15620
15621 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15622     Defining PDUMP
15623 EOF
15624 cat >> confdefs.h <<\EOF
15625 #define PDUMP 1
15626 EOF
15627 }
15628
15629 test "$with_ipv6_cname"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15630     Defining IPV6_CANONICALIZE
15631 EOF
15632 cat >> confdefs.h <<\EOF
15633 #define IPV6_CANONICALIZE 1
15634 EOF
15635 }
15636
15637
15638
15639 (
15640 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15641 else
15642   echo "uname -a: `uname -a`"
15643 fi
15644 echo ""
15645 echo "$0 $quoted_arguments"
15646 ) > Installation
15647
15648 if test ! -z ${emacs_beta_version} ; then
15649   if test -z "${emacs_is_beta}" ; then
15650         xemacs_betaname=".${emacs_beta_version}"
15651   else
15652         xemacs_betaname="-b${emacs_beta_version}"
15653   fi
15654 else
15655   xemacs_betaname=""
15656 fi
15657
15658 (
15659 echo "
15660
15661 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15662 "
15663 echo "
15664 Compilation / Installation:"
15665 echo "  Source code location:              $srcdir"
15666 echo "  Installation prefix:               $prefix"
15667 if test -n "$site_includes"; then
15668   echo "  Additional header files:           $site_includes"
15669 fi
15670 if test -n "$site_libraries"; then
15671   echo "  Additional libraries:              $site_libraries"
15672 fi
15673 if test -n "$site_prefixes"; then
15674   echo "  Additional prefixes:               $site_prefixes"
15675 fi
15676 if test -n "$runpath"; then
15677   echo "  Runtime library search path:       $runpath"
15678 fi
15679
15680 if test -n "$opsysfile"
15681 then echo "  Operating system description file: \`$opsysfile'"
15682 else echo "  Not using any operating system description file"
15683 fi
15684 if test -n "$machfile"
15685 then echo "  Machine description file:          \`$machfile'"
15686 else echo "  Not using any machine description file"
15687 fi
15688
15689 echo "  Compiler:                          $CC $CFLAGS"
15690 echo "  Relocating allocator for buffers:  $rel_alloc"
15691 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15692 case "$ld_switch_site" in
15693   *nocombreloc*) echo "  Linking with \`-z nocombreloc'.
15694     - Consider configuring with --pdump." ;;
15695 esac
15696
15697 echo "
15698 Window System:"
15699 if test "$with_msw" = "yes"; then
15700   echo "  Compiling in support for the Microsoft window system."
15701 fi
15702 if test "$with_x11" = "yes"; then
15703   echo "  Compiling in support for the X window system:"
15704   echo "    - X Windows headers location:                 $x_includes"
15705   echo "    - X Windows libraries location:               $x_libraries"
15706   if test "$with_xauth" != yes; then
15707     echo "    - Xau (X authority) not available."
15708   fi
15709   if test "$with_xmu" != yes; then
15710     echo "    - Xmu library not available; substituting equivalent routines."
15711   fi
15712   if test "$with_wmcommand" != no; then
15713     echo "    - Handling WM_COMMAND properly."
15714   fi
15715 fi
15716 if test "$need_athena" = "yes"; then
15717   echo "  Compiling in support for the Athena widget set:"
15718   echo "    - Athena headers location:                    $athena_h_path"
15719   echo "    - Athena library to link:                     $athena_lib"
15720 fi
15721 case "$with_menubars" in
15722   gtk   ) echo "  Using GTK menubars."   ;;
15723   lucid ) echo "  Using Lucid menubars." ;;
15724   motif ) echo "  Using Motif menubars."
15725           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15726           echo "             We recommend using the Lucid menubar instead."
15727           echo "             Re-run configure with --with-menubars='lucid'." ;;
15728     msw ) echo "  Using MS-Windows menubars." ;;
15729 esac
15730 case "$with_scrollbars" in
15731   gtk    ) echo "  Using GTK scrollbars."        ;;
15732   lucid  ) echo "  Using Lucid scrollbars."      ;;
15733   motif  ) echo "  Using Motif scrollbars."      ;;
15734   athena ) echo "  Using Athena scrollbars."     ;;
15735      msw ) echo "  Using MS-Windows scrollbars." ;;
15736 esac
15737 case "$with_dialogs" in
15738   gtk    ) echo "  Using GTK dialog boxes." ;;
15739   motif  ) echo "  Using Motif dialog boxes."
15740            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15741              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15742              echo "             We recommend using the Athena dialog boxes instead."
15743              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15744              echo "             Read the PROBLEMS file for more information."
15745            fi; fi ;;
15746   athena ) echo "  Using Athena dialog boxes."     ;;
15747      msw ) echo "  Using MS-Windows dialog boxes." ;;
15748 esac
15749 case "$with_widgets" in
15750   gtk    ) echo "  Using GTK native widgets."        ;;
15751   motif  ) echo "  Using Motif native widgets."      ;;
15752   athena ) echo "  Using Athena native widgets."     ;;
15753      msw ) echo "  Using MS-Windows native widgets." ;;
15754 esac
15755 if test "$with_dragndrop" = yes; then
15756   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15757   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15758 fi
15759
15760 echo "
15761 TTY:"
15762 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15763 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15764
15765 echo "
15766 Images:"
15767 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15768 if test "$with_xpm" = yes; then
15769   echo "  Compiling in support for XPM  images."
15770 elif test "$with_x11" = yes; then
15771   echo "  WARNING: -----------------------------------------------------------"
15772   echo "  WARNING: Compiling without XPM image support."
15773   if test "$xpm_problem" != ""; then
15774     echo "  Reason: $xpm_problem"
15775   fi
15776   echo "  WARNING: You should strongly consider installing XPM."
15777   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15778   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15779   echo "  WARNING: -----------------------------------------------------------"
15780 fi
15781 if test "$with_png" = yes; then
15782   echo "  Compiling in support for PNG  images."
15783 elif test "$window_system" != "none"; then
15784   echo "  WARNING: -----------------------------------------------------------"
15785   echo "  WARNING: Compiling without PNG image support."
15786   if test "$png_problem" != ""; then
15787     echo "  Reason: $png_problem"
15788   fi
15789   echo "  WARNING: You should strongly consider installing the PNG libraries."
15790   echo "  WARNING: Otherwise certain images and glyphs may not display."
15791   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15792   echo "  WARNING: -----------------------------------------------------------"
15793 fi
15794 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15795 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15796 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15797
15798 echo "
15799 Sound:"
15800 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15801 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15802 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15803 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15804
15805 echo "
15806 Databases:"
15807 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15808 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15809 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15810 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15811 if test "$with_postgresql" = yes; then
15812   echo "  Compiling in support for PostgreSQL."
15813   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15814   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15815 fi
15816
15817 echo "
15818 Internationalization:"
15819 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15820 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15821 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15822 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15823 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15824 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15825 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15826 if test "$with_wnn" = yes; then
15827   echo "  Compiling in support for the WNN input method on Mule."
15828   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15829 fi
15830 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15831
15832 echo "
15833 Mail:"
15834 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15835 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15836 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15837 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15838
15839 echo "
15840 Other Features:"
15841 test "$with_ipv6_cname" = no && echo "  Inhibiting IPv6 canonicalization at startup."
15842 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15843 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15844 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15845 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15846 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15847 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15848 test "$pdump" = yes && echo "  Using the new portable dumper."
15849 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15850 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15851 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15852   != "no no no no no no"; then
15853   echo "  WARNING: ---------------------------------------------------------"
15854   echo "  WARNING: Compiling in support for runtime error checking."
15855   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15856   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15857   echo "  WARNING: ---------------------------------------------------------"
15858 fi
15859 echo ""
15860 ) | tee -a Installation
15861 echo ""
15862
15863
15864 # Remove any trailing slashes in these variables.
15865 test -n "$prefix" &&
15866   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15867 test -n "$exec_prefix" &&
15868   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15869
15870
15871 for file in $internal_makefile_list; do
15872   test "$file" = src/Makefile.in && \
15873     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15874   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15875 done
15876 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15877 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
15878
15879 trap '' 1 2 15
15880
15881 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15882
15883 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15884 # Let make expand exec_prefix.
15885 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15886
15887 # Any assignment to VPATH causes Sun make to only execute
15888 # the first set of double-colon rules, so remove it if not needed.
15889 # If there is a colon in the path, we need to keep it.
15890 if test "x$srcdir" = x.; then
15891   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15892 fi
15893
15894 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15895
15896 DEFS=-DHAVE_CONFIG_H
15897
15898 # Without the "./", some shells look in PATH for config.status.
15899 : ${CONFIG_STATUS=./config.status}
15900
15901 echo creating $CONFIG_STATUS
15902 rm -f $CONFIG_STATUS
15903 cat > $CONFIG_STATUS <<EOF
15904 #! /bin/sh
15905 # Generated automatically by configure.
15906 # Run this file to recreate the current configuration.
15907 # This directory was configured as follows,
15908 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15909 #
15910 # $0 $ac_configure_args
15911 #
15912 # Compiler output produced by configure, useful for debugging
15913 # configure, is in ./config.log if it exists.
15914
15915 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15916 for ac_option
15917 do
15918   case "\$ac_option" in
15919   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15920     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15921     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15922   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15923     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15924     exit 0 ;;
15925   -help | --help | --hel | --he | --h)
15926     echo "\$ac_cs_usage"; exit 0 ;;
15927   *) echo "\$ac_cs_usage"; exit 1 ;;
15928   esac
15929 done
15930
15931 ac_given_srcdir=$srcdir
15932 ac_given_INSTALL="$INSTALL"
15933
15934 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15935 EOF
15936 cat >> $CONFIG_STATUS <<EOF
15937
15938 # Protect against being on the right side of a sed subst in config.status.
15939 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15940  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15941 $ac_vpsub
15942 $extrasub
15943 s%@SHELL@%$SHELL%g
15944 s%@CFLAGS@%$CFLAGS%g
15945 s%@CPPFLAGS@%$CPPFLAGS%g
15946 s%@CXXFLAGS@%$CXXFLAGS%g
15947 s%@FFLAGS@%$FFLAGS%g
15948 s%@DEFS@%$DEFS%g
15949 s%@LDFLAGS@%$LDFLAGS%g
15950 s%@LIBS@%$LIBS%g
15951 s%@exec_prefix@%$exec_prefix%g
15952 s%@prefix@%$prefix%g
15953 s%@program_transform_name@%$program_transform_name%g
15954 s%@bindir@%$bindir%g
15955 s%@sbindir@%$sbindir%g
15956 s%@libexecdir@%$libexecdir%g
15957 s%@datadir@%$datadir%g
15958 s%@sysconfdir@%$sysconfdir%g
15959 s%@sharedstatedir@%$sharedstatedir%g
15960 s%@localstatedir@%$localstatedir%g
15961 s%@libdir@%$libdir%g
15962 s%@includedir@%$includedir%g
15963 s%@oldincludedir@%$oldincludedir%g
15964 s%@infodir@%$infodir%g
15965 s%@mandir@%$mandir%g
15966 s%@LN_S@%$LN_S%g
15967 s%@blddir@%$blddir%g
15968 s%@CC@%$CC%g
15969 s%@CPP@%$CPP%g
15970 s%@start_flags@%$start_flags%g
15971 s%@ld_switch_shared@%$ld_switch_shared%g
15972 s%@start_files@%$start_files%g
15973 s%@ld@%$ld%g
15974 s%@lib_gcc@%$lib_gcc%g
15975 s%@RANLIB@%$RANLIB%g
15976 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15977 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15978 s%@INSTALL_DATA@%$INSTALL_DATA%g
15979 s%@YACC@%$YACC%g
15980 s%@SET_MAKE@%$SET_MAKE%g
15981 s%@GTK_CONFIG@%$GTK_CONFIG%g
15982 s%@X_CFLAGS@%$X_CFLAGS%g
15983 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15984 s%@X_LIBS@%$X_LIBS%g
15985 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15986 s%@install_pp@%$install_pp%g
15987 s%@libs_xauth@%$libs_xauth%g
15988 s%@dnd_objs@%$dnd_objs%g
15989 s%@lwlib_objs@%$lwlib_objs%g
15990 s%@ALLOCA@%$ALLOCA%g
15991 s%@have_esd_config@%$have_esd_config%g
15992 s%@dll_ld@%$dll_ld%g
15993 s%@dll_cflags@%$dll_cflags%g
15994 s%@dll_ldflags@%$dll_ldflags%g
15995 s%@dll_post@%$dll_post%g
15996 s%@dll_ldo@%$dll_ldo%g
15997 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15998 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15999 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
16000 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
16001 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
16002 s%@PROGNAME@%$PROGNAME%g
16003 s%@version@%$version%g
16004 s%@configuration@%$configuration%g
16005 s%@canonical@%$canonical%g
16006 s%@inststaticdir@%$inststaticdir%g
16007 s%@instvardir@%$instvardir%g
16008 s%@srcdir@%$srcdir%g
16009 s%@pkgdir@%$pkgdir%g
16010 s%@statedir@%$statedir%g
16011 s%@extra_includes@%$extra_includes%g
16012 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
16013 s%@PREFIX@%$PREFIX%g
16014 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
16015 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
16016 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
16017 s%@INFODIR@%$INFODIR%g
16018 s%@infopath@%$infopath%g
16019 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
16020 s%@INFOPATH@%$INFOPATH%g
16021 s%@package_path@%$package_path%g
16022 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
16023 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
16024 s%@lispdir@%$lispdir%g
16025 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
16026 s%@LISPDIR@%$LISPDIR%g
16027 s%@moduledir@%$moduledir%g
16028 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16029 s%@MODULEDIR@%$MODULEDIR%g
16030 s%@sitelispdir@%$sitelispdir%g
16031 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16032 s%@SITELISPDIR@%$SITELISPDIR%g
16033 s%@sitemoduledir@%$sitemoduledir%g
16034 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16035 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16036 s%@etcdir@%$etcdir%g
16037 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16038 s%@ETCDIR@%$ETCDIR%g
16039 s%@docdir@%$docdir%g
16040 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16041 s%@DOCDIR@%$DOCDIR%g
16042 s%@archlibdir@%$archlibdir%g
16043 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16044 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16045 s%@bitmapdir@%$bitmapdir%g
16046 s%@extra_objs@%$extra_objs%g
16047 s%@machfile@%$machfile%g
16048 s%@opsysfile@%$opsysfile%g
16049 s%@c_switch_general@%$c_switch_general%g
16050 s%@c_switch_window_system@%$c_switch_window_system%g
16051 s%@c_switch_all@%$c_switch_all%g
16052 s%@ld_switch_general@%$ld_switch_general%g
16053 s%@ld_switch_window_system@%$ld_switch_window_system%g
16054 s%@ld_switch_all@%$ld_switch_all%g
16055 s%@ld_libs_general@%$ld_libs_general%g
16056 s%@ld_libs_window_system@%$ld_libs_window_system%g
16057 s%@ld_libs_all@%$ld_libs_all%g
16058 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16059 s%@native_sound_lib@%$native_sound_lib%g
16060 s%@sound_cflags@%$sound_cflags%g
16061 s%@dynodump_arch@%$dynodump_arch%g
16062 s%@XEMACS_CC@%$XEMACS_CC%g
16063 s%@internal_makefile_list@%$internal_makefile_list%g
16064
16065 CEOF
16066 EOF
16067
16068 cat >> $CONFIG_STATUS <<\EOF
16069
16070 # Split the substitutions into bite-sized pieces for seds with
16071 # small command number limits, like on Digital OSF/1 and HP-UX.
16072 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16073 ac_file=1 # Number of current file.
16074 ac_beg=1 # First line for current file.
16075 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16076 ac_more_lines=:
16077 ac_sed_cmds=""
16078 while $ac_more_lines; do
16079   if test $ac_beg -gt 1; then
16080     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16081   else
16082     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16083   fi
16084   if test ! -s conftest.s$ac_file; then
16085     ac_more_lines=false
16086     rm -f conftest.s$ac_file
16087   else
16088     if test -z "$ac_sed_cmds"; then
16089       ac_sed_cmds="sed -f conftest.s$ac_file"
16090     else
16091       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16092     fi
16093     ac_file=`expr $ac_file + 1`
16094     ac_beg=$ac_end
16095     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16096   fi
16097 done
16098 if test -z "$ac_sed_cmds"; then
16099   ac_sed_cmds=cat
16100 fi
16101 EOF
16102
16103 cat >> $CONFIG_STATUS <<EOF
16104
16105 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16106 EOF
16107 cat >> $CONFIG_STATUS <<\EOF
16108 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16109   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16110   case "$ac_file" in
16111   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16112        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16113   *) ac_file_in="${ac_file}.in" ;;
16114   esac
16115
16116   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16117
16118   # Remove last slash and all that follows it.  Not all systems have dirname.
16119   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16120   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16121     # The file is in a subdirectory.
16122     test ! -d "$ac_dir" && mkdir "$ac_dir"
16123     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16124     # A "../" for each directory in $ac_dir_suffix.
16125     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16126   else
16127     ac_dir_suffix= ac_dots=
16128   fi
16129
16130   case "$ac_given_srcdir" in
16131   .)  srcdir=.
16132       if test -z "$ac_dots"; then top_srcdir=.
16133       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16134   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16135   *) # Relative path.
16136     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16137     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16138   esac
16139
16140   case "$ac_given_INSTALL" in
16141   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16142   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16143   esac
16144
16145   echo creating "$ac_file"
16146   rm -f "$ac_file"
16147   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16148   case "$ac_file" in
16149   *Makefile*) ac_comsub="1i\\
16150 # $configure_input" ;;
16151   *) ac_comsub= ;;
16152   esac
16153
16154   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16155   sed -e "$ac_comsub
16156 s%@configure_input@%$configure_input%g
16157 s%@srcdir@%$srcdir%g
16158 s%@top_srcdir@%$top_srcdir%g
16159 s%@INSTALL@%$INSTALL%g
16160 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16161 fi; done
16162 rm -f conftest.s*
16163
16164 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16165 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16166 #
16167 # ac_d sets the value in "#define NAME VALUE" lines.
16168 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16169 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16170 ac_dC='\3'
16171 ac_dD='%g'
16172 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16173 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16174 ac_uB='\([      ]\)%\1#\2define\3'
16175 ac_uC=' '
16176 ac_uD='\4%g'
16177 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16178 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16179 ac_eB='$%\1#\2define\3'
16180 ac_eC=' '
16181 ac_eD='%g'
16182
16183 if test "${CONFIG_HEADERS+set}" != set; then
16184 EOF
16185 cat >> $CONFIG_STATUS <<EOF
16186   CONFIG_HEADERS="src/config.h lwlib/config.h"
16187 EOF
16188 cat >> $CONFIG_STATUS <<\EOF
16189 fi
16190 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16191   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16192   case "$ac_file" in
16193   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16194        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16195   *) ac_file_in="${ac_file}.in" ;;
16196   esac
16197
16198   echo creating $ac_file
16199
16200   rm -f conftest.frag conftest.in conftest.out
16201   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16202   cat $ac_file_inputs > conftest.in
16203
16204 EOF
16205
16206 # Transform confdefs.h into a sed script conftest.vals that substitutes
16207 # the proper values into config.h.in to produce config.h.  And first:
16208 # Protect against being on the right side of a sed subst in config.status.
16209 # Protect against being in an unquoted here document in config.status.
16210 rm -f conftest.vals
16211 cat > conftest.hdr <<\EOF
16212 s/[\\&%]/\\&/g
16213 s%[\\$`]%\\&%g
16214 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16215 s%ac_d%ac_u%gp
16216 s%ac_u%ac_e%gp
16217 EOF
16218 sed -n -f conftest.hdr confdefs.h > conftest.vals
16219 rm -f conftest.hdr
16220
16221 # This sed command replaces #undef with comments.  This is necessary, for
16222 # example, in the case of _POSIX_SOURCE, which is predefined and required
16223 # on some systems where configure will not decide to define it.
16224 cat >> conftest.vals <<\EOF
16225 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16226 EOF
16227
16228 # Break up conftest.vals because some shells have a limit on
16229 # the size of here documents, and old seds have small limits too.
16230
16231 rm -f conftest.tail
16232 while :
16233 do
16234   ac_lines=`grep -c . conftest.vals`
16235   # grep -c gives empty output for an empty file on some AIX systems.
16236   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16237   # Write a limited-size here document to conftest.frag.
16238   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16239   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16240   echo 'CEOF
16241   sed -f conftest.frag conftest.in > conftest.out
16242   rm -f conftest.in
16243   mv conftest.out conftest.in
16244 ' >> $CONFIG_STATUS
16245   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16246   rm -f conftest.vals
16247   mv conftest.tail conftest.vals
16248 done
16249 rm -f conftest.vals
16250
16251 cat >> $CONFIG_STATUS <<\EOF
16252   rm -f conftest.frag conftest.h
16253   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16254   cat conftest.in >> conftest.h
16255   rm -f conftest.in
16256   if cmp -s $ac_file conftest.h 2>/dev/null; then
16257     echo "$ac_file is unchanged"
16258     rm -f conftest.h
16259   else
16260     # Remove last slash and all that follows it.  Not all systems have dirname.
16261       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16262       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16263       # The file is in a subdirectory.
16264       test ! -d "$ac_dir" && mkdir "$ac_dir"
16265     fi
16266     rm -f $ac_file
16267     mv conftest.h $ac_file
16268   fi
16269 fi; done
16270
16271 EOF
16272 cat >> $CONFIG_STATUS <<EOF
16273 CPP="$CPP"
16274  top_srcdir="$srcdir"
16275  MAKE_SUBDIR="$MAKE_SUBDIR"
16276
16277 EOF
16278 cat >> $CONFIG_STATUS <<\EOF
16279 for dir in . $MAKE_SUBDIR; do
16280   (
16281     cd $dir
16282     rm -f junk.c
16283     < Makefile.in \
16284       sed -e '/^# Generated/d' \
16285           -e 's%/\*\*/#.*%%' \
16286           -e 's/^ *# */#/' \
16287           -e '/^##/d' \
16288           -e '/^#/ {
16289 p
16290 d
16291 }'        \
16292           -e '/./ {
16293 s/\([\"]\)/\\\1/g
16294 s/^/"/
16295 s/$/"/
16296 }'  > junk.c;
16297
16298
16299
16300     echo creating $dir/Makefile
16301 $CPP -I. -I${top_srcdir}/src  junk.c \
16302   | sed -e 's/^\#.*//'          \
16303         -e 's/^[        ][      ]*$//'\
16304         -e 's/^ /       /'              \
16305         -e '/^[ \f]*$/d' \
16306         -e '/^\"/ {
16307         s/\\\([\"]\)/\1/g
16308         s/^[    ]*\"//
16309         s/\"[   ]*$//
16310 }' > Makefile.new
16311     chmod 444 Makefile.new
16312     mv -f Makefile.new Makefile
16313
16314     echo creating $dir/GNUmakefile
16315 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16316   | sed -e 's/^\#.*//'          \
16317         -e 's/^[        ][      ]*$//'\
16318         -e 's/^ /       /'              \
16319         -e '/^[ \f]*$/d' \
16320         -e '/^\"/ {
16321         s/\\\([\"]\)/\1/g
16322         s/^[    ]*\"//
16323         s/\"[   ]*$//
16324 }' > Makefile.new
16325     chmod 444 Makefile.new
16326     mv -f Makefile.new GNUmakefile
16327
16328     rm -f junk.c
16329   )
16330 done
16331
16332 sed < config.status >> lib-src/config.values \
16333   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16334   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16335   -e 's/^\([^ ]*\) $/\1 ""/' \
16336   -e 's/ 1$/ t/'
16337
16338
16339 exit 0
16340 EOF
16341 chmod +x $CONFIG_STATUS
16342 rm -fr confdefs* $ac_clean_files
16343 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1