78896c020ad0cf67f23ad4d942847a9678e7fb90
[chise/xemacs-chise.git-] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 2000, 2001 Martin Buchholz.
11 #### Copyright (C) 1998, 1999 J. Kean Johnston.
12
13 ### Don't edit this script!
14 ### This script was automatically generated by the `autoconf' program
15 ### from the file `./configure.in'.
16 ### To rebuild it, execute the command
17 ###     autoconf
18 ### in the this directory.  You must have autoconf version 2.13 or later.
19
20 ### This file is part of XEmacs.
21
22 ### XEmacs is free software; you can redistribute it and/or modify it
23 ### under the terms of the GNU General Public License as published by
24 ### the Free Software Foundation; either version 2, or (at your
25 ### option) any later version.
26
27 ### XEmacs is distributed in the hope that it will be useful, but
28 ### WITHOUT ANY WARRANTY; without even the implied warranty of
29 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
30 ### General Public License for more details.
31
32 ### You should have received a copy of the GNU General Public License
33 ### along with XEmacs; see the file COPYING.  If not, write to the Free
34 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
35 ### 02111-1307, USA.
36
37 ### For usage, run `./configure --help'
38 ### For more detailed information on building and installing XEmacs,
39 ### read the file `INSTALL'.
40 ###
41 ### If configure succeeds, it leaves its status in config.status.
42 ### A log of configuration tests can be found in config.log.
43 ### If configure fails after disturbing the status quo,
44 ###     config.status is removed.
45
46 ac_help="$ac_help
47   --with-x                use the X Window System"
48
49
50
51 if test -n "$ZSH_VERSION"; then
52     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
53   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
54   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
55   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
56       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
57 elif test -n "$BASH_VERSION"; then
58     set -o posix
59   unset CDPATH
60 else
61   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
62 fi
63
64 exec_prefix=NONE
65 host=NONE
66 no_create=
67 nonopt=NONE
68 no_recursion=
69 prefix=NONE
70 program_prefix=NONE
71 program_suffix=NONE
72 program_transform_name=s,x,x,
73 silent=
74 site=
75 srcdir=
76 target=NONE
77 verbose=
78 x_includes=NONE
79 x_libraries=NONE
80
81 subdirs=
82 MFLAGS= MAKEFLAGS=
83 SHELL=${CONFIG_SHELL-/bin/sh}
84 ac_max_here_lines=12
85
86 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
87
88 # File descriptor usage:
89 # 0 standard input
90 # 1 file creation
91 # 2 errors and warnings
92 # 3 some systems may open it to /dev/tty
93 # 4 used on the Kubota Titan
94 # 6 checking for... messages and results
95 # 5 compiler messages saved in config.log
96 if test "$silent" = yes; then
97   exec 6>/dev/null
98 else
99   exec 6>&1
100 fi
101 exec 5>./config.log
102
103 echo "\
104 This file contains any messages produced by compilers while
105 running configure, to aid debugging if configure makes a mistake.
106 " 1>&5
107
108 # Strip out --no-create and --no-recursion so they do not pile up.
109 # Also quote any args containing shell metacharacters.
110 ac_configure_args=
111 for ac_arg
112 do
113   case "$ac_arg" in
114   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
115   | --no-cr | --no-c) ;;
116   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
117   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
118   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
119   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
120   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
121   esac
122 done
123
124 # NLS nuisances.
125 # Only set these to C if already set.  These must not be set unconditionally
126 # because not all systems understand e.g. LANG=C (notably SCO).
127 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
128 # Non-C LC_CTYPE values break the ctype check.
129 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
130 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
131 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
132 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
133
134 # confdefs.h avoids OS command line length limits that DEFS can exceed.
135 rm -rf conftest* confdefs.h
136 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
137 echo > confdefs.h
138
139 # A filename unique to this package, relative to the directory that
140 # configure is in, which we can look for to find out if srcdir is correct.
141 ac_unique_file=src/lisp.h
142
143 # Find the source files, if location was not specified.
144 if test -z "$srcdir"; then
145   ac_srcdir_defaulted=yes
146   # Try the directory containing this script, then its parent.
147   ac_prog=$0
148   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
149   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
150   srcdir=$ac_confdir
151   if test ! -r $srcdir/$ac_unique_file; then
152     srcdir=..
153   fi
154 else
155   ac_srcdir_defaulted=no
156 fi
157 if test ! -r $srcdir/$ac_unique_file; then
158   if test "$ac_srcdir_defaulted" = yes; then
159     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
160   else
161     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
162   fi
163 fi
164 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
165
166 # Prefer explicitly selected file to automatically selected ones.
167 if test -z "$CONFIG_SITE"; then
168   if test "x$prefix" != xNONE; then
169     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
170   else
171     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
172   fi
173 fi
174 for ac_site_file in $CONFIG_SITE; do
175   if test -r "$ac_site_file"; then
176     echo "loading site script $ac_site_file"
177     . "$ac_site_file"
178   fi
179 done
180
181
182 ac_ext=c
183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
185 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $libs_gtk $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
186 ac_cpp='$CPP '"$xe_cppflags"
187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
189 cross_compiling=no
190
191 ac_exeext=
192 ac_objext=o
193 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
194   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
195   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
196     ac_n= ac_c='
197 ' ac_t='        '
198   else
199     ac_n=-n ac_c= ac_t=
200   fi
201 else
202   ac_n= ac_c='\c' ac_t=
203 fi
204
205
206 progname="`echo $0 | sed 's:^\./\./:\./:'`"
207
208
209 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
210 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
211
212 prefix='/usr/local'
213 exec_prefix='${prefix}'
214 bindir='${exec_prefix}/bin'
215 datadir='${prefix}/lib'
216 statedir='${prefix}/lib'
217 libdir='${exec_prefix}/lib'
218 mandir='${prefix}/man/man1'
219 inststaticdir='${PROGNAME}'
220 instvardir='${PROGNAME}-${version}'
221 infodir='${datadir}/${instvardir}/info'
222 infopath=''
223 install_pp=''
224 lispdir='${datadir}/${instvardir}/lisp'
225 moduledir='${datadir}/${instvardir}/${configuration}/modules'
226 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
227 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
228 pkgdir='${datadir}/${instvardir}/lisp'
229 package_path=''
230 etcdir='${datadir}/${instvardir}/etc'
231 archlibdir='${datadir}/${instvardir}/${configuration}'
232 docdir='${archlibdir}'
233 with_netinstall="no"
234 with_prefix='yes'
235 with_site_lisp='no'
236 with_site_modules='yes'
237 with_menubars=''
238 with_scrollbars=''
239 with_widgets=''
240 with_dialogs=''
241 with_file_coding=''
242 cpp='' cppflags='' libs='' ldflags=''
243 extra_includes=''
244 dynamic=''
245 with_x11=''
246 with_msw=''
247 rel_alloc='default'
248 with_system_malloc='default'
249 with_dlmalloc='default'
250 native_sound_lib=''
251 with_gtk='no'
252 with_gnome='no'
253 use_assertions="yes"
254 with_toolbars=""
255 with_tty=""
256 use_union_type="no"
257 with_dnet=""
258 pdump="no"
259 with_dragndrop="no"
260
261
262
263
264 arguments="$@"
265
266 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
267 quoted_arguments=
268 for i in "$@"; do
269    case "$i" in
270    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
271    | --no-cr | --no-c) ;;
272    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
273    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
274    *)
275    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
276    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
277    esac
278 done
279
280 while test $# != 0; do
281   arg="$1"; shift
282   case "$arg" in
283     --no-create|--no-recursion) ;;
284         -* )
285             case "$arg" in
286         -*=*)
287           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
288           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
289           valomitted=no
290         ;;
291                                                                           -*)
292                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
293           val="yes" valomitted=yes
294         ;;
295       esac
296
297             optname="$opt"
298       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
299
300             case "${valomitted}-${opt}" in yes-without_* )
301         opt=`echo $opt | sed 's/without/with/'`
302         valomitted="no" val="no" ;;
303       esac
304
305             case "$opt" in
306
307         with_site_lisp  | \
308         with_prefix     | \
309         with_site_modules | \
310         with_x          | \
311         with_x11        | \
312         with_gtk        | \
313         with_gnome      | \
314         with_msw        | \
315         with_gcc        | \
316         dynamic         | \
317         with_ncurses    | \
318         with_dnet       | \
319         with_socks      | \
320         with_dragndrop  | \
321         with_cde        | \
322         with_offix      | \
323         with_gpm        | \
324         with_xpm        | \
325         with_xface      | \
326         with_gif        | \
327         with_jpeg       | \
328         with_png        | \
329         with_tiff       | \
330         with_wmcommand  | \
331         with_xmu        | \
332         with_purify     | \
333         with_quantify   | \
334         with_toolbars   | \
335         with_tty        | \
336         with_xfs        | \
337         with_i18n3      | \
338         with_mule       | \
339         with_utf_2000   | \
340         with_text_coding| \
341         with_file_coding| \
342         with_canna      | \
343         with_wnn        | \
344         with_wnn6       | \
345         with_workshop   | \
346         with_sparcworks | \
347         with_tooltalk   | \
348         with_ldap       | \
349         with_postgresql | \
350         with_pop        | \
351         with_kerberos   | \
352         with_hesiod     | \
353         with_dnet       | \
354         with_infodock   | \
355         with_netinstall   | \
356         external_widget | \
357         verbose         | \
358         extra_verbose   | \
359         usage_tracking  | \
360         use_union_type  | \
361         pdump           | \
362         debug           | \
363         use_assertions  | \
364         memory_usage_stats | \
365         with_clash_detection | \
366         with_modules | \
367         quick_build )
368                   case "$val" in
369             y | ye | yes )      val=yes ;;
370             n | no )            val=no  ;;
371             * ) (echo "$progname: Usage error:"
372 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
373 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
374           esac
375           eval "$opt=\"$val\"" ;;
376
377
378                         srcdir          | \
379         compiler        | \
380         cflags          | \
381         cpp             | \
382         cppflags        | \
383         libs            | \
384         ldflags         | \
385         cache_file      | \
386         native_sound_lib| \
387         site_lisp       | \
388         x_includes      | \
389         x_libraries     | \
390         site_includes   | \
391         site_libraries  | \
392         site_prefixes   | \
393         site_runtime_libraries )
394                   if test "$valomitted" = "yes" ; then
395                     if test "$#" = 0 ; then
396               (echo "$progname: Usage error:"
397 echo " " "The \`--$optname' option requires a value."
398 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
399             fi
400             val="$1"; shift
401           fi
402           eval "$opt=\"$val\""
403         ;;
404
405                 rel_alloc | \
406         with_dlmalloc | \
407         with_debug_malloc  | use_debug_malloc | \
408         with_system_malloc | use_system_malloc )
409           case "$val" in
410             y | ye | yes )      val=yes ;;
411             n | no )            val=no  ;;
412             d | de | def | defa | defau | defaul | default ) val=default ;;
413             * ) (echo "$progname: Usage error:"
414 echo " " "The \`--$optname' option requires one of these values:
415   \`yes', \`no', or \`default'."
416 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
417           esac
418           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
419           eval "$opt=\"$val\""
420         ;;
421
422                 "with_database" )
423           with_database_berkdb=no
424           with_database_dbm=no
425           with_database_gdbm=no
426           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
427             case "$x" in
428               no ) ;;
429               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
430               d | db | dbm )                               with_database_dbm=yes    ;;
431               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
432               * ) (echo "$progname: Usage error:"
433 echo " " "The \`--$optname' option value
434   must be either \`no' or a comma-separated list
435   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
436 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
437             esac
438           done
439           if test "$with_database_dbm"  = "yes" -a \
440                   "$with_database_gdbm" = "yes"; then
441           (echo "$progname: Usage error:"
442 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
443   with the \`--$optname' option."
444 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
445           fi
446         ;;
447
448                 "with_sound" )
449                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
450             case "$x" in
451                       n | no | non | none ) new_sdefault=no ;;
452               a | al | all | both ) new_sdefault=yes ;;
453
454               native )       with_native_sound=yes ;;
455               nonative )     with_native_sound=no ;;
456
457               nas )          with_nas_sound=yes ;;
458               nonas )        with_nas_sound=no ;;
459
460               esd )          with_esd_sound=yes ;;
461               noesd )        with_esd_sound=no ;;
462
463               * ) bogus_sound=yes ;;
464             esac
465             if test "$bogus_sound" -o \
466                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
467                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
468                 (echo "$progname: Usage error:"
469 echo " " "Valid types for the \`--$optname' option are:
470   $types.
471 The default is to autodetect all sound support."
472 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
473             elif test -n "$new_sdefault" ; then
474                 with_native_sound=$new_sdefault
475                 with_nas_sound=$new_sdefault
476                 with_esd_sound=$new_sdefault
477                 new_sdefault=   # reset this
478             fi
479             sound_notfirst=true
480           done
481         ;;
482
483                         "with_athena" )
484           case "$val" in
485             xa | xaw )                    val=xaw    ;;
486             3 | 3d | xaw3d )              val=3d     ;;
487                         ne | nex | next | naxtaw)     val=next   ;;
488                         9 | 95 | xaw95 )              val=95     ;;
489             xp | xpm | xawxpm )           val=xpm    ;;
490             * ) (echo "$progname: Usage error:"
491 echo " " "The \`--$optname' option must have one of these values:
492   \`xaw', \`3d', \`next', \`95', or \`xpm'."
493 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
494           esac
495           eval "$opt=\"$val\""
496         ;;
497
498                 "with_xim" )
499           case "$val" in
500             y | ye | yes )                val=yes   ;;
501             n | no | non | none )         val=no    ;;
502             x | xl | xli | xlib )         val=xlib  ;;
503             m | mo | mot | moti | motif ) val=motif ;;
504             * ) (echo "$progname: Usage error:"
505 echo " " "The \`--$optname' option must have one of these values:
506   \`motif', \`xlib', \`yes', or \`no'."
507 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
508           esac
509           eval "$opt=\"$val\""
510         ;;
511
512                 "mail_locking" )
513           case "$val" in
514             lockf )     val=lockf ;;
515             flock )     val=flock ;;
516             file | dot ) val=file  ;;
517             locking )   val=locking  ;;
518             * ) (echo "$progname: Usage error:"
519 echo " " "The \`--$optname' option must have one of these values:
520   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
521 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
522           esac
523           eval "$opt=\"$val\""
524         ;;
525
526                 "error_checking" )
527                           
528           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
529             case "$x" in
530                       n | no | non | none ) new_default=no ;;
531               a | al | all )        new_default=yes ;;
532
533               extents )       error_check_extents=yes ;;
534               noextents )     error_check_extents=no ;;
535
536               typecheck )     error_check_typecheck=yes ;;
537               notypecheck )   error_check_typecheck=no ;;
538
539               bufpos )        error_check_bufpos=yes ;;
540               nobufpos )      error_check_bufpos=no ;;
541
542               gc )            error_check_gc=yes ;;
543               nogc )          error_check_gc=no ;;
544
545               malloc )        error_check_malloc=yes ;;
546               nomalloc )      error_check_malloc=no ;;
547
548               byte_code )     error_check_byte_code=yes ;;
549               nobyte_code )   error_check_byte_code=no ;;
550
551               glyphs )     error_check_glyphs=yes ;;
552               noglyphs )   error_check_glyphs=no ;;
553
554               * ) bogus_error_check=yes ;;
555             esac
556             if test "$bogus_error_check" -o \
557                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
558                 if test "$error_check_default" = yes ; then
559                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
560                 else
561                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
562                 fi
563                 (echo "$progname: Usage error:"
564 echo " " "Valid types for the \`--$optname' option are:
565   $types."
566 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
567             elif test -n "$new_default" ; then
568                 error_check_extents=$new_default
569                 error_check_typecheck=$new_default
570                 error_check_bufpos=$new_default
571                 error_check_gc=$new_default
572                 error_check_malloc=$new_default
573                 error_check_byte_code=$new_default
574                 error_check_glyphs=$new_default
575                 new_default=    # reset this
576             fi
577             echeck_notfirst=true
578           done
579         ;;
580
581                                 
582                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
583         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
584         archlibdir | docdir | package_path )
585                    if test "$valomitted" = "yes"; then
586              if test "$#" = 0; then
587                  (echo "$progname: Usage error:"
588 echo " " "The \`--$optname' option requires a value."
589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
590              fi
591              val="$1"; shift
592            fi
593            eval "$opt=\"$val\""
594
595                            case "$opt" in
596                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining EXEC_PREFIX_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define EXEC_PREFIX_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining LISPDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define LISPDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining SITELISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define SITELISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining MODULEDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define MODULEDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining ETCDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define ETCDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining INFODIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define INFODIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFOPATH_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFOPATH_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining PACKAGE_PATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define PACKAGE_PATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              datadir )
661                 { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining INFODIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define INFODIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining LISPDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define LISPDIR_USER_DEFINED 1
674 EOF
675 }
676
677                 { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining MODULEDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define MODULEDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining ETCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define ETCDIR_USER_DEFINED 1
690 EOF
691 }
692
693                 { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining DOCDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define DOCDIR_USER_DEFINED 1
698 EOF
699 }
700
701                 { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining ARCHLIBDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define ARCHLIBDIR_USER_DEFINED 1
706 EOF
707 }
708  ;;
709              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining DOCDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define DOCDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
718     Defining ARCHLIBDIR_USER_DEFINED
719 EOF
720 cat >> confdefs.h <<\EOF
721 #define ARCHLIBDIR_USER_DEFINED 1
722 EOF
723 }
724  ;;
725            esac
726         ;;
727
728                 "no_create" ) ;;
729
730                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
731
732                 "with_menubars"   | \
733         "with_scrollbars" | \
734         "with_dialogs"    | \
735         "with_widgets" )
736           case "$val" in
737             l | lu | luc | luci | lucid )               val=lucid  ;;
738             m | mo | mot | moti | motif )               val=motif  ;;
739             a | at | ath | athe | athen | athena )      val=athena ;;
740             n | no | non | none )                       val=no     ;;
741             y | ye | yes )                              val=yes    ;;
742             g | gt | gtk )                              val=gtk    ;;
743             m | ms | msw )                              val=msw    ;;
744             * ) (echo "$progname: Usage error:"
745 echo " " "The \`--$optname' option must have one of these values:
746   \`gtk\', \`lucid', \`motif', \`athena', \`yes', or \`no'."
747 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
748           esac
749           eval "$opt=\"$val\""
750         ;;
751
752                 "use_minimal_tagbits" | \
753         "use_indexed_lrecord_implementation" | \
754         "run_in_place"  | \
755         "const_is_losing" | \
756         "with_gnu_make" )
757           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
758         ;;
759
760                 * ) (echo "$progname: Usage error:"
761 echo " " "Unrecognized option: $arg"
762 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
763
764       esac
765     ;;
766
767         *-*-*) configuration="$arg" ;;
768
769         *) (echo "$progname: Usage error:"
770 echo " " "Unrecognized argument: $arg"
771 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
772
773   esac
774 done
775
776
777 test -n "$cpp"      && CPP="$cpp"
778 test -n "$cppflags" && CPPFLAGS="$cppflags"
779 test -n "$libs"     && LIBS="$libs"
780 test -n "$ldflags"  && LDFLAGS="$ldflags"
781
782 eval set x "$quoted_arguments"; shift
783
784 test "$extra_verbose" = "yes" && verbose=yes
785
786 test -n "$with_x" && with_x11="$with_x"
787
788 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
789   test "$with_system_malloc" = "default" && with_system_malloc=yes
790 fi
791
792
793
794 if test "$with_cde $with_tooltalk" = "yes no"; then
795   (echo "$progname: Usage error:"
796 echo " " "--with-cde requires --with-tooltalk"
797 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
798 elif test "$with_tooltalk" = "no" ; then with_cde=no
799 elif test "$with_cde" = "yes"; then with_tooltalk=yes
800 fi
801
802
803 case "$srcdir" in
804
805     "" )
806     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
807       if test -f "$dir/src/lisp.h" -a \
808               -f "$dir/lisp/version.el" ; then
809         srcdir="$dir"
810         break
811       fi
812     done
813     if test -z "$srcdir" ; then
814       (echo "$progname: Usage error:"
815 echo " " "Neither the current directory nor its parent seem to
816   contain the XEmacs sources.  If you do not want to build XEmacs in its
817   source tree, you should run \`$progname' in the directory in which
818   you wish to build XEmacs, using the \`--srcdir' option to say where the
819   sources may be found."
820 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
821     fi
822   ;;
823
824     * )
825     if test ! -f "$srcdir/src/lisp.h" -o \
826             ! -f "$srcdir/lisp/version.el" ; then
827       (echo "$progname: Usage error:"
828 echo " " "The directory specified with the \`--srcdir' option,
829   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
830   either run the \`$progname' script at the top of the XEmacs source
831   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833     fi
834   ;;
835 esac
836
837 if test -z "$configuration"; then
838     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
839   if test -z "$configuration"; then
840     (echo "$progname: Usage error:"
841 echo " " "XEmacs has not been ported to this host type.
842 Try explicitly specifying the CONFIGURATION when rerunning configure."
843 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
844   fi
845 fi
846
847 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
848 echo "configure:849: checking whether ln -s works" >&5
849
850 rm -f conftestdata
851 if ln -s X conftestdata 2>/dev/null
852 then
853   rm -f conftestdata
854   ac_cv_prog_LN_S="ln -s"
855 else
856   ac_cv_prog_LN_S=ln
857 fi
858 LN_S="$ac_cv_prog_LN_S"
859 if test "$ac_cv_prog_LN_S" = "ln -s"; then
860   echo "$ac_t""yes" 1>&6
861 else
862   echo "$ac_t""no" 1>&6
863 fi
864
865
866 for dir in lisp etc man info tests; do
867   if test ! -d "$dir" ; then
868     echo Making symbolic link to "$srcdir/$dir"
869     ${LN_S} "$srcdir/$dir" "$dir"
870   fi
871 done
872
873
874 absolute_pwd="`pwd`";
875 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
876 then blddir="$PWD"
877 else blddir="$absolute_pwd"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   blddir=`echo "$blddir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi
882 fi
883
884
885 case "$srcdir" in
886   /* ) ;;
887   .  ) srcdir="$blddir" ;;
888   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
889   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
890   srcdir=`echo "$srcdir" | \
891    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
892 fi ;;
893 esac
894
895 if test `pwd` != `sh -c cd $srcdir && pwd`  \
896    && test -f "$srcdir/src/config.h"; then
897   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
898    echo "   as a build directory right now; it has been configured in its own"
899    echo "   right.  To configure in another directory as well, you MUST"
900    echo "   use GNU make.  If you do not have GNU make, then you must"
901    echo "   now do \`make distclean' in $srcdir,"
902    echo "   and then run $progname again.") >&2
903   extrasub='/^VPATH[     ]*=/c\
904 vpath %.c $(srcdir)\
905 vpath %.h $(srcdir)\
906 vpath %.y $(srcdir)\
907 vpath %.l $(srcdir)\
908 vpath %.s $(srcdir)\
909 vpath %.in $(srcdir)'
910 fi
911
912 . "$srcdir/version.sh" || exit 1;
913 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
914 : "${extra_verbose=$beta}"
915 version="${emacs_major_version}.${emacs_minor_version}"
916 { test "$extra_verbose" = "yes" && cat << EOF
917     Defining EMACS_MAJOR_VERSION = $emacs_major_version
918 EOF
919 cat >> confdefs.h <<EOF
920 #define EMACS_MAJOR_VERSION $emacs_major_version
921 EOF
922 }
923
924 { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_MINOR_VERSION = $emacs_minor_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_MINOR_VERSION $emacs_minor_version
929 EOF
930 }
931
932 if test -n "$emacs_beta_version" ; then
933   if test "$beta" = "yes"; then
934         version="${version}-b${emacs_beta_version}"
935         { test "$extra_verbose" = "yes" && cat << EOF
936     Defining EMACS_BETA_VERSION = $emacs_beta_version
937 EOF
938 cat >> confdefs.h <<EOF
939 #define EMACS_BETA_VERSION $emacs_beta_version
940 EOF
941 }
942
943   else
944         version="${version}.${emacs_beta_version}"
945         { test "$extra_verbose" = "yes" && cat << EOF
946     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
947 EOF
948 cat >> confdefs.h <<EOF
949 #define EMACS_PATCH_LEVEL $emacs_beta_version
950 EOF
951 }
952
953   fi
954 fi
955 { test "$extra_verbose" = "yes" && cat << EOF
956     Defining XEMACS_CODENAME = "$xemacs_codename"
957 EOF
958 cat >> confdefs.h <<EOF
959 #define XEMACS_CODENAME "$xemacs_codename"
960 EOF
961 }
962
963 { test "$extra_verbose" = "yes" && cat << EOF
964     Defining EMACS_VERSION = "$version"
965 EOF
966 cat >> confdefs.h <<EOF
967 #define EMACS_VERSION "$version"
968 EOF
969 }
970
971
972 if test "$with_infodock" = "yes"; then
973   if test ! -f ../../ID-INSTALL; then
974     echo "Cannot build InfoDock without InfoDock sources"
975     with_infodock=no
976   fi
977 fi
978
979 if test "$with_infodock" = "yes"; then
980       { test "$extra_verbose" = "yes" && cat << EOF
981     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
982 EOF
983 cat >> confdefs.h <<EOF
984 #define INFODOCK_MAJOR_VERSION $infodock_major_version
985 EOF
986 }
987
988   { test "$extra_verbose" = "yes" && cat << EOF
989     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
990 EOF
991 cat >> confdefs.h <<EOF
992 #define INFODOCK_MINOR_VERSION $infodock_minor_version
993 EOF
994 }
995
996   { test "$extra_verbose" = "yes" && cat << EOF
997     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
998 EOF
999 cat >> confdefs.h <<EOF
1000 #define INFODOCK_BUILD_VERSION $infodock_build_version
1001 EOF
1002 }
1003
1004   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1005   PROGNAME=infodock
1006   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1007 else
1008   PROGNAME=xemacs
1009 fi
1010
1011 { test "$extra_verbose" = "yes" && cat << EOF
1012     Defining EMACS_PROGNAME = "$PROGNAME"
1013 EOF
1014 cat >> confdefs.h <<EOF
1015 #define EMACS_PROGNAME "$PROGNAME"
1016 EOF
1017 }
1018
1019
1020 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1021 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1022     Defining ERROR_CHECK_EXTENTS
1023 EOF
1024 cat >> confdefs.h <<\EOF
1025 #define ERROR_CHECK_EXTENTS 1
1026 EOF
1027 }
1028
1029 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1030     Defining ERROR_CHECK_TYPECHECK
1031 EOF
1032 cat >> confdefs.h <<\EOF
1033 #define ERROR_CHECK_TYPECHECK 1
1034 EOF
1035 }
1036
1037 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1038     Defining ERROR_CHECK_BUFPOS
1039 EOF
1040 cat >> confdefs.h <<\EOF
1041 #define ERROR_CHECK_BUFPOS 1
1042 EOF
1043 }
1044
1045 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining ERROR_CHECK_GC
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define ERROR_CHECK_GC 1
1050 EOF
1051 }
1052
1053 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining ERROR_CHECK_MALLOC
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define ERROR_CHECK_MALLOC 1
1058 EOF
1059 }
1060
1061 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1062     Defining ERROR_CHECK_BYTE_CODE
1063 EOF
1064 cat >> confdefs.h <<\EOF
1065 #define ERROR_CHECK_BYTE_CODE 1
1066 EOF
1067 }
1068
1069 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1070     Defining ERROR_CHECK_GLYPHS
1071 EOF
1072 cat >> confdefs.h <<\EOF
1073 #define ERROR_CHECK_GLYPHS 1
1074 EOF
1075 }
1076
1077 if test "${debug:=$beta}" = "yes"; then
1078   use_assertions=yes memory_usage_stats=yes
1079   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1080    echo "    xemacs will be linked with \"debug.o\""
1081  fi
1082   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1083    echo "    xemacs will be linked with \"tests.o\""
1084  fi
1085   { test "$extra_verbose" = "yes" && cat << \EOF
1086     Defining DEBUG_XEMACS
1087 EOF
1088 cat >> confdefs.h <<\EOF
1089 #define DEBUG_XEMACS 1
1090 EOF
1091 }
1092
1093 fi
1094 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1095     Defining USE_ASSERTIONS
1096 EOF
1097 cat >> confdefs.h <<\EOF
1098 #define USE_ASSERTIONS 1
1099 EOF
1100 }
1101
1102 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1103     Defining MEMORY_USAGE_STATS
1104 EOF
1105 cat >> confdefs.h <<\EOF
1106 #define MEMORY_USAGE_STATS 1
1107 EOF
1108 }
1109
1110
1111
1112 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1113 echo "configure:1114: checking "host system type"" >&5
1114 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1115 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1116 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1117 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1118 echo "$ac_t""$configuration" 1>&6
1119
1120
1121
1122
1123
1124 machine='' opsys=''
1125
1126 case "$canonical" in
1127   sparc-*-*        ) machine=sparc ;;
1128   alpha*-*-*       ) machine=alpha ;;
1129   vax-*-*          ) machine=vax ;;
1130   mips-dec-*       ) machine=pmax ;;
1131   mips-sgi-irix6*  ) machine=iris6d ;;
1132   mips-sgi-*       ) machine=iris4d ;;
1133   mips*-linux      ) machine=mips ;;
1134   romp-ibm-*       ) machine=ibmrt ;;
1135   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1136   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1137   powerpc*-*       ) machine=powerpc ;;
1138   hppa-*-*         ) machine=hp800 ;;
1139   m88k-dg-*        ) machine=aviion ;;
1140   m68*-sony-*      ) machine=news ;;
1141   mips-sony-*      ) machine=news-risc ;;
1142   clipper-*        ) machine=clipper ;;
1143   arm*             ) machine=arm ;;
1144   ns32k-*          ) machine=ns32000 ;;
1145 esac
1146
1147 case "$canonical" in
1148   *-*-linux*    ) opsys=linux ;;
1149   *-*-netbsd*   ) opsys=netbsd ;;
1150   *-*-openbsd*  ) opsys=openbsd ;;
1151   *-*-nextstep* ) opsys=nextstep ;;
1152   *-*-vms       ) opsys=vms ;;
1153
1154     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1155   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1156   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1157   *-dec-osf3*                ) opsys=decosf3-1 ;;
1158   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1159
1160     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1161   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1162   *-*-ultrix* )         opsys=ultrix4-3 ;;
1163
1164     *-*-aix3.1*  ) opsys=aix3-1 ;;
1165   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1166   *-*-aix3*    ) opsys=aix3-2   ;;
1167   *-*-aix4.0*  ) opsys=aix4     ;;
1168   *-*-aix4.1*  ) opsys=aix4-1   ;;
1169   *-*-aix4*    ) opsys=aix4-2   ;;
1170
1171     *-gnu* )                    opsys=gnu    ;;
1172   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1173   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1174   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1175   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1176   *-*-aos*   )                  opsys=bsd4-3 ;;
1177   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1178   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1179   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1180   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1181   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1182   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1183         if test -z "$NON_GNU_CPP" ; then
1184           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1185             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1186           done
1187         fi
1188         opsys=usg5-4-2 ;;
1189     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1190     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1191 esac
1192
1193 case "$canonical" in
1194
1195     *-*-netbsd* )
1196     case "$canonical" in
1197       i[3-9]86-*-netbsd*) machine=intel386 ;;
1198       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1199                                             machine=hp9000s300 ;;
1200       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1201       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1202     esac
1203   ;;
1204
1205     *-*-openbsd* )
1206     case "${canonical}" in
1207       i386-*-openbsd*)          machine=intel386 ;;
1208       m68k-*-openbsd*)          machine=hp9000s300 ;;
1209       mipsel-*-openbsd*)        machine=pmax ;;
1210      esac
1211    ;;
1212
1213     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1214   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1215
1216     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1217   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1218
1219     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1220
1221     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1222
1223     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1224
1225     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1226
1227     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1228
1229     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1230   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1231   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1232
1233   
1234     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1235
1236     *-convex-bsd* | *-convex-convexos* )
1237     machine=convex opsys=bsd4-3
1238     NON_GNU_CPP="cc -E -P"
1239   ;;
1240
1241     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1242
1243     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1244   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1245   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1246   m88k-dg-dgux*                           ) opsys=dgux     ;;
1247
1248     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1249   m88k-motorola-sysv4* )
1250                     machine=delta88k opsys=usg5-4-2
1251   ;;
1252   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1253
1254     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1255   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1256
1257     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1258
1259     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1260   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1261   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1262
1263       m88k-harris-cxux* )
1264         case "`uname -r`" in
1265        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1266        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1267     esac
1268     NON_GNU_CPP="/lib/cpp"
1269   ;;
1270     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1271     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1272
1273     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1274
1275     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1276
1277     *-hp-hpux* )
1278         case "$canonical" in
1279       m68*  ) machine=hp9000s300 ;;
1280       hppa* ) machine=hp800      ;;
1281     esac
1282
1283     case "$canonical" in
1284       *-hp-hpux7*  )  opsys=hpux   ;;
1285       *-hp-hpux8*  )  opsys=hpux8  ;;
1286       *-hp-hpux9*  )  opsys=hpux9  ;;
1287       *-hp-hpux10* )  opsys=hpux10 ;;
1288       *-hp-hpux11* )  opsys=hpux11 ;;
1289       *            )  opsys=hpux   ;;
1290     esac
1291
1292         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1293    echo "    xemacs will be linked with \"strcat.o\""
1294  fi ;; esac
1295
1296     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1297         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1298     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1299
1300     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1301   ;;
1302
1303     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1304   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1305
1306     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1307   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1308   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1309   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1310   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1311   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1312
1313     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1314   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1315
1316     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1317
1318     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1319
1320     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1321
1322     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1323
1324       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1325
1326     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1327
1328     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1329
1330     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1331
1332     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1333
1334         mips-mips-usg* ) machine=mips4 ;;
1335   mips-mips-riscos4 )
1336     machine=mips4
1337     NON_GNU_CC="cc -systype bsd43"
1338     NON_GNU_CPP="cc -systype bsd43 -E"
1339     case "$canonical" in
1340       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1341       mips-mips-riscos5* ) opsys=riscos5 ;;
1342     esac
1343   ;;
1344   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1345   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1346
1347     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1348
1349     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1350
1351     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1352   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1353
1354     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1355
1356     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1357
1358     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1359
1360     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1361
1362     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1363   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1364
1365     mips-siemens-sysv* | mips-sni-sysv*)
1366     machine=mips-siemens opsys=usg5-4
1367     NON_GNU_CC=/usr/ccs/bin/cc
1368     NON_GNU_CPP=/usr/ccs/lib/cpp
1369   ;;
1370
1371     mips-nec-sysv*)
1372     machine=mips-nec
1373     NON_GNU_CC=/usr/ccs/bin/cc
1374     NON_GNU_CPP=/usr/ccs/lib/cpp
1375   ;;
1376
1377       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1378   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1379     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1380   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1381   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1382   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1383   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1384   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1385   mips-sgi-irix*      ) opsys=irix5-0 ;;
1386
1387     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1388   *-sony-news* ) opsys=newsos5 ;;
1389
1390     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1391
1392     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1393         case "$canonical" in
1394       m68*-sunos1* )             machine=sun1     ;;
1395       m68*-sunos2* )             machine=sun2     ;;
1396       m68* )                     machine=sun3     ;;
1397       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1398       i*86-*-* )                 machine=intel386 ;;
1399       rs6000* )                  machine=rs6000   ;;
1400     esac
1401
1402         case "$canonical" in *-sunos5*)
1403       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1404     esac
1405
1406                     case "$canonical" in
1407       *-sunos4* )
1408         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1409         : ;;
1410       *-solaris2* )
1411         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1412         RANLIB=':' ;;
1413     esac
1414
1415     case "$canonical" in
1416       *-solaris*          )
1417         opsys=sol2
1418         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1419         { test "$extra_verbose" = "yes" && cat << EOF
1420     Defining OS_RELEASE = $os_release
1421 EOF
1422 cat >> confdefs.h <<EOF
1423 #define OS_RELEASE $os_release
1424 EOF
1425 }
1426  ;;
1427
1428             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1429       *-sunos4.0*         ) opsys=sunos4-0      ;;
1430       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1431       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1432       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1433       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1434       *-mach*             ) opsys=mach-bsd4-3   ;;
1435       *                   ) opsys=bsd4-2        ;;
1436     esac
1437
1438     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1439
1440         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1441   ;;
1442
1443     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1444
1445     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1446   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1447
1448     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1449
1450     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1451
1452     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1453       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1454
1455     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1456
1457     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1458
1459     vax-dec-* )
1460     case "$canonical" in
1461       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1462       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1463       *-mach* )                         opsys=mach-bsd4-3 ;;
1464     esac
1465   ;;
1466
1467     ns16k-whitechapel-* ) machine=mg1 ;;
1468
1469     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1470
1471     i[3-9]86-*-* )
1472     machine=intel386
1473     case "$canonical" in
1474       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1475       *-isc2.2* )               opsys=isc2-2 ;;
1476       *-isc4.0* )               opsys=isc4-0 ;;
1477       *-isc4.* )                opsys=isc4-1
1478                                 GCC_TEST_OPTIONS=-posix
1479                                 NON_GCC_TEST_OPTIONS=-Xp
1480                                 ;;
1481       *-isc* )                  opsys=isc3-0 ;;
1482       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1483       *-esix* )                 opsys=esix ;;
1484       *-mach* )                 opsys=mach-bsd4-3 ;;
1485       *-xenix* )                opsys=xenix ;;
1486       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1487       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1488       *-bsdi4* )                opsys=bsdos4 ;;
1489       *-bsdi3* )                opsys=bsdos3 ;;
1490       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1491       *-bsdi2* )                opsys=bsdos2 ;;
1492       *-sco3.2v5* )             opsys=sco5 ;;
1493       *-sysv5* )                opsys=sco7 ;;
1494       *-386bsd* )               opsys=386bsd ;;
1495       *-freebsd* )              opsys=freebsd ;;
1496       *-nextstep* )             opsys=nextstep ;;
1497       *-pc-cygwin* )            opsys=cygwin32 ;;
1498       *-pc-mingw* )             opsys=mingw32 ;
1499                                 test -z "$with_tty" && with_tty="no";;
1500           esac
1501   ;;
1502
1503     m68k-*-linux* ) machine=m68k opsys=linux ;;
1504
1505 esac
1506
1507 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1508
1509 test -z "$opsys"   && opsys=`uname -s | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
1510
1511 if test -r "${srcdir}/src/m/${machine}.h"; then
1512   machfile="m/${machine}.h"
1513   { test "$extra_verbose" = "yes" && cat << EOF
1514     Defining config_machfile = "$machfile"
1515 EOF
1516 cat >> confdefs.h <<EOF
1517 #define config_machfile "$machfile"
1518 EOF
1519 }
1520
1521 else
1522   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1523   echo "Using configure-time autodetection only."
1524 fi
1525
1526 if test -r "${srcdir}/src/s/${opsys}.h"; then
1527   opsysfile="s/${opsys}.h"
1528   { test "$extra_verbose" = "yes" && cat << EOF
1529     Defining config_opsysfile = "$opsysfile"
1530 EOF
1531 cat >> confdefs.h <<EOF
1532 #define config_opsysfile "$opsysfile"
1533 EOF
1534 }
1535
1536 else
1537   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1538   echo "Using configure-time autodetection only."
1539 fi
1540
1541
1542 if test -z "$dynamic"; then
1543   case "$opsys" in
1544     hpux* | sunos4* ) dynamic=no ;;
1545     *) dynamic=yes ;;
1546   esac
1547 fi
1548 if test "$dynamic" = "yes"; then
1549   case "$opsys" in
1550     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1551     decosf* ) ld_call_shared="-call_shared" ;;
1552   esac
1553 else   case "$opsys" in
1554     sol2 )
1555       echo "Static linking is not supported on Solaris 2."
1556       echo "Rerun configure without specifying --dynamic=no."
1557       exit 1 ;;
1558     linux   ) ld_call_shared="-Bstatic" ;;
1559     decosf* ) ld_call_shared="-non_shared" ;;
1560   esac
1561 fi
1562
1563 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1564
1565 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1566 { test "$extra_verbose" = "yes" && cat << EOF
1567     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1568 EOF
1569 cat >> confdefs.h <<EOF
1570 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1571 EOF
1572 }
1573
1574
1575
1576 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1577 if test "$with_workshop $with_tooltalk" = "yes no"; then
1578   (echo "$progname: Usage error:"
1579 echo " " "--with-workshop requires --with-tooltalk"
1580 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1581 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1582 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1583 fi
1584
1585 if test "$with_workshop" = "yes"; then
1586   { test "$extra_verbose" = "yes" && cat << \EOF
1587     Defining SUNPRO
1588 EOF
1589 cat >> confdefs.h <<\EOF
1590 #define SUNPRO 1
1591 EOF
1592 }
1593
1594   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1595    echo "    xemacs will be linked with \"sunpro.o\""
1596  fi
1597 fi
1598
1599 if test "$with_clash_detection" != "no"; then
1600   { test "$extra_verbose" = "yes" && cat << \EOF
1601     Defining CLASH_DETECTION
1602 EOF
1603 cat >> confdefs.h <<\EOF
1604 #define CLASH_DETECTION 1
1605 EOF
1606 }
1607
1608   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1609    echo "    xemacs will be linked with \"filelock.o\""
1610  fi
1611 fi
1612
1613 test -n "$compiler" && CC="$compiler"
1614 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1615 fi
1616
1617 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1618 if test "${CFLAGS-unset}" != unset
1619   then cflags_specified=yes;
1620   else cflags_specified=no;
1621 fi
1622
1623 xe_save_CFLAGS="$CFLAGS"
1624
1625 # Extract the first word of "gcc", so it can be a program name with args.
1626 set dummy gcc; ac_word=$2
1627 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1628 echo "configure:1629: checking for $ac_word" >&5
1629
1630 if test -n "$CC"; then
1631   ac_cv_prog_CC="$CC" # Let the user override the test.
1632 else
1633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1634   ac_dummy="$PATH"
1635   for ac_dir in $ac_dummy; do
1636     test -z "$ac_dir" && ac_dir=.
1637     if test -f $ac_dir/$ac_word; then
1638       ac_cv_prog_CC="gcc"
1639       break
1640     fi
1641   done
1642   IFS="$ac_save_ifs"
1643 fi
1644 CC="$ac_cv_prog_CC"
1645 if test -n "$CC"; then
1646   echo "$ac_t""$CC" 1>&6
1647 else
1648   echo "$ac_t""no" 1>&6
1649 fi
1650
1651 if test -z "$CC"; then
1652   # Extract the first word of "cc", so it can be a program name with args.
1653 set dummy cc; ac_word=$2
1654 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1655 echo "configure:1656: checking for $ac_word" >&5
1656
1657 if test -n "$CC"; then
1658   ac_cv_prog_CC="$CC" # Let the user override the test.
1659 else
1660   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1661   ac_prog_rejected=no
1662   ac_dummy="$PATH"
1663   for ac_dir in $ac_dummy; do
1664     test -z "$ac_dir" && ac_dir=.
1665     if test -f $ac_dir/$ac_word; then
1666       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1667         ac_prog_rejected=yes
1668         continue
1669       fi
1670       ac_cv_prog_CC="cc"
1671       break
1672     fi
1673   done
1674   IFS="$ac_save_ifs"
1675 if test $ac_prog_rejected = yes; then
1676   # We found a bogon in the path, so make sure we never use it.
1677   set dummy $ac_cv_prog_CC
1678   shift
1679   if test $# -gt 0; then
1680     # We chose a different compiler from the bogus one.
1681     # However, it has the same basename, so the bogon will be chosen
1682     # first if we set CC to just the basename; use the full file name.
1683     shift
1684     set dummy "$ac_dir/$ac_word" "$@"
1685     shift
1686     ac_cv_prog_CC="$@"
1687   fi
1688 fi
1689 fi
1690 CC="$ac_cv_prog_CC"
1691 if test -n "$CC"; then
1692   echo "$ac_t""$CC" 1>&6
1693 else
1694   echo "$ac_t""no" 1>&6
1695 fi
1696
1697   if test -z "$CC"; then
1698     case "`uname -s`" in
1699     *win32* | *WIN32*)
1700       # Extract the first word of "cl", so it can be a program name with args.
1701 set dummy cl; ac_word=$2
1702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1703 echo "configure:1704: checking for $ac_word" >&5
1704
1705 if test -n "$CC"; then
1706   ac_cv_prog_CC="$CC" # Let the user override the test.
1707 else
1708   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1709   ac_dummy="$PATH"
1710   for ac_dir in $ac_dummy; do
1711     test -z "$ac_dir" && ac_dir=.
1712     if test -f $ac_dir/$ac_word; then
1713       ac_cv_prog_CC="cl"
1714       break
1715     fi
1716   done
1717   IFS="$ac_save_ifs"
1718 fi
1719 CC="$ac_cv_prog_CC"
1720 if test -n "$CC"; then
1721   echo "$ac_t""$CC" 1>&6
1722 else
1723   echo "$ac_t""no" 1>&6
1724 fi
1725  ;;
1726     esac
1727   fi
1728   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1729 fi
1730
1731 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1732 echo "configure:1733: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1733
1734 ac_ext=c
1735 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1736 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1737 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'
1738 ac_cpp='$CPP '"$xe_cppflags"
1739 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1740 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1741 cross_compiling=no
1742
1743 cat > conftest.$ac_ext << EOF
1744
1745 #line 1746 "configure"
1746 #include "confdefs.h"
1747
1748 main(){return(0);}
1749 EOF
1750 if { (eval echo configure:1751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1751   ac_cv_prog_cc_works=yes
1752   # If we can't run a trivial program, we are probably using a cross compiler.
1753   if (./conftest; exit) 2>/dev/null; then
1754     ac_cv_prog_cc_cross=no
1755   else
1756     ac_cv_prog_cc_cross=yes
1757   fi
1758 else
1759   echo "configure: failed program was:" >&5
1760   cat conftest.$ac_ext >&5
1761   ac_cv_prog_cc_works=no
1762 fi
1763 rm -fr conftest*
1764 ac_ext=c
1765 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1766 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1767 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'
1768 ac_cpp='$CPP '"$xe_cppflags"
1769 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1770 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1771 cross_compiling=no
1772
1773 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1774 if test $ac_cv_prog_cc_works = no; then
1775   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1776 fi
1777 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1778 echo "configure:1779: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1779 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1780 cross_compiling=$ac_cv_prog_cc_cross
1781
1782 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1783 echo "configure:1784: checking whether we are using GNU C" >&5
1784
1785 cat > conftest.c <<EOF
1786 #ifdef __GNUC__
1787   yes;
1788 #endif
1789 EOF
1790 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1791   ac_cv_prog_gcc=yes
1792 else
1793   ac_cv_prog_gcc=no
1794 fi
1795
1796 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1797
1798 if test $ac_cv_prog_gcc = yes; then
1799   GCC=yes
1800 else
1801   GCC=
1802 fi
1803
1804 ac_test_CFLAGS="${CFLAGS+set}"
1805 ac_save_CFLAGS="$CFLAGS"
1806 CFLAGS=
1807 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1808 echo "configure:1809: checking whether ${CC-cc} accepts -g" >&5
1809
1810 echo 'void f(){}' > conftest.c
1811 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1812   ac_cv_prog_cc_g=yes
1813 else
1814   ac_cv_prog_cc_g=no
1815 fi
1816 rm -f conftest*
1817
1818
1819 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1820 if test "$ac_test_CFLAGS" = set; then
1821   CFLAGS="$ac_save_CFLAGS"
1822 elif test $ac_cv_prog_cc_g = yes; then
1823   if test "$GCC" = yes; then
1824     CFLAGS="-g -O2"
1825   else
1826     CFLAGS="-g"
1827   fi
1828 else
1829   if test "$GCC" = yes; then
1830     CFLAGS="-O2"
1831   else
1832     CFLAGS=
1833   fi
1834 fi
1835  
1836 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1837   CC=${NON_GNU_CC-cc}
1838   # Extract the first word of "gcc", so it can be a program name with args.
1839 set dummy gcc; ac_word=$2
1840 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1841 echo "configure:1842: checking for $ac_word" >&5
1842
1843 if test -n "$CC"; then
1844   ac_cv_prog_CC="$CC" # Let the user override the test.
1845 else
1846   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1847   ac_dummy="$PATH"
1848   for ac_dir in $ac_dummy; do
1849     test -z "$ac_dir" && ac_dir=.
1850     if test -f $ac_dir/$ac_word; then
1851       ac_cv_prog_CC="gcc"
1852       break
1853     fi
1854   done
1855   IFS="$ac_save_ifs"
1856 fi
1857 CC="$ac_cv_prog_CC"
1858 if test -n "$CC"; then
1859   echo "$ac_t""$CC" 1>&6
1860 else
1861   echo "$ac_t""no" 1>&6
1862 fi
1863
1864 if test -z "$CC"; then
1865   # Extract the first word of "cc", so it can be a program name with args.
1866 set dummy cc; ac_word=$2
1867 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1868 echo "configure:1869: checking for $ac_word" >&5
1869
1870 if test -n "$CC"; then
1871   ac_cv_prog_CC="$CC" # Let the user override the test.
1872 else
1873   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1874   ac_prog_rejected=no
1875   ac_dummy="$PATH"
1876   for ac_dir in $ac_dummy; do
1877     test -z "$ac_dir" && ac_dir=.
1878     if test -f $ac_dir/$ac_word; then
1879       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1880         ac_prog_rejected=yes
1881         continue
1882       fi
1883       ac_cv_prog_CC="cc"
1884       break
1885     fi
1886   done
1887   IFS="$ac_save_ifs"
1888 if test $ac_prog_rejected = yes; then
1889   # We found a bogon in the path, so make sure we never use it.
1890   set dummy $ac_cv_prog_CC
1891   shift
1892   if test $# -gt 0; then
1893     # We chose a different compiler from the bogus one.
1894     # However, it has the same basename, so the bogon will be chosen
1895     # first if we set CC to just the basename; use the full file name.
1896     shift
1897     set dummy "$ac_dir/$ac_word" "$@"
1898     shift
1899     ac_cv_prog_CC="$@"
1900   fi
1901 fi
1902 fi
1903 CC="$ac_cv_prog_CC"
1904 if test -n "$CC"; then
1905   echo "$ac_t""$CC" 1>&6
1906 else
1907   echo "$ac_t""no" 1>&6
1908 fi
1909
1910   if test -z "$CC"; then
1911     case "`uname -s`" in
1912     *win32* | *WIN32*)
1913       # Extract the first word of "cl", so it can be a program name with args.
1914 set dummy cl; ac_word=$2
1915 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1916 echo "configure:1917: checking for $ac_word" >&5
1917
1918 if test -n "$CC"; then
1919   ac_cv_prog_CC="$CC" # Let the user override the test.
1920 else
1921   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1922   ac_dummy="$PATH"
1923   for ac_dir in $ac_dummy; do
1924     test -z "$ac_dir" && ac_dir=.
1925     if test -f $ac_dir/$ac_word; then
1926       ac_cv_prog_CC="cl"
1927       break
1928     fi
1929   done
1930   IFS="$ac_save_ifs"
1931 fi
1932 CC="$ac_cv_prog_CC"
1933 if test -n "$CC"; then
1934   echo "$ac_t""$CC" 1>&6
1935 else
1936   echo "$ac_t""no" 1>&6
1937 fi
1938  ;;
1939     esac
1940   fi
1941   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1942 fi
1943
1944 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1945 echo "configure:1946: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1946
1947 ac_ext=c
1948 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1949 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1950 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'
1951 ac_cpp='$CPP '"$xe_cppflags"
1952 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1953 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1954 cross_compiling=no
1955
1956 cat > conftest.$ac_ext << EOF
1957
1958 #line 1959 "configure"
1959 #include "confdefs.h"
1960
1961 main(){return(0);}
1962 EOF
1963 if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1964   ac_cv_prog_cc_works=yes
1965   # If we can't run a trivial program, we are probably using a cross compiler.
1966   if (./conftest; exit) 2>/dev/null; then
1967     ac_cv_prog_cc_cross=no
1968   else
1969     ac_cv_prog_cc_cross=yes
1970   fi
1971 else
1972   echo "configure: failed program was:" >&5
1973   cat conftest.$ac_ext >&5
1974   ac_cv_prog_cc_works=no
1975 fi
1976 rm -fr conftest*
1977 ac_ext=c
1978 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1979 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1980 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'
1981 ac_cpp='$CPP '"$xe_cppflags"
1982 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1983 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1984 cross_compiling=no
1985
1986 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1987 if test $ac_cv_prog_cc_works = no; then
1988   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1989 fi
1990 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1991 echo "configure:1992: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1992 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1993 cross_compiling=$ac_cv_prog_cc_cross
1994
1995 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1996 echo "configure:1997: checking whether we are using GNU C" >&5
1997
1998 cat > conftest.c <<EOF
1999 #ifdef __GNUC__
2000   yes;
2001 #endif
2002 EOF
2003 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2004: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2004   ac_cv_prog_gcc=yes
2005 else
2006   ac_cv_prog_gcc=no
2007 fi
2008
2009 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2010
2011 if test $ac_cv_prog_gcc = yes; then
2012   GCC=yes
2013 else
2014   GCC=
2015 fi
2016
2017 ac_test_CFLAGS="${CFLAGS+set}"
2018 ac_save_CFLAGS="$CFLAGS"
2019 CFLAGS=
2020 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2021 echo "configure:2022: checking whether ${CC-cc} accepts -g" >&5
2022
2023 echo 'void f(){}' > conftest.c
2024 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2025   ac_cv_prog_cc_g=yes
2026 else
2027   ac_cv_prog_cc_g=no
2028 fi
2029 rm -f conftest*
2030
2031
2032 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2033 if test "$ac_test_CFLAGS" = set; then
2034   CFLAGS="$ac_save_CFLAGS"
2035 elif test $ac_cv_prog_cc_g = yes; then
2036   if test "$GCC" = yes; then
2037     CFLAGS="-g -O2"
2038   else
2039     CFLAGS="-g"
2040   fi
2041 else
2042   if test "$GCC" = yes; then
2043     CFLAGS="-O2"
2044   else
2045     CFLAGS=
2046   fi
2047 fi
2048
2049 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2050   CC=gcc
2051   # Extract the first word of "gcc", so it can be a program name with args.
2052 set dummy gcc; ac_word=$2
2053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2054 echo "configure:2055: checking for $ac_word" >&5
2055
2056 if test -n "$CC"; then
2057   ac_cv_prog_CC="$CC" # Let the user override the test.
2058 else
2059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2060   ac_dummy="$PATH"
2061   for ac_dir in $ac_dummy; do
2062     test -z "$ac_dir" && ac_dir=.
2063     if test -f $ac_dir/$ac_word; then
2064       ac_cv_prog_CC="gcc"
2065       break
2066     fi
2067   done
2068   IFS="$ac_save_ifs"
2069 fi
2070 CC="$ac_cv_prog_CC"
2071 if test -n "$CC"; then
2072   echo "$ac_t""$CC" 1>&6
2073 else
2074   echo "$ac_t""no" 1>&6
2075 fi
2076
2077 if test -z "$CC"; then
2078   # Extract the first word of "cc", so it can be a program name with args.
2079 set dummy cc; ac_word=$2
2080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2081 echo "configure:2082: checking for $ac_word" >&5
2082
2083 if test -n "$CC"; then
2084   ac_cv_prog_CC="$CC" # Let the user override the test.
2085 else
2086   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2087   ac_prog_rejected=no
2088   ac_dummy="$PATH"
2089   for ac_dir in $ac_dummy; do
2090     test -z "$ac_dir" && ac_dir=.
2091     if test -f $ac_dir/$ac_word; then
2092       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2093         ac_prog_rejected=yes
2094         continue
2095       fi
2096       ac_cv_prog_CC="cc"
2097       break
2098     fi
2099   done
2100   IFS="$ac_save_ifs"
2101 if test $ac_prog_rejected = yes; then
2102   # We found a bogon in the path, so make sure we never use it.
2103   set dummy $ac_cv_prog_CC
2104   shift
2105   if test $# -gt 0; then
2106     # We chose a different compiler from the bogus one.
2107     # However, it has the same basename, so the bogon will be chosen
2108     # first if we set CC to just the basename; use the full file name.
2109     shift
2110     set dummy "$ac_dir/$ac_word" "$@"
2111     shift
2112     ac_cv_prog_CC="$@"
2113   fi
2114 fi
2115 fi
2116 CC="$ac_cv_prog_CC"
2117 if test -n "$CC"; then
2118   echo "$ac_t""$CC" 1>&6
2119 else
2120   echo "$ac_t""no" 1>&6
2121 fi
2122
2123   if test -z "$CC"; then
2124     case "`uname -s`" in
2125     *win32* | *WIN32*)
2126       # Extract the first word of "cl", so it can be a program name with args.
2127 set dummy cl; ac_word=$2
2128 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2129 echo "configure:2130: checking for $ac_word" >&5
2130
2131 if test -n "$CC"; then
2132   ac_cv_prog_CC="$CC" # Let the user override the test.
2133 else
2134   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2135   ac_dummy="$PATH"
2136   for ac_dir in $ac_dummy; do
2137     test -z "$ac_dir" && ac_dir=.
2138     if test -f $ac_dir/$ac_word; then
2139       ac_cv_prog_CC="cl"
2140       break
2141     fi
2142   done
2143   IFS="$ac_save_ifs"
2144 fi
2145 CC="$ac_cv_prog_CC"
2146 if test -n "$CC"; then
2147   echo "$ac_t""$CC" 1>&6
2148 else
2149   echo "$ac_t""no" 1>&6
2150 fi
2151  ;;
2152     esac
2153   fi
2154   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2155 fi
2156
2157 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2158 echo "configure:2159: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2159
2160 ac_ext=c
2161 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2162 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2163 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'
2164 ac_cpp='$CPP '"$xe_cppflags"
2165 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2166 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2167 cross_compiling=no
2168
2169 cat > conftest.$ac_ext << EOF
2170
2171 #line 2172 "configure"
2172 #include "confdefs.h"
2173
2174 main(){return(0);}
2175 EOF
2176 if { (eval echo configure:2177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2177   ac_cv_prog_cc_works=yes
2178   # If we can't run a trivial program, we are probably using a cross compiler.
2179   if (./conftest; exit) 2>/dev/null; then
2180     ac_cv_prog_cc_cross=no
2181   else
2182     ac_cv_prog_cc_cross=yes
2183   fi
2184 else
2185   echo "configure: failed program was:" >&5
2186   cat conftest.$ac_ext >&5
2187   ac_cv_prog_cc_works=no
2188 fi
2189 rm -fr conftest*
2190 ac_ext=c
2191 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2192 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2193 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'
2194 ac_cpp='$CPP '"$xe_cppflags"
2195 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2196 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2197 cross_compiling=no
2198
2199 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2200 if test $ac_cv_prog_cc_works = no; then
2201   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2202 fi
2203 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2204 echo "configure:2205: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2205 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2206 cross_compiling=$ac_cv_prog_cc_cross
2207
2208 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2209 echo "configure:2210: checking whether we are using GNU C" >&5
2210
2211 cat > conftest.c <<EOF
2212 #ifdef __GNUC__
2213   yes;
2214 #endif
2215 EOF
2216 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2217   ac_cv_prog_gcc=yes
2218 else
2219   ac_cv_prog_gcc=no
2220 fi
2221
2222 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2223
2224 if test $ac_cv_prog_gcc = yes; then
2225   GCC=yes
2226 else
2227   GCC=
2228 fi
2229
2230 ac_test_CFLAGS="${CFLAGS+set}"
2231 ac_save_CFLAGS="$CFLAGS"
2232 CFLAGS=
2233 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2234 echo "configure:2235: checking whether ${CC-cc} accepts -g" >&5
2235
2236 echo 'void f(){}' > conftest.c
2237 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2238   ac_cv_prog_cc_g=yes
2239 else
2240   ac_cv_prog_cc_g=no
2241 fi
2242 rm -f conftest*
2243
2244
2245 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2246 if test "$ac_test_CFLAGS" = set; then
2247   CFLAGS="$ac_save_CFLAGS"
2248 elif test $ac_cv_prog_cc_g = yes; then
2249   if test "$GCC" = yes; then
2250     CFLAGS="-g -O2"
2251   else
2252     CFLAGS="-g"
2253   fi
2254 else
2255   if test "$GCC" = yes; then
2256     CFLAGS="-O2"
2257   else
2258     CFLAGS=
2259   fi
2260 fi
2261
2262 fi
2263 CFLAGS="$xe_save_CFLAGS"
2264
2265
2266 test -n "$CPP" -a -d "$CPP" && CPP=
2267
2268 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2269
2270 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2271 echo "configure:2272: checking how to run the C preprocessor" >&5
2272 # On Suns, sometimes $CPP names a directory.
2273 if test -n "$CPP" && test -d "$CPP"; then
2274   CPP=
2275 fi
2276 if test -z "$CPP"; then
2277
2278   # This must be in double quotes, not single quotes, because CPP may get
2279   # substituted into the Makefile and "${CC-cc}" will confuse make.
2280   CPP="${CC-cc} -E"
2281   # On the NeXT, cc -E runs the code through the compiler's parser,
2282   # not just through cpp.
2283   cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <assert.h>
2287 Syntax Error
2288 EOF
2289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2290 { (eval echo configure:2291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2292 if test -z "$ac_err"; then
2293   :
2294 else
2295   echo "$ac_err" >&5
2296   echo "configure: failed program was:" >&5
2297   cat conftest.$ac_ext >&5
2298   rm -rf conftest*
2299   CPP="${CC-cc} -E -traditional-cpp"
2300   cat > conftest.$ac_ext <<EOF
2301 #line 2302 "configure"
2302 #include "confdefs.h"
2303 #include <assert.h>
2304 Syntax Error
2305 EOF
2306 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2307 { (eval echo configure:2308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2308 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2309 if test -z "$ac_err"; then
2310   :
2311 else
2312   echo "$ac_err" >&5
2313   echo "configure: failed program was:" >&5
2314   cat conftest.$ac_ext >&5
2315   rm -rf conftest*
2316   CPP="${CC-cc} -nologo -E"
2317   cat > conftest.$ac_ext <<EOF
2318 #line 2319 "configure"
2319 #include "confdefs.h"
2320 #include <assert.h>
2321 Syntax Error
2322 EOF
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2327   :
2328 else
2329   echo "$ac_err" >&5
2330   echo "configure: failed program was:" >&5
2331   cat conftest.$ac_ext >&5
2332   rm -rf conftest*
2333   CPP=/lib/cpp
2334 fi
2335 rm -f conftest*
2336 fi
2337 rm -f conftest*
2338 fi
2339 rm -f conftest*
2340   ac_cv_prog_CPP="$CPP"
2341   CPP="$ac_cv_prog_CPP"
2342 else
2343   ac_cv_prog_CPP="$CPP"
2344 fi
2345 echo "$ac_t""$CPP" 1>&6
2346
2347
2348
2349 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2350 echo "configure:2351: checking for AIX" >&5
2351 cat > conftest.$ac_ext <<EOF
2352 #line 2353 "configure"
2353 #include "confdefs.h"
2354 #ifdef _AIX
2355   yes
2356 #endif
2357
2358 EOF
2359 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2360   egrep "yes" >/dev/null 2>&1; then
2361   rm -rf conftest*
2362   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2363     Defining _ALL_SOURCE
2364 EOF
2365 cat >> confdefs.h <<\EOF
2366 #define _ALL_SOURCE 1
2367 EOF
2368 }
2369
2370 else
2371   rm -rf conftest*
2372   echo "$ac_t""no" 1>&6
2373 fi
2374 rm -f conftest*
2375
2376  
2377
2378 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2379 echo "configure:2380: checking for GNU libc" >&5
2380 cat > conftest.$ac_ext <<EOF
2381 #line 2382 "configure"
2382 #include "confdefs.h"
2383 #include <features.h>
2384 int main() {
2385
2386 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2387 #error Not a GNU libc system :-(
2388 ******* ======= ******** &&&&&&&&
2389 #endif
2390
2391 ; return 0; }
2392 EOF
2393 if { (eval echo configure:2394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2394   rm -rf conftest*
2395   have_glibc=yes
2396 else
2397   echo "configure: failed program was:" >&5
2398   cat conftest.$ac_ext >&5
2399   rm -rf conftest*
2400   have_glibc=no
2401 fi
2402 rm -f conftest*
2403 echo "$ac_t""$have_glibc" 1>&6
2404 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2405     Defining _GNU_SOURCE
2406 EOF
2407 cat >> confdefs.h <<\EOF
2408 #define _GNU_SOURCE 1
2409 EOF
2410 }
2411
2412
2413 case "$opsys" in
2414   sol2)
2415    { test "$extra_verbose" = "yes" && cat << \EOF
2416     Defining __EXTENSIONS__
2417 EOF
2418 cat >> confdefs.h <<\EOF
2419 #define __EXTENSIONS__ 1
2420 EOF
2421 }
2422
2423       if test "$os_release" -ge 55; then
2424      { test "$extra_verbose" = "yes" && cat << \EOF
2425     Defining _XOPEN_SOURCE = 500
2426 EOF
2427 cat >> confdefs.h <<\EOF
2428 #define _XOPEN_SOURCE 500
2429 EOF
2430 }
2431
2432      { test "$extra_verbose" = "yes" && cat << \EOF
2433     Defining _XOPEN_SOURCE_EXTENDED
2434 EOF
2435 cat >> confdefs.h <<\EOF
2436 #define _XOPEN_SOURCE_EXTENDED 1
2437 EOF
2438 }
2439
2440    fi ;;
2441   linux)
2442     { test "$extra_verbose" = "yes" && cat << \EOF
2443     Defining _POSIX_C_SOURCE = 199506L
2444 EOF
2445 cat >> confdefs.h <<\EOF
2446 #define _POSIX_C_SOURCE 199506L
2447 EOF
2448 }
2449
2450     { test "$extra_verbose" = "yes" && cat << \EOF
2451     Defining _XOPEN_SOURCE = 500
2452 EOF
2453 cat >> confdefs.h <<\EOF
2454 #define _XOPEN_SOURCE 500
2455 EOF
2456 }
2457
2458     { test "$extra_verbose" = "yes" && cat << \EOF
2459     Defining _XOPEN_SOURCE_EXTENDED
2460 EOF
2461 cat >> confdefs.h <<\EOF
2462 #define _XOPEN_SOURCE_EXTENDED 1
2463 EOF
2464 }
2465
2466     ;;
2467 esac
2468
2469 cat > conftest.$ac_ext <<EOF
2470 #line 2471 "configure"
2471 #include "confdefs.h"
2472 int main () {
2473 #if defined __SUNPRO_C
2474 return 11;
2475 #elif defined __DECC
2476 return 12;
2477 #elif defined __USLC__ && defined __SCO_VERSION__
2478 return 13;
2479 #else
2480 return 0;
2481 #endif
2482 }
2483 EOF
2484 if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2485 then
2486   :
2487 else
2488   conftest_rc="$?"
2489   echo "configure: failed program was:" >&5
2490   cat conftest.$ac_ext >&5
2491   rm -fr conftest*
2492   case "$conftest_rc" in
2493   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2494   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2495   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2496 esac
2497 fi
2498 rm -fr conftest*
2499
2500
2501
2502
2503 echo "Extracting information from the machine- and system-dependent headers..."
2504
2505 tempcname="conftest.c"
2506
2507
2508
2509 cat > $tempcname < confdefs.h
2510 cat >> $tempcname <<EOF
2511 #define NOT_C_CODE
2512 #define C_SWITCH_SITE
2513 #define C_SWITCH_X_SITE
2514 #define LD_SWITCH_SITE
2515 #define LD_SWITCH_X_SITE
2516 #define LD_SWITCH_X_SITE_AUX
2517 #define OS_RELEASE $os_release
2518
2519 #ifdef config_opsysfile
2520 #include "$srcdir/src/$opsysfile"
2521 #endif
2522
2523 #ifdef config_machfile
2524 #include "$srcdir/src/$machfile"
2525 #endif
2526
2527 #ifndef LIBS_MACHINE
2528 #define LIBS_MACHINE
2529 #endif
2530 configure___ libs_machine=LIBS_MACHINE
2531
2532 #ifndef LIBS_SYSTEM
2533 #define LIBS_SYSTEM
2534 #endif
2535 configure___ libs_system=LIBS_SYSTEM
2536
2537 #ifndef LIBS_TERMCAP
2538 #define LIBS_TERMCAP
2539 #endif
2540 configure___ libs_termcap=LIBS_TERMCAP
2541
2542 #ifndef LIB_STANDARD
2543 #define LIB_STANDARD
2544 #endif
2545 configure___ libs_standard=LIB_STANDARD
2546
2547
2548 #ifndef OBJECTS_MACHINE
2549 #define OBJECTS_MACHINE
2550 #endif
2551 configure___ objects_machine=OBJECTS_MACHINE
2552
2553 #ifndef OBJECTS_SYSTEM
2554 #define OBJECTS_SYSTEM
2555 #endif
2556 configure___ objects_system=OBJECTS_SYSTEM
2557
2558
2559 #ifndef C_SWITCH_MACHINE
2560 #define C_SWITCH_MACHINE
2561 #endif
2562 configure___ c_switch_machine=C_SWITCH_MACHINE
2563
2564 #ifndef C_SWITCH_SYSTEM
2565 #define C_SWITCH_SYSTEM
2566 #endif
2567 configure___ c_switch_system=C_SWITCH_SYSTEM
2568
2569
2570 #ifndef LD_SWITCH_MACHINE
2571 #define LD_SWITCH_MACHINE
2572 #endif
2573 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2574
2575 #ifndef LD_SWITCH_SYSTEM
2576 #define LD_SWITCH_SYSTEM
2577 #endif
2578 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2579
2580
2581 #ifndef UNEXEC
2582 #define UNEXEC "unexec.o"
2583 #endif
2584 configure___ unexec=UNEXEC
2585
2586
2587 #ifndef LD_SWITCH_SHARED
2588 #define LD_SWITCH_SHARED "-c"
2589 #endif
2590 configure___ ld_switch_shared=LD_SWITCH_SHARED
2591
2592
2593 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2594 configure___ ordinary_ld=ORDINARY_LD
2595
2596 #ifdef ORDINARY_LINK
2597 #define LD ORDINARY_LD
2598 #else /* no ORDINARY LINK */
2599 #ifdef COFF_ENCAPSULATE
2600 #define LD "\$(CC) -nostdlib"
2601 #else /* not COFF_ENCAPSULATE */
2602 #ifdef LINKER
2603 #define LD LINKER
2604 #else /* ! defined (LINKER) */
2605 #define LD "ld"
2606 #endif /* ! defined (LINKER) */
2607 #endif /* ! defined (COFF_ENCAPSULATE) */
2608 #endif /* not ORDINARY_LINK */
2609 configure___ ld=LD
2610
2611 #ifndef LIB_GCC
2612 #define LIB_GCC
2613 #endif
2614 configure___ lib_gcc=LIB_GCC
2615
2616 #ifndef LD_TEXT_START_ADDR
2617 #define LD_TEXT_START_ADDR
2618 #endif
2619 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2620
2621
2622 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2623 #ifdef NO_REMAP
2624 #ifdef COFF_ENCAPSULATE
2625 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2626 #else /* ! defined (COFF_ENCAPSULATE) */
2627 #define START_FILES "pre-crt0.o /lib/crt0.o"
2628 #endif /* ! defined (COFF_ENCAPSULATE) */
2629 #else /* ! defined (NO_REMAP) */
2630 #define START_FILES "ecrt0.o"
2631 #endif /* ! defined (NO_REMAP) */
2632 #endif /* no ORDINARY_LINK */
2633 #ifndef START_FILES
2634 #define START_FILES
2635 #endif
2636 configure___ start_files=START_FILES
2637
2638 #ifdef ORDINARY_LINK
2639 configure___ ordinary_link=yes
2640 #else
2641 configure___ ordinary_link=no
2642 #endif
2643
2644 #ifdef SYSTEM_MALLOC
2645 configure___ system_malloc=yes
2646 #else
2647 configure___ system_malloc=no
2648 #endif
2649
2650 #ifdef TERMINFO
2651 configure___ have_terminfo=yes
2652 #else
2653 configure___ have_terminfo=no
2654 #endif
2655
2656 #ifdef MAIL_USE_FLOCK
2657 configure___ mail_use_flock=yes
2658 #else
2659 configure___ mail_use_flock=no
2660 #endif
2661
2662 #ifdef MAIL_USE_LOCKF
2663 configure___ mail_use_lockf=yes
2664 #else
2665 configure___ mail_use_lockf=no
2666 #endif
2667
2668 #ifdef MAIL_USE_LOCKING
2669 configure___ mail_use_locking=yes
2670 #else
2671 configure___ mail_use_locking=no
2672 #endif
2673
2674 #ifdef HAVE_WIN32_PROCESSES
2675 configure___ win32_processes=yes
2676 #else
2677 configure___ win32_processes=no
2678 #endif
2679
2680 EOF
2681
2682 CPP=`eval "echo $CPP $CPPFLAGS"`
2683 eval `$CPP -Isrc $tempcname \
2684         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2685
2686 rm $tempcname
2687
2688 if test "$pdump" = "yes"; then
2689   ordinary_link="yes"
2690   ld="${ordinary_ld}"
2691   start_files=
2692   libs_standard=
2693   unexec=
2694   lib_gcc=
2695 fi
2696
2697 test "$extra_verbose" = "yes" && \
2698   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 ""
2699
2700 case "$opsys" in mingw* | cygwin*)
2701   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2702   cygwin_include=`eval "dirname $cygwin_include"` ;
2703   cygwin_include="-I$cygwin_include/../include" ;
2704   extra_includes="$cygwin_include/mingw $cygwin_include" ;
2705   case "$opsys" in mingw*)
2706     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2707   esac
2708   ;;
2709 esac
2710
2711 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2712
2713
2714 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2715
2716 if test "$__USLC__" = yes; then
2717   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2718 echo "configure:2719: checking for whether the -Kalloca compiler flag is needed" >&5
2719   need_kalloca=no
2720   cat > conftest.$ac_ext <<EOF
2721 #line 2722 "configure"
2722 #include "confdefs.h"
2723
2724 int main() {
2725 void *x = alloca(4);
2726 ; return 0; }
2727 EOF
2728 if { (eval echo configure:2729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2729   rm -rf conftest*
2730   :
2731 else
2732   echo "configure: failed program was:" >&5
2733   cat conftest.$ac_ext >&5
2734   rm -rf conftest*
2735   
2736     xe_save_c_switch_system="$c_switch_system"
2737     c_switch_system="$c_switch_system -Kalloca"
2738     cat > conftest.$ac_ext <<EOF
2739 #line 2740 "configure"
2740 #include "confdefs.h"
2741
2742 int main() {
2743 void *x = alloca(4);
2744 ; return 0; }
2745 EOF
2746 if { (eval echo configure:2747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2747   rm -rf conftest*
2748    need_kalloca=yes 
2749 else
2750   echo "configure: failed program was:" >&5
2751   cat conftest.$ac_ext >&5
2752 fi
2753 rm -f conftest*
2754     c_switch_system="$xe_save_c_switch_system"
2755 fi
2756 rm -f conftest*
2757   echo "$ac_t""$need_kalloca" 1>&6
2758   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
2759 fi
2760
2761 if test "$cflags_specified" = "no"; then
2762       if   test "$GCC" = "yes"; then
2763     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2764         CFLAGS="$CFLAGS -Wsign-compare"
2765             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2766               elif test "$__SUNPRO_C" = "yes"; then
2767     case "$opsys" in
2768       sol2    ) CFLAGS="-v -xO4" ;;
2769       sunos4* ) CFLAGS="-xO2";;
2770     esac
2771   elif test "$__DECC" = "yes"; then
2772     CFLAGS="-O3"
2773   elif test "$CC" = "xlc"; then
2774     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2775     else
2776     CFLAGS="-O" ;  fi
2777 fi
2778
2779 if test "$GCC" = "yes"; then
2780 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2781 echo "configure:2782: checking for buggy gcc versions" >&5
2782 GCC_VERSION=`$CC --version`
2783 case `uname -s`:`uname -m`:$GCC_VERSION in
2784                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2785                         case "$CFLAGS" in
2786             *-O2*|*-O3*)
2787                 case "$CFLAGS" in
2788                     *-fno-schedule-insns*) ;;
2789                     *)
2790                         echo "$ac_t""yes" 1>&6
2791                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2792                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2793                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2794                         ;;
2795                 esac
2796                 ;;
2797         esac
2798         ;;
2799                     Linux:alpha:egcs-2.91.*)
2800         echo "$ac_t""yes" 1>&6
2801         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2802         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2803         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2804         ;;
2805     *:i*86*:2.7.2*)
2806         case "$CFLAGS" in
2807             *-O2*|*-O3*)
2808                 case "$GCC_VERSION" in
2809                     2.7.2)
2810                         case "$CFLAGS" in
2811                             *-fno-strength-reduce*) ;;
2812                             *)
2813                                 echo "$ac_t""yes" 1>&6
2814                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2815                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2816                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2817                                 ;;
2818                         esac
2819                         ;;
2820                 esac
2821                 case "$CFLAGS" in
2822                  *-fno-caller-saves*) ;;
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-caller-saves." 1>&2
2827                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2828                     ;;
2829                 esac
2830                 ;;
2831         esac
2832         ;;
2833 esac
2834 echo "$ac_t""no" 1>&6
2835 fi
2836
2837
2838 if test "$GCC" = "yes"; then
2839   set x $ld_switch_system; shift; ld_switch_system=""
2840   while test -n "$1"; do
2841     case $1 in
2842       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2843       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2844       -Xlinker* ) ;;
2845       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2846     esac
2847     shift
2848   done
2849 fi
2850
2851 if test "$GCC" = "yes"; then
2852   set x $ld_switch_machine; shift; ld_switch_machine=""
2853   while test -n "$1"; do
2854     case $1 in
2855       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2856       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2857       -Xlinker* ) ;;
2858       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2859     esac
2860     shift
2861   done
2862 fi
2863
2864 if test "$GCC" = "yes"; then
2865   set x $LDFLAGS; shift; LDFLAGS=""
2866   while test -n "$1"; do
2867     case $1 in
2868       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2869       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2870       -Xlinker* ) ;;
2871       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2872     esac
2873     shift
2874   done
2875 fi
2876
2877 if test "$GCC" = "yes"; then
2878   set x $ld_call_shared; shift; ld_call_shared=""
2879   while test -n "$1"; do
2880     case $1 in
2881       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2882       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2883       -Xlinker* ) ;;
2884       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2885     esac
2886     shift
2887   done
2888 fi
2889
2890 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"$objects_machine\""
2892  fi
2893 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2894    echo "    xemacs will be linked with \"$objects_system\""
2895  fi
2896 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2897    echo "    xemacs will be linked with \"$unexec\""
2898  fi
2899 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2900    echo "    xemacs will be linked with \"dumper.o\""
2901  fi
2902
2903 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2904 echo "configure:2905: checking for dynodump" >&5
2905 if test "$unexec" != "unexsol2.o"; then
2906   echo "$ac_t""no" 1>&6
2907 else
2908   echo "$ac_t""yes" 1>&6
2909   { test "$extra_verbose" = "yes" && cat << \EOF
2910     Defining DYNODUMP
2911 EOF
2912 cat >> confdefs.h <<\EOF
2913 #define DYNODUMP 1
2914 EOF
2915 }
2916
2917   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2918   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2919   case "$machine" in
2920     sparc   ) dynodump_arch=sparc ;;
2921     *86*    ) dynodump_arch=i386  ;;
2922     powerpc ) dynodump_arch=ppc   ;;
2923   esac
2924     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
2925 fi
2926
2927
2928 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2929
2930 if test "$unexec" = "unexaix.o"; then
2931   if   test "$dynamic" = "no"; then
2932   start_flags="-Wl,-bnso,-bnodelcsect"
2933   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2934   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2935     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2936   done
2937   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2938     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2939   done
2940   
2941 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2942 echo "configure:2943: checking for terminateAndUnload in -lC" >&5
2943 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2944
2945 xe_check_libs=" -lC "
2946 cat > conftest.$ac_ext <<EOF
2947 #line 2948 "configure"
2948 #include "confdefs.h"
2949 /* Override any gcc2 internal prototype to avoid an error.  */
2950 /* We use char because int might match the return type of a gcc2
2951     builtin and then its argument prototype would still apply.  */
2952 char terminateAndUnload();
2953
2954 int main() {
2955 terminateAndUnload()
2956 ; return 0; }
2957 EOF
2958 if { (eval echo configure:2959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2959   rm -rf conftest*
2960   eval "ac_cv_lib_$ac_lib_var=yes"
2961 else
2962   echo "configure: failed program was:" >&5
2963   cat conftest.$ac_ext >&5
2964   rm -rf conftest*
2965   eval "ac_cv_lib_$ac_lib_var=no"
2966 fi
2967 rm -f conftest*
2968 xe_check_libs=""
2969
2970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2971   echo "$ac_t""yes" 1>&6
2972   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2973 else
2974   echo "$ac_t""no" 1>&6
2975 fi
2976
2977
2978   fi
2979 elif test -n "$ld_text_start_addr"; then
2980   start_flags="-T $ld_text_start_addr -e __start"
2981 fi
2982
2983
2984
2985
2986 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2987  test -z "$linker" &&  linker='$(CC) -nostdlib'
2988  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2989 fi
2990 test "$GCC" != "yes" && lib_gcc=
2991
2992
2993
2994
2995
2996 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2997 if test -n "$site_libraries"; then
2998   for arg in $site_libraries; do
2999     case "$arg" in
3000      -* ) ;;
3001      * ) test -d "$arg" || \
3002            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3003        arg="-L${arg}" ;;
3004     esac
3005     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3006   done
3007 fi
3008
3009 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3010 if test -n "$site_includes"; then
3011   for arg in $site_includes; do
3012     case "$arg" in
3013       -* ) ;;
3014       * ) test -d "$arg" || \
3015            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3016       arg="-I${arg}" ;;
3017     esac
3018     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3019   done
3020 fi
3021
3022 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3023 if test -n "$site_prefixes"; then
3024   for dir in $site_prefixes; do
3025     lib_dir="${dir}/lib"
3026     inc_dir="${dir}/include"
3027     if test ! -d "$dir"; then
3028       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3029     elif test ! -d "$lib_dir"; then
3030       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3031     else
3032       if test -d "$inc_dir"; then
3033         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
3034       fi
3035       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
3036     fi
3037   done
3038 fi
3039
3040
3041 for dir in "/usr/ccs/lib"; do
3042   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
3043 done
3044
3045 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3046 if test -n "$site_runtime_libraries"; then
3047   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3048   export LD_RUN_PATH
3049 fi
3050
3051
3052
3053
3054
3055 if test -n "$add_runtime_path"; then :;
3056 elif test "$dynamic" = "no"; then add_runtime_path=no
3057 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3058 else case "$opsys" in
3059        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3060        * ) add_runtime_path=no ;;
3061      esac
3062 fi
3063
3064 if test "$add_runtime_path" = "yes"; then
3065       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3066 echo "configure:3067: checking "for runtime libraries flag"" >&5
3067   case "$opsys" in
3068     sol2 ) dash_r="-R" ;;
3069     decosf* | linux* | irix*) dash_r="-rpath " ;;
3070     *)
3071       dash_r=""
3072       for try_dash_r in "-R" "-R " "-rpath "; do
3073         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3074         
3075 if test "$GCC" = "yes"; then
3076   set x $xe_check_libs; shift; xe_check_libs=""
3077   while test -n "$1"; do
3078     case $1 in
3079       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3080       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3081       -Xlinker* ) ;;
3082       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3083     esac
3084     shift
3085   done
3086 fi
3087         cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090
3091 int main() {
3092
3093 ; return 0; }
3094 EOF
3095 if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3096   rm -rf conftest*
3097   dash_r="$try_dash_r"
3098 else
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101 fi
3102 rm -f conftest*
3103         xe_check_libs=""
3104         test -n "$dash_r" && break
3105       done ;;
3106   esac
3107   if test -n "$dash_r";
3108     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3109     else echo "$ac_t""NONE" 1>&6
3110   fi
3111 fi
3112
3113 xe_add_unique_runpath_dir='
3114   xe_add_p=yes
3115   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3116   done
3117   if test "$xe_add_p" = "yes"; then
3118     test -n "$runpath" && runpath="${runpath}:"
3119     runpath="${runpath}${xe_runpath_dir}"
3120     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3121   fi'
3122
3123
3124
3125
3126 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3127     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3128   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3129   
3130         runpath="" runpath_dirs=""
3131   if test -n "$LD_RUN_PATH"; then
3132     runpath="$LD_RUN_PATH"
3133   elif test "$GCC" = "yes"; then
3134         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3135     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3136     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3137     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3138       case "$arg" in P,* | -L* | -R* )
3139         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3140           {
3141 xe_runpath_dir="$dir"
3142   test "$xe_runpath_dir" != "/lib"     -a \
3143         "$xe_runpath_dir" != "/usr/lib" -a \
3144         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3145   eval "$xe_add_unique_runpath_dir"
3146 }
3147         done ;;
3148       esac
3149     done
3150     ld_switch_run="$ld_switch_run_save"
3151     rm -f conftest*
3152   else
3153         for arg in $ld_switch_site $ld_switch_x_site; do
3154       case "$arg" in -L*) {
3155 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3156   test "$xe_runpath_dir" != "/lib"     -a \
3157         "$xe_runpath_dir" != "/usr/lib" -a \
3158         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3159   eval "$xe_add_unique_runpath_dir"
3160 };; esac
3161     done
3162         if test "$opsys $need_motif" = "sol2 yes"; then
3163       xe_runpath_dir="/opt/SUNWdt/lib";
3164       eval "$xe_add_unique_runpath_dir";
3165     fi
3166   fi 
3167   if test -n "$runpath"; then
3168     ld_switch_run="${dash_r}${runpath}"
3169     
3170 if test "$GCC" = "yes"; then
3171   set x $ld_switch_run; shift; ld_switch_run=""
3172   while test -n "$1"; do
3173     case $1 in
3174       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3175       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3176       -Xlinker* ) ;;
3177       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3178     esac
3179     shift
3180   done
3181 fi
3182     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3183   fi
3184 fi
3185
3186
3187
3188 GNU_MALLOC=yes
3189 if test "$with_dlmalloc" != "no"; then
3190         doug_lea_malloc=yes
3191 else
3192         doug_lea_malloc=no
3193 fi
3194 after_morecore_hook_exists=yes
3195 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3196 echo "configure:3197: checking for malloc_set_state" >&5
3197
3198 cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201 /* System header to define __stub macros and hopefully few prototypes,
3202     which can conflict with char malloc_set_state(); below.  */
3203 #include <assert.h>
3204 /* Override any gcc2 internal prototype to avoid an error.  */
3205 /* We use char because int might match the return type of a gcc2
3206     builtin and then its argument prototype would still apply.  */
3207 char malloc_set_state();
3208
3209 int main() {
3210
3211 /* The GNU C library defines this for functions which it implements
3212     to always fail with ENOSYS.  Some functions are actually named
3213     something starting with __ and the normal name is an alias.  */
3214 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3215 choke me
3216 #else
3217 malloc_set_state();
3218 #endif
3219
3220 ; return 0; }
3221 EOF
3222 if { (eval echo configure:3223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3223   rm -rf conftest*
3224   eval "ac_cv_func_malloc_set_state=yes"
3225 else
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   eval "ac_cv_func_malloc_set_state=no"
3230 fi
3231 rm -f conftest*
3232
3233 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3234   echo "$ac_t""yes" 1>&6
3235   :
3236 else
3237   echo "$ac_t""no" 1>&6
3238 doug_lea_malloc=no
3239 fi
3240
3241 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3242 echo "configure:3243: checking whether __after_morecore_hook exists" >&5
3243 cat > conftest.$ac_ext <<EOF
3244 #line 3245 "configure"
3245 #include "confdefs.h"
3246 extern void (* __after_morecore_hook)();
3247 int main() {
3248 __after_morecore_hook = 0
3249 ; return 0; }
3250 EOF
3251 if { (eval echo configure:3252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3252   rm -rf conftest*
3253   echo "$ac_t""yes" 1>&6
3254 else
3255   echo "configure: failed program was:" >&5
3256   cat conftest.$ac_ext >&5
3257   rm -rf conftest*
3258   echo "$ac_t""no" 1>&6
3259    after_morecore_hook_exists=no
3260 fi
3261 rm -f conftest*
3262 if test "$system_malloc" = "yes" ; then
3263   GNU_MALLOC=no
3264   GNU_MALLOC_reason="
3265     - The GNU allocators don't work with this system configuration."
3266 elif test "$with_system_malloc" = "yes" ; then
3267   GNU_MALLOC=no
3268   GNU_MALLOC_reason="
3269     - User chose not to use GNU allocators."
3270 elif test "$with_debug_malloc" = "yes" ; then
3271   GNU_MALLOC=no
3272   GNU_MALLOC_reason="
3273     - User chose to use Debugging Malloc."
3274 fi
3275
3276 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3277   GNU_MALLOC_reason="
3278     - Using Doug Lea's new malloc from the GNU C Library."
3279   { test "$extra_verbose" = "yes" && cat << \EOF
3280     Defining DOUG_LEA_MALLOC
3281 EOF
3282 cat >> confdefs.h <<\EOF
3283 #define DOUG_LEA_MALLOC 1
3284 EOF
3285 }
3286
3287   if test "$after_morecore_hook_exists" = "no" ; then
3288     GNU_MALLOC_reason="
3289     - Using Doug Lea's new malloc from the Linux C Library."
3290     { test "$extra_verbose" = "yes" && cat << \EOF
3291     Defining _NO_MALLOC_WARNING_
3292 EOF
3293 cat >> confdefs.h <<\EOF
3294 #define _NO_MALLOC_WARNING_ 1
3295 EOF
3296 }
3297
3298   fi
3299 fi
3300
3301
3302
3303
3304 # Extract the first word of "ranlib", so it can be a program name with args.
3305 set dummy ranlib; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308
3309 if test -n "$RANLIB"; then
3310   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3311 else
3312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3313   ac_dummy="$PATH"
3314   for ac_dir in $ac_dummy; do
3315     test -z "$ac_dir" && ac_dir=.
3316     if test -f $ac_dir/$ac_word; then
3317       ac_cv_prog_RANLIB="ranlib"
3318       break
3319     fi
3320   done
3321   IFS="$ac_save_ifs"
3322   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3323 fi
3324 RANLIB="$ac_cv_prog_RANLIB"
3325 if test -n "$RANLIB"; then
3326   echo "$ac_t""$RANLIB" 1>&6
3327 else
3328   echo "$ac_t""no" 1>&6
3329 fi
3330
3331 ac_aux_dir=
3332 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3333   if test -f $ac_dir/install-sh; then
3334     ac_aux_dir=$ac_dir
3335     ac_install_sh="$ac_aux_dir/install-sh -c"
3336     break
3337   elif test -f $ac_dir/install.sh; then
3338     ac_aux_dir=$ac_dir
3339     ac_install_sh="$ac_aux_dir/install.sh -c"
3340     break
3341   fi
3342 done
3343 if test -z "$ac_aux_dir"; then
3344   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3345 fi
3346 ac_config_guess=$ac_aux_dir/config.guess
3347 ac_config_sub=$ac_aux_dir/config.sub
3348 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3349
3350 # Find a good install program.  We prefer a C program (faster),
3351 # so one script is as good as another.  But avoid the broken or
3352 # incompatible versions:
3353 # SysV /etc/install, /usr/sbin/install
3354 # SunOS /usr/etc/install
3355 # IRIX /sbin/install
3356 # AIX /bin/install
3357 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3358 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3359 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3360 # ./install, which can be erroneously created by make from ./install.sh.
3361 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3362 echo "configure:3363: checking for a BSD compatible install" >&5
3363 if test -z "$INSTALL"; then
3364
3365   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3366   for ac_dir in $PATH; do
3367     # Account for people who put trailing slashes in PATH elements.
3368     case "$ac_dir/" in
3369     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3370     *)
3371       # OSF1 and SCO ODT 3.0 have their own names for install.
3372       # Don't use installbsd from OSF since it installs stuff as root
3373       # by default.
3374       for ac_prog in ginstall scoinst install; do
3375         if test -f $ac_dir/$ac_prog; then
3376           if test $ac_prog = install &&
3377             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3378             # AIX install.  It has an incompatible calling convention.
3379             :
3380           else
3381             ac_cv_path_install="$ac_dir/$ac_prog -c"
3382             break 2
3383           fi
3384         fi
3385       done
3386       ;;
3387     esac
3388   done
3389   IFS="$ac_save_IFS"
3390
3391   if test "${ac_cv_path_install+set}" = set; then
3392     INSTALL="$ac_cv_path_install"
3393   else
3394     # As a last resort, use the slow shell script.  We don't cache a
3395     # path for INSTALL within a source directory, because that will
3396     # break other packages using the cache if that directory is
3397     # removed, or if the path is relative.
3398     INSTALL="$ac_install_sh"
3399   fi
3400 fi
3401 echo "$ac_t""$INSTALL" 1>&6
3402
3403 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3404 # It thinks the first close brace ends the variable substitution.
3405 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3406
3407 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3408
3409 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3410
3411 for ac_prog in 'bison -y' byacc
3412 do
3413 # Extract the first word of "$ac_prog", so it can be a program name with args.
3414 set dummy $ac_prog; ac_word=$2
3415 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3416 echo "configure:3417: checking for $ac_word" >&5
3417
3418 if test -n "$YACC"; then
3419   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3420 else
3421   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3422   ac_dummy="$PATH"
3423   for ac_dir in $ac_dummy; do
3424     test -z "$ac_dir" && ac_dir=.
3425     if test -f $ac_dir/$ac_word; then
3426       ac_cv_prog_YACC="$ac_prog"
3427       break
3428     fi
3429   done
3430   IFS="$ac_save_ifs"
3431 fi
3432 YACC="$ac_cv_prog_YACC"
3433 if test -n "$YACC"; then
3434   echo "$ac_t""$YACC" 1>&6
3435 else
3436   echo "$ac_t""no" 1>&6
3437 fi
3438
3439 test -n "$YACC" && break
3440 done
3441 test -n "$YACC" || YACC="yacc"
3442
3443
3444 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 
3445 do
3446 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3447 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3448 echo "configure:3449: checking for $ac_hdr" >&5
3449
3450 cat > conftest.$ac_ext <<EOF
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453 #include <$ac_hdr>
3454 EOF
3455 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3456 { (eval echo configure:3457: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3457 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3458 if test -z "$ac_err"; then
3459   rm -rf conftest*
3460   eval "ac_cv_header_$ac_safe=yes"
3461 else
3462   echo "$ac_err" >&5
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -rf conftest*
3466   eval "ac_cv_header_$ac_safe=no"
3467 fi
3468 rm -f conftest*
3469 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3470   echo "$ac_t""yes" 1>&6
3471     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3472   { test "$extra_verbose" = "yes" && cat << EOF
3473     Defining $ac_tr_hdr
3474 EOF
3475 cat >> confdefs.h <<EOF
3476 #define $ac_tr_hdr 1
3477 EOF
3478 }
3479  
3480 else
3481   echo "$ac_t""no" 1>&6
3482 fi
3483 done
3484
3485 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3486 echo "configure:3487: checking for sys/wait.h that is POSIX.1 compatible" >&5
3487
3488 cat > conftest.$ac_ext <<EOF
3489 #line 3490 "configure"
3490 #include "confdefs.h"
3491 #include <sys/types.h>
3492 #include <sys/wait.h>
3493 #ifndef WEXITSTATUS
3494 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3495 #endif
3496 #ifndef WIFEXITED
3497 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3498 #endif
3499 int main() {
3500 int s;
3501 wait (&s);
3502 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3503 ; return 0; }
3504 EOF
3505 if { (eval echo configure:3506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3506   rm -rf conftest*
3507   ac_cv_header_sys_wait_h=yes
3508 else
3509   echo "configure: failed program was:" >&5
3510   cat conftest.$ac_ext >&5
3511   rm -rf conftest*
3512   ac_cv_header_sys_wait_h=no
3513 fi
3514 rm -f conftest*
3515
3516 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3517 if test $ac_cv_header_sys_wait_h = yes; then
3518   { test "$extra_verbose" = "yes" && cat << \EOF
3519     Defining HAVE_SYS_WAIT_H
3520 EOF
3521 cat >> confdefs.h <<\EOF
3522 #define HAVE_SYS_WAIT_H 1
3523 EOF
3524 }
3525
3526 fi
3527
3528 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3529 echo "configure:3530: checking for ANSI C header files" >&5
3530
3531 cat > conftest.$ac_ext <<EOF
3532 #line 3533 "configure"
3533 #include "confdefs.h"
3534 #include <stdlib.h>
3535 #include <stdarg.h>
3536 #include <string.h>
3537 #include <float.h>
3538 EOF
3539 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3540 { (eval echo configure:3541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3541 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3542 if test -z "$ac_err"; then
3543   rm -rf conftest*
3544   ac_cv_header_stdc=yes
3545 else
3546   echo "$ac_err" >&5
3547   echo "configure: failed program was:" >&5
3548   cat conftest.$ac_ext >&5
3549   rm -rf conftest*
3550   ac_cv_header_stdc=no
3551 fi
3552 rm -f conftest*
3553
3554 if test $ac_cv_header_stdc = yes; then
3555   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3559 #include <string.h>
3560 EOF
3561 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3562   egrep "memchr" >/dev/null 2>&1; then
3563   :
3564 else
3565   rm -rf conftest*
3566   ac_cv_header_stdc=no
3567 fi
3568 rm -f conftest*
3569
3570 fi
3571
3572 if test $ac_cv_header_stdc = yes; then
3573   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3574 cat > conftest.$ac_ext <<EOF
3575 #line 3576 "configure"
3576 #include "confdefs.h"
3577 #include <stdlib.h>
3578 EOF
3579 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3580   egrep "free" >/dev/null 2>&1; then
3581   :
3582 else
3583   rm -rf conftest*
3584   ac_cv_header_stdc=no
3585 fi
3586 rm -f conftest*
3587
3588 fi
3589
3590 if test $ac_cv_header_stdc = yes; then
3591   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 #include <ctype.h>
3596 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3597 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3598 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3599 int main () { int i; for (i = 0; i < 256; i++)
3600 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3601 exit (0); }
3602
3603 EOF
3604 if { (eval echo configure:3605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3605 then
3606   :
3607 else
3608   conftest_rc="$?"
3609   echo "configure: failed program was:" >&5
3610   cat conftest.$ac_ext >&5
3611   rm -fr conftest*
3612   ac_cv_header_stdc=no
3613 fi
3614 rm -fr conftest*
3615 fi
3616
3617 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3618 if test $ac_cv_header_stdc = yes; then
3619   { test "$extra_verbose" = "yes" && cat << \EOF
3620     Defining STDC_HEADERS
3621 EOF
3622 cat >> confdefs.h <<\EOF
3623 #define STDC_HEADERS 1
3624 EOF
3625 }
3626
3627 fi
3628
3629 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3630 echo "configure:3631: checking whether time.h and sys/time.h may both be included" >&5
3631
3632 cat > conftest.$ac_ext <<EOF
3633 #line 3634 "configure"
3634 #include "confdefs.h"
3635 #include <sys/types.h>
3636 #include <sys/time.h>
3637 #include <time.h>
3638 int main() {
3639 struct tm *tp;
3640 ; return 0; }
3641 EOF
3642 if { (eval echo configure:3643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3643   rm -rf conftest*
3644   ac_cv_header_time=yes
3645 else
3646   echo "configure: failed program was:" >&5
3647   cat conftest.$ac_ext >&5
3648   rm -rf conftest*
3649   ac_cv_header_time=no
3650 fi
3651 rm -f conftest*
3652
3653 echo "$ac_t""$ac_cv_header_time" 1>&6
3654 if test $ac_cv_header_time = yes; then
3655   { test "$extra_verbose" = "yes" && cat << \EOF
3656     Defining TIME_WITH_SYS_TIME
3657 EOF
3658 cat >> confdefs.h <<\EOF
3659 #define TIME_WITH_SYS_TIME 1
3660 EOF
3661 }
3662
3663 fi
3664
3665 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3666 echo "configure:3667: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3667
3668 cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #include <sys/types.h>
3672 #include <signal.h>
3673 /* NetBSD declares sys_siglist in unistd.h.  */
3674 #ifdef HAVE_UNISTD_H
3675 #include <unistd.h>
3676 #endif
3677 int main() {
3678 char *msg = *(sys_siglist + 1);
3679 ; return 0; }
3680 EOF
3681 if { (eval echo configure:3682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682   rm -rf conftest*
3683   ac_cv_decl_sys_siglist=yes
3684 else
3685   echo "configure: failed program was:" >&5
3686   cat conftest.$ac_ext >&5
3687   rm -rf conftest*
3688   ac_cv_decl_sys_siglist=no
3689 fi
3690 rm -f conftest*
3691
3692 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3693 if test $ac_cv_decl_sys_siglist = yes; then
3694   { test "$extra_verbose" = "yes" && cat << \EOF
3695     Defining SYS_SIGLIST_DECLARED
3696 EOF
3697 cat >> confdefs.h <<\EOF
3698 #define SYS_SIGLIST_DECLARED 1
3699 EOF
3700 }
3701
3702 fi
3703
3704
3705
3706 echo $ac_n "checking for utime""... $ac_c" 1>&6
3707 echo "configure:3708: checking for utime" >&5
3708 cat > conftest.$ac_ext <<EOF
3709 #line 3710 "configure"
3710 #include "confdefs.h"
3711 #include <sys/types.h>
3712 #include <utime.h>
3713 int main() {
3714 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3715 ; return 0; }
3716 EOF
3717 if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3718   rm -rf conftest*
3719   echo "$ac_t""yes" 1>&6
3720    { test "$extra_verbose" = "yes" && cat << \EOF
3721     Defining HAVE_UTIME
3722 EOF
3723 cat >> confdefs.h <<\EOF
3724 #define HAVE_UTIME 1
3725 EOF
3726 }
3727
3728 else
3729   echo "configure: failed program was:" >&5
3730   cat conftest.$ac_ext >&5
3731   rm -rf conftest*
3732   echo "$ac_t""no" 1>&6
3733       for ac_func in utimes
3734 do
3735 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3736 echo "configure:3737: checking for $ac_func" >&5
3737
3738 cat > conftest.$ac_ext <<EOF
3739 #line 3740 "configure"
3740 #include "confdefs.h"
3741 /* System header to define __stub macros and hopefully few prototypes,
3742     which can conflict with char $ac_func(); below.  */
3743 #include <assert.h>
3744 /* Override any gcc2 internal prototype to avoid an error.  */
3745 /* We use char because int might match the return type of a gcc2
3746     builtin and then its argument prototype would still apply.  */
3747 char $ac_func();
3748
3749 int main() {
3750
3751 /* The GNU C library defines this for functions which it implements
3752     to always fail with ENOSYS.  Some functions are actually named
3753     something starting with __ and the normal name is an alias.  */
3754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3755 choke me
3756 #else
3757 $ac_func();
3758 #endif
3759
3760 ; return 0; }
3761 EOF
3762 if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3763   rm -rf conftest*
3764   eval "ac_cv_func_$ac_func=yes"
3765 else
3766   echo "configure: failed program was:" >&5
3767   cat conftest.$ac_ext >&5
3768   rm -rf conftest*
3769   eval "ac_cv_func_$ac_func=no"
3770 fi
3771 rm -f conftest*
3772
3773 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3774   echo "$ac_t""yes" 1>&6
3775     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3776   { test "$extra_verbose" = "yes" && cat << EOF
3777     Defining $ac_tr_func
3778 EOF
3779 cat >> confdefs.h <<EOF
3780 #define $ac_tr_func 1
3781 EOF
3782 }
3783  
3784 else
3785   echo "$ac_t""no" 1>&6
3786 fi
3787 done
3788
3789 fi
3790 rm -f conftest*
3791
3792
3793 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3794 echo "configure:3795: checking return type of signal handlers" >&5
3795
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3799 #include <sys/types.h>
3800 #include <signal.h>
3801 #ifdef signal
3802 #undef signal
3803 #endif
3804 #ifdef __cplusplus
3805 extern "C" void (*signal (int, void (*)(int)))(int);
3806 #else
3807 void (*signal ()) ();
3808 #endif
3809
3810 int main() {
3811 int i;
3812 ; return 0; }
3813 EOF
3814 if { (eval echo configure:3815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3815   rm -rf conftest*
3816   ac_cv_type_signal=void
3817 else
3818   echo "configure: failed program was:" >&5
3819   cat conftest.$ac_ext >&5
3820   rm -rf conftest*
3821   ac_cv_type_signal=int
3822 fi
3823 rm -f conftest*
3824
3825 echo "$ac_t""$ac_cv_type_signal" 1>&6
3826 { test "$extra_verbose" = "yes" && cat << EOF
3827     Defining RETSIGTYPE = $ac_cv_type_signal
3828 EOF
3829 cat >> confdefs.h <<EOF
3830 #define RETSIGTYPE $ac_cv_type_signal
3831 EOF
3832 }
3833
3834
3835 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3836 echo "configure:3837: checking for size_t" >&5
3837
3838 cat > conftest.$ac_ext <<EOF
3839 #line 3840 "configure"
3840 #include "confdefs.h"
3841 #include <sys/types.h>
3842 #if STDC_HEADERS
3843 #include <stdlib.h>
3844 #include <stddef.h>
3845 #endif
3846 EOF
3847 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3848   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3849   rm -rf conftest*
3850   ac_cv_type_size_t=yes
3851 else
3852   rm -rf conftest*
3853   ac_cv_type_size_t=no
3854 fi
3855 rm -f conftest*
3856
3857 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3858 if test $ac_cv_type_size_t = no; then
3859   { test "$extra_verbose" = "yes" && cat << \EOF
3860     Defining size_t = unsigned
3861 EOF
3862 cat >> confdefs.h <<\EOF
3863 #define size_t unsigned
3864 EOF
3865 }
3866
3867 fi
3868
3869 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3870 echo "configure:3871: checking for pid_t" >&5
3871
3872 cat > conftest.$ac_ext <<EOF
3873 #line 3874 "configure"
3874 #include "confdefs.h"
3875 #include <sys/types.h>
3876 #if STDC_HEADERS
3877 #include <stdlib.h>
3878 #include <stddef.h>
3879 #endif
3880 EOF
3881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3882   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3883   rm -rf conftest*
3884   ac_cv_type_pid_t=yes
3885 else
3886   rm -rf conftest*
3887   ac_cv_type_pid_t=no
3888 fi
3889 rm -f conftest*
3890
3891 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3892 if test $ac_cv_type_pid_t = no; then
3893   { test "$extra_verbose" = "yes" && cat << \EOF
3894     Defining pid_t = int
3895 EOF
3896 cat >> confdefs.h <<\EOF
3897 #define pid_t int
3898 EOF
3899 }
3900
3901 fi
3902
3903 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3904 echo "configure:3905: checking for uid_t in sys/types.h" >&5
3905
3906 cat > conftest.$ac_ext <<EOF
3907 #line 3908 "configure"
3908 #include "confdefs.h"
3909 #include <sys/types.h>
3910 EOF
3911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3912   egrep "uid_t" >/dev/null 2>&1; then
3913   rm -rf conftest*
3914   ac_cv_type_uid_t=yes
3915 else
3916   rm -rf conftest*
3917   ac_cv_type_uid_t=no
3918 fi
3919 rm -f conftest*
3920
3921
3922 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3923 if test $ac_cv_type_uid_t = no; then
3924   { test "$extra_verbose" = "yes" && cat << \EOF
3925     Defining uid_t = int
3926 EOF
3927 cat >> confdefs.h <<\EOF
3928 #define uid_t int
3929 EOF
3930 }
3931
3932   { test "$extra_verbose" = "yes" && cat << \EOF
3933     Defining gid_t = int
3934 EOF
3935 cat >> confdefs.h <<\EOF
3936 #define gid_t int
3937 EOF
3938 }
3939
3940 fi
3941
3942 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3943 echo "configure:3944: checking for mode_t" >&5
3944
3945 cat > conftest.$ac_ext <<EOF
3946 #line 3947 "configure"
3947 #include "confdefs.h"
3948 #include <sys/types.h>
3949 #if STDC_HEADERS
3950 #include <stdlib.h>
3951 #include <stddef.h>
3952 #endif
3953 EOF
3954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3955   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3956   rm -rf conftest*
3957   ac_cv_type_mode_t=yes
3958 else
3959   rm -rf conftest*
3960   ac_cv_type_mode_t=no
3961 fi
3962 rm -f conftest*
3963
3964 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3965 if test $ac_cv_type_mode_t = no; then
3966   { test "$extra_verbose" = "yes" && cat << \EOF
3967     Defining mode_t = int
3968 EOF
3969 cat >> confdefs.h <<\EOF
3970 #define mode_t int
3971 EOF
3972 }
3973
3974 fi
3975
3976 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3977 echo "configure:3978: checking for off_t" >&5
3978
3979 cat > conftest.$ac_ext <<EOF
3980 #line 3981 "configure"
3981 #include "confdefs.h"
3982 #include <sys/types.h>
3983 #if STDC_HEADERS
3984 #include <stdlib.h>
3985 #include <stddef.h>
3986 #endif
3987 EOF
3988 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3989   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3990   rm -rf conftest*
3991   ac_cv_type_off_t=yes
3992 else
3993   rm -rf conftest*
3994   ac_cv_type_off_t=no
3995 fi
3996 rm -f conftest*
3997
3998 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3999 if test $ac_cv_type_off_t = no; then
4000   { test "$extra_verbose" = "yes" && cat << \EOF
4001     Defining off_t = long
4002 EOF
4003 cat >> confdefs.h <<\EOF
4004 #define off_t long
4005 EOF
4006 }
4007
4008 fi
4009
4010 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4011 echo "configure:4012: checking for ssize_t" >&5
4012
4013 cat > conftest.$ac_ext <<EOF
4014 #line 4015 "configure"
4015 #include "confdefs.h"
4016 #include <sys/types.h>
4017 #if STDC_HEADERS
4018 #include <stdlib.h>
4019 #include <stddef.h>
4020 #endif
4021 EOF
4022 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4023   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4024   rm -rf conftest*
4025   ac_cv_type_ssize_t=yes
4026 else
4027   rm -rf conftest*
4028   ac_cv_type_ssize_t=no
4029 fi
4030 rm -f conftest*
4031
4032 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4033 if test $ac_cv_type_ssize_t = no; then
4034   { test "$extra_verbose" = "yes" && cat << \EOF
4035     Defining ssize_t = int
4036 EOF
4037 cat >> confdefs.h <<\EOF
4038 #define ssize_t int
4039 EOF
4040 }
4041
4042 fi
4043
4044
4045 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4046 echo "configure:4047: checking for socklen_t" >&5
4047 cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 #include <sys/socket.h>
4051 socklen_t x;
4052
4053 int main() {
4054
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4058   rm -rf conftest*
4059   echo "$ac_t""yes" 1>&6
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   
4065 cat > conftest.$ac_ext <<EOF
4066 #line 4067 "configure"
4067 #include "confdefs.h"
4068 #include <sys/socket.h>
4069 int accept (int, struct sockaddr *, size_t *);
4070
4071 int main() {
4072
4073 ; return 0; }
4074 EOF
4075 if { (eval echo configure:4076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4076   rm -rf conftest*
4077   
4078 echo "$ac_t""size_t" 1>&6
4079 { test "$extra_verbose" = "yes" && cat << \EOF
4080     Defining socklen_t = size_t
4081 EOF
4082 cat >> confdefs.h <<\EOF
4083 #define socklen_t size_t
4084 EOF
4085 }
4086
4087 else
4088   echo "configure: failed program was:" >&5
4089   cat conftest.$ac_ext >&5
4090   rm -rf conftest*
4091   
4092 echo "$ac_t""int" 1>&6
4093 { test "$extra_verbose" = "yes" && cat << \EOF
4094     Defining socklen_t = int
4095 EOF
4096 cat >> confdefs.h <<\EOF
4097 #define socklen_t int
4098 EOF
4099 }
4100
4101 fi
4102 rm -f conftest*
4103 fi
4104 rm -f conftest*
4105
4106 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4107 echo "configure:4108: checking for struct timeval" >&5
4108 cat > conftest.$ac_ext <<EOF
4109 #line 4110 "configure"
4110 #include "confdefs.h"
4111 #ifdef TIME_WITH_SYS_TIME
4112 #include <sys/time.h>
4113 #include <time.h>
4114 #else
4115 #ifdef HAVE_SYS_TIME_H
4116 #include <sys/time.h>
4117 #else
4118 #include <time.h>
4119 #endif
4120 #endif
4121 int main() {
4122 static struct timeval x; x.tv_sec = x.tv_usec;
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4126   rm -rf conftest*
4127   echo "$ac_t""yes" 1>&6
4128   HAVE_TIMEVAL=yes
4129   { test "$extra_verbose" = "yes" && cat << \EOF
4130     Defining HAVE_TIMEVAL
4131 EOF
4132 cat >> confdefs.h <<\EOF
4133 #define HAVE_TIMEVAL 1
4134 EOF
4135 }
4136
4137 else
4138   echo "configure: failed program was:" >&5
4139   cat conftest.$ac_ext >&5
4140   rm -rf conftest*
4141   echo "$ac_t""no" 1>&6
4142    HAVE_TIMEVAL=no
4143 fi
4144 rm -f conftest*
4145
4146 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4147 echo "configure:4148: checking whether struct tm is in sys/time.h or time.h" >&5
4148
4149 cat > conftest.$ac_ext <<EOF
4150 #line 4151 "configure"
4151 #include "confdefs.h"
4152 #include <sys/types.h>
4153 #include <time.h>
4154 int main() {
4155 struct tm *tp; tp->tm_sec;
4156 ; return 0; }
4157 EOF
4158 if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4159   rm -rf conftest*
4160   ac_cv_struct_tm=time.h
4161 else
4162   echo "configure: failed program was:" >&5
4163   cat conftest.$ac_ext >&5
4164   rm -rf conftest*
4165   ac_cv_struct_tm=sys/time.h
4166 fi
4167 rm -f conftest*
4168
4169 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4170 if test $ac_cv_struct_tm = sys/time.h; then
4171   { test "$extra_verbose" = "yes" && cat << \EOF
4172     Defining TM_IN_SYS_TIME
4173 EOF
4174 cat >> confdefs.h <<\EOF
4175 #define TM_IN_SYS_TIME 1
4176 EOF
4177 }
4178
4179 fi
4180
4181 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4182 echo "configure:4183: checking for tm_zone in struct tm" >&5
4183
4184 cat > conftest.$ac_ext <<EOF
4185 #line 4186 "configure"
4186 #include "confdefs.h"
4187 #include <sys/types.h>
4188 #include <$ac_cv_struct_tm>
4189 int main() {
4190 struct tm tm; tm.tm_zone;
4191 ; return 0; }
4192 EOF
4193 if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4194   rm -rf conftest*
4195   ac_cv_struct_tm_zone=yes
4196 else
4197   echo "configure: failed program was:" >&5
4198   cat conftest.$ac_ext >&5
4199   rm -rf conftest*
4200   ac_cv_struct_tm_zone=no
4201 fi
4202 rm -f conftest*
4203
4204 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4205 if test "$ac_cv_struct_tm_zone" = yes; then
4206   { test "$extra_verbose" = "yes" && cat << \EOF
4207     Defining HAVE_TM_ZONE
4208 EOF
4209 cat >> confdefs.h <<\EOF
4210 #define HAVE_TM_ZONE 1
4211 EOF
4212 }
4213
4214 else
4215   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4216 echo "configure:4217: checking for tzname" >&5
4217
4218 cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 #include <time.h>
4222 #ifndef tzname /* For SGI.  */
4223 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4224 #endif
4225 int main() {
4226 atoi(*tzname);
4227 ; return 0; }
4228 EOF
4229 if { (eval echo configure:4230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4230   rm -rf conftest*
4231   ac_cv_var_tzname=yes
4232 else
4233   echo "configure: failed program was:" >&5
4234   cat conftest.$ac_ext >&5
4235   rm -rf conftest*
4236   ac_cv_var_tzname=no
4237 fi
4238 rm -f conftest*
4239
4240 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4241   if test $ac_cv_var_tzname = yes; then
4242     { test "$extra_verbose" = "yes" && cat << \EOF
4243     Defining HAVE_TZNAME
4244 EOF
4245 cat >> confdefs.h <<\EOF
4246 #define HAVE_TZNAME 1
4247 EOF
4248 }
4249
4250   fi
4251 fi
4252
4253
4254 echo $ac_n "checking for working const""... $ac_c" 1>&6
4255 echo "configure:4256: checking for working const" >&5
4256
4257 cat > conftest.$ac_ext <<EOF
4258 #line 4259 "configure"
4259 #include "confdefs.h"
4260
4261 int main() {
4262
4263 /* Ultrix mips cc rejects this.  */
4264 typedef int charset[2]; const charset x;
4265 /* SunOS 4.1.1 cc rejects this.  */
4266 char const *const *ccp;
4267 char **p;
4268 /* NEC SVR4.0.2 mips cc rejects this.  */
4269 struct point {int x, y;};
4270 static struct point const zero = {0,0};
4271 /* AIX XL C 1.02.0.0 rejects this.
4272    It does not let you subtract one const X* pointer from another in an arm
4273    of an if-expression whose if-part is not a constant expression */
4274 const char *g = "string";
4275 ccp = &g + (g ? g-g : 0);
4276 /* HPUX 7.0 cc rejects these. */
4277 ++ccp;
4278 p = (char**) ccp;
4279 ccp = (char const *const *) p;
4280 { /* SCO 3.2v4 cc rejects this.  */
4281   char *t;
4282   char const *s = 0 ? (char *) 0 : (char const *) 0;
4283
4284   *t++ = 0;
4285 }
4286 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4287   int x[] = {25, 17};
4288   const int *foo = &x[0];
4289   ++foo;
4290 }
4291 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4292   typedef const int *iptr;
4293   iptr p = 0;
4294   ++p;
4295 }
4296 { /* AIX XL C 1.02.0.0 rejects this saying
4297      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4298   struct s { int j; const int *ap[3]; };
4299   struct s *b; b->j = 5;
4300 }
4301 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4302   const int foo = 10;
4303 }
4304
4305 ; return 0; }
4306 EOF
4307 if { (eval echo configure:4308: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4308   rm -rf conftest*
4309   ac_cv_c_const=yes
4310 else
4311   echo "configure: failed program was:" >&5
4312   cat conftest.$ac_ext >&5
4313   rm -rf conftest*
4314   ac_cv_c_const=no
4315 fi
4316 rm -f conftest*
4317
4318 echo "$ac_t""$ac_cv_c_const" 1>&6
4319 if test $ac_cv_c_const = no; then
4320   { test "$extra_verbose" = "yes" && cat << \EOF
4321     Defining const = 
4322 EOF
4323 cat >> confdefs.h <<\EOF
4324 #define const 
4325 EOF
4326 }
4327
4328 fi
4329
4330
4331 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4332 echo "configure:4333: checking whether ${MAKE-make} sets \${MAKE}" >&5
4333 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4334
4335 cat > conftestmake <<\EOF
4336 all:
4337         @echo 'ac_maketemp="${MAKE}"'
4338 EOF
4339 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4340 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4341 if test -n "$ac_maketemp"; then
4342   eval ac_cv_prog_make_${ac_make}_set=yes
4343 else
4344   eval ac_cv_prog_make_${ac_make}_set=no
4345 fi
4346 rm -f conftestmake
4347 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4348   echo "$ac_t""yes" 1>&6
4349   SET_MAKE=
4350 else
4351   echo "$ac_t""no" 1>&6
4352   SET_MAKE="MAKE=${MAKE-make}"
4353 fi
4354
4355
4356 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4357 echo "configure:4358: checking whether byte ordering is bigendian" >&5
4358
4359 ac_cv_c_bigendian=unknown
4360 # See if sys/param.h defines the BYTE_ORDER macro.
4361 cat > conftest.$ac_ext <<EOF
4362 #line 4363 "configure"
4363 #include "confdefs.h"
4364 #include <sys/types.h>
4365 #include <sys/param.h>
4366 int main() {
4367
4368 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4369  bogus endian macros
4370 #endif
4371 ; return 0; }
4372 EOF
4373 if { (eval echo configure:4374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4374   rm -rf conftest*
4375   # It does; now see whether it defined to BIG_ENDIAN or not.
4376 cat > conftest.$ac_ext <<EOF
4377 #line 4378 "configure"
4378 #include "confdefs.h"
4379 #include <sys/types.h>
4380 #include <sys/param.h>
4381 int main() {
4382
4383 #if BYTE_ORDER != BIG_ENDIAN
4384  not big endian
4385 #endif
4386 ; return 0; }
4387 EOF
4388 if { (eval echo configure:4389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4389   rm -rf conftest*
4390   ac_cv_c_bigendian=yes
4391 else
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -rf conftest*
4395   ac_cv_c_bigendian=no
4396 fi
4397 rm -f conftest*
4398 else
4399   echo "configure: failed program was:" >&5
4400   cat conftest.$ac_ext >&5
4401 fi
4402 rm -f conftest*
4403 if test $ac_cv_c_bigendian = unknown; then
4404 cat > conftest.$ac_ext <<EOF
4405 #line 4406 "configure"
4406 #include "confdefs.h"
4407 main () {
4408   /* Are we little or big endian?  From Harbison&Steele.  */
4409   union
4410   {
4411     long l;
4412     char c[sizeof (long)];
4413   } u;
4414   u.l = 1;
4415   exit (u.c[sizeof (long) - 1] == 1);
4416 }
4417 EOF
4418 if { (eval echo configure:4419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4419 then
4420   ac_cv_c_bigendian=no
4421 else
4422   conftest_rc="$?"
4423   echo "configure: failed program was:" >&5
4424   cat conftest.$ac_ext >&5
4425   rm -fr conftest*
4426   ac_cv_c_bigendian=yes
4427 fi
4428 rm -fr conftest*
4429 fi
4430
4431 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4432 if test $ac_cv_c_bigendian = yes; then
4433   { test "$extra_verbose" = "yes" && cat << \EOF
4434     Defining WORDS_BIGENDIAN
4435 EOF
4436 cat >> confdefs.h <<\EOF
4437 #define WORDS_BIGENDIAN 1
4438 EOF
4439 }
4440
4441 fi
4442
4443
4444 echo $ac_n "checking size of short""... $ac_c" 1>&6
4445 echo "configure:4446: checking size of short" >&5
4446
4447 cat > conftest.$ac_ext <<EOF
4448 #line 4449 "configure"
4449 #include "confdefs.h"
4450 #include <stdio.h>
4451 #include <sys/types.h>
4452 main()
4453 {
4454   FILE *f=fopen("conftestval", "w");
4455   if (!f) exit(1);
4456   fprintf(f, "%d\n", sizeof(short));
4457   exit(0);
4458 }
4459 EOF
4460 if { (eval echo configure:4461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4461 then
4462   ac_cv_sizeof_short=`cat conftestval`
4463 else
4464   conftest_rc="$?"
4465   echo "configure: failed program was:" >&5
4466   cat conftest.$ac_ext >&5
4467   rm -fr conftest*
4468   ac_cv_sizeof_short=0
4469 fi
4470 rm -fr conftest*
4471 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4472 { test "$extra_verbose" = "yes" && cat << EOF
4473     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4474 EOF
4475 cat >> confdefs.h <<EOF
4476 #define SIZEOF_SHORT $ac_cv_sizeof_short
4477 EOF
4478 }
4479
4480
4481 if test "$ac_cv_sizeof_short" = 0; then
4482   echo ""
4483   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4484   echo "*** PANIC *** Please examine config.log for compilation errors."
4485   exit 1
4486 fi
4487 echo $ac_n "checking size of int""... $ac_c" 1>&6
4488 echo "configure:4489: checking size of int" >&5
4489
4490 cat > conftest.$ac_ext <<EOF
4491 #line 4492 "configure"
4492 #include "confdefs.h"
4493 #include <stdio.h>
4494 #include <sys/types.h>
4495 main()
4496 {
4497   FILE *f=fopen("conftestval", "w");
4498   if (!f) exit(1);
4499   fprintf(f, "%d\n", sizeof(int));
4500   exit(0);
4501 }
4502 EOF
4503 if { (eval echo configure:4504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4504 then
4505   ac_cv_sizeof_int=`cat conftestval`
4506 else
4507   conftest_rc="$?"
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -fr conftest*
4511   ac_cv_sizeof_int=0
4512 fi
4513 rm -fr conftest*
4514 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4515 { test "$extra_verbose" = "yes" && cat << EOF
4516     Defining SIZEOF_INT = $ac_cv_sizeof_int
4517 EOF
4518 cat >> confdefs.h <<EOF
4519 #define SIZEOF_INT $ac_cv_sizeof_int
4520 EOF
4521 }
4522
4523
4524 echo $ac_n "checking size of long""... $ac_c" 1>&6
4525 echo "configure:4526: checking size of long" >&5
4526
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <stdio.h>
4531 #include <sys/types.h>
4532 main()
4533 {
4534   FILE *f=fopen("conftestval", "w");
4535   if (!f) exit(1);
4536   fprintf(f, "%d\n", sizeof(long));
4537   exit(0);
4538 }
4539 EOF
4540 if { (eval echo configure:4541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4541 then
4542   ac_cv_sizeof_long=`cat conftestval`
4543 else
4544   conftest_rc="$?"
4545   echo "configure: failed program was:" >&5
4546   cat conftest.$ac_ext >&5
4547   rm -fr conftest*
4548   ac_cv_sizeof_long=0
4549 fi
4550 rm -fr conftest*
4551 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4552 { test "$extra_verbose" = "yes" && cat << EOF
4553     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4554 EOF
4555 cat >> confdefs.h <<EOF
4556 #define SIZEOF_LONG $ac_cv_sizeof_long
4557 EOF
4558 }
4559
4560
4561 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4562 echo "configure:4563: checking size of long long" >&5
4563
4564 cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <stdio.h>
4568 #include <sys/types.h>
4569 main()
4570 {
4571   FILE *f=fopen("conftestval", "w");
4572   if (!f) exit(1);
4573   fprintf(f, "%d\n", sizeof(long long));
4574   exit(0);
4575 }
4576 EOF
4577 if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4578 then
4579   ac_cv_sizeof_long_long=`cat conftestval`
4580 else
4581   conftest_rc="$?"
4582   echo "configure: failed program was:" >&5
4583   cat conftest.$ac_ext >&5
4584   rm -fr conftest*
4585   ac_cv_sizeof_long_long=0
4586 fi
4587 rm -fr conftest*
4588 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4589 { test "$extra_verbose" = "yes" && cat << EOF
4590     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4591 EOF
4592 cat >> confdefs.h <<EOF
4593 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4594 EOF
4595 }
4596
4597
4598 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4599 echo "configure:4600: checking size of void *" >&5
4600
4601 cat > conftest.$ac_ext <<EOF
4602 #line 4603 "configure"
4603 #include "confdefs.h"
4604 #include <stdio.h>
4605 #include <sys/types.h>
4606 main()
4607 {
4608   FILE *f=fopen("conftestval", "w");
4609   if (!f) exit(1);
4610   fprintf(f, "%d\n", sizeof(void *));
4611   exit(0);
4612 }
4613 EOF
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4615 then
4616   ac_cv_sizeof_void_p=`cat conftestval`
4617 else
4618   conftest_rc="$?"
4619   echo "configure: failed program was:" >&5
4620   cat conftest.$ac_ext >&5
4621   rm -fr conftest*
4622   ac_cv_sizeof_void_p=0
4623 fi
4624 rm -fr conftest*
4625 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4626 { test "$extra_verbose" = "yes" && cat << EOF
4627     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4628 EOF
4629 cat >> confdefs.h <<EOF
4630 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4631 EOF
4632 }
4633
4634
4635
4636 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4637 echo "configure:4638: checking for long file names" >&5
4638
4639 ac_cv_sys_long_file_names=yes
4640 # Test for long file names in all the places we know might matter:
4641 #      .                the current directory, where building will happen
4642 #      $prefix/lib      where we will be installing things
4643 #      $exec_prefix/lib likewise
4644 # eval it to expand exec_prefix.
4645 #      $TMPDIR          if set, where it might want to write temporary files
4646 # if $TMPDIR is not set:
4647 #      /tmp             where it might want to write temporary files
4648 #      /var/tmp         likewise
4649 #      /usr/tmp         likewise
4650 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4651   ac_tmpdirs="$TMPDIR"
4652 else
4653   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4654 fi
4655 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4656   test -d $ac_dir || continue
4657   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4658   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4659   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4660   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4661   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4662     ac_cv_sys_long_file_names=no
4663     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4664     break
4665   fi
4666   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4667 done
4668
4669 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4670 if test $ac_cv_sys_long_file_names = yes; then
4671   { test "$extra_verbose" = "yes" && cat << \EOF
4672     Defining HAVE_LONG_FILE_NAMES
4673 EOF
4674 cat >> confdefs.h <<\EOF
4675 #define HAVE_LONG_FILE_NAMES 1
4676 EOF
4677 }
4678
4679 fi
4680
4681
4682 echo $ac_n "checking for sin""... $ac_c" 1>&6
4683 echo "configure:4684: checking for sin" >&5
4684
4685 cat > conftest.$ac_ext <<EOF
4686 #line 4687 "configure"
4687 #include "confdefs.h"
4688 /* System header to define __stub macros and hopefully few prototypes,
4689     which can conflict with char sin(); below.  */
4690 #include <assert.h>
4691 /* Override any gcc2 internal prototype to avoid an error.  */
4692 /* We use char because int might match the return type of a gcc2
4693     builtin and then its argument prototype would still apply.  */
4694 char sin();
4695
4696 int main() {
4697
4698 /* The GNU C library defines this for functions which it implements
4699     to always fail with ENOSYS.  Some functions are actually named
4700     something starting with __ and the normal name is an alias.  */
4701 #if defined (__stub_sin) || defined (__stub___sin)
4702 choke me
4703 #else
4704 sin();
4705 #endif
4706
4707 ; return 0; }
4708 EOF
4709 if { (eval echo configure:4710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4710   rm -rf conftest*
4711   eval "ac_cv_func_sin=yes"
4712 else
4713   echo "configure: failed program was:" >&5
4714   cat conftest.$ac_ext >&5
4715   rm -rf conftest*
4716   eval "ac_cv_func_sin=no"
4717 fi
4718 rm -f conftest*
4719
4720 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4721   echo "$ac_t""yes" 1>&6
4722   :
4723 else
4724   echo "$ac_t""no" 1>&6
4725
4726 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4727 echo "configure:4728: checking for sin in -lm" >&5
4728 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4729
4730 xe_check_libs=" -lm "
4731 cat > conftest.$ac_ext <<EOF
4732 #line 4733 "configure"
4733 #include "confdefs.h"
4734 /* Override any gcc2 internal prototype to avoid an error.  */
4735 /* We use char because int might match the return type of a gcc2
4736     builtin and then its argument prototype would still apply.  */
4737 char sin();
4738
4739 int main() {
4740 sin()
4741 ; return 0; }
4742 EOF
4743 if { (eval echo configure:4744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4744   rm -rf conftest*
4745   eval "ac_cv_lib_$ac_lib_var=yes"
4746 else
4747   echo "configure: failed program was:" >&5
4748   cat conftest.$ac_ext >&5
4749   rm -rf conftest*
4750   eval "ac_cv_lib_$ac_lib_var=no"
4751 fi
4752 rm -f conftest*
4753 xe_check_libs=""
4754
4755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4756   echo "$ac_t""yes" 1>&6
4757     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4758     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4759   { test "$extra_verbose" = "yes" && cat << EOF
4760     Defining $ac_tr_lib
4761 EOF
4762 cat >> confdefs.h <<EOF
4763 #define $ac_tr_lib 1
4764 EOF
4765 }
4766
4767   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4768
4769 else
4770   echo "$ac_t""no" 1>&6
4771 fi
4772
4773
4774 fi
4775
4776
4777 { test "$extra_verbose" = "yes" && cat << \EOF
4778     Defining LISP_FLOAT_TYPE
4779 EOF
4780 cat >> confdefs.h <<\EOF
4781 #define LISP_FLOAT_TYPE 1
4782 EOF
4783 }
4784
4785
4786 cat > conftest.$ac_ext <<EOF
4787 #line 4788 "configure"
4788 #include "confdefs.h"
4789 #include <math.h>
4790 int main() {
4791 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4792 ; return 0; }
4793 EOF
4794 if { (eval echo configure:4795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4795   rm -rf conftest*
4796   { test "$extra_verbose" = "yes" && cat << \EOF
4797     Defining HAVE_INVERSE_HYPERBOLIC
4798 EOF
4799 cat >> confdefs.h <<\EOF
4800 #define HAVE_INVERSE_HYPERBOLIC 1
4801 EOF
4802 }
4803
4804 else
4805   echo "configure: failed program was:" >&5
4806   cat conftest.$ac_ext >&5
4807 fi
4808 rm -f conftest*
4809
4810 echo "checking type of mail spool file locking" 1>&6
4811 echo "configure:4812: checking type of mail spool file locking" >&5
4812 for ac_func in lockf flock
4813 do
4814 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4815 echo "configure:4816: checking for $ac_func" >&5
4816
4817 cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820 /* System header to define __stub macros and hopefully few prototypes,
4821     which can conflict with char $ac_func(); below.  */
4822 #include <assert.h>
4823 /* Override any gcc2 internal prototype to avoid an error.  */
4824 /* We use char because int might match the return type of a gcc2
4825     builtin and then its argument prototype would still apply.  */
4826 char $ac_func();
4827
4828 int main() {
4829
4830 /* The GNU C library defines this for functions which it implements
4831     to always fail with ENOSYS.  Some functions are actually named
4832     something starting with __ and the normal name is an alias.  */
4833 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4834 choke me
4835 #else
4836 $ac_func();
4837 #endif
4838
4839 ; return 0; }
4840 EOF
4841 if { (eval echo configure:4842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4842   rm -rf conftest*
4843   eval "ac_cv_func_$ac_func=yes"
4844 else
4845   echo "configure: failed program was:" >&5
4846   cat conftest.$ac_ext >&5
4847   rm -rf conftest*
4848   eval "ac_cv_func_$ac_func=no"
4849 fi
4850 rm -f conftest*
4851
4852 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4853   echo "$ac_t""yes" 1>&6
4854     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4855   { test "$extra_verbose" = "yes" && cat << EOF
4856     Defining $ac_tr_func
4857 EOF
4858 cat >> confdefs.h <<EOF
4859 #define $ac_tr_func 1
4860 EOF
4861 }
4862  
4863 else
4864   echo "$ac_t""no" 1>&6
4865 fi
4866 done
4867
4868 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4869 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4870 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4871 if   test -z "$mail_locking"; then
4872   case "$opsys" in cygwin* | mingw*)
4873     mail_locking=pop ;;
4874   esac
4875 fi
4876
4877 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4878     Defining MAIL_LOCK_LOCKF
4879 EOF
4880 cat >> confdefs.h <<\EOF
4881 #define MAIL_LOCK_LOCKF 1
4882 EOF
4883 }
4884
4885 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4886     Defining MAIL_LOCK_FLOCK
4887 EOF
4888 cat >> confdefs.h <<\EOF
4889 #define MAIL_LOCK_FLOCK 1
4890 EOF
4891 }
4892
4893 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4894     Defining MAIL_LOCK_LOCKING
4895 EOF
4896 cat >> confdefs.h <<\EOF
4897 #define MAIL_LOCK_LOCKING 1
4898 EOF
4899 }
4900
4901 elif test "$mail_locking" = "pop"; then
4902   with_pop=yes
4903   mail_locking=
4904 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4905     Defining MAIL_LOCK_DOT
4906 EOF
4907 cat >> confdefs.h <<\EOF
4908 #define MAIL_LOCK_DOT 1
4909 EOF
4910 }
4911
4912 fi
4913 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4914   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4915 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4916   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4917 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4918   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4919
4920 case "$opsys" in decosf*)
4921   
4922 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4923 echo "configure:4924: checking for cma_open in -lpthreads" >&5
4924 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4925
4926 xe_check_libs=" -lpthreads "
4927 cat > conftest.$ac_ext <<EOF
4928 #line 4929 "configure"
4929 #include "confdefs.h"
4930 /* Override any gcc2 internal prototype to avoid an error.  */
4931 /* We use char because int might match the return type of a gcc2
4932     builtin and then its argument prototype would still apply.  */
4933 char cma_open();
4934
4935 int main() {
4936 cma_open()
4937 ; return 0; }
4938 EOF
4939 if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4940   rm -rf conftest*
4941   eval "ac_cv_lib_$ac_lib_var=yes"
4942 else
4943   echo "configure: failed program was:" >&5
4944   cat conftest.$ac_ext >&5
4945   rm -rf conftest*
4946   eval "ac_cv_lib_$ac_lib_var=no"
4947 fi
4948 rm -f conftest*
4949 xe_check_libs=""
4950
4951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4952   echo "$ac_t""yes" 1>&6
4953     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4954     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4955   { test "$extra_verbose" = "yes" && cat << EOF
4956     Defining $ac_tr_lib
4957 EOF
4958 cat >> confdefs.h <<EOF
4959 #define $ac_tr_lib 1
4960 EOF
4961 }
4962
4963   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4964
4965 else
4966   echo "$ac_t""no" 1>&6
4967 fi
4968
4969
4970   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4971     c_switch_site="$c_switch_site -threads" ;;
4972 esac
4973
4974 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4975 echo "configure:4976: checking whether the -xildoff compiler flag is required" >&5
4976 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4977   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4978     then echo "$ac_t""no" 1>&6;
4979     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
4980   fi
4981   else echo "$ac_t""no" 1>&6
4982 fi
4983
4984 if test "$opsys" = "sol2"; then
4985   if test "$os_release" -ge 56; then
4986     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4987 echo "configure:4988: checking for \"-z ignore\" linker flag" >&5
4988     case "`ld -h 2>&1`" in
4989       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4990         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4991       *) echo "$ac_t""no" 1>&6 ;;
4992     esac
4993   fi
4994 fi
4995
4996
4997 echo "checking "for specified window system"" 1>&6
4998 echo "configure:4999: checking "for specified window system"" >&5
4999
5000
5001 GNOME_CONFIG=no
5002 GTK_CONFIG=no
5003
5004 if test "$with_gnome" != "no"; then
5005    echo $ac_n "checking for GNOME configuration script""... $ac_c" 1>&6
5006 echo "configure:5007: checking for GNOME configuration script" >&5
5007    for possible in gnome-config
5008    do
5009       possible_version=`${possible} --version 2> /dev/null`
5010       if test "x${possible_version}" != "x"; then
5011               GNOME_CONFIG="${possible}"
5012               with_gnome=yes
5013               with_gtk=yes
5014               break
5015       fi
5016    done
5017    echo "$ac_t""${GNOME_CONFIG}" 1>&6
5018 fi
5019
5020 if test "${GNOME_CONFIG}" != "no"; then
5021       GNOME_LIBS=`${GNOME_CONFIG} --libs gnomeui`
5022       GNOME_CFLAGS=`${GNOME_CONFIG} --cflags gnomeui`
5023       { test "$extra_verbose" = "yes" && cat << \EOF
5024     Defining HAVE_GNOME
5025 EOF
5026 cat >> confdefs.h <<\EOF
5027 #define HAVE_GNOME 1
5028 EOF
5029 }
5030
5031       libs_gtk="$libs_gtk ${GNOME_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_LIBS}\" to \$libs_gtk"; fi
5032       c_switch_gtk="$c_switch_gtk ${GNOME_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GNOME_CFLAGS}\" to \$c_switch_gtk"; fi
5033 fi
5034
5035 if test "$with_gtk" != "no";then
5036    echo $ac_n "checking for GTK configuration script""... $ac_c" 1>&6
5037 echo "configure:5038: checking for GTK configuration script" >&5
5038    for possible in gtk12-config gtk14-config gtk-config
5039    do
5040       possible_version=`${possible} --version 2> /dev/null`
5041       if test "x${possible_version}" != "x"; then
5042               GTK_CONFIG="${possible}"
5043       fi
5044       case "${possible_version}" in
5045         1.0.*) echo "configure: warning: GTK 1.2 is required, please upgrade your version of GTK." 1>&2; with_gtk=no;;
5046         1.3.*) echo "configure: warning: GTK 1.3 is not supported right now" 1>&2; with_gtk=no;;
5047         1.2.*)
5048                 with_gtk=yes
5049                 break
5050                 ;;
5051         *)     echo "configure: warning: Found unsupported version of GTK: $possible_version" 1>&2;;
5052       esac
5053    done
5054    echo "$ac_t""${GTK_CONFIG}" 1>&6
5055 fi
5056
5057 if test "${GTK_CONFIG}" != "no"; then
5058       echo $ac_n "checking gtk version""... $ac_c" 1>&6
5059 echo "configure:5060: checking gtk version" >&5
5060       GTK_VERSION=`${GTK_CONFIG} --version`
5061       echo "$ac_t""${GTK_VERSION}" 1>&6
5062
5063       echo $ac_n "checking gtk libs""... $ac_c" 1>&6
5064 echo "configure:5065: checking gtk libs" >&5
5065       GTK_LIBS=`${GTK_CONFIG} --libs`
5066       libs_gtk="$libs_gtk ${GTK_LIBS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_LIBS}\" to \$libs_gtk"; fi
5067       echo "$ac_t""${GTK_LIBS}" 1>&6
5068
5069       echo $ac_n "checking gtk cflags""... $ac_c" 1>&6
5070 echo "configure:5071: checking gtk cflags" >&5
5071       GTK_CFLAGS=`${GTK_CONFIG} --cflags`
5072       c_switch_gtk="$c_switch_gtk ${GTK_CFLAGS}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"${GTK_CFLAGS}\" to \$c_switch_gtk"; fi
5073       echo "$ac_t""${GTK_CFLAGS}" 1>&6
5074
5075       
5076 echo $ac_n "checking for main in -lgdk_imlib""... $ac_c" 1>&6
5077 echo "configure:5078: checking for main in -lgdk_imlib" >&5
5078 ac_lib_var=`echo gdk_imlib'_'main | sed 'y%./+-%__p_%'`
5079
5080 xe_check_libs=" -lgdk_imlib "
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086 main()
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5090   rm -rf conftest*
5091   eval "ac_cv_lib_$ac_lib_var=yes"
5092 else
5093   echo "configure: failed program was:" >&5
5094   cat conftest.$ac_ext >&5
5095   rm -rf conftest*
5096   eval "ac_cv_lib_$ac_lib_var=no"
5097 fi
5098 rm -f conftest*
5099 xe_check_libs=""
5100
5101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5102   echo "$ac_t""yes" 1>&6
5103   libs_gtk="-lgdk_imlib $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdk_imlib\" to \$libs_gtk"; fi
5104 else
5105   echo "$ac_t""no" 1>&6
5106 fi
5107
5108
5109       
5110 echo $ac_n "checking for Imlib_init in -lImlib""... $ac_c" 1>&6
5111 echo "configure:5112: checking for Imlib_init in -lImlib" >&5
5112 ac_lib_var=`echo Imlib'_'Imlib_init | sed 'y%./+-%__p_%'`
5113
5114 xe_check_libs=" -lImlib "
5115 cat > conftest.$ac_ext <<EOF
5116 #line 5117 "configure"
5117 #include "confdefs.h"
5118 /* Override any gcc2 internal prototype to avoid an error.  */
5119 /* We use char because int might match the return type of a gcc2
5120     builtin and then its argument prototype would still apply.  */
5121 char Imlib_init();
5122
5123 int main() {
5124 Imlib_init()
5125 ; return 0; }
5126 EOF
5127 if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5128   rm -rf conftest*
5129   eval "ac_cv_lib_$ac_lib_var=yes"
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
5134   eval "ac_cv_lib_$ac_lib_var=no"
5135 fi
5136 rm -f conftest*
5137 xe_check_libs=""
5138
5139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5140   echo "$ac_t""yes" 1>&6
5141   libs_gtk="$libs_gtk -lImlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lImlib\" to \$libs_gtk"; fi
5142 else
5143   echo "$ac_t""no" 1>&6
5144 fi
5145
5146
5147       for ac_func in gdk_imlib_init
5148 do
5149 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5150 echo "configure:5151: checking for $ac_func" >&5
5151
5152 cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 /* System header to define __stub macros and hopefully few prototypes,
5156     which can conflict with char $ac_func(); below.  */
5157 #include <assert.h>
5158 /* Override any gcc2 internal prototype to avoid an error.  */
5159 /* We use char because int might match the return type of a gcc2
5160     builtin and then its argument prototype would still apply.  */
5161 char $ac_func();
5162
5163 int main() {
5164
5165 /* The GNU C library defines this for functions which it implements
5166     to always fail with ENOSYS.  Some functions are actually named
5167     something starting with __ and the normal name is an alias.  */
5168 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5169 choke me
5170 #else
5171 $ac_func();
5172 #endif
5173
5174 ; return 0; }
5175 EOF
5176 if { (eval echo configure:5177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5177   rm -rf conftest*
5178   eval "ac_cv_func_$ac_func=yes"
5179 else
5180   echo "configure: failed program was:" >&5
5181   cat conftest.$ac_ext >&5
5182   rm -rf conftest*
5183   eval "ac_cv_func_$ac_func=no"
5184 fi
5185 rm -f conftest*
5186
5187 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5188   echo "$ac_t""yes" 1>&6
5189     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5190   { test "$extra_verbose" = "yes" && cat << EOF
5191     Defining $ac_tr_func
5192 EOF
5193 cat >> confdefs.h <<EOF
5194 #define $ac_tr_func 1
5195 EOF
5196 }
5197  
5198 else
5199   echo "$ac_t""no" 1>&6
5200 fi
5201 done
5202
5203
5204       { test "$extra_verbose" = "yes" && cat << \EOF
5205     Defining HAVE_XPM
5206 EOF
5207 cat >> confdefs.h <<\EOF
5208 #define HAVE_XPM 1
5209 EOF
5210 }
5211
5212       { test "$extra_verbose" = "yes" && cat << \EOF
5213     Defining HAVE_GTK
5214 EOF
5215 cat >> confdefs.h <<\EOF
5216 #define HAVE_GTK 1
5217 EOF
5218 }
5219
5220       
5221
5222       window_system=gtk
5223       with_gtk=yes
5224       with_x11=no
5225
5226       test "${with_scrollbars}" != "no" && with_scrollbars=gtk
5227       test "${with_toolbars}" != no && with_toolbars=gtk
5228       test "${with_menubars}" != "no" && with_menubars=gtk
5229       test "${with_dialogs}" != "no" && with_dialogs=gtk
5230       test "${with_widgets}" != "no" && with_widgets=gtk
5231
5232       extra_objs="$extra_objs console-gtk.o device-gtk.o event-gtk.o frame-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5233    echo "    xemacs will be linked with \"console-gtk.o device-gtk.o event-gtk.o frame-gtk.o\""
5234  fi
5235       extra_objs="$extra_objs objects-gtk.o redisplay-gtk.o glyphs-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5236    echo "    xemacs will be linked with \"objects-gtk.o redisplay-gtk.o glyphs-gtk.o\""
5237  fi
5238       extra_objs="$extra_objs select-gtk.o gccache-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5239    echo "    xemacs will be linked with \"select-gtk.o gccache-gtk.o\""
5240  fi
5241       extra_objs="$extra_objs gtk-xemacs.o ui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
5242    echo "    xemacs will be linked with \"gtk-xemacs.o ui-gtk.o\""
5243  fi
5244
5245             OLD_CFLAGS="${CFLAGS}"
5246       OLD_LDFLAGS="${LDFLAGS}"
5247       CFLAGS="${GTK_CFLAGS} ${CFLAGS}"
5248       LDFLAGS="${LDFLAGS} ${GTK_LIBS}"
5249       for ac_hdr in glade/glade.h glade.h
5250 do
5251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5253 echo "configure:5254: checking for $ac_hdr" >&5
5254
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5258 #include <$ac_hdr>
5259 EOF
5260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5261 { (eval echo configure:5262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5263 if test -z "$ac_err"; then
5264   rm -rf conftest*
5265   eval "ac_cv_header_$ac_safe=yes"
5266 else
5267   echo "$ac_err" >&5
5268   echo "configure: failed program was:" >&5
5269   cat conftest.$ac_ext >&5
5270   rm -rf conftest*
5271   eval "ac_cv_header_$ac_safe=no"
5272 fi
5273 rm -f conftest*
5274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5275   echo "$ac_t""yes" 1>&6
5276     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5277   { test "$extra_verbose" = "yes" && cat << EOF
5278     Defining $ac_tr_hdr
5279 EOF
5280 cat >> confdefs.h <<EOF
5281 #define $ac_tr_hdr 1
5282 EOF
5283 }
5284  
5285 else
5286   echo "$ac_t""no" 1>&6
5287 fi
5288 done
5289
5290       
5291 echo $ac_n "checking for main in -lxml""... $ac_c" 1>&6
5292 echo "configure:5293: checking for main in -lxml" >&5
5293 ac_lib_var=`echo xml'_'main | sed 'y%./+-%__p_%'`
5294
5295 xe_check_libs=" -lxml "
5296 cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 main()
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305   rm -rf conftest*
5306   eval "ac_cv_lib_$ac_lib_var=yes"
5307 else
5308   echo "configure: failed program was:" >&5
5309   cat conftest.$ac_ext >&5
5310   rm -rf conftest*
5311   eval "ac_cv_lib_$ac_lib_var=no"
5312 fi
5313 rm -f conftest*
5314 xe_check_libs=""
5315
5316 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5317   echo "$ac_t""yes" 1>&6
5318   libs_gtk="-lxml $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lxml\" to \$libs_gtk"; fi
5319 else
5320   echo "$ac_t""no" 1>&6
5321 fi
5322
5323
5324       
5325 echo $ac_n "checking for main in -lglade""... $ac_c" 1>&6
5326 echo "configure:5327: checking for main in -lglade" >&5
5327 ac_lib_var=`echo glade'_'main | sed 'y%./+-%__p_%'`
5328
5329 xe_check_libs=" -lglade "
5330 cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333
5334 int main() {
5335 main()
5336 ; return 0; }
5337 EOF
5338 if { (eval echo configure:5339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5339   rm -rf conftest*
5340   eval "ac_cv_lib_$ac_lib_var=yes"
5341 else
5342   echo "configure: failed program was:" >&5
5343   cat conftest.$ac_ext >&5
5344   rm -rf conftest*
5345   eval "ac_cv_lib_$ac_lib_var=no"
5346 fi
5347 rm -f conftest*
5348 xe_check_libs=""
5349
5350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5351   echo "$ac_t""yes" 1>&6
5352   libs_gtk="-lglade $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade\" to \$libs_gtk"; fi
5353 else
5354   echo "$ac_t""no" 1>&6
5355 fi
5356
5357
5358       
5359 echo $ac_n "checking for main in -lglade-gnome""... $ac_c" 1>&6
5360 echo "configure:5361: checking for main in -lglade-gnome" >&5
5361 ac_lib_var=`echo glade-gnome'_'main | sed 'y%./+-%__p_%'`
5362
5363 xe_check_libs=" -lglade-gnome "
5364 cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367
5368 int main() {
5369 main()
5370 ; return 0; }
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5373   rm -rf conftest*
5374   eval "ac_cv_lib_$ac_lib_var=yes"
5375 else
5376   echo "configure: failed program was:" >&5
5377   cat conftest.$ac_ext >&5
5378   rm -rf conftest*
5379   eval "ac_cv_lib_$ac_lib_var=no"
5380 fi
5381 rm -f conftest*
5382 xe_check_libs=""
5383
5384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5385   echo "$ac_t""yes" 1>&6
5386   libs_gtk="-lglade-gnome $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lglade-gnome\" to \$libs_gtk"; fi
5387 else
5388   echo "$ac_t""no" 1>&6
5389 fi
5390
5391
5392       cat > conftest.$ac_ext <<EOF
5393 #line 5394 "configure"
5394 #include "confdefs.h"
5395 #include <glade/glade-xml.h>
5396 EOF
5397 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5398   egrep "char \*txtdomain;" >/dev/null 2>&1; then
5399   rm -rf conftest*
5400   echo "$ac_t""yes" 1>&6
5401                        { test "$extra_verbose" = "yes" && cat << \EOF
5402     Defining LIBGLADE_XML_TXTDOMAIN = 1
5403 EOF
5404 cat >> confdefs.h <<\EOF
5405 #define LIBGLADE_XML_TXTDOMAIN 1
5406 EOF
5407 }
5408
5409 else
5410   rm -rf conftest*
5411   echo "$ac_t""no" 1>&6
5412 fi
5413 rm -f conftest*
5414
5415       CFLAGS="${OLD_CFLAGS}"
5416       LDFLAGS="${OLD_LDFLAGS}"
5417 fi
5418
5419
5420 if test "$with_x11" != "no"; then
5421     test "$x_includes $x_libraries" != "NONE NONE" && \
5422    window_system=x11 with_x11=yes
5423
5424         
5425       if test "$x_includes $x_libraries" = "NONE NONE" \
5426     -a -n "$OPENWINHOME" \
5427     -a "$OPENWINHOME" != "/usr/openwin" \
5428     -a -d "$OPENWINHOME"; then
5429       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5430       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5431       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5432   fi
5433
5434   if test "$x_includes" = "NONE"; then
5435                     for dir in "/usr/X11" "/usr/X11R6"; do
5436       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5437     done
5438   fi
5439
5440   if test "$x_libraries" = "NONE"; then
5441     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5442       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5443     done
5444   fi
5445
5446   # If we find X, set shell vars x_includes and x_libraries to the
5447 # paths, otherwise set no_x=yes.
5448 # Uses ac_ vars as temps to allow command line to override cache and checks.
5449 # --without-x overrides everything else, but does not touch the cache.
5450 echo $ac_n "checking for X""... $ac_c" 1>&6
5451 echo "configure:5452: checking for X" >&5
5452
5453 # Check whether --with-x or --without-x was given.
5454 if test "${with_x+set}" = set; then
5455   withval="$with_x"
5456   :
5457 fi
5458
5459 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5460 if test "x$with_x" = xno; then
5461   # The user explicitly disabled X.
5462   have_x=disabled
5463 else
5464   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5465     # Both variables are already set.
5466     have_x=yes
5467   else
5468
5469 # One or both of the vars are not set, and there is no cached value.
5470 ac_x_includes=NO ac_x_libraries=NO
5471 rm -fr conftestdir
5472 if mkdir conftestdir; then
5473   cd conftestdir
5474   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5475   cat > Imakefile <<'EOF'
5476 acfindx:
5477         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5478 EOF
5479   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5480     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5481     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5482     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5483     for ac_extension in a so sl; do
5484       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5485         test -f $ac_im_libdir/libX11.$ac_extension; then
5486         ac_im_usrlibdir=$ac_im_libdir; break
5487       fi
5488     done
5489     # Screen out bogus values from the imake configuration.  They are
5490     # bogus both because they are the default anyway, and because
5491     # using them would break gcc on systems where it needs fixed includes.
5492     case "$ac_im_incroot" in
5493         /usr/include) ;;
5494         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5495     esac
5496     case "$ac_im_usrlibdir" in
5497         /usr/lib | /lib) ;;
5498         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5499     esac
5500   fi
5501   cd ..
5502   rm -fr conftestdir
5503 fi
5504
5505 if test "$ac_x_includes" = NO; then
5506   # Guess where to find include files, by looking for this one X11 .h file.
5507   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5508
5509   # First, try using that file with no special directory specified.
5510 cat > conftest.$ac_ext <<EOF
5511 #line 5512 "configure"
5512 #include "confdefs.h"
5513 #include <$x_direct_test_include>
5514 EOF
5515 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5516 { (eval echo configure:5517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5517 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5518 if test -z "$ac_err"; then
5519   rm -rf conftest*
5520   # We can compile using X headers with no special include directory.
5521 ac_x_includes=
5522 else
5523   echo "$ac_err" >&5
5524   echo "configure: failed program was:" >&5
5525   cat conftest.$ac_ext >&5
5526   rm -rf conftest*
5527   # Look for the header file in a standard set of common directories.
5528 # Check X11 before X11Rn because it is often a symlink to the current release.
5529   for ac_dir in               \
5530     /usr/X11/include          \
5531     /usr/X11R6/include        \
5532     /usr/X11R5/include        \
5533     /usr/X11R4/include        \
5534                               \
5535     /usr/include/X11          \
5536     /usr/include/X11R6        \
5537     /usr/include/X11R5        \
5538     /usr/include/X11R4        \
5539                               \
5540     /usr/local/X11/include    \
5541     /usr/local/X11R6/include  \
5542     /usr/local/X11R5/include  \
5543     /usr/local/X11R4/include  \
5544                               \
5545     /usr/local/include/X11    \
5546     /usr/local/include/X11R6  \
5547     /usr/local/include/X11R5  \
5548     /usr/local/include/X11R4  \
5549                               \
5550     /usr/X386/include         \
5551     /usr/x386/include         \
5552     /usr/XFree86/include/X11  \
5553                               \
5554     /usr/include              \
5555     /usr/local/include        \
5556     /usr/unsupported/include  \
5557     /usr/athena/include       \
5558     /usr/local/x11r5/include  \
5559     /usr/lpp/Xamples/include  \
5560                               \
5561     /usr/openwin/include      \
5562     /usr/openwin/share/include \
5563     ; \
5564   do
5565     if test -r "$ac_dir/$x_direct_test_include"; then
5566       ac_x_includes=$ac_dir
5567       break
5568     fi
5569   done
5570 fi
5571 rm -f conftest*
5572 fi # $ac_x_includes = NO
5573
5574 if test "$ac_x_libraries" = NO; then
5575   # Check for the libraries.
5576
5577   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5578   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5579
5580   # See if we find them without any special options.
5581   # Don't add to $LIBS permanently.
5582   ac_save_LIBS="$LIBS"
5583   LIBS="-l$x_direct_test_library $LIBS"
5584 cat > conftest.$ac_ext <<EOF
5585 #line 5586 "configure"
5586 #include "confdefs.h"
5587
5588 int main() {
5589 ${x_direct_test_function}()
5590 ; return 0; }
5591 EOF
5592 if { (eval echo configure:5593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5593   rm -rf conftest*
5594   LIBS="$ac_save_LIBS"
5595 # We can link X programs with no special library path.
5596 ac_x_libraries=
5597 else
5598   echo "configure: failed program was:" >&5
5599   cat conftest.$ac_ext >&5
5600   rm -rf conftest*
5601   LIBS="$ac_save_LIBS"
5602 # First see if replacing the include by lib works.
5603 # Check X11 before X11Rn because it is often a symlink to the current release.
5604 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5605     /usr/X11/lib          \
5606     /usr/X11R6/lib        \
5607     /usr/X11R5/lib        \
5608     /usr/X11R4/lib        \
5609                           \
5610     /usr/lib/X11          \
5611     /usr/lib/X11R6        \
5612     /usr/lib/X11R5        \
5613     /usr/lib/X11R4        \
5614                           \
5615     /usr/local/X11/lib    \
5616     /usr/local/X11R6/lib  \
5617     /usr/local/X11R5/lib  \
5618     /usr/local/X11R4/lib  \
5619                           \
5620     /usr/local/lib/X11    \
5621     /usr/local/lib/X11R6  \
5622     /usr/local/lib/X11R5  \
5623     /usr/local/lib/X11R4  \
5624                           \
5625     /usr/X386/lib         \
5626     /usr/x386/lib         \
5627     /usr/XFree86/lib/X11  \
5628                           \
5629     /usr/lib              \
5630     /usr/local/lib        \
5631     /usr/unsupported/lib  \
5632     /usr/athena/lib       \
5633     /usr/local/x11r5/lib  \
5634     /usr/lpp/Xamples/lib  \
5635     /lib/usr/lib/X11      \
5636                           \
5637     /usr/openwin/lib      \
5638     /usr/openwin/share/lib \
5639     ; \
5640 do
5641   for ac_extension in a so sl; do
5642     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5643       ac_x_libraries=$ac_dir
5644       break 2
5645     fi
5646   done
5647 done
5648 fi
5649 rm -f conftest*
5650 fi # $ac_x_libraries = NO
5651
5652 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5653   # Didn't find X anywhere.  Cache the known absence of X.
5654   ac_cv_have_x="have_x=no"
5655 else
5656   # Record where we found X for the cache.
5657   ac_cv_have_x="have_x=yes \
5658                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5659 fi
5660   fi
5661   eval "$ac_cv_have_x"
5662 fi # $with_x != no
5663
5664 if test "$have_x" != yes; then
5665   echo "$ac_t""$have_x" 1>&6
5666   no_x=yes
5667 else
5668   # If each of the values was on the command line, it overrides each guess.
5669   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5670   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5671   # Update the cache value to reflect the command line values.
5672   ac_cv_have_x="have_x=yes \
5673                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5674   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5675 fi
5676
5677 if test "$no_x" = yes; then
5678   # Not all programs may use this symbol, but it does not hurt to define it.
5679   { test "$extra_verbose" = "yes" && cat << \EOF
5680     Defining X_DISPLAY_MISSING
5681 EOF
5682 cat >> confdefs.h <<\EOF
5683 #define X_DISPLAY_MISSING 1
5684 EOF
5685 }
5686
5687   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5688 else
5689   if test -n "$x_includes"; then
5690     X_CFLAGS="$X_CFLAGS -I$x_includes"
5691   fi
5692
5693   # It would also be nice to do this for all -L options, not just this one.
5694   if test -n "$x_libraries"; then
5695     X_LIBS="$X_LIBS -L$x_libraries"
5696     # For Solaris; some versions of Sun CC require a space after -R and
5697     # others require no space.  Words are not sufficient . . . .
5698     case "`(uname -sr) 2>/dev/null`" in
5699     "SunOS 5"*)
5700       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5701 echo "configure:5702: checking whether -R must be followed by a space" >&5
5702       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5703       cat > conftest.$ac_ext <<EOF
5704 #line 5705 "configure"
5705 #include "confdefs.h"
5706
5707 int main() {
5708
5709 ; return 0; }
5710 EOF
5711 if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5712   rm -rf conftest*
5713   ac_R_nospace=yes
5714 else
5715   echo "configure: failed program was:" >&5
5716   cat conftest.$ac_ext >&5
5717   rm -rf conftest*
5718   ac_R_nospace=no
5719 fi
5720 rm -f conftest*
5721       if test $ac_R_nospace = yes; then
5722         echo "$ac_t""no" 1>&6
5723         X_LIBS="$X_LIBS -R$x_libraries"
5724       else
5725         LIBS="$ac_xsave_LIBS -R $x_libraries"
5726         cat > conftest.$ac_ext <<EOF
5727 #line 5728 "configure"
5728 #include "confdefs.h"
5729
5730 int main() {
5731
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5735   rm -rf conftest*
5736   ac_R_space=yes
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   ac_R_space=no
5742 fi
5743 rm -f conftest*
5744         if test $ac_R_space = yes; then
5745           echo "$ac_t""yes" 1>&6
5746           X_LIBS="$X_LIBS -R $x_libraries"
5747         else
5748           echo "$ac_t""neither works" 1>&6
5749         fi
5750       fi
5751       LIBS="$ac_xsave_LIBS"
5752     esac
5753   fi
5754
5755   # Check for system-dependent libraries X programs must link with.
5756   # Do this before checking for the system-independent R6 libraries
5757   # (-lICE), since we may need -lsocket or whatever for X linking.
5758
5759   if test "$ISC" = yes; then
5760     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5761   else
5762     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5763     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5764     # the Alpha needs dnet_stub (dnet does not exist).
5765     if test "$with_dnet" = "no" ; then
5766 ac_cv_lib_dnet_dnet_ntoa=no
5767 else
5768
5769 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5770 echo "configure:5771: checking for dnet_ntoa in -ldnet" >&5
5771 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5772
5773 xe_check_libs=" -ldnet "
5774 cat > conftest.$ac_ext <<EOF
5775 #line 5776 "configure"
5776 #include "confdefs.h"
5777 /* Override any gcc2 internal prototype to avoid an error.  */
5778 /* We use char because int might match the return type of a gcc2
5779     builtin and then its argument prototype would still apply.  */
5780 char dnet_ntoa();
5781
5782 int main() {
5783 dnet_ntoa()
5784 ; return 0; }
5785 EOF
5786 if { (eval echo configure:5787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5787   rm -rf conftest*
5788   eval "ac_cv_lib_$ac_lib_var=yes"
5789 else
5790   echo "configure: failed program was:" >&5
5791   cat conftest.$ac_ext >&5
5792   rm -rf conftest*
5793   eval "ac_cv_lib_$ac_lib_var=no"
5794 fi
5795 rm -f conftest*
5796 xe_check_libs=""
5797
5798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5799   echo "$ac_t""yes" 1>&6
5800   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5801 else
5802   echo "$ac_t""no" 1>&6
5803 fi
5804
5805 fi
5806
5807     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5808       
5809 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5810 echo "configure:5811: checking for dnet_ntoa in -ldnet_stub" >&5
5811 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5812
5813 xe_check_libs=" -ldnet_stub "
5814 cat > conftest.$ac_ext <<EOF
5815 #line 5816 "configure"
5816 #include "confdefs.h"
5817 /* Override any gcc2 internal prototype to avoid an error.  */
5818 /* We use char because int might match the return type of a gcc2
5819     builtin and then its argument prototype would still apply.  */
5820 char dnet_ntoa();
5821
5822 int main() {
5823 dnet_ntoa()
5824 ; return 0; }
5825 EOF
5826 if { (eval echo configure:5827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5827   rm -rf conftest*
5828   eval "ac_cv_lib_$ac_lib_var=yes"
5829 else
5830   echo "configure: failed program was:" >&5
5831   cat conftest.$ac_ext >&5
5832   rm -rf conftest*
5833   eval "ac_cv_lib_$ac_lib_var=no"
5834 fi
5835 rm -f conftest*
5836 xe_check_libs=""
5837
5838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5839   echo "$ac_t""yes" 1>&6
5840   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5841 else
5842   echo "$ac_t""no" 1>&6
5843 fi
5844
5845
5846     fi
5847
5848     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5849     # to get the SysV transport functions.
5850     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5851     # needs -lnsl.
5852     # The nsl library prevents programs from opening the X display
5853     # on Irix 5.2, according to dickey@clark.net.
5854     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5855 echo "configure:5856: checking for gethostbyname" >&5
5856
5857 cat > conftest.$ac_ext <<EOF
5858 #line 5859 "configure"
5859 #include "confdefs.h"
5860 /* System header to define __stub macros and hopefully few prototypes,
5861     which can conflict with char gethostbyname(); below.  */
5862 #include <assert.h>
5863 /* Override any gcc2 internal prototype to avoid an error.  */
5864 /* We use char because int might match the return type of a gcc2
5865     builtin and then its argument prototype would still apply.  */
5866 char gethostbyname();
5867
5868 int main() {
5869
5870 /* The GNU C library defines this for functions which it implements
5871     to always fail with ENOSYS.  Some functions are actually named
5872     something starting with __ and the normal name is an alias.  */
5873 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5874 choke me
5875 #else
5876 gethostbyname();
5877 #endif
5878
5879 ; return 0; }
5880 EOF
5881 if { (eval echo configure:5882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5882   rm -rf conftest*
5883   eval "ac_cv_func_gethostbyname=yes"
5884 else
5885   echo "configure: failed program was:" >&5
5886   cat conftest.$ac_ext >&5
5887   rm -rf conftest*
5888   eval "ac_cv_func_gethostbyname=no"
5889 fi
5890 rm -f conftest*
5891
5892 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5893   echo "$ac_t""yes" 1>&6
5894   :
5895 else
5896   echo "$ac_t""no" 1>&6
5897 fi
5898
5899     if test $ac_cv_func_gethostbyname = no; then
5900       
5901 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5902 echo "configure:5903: checking for gethostbyname in -lnsl" >&5
5903 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5904
5905 xe_check_libs=" -lnsl "
5906 cat > conftest.$ac_ext <<EOF
5907 #line 5908 "configure"
5908 #include "confdefs.h"
5909 /* Override any gcc2 internal prototype to avoid an error.  */
5910 /* We use char because int might match the return type of a gcc2
5911     builtin and then its argument prototype would still apply.  */
5912 char gethostbyname();
5913
5914 int main() {
5915 gethostbyname()
5916 ; return 0; }
5917 EOF
5918 if { (eval echo configure:5919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5919   rm -rf conftest*
5920   eval "ac_cv_lib_$ac_lib_var=yes"
5921 else
5922   echo "configure: failed program was:" >&5
5923   cat conftest.$ac_ext >&5
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=no"
5926 fi
5927 rm -f conftest*
5928 xe_check_libs=""
5929
5930 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5931   echo "$ac_t""yes" 1>&6
5932   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5933 else
5934   echo "$ac_t""no" 1>&6
5935 fi
5936
5937
5938     fi
5939
5940     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5941     # socket/setsockopt and other routines are undefined under SCO ODT
5942     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5943     # on later versions), says simon@lia.di.epfl.ch: it contains
5944     # gethostby* variants that don't use the nameserver (or something).
5945     # -lsocket must be given before -lnsl if both are needed.
5946     # We assume that if connect needs -lnsl, so does gethostbyname.
5947     echo $ac_n "checking for connect""... $ac_c" 1>&6
5948 echo "configure:5949: checking for connect" >&5
5949
5950 cat > conftest.$ac_ext <<EOF
5951 #line 5952 "configure"
5952 #include "confdefs.h"
5953 /* System header to define __stub macros and hopefully few prototypes,
5954     which can conflict with char connect(); below.  */
5955 #include <assert.h>
5956 /* Override any gcc2 internal prototype to avoid an error.  */
5957 /* We use char because int might match the return type of a gcc2
5958     builtin and then its argument prototype would still apply.  */
5959 char connect();
5960
5961 int main() {
5962
5963 /* The GNU C library defines this for functions which it implements
5964     to always fail with ENOSYS.  Some functions are actually named
5965     something starting with __ and the normal name is an alias.  */
5966 #if defined (__stub_connect) || defined (__stub___connect)
5967 choke me
5968 #else
5969 connect();
5970 #endif
5971
5972 ; return 0; }
5973 EOF
5974 if { (eval echo configure:5975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5975   rm -rf conftest*
5976   eval "ac_cv_func_connect=yes"
5977 else
5978   echo "configure: failed program was:" >&5
5979   cat conftest.$ac_ext >&5
5980   rm -rf conftest*
5981   eval "ac_cv_func_connect=no"
5982 fi
5983 rm -f conftest*
5984
5985 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5986   echo "$ac_t""yes" 1>&6
5987   :
5988 else
5989   echo "$ac_t""no" 1>&6
5990 fi
5991
5992     if test $ac_cv_func_connect = no; then
5993       
5994 xe_msg_checking="for connect in -lsocket"
5995 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5996 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5997 echo "configure:5998: checking "$xe_msg_checking"" >&5
5998 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5999
6000 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
6001 cat > conftest.$ac_ext <<EOF
6002 #line 6003 "configure"
6003 #include "confdefs.h"
6004 /* Override any gcc2 internal prototype to avoid an error.  */
6005 /* We use char because int might match the return type of a gcc2
6006     builtin and then its argument prototype would still apply.  */
6007 char connect();
6008
6009 int main() {
6010 connect()
6011 ; return 0; }
6012 EOF
6013 if { (eval echo configure:6014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6014   rm -rf conftest*
6015   eval "ac_cv_lib_$ac_lib_var=yes"
6016 else
6017   echo "configure: failed program was:" >&5
6018   cat conftest.$ac_ext >&5
6019   rm -rf conftest*
6020   eval "ac_cv_lib_$ac_lib_var=no"
6021 fi
6022 rm -f conftest*
6023 xe_check_libs=""
6024
6025 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6026   echo "$ac_t""yes" 1>&6
6027   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6028 else
6029   echo "$ac_t""no" 1>&6
6030 fi
6031
6032
6033     fi
6034
6035     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6036     echo $ac_n "checking for remove""... $ac_c" 1>&6
6037 echo "configure:6038: checking for remove" >&5
6038
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6042 /* System header to define __stub macros and hopefully few prototypes,
6043     which can conflict with char remove(); below.  */
6044 #include <assert.h>
6045 /* Override any gcc2 internal prototype to avoid an error.  */
6046 /* We use char because int might match the return type of a gcc2
6047     builtin and then its argument prototype would still apply.  */
6048 char remove();
6049
6050 int main() {
6051
6052 /* The GNU C library defines this for functions which it implements
6053     to always fail with ENOSYS.  Some functions are actually named
6054     something starting with __ and the normal name is an alias.  */
6055 #if defined (__stub_remove) || defined (__stub___remove)
6056 choke me
6057 #else
6058 remove();
6059 #endif
6060
6061 ; return 0; }
6062 EOF
6063 if { (eval echo configure:6064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6064   rm -rf conftest*
6065   eval "ac_cv_func_remove=yes"
6066 else
6067   echo "configure: failed program was:" >&5
6068   cat conftest.$ac_ext >&5
6069   rm -rf conftest*
6070   eval "ac_cv_func_remove=no"
6071 fi
6072 rm -f conftest*
6073
6074 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6075   echo "$ac_t""yes" 1>&6
6076   :
6077 else
6078   echo "$ac_t""no" 1>&6
6079 fi
6080
6081     if test $ac_cv_func_remove = no; then
6082       
6083 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6084 echo "configure:6085: checking for remove in -lposix" >&5
6085 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6086
6087 xe_check_libs=" -lposix "
6088 cat > conftest.$ac_ext <<EOF
6089 #line 6090 "configure"
6090 #include "confdefs.h"
6091 /* Override any gcc2 internal prototype to avoid an error.  */
6092 /* We use char because int might match the return type of a gcc2
6093     builtin and then its argument prototype would still apply.  */
6094 char remove();
6095
6096 int main() {
6097 remove()
6098 ; return 0; }
6099 EOF
6100 if { (eval echo configure:6101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101   rm -rf conftest*
6102   eval "ac_cv_lib_$ac_lib_var=yes"
6103 else
6104   echo "configure: failed program was:" >&5
6105   cat conftest.$ac_ext >&5
6106   rm -rf conftest*
6107   eval "ac_cv_lib_$ac_lib_var=no"
6108 fi
6109 rm -f conftest*
6110 xe_check_libs=""
6111
6112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6113   echo "$ac_t""yes" 1>&6
6114   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6115 else
6116   echo "$ac_t""no" 1>&6
6117 fi
6118
6119
6120     fi
6121
6122     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6123     echo $ac_n "checking for shmat""... $ac_c" 1>&6
6124 echo "configure:6125: checking for shmat" >&5
6125
6126 cat > conftest.$ac_ext <<EOF
6127 #line 6128 "configure"
6128 #include "confdefs.h"
6129 /* System header to define __stub macros and hopefully few prototypes,
6130     which can conflict with char shmat(); below.  */
6131 #include <assert.h>
6132 /* Override any gcc2 internal prototype to avoid an error.  */
6133 /* We use char because int might match the return type of a gcc2
6134     builtin and then its argument prototype would still apply.  */
6135 char shmat();
6136
6137 int main() {
6138
6139 /* The GNU C library defines this for functions which it implements
6140     to always fail with ENOSYS.  Some functions are actually named
6141     something starting with __ and the normal name is an alias.  */
6142 #if defined (__stub_shmat) || defined (__stub___shmat)
6143 choke me
6144 #else
6145 shmat();
6146 #endif
6147
6148 ; return 0; }
6149 EOF
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151   rm -rf conftest*
6152   eval "ac_cv_func_shmat=yes"
6153 else
6154   echo "configure: failed program was:" >&5
6155   cat conftest.$ac_ext >&5
6156   rm -rf conftest*
6157   eval "ac_cv_func_shmat=no"
6158 fi
6159 rm -f conftest*
6160
6161 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6162   echo "$ac_t""yes" 1>&6
6163   :
6164 else
6165   echo "$ac_t""no" 1>&6
6166 fi
6167
6168     if test $ac_cv_func_shmat = no; then
6169       
6170 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6171 echo "configure:6172: checking for shmat in -lipc" >&5
6172 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6173
6174 xe_check_libs=" -lipc "
6175 cat > conftest.$ac_ext <<EOF
6176 #line 6177 "configure"
6177 #include "confdefs.h"
6178 /* Override any gcc2 internal prototype to avoid an error.  */
6179 /* We use char because int might match the return type of a gcc2
6180     builtin and then its argument prototype would still apply.  */
6181 char shmat();
6182
6183 int main() {
6184 shmat()
6185 ; return 0; }
6186 EOF
6187 if { (eval echo configure:6188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6188   rm -rf conftest*
6189   eval "ac_cv_lib_$ac_lib_var=yes"
6190 else
6191   echo "configure: failed program was:" >&5
6192   cat conftest.$ac_ext >&5
6193   rm -rf conftest*
6194   eval "ac_cv_lib_$ac_lib_var=no"
6195 fi
6196 rm -f conftest*
6197 xe_check_libs=""
6198
6199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6200   echo "$ac_t""yes" 1>&6
6201   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6202 else
6203   echo "$ac_t""no" 1>&6
6204 fi
6205
6206
6207     fi
6208   fi
6209
6210   # Check for libraries that X11R6 Xt/Xaw programs need.
6211   ac_save_LDFLAGS="$LDFLAGS"
6212   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6213   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6214   # check for ICE first), but we must link in the order -lSM -lICE or
6215   # we get undefined symbols.  So assume we have SM if we have ICE.
6216   # These have to be linked with before -lX11, unlike the other
6217   # libraries we check for below, so use a different variable.
6218   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6219   
6220 xe_msg_checking="for IceConnectionNumber in -lICE"
6221 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
6222 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6223 echo "configure:6224: checking "$xe_msg_checking"" >&5
6224 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6225
6226 xe_check_libs=" -lICE $X_EXTRA_LIBS"
6227 cat > conftest.$ac_ext <<EOF
6228 #line 6229 "configure"
6229 #include "confdefs.h"
6230 /* Override any gcc2 internal prototype to avoid an error.  */
6231 /* We use char because int might match the return type of a gcc2
6232     builtin and then its argument prototype would still apply.  */
6233 char IceConnectionNumber();
6234
6235 int main() {
6236 IceConnectionNumber()
6237 ; return 0; }
6238 EOF
6239 if { (eval echo configure:6240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6240   rm -rf conftest*
6241   eval "ac_cv_lib_$ac_lib_var=yes"
6242 else
6243   echo "configure: failed program was:" >&5
6244   cat conftest.$ac_ext >&5
6245   rm -rf conftest*
6246   eval "ac_cv_lib_$ac_lib_var=no"
6247 fi
6248 rm -f conftest*
6249 xe_check_libs=""
6250
6251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6252   echo "$ac_t""yes" 1>&6
6253   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6254 else
6255   echo "$ac_t""no" 1>&6
6256 fi
6257
6258
6259   LDFLAGS="$ac_save_LDFLAGS"
6260
6261 fi
6262  # Autoconf claims to find X library and include dirs for us.
6263   if test "$no_x" = "yes"
6264   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
6265   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
6266   fi
6267 fi
6268
6269
6270 if test "$with_x11" = "yes"; then
6271   { test "$extra_verbose" = "yes" && cat << \EOF
6272     Defining HAVE_X_WINDOWS
6273 EOF
6274 cat >> confdefs.h <<\EOF
6275 #define HAVE_X_WINDOWS 1
6276 EOF
6277 }
6278
6279   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
6280   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
6281
6282       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
6283     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
6284     if test -d "$lib_dir" -a -d "$inc_dir"; then
6285       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6286         x_libraries="$lib_dir $x_libraries"
6287         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
6288       esac
6289       case "$x_includes" in "$inc_dir"* ) ;; *)
6290         x_includes="$inc_dir $x_includes"
6291         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
6292       esac
6293       break;       fi
6294   done
6295
6296     for rel in "X11R6" "X11R5" "X11R4"; do
6297     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
6298     if test -d "$lib_dir" -a -d "$inc_dir"; then
6299       case "$x_libraries" in *"$lib_dir"* ) ;; *)
6300         x_libraries="$x_libraries $lib_dir"
6301         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
6302       esac
6303       case "$x_includes" in "$inc_dir"* ) ;; *)
6304         x_includes="$x_includes $inc_dir"
6305         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
6306       esac
6307       break;     fi
6308   done
6309
6310     case "$opsys" in
6311   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 ;;
6312   esac
6313
6314   ld_switch_x_site="$X_LIBS"
6315
6316   
6317 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
6318     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6319   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
6320   
6321         runpath="" runpath_dirs=""
6322   if test -n "$LD_RUN_PATH"; then
6323     runpath="$LD_RUN_PATH"
6324   elif test "$GCC" = "yes"; then
6325         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
6326     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
6327     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
6328     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
6329       case "$arg" in P,* | -L* | -R* )
6330         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
6331           {
6332 xe_runpath_dir="$dir"
6333   test "$xe_runpath_dir" != "/lib"     -a \
6334         "$xe_runpath_dir" != "/usr/lib" -a \
6335         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6336   eval "$xe_add_unique_runpath_dir"
6337 }
6338         done ;;
6339       esac
6340     done
6341     ld_switch_run="$ld_switch_run_save"
6342     rm -f conftest*
6343   else
6344         for arg in $ld_switch_site $ld_switch_x_site; do
6345       case "$arg" in -L*) {
6346 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
6347   test "$xe_runpath_dir" != "/lib"     -a \
6348         "$xe_runpath_dir" != "/usr/lib" -a \
6349         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
6350   eval "$xe_add_unique_runpath_dir"
6351 };; esac
6352     done
6353         if test "$opsys $need_motif" = "sol2 yes"; then
6354       xe_runpath_dir="/opt/SUNWdt/lib";
6355       eval "$xe_add_unique_runpath_dir";
6356     fi
6357   fi 
6358   if test -n "$runpath"; then
6359     ld_switch_run="${dash_r}${runpath}"
6360     
6361 if test "$GCC" = "yes"; then
6362   set x $ld_switch_run; shift; ld_switch_run=""
6363   while test -n "$1"; do
6364     case $1 in
6365       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
6366       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
6367       -Xlinker* ) ;;
6368       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
6369     esac
6370     shift
6371   done
6372 fi
6373     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
6374   fi
6375 fi
6376
6377
6378   if test "$extra_verbose" = "yes"; then
6379     echo; echo "X11 compilation variables:"
6380     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
6381     echo
6382   fi
6383
6384             bitmapdirs=
6385   if test "$x_includes" != NONE; then
6386     for i in $x_includes; do
6387       if test -d "$i/bitmaps"; then
6388         bitmapdirs="$i/bitmaps:$bitmapdirs"
6389       fi
6390       if test -d "$i/X11/bitmaps"; then
6391         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
6392       fi
6393     done
6394     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
6395   fi
6396   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
6397     Defining BITMAPDIR = "$bitmapdirs"
6398 EOF
6399 cat >> confdefs.h <<EOF
6400 #define BITMAPDIR "$bitmapdirs"
6401 EOF
6402 }
6403
6404
6405     echo "checking for X defines extracted by xmkmf" 1>&6
6406 echo "configure:6407: checking for X defines extracted by xmkmf" >&5
6407   rm -fr conftestdir
6408   if mkdir conftestdir; then
6409     cd conftestdir
6410     cat > Imakefile <<'EOF'
6411 xetest:
6412         @echo ${PROTO_DEFINES} ${STD_DEFINES}
6413 EOF
6414     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6415       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6416       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
6417     fi
6418     cd ..
6419     rm -fr conftestdir
6420     for word in $xmkmf_defines; do
6421       case "$word" in 
6422       -D__STDC__*) ;;
6423       -D* )
6424         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
6425         case "$word" in
6426           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6427           *     ) val=1 ;;
6428         esac
6429         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6430           if test "$val" = "1"
6431             then { test "$extra_verbose" = "yes" && cat << EOF
6432     Defining $sym
6433 EOF
6434 cat >> confdefs.h <<EOF
6435 #define $sym 1
6436 EOF
6437 }
6438
6439             else { test "$extra_verbose" = "yes" && cat << EOF
6440     Defining $sym = $val
6441 EOF
6442 cat >> confdefs.h <<EOF
6443 #define $sym $val
6444 EOF
6445 }
6446
6447           fi
6448         fi  ;;
6449       esac
6450     done
6451   fi
6452
6453     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6454 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6455 echo "configure:6456: checking for X11/Intrinsic.h" >&5
6456
6457 cat > conftest.$ac_ext <<EOF
6458 #line 6459 "configure"
6459 #include "confdefs.h"
6460 #include <X11/Intrinsic.h>
6461 EOF
6462 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6463 { (eval echo configure:6464: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6464 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6465 if test -z "$ac_err"; then
6466   rm -rf conftest*
6467   eval "ac_cv_header_$ac_safe=yes"
6468 else
6469   echo "$ac_err" >&5
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_header_$ac_safe=no"
6474 fi
6475 rm -f conftest*
6476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6477   echo "$ac_t""yes" 1>&6
6478   :
6479 else
6480   echo "$ac_t""no" 1>&6
6481 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6482 fi
6483
6484
6485       
6486 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6487 echo "configure:6488: checking for XOpenDisplay in -lX11" >&5
6488 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6489
6490 xe_check_libs=" -lX11 "
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char XOpenDisplay();
6498
6499 int main() {
6500 XOpenDisplay()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 xe_check_libs=""
6514
6515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6516   echo "$ac_t""yes" 1>&6
6517   have_lib_x11=yes
6518 else
6519   echo "$ac_t""no" 1>&6
6520 fi
6521
6522
6523   if test "$have_lib_x11" != "yes"; then
6524     
6525 xe_msg_checking="for XGetFontProperty in -lX11"
6526 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6527 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6528 echo "configure:6529: checking "$xe_msg_checking"" >&5
6529 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6530
6531 xe_check_libs=" -lX11 -b i486-linuxaout"
6532 cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6535 /* Override any gcc2 internal prototype to avoid an error.  */
6536 /* We use char because int might match the return type of a gcc2
6537     builtin and then its argument prototype would still apply.  */
6538 char XGetFontProperty();
6539
6540 int main() {
6541 XGetFontProperty()
6542 ; return 0; }
6543 EOF
6544 if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6545   rm -rf conftest*
6546   eval "ac_cv_lib_$ac_lib_var=yes"
6547 else
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -rf conftest*
6551   eval "ac_cv_lib_$ac_lib_var=no"
6552 fi
6553 rm -f conftest*
6554 xe_check_libs=""
6555
6556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6557   echo "$ac_t""yes" 1>&6
6558   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6559 else
6560   echo "$ac_t""no" 1>&6
6561 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6562 fi
6563
6564
6565   fi
6566   libs_x="-lX11"
6567   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6568
6569     
6570 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6571 echo "configure:6572: checking for XShapeSelectInput in -lXext" >&5
6572 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6573
6574 xe_check_libs=" -lXext "
6575 cat > conftest.$ac_ext <<EOF
6576 #line 6577 "configure"
6577 #include "confdefs.h"
6578 /* Override any gcc2 internal prototype to avoid an error.  */
6579 /* We use char because int might match the return type of a gcc2
6580     builtin and then its argument prototype would still apply.  */
6581 char XShapeSelectInput();
6582
6583 int main() {
6584 XShapeSelectInput()
6585 ; return 0; }
6586 EOF
6587 if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6588   rm -rf conftest*
6589   eval "ac_cv_lib_$ac_lib_var=yes"
6590 else
6591   echo "configure: failed program was:" >&5
6592   cat conftest.$ac_ext >&5
6593   rm -rf conftest*
6594   eval "ac_cv_lib_$ac_lib_var=no"
6595 fi
6596 rm -f conftest*
6597 xe_check_libs=""
6598
6599 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6600   echo "$ac_t""yes" 1>&6
6601   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6602 else
6603   echo "$ac_t""no" 1>&6
6604 fi
6605
6606
6607
6608     
6609 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6610 echo "configure:6611: checking for XtOpenDisplay in -lXt" >&5
6611 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6612
6613 xe_check_libs=" -lXt "
6614 cat > conftest.$ac_ext <<EOF
6615 #line 6616 "configure"
6616 #include "confdefs.h"
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char XtOpenDisplay();
6621
6622 int main() {
6623 XtOpenDisplay()
6624 ; return 0; }
6625 EOF
6626 if { (eval echo configure:6627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627   rm -rf conftest*
6628   eval "ac_cv_lib_$ac_lib_var=yes"
6629 else
6630   echo "configure: failed program was:" >&5
6631   cat conftest.$ac_ext >&5
6632   rm -rf conftest*
6633   eval "ac_cv_lib_$ac_lib_var=no"
6634 fi
6635 rm -f conftest*
6636 xe_check_libs=""
6637
6638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6639   echo "$ac_t""yes" 1>&6
6640   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6641 else
6642   echo "$ac_t""no" 1>&6
6643 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6644 fi
6645
6646
6647
6648   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6649 echo "configure:6650: checking the version of X11 being used" >&5
6650   cat > conftest.$ac_ext <<EOF
6651 #line 6652 "configure"
6652 #include "confdefs.h"
6653 #include <X11/Intrinsic.h>
6654     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6657 then
6658   ./conftest foobar; x11_release=$?
6659 else
6660   conftest_rc="$?"
6661   echo "configure: failed program was:" >&5
6662   cat conftest.$ac_ext >&5
6663   rm -fr conftest*
6664   x11_release=4
6665 fi
6666 rm -fr conftest*
6667   echo "$ac_t""R${x11_release}" 1>&6
6668   { test "$extra_verbose" = "yes" && cat << EOF
6669     Defining THIS_IS_X11R${x11_release}
6670 EOF
6671 cat >> confdefs.h <<EOF
6672 #define THIS_IS_X11R${x11_release} 1
6673 EOF
6674 }
6675
6676
6677   if test "${x11_release}" = "4"; then
6678     case "$with_widgets" in
6679       "" | "no") with_widgets=no ;;
6680       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6681     esac
6682   fi
6683
6684   for ac_func in XConvertCase
6685 do
6686 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6687 echo "configure:6688: checking for $ac_func" >&5
6688
6689 cat > conftest.$ac_ext <<EOF
6690 #line 6691 "configure"
6691 #include "confdefs.h"
6692 /* System header to define __stub macros and hopefully few prototypes,
6693     which can conflict with char $ac_func(); below.  */
6694 #include <assert.h>
6695 /* Override any gcc2 internal prototype to avoid an error.  */
6696 /* We use char because int might match the return type of a gcc2
6697     builtin and then its argument prototype would still apply.  */
6698 char $ac_func();
6699
6700 int main() {
6701
6702 /* The GNU C library defines this for functions which it implements
6703     to always fail with ENOSYS.  Some functions are actually named
6704     something starting with __ and the normal name is an alias.  */
6705 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6706 choke me
6707 #else
6708 $ac_func();
6709 #endif
6710
6711 ; return 0; }
6712 EOF
6713 if { (eval echo configure:6714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6714   rm -rf conftest*
6715   eval "ac_cv_func_$ac_func=yes"
6716 else
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_func_$ac_func=no"
6721 fi
6722 rm -f conftest*
6723
6724 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6727   { test "$extra_verbose" = "yes" && cat << EOF
6728     Defining $ac_tr_func
6729 EOF
6730 cat >> confdefs.h <<EOF
6731 #define $ac_tr_func 1
6732 EOF
6733 }
6734  
6735 else
6736   echo "$ac_t""no" 1>&6
6737 fi
6738 done
6739
6740
6741   for ac_hdr in X11/Xlocale.h
6742 do
6743 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6744 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6745 echo "configure:6746: checking for $ac_hdr" >&5
6746
6747 cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 #include <$ac_hdr>
6751 EOF
6752 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6753 { (eval echo configure:6754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6754 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6755 if test -z "$ac_err"; then
6756   rm -rf conftest*
6757   eval "ac_cv_header_$ac_safe=yes"
6758 else
6759   echo "$ac_err" >&5
6760   echo "configure: failed program was:" >&5
6761   cat conftest.$ac_ext >&5
6762   rm -rf conftest*
6763   eval "ac_cv_header_$ac_safe=no"
6764 fi
6765 rm -f conftest*
6766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6767   echo "$ac_t""yes" 1>&6
6768     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6769   { test "$extra_verbose" = "yes" && cat << EOF
6770     Defining $ac_tr_hdr
6771 EOF
6772 cat >> confdefs.h <<EOF
6773 #define $ac_tr_hdr 1
6774 EOF
6775 }
6776  
6777 else
6778   echo "$ac_t""no" 1>&6
6779 fi
6780 done
6781
6782
6783     for ac_func in XRegisterIMInstantiateCallback
6784 do
6785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6786 echo "configure:6787: checking for $ac_func" >&5
6787
6788 cat > conftest.$ac_ext <<EOF
6789 #line 6790 "configure"
6790 #include "confdefs.h"
6791 /* System header to define __stub macros and hopefully few prototypes,
6792     which can conflict with char $ac_func(); below.  */
6793 #include <assert.h>
6794 /* Override any gcc2 internal prototype to avoid an error.  */
6795 /* We use char because int might match the return type of a gcc2
6796     builtin and then its argument prototype would still apply.  */
6797 char $ac_func();
6798
6799 int main() {
6800
6801 /* The GNU C library defines this for functions which it implements
6802     to always fail with ENOSYS.  Some functions are actually named
6803     something starting with __ and the normal name is an alias.  */
6804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6805 choke me
6806 #else
6807 $ac_func();
6808 #endif
6809
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_func_$ac_func=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_func_$ac_func=no"
6820 fi
6821 rm -f conftest*
6822
6823 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6824   echo "$ac_t""yes" 1>&6
6825     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6826   { test "$extra_verbose" = "yes" && cat << EOF
6827     Defining $ac_tr_func
6828 EOF
6829 cat >> confdefs.h <<EOF
6830 #define $ac_tr_func 1
6831 EOF
6832 }
6833  
6834 else
6835   echo "$ac_t""no" 1>&6
6836 fi
6837 done
6838
6839   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6840 echo "configure:6841: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6841   cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844
6845 #define NeedFunctionPrototypes 1
6846 #include <X11/Xlib.h>
6847 extern Bool XRegisterIMInstantiateCallback(
6848    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6849
6850 int main() {
6851
6852 ; return 0; }
6853 EOF
6854 if { (eval echo configure:6855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6855   rm -rf conftest*
6856   echo "$ac_t""yes" 1>&6
6857 else
6858   echo "configure: failed program was:" >&5
6859   cat conftest.$ac_ext >&5
6860   rm -rf conftest*
6861   echo "$ac_t""no" 1>&6
6862    { test "$extra_verbose" = "yes" && cat << \EOF
6863     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6864 EOF
6865 cat >> confdefs.h <<\EOF
6866 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6867 EOF
6868 }
6869
6870 fi
6871 rm -f conftest*
6872
6873     test -z "$with_xmu" && { 
6874 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6875 echo "configure:6876: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6876 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6877
6878 xe_check_libs=" -lXmu "
6879 cat > conftest.$ac_ext <<EOF
6880 #line 6881 "configure"
6881 #include "confdefs.h"
6882 /* Override any gcc2 internal prototype to avoid an error.  */
6883 /* We use char because int might match the return type of a gcc2
6884     builtin and then its argument prototype would still apply.  */
6885 char XmuReadBitmapDataFromFile();
6886
6887 int main() {
6888 XmuReadBitmapDataFromFile()
6889 ; return 0; }
6890 EOF
6891 if { (eval echo configure:6892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6892   rm -rf conftest*
6893   eval "ac_cv_lib_$ac_lib_var=yes"
6894 else
6895   echo "configure: failed program was:" >&5
6896   cat conftest.$ac_ext >&5
6897   rm -rf conftest*
6898   eval "ac_cv_lib_$ac_lib_var=no"
6899 fi
6900 rm -f conftest*
6901 xe_check_libs=""
6902
6903 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6904   echo "$ac_t""yes" 1>&6
6905   with_xmu=yes
6906 else
6907   echo "$ac_t""no" 1>&6
6908 with_xmu=no
6909 fi
6910
6911  }
6912   if test "$with_xmu" = "no"; then
6913     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6914    echo "    xemacs will be linked with \"xmu.o\""
6915  fi
6916   else
6917     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6918     { test "$extra_verbose" = "yes" && cat << \EOF
6919     Defining HAVE_XMU
6920 EOF
6921 cat >> confdefs.h <<\EOF
6922 #define HAVE_XMU 1
6923 EOF
6924 }
6925
6926   fi
6927
6928       
6929 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6930 echo "configure:6931: checking for main in -lXbsd" >&5
6931 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6932
6933 xe_check_libs=" -lXbsd "
6934 cat > conftest.$ac_ext <<EOF
6935 #line 6936 "configure"
6936 #include "confdefs.h"
6937
6938 int main() {
6939 main()
6940 ; return 0; }
6941 EOF
6942 if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6943   rm -rf conftest*
6944   eval "ac_cv_lib_$ac_lib_var=yes"
6945 else
6946   echo "configure: failed program was:" >&5
6947   cat conftest.$ac_ext >&5
6948   rm -rf conftest*
6949   eval "ac_cv_lib_$ac_lib_var=no"
6950 fi
6951 rm -f conftest*
6952 xe_check_libs=""
6953
6954 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6955   echo "$ac_t""yes" 1>&6
6956   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6957 else
6958   echo "$ac_t""no" 1>&6
6959 fi
6960
6961
6962
6963     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6964         if test "$GCC" = "yes"; then
6965       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6966       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6967     else
6968       case "$CC" in
6969         "xlc" ) CC="xlc_r" ;;
6970         "xlC" ) CC="xlC_r" ;;
6971         "cc"  ) CC="cc_r" ;;
6972       esac
6973     fi
6974   fi
6975
6976 fi 
6977 if test "$with_msw" != "no"; then
6978   echo "checking for MS-Windows" 1>&6
6979 echo "configure:6980: checking for MS-Windows" >&5
6980   
6981 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6982 echo "configure:6983: checking for main in -lgdi32" >&5
6983 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6984
6985 xe_check_libs=" -lgdi32 "
6986 cat > conftest.$ac_ext <<EOF
6987 #line 6988 "configure"
6988 #include "confdefs.h"
6989
6990 int main() {
6991 main()
6992 ; return 0; }
6993 EOF
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995   rm -rf conftest*
6996   eval "ac_cv_lib_$ac_lib_var=yes"
6997 else
6998   echo "configure: failed program was:" >&5
6999   cat conftest.$ac_ext >&5
7000   rm -rf conftest*
7001   eval "ac_cv_lib_$ac_lib_var=no"
7002 fi
7003 rm -f conftest*
7004 xe_check_libs=""
7005
7006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7007   echo "$ac_t""yes" 1>&6
7008   with_msw=yes
7009 else
7010   echo "$ac_t""no" 1>&6
7011 fi
7012
7013
7014   if test "$with_msw" = "yes"; then
7015     { test "$extra_verbose" = "yes" && cat << \EOF
7016     Defining HAVE_MS_WINDOWS
7017 EOF
7018 cat >> confdefs.h <<\EOF
7019 #define HAVE_MS_WINDOWS 1
7020 EOF
7021 }
7022
7023
7024         if test "$with_netinstall" = "yes"; then
7025       MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
7026       SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
7027       INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
7028     fi
7029
7030     install_pp="$blddir/lib-src/installexe.sh"
7031     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
7032     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
7033     if test "$window_system" != x11; then
7034         window_system=msw
7035         test "$with_scrollbars" != "no" && with_scrollbars=msw \
7036             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7037    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7038  fi
7039         test "$with_menubars"   != "no" && with_menubars=msw \
7040             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7041    echo "    xemacs will be linked with \"menubar-msw.o\""
7042  fi
7043         test "$with_toolbars"   != "no" && with_toolbars=msw \
7044             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7045    echo "    xemacs will be linked with \"toolbar-msw.o\""
7046  fi
7047         test "$with_dialogs"   != "no" && with_dialogs=msw \
7048             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7049    echo "    xemacs will be linked with \"dialog-msw.o\""
7050  fi
7051         test "$with_widgets"   != "no" && with_widgets=msw
7052     else
7053         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7054    echo "    xemacs will be linked with \"scrollbar-msw.o\""
7055  fi
7056         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7057    echo "    xemacs will be linked with \"menubar-msw.o\""
7058  fi
7059         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
7060    echo "    xemacs will be linked with \"toolbar-msw.o\""
7061  fi
7062         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
7063    echo "    xemacs will be linked with \"dialog-msw.o\""
7064  fi
7065     fi
7066         cat > conftest.$ac_ext <<EOF
7067 #line 7068 "configure"
7068 #include "confdefs.h"
7069 #include <fcntl.h>
7070     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
7071 EOF
7072 if { (eval echo configure:7073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7073 then
7074   { test "$extra_verbose" = "yes" && cat << \EOF
7075     Defining HAVE_MSG_SELECT
7076 EOF
7077 cat >> confdefs.h <<\EOF
7078 #define HAVE_MSG_SELECT 1
7079 EOF
7080 }
7081
7082 else
7083   conftest_rc="$?"
7084   echo "configure: failed program was:" >&5
7085   cat conftest.$ac_ext >&5
7086 fi
7087 rm -fr conftest*
7088     with_file_coding=yes
7089     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
7090    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\""
7091  fi
7092   fi
7093 fi
7094
7095
7096
7097 test -z "$window_system" && window_system="none"
7098
7099 if test "$window_system" = "none"; then
7100   for feature in menubars scrollbars toolbars dialogs dragndrop xface
7101   do
7102     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7103        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
7104     fi
7105     eval "with_${feature}=no"
7106   done
7107 else
7108   test -z "$with_toolbars" && with_toolbars=yes
7109 fi
7110
7111 if test "$with_msw" != "yes"; then
7112   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
7113   do
7114     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7115        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
7116     fi
7117     eval "with_${feature}=no"
7118   done
7119 else
7120   :
7121 fi
7122
7123 if test "$with_x11" != "yes"; then
7124             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
7125   do
7126     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
7127        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
7128     fi
7129     eval "with_${feature}=no"
7130   done
7131 fi
7132
7133 if test "$with_x11" = "yes"; then
7134   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
7135 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
7136 echo "configure:7137: checking for X11/extensions/shape.h" >&5
7137
7138 cat > conftest.$ac_ext <<EOF
7139 #line 7140 "configure"
7140 #include "confdefs.h"
7141 #include <X11/extensions/shape.h>
7142 EOF
7143 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7144 { (eval echo configure:7145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7145 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7146 if test -z "$ac_err"; then
7147   rm -rf conftest*
7148   eval "ac_cv_header_$ac_safe=yes"
7149 else
7150   echo "$ac_err" >&5
7151   echo "configure: failed program was:" >&5
7152   cat conftest.$ac_ext >&5
7153   rm -rf conftest*
7154   eval "ac_cv_header_$ac_safe=no"
7155 fi
7156 rm -f conftest*
7157 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7158   echo "$ac_t""yes" 1>&6
7159   
7160    { test "$extra_verbose" = "yes" && cat << \EOF
7161     Defining HAVE_BALLOON_HELP
7162 EOF
7163 cat >> confdefs.h <<\EOF
7164 #define HAVE_BALLOON_HELP 1
7165 EOF
7166 }
7167
7168    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
7169    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
7170  fi
7171 else
7172   echo "$ac_t""no" 1>&6
7173 fi
7174
7175 fi
7176
7177 bitmapdir=
7178
7179 case "$window_system" in
7180   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
7181   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
7182   gtk  )
7183        HAVE_X_WINDOWS=no
7184        test "$with_gnome" = "yes" && echo "  Using GNOME."
7185        test "$with_gnome" = "no" && echo "  Using GTK."
7186        ;;
7187   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
7188 esac
7189
7190 case "$x_libraries" in *X11R4* )
7191   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
7192   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
7193 esac
7194
7195 echo "checking for WM_COMMAND option" 1>&6
7196 echo "configure:7197: checking for WM_COMMAND option" >&5;
7197 if test "$with_wmcommand" != "no"; then
7198   { test "$extra_verbose" = "yes" && cat << \EOF
7199     Defining HAVE_WMCOMMAND
7200 EOF
7201 cat >> confdefs.h <<\EOF
7202 #define HAVE_WMCOMMAND 1
7203 EOF
7204 }
7205
7206 fi
7207
7208 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
7209 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
7210 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
7211 echo "configure:7212: checking for X11/Xauth.h" >&5
7212
7213 cat > conftest.$ac_ext <<EOF
7214 #line 7215 "configure"
7215 #include "confdefs.h"
7216 #include <X11/Xauth.h>
7217 EOF
7218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7219 { (eval echo configure:7220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7221 if test -z "$ac_err"; then
7222   rm -rf conftest*
7223   eval "ac_cv_header_$ac_safe=yes"
7224 else
7225   echo "$ac_err" >&5
7226   echo "configure: failed program was:" >&5
7227   cat conftest.$ac_ext >&5
7228   rm -rf conftest*
7229   eval "ac_cv_header_$ac_safe=no"
7230 fi
7231 rm -f conftest*
7232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7233   echo "$ac_t""yes" 1>&6
7234   :
7235 else
7236   echo "$ac_t""no" 1>&6
7237 with_xauth=no
7238 fi
7239  }
7240 test -z "$with_xauth" && { 
7241 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
7242 echo "configure:7243: checking for XauGetAuthByAddr in -lXau" >&5
7243 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
7244
7245 xe_check_libs=" -lXau "
7246 cat > conftest.$ac_ext <<EOF
7247 #line 7248 "configure"
7248 #include "confdefs.h"
7249 /* Override any gcc2 internal prototype to avoid an error.  */
7250 /* We use char because int might match the return type of a gcc2
7251     builtin and then its argument prototype would still apply.  */
7252 char XauGetAuthByAddr();
7253
7254 int main() {
7255 XauGetAuthByAddr()
7256 ; return 0; }
7257 EOF
7258 if { (eval echo configure:7259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7259   rm -rf conftest*
7260   eval "ac_cv_lib_$ac_lib_var=yes"
7261 else
7262   echo "configure: failed program was:" >&5
7263   cat conftest.$ac_ext >&5
7264   rm -rf conftest*
7265   eval "ac_cv_lib_$ac_lib_var=no"
7266 fi
7267 rm -f conftest*
7268 xe_check_libs=""
7269
7270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7271   echo "$ac_t""yes" 1>&6
7272   :
7273 else
7274   echo "$ac_t""no" 1>&6
7275 with_xauth=no
7276 fi
7277
7278  }
7279 test -z "$with_xauth" && with_xauth=yes
7280 if test "$with_xauth" = "yes"; then
7281   { test "$extra_verbose" = "yes" && cat << \EOF
7282     Defining HAVE_XAUTH
7283 EOF
7284 cat >> confdefs.h <<\EOF
7285 #define HAVE_XAUTH 1
7286 EOF
7287 }
7288
7289   
7290 T=""
7291 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
7292 libs_xauth="$T"
7293
7294 fi
7295
7296
7297
7298
7299 if test "$with_tooltalk" != "no" ; then
7300       for dir in "" "Tt/" "desktop/" ; do
7301     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
7302 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
7303 echo "configure:7304: checking for ${dir}tt_c.h" >&5
7304
7305 cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 #include <${dir}tt_c.h>
7309 EOF
7310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7311 { (eval echo configure:7312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7313 if test -z "$ac_err"; then
7314   rm -rf conftest*
7315   eval "ac_cv_header_$ac_safe=yes"
7316 else
7317   echo "$ac_err" >&5
7318   echo "configure: failed program was:" >&5
7319   cat conftest.$ac_ext >&5
7320   rm -rf conftest*
7321   eval "ac_cv_header_$ac_safe=no"
7322 fi
7323 rm -f conftest*
7324 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7325   echo "$ac_t""yes" 1>&6
7326   tt_c_h_file="${dir}tt_c.h"; break
7327 else
7328   echo "$ac_t""no" 1>&6
7329 fi
7330
7331   done
7332   if test -z "$tt_c_h_file"; then
7333     if test "$with_tooltalk" = "yes"; then
7334       (echo "$progname: Usage error:"
7335 echo " " "Unable to find required tooltalk header files."
7336 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7337     fi
7338     with_tooltalk=no
7339   fi
7340 fi
7341 if test "$with_tooltalk" != "no" ; then
7342   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
7343     
7344 xe_msg_checking="for tt_message_create in -ltt"
7345 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
7346 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7347 echo "configure:7348: checking "$xe_msg_checking"" >&5
7348 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
7349
7350 xe_check_libs=" -ltt $extra_libs"
7351 cat > conftest.$ac_ext <<EOF
7352 #line 7353 "configure"
7353 #include "confdefs.h"
7354 /* Override any gcc2 internal prototype to avoid an error.  */
7355 /* We use char because int might match the return type of a gcc2
7356     builtin and then its argument prototype would still apply.  */
7357 char tt_message_create();
7358
7359 int main() {
7360 tt_message_create()
7361 ; return 0; }
7362 EOF
7363 if { (eval echo configure:7364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364   rm -rf conftest*
7365   eval "ac_cv_lib_$ac_lib_var=yes"
7366 else
7367   echo "configure: failed program was:" >&5
7368   cat conftest.$ac_ext >&5
7369   rm -rf conftest*
7370   eval "ac_cv_lib_$ac_lib_var=no"
7371 fi
7372 rm -f conftest*
7373 xe_check_libs=""
7374
7375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7376   echo "$ac_t""yes" 1>&6
7377   tt_libs="-ltt $extra_libs"; break
7378 else
7379   echo "$ac_t""no" 1>&6
7380 :
7381 fi
7382
7383
7384   done
7385   if test -z "$tt_libs"; then
7386     if test "$with_tooltalk" = "yes"; then
7387       (echo "$progname: Usage error:"
7388 echo " " "Unable to find required tooltalk libraries."
7389 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
7390     fi
7391     with_tooltalk=no
7392   fi
7393 fi
7394 test -z "$with_tooltalk" && with_tooltalk=yes
7395 if test "$with_tooltalk" = "yes"; then
7396   { test "$extra_verbose" = "yes" && cat << \EOF
7397     Defining TOOLTALK
7398 EOF
7399 cat >> confdefs.h <<\EOF
7400 #define TOOLTALK 1
7401 EOF
7402 }
7403
7404   { test "$extra_verbose" = "yes" && cat << EOF
7405     Defining TT_C_H_FILE = "$tt_c_h_file"
7406 EOF
7407 cat >> confdefs.h <<EOF
7408 #define TT_C_H_FILE "$tt_c_h_file"
7409 EOF
7410 }
7411
7412   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
7413   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
7414    echo "    xemacs will be linked with \"tooltalk.o\""
7415  fi
7416 fi
7417
7418 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
7419 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
7420 echo "configure:7421: checking for Dt/Dt.h" >&5
7421
7422 cat > conftest.$ac_ext <<EOF
7423 #line 7424 "configure"
7424 #include "confdefs.h"
7425 #include <Dt/Dt.h>
7426 EOF
7427 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7428 { (eval echo configure:7429: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7429 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7430 if test -z "$ac_err"; then
7431   rm -rf conftest*
7432   eval "ac_cv_header_$ac_safe=yes"
7433 else
7434   echo "$ac_err" >&5
7435   echo "configure: failed program was:" >&5
7436   cat conftest.$ac_ext >&5
7437   rm -rf conftest*
7438   eval "ac_cv_header_$ac_safe=no"
7439 fi
7440 rm -f conftest*
7441 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7442   echo "$ac_t""yes" 1>&6
7443   :
7444 else
7445   echo "$ac_t""no" 1>&6
7446 with_cde=no
7447 fi
7448  }
7449 test -z "$with_cde" && { 
7450 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7451 echo "configure:7452: checking for DtDndDragStart in -lDtSvc" >&5
7452 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7453
7454 xe_check_libs=" -lDtSvc "
7455 cat > conftest.$ac_ext <<EOF
7456 #line 7457 "configure"
7457 #include "confdefs.h"
7458 /* Override any gcc2 internal prototype to avoid an error.  */
7459 /* We use char because int might match the return type of a gcc2
7460     builtin and then its argument prototype would still apply.  */
7461 char DtDndDragStart();
7462
7463 int main() {
7464 DtDndDragStart()
7465 ; return 0; }
7466 EOF
7467 if { (eval echo configure:7468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7468   rm -rf conftest*
7469   eval "ac_cv_lib_$ac_lib_var=yes"
7470 else
7471   echo "configure: failed program was:" >&5
7472   cat conftest.$ac_ext >&5
7473   rm -rf conftest*
7474   eval "ac_cv_lib_$ac_lib_var=no"
7475 fi
7476 rm -f conftest*
7477 xe_check_libs=""
7478
7479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7480   echo "$ac_t""yes" 1>&6
7481   :
7482 else
7483   echo "$ac_t""no" 1>&6
7484 with_cde=no
7485 fi
7486
7487  }
7488 test -z "$with_cde" && with_cde=yes
7489 if test "$with_dragndrop" = no; then
7490   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7491   with_cde=no
7492 fi
7493 if test "$with_cde" = "yes" ; then
7494   { test "$extra_verbose" = "yes" && cat << \EOF
7495     Defining HAVE_CDE
7496 EOF
7497 cat >> confdefs.h <<\EOF
7498 #define HAVE_CDE 1
7499 EOF
7500 }
7501
7502   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7503   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7504   with_tooltalk=yes # CDE requires Tooltalk
7505   need_motif=yes    # CDE requires Motif
7506 fi
7507
7508 test "$window_system" != "x11" && with_offix=no
7509 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7510   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7511   with_offix=no
7512 fi
7513 if test "$with_dragndrop" = no; then
7514   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7515   with_offix=no
7516 fi
7517 if test "$with_cde" = yes; then
7518   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7519   with_offix=no
7520 fi
7521 test -z "$with_offix" && with_offix=no
7522 if test "$with_offix" = "yes"; then
7523   { test "$extra_verbose" = "yes" && cat << \EOF
7524     Defining HAVE_OFFIX_DND
7525 EOF
7526 cat >> confdefs.h <<\EOF
7527 #define HAVE_OFFIX_DND 1
7528 EOF
7529 }
7530
7531   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7532   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7533 fi
7534 if test "$with_gtk" = "yes"; then
7535    dragndrop_proto="$dragndrop_proto GTK" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"GTK\" to \$dragndrop_proto"; fi
7536 fi
7537
7538 if test "$with_dragndrop" != "no" ; then
7539   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7540 echo "configure:7541: checking if drag and drop API is needed" >&5
7541   if test -n "$dragndrop_proto" ; then
7542     with_dragndrop=yes
7543     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7544     { test "$extra_verbose" = "yes" && cat << \EOF
7545     Defining HAVE_DRAGNDROP
7546 EOF
7547 cat >> confdefs.h <<\EOF
7548 #define HAVE_DRAGNDROP 1
7549 EOF
7550 }
7551
7552     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7553   else
7554     with_dragndrop=no
7555     echo "$ac_t""no" 1>&6
7556   fi
7557 fi
7558
7559 echo "checking for LDAP" 1>&6
7560 echo "configure:7561: checking for LDAP" >&5
7561 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7562 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7563 echo "configure:7564: checking for ldap.h" >&5
7564
7565 cat > conftest.$ac_ext <<EOF
7566 #line 7567 "configure"
7567 #include "confdefs.h"
7568 #include <ldap.h>
7569 EOF
7570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7571 { (eval echo configure:7572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7573 if test -z "$ac_err"; then
7574   rm -rf conftest*
7575   eval "ac_cv_header_$ac_safe=yes"
7576 else
7577   echo "$ac_err" >&5
7578   echo "configure: failed program was:" >&5
7579   cat conftest.$ac_ext >&5
7580   rm -rf conftest*
7581   eval "ac_cv_header_$ac_safe=no"
7582 fi
7583 rm -f conftest*
7584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7585   echo "$ac_t""yes" 1>&6
7586   :
7587 else
7588   echo "$ac_t""no" 1>&6
7589 with_ldap=no
7590 fi
7591  }
7592 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7593 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7594 echo "configure:7595: checking for lber.h" >&5
7595
7596 cat > conftest.$ac_ext <<EOF
7597 #line 7598 "configure"
7598 #include "confdefs.h"
7599 #include <lber.h>
7600 EOF
7601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7602 { (eval echo configure:7603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7604 if test -z "$ac_err"; then
7605   rm -rf conftest*
7606   eval "ac_cv_header_$ac_safe=yes"
7607 else
7608   echo "$ac_err" >&5
7609   echo "configure: failed program was:" >&5
7610   cat conftest.$ac_ext >&5
7611   rm -rf conftest*
7612   eval "ac_cv_header_$ac_safe=no"
7613 fi
7614 rm -f conftest*
7615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7616   echo "$ac_t""yes" 1>&6
7617   :
7618 else
7619   echo "$ac_t""no" 1>&6
7620 with_ldap=no
7621 fi
7622  }
7623 if test "$with_ldap" != "no"; then
7624   
7625 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7626 echo "configure:7627: checking for ldap_search in -lldap" >&5
7627 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7628
7629 xe_check_libs=" -lldap "
7630 cat > conftest.$ac_ext <<EOF
7631 #line 7632 "configure"
7632 #include "confdefs.h"
7633 /* Override any gcc2 internal prototype to avoid an error.  */
7634 /* We use char because int might match the return type of a gcc2
7635     builtin and then its argument prototype would still apply.  */
7636 char ldap_search();
7637
7638 int main() {
7639 ldap_search()
7640 ; return 0; }
7641 EOF
7642 if { (eval echo configure:7643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7643   rm -rf conftest*
7644   eval "ac_cv_lib_$ac_lib_var=yes"
7645 else
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_lib_$ac_lib_var=no"
7650 fi
7651 rm -f conftest*
7652 xe_check_libs=""
7653
7654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7655   echo "$ac_t""yes" 1>&6
7656   with_ldap_nolber=yes
7657 else
7658   echo "$ac_t""no" 1>&6
7659 with_ldap_nolber=no
7660 fi
7661
7662
7663   test "$with_ldap_nolber" = "no" && { 
7664 xe_msg_checking="for ldap_open in -lldap"
7665 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7666 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7667 echo "configure:7668: checking "$xe_msg_checking"" >&5
7668 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7669
7670 xe_check_libs=" -lldap -llber"
7671 cat > conftest.$ac_ext <<EOF
7672 #line 7673 "configure"
7673 #include "confdefs.h"
7674 /* Override any gcc2 internal prototype to avoid an error.  */
7675 /* We use char because int might match the return type of a gcc2
7676     builtin and then its argument prototype would still apply.  */
7677 char ldap_open();
7678
7679 int main() {
7680 ldap_open()
7681 ; return 0; }
7682 EOF
7683 if { (eval echo configure:7684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7684   rm -rf conftest*
7685   eval "ac_cv_lib_$ac_lib_var=yes"
7686 else
7687   echo "configure: failed program was:" >&5
7688   cat conftest.$ac_ext >&5
7689   rm -rf conftest*
7690   eval "ac_cv_lib_$ac_lib_var=no"
7691 fi
7692 rm -f conftest*
7693 xe_check_libs=""
7694
7695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7696   echo "$ac_t""yes" 1>&6
7697   with_ldap_lber=yes
7698 else
7699   echo "$ac_t""no" 1>&6
7700 with_ldap_lber=no
7701 fi
7702
7703  }
7704   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7705 xe_msg_checking="for ldap_open in -lldap"
7706 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7707 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7708 echo "configure:7709: checking "$xe_msg_checking"" >&5
7709 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7710
7711 xe_check_libs=" -lldap -llber -lkrb"
7712 cat > conftest.$ac_ext <<EOF
7713 #line 7714 "configure"
7714 #include "confdefs.h"
7715 /* Override any gcc2 internal prototype to avoid an error.  */
7716 /* We use char because int might match the return type of a gcc2
7717     builtin and then its argument prototype would still apply.  */
7718 char ldap_open();
7719
7720 int main() {
7721 ldap_open()
7722 ; return 0; }
7723 EOF
7724 if { (eval echo configure:7725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7725   rm -rf conftest*
7726   eval "ac_cv_lib_$ac_lib_var=yes"
7727 else
7728   echo "configure: failed program was:" >&5
7729   cat conftest.$ac_ext >&5
7730   rm -rf conftest*
7731   eval "ac_cv_lib_$ac_lib_var=no"
7732 fi
7733 rm -f conftest*
7734 xe_check_libs=""
7735
7736 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7737   echo "$ac_t""yes" 1>&6
7738   with_ldap_krb=yes
7739 else
7740   echo "$ac_t""no" 1>&6
7741 with_ldap_krb=no
7742 fi
7743
7744  }
7745   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7746 xe_msg_checking="for ldap_open in -lldap"
7747 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7748 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7749 echo "configure:7750: checking "$xe_msg_checking"" >&5
7750 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7751
7752 xe_check_libs=" -lldap -llber -lkrb -ldes"
7753 cat > conftest.$ac_ext <<EOF
7754 #line 7755 "configure"
7755 #include "confdefs.h"
7756 /* Override any gcc2 internal prototype to avoid an error.  */
7757 /* We use char because int might match the return type of a gcc2
7758     builtin and then its argument prototype would still apply.  */
7759 char ldap_open();
7760
7761 int main() {
7762 ldap_open()
7763 ; return 0; }
7764 EOF
7765 if { (eval echo configure:7766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7766   rm -rf conftest*
7767   eval "ac_cv_lib_$ac_lib_var=yes"
7768 else
7769   echo "configure: failed program was:" >&5
7770   cat conftest.$ac_ext >&5
7771   rm -rf conftest*
7772   eval "ac_cv_lib_$ac_lib_var=no"
7773 fi
7774 rm -f conftest*
7775 xe_check_libs=""
7776
7777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7778   echo "$ac_t""yes" 1>&6
7779   with_ldap_krbdes=yes
7780 else
7781   echo "$ac_t""no" 1>&6
7782 with_ldap_krbdes=no
7783 fi
7784
7785  }
7786   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
7787 fi
7788 if test "$with_ldap" = "yes"; then
7789   { test "$extra_verbose" = "yes" && cat << \EOF
7790     Defining HAVE_LDAP
7791 EOF
7792 cat >> confdefs.h <<\EOF
7793 #define HAVE_LDAP 1
7794 EOF
7795 }
7796
7797   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7798    echo "    xemacs will be linked with \"eldap.o\""
7799  fi
7800   if test "$with_ldap_nolber" = "yes" ; then
7801     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7802   else
7803     if test "$with_ldap_krb" = "yes" ; then
7804       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7805     fi
7806     if test "$with_ldap_krbdes" = "yes" ; then
7807       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7808       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7809     fi
7810     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7811     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7812   fi
7813   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7814 do
7815 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7816 echo "configure:7817: checking for $ac_func" >&5
7817
7818 cat > conftest.$ac_ext <<EOF
7819 #line 7820 "configure"
7820 #include "confdefs.h"
7821 /* System header to define __stub macros and hopefully few prototypes,
7822     which can conflict with char $ac_func(); below.  */
7823 #include <assert.h>
7824 /* Override any gcc2 internal prototype to avoid an error.  */
7825 /* We use char because int might match the return type of a gcc2
7826     builtin and then its argument prototype would still apply.  */
7827 char $ac_func();
7828
7829 int main() {
7830
7831 /* The GNU C library defines this for functions which it implements
7832     to always fail with ENOSYS.  Some functions are actually named
7833     something starting with __ and the normal name is an alias.  */
7834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7835 choke me
7836 #else
7837 $ac_func();
7838 #endif
7839
7840 ; return 0; }
7841 EOF
7842 if { (eval echo configure:7843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7843   rm -rf conftest*
7844   eval "ac_cv_func_$ac_func=yes"
7845 else
7846   echo "configure: failed program was:" >&5
7847   cat conftest.$ac_ext >&5
7848   rm -rf conftest*
7849   eval "ac_cv_func_$ac_func=no"
7850 fi
7851 rm -f conftest*
7852
7853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7854   echo "$ac_t""yes" 1>&6
7855     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7856   { test "$extra_verbose" = "yes" && cat << EOF
7857     Defining $ac_tr_func
7858 EOF
7859 cat >> confdefs.h <<EOF
7860 #define $ac_tr_func 1
7861 EOF
7862 }
7863  
7864 else
7865   echo "$ac_t""no" 1>&6
7866 fi
7867 done
7868
7869 fi
7870
7871 if test "$with_postgresql" != "no"; then
7872   echo "checking for PostgreSQL" 1>&6
7873 echo "configure:7874: checking for PostgreSQL" >&5
7874
7875   for header_dir in "" "pgsql/" "postgresql/"; do
7876     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7877 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7878 echo "configure:7879: checking for ${header_dir}libpq-fe.h" >&5
7879
7880 cat > conftest.$ac_ext <<EOF
7881 #line 7882 "configure"
7882 #include "confdefs.h"
7883 #include <${header_dir}libpq-fe.h>
7884 EOF
7885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7886 { (eval echo configure:7887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7888 if test -z "$ac_err"; then
7889   rm -rf conftest*
7890   eval "ac_cv_header_$ac_safe=yes"
7891 else
7892   echo "$ac_err" >&5
7893   echo "configure: failed program was:" >&5
7894   cat conftest.$ac_ext >&5
7895   rm -rf conftest*
7896   eval "ac_cv_header_$ac_safe=no"
7897 fi
7898 rm -f conftest*
7899 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7900   echo "$ac_t""yes" 1>&6
7901   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7902 else
7903   echo "$ac_t""no" 1>&6
7904 fi
7905
7906   done
7907
7908   test -n "$libpq_fe_h_file" && { 
7909 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7910 echo "configure:7911: checking for PQconnectdb in -lpq" >&5
7911 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7912
7913 xe_check_libs=" -lpq "
7914 cat > conftest.$ac_ext <<EOF
7915 #line 7916 "configure"
7916 #include "confdefs.h"
7917 /* Override any gcc2 internal prototype to avoid an error.  */
7918 /* We use char because int might match the return type of a gcc2
7919     builtin and then its argument prototype would still apply.  */
7920 char PQconnectdb();
7921
7922 int main() {
7923 PQconnectdb()
7924 ; return 0; }
7925 EOF
7926 if { (eval echo configure:7927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7927   rm -rf conftest*
7928   eval "ac_cv_lib_$ac_lib_var=yes"
7929 else
7930   echo "configure: failed program was:" >&5
7931   cat conftest.$ac_ext >&5
7932   rm -rf conftest*
7933   eval "ac_cv_lib_$ac_lib_var=no"
7934 fi
7935 rm -f conftest*
7936 xe_check_libs=""
7937
7938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7939   echo "$ac_t""yes" 1>&6
7940   have_libpq=yes
7941 else
7942   echo "$ac_t""no" 1>&6
7943 fi
7944
7945  }
7946
7947   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7948     with_postgresql=yes
7949     { test "$extra_verbose" = "yes" && cat << \EOF
7950     Defining HAVE_POSTGRESQL
7951 EOF
7952 cat >> confdefs.h <<\EOF
7953 #define HAVE_POSTGRESQL 1
7954 EOF
7955 }
7956
7957     
7958 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7959 echo "configure:7960: checking for PQconnectStart in -lpq" >&5
7960 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7961
7962 xe_check_libs=" -lpq "
7963 cat > conftest.$ac_ext <<EOF
7964 #line 7965 "configure"
7965 #include "confdefs.h"
7966 /* Override any gcc2 internal prototype to avoid an error.  */
7967 /* We use char because int might match the return type of a gcc2
7968     builtin and then its argument prototype would still apply.  */
7969 char PQconnectStart();
7970
7971 int main() {
7972 PQconnectStart()
7973 ; return 0; }
7974 EOF
7975 if { (eval echo configure:7976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7976   rm -rf conftest*
7977   eval "ac_cv_lib_$ac_lib_var=yes"
7978 else
7979   echo "configure: failed program was:" >&5
7980   cat conftest.$ac_ext >&5
7981   rm -rf conftest*
7982   eval "ac_cv_lib_$ac_lib_var=no"
7983 fi
7984 rm -f conftest*
7985 xe_check_libs=""
7986
7987 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7988   echo "$ac_t""yes" 1>&6
7989   with_postgresqlv7=yes;
7990                  { test "$extra_verbose" = "yes" && cat << \EOF
7991     Defining HAVE_POSTGRESQLV7
7992 EOF
7993 cat >> confdefs.h <<\EOF
7994 #define HAVE_POSTGRESQLV7 1
7995 EOF
7996 }
7997
7998 else
7999   echo "$ac_t""no" 1>&6
8000 fi
8001
8002
8003     { test "$extra_verbose" = "yes" && cat << EOF
8004     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
8005 EOF
8006 cat >> confdefs.h <<EOF
8007 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
8008 EOF
8009 }
8010
8011     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
8012     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
8013    echo "    xemacs will be linked with \"postgresql.o\""
8014  fi
8015   elif test "$with_postgresql" = "yes"; then
8016     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
8017   fi
8018 fi
8019
8020
8021 if test "$window_system" != "none"; then
8022   echo "checking for graphics libraries" 1>&6
8023 echo "configure:8024: checking for graphics libraries" >&5
8024
8025     xpm_problem=""
8026   if test -z "$with_xpm"; then
8027     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
8028 echo "configure:8029: checking for Xpm - no older than 3.4f" >&5
8029     xe_check_libs=-lXpm
8030     cat > conftest.$ac_ext <<EOF
8031 #line 8032 "configure"
8032 #include "confdefs.h"
8033 #define XPM_NUMBERS
8034 #include <X11/xpm.h>
8035     int main(int c, char **v) {
8036     return c == 1 ? 0 :
8037       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
8038       XpmIncludeVersion < 30406 ? 2 : 0 ;}
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8041 then
8042   ./conftest dummy_arg; xpm_status=$?;
8043       if test "$xpm_status" = "0"; then
8044         with_xpm=yes;
8045       else
8046         with_xpm=no;
8047         if test "$xpm_status" = "1"; then
8048           xpm_problem="Xpm library version and header file version don't match!"
8049         elif test "$xpm_status" = "2"; then
8050           xpm_problem="Xpm library version is too old!"
8051         else
8052           xpm_problem="Internal xpm detection logic error!"
8053         fi
8054         echo "
8055 *** WARNING *** $xpm_problem
8056   I'm not touching that with a 10-foot pole!
8057   If you really want to use the installed version of Xpm, rerun
8058   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
8059     fi
8060 else
8061   conftest_rc="$?"
8062   echo "configure: failed program was:" >&5
8063   cat conftest.$ac_ext >&5
8064   rm -fr conftest*
8065   with_xpm=no
8066 fi
8067 rm -fr conftest*
8068     xe_check_libs=
8069     echo "$ac_t""$with_xpm" 1>&6
8070   fi
8071   if test "$with_xpm" = "yes"; then
8072                 { test "$extra_verbose" = "yes" && cat << \EOF
8073     Defining HAVE_XPM
8074 EOF
8075 cat >> confdefs.h <<\EOF
8076 #define HAVE_XPM 1
8077 EOF
8078 }
8079
8080     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
8081     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
8082 echo "configure:8083: checking for \"FOR_MSW\" xpm" >&5
8083     xe_check_libs=-lXpm
8084     cat > conftest.$ac_ext <<EOF
8085 #line 8086 "configure"
8086 #include "confdefs.h"
8087
8088 int main() {
8089 XpmCreatePixmapFromData()
8090 ; return 0; }
8091 EOF
8092 if { (eval echo configure:8093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8093   rm -rf conftest*
8094   xpm_for_msw=no
8095 else
8096   echo "configure: failed program was:" >&5
8097   cat conftest.$ac_ext >&5
8098   rm -rf conftest*
8099   xpm_for_msw=yes
8100 fi
8101 rm -f conftest*
8102     xe_check_libs=
8103     echo "$ac_t""$xpm_for_msw" 1>&6
8104     if test "$xpm_for_msw" = "yes"; then
8105       { test "$extra_verbose" = "yes" && cat << \EOF
8106     Defining FOR_MSW
8107 EOF
8108 cat >> confdefs.h <<\EOF
8109 #define FOR_MSW 1
8110 EOF
8111 }
8112
8113     fi
8114   fi
8115
8116     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8117 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8118 echo "configure:8119: checking for compface.h" >&5
8119
8120 cat > conftest.$ac_ext <<EOF
8121 #line 8122 "configure"
8122 #include "confdefs.h"
8123 #include <compface.h>
8124 EOF
8125 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8126 { (eval echo configure:8127: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8127 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8128 if test -z "$ac_err"; then
8129   rm -rf conftest*
8130   eval "ac_cv_header_$ac_safe=yes"
8131 else
8132   echo "$ac_err" >&5
8133   echo "configure: failed program was:" >&5
8134   cat conftest.$ac_ext >&5
8135   rm -rf conftest*
8136   eval "ac_cv_header_$ac_safe=no"
8137 fi
8138 rm -f conftest*
8139 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8140   echo "$ac_t""yes" 1>&6
8141   :
8142 else
8143   echo "$ac_t""no" 1>&6
8144 with_xface=no
8145 fi
8146  }
8147   test -z "$with_xface" && { 
8148 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8149 echo "configure:8150: checking for UnGenFace in -lcompface" >&5
8150 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8151
8152 xe_check_libs=" -lcompface "
8153 cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 /* Override any gcc2 internal prototype to avoid an error.  */
8157 /* We use char because int might match the return type of a gcc2
8158     builtin and then its argument prototype would still apply.  */
8159 char UnGenFace();
8160
8161 int main() {
8162 UnGenFace()
8163 ; return 0; }
8164 EOF
8165 if { (eval echo configure:8166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8166   rm -rf conftest*
8167   eval "ac_cv_lib_$ac_lib_var=yes"
8168 else
8169   echo "configure: failed program was:" >&5
8170   cat conftest.$ac_ext >&5
8171   rm -rf conftest*
8172   eval "ac_cv_lib_$ac_lib_var=no"
8173 fi
8174 rm -f conftest*
8175 xe_check_libs=""
8176
8177 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8178   echo "$ac_t""yes" 1>&6
8179   : 
8180 else
8181   echo "$ac_t""no" 1>&6
8182 with_xface=no
8183 fi
8184
8185  }
8186   test -z "$with_xface" && with_xface=yes
8187   if test "$with_xface" = "yes"; then
8188     { test "$extra_verbose" = "yes" && cat << \EOF
8189     Defining HAVE_XFACE
8190 EOF
8191 cat >> confdefs.h <<\EOF
8192 #define HAVE_XFACE 1
8193 EOF
8194 }
8195
8196     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
8197   fi
8198
8199         if test "$with_gif" != "no"; then
8200     with_gif="yes"
8201     { test "$extra_verbose" = "yes" && cat << \EOF
8202     Defining HAVE_GIF
8203 EOF
8204 cat >> confdefs.h <<\EOF
8205 #define HAVE_GIF 1
8206 EOF
8207 }
8208
8209     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
8210    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
8211  fi
8212   fi
8213
8214       if test "$with_png $with_tiff" != "no no"; then
8215     
8216 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
8217 echo "configure:8218: checking for inflate in -lc" >&5
8218 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
8219
8220 xe_check_libs=" -lc "
8221 cat > conftest.$ac_ext <<EOF
8222 #line 8223 "configure"
8223 #include "confdefs.h"
8224 /* Override any gcc2 internal prototype to avoid an error.  */
8225 /* We use char because int might match the return type of a gcc2
8226     builtin and then its argument prototype would still apply.  */
8227 char inflate();
8228
8229 int main() {
8230 inflate()
8231 ; return 0; }
8232 EOF
8233 if { (eval echo configure:8234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8234   rm -rf conftest*
8235   eval "ac_cv_lib_$ac_lib_var=yes"
8236 else
8237   echo "configure: failed program was:" >&5
8238   cat conftest.$ac_ext >&5
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=no"
8241 fi
8242 rm -f conftest*
8243 xe_check_libs=""
8244
8245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8246   echo "$ac_t""yes" 1>&6
8247   :
8248 else
8249   echo "$ac_t""no" 1>&6
8250
8251 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
8252 echo "configure:8253: checking for inflate in -lz" >&5
8253 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
8254
8255 xe_check_libs=" -lz "
8256 cat > conftest.$ac_ext <<EOF
8257 #line 8258 "configure"
8258 #include "confdefs.h"
8259 /* Override any gcc2 internal prototype to avoid an error.  */
8260 /* We use char because int might match the return type of a gcc2
8261     builtin and then its argument prototype would still apply.  */
8262 char inflate();
8263
8264 int main() {
8265 inflate()
8266 ; return 0; }
8267 EOF
8268 if { (eval echo configure:8269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8269   rm -rf conftest*
8270   eval "ac_cv_lib_$ac_lib_var=yes"
8271 else
8272   echo "configure: failed program was:" >&5
8273   cat conftest.$ac_ext >&5
8274   rm -rf conftest*
8275   eval "ac_cv_lib_$ac_lib_var=no"
8276 fi
8277 rm -f conftest*
8278 xe_check_libs=""
8279
8280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8281   echo "$ac_t""yes" 1>&6
8282   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
8283 else
8284   echo "$ac_t""no" 1>&6
8285
8286 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
8287 echo "configure:8288: checking for inflate in -lgz" >&5
8288 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
8289
8290 xe_check_libs=" -lgz "
8291 cat > conftest.$ac_ext <<EOF
8292 #line 8293 "configure"
8293 #include "confdefs.h"
8294 /* Override any gcc2 internal prototype to avoid an error.  */
8295 /* We use char because int might match the return type of a gcc2
8296     builtin and then its argument prototype would still apply.  */
8297 char inflate();
8298
8299 int main() {
8300 inflate()
8301 ; return 0; }
8302 EOF
8303 if { (eval echo configure:8304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8304   rm -rf conftest*
8305   eval "ac_cv_lib_$ac_lib_var=yes"
8306 else
8307   echo "configure: failed program was:" >&5
8308   cat conftest.$ac_ext >&5
8309   rm -rf conftest*
8310   eval "ac_cv_lib_$ac_lib_var=no"
8311 fi
8312 rm -f conftest*
8313 xe_check_libs=""
8314
8315 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8316   echo "$ac_t""yes" 1>&6
8317   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
8318 else
8319   echo "$ac_t""no" 1>&6
8320 fi
8321
8322
8323 fi
8324
8325
8326 fi
8327
8328
8329   fi
8330
8331     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
8332 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
8333 echo "configure:8334: checking for jpeglib.h" >&5
8334
8335 cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 #include <jpeglib.h>
8339 EOF
8340 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8341 { (eval echo configure:8342: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8342 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8343 if test -z "$ac_err"; then
8344   rm -rf conftest*
8345   eval "ac_cv_header_$ac_safe=yes"
8346 else
8347   echo "$ac_err" >&5
8348   echo "configure: failed program was:" >&5
8349   cat conftest.$ac_ext >&5
8350   rm -rf conftest*
8351   eval "ac_cv_header_$ac_safe=no"
8352 fi
8353 rm -f conftest*
8354 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8355   echo "$ac_t""yes" 1>&6
8356   :
8357 else
8358   echo "$ac_t""no" 1>&6
8359 with_jpeg=no
8360 fi
8361  }
8362   test -z "$with_jpeg" && { 
8363 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
8364 echo "configure:8365: checking for jpeg_destroy_decompress in -ljpeg" >&5
8365 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
8366
8367 xe_check_libs=" -ljpeg "
8368 cat > conftest.$ac_ext <<EOF
8369 #line 8370 "configure"
8370 #include "confdefs.h"
8371 /* Override any gcc2 internal prototype to avoid an error.  */
8372 /* We use char because int might match the return type of a gcc2
8373     builtin and then its argument prototype would still apply.  */
8374 char jpeg_destroy_decompress();
8375
8376 int main() {
8377 jpeg_destroy_decompress()
8378 ; return 0; }
8379 EOF
8380 if { (eval echo configure:8381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=yes"
8383 else
8384   echo "configure: failed program was:" >&5
8385   cat conftest.$ac_ext >&5
8386   rm -rf conftest*
8387   eval "ac_cv_lib_$ac_lib_var=no"
8388 fi
8389 rm -f conftest*
8390 xe_check_libs=""
8391
8392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8393   echo "$ac_t""yes" 1>&6
8394   :
8395 else
8396   echo "$ac_t""no" 1>&6
8397 with_jpeg=no
8398 fi
8399
8400  }
8401   test -z "$with_jpeg" && with_jpeg=yes
8402   if test "$with_jpeg" = "yes"; then
8403     { test "$extra_verbose" = "yes" && cat << \EOF
8404     Defining HAVE_JPEG
8405 EOF
8406 cat >> confdefs.h <<\EOF
8407 #define HAVE_JPEG 1
8408 EOF
8409 }
8410
8411     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
8412   fi
8413
8414     png_problem=""
8415   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
8416 echo "configure:8417: checking for pow" >&5
8417
8418 cat > conftest.$ac_ext <<EOF
8419 #line 8420 "configure"
8420 #include "confdefs.h"
8421 /* System header to define __stub macros and hopefully few prototypes,
8422     which can conflict with char pow(); below.  */
8423 #include <assert.h>
8424 /* Override any gcc2 internal prototype to avoid an error.  */
8425 /* We use char because int might match the return type of a gcc2
8426     builtin and then its argument prototype would still apply.  */
8427 char pow();
8428
8429 int main() {
8430
8431 /* The GNU C library defines this for functions which it implements
8432     to always fail with ENOSYS.  Some functions are actually named
8433     something starting with __ and the normal name is an alias.  */
8434 #if defined (__stub_pow) || defined (__stub___pow)
8435 choke me
8436 #else
8437 pow();
8438 #endif
8439
8440 ; return 0; }
8441 EOF
8442 if { (eval echo configure:8443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8443   rm -rf conftest*
8444   eval "ac_cv_func_pow=yes"
8445 else
8446   echo "configure: failed program was:" >&5
8447   cat conftest.$ac_ext >&5
8448   rm -rf conftest*
8449   eval "ac_cv_func_pow=no"
8450 fi
8451 rm -f conftest*
8452
8453 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8454   echo "$ac_t""yes" 1>&6
8455   :
8456 else
8457   echo "$ac_t""no" 1>&6
8458 with_png=no
8459 fi
8460  }
8461   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8462 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8463 echo "configure:8464: checking for png.h" >&5
8464
8465 cat > conftest.$ac_ext <<EOF
8466 #line 8467 "configure"
8467 #include "confdefs.h"
8468 #include <png.h>
8469 EOF
8470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8471 { (eval echo configure:8472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8473 if test -z "$ac_err"; then
8474   rm -rf conftest*
8475   eval "ac_cv_header_$ac_safe=yes"
8476 else
8477   echo "$ac_err" >&5
8478   echo "configure: failed program was:" >&5
8479   cat conftest.$ac_ext >&5
8480   rm -rf conftest*
8481   eval "ac_cv_header_$ac_safe=no"
8482 fi
8483 rm -f conftest*
8484 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8485   echo "$ac_t""yes" 1>&6
8486   :
8487 else
8488   echo "$ac_t""no" 1>&6
8489 with_png=no
8490 fi
8491  }
8492   test -z "$with_png" && { 
8493 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8494 echo "configure:8495: checking for png_read_image in -lpng" >&5
8495 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8496
8497 xe_check_libs=" -lpng "
8498 cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 /* Override any gcc2 internal prototype to avoid an error.  */
8502 /* We use char because int might match the return type of a gcc2
8503     builtin and then its argument prototype would still apply.  */
8504 char png_read_image();
8505
8506 int main() {
8507 png_read_image()
8508 ; return 0; }
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8511   rm -rf conftest*
8512   eval "ac_cv_lib_$ac_lib_var=yes"
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -rf conftest*
8517   eval "ac_cv_lib_$ac_lib_var=no"
8518 fi
8519 rm -f conftest*
8520 xe_check_libs=""
8521
8522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8523   echo "$ac_t""yes" 1>&6
8524   :
8525 else
8526   echo "$ac_t""no" 1>&6
8527 with_png=no
8528 fi
8529
8530  }
8531   if test -z "$with_png"; then
8532     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8533 echo "configure:8534: checking for workable png version information" >&5
8534     xe_check_libs="-lpng -lz"
8535     cat > conftest.$ac_ext <<EOF
8536 #line 8537 "configure"
8537 #include "confdefs.h"
8538 #include <png.h>
8539     int main(int c, char **v) {
8540     if (c == 1) return 0;
8541     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8542     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8543 EOF
8544 if { (eval echo configure:8545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8545 then
8546   ./conftest dummy_arg; png_status=$?;
8547       if test "$png_status" = "0"; then
8548         with_png=yes;
8549       else
8550         with_png=no;
8551         if test "$png_status" = "1"; then
8552           png_problem="PNG library version and header file don't match!"
8553         elif test "$png_status" = "2"; then
8554           png_problem="PNG library version too old (pre 1.0.2)!"
8555         fi
8556         echo "
8557 *** WARNING *** $png_problem
8558   I'm not touching that with a 10-foot pole!
8559   If you really want to use the installed version of libPNG, rerun
8560   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8561     fi
8562 else
8563   conftest_rc="$?"
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -fr conftest*
8567   with_png=no
8568 fi
8569 rm -fr conftest*
8570     xe_check_libs=
8571     echo "$ac_t""$with_png" 1>&6
8572   fi
8573   if test "$with_png" = "yes"; then
8574     { test "$extra_verbose" = "yes" && cat << \EOF
8575     Defining HAVE_PNG
8576 EOF
8577 cat >> confdefs.h <<\EOF
8578 #define HAVE_PNG 1
8579 EOF
8580 }
8581
8582     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8583   fi
8584
8585     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8586 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8587 echo "configure:8588: checking for tiffio.h" >&5
8588
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 #include <tiffio.h>
8593 EOF
8594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8595 { (eval echo configure:8596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8597 if test -z "$ac_err"; then
8598   rm -rf conftest*
8599   eval "ac_cv_header_$ac_safe=yes"
8600 else
8601   echo "$ac_err" >&5
8602   echo "configure: failed program was:" >&5
8603   cat conftest.$ac_ext >&5
8604   rm -rf conftest*
8605   eval "ac_cv_header_$ac_safe=no"
8606 fi
8607 rm -f conftest*
8608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8609   echo "$ac_t""yes" 1>&6
8610   :
8611 else
8612   echo "$ac_t""no" 1>&6
8613 with_tiff=no
8614 fi
8615  }
8616   test -z "$with_tiff" && { 
8617 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8618 echo "configure:8619: checking for TIFFClientOpen in -ltiff" >&5
8619 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8620
8621 xe_check_libs=" -ltiff "
8622 cat > conftest.$ac_ext <<EOF
8623 #line 8624 "configure"
8624 #include "confdefs.h"
8625 /* Override any gcc2 internal prototype to avoid an error.  */
8626 /* We use char because int might match the return type of a gcc2
8627     builtin and then its argument prototype would still apply.  */
8628 char TIFFClientOpen();
8629
8630 int main() {
8631 TIFFClientOpen()
8632 ; return 0; }
8633 EOF
8634 if { (eval echo configure:8635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8635   rm -rf conftest*
8636   eval "ac_cv_lib_$ac_lib_var=yes"
8637 else
8638   echo "configure: failed program was:" >&5
8639   cat conftest.$ac_ext >&5
8640   rm -rf conftest*
8641   eval "ac_cv_lib_$ac_lib_var=no"
8642 fi
8643 rm -f conftest*
8644 xe_check_libs=""
8645
8646 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8647   echo "$ac_t""yes" 1>&6
8648   :
8649 else
8650   echo "$ac_t""no" 1>&6
8651 with_tiff=no
8652 fi
8653
8654  }
8655   test -z "$with_tiff" && with_tiff=yes
8656   if test "$with_tiff" = "yes"; then
8657     { test "$extra_verbose" = "yes" && cat << \EOF
8658     Defining HAVE_TIFF
8659 EOF
8660 cat >> confdefs.h <<\EOF
8661 #define HAVE_TIFF 1
8662 EOF
8663 }
8664
8665     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8666   fi
8667 fi
8668
8669
8670 if test "$with_gtk" = "yes"; then
8671     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
8672 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
8673 echo "configure:8674: checking for compface.h" >&5
8674
8675 cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 #include <compface.h>
8679 EOF
8680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8681 { (eval echo configure:8682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8683 if test -z "$ac_err"; then
8684   rm -rf conftest*
8685   eval "ac_cv_header_$ac_safe=yes"
8686 else
8687   echo "$ac_err" >&5
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   eval "ac_cv_header_$ac_safe=no"
8692 fi
8693 rm -f conftest*
8694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8695   echo "$ac_t""yes" 1>&6
8696   :
8697 else
8698   echo "$ac_t""no" 1>&6
8699 with_xface=no
8700 fi
8701  }
8702   test -z "$with_xface" && { 
8703 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
8704 echo "configure:8705: checking for UnGenFace in -lcompface" >&5
8705 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
8706
8707 xe_check_libs=" -lcompface "
8708 cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 /* Override any gcc2 internal prototype to avoid an error.  */
8712 /* We use char because int might match the return type of a gcc2
8713     builtin and then its argument prototype would still apply.  */
8714 char UnGenFace();
8715
8716 int main() {
8717 UnGenFace()
8718 ; return 0; }
8719 EOF
8720 if { (eval echo configure:8721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8721   rm -rf conftest*
8722   eval "ac_cv_lib_$ac_lib_var=yes"
8723 else
8724   echo "configure: failed program was:" >&5
8725   cat conftest.$ac_ext >&5
8726   rm -rf conftest*
8727   eval "ac_cv_lib_$ac_lib_var=no"
8728 fi
8729 rm -f conftest*
8730 xe_check_libs=""
8731
8732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8733   echo "$ac_t""yes" 1>&6
8734   : 
8735 else
8736   echo "$ac_t""no" 1>&6
8737 with_xface=no
8738 fi
8739
8740  }
8741   test -z "$with_xface" && with_xface=yes
8742   if test "$with_xface" = "yes"; then
8743     { test "$extra_verbose" = "yes" && cat << \EOF
8744     Defining HAVE_XFACE
8745 EOF
8746 cat >> confdefs.h <<\EOF
8747 #define HAVE_XFACE 1
8748 EOF
8749 }
8750
8751     libs_gtk="-lcompface $libs_gtk" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_gtk"; fi
8752   fi
8753 fi
8754
8755
8756
8757 if test "$with_x11" = "yes"; then
8758
8759   echo "checking for X11 graphics libraries" 1>&6
8760 echo "configure:8761: checking for X11 graphics libraries" >&5
8761
8762   echo "checking for the Athena widgets" 1>&6
8763 echo "configure:8764: checking for the Athena widgets" >&5
8764
8765     case "$with_athena" in
8766         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8767     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8768     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8769     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8770     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8771     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8772   esac
8773
8774     if test "$athena_3d" = "no"; then
8775     
8776 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8777 echo "configure:8778: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8778 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8779
8780 xe_check_libs=" -l$athena_variant "
8781 cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 /* Override any gcc2 internal prototype to avoid an error.  */
8785 /* We use char because int might match the return type of a gcc2
8786     builtin and then its argument prototype would still apply.  */
8787 char XawScrollbarSetThumb();
8788
8789 int main() {
8790 XawScrollbarSetThumb()
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8794   rm -rf conftest*
8795   eval "ac_cv_lib_$ac_lib_var=yes"
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799   rm -rf conftest*
8800   eval "ac_cv_lib_$ac_lib_var=no"
8801 fi
8802 rm -f conftest*
8803 xe_check_libs=""
8804
8805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8806   echo "$ac_t""yes" 1>&6
8807           
8808 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8809 echo "configure:8810: checking for threeDClassRec in -l$athena_variant" >&5
8810 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8811
8812 xe_check_libs=" -l$athena_variant "
8813 cat > conftest.$ac_ext <<EOF
8814 #line 8815 "configure"
8815 #include "confdefs.h"
8816 /* Override any gcc2 internal prototype to avoid an error.  */
8817 /* We use char because int might match the return type of a gcc2
8818     builtin and then its argument prototype would still apply.  */
8819 char threeDClassRec();
8820
8821 int main() {
8822 threeDClassRec()
8823 ; return 0; }
8824 EOF
8825 if { (eval echo configure:8826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8826   rm -rf conftest*
8827   eval "ac_cv_lib_$ac_lib_var=yes"
8828 else
8829   echo "configure: failed program was:" >&5
8830   cat conftest.$ac_ext >&5
8831   rm -rf conftest*
8832   eval "ac_cv_lib_$ac_lib_var=no"
8833 fi
8834 rm -f conftest*
8835 xe_check_libs=""
8836
8837 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8838   echo "$ac_t""yes" 1>&6
8839   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8840 else
8841   echo "$ac_t""no" 1>&6
8842 athena_lib=$athena_variant
8843 fi
8844
8845
8846       
8847 else
8848   echo "$ac_t""no" 1>&6
8849 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8850 fi
8851
8852
8853   else
8854         
8855 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8856 echo "configure:8857: checking for threeDClassRec in -l$athena_variant" >&5
8857 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8858
8859 xe_check_libs=" -l$athena_variant "
8860 cat > conftest.$ac_ext <<EOF
8861 #line 8862 "configure"
8862 #include "confdefs.h"
8863 /* Override any gcc2 internal prototype to avoid an error.  */
8864 /* We use char because int might match the return type of a gcc2
8865     builtin and then its argument prototype would still apply.  */
8866 char threeDClassRec();
8867
8868 int main() {
8869 threeDClassRec()
8870 ; return 0; }
8871 EOF
8872 if { (eval echo configure:8873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8873   rm -rf conftest*
8874   eval "ac_cv_lib_$ac_lib_var=yes"
8875 else
8876   echo "configure: failed program was:" >&5
8877   cat conftest.$ac_ext >&5
8878   rm -rf conftest*
8879   eval "ac_cv_lib_$ac_lib_var=no"
8880 fi
8881 rm -f conftest*
8882 xe_check_libs=""
8883
8884 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8885   echo "$ac_t""yes" 1>&6
8886   athena_lib=$athena_variant
8887 else
8888   echo "$ac_t""no" 1>&6
8889 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8890 echo "configure:8891: checking for threeDClassRec in -lXaw" >&5
8891 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8892
8893 xe_check_libs=" -lXaw "
8894 cat > conftest.$ac_ext <<EOF
8895 #line 8896 "configure"
8896 #include "confdefs.h"
8897 /* Override any gcc2 internal prototype to avoid an error.  */
8898 /* We use char because int might match the return type of a gcc2
8899     builtin and then its argument prototype would still apply.  */
8900 char threeDClassRec();
8901
8902 int main() {
8903 threeDClassRec()
8904 ; return 0; }
8905 EOF
8906 if { (eval echo configure:8907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8907   rm -rf conftest*
8908   eval "ac_cv_lib_$ac_lib_var=yes"
8909 else
8910   echo "configure: failed program was:" >&5
8911   cat conftest.$ac_ext >&5
8912   rm -rf conftest*
8913   eval "ac_cv_lib_$ac_lib_var=no"
8914 fi
8915 rm -f conftest*
8916 xe_check_libs=""
8917
8918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8919   echo "$ac_t""yes" 1>&6
8920   athena_lib=Xaw;
8921           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8922         
8923 else
8924   echo "$ac_t""no" 1>&6
8925 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8926 fi
8927
8928
8929 fi
8930
8931
8932   fi
8933
8934     if test "$athena_3d" = "no"; then
8935     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8936 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8937 echo "configure:8938: checking for X11/Xaw/ThreeD.h" >&5
8938
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 #include <X11/Xaw/ThreeD.h>
8943 EOF
8944 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8945 { (eval echo configure:8946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8946 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8947 if test -z "$ac_err"; then
8948   rm -rf conftest*
8949   eval "ac_cv_header_$ac_safe=yes"
8950 else
8951   echo "$ac_err" >&5
8952   echo "configure: failed program was:" >&5
8953   cat conftest.$ac_ext >&5
8954   rm -rf conftest*
8955   eval "ac_cv_header_$ac_safe=no"
8956 fi
8957 rm -f conftest*
8958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8959   echo "$ac_t""yes" 1>&6
8960   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8961 else
8962   echo "$ac_t""no" 1>&6
8963 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8964 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8965 echo "configure:8966: checking for X11/Xaw/XawInit.h" >&5
8966
8967 cat > conftest.$ac_ext <<EOF
8968 #line 8969 "configure"
8969 #include "confdefs.h"
8970 #include <X11/Xaw/XawInit.h>
8971 EOF
8972 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8973 { (eval echo configure:8974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8974 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8975 if test -z "$ac_err"; then
8976   rm -rf conftest*
8977   eval "ac_cv_header_$ac_safe=yes"
8978 else
8979   echo "$ac_err" >&5
8980   echo "configure: failed program was:" >&5
8981   cat conftest.$ac_ext >&5
8982   rm -rf conftest*
8983   eval "ac_cv_header_$ac_safe=no"
8984 fi
8985 rm -f conftest*
8986 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8987   echo "$ac_t""yes" 1>&6
8988   athena_h_path=X11/Xaw
8989 else
8990   echo "$ac_t""no" 1>&6
8991 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8992 fi
8993
8994 fi
8995
8996   else
8997             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8998 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8999 echo "configure:9000: checking for X11/$athena_variant/XawInit.h" >&5
9000
9001 cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 #include <X11/$athena_variant/XawInit.h>
9005 EOF
9006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9007 { (eval echo configure:9008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9009 if test -z "$ac_err"; then
9010   rm -rf conftest*
9011   eval "ac_cv_header_$ac_safe=yes"
9012 else
9013   echo "$ac_err" >&5
9014   echo "configure: failed program was:" >&5
9015   cat conftest.$ac_ext >&5
9016   rm -rf conftest*
9017   eval "ac_cv_header_$ac_safe=no"
9018 fi
9019 rm -f conftest*
9020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9021   echo "$ac_t""yes" 1>&6
9022   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9023 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
9024 echo "configure:9025: checking for X11/$athena_variant/ThreeD.h" >&5
9025
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 #include <X11/$athena_variant/ThreeD.h>
9030 EOF
9031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9032 { (eval echo configure:9033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9034 if test -z "$ac_err"; then
9035   rm -rf conftest*
9036   eval "ac_cv_header_$ac_safe=yes"
9037 else
9038   echo "$ac_err" >&5
9039   echo "configure: failed program was:" >&5
9040   cat conftest.$ac_ext >&5
9041   rm -rf conftest*
9042   eval "ac_cv_header_$ac_safe=no"
9043 fi
9044 rm -f conftest*
9045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9046   echo "$ac_t""yes" 1>&6
9047   athena_h_path=X11/$athena_variant
9048 else
9049   echo "$ac_t""no" 1>&6
9050 fi
9051
9052 else
9053   echo "$ac_t""no" 1>&6
9054 fi
9055
9056
9057         if test -z "$athena_h_path"; then
9058       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
9059 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
9060 echo "configure:9061: checking for $athena_variant/XawInit.h" >&5
9061
9062 cat > conftest.$ac_ext <<EOF
9063 #line 9064 "configure"
9064 #include "confdefs.h"
9065 #include <$athena_variant/XawInit.h>
9066 EOF
9067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9068 { (eval echo configure:9069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9070 if test -z "$ac_err"; then
9071   rm -rf conftest*
9072   eval "ac_cv_header_$ac_safe=yes"
9073 else
9074   echo "$ac_err" >&5
9075   echo "configure: failed program was:" >&5
9076   cat conftest.$ac_ext >&5
9077   rm -rf conftest*
9078   eval "ac_cv_header_$ac_safe=no"
9079 fi
9080 rm -f conftest*
9081 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9082   echo "$ac_t""yes" 1>&6
9083   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
9084 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
9085 echo "configure:9086: checking for $athena_variant/ThreeD.h" >&5
9086
9087 cat > conftest.$ac_ext <<EOF
9088 #line 9089 "configure"
9089 #include "confdefs.h"
9090 #include <$athena_variant/ThreeD.h>
9091 EOF
9092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9093 { (eval echo configure:9094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9095 if test -z "$ac_err"; then
9096   rm -rf conftest*
9097   eval "ac_cv_header_$ac_safe=yes"
9098 else
9099   echo "$ac_err" >&5
9100   echo "configure: failed program was:" >&5
9101   cat conftest.$ac_ext >&5
9102   rm -rf conftest*
9103   eval "ac_cv_header_$ac_safe=no"
9104 fi
9105 rm -f conftest*
9106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9107   echo "$ac_t""yes" 1>&6
9108   athena_h_path=$athena_variant
9109 else
9110   echo "$ac_t""no" 1>&6
9111 fi
9112
9113 else
9114   echo "$ac_t""no" 1>&6
9115 fi
9116
9117     fi
9118
9119         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9120       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9121 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
9122 echo "configure:9123: checking for X11/Xaw3d/XawInit.h" >&5
9123
9124 cat > conftest.$ac_ext <<EOF
9125 #line 9126 "configure"
9126 #include "confdefs.h"
9127 #include <X11/Xaw3d/XawInit.h>
9128 EOF
9129 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9130 { (eval echo configure:9131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9131 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9132 if test -z "$ac_err"; then
9133   rm -rf conftest*
9134   eval "ac_cv_header_$ac_safe=yes"
9135 else
9136   echo "$ac_err" >&5
9137   echo "configure: failed program was:" >&5
9138   cat conftest.$ac_ext >&5
9139   rm -rf conftest*
9140   eval "ac_cv_header_$ac_safe=no"
9141 fi
9142 rm -f conftest*
9143 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9144   echo "$ac_t""yes" 1>&6
9145   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9146 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
9147 echo "configure:9148: checking for X11/Xaw3d/ThreeD.h" >&5
9148
9149 cat > conftest.$ac_ext <<EOF
9150 #line 9151 "configure"
9151 #include "confdefs.h"
9152 #include <X11/Xaw3d/ThreeD.h>
9153 EOF
9154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9155 { (eval echo configure:9156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9157 if test -z "$ac_err"; then
9158   rm -rf conftest*
9159   eval "ac_cv_header_$ac_safe=yes"
9160 else
9161   echo "$ac_err" >&5
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   eval "ac_cv_header_$ac_safe=no"
9166 fi
9167 rm -f conftest*
9168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9169   echo "$ac_t""yes" 1>&6
9170   
9171             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
9172             athena_h_path=X11/Xaw3d
9173           
9174 else
9175   echo "$ac_t""no" 1>&6
9176 fi
9177
9178 else
9179   echo "$ac_t""no" 1>&6
9180 fi
9181
9182     fi
9183
9184         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
9185       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
9186 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
9187 echo "configure:9188: checking for Xaw3d/XawInit.h" >&5
9188
9189 cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192 #include <Xaw3d/XawInit.h>
9193 EOF
9194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9195 { (eval echo configure:9196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9197 if test -z "$ac_err"; then
9198   rm -rf conftest*
9199   eval "ac_cv_header_$ac_safe=yes"
9200 else
9201   echo "$ac_err" >&5
9202   echo "configure: failed program was:" >&5
9203   cat conftest.$ac_ext >&5
9204   rm -rf conftest*
9205   eval "ac_cv_header_$ac_safe=no"
9206 fi
9207 rm -f conftest*
9208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9209   echo "$ac_t""yes" 1>&6
9210   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
9211 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
9212 echo "configure:9213: checking for Xaw3d/ThreeD.h" >&5
9213
9214 cat > conftest.$ac_ext <<EOF
9215 #line 9216 "configure"
9216 #include "confdefs.h"
9217 #include <Xaw3d/ThreeD.h>
9218 EOF
9219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9220 { (eval echo configure:9221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9222 if test -z "$ac_err"; then
9223   rm -rf conftest*
9224   eval "ac_cv_header_$ac_safe=yes"
9225 else
9226   echo "$ac_err" >&5
9227   echo "configure: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   rm -rf conftest*
9230   eval "ac_cv_header_$ac_safe=no"
9231 fi
9232 rm -f conftest*
9233 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9234   echo "$ac_t""yes" 1>&6
9235   
9236             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
9237             athena_h_path=Xaw3d
9238           
9239 else
9240   echo "$ac_t""no" 1>&6
9241 fi
9242
9243 else
9244   echo "$ac_t""no" 1>&6
9245 fi
9246
9247     fi
9248
9249             if test -z "$athena_h_path"; then
9250       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
9251 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
9252 echo "configure:9253: checking for X11/Xaw/ThreeD.h" >&5
9253
9254 cat > conftest.$ac_ext <<EOF
9255 #line 9256 "configure"
9256 #include "confdefs.h"
9257 #include <X11/Xaw/ThreeD.h>
9258 EOF
9259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9260 { (eval echo configure:9261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9262 if test -z "$ac_err"; then
9263   rm -rf conftest*
9264   eval "ac_cv_header_$ac_safe=yes"
9265 else
9266   echo "$ac_err" >&5
9267   echo "configure: failed program was:" >&5
9268   cat conftest.$ac_ext >&5
9269   rm -rf conftest*
9270   eval "ac_cv_header_$ac_safe=no"
9271 fi
9272 rm -f conftest*
9273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9274   echo "$ac_t""yes" 1>&6
9275   
9276           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
9277           athena_h_path=X11/Xaw
9278         
9279 else
9280   echo "$ac_t""no" 1>&6
9281 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
9282 fi
9283
9284     fi
9285   fi
9286
9287     if test -n "$athena_lib" -a -n "$athena_h_path"; then
9288     have_xaw=yes
9289   else
9290     have_xaw=no
9291   fi
9292
9293     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
9294 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
9295 echo "configure:9296: checking for Xm/Xm.h" >&5
9296
9297 cat > conftest.$ac_ext <<EOF
9298 #line 9299 "configure"
9299 #include "confdefs.h"
9300 #include <Xm/Xm.h>
9301 EOF
9302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9303 { (eval echo configure:9304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9305 if test -z "$ac_err"; then
9306   rm -rf conftest*
9307   eval "ac_cv_header_$ac_safe=yes"
9308 else
9309   echo "$ac_err" >&5
9310   echo "configure: failed program was:" >&5
9311   cat conftest.$ac_ext >&5
9312   rm -rf conftest*
9313   eval "ac_cv_header_$ac_safe=no"
9314 fi
9315 rm -f conftest*
9316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9317   echo "$ac_t""yes" 1>&6
9318   
9319 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
9320 echo "configure:9321: checking for XmStringFree in -lXm" >&5
9321 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
9322
9323 xe_check_libs=" -lXm "
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9327 /* Override any gcc2 internal prototype to avoid an error.  */
9328 /* We use char because int might match the return type of a gcc2
9329     builtin and then its argument prototype would still apply.  */
9330 char XmStringFree();
9331
9332 int main() {
9333 XmStringFree()
9334 ; return 0; }
9335 EOF
9336 if { (eval echo configure:9337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9337   rm -rf conftest*
9338   eval "ac_cv_lib_$ac_lib_var=yes"
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   eval "ac_cv_lib_$ac_lib_var=no"
9344 fi
9345 rm -f conftest*
9346 xe_check_libs=""
9347
9348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9349   echo "$ac_t""yes" 1>&6
9350   have_motif=yes
9351 else
9352   echo "$ac_t""no" 1>&6
9353 have_motif=no
9354 fi
9355
9356
9357 else
9358   echo "$ac_t""no" 1>&6
9359 have_motif=no
9360 fi
9361
9362
9363   if test "$have_motif" = "yes"; then
9364         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
9365 echo "configure:9366: checking for Lesstif" >&5
9366     cat > conftest.$ac_ext <<EOF
9367 #line 9368 "configure"
9368 #include "confdefs.h"
9369 #include <Xm/Xm.h>
9370 #ifdef LESSTIF_VERSION
9371 yes
9372 #endif
9373
9374 EOF
9375 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9376   egrep "yes" >/dev/null 2>&1; then
9377   rm -rf conftest*
9378   have_lesstif=yes
9379 else
9380   rm -rf conftest*
9381   have_lesstif=no
9382 fi
9383 rm -f conftest*
9384
9385   echo "$ac_t""$have_lesstif" 1>&6
9386   fi
9387
9388 fi 
9389
9390 case "$with_menubars" in "" | "yes" | "athena" )
9391   with_menubars="lucid" ;;
9392 esac
9393 case "$with_dialogs" in "" | "yes" | "lucid" )
9394   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
9395   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
9396   else with_dialogs=no
9397   fi ;;
9398 esac
9399 case "$with_scrollbars" in "" | "yes" )
9400   with_scrollbars="lucid" ;;
9401 esac
9402 case "$with_widgets" in "" | "yes" | "lucid")
9403   if   test "$have_motif" = "yes"; then with_widgets="motif"
9404   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
9405   else with_widgets=no
9406   fi ;;
9407 esac
9408
9409 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
9410
9411 case "$all_widgets" in
9412   *athena* )
9413     if test "$have_xaw" != "yes"; then
9414       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
9415     fi
9416
9417         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
9418
9419         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
9420
9421                     { test "$extra_verbose" = "yes" && cat << EOF
9422     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
9423 EOF
9424 cat >> confdefs.h <<EOF
9425 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
9426 EOF
9427 }
9428
9429     { test "$extra_verbose" = "yes" && cat << EOF
9430     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
9431 EOF
9432 cat >> confdefs.h <<EOF
9433 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
9434 EOF
9435 }
9436
9437     { test "$extra_verbose" = "yes" && cat << EOF
9438     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
9439 EOF
9440 cat >> confdefs.h <<EOF
9441 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
9442 EOF
9443 }
9444
9445     { test "$extra_verbose" = "yes" && cat << EOF
9446     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
9447 EOF
9448 cat >> confdefs.h <<EOF
9449 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
9450 EOF
9451 }
9452
9453     { test "$extra_verbose" = "yes" && cat << EOF
9454     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
9455 EOF
9456 cat >> confdefs.h <<EOF
9457 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
9458 EOF
9459 }
9460
9461     { test "$extra_verbose" = "yes" && cat << EOF
9462     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
9463 EOF
9464 cat >> confdefs.h <<EOF
9465 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
9466 EOF
9467 }
9468
9469     { test "$extra_verbose" = "yes" && cat << EOF
9470     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
9471 EOF
9472 cat >> confdefs.h <<EOF
9473 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
9474 EOF
9475 }
9476
9477     { test "$extra_verbose" = "yes" && cat << EOF
9478     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
9479 EOF
9480 cat >> confdefs.h <<EOF
9481 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
9482 EOF
9483 }
9484
9485     { test "$extra_verbose" = "yes" && cat << EOF
9486     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
9487 EOF
9488 cat >> confdefs.h <<EOF
9489 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
9490 EOF
9491 }
9492
9493     { test "$extra_verbose" = "yes" && cat << EOF
9494     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
9495 EOF
9496 cat >> confdefs.h <<EOF
9497 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
9498 EOF
9499 }
9500
9501
9502     { test "$extra_verbose" = "yes" && cat << \EOF
9503     Defining LWLIB_USES_ATHENA
9504 EOF
9505 cat >> confdefs.h <<\EOF
9506 #define LWLIB_USES_ATHENA 1
9507 EOF
9508 }
9509
9510     { test "$extra_verbose" = "yes" && cat << \EOF
9511     Defining NEED_ATHENA
9512 EOF
9513 cat >> confdefs.h <<\EOF
9514 #define NEED_ATHENA 1
9515 EOF
9516 }
9517
9518     need_athena="yes"
9519
9520     if test "$athena_3d" = "yes"; then
9521       { test "$extra_verbose" = "yes" && cat << \EOF
9522     Defining HAVE_ATHENA_3D
9523 EOF
9524 cat >> confdefs.h <<\EOF
9525 #define HAVE_ATHENA_3D 1
9526 EOF
9527 }
9528
9529     fi
9530   ;;
9531 esac
9532
9533 case "$all_widgets" in *motif* )
9534   { test "$extra_verbose" = "yes" && cat << \EOF
9535     Defining LWLIB_USES_MOTIF
9536 EOF
9537 cat >> confdefs.h <<\EOF
9538 #define LWLIB_USES_MOTIF 1
9539 EOF
9540 }
9541
9542   { test "$extra_verbose" = "yes" && cat << \EOF
9543     Defining NEED_MOTIF
9544 EOF
9545 cat >> confdefs.h <<\EOF
9546 #define NEED_MOTIF 1
9547 EOF
9548 }
9549
9550   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9551   need_motif=yes ;;
9552 esac
9553
9554 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9555 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9556 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9557 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9558         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9559 case "$with_widgets" in athena* )
9560         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;;
9561 esac
9562 case "$all_widgets" in *lucid* )
9563   { test "$extra_verbose" = "yes" && cat << \EOF
9564     Defining NEED_LUCID
9565 EOF
9566 cat >> confdefs.h <<\EOF
9567 #define NEED_LUCID 1
9568 EOF
9569 }
9570
9571   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9572 esac
9573
9574
9575
9576 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9577     Defining LWLIB_SCROLLBARS_ATHENA
9578 EOF
9579 cat >> confdefs.h <<\EOF
9580 #define LWLIB_SCROLLBARS_ATHENA 1
9581 EOF
9582 }
9583
9584 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9585     Defining LWLIB_DIALOGS_ATHENA
9586 EOF
9587 cat >> confdefs.h <<\EOF
9588 #define LWLIB_DIALOGS_ATHENA 1
9589 EOF
9590 }
9591
9592
9593 if test "$athena_3d" = "yes"; then
9594   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9595     Defining LWLIB_SCROLLBARS_ATHENA3D
9596 EOF
9597 cat >> confdefs.h <<\EOF
9598 #define LWLIB_SCROLLBARS_ATHENA3D 1
9599 EOF
9600 }
9601
9602   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9603     Defining LWLIB_DIALOGS_ATHENA3D
9604 EOF
9605 cat >> confdefs.h <<\EOF
9606 #define LWLIB_DIALOGS_ATHENA3D 1
9607 EOF
9608 }
9609
9610 fi
9611
9612 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9613     Defining LWLIB_WIDGETS_ATHENA
9614 EOF
9615 cat >> confdefs.h <<\EOF
9616 #define LWLIB_WIDGETS_ATHENA 1
9617 EOF
9618 }
9619 ;; esac
9620 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9621         { test "$extra_verbose" = "yes" && cat << \EOF
9622     Defining LWLIB_TABS_LUCID
9623 EOF
9624 cat >> confdefs.h <<\EOF
9625 #define LWLIB_TABS_LUCID 1
9626 EOF
9627 }
9628
9629
9630 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9631     Defining HAVE_MENUBARS
9632 EOF
9633 cat >> confdefs.h <<\EOF
9634 #define HAVE_MENUBARS 1
9635 EOF
9636 }
9637
9638 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9639     Defining HAVE_SCROLLBARS
9640 EOF
9641 cat >> confdefs.h <<\EOF
9642 #define HAVE_SCROLLBARS 1
9643 EOF
9644 }
9645
9646 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9647     Defining HAVE_DIALOGS
9648 EOF
9649 cat >> confdefs.h <<\EOF
9650 #define HAVE_DIALOGS 1
9651 EOF
9652 }
9653
9654 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9655     Defining HAVE_TOOLBARS
9656 EOF
9657 cat >> confdefs.h <<\EOF
9658 #define HAVE_TOOLBARS 1
9659 EOF
9660 }
9661
9662 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9663     Defining HAVE_WIDGETS
9664 EOF
9665 cat >> confdefs.h <<\EOF
9666 #define HAVE_WIDGETS 1
9667 EOF
9668 }
9669
9670
9671 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9672     Defining LWLIB_MENUBARS_LUCID
9673 EOF
9674 cat >> confdefs.h <<\EOF
9675 #define LWLIB_MENUBARS_LUCID 1
9676 EOF
9677 }
9678
9679 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9680     Defining LWLIB_SCROLLBARS_LUCID
9681 EOF
9682 cat >> confdefs.h <<\EOF
9683 #define LWLIB_SCROLLBARS_LUCID 1
9684 EOF
9685 }
9686
9687
9688 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9689     Defining LWLIB_MENUBARS_MOTIF
9690 EOF
9691 cat >> confdefs.h <<\EOF
9692 #define LWLIB_MENUBARS_MOTIF 1
9693 EOF
9694 }
9695
9696 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9697     Defining LWLIB_SCROLLBARS_MOTIF
9698 EOF
9699 cat >> confdefs.h <<\EOF
9700 #define LWLIB_SCROLLBARS_MOTIF 1
9701 EOF
9702 }
9703
9704 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9705     Defining LWLIB_DIALOGS_MOTIF
9706 EOF
9707 cat >> confdefs.h <<\EOF
9708 #define LWLIB_DIALOGS_MOTIF 1
9709 EOF
9710 }
9711
9712 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9713     Defining LWLIB_WIDGETS_MOTIF
9714 EOF
9715 cat >> confdefs.h <<\EOF
9716 #define LWLIB_WIDGETS_MOTIF 1
9717 EOF
9718 }
9719
9720
9721 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9722    echo "    xemacs will be linked with \"menubar.o\""
9723  fi
9724 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9725    echo "    xemacs will be linked with \"scrollbar.o\""
9726  fi
9727 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9728    echo "    xemacs will be linked with \"dialog.o\""
9729  fi
9730 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9731    echo "    xemacs will be linked with \"toolbar.o\""
9732  fi
9733
9734 if test "$with_gtk" = "yes"; then
9735   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9736    echo "    xemacs will be linked with \"menubar-gtk.o\""
9737  fi
9738   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9739    echo "    xemacs will be linked with \"scrollbar-gtk.o\""
9740  fi
9741   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9742    echo "    xemacs will be linked with \"dialog-gtk.o\""
9743  fi
9744   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9745    echo "    xemacs will be linked with \"toolbar-gtk.o\""
9746  fi
9747   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-gtk.o" &&  if test "$extra_verbose" = "yes"; then
9748    echo "    xemacs will be linked with \"gui-gtk.o\""
9749  fi
9750 fi
9751
9752 if test "$with_x11" = "yes"; then
9753   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9754    echo "    xemacs will be linked with \"menubar-x.o\""
9755  fi
9756   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9757    echo "    xemacs will be linked with \"scrollbar-x.o\""
9758  fi
9759   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9760    echo "    xemacs will be linked with \"dialog-x.o\""
9761  fi
9762   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9763    echo "    xemacs will be linked with \"toolbar-x.o\""
9764  fi
9765   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9766    echo "    xemacs will be linked with \"gui-x.o\""
9767  fi
9768 fi
9769
9770
9771 test -z "$with_mule" && with_mule=no
9772 test -z "$with_file_coding" && with_file_coding=no
9773
9774
9775 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9776   { test "$extra_verbose" = "yes" && cat << \EOF
9777     Defining FILE_CODING
9778 EOF
9779 cat >> confdefs.h <<\EOF
9780 #define FILE_CODING 1
9781 EOF
9782 }
9783
9784   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9785    echo "    xemacs will be linked with \"file-coding.o\""
9786  fi
9787 fi
9788
9789 if test "$with_mule" = "yes" ; then
9790   echo "checking for Mule-related features" 1>&6
9791 echo "configure:9792: checking for Mule-related features" >&5
9792   { test "$extra_verbose" = "yes" && cat << \EOF
9793     Defining MULE
9794 EOF
9795 cat >> confdefs.h <<\EOF
9796 #define MULE 1
9797 EOF
9798 }
9799
9800   { test "$extra_verbose" = "yes" && cat << \EOF
9801     Defining FILE_CODING
9802 EOF
9803 cat >> confdefs.h <<\EOF
9804 #define FILE_CODING 1
9805 EOF
9806 }
9807
9808   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9809    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9810  fi
9811   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9812     { test "$extra_verbose" = "yes" && cat << \EOF
9813     Defining TEXT_CODING
9814 EOF
9815 cat >> confdefs.h <<\EOF
9816 #define TEXT_CODING 1
9817 EOF
9818 }
9819
9820     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9821    echo "    xemacs will be linked with \"text-coding.o\""
9822  fi
9823   else
9824     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9825    echo "    xemacs will be linked with \"file-coding.o\""
9826  fi
9827   fi
9828     for ac_hdr in libintl.h
9829 do
9830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9832 echo "configure:9833: checking for $ac_hdr" >&5
9833
9834 cat > conftest.$ac_ext <<EOF
9835 #line 9836 "configure"
9836 #include "confdefs.h"
9837 #include <$ac_hdr>
9838 EOF
9839 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9840 { (eval echo configure:9841: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9841 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9842 if test -z "$ac_err"; then
9843   rm -rf conftest*
9844   eval "ac_cv_header_$ac_safe=yes"
9845 else
9846   echo "$ac_err" >&5
9847   echo "configure: failed program was:" >&5
9848   cat conftest.$ac_ext >&5
9849   rm -rf conftest*
9850   eval "ac_cv_header_$ac_safe=no"
9851 fi
9852 rm -f conftest*
9853 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9854   echo "$ac_t""yes" 1>&6
9855     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9856   { test "$extra_verbose" = "yes" && cat << EOF
9857     Defining $ac_tr_hdr
9858 EOF
9859 cat >> confdefs.h <<EOF
9860 #define $ac_tr_hdr 1
9861 EOF
9862 }
9863  
9864 else
9865   echo "$ac_t""no" 1>&6
9866 fi
9867 done
9868
9869   
9870 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9871 echo "configure:9872: checking for strerror in -lintl" >&5
9872 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9873
9874 xe_check_libs=" -lintl "
9875 cat > conftest.$ac_ext <<EOF
9876 #line 9877 "configure"
9877 #include "confdefs.h"
9878 /* Override any gcc2 internal prototype to avoid an error.  */
9879 /* We use char because int might match the return type of a gcc2
9880     builtin and then its argument prototype would still apply.  */
9881 char strerror();
9882
9883 int main() {
9884 strerror()
9885 ; return 0; }
9886 EOF
9887 if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9888   rm -rf conftest*
9889   eval "ac_cv_lib_$ac_lib_var=yes"
9890 else
9891   echo "configure: failed program was:" >&5
9892   cat conftest.$ac_ext >&5
9893   rm -rf conftest*
9894   eval "ac_cv_lib_$ac_lib_var=no"
9895 fi
9896 rm -f conftest*
9897 xe_check_libs=""
9898
9899 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9900   echo "$ac_t""yes" 1>&6
9901     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9902     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9903   { test "$extra_verbose" = "yes" && cat << EOF
9904     Defining $ac_tr_lib
9905 EOF
9906 cat >> confdefs.h <<EOF
9907 #define $ac_tr_lib 1
9908 EOF
9909 }
9910
9911   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9912
9913 else
9914   echo "$ac_t""no" 1>&6
9915 fi
9916
9917
9918
9919   if test "$with_utf_2000" = "yes" ; then
9920     { test "$extra_verbose" = "yes" && cat << \EOF
9921     Defining CHAR_IS_UCS4
9922 EOF
9923 cat >> confdefs.h <<\EOF
9924 #define CHAR_IS_UCS4 1
9925 EOF
9926 }
9927
9928     { test "$extra_verbose" = "yes" && cat << \EOF
9929     Defining UTF2000
9930 EOF
9931 cat >> confdefs.h <<\EOF
9932 #define UTF2000 1
9933 EOF
9934 }
9935
9936   fi
9937
9938   echo "checking for Mule input methods" 1>&6
9939 echo "configure:9940: checking for Mule input methods" >&5
9940         case "$with_xim" in "" | "yes" )
9941     echo "checking for XIM" 1>&6
9942 echo "configure:9943: checking for XIM" >&5
9943     
9944 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9945 echo "configure:9946: checking for XOpenIM in -lX11" >&5
9946 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9947
9948 xe_check_libs=" -lX11 "
9949 cat > conftest.$ac_ext <<EOF
9950 #line 9951 "configure"
9951 #include "confdefs.h"
9952 /* Override any gcc2 internal prototype to avoid an error.  */
9953 /* We use char because int might match the return type of a gcc2
9954     builtin and then its argument prototype would still apply.  */
9955 char XOpenIM();
9956
9957 int main() {
9958 XOpenIM()
9959 ; return 0; }
9960 EOF
9961 if { (eval echo configure:9962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9962   rm -rf conftest*
9963   eval "ac_cv_lib_$ac_lib_var=yes"
9964 else
9965   echo "configure: failed program was:" >&5
9966   cat conftest.$ac_ext >&5
9967   rm -rf conftest*
9968   eval "ac_cv_lib_$ac_lib_var=no"
9969 fi
9970 rm -f conftest*
9971 xe_check_libs=""
9972
9973 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9974   echo "$ac_t""yes" 1>&6
9975   with_xim=xlib
9976 else
9977   echo "$ac_t""no" 1>&6
9978 with_xim=no
9979 fi
9980
9981
9982         if test "$have_motif $have_lesstif" = "yes no"; then
9983       
9984 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9985 echo "configure:9986: checking for XmImMbLookupString in -lXm" >&5
9986 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9987
9988 xe_check_libs=" -lXm "
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char XmImMbLookupString();
9996
9997 int main() {
9998 XmImMbLookupString()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=yes"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   eval "ac_cv_lib_$ac_lib_var=no"
10009 fi
10010 rm -f conftest*
10011 xe_check_libs=""
10012
10013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10014   echo "$ac_t""yes" 1>&6
10015   with_xim=motif
10016 else
10017   echo "$ac_t""no" 1>&6
10018 fi
10019
10020
10021     fi ;;
10022   esac
10023   if test "$with_xim" != "no"; then
10024     { test "$extra_verbose" = "yes" && cat << \EOF
10025     Defining HAVE_XIM
10026 EOF
10027 cat >> confdefs.h <<\EOF
10028 #define HAVE_XIM 1
10029 EOF
10030 }
10031
10032     if test "$with_xim" = "xlib"; then
10033       { test "$extra_verbose" = "yes" && cat << \EOF
10034     Defining XIM_XLIB
10035 EOF
10036 cat >> confdefs.h <<\EOF
10037 #define XIM_XLIB 1
10038 EOF
10039 }
10040
10041       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10042    echo "    xemacs will be linked with \"input-method-xlib.o\""
10043  fi
10044     fi
10045     if test "$with_xim" = "motif"; then
10046       { test "$extra_verbose" = "yes" && cat << \EOF
10047     Defining XIM_MOTIF
10048 EOF
10049 cat >> confdefs.h <<\EOF
10050 #define XIM_MOTIF 1
10051 EOF
10052 }
10053
10054       need_motif=yes
10055       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
10056    echo "    xemacs will be linked with \"input-method-motif.o\""
10057  fi
10058     fi
10059     if test "$with_xim" = "motif"; then
10060       with_xfs=no
10061     fi
10062   fi
10063
10064     if test "$with_xfs" = "yes" ; then
10065     echo "checking for XFontSet" 1>&6
10066 echo "configure:10067: checking for XFontSet" >&5
10067     
10068 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
10069 echo "configure:10070: checking for XmbDrawString in -lX11" >&5
10070 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
10071
10072 xe_check_libs=" -lX11 "
10073 cat > conftest.$ac_ext <<EOF
10074 #line 10075 "configure"
10075 #include "confdefs.h"
10076 /* Override any gcc2 internal prototype to avoid an error.  */
10077 /* We use char because int might match the return type of a gcc2
10078     builtin and then its argument prototype would still apply.  */
10079 char XmbDrawString();
10080
10081 int main() {
10082 XmbDrawString()
10083 ; return 0; }
10084 EOF
10085 if { (eval echo configure:10086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10086   rm -rf conftest*
10087   eval "ac_cv_lib_$ac_lib_var=yes"
10088 else
10089   echo "configure: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   rm -rf conftest*
10092   eval "ac_cv_lib_$ac_lib_var=no"
10093 fi
10094 rm -f conftest*
10095 xe_check_libs=""
10096
10097 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10098   echo "$ac_t""yes" 1>&6
10099   :
10100 else
10101   echo "$ac_t""no" 1>&6
10102 with_xfs=no
10103 fi
10104
10105
10106     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
10107       { test "$extra_verbose" = "yes" && cat << \EOF
10108     Defining USE_XFONTSET
10109 EOF
10110 cat >> confdefs.h <<\EOF
10111 #define USE_XFONTSET 1
10112 EOF
10113 }
10114
10115       if test "$with_xim" = "no" ; then
10116         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
10117    echo "    xemacs will be linked with \"input-method-xlib.o\""
10118  fi
10119       fi
10120     fi
10121   fi 
10122     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
10123   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
10124 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
10125 echo "configure:10126: checking for wnn/jllib.h" >&5
10126
10127 cat > conftest.$ac_ext <<EOF
10128 #line 10129 "configure"
10129 #include "confdefs.h"
10130 #include <wnn/jllib.h>
10131 EOF
10132 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10133 { (eval echo configure:10134: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10134 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10135 if test -z "$ac_err"; then
10136   rm -rf conftest*
10137   eval "ac_cv_header_$ac_safe=yes"
10138 else
10139   echo "$ac_err" >&5
10140   echo "configure: failed program was:" >&5
10141   cat conftest.$ac_ext >&5
10142   rm -rf conftest*
10143   eval "ac_cv_header_$ac_safe=no"
10144 fi
10145 rm -f conftest*
10146 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10147   echo "$ac_t""yes" 1>&6
10148   :
10149 else
10150   echo "$ac_t""no" 1>&6
10151 with_wnn=no
10152 fi
10153  }
10154     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
10155 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
10156 echo "configure:10157: checking for wnn/commonhd.h" >&5
10157
10158 cat > conftest.$ac_ext <<EOF
10159 #line 10160 "configure"
10160 #include "confdefs.h"
10161 #include <wnn/commonhd.h>
10162 EOF
10163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10164 { (eval echo configure:10165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10166 if test -z "$ac_err"; then
10167   rm -rf conftest*
10168   eval "ac_cv_header_$ac_safe=yes"
10169 else
10170   echo "$ac_err" >&5
10171   echo "configure: failed program was:" >&5
10172   cat conftest.$ac_ext >&5
10173   rm -rf conftest*
10174   eval "ac_cv_header_$ac_safe=no"
10175 fi
10176 rm -f conftest*
10177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10178   echo "$ac_t""yes" 1>&6
10179   :
10180 else
10181   echo "$ac_t""no" 1>&6
10182 with_wnn=no
10183 fi
10184  }
10185     if test "$with_wnn" != "no"; then
10186     for ac_func in crypt
10187 do
10188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10189 echo "configure:10190: checking for $ac_func" >&5
10190
10191 cat > conftest.$ac_ext <<EOF
10192 #line 10193 "configure"
10193 #include "confdefs.h"
10194 /* System header to define __stub macros and hopefully few prototypes,
10195     which can conflict with char $ac_func(); below.  */
10196 #include <assert.h>
10197 /* Override any gcc2 internal prototype to avoid an error.  */
10198 /* We use char because int might match the return type of a gcc2
10199     builtin and then its argument prototype would still apply.  */
10200 char $ac_func();
10201
10202 int main() {
10203
10204 /* The GNU C library defines this for functions which it implements
10205     to always fail with ENOSYS.  Some functions are actually named
10206     something starting with __ and the normal name is an alias.  */
10207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10208 choke me
10209 #else
10210 $ac_func();
10211 #endif
10212
10213 ; return 0; }
10214 EOF
10215 if { (eval echo configure:10216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10216   rm -rf conftest*
10217   eval "ac_cv_func_$ac_func=yes"
10218 else
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_func_$ac_func=no"
10223 fi
10224 rm -f conftest*
10225
10226 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10227   echo "$ac_t""yes" 1>&6
10228     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10229   { test "$extra_verbose" = "yes" && cat << EOF
10230     Defining $ac_tr_func
10231 EOF
10232 cat >> confdefs.h <<EOF
10233 #define $ac_tr_func 1
10234 EOF
10235 }
10236  
10237 else
10238   echo "$ac_t""no" 1>&6
10239 fi
10240 done
10241
10242     test "$ac_cv_func_crypt" != "yes" && { 
10243 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
10244 echo "configure:10245: checking for crypt in -lcrypt" >&5
10245 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
10246
10247 xe_check_libs=" -lcrypt "
10248 cat > conftest.$ac_ext <<EOF
10249 #line 10250 "configure"
10250 #include "confdefs.h"
10251 /* Override any gcc2 internal prototype to avoid an error.  */
10252 /* We use char because int might match the return type of a gcc2
10253     builtin and then its argument prototype would still apply.  */
10254 char crypt();
10255
10256 int main() {
10257 crypt()
10258 ; return 0; }
10259 EOF
10260 if { (eval echo configure:10261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10261   rm -rf conftest*
10262   eval "ac_cv_lib_$ac_lib_var=yes"
10263 else
10264   echo "configure: failed program was:" >&5
10265   cat conftest.$ac_ext >&5
10266   rm -rf conftest*
10267   eval "ac_cv_lib_$ac_lib_var=no"
10268 fi
10269 rm -f conftest*
10270 xe_check_libs=""
10271
10272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10273   echo "$ac_t""yes" 1>&6
10274     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10275     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10276   { test "$extra_verbose" = "yes" && cat << EOF
10277     Defining $ac_tr_lib
10278 EOF
10279 cat >> confdefs.h <<EOF
10280 #define $ac_tr_lib 1
10281 EOF
10282 }
10283
10284   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
10285
10286 else
10287   echo "$ac_t""no" 1>&6
10288 fi
10289
10290  }
10291   fi
10292     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
10293     
10294 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
10295 echo "configure:10296: checking for jl_dic_list_e in -lwnn" >&5
10296 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10297
10298 xe_check_libs=" -lwnn "
10299 cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 /* Override any gcc2 internal prototype to avoid an error.  */
10303 /* We use char because int might match the return type of a gcc2
10304     builtin and then its argument prototype would still apply.  */
10305 char jl_dic_list_e();
10306
10307 int main() {
10308 jl_dic_list_e()
10309 ; return 0; }
10310 EOF
10311 if { (eval echo configure:10312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10312   rm -rf conftest*
10313   eval "ac_cv_lib_$ac_lib_var=yes"
10314 else
10315   echo "configure: failed program was:" >&5
10316   cat conftest.$ac_ext >&5
10317   rm -rf conftest*
10318   eval "ac_cv_lib_$ac_lib_var=no"
10319 fi
10320 rm -f conftest*
10321 xe_check_libs=""
10322
10323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10324   echo "$ac_t""yes" 1>&6
10325   libwnn=wnn
10326 else
10327   echo "$ac_t""no" 1>&6
10328 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
10329 echo "configure:10330: checking for jl_dic_list_e in -lwnn4" >&5
10330 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10331
10332 xe_check_libs=" -lwnn4 "
10333 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 /* Override any gcc2 internal prototype to avoid an error.  */
10337 /* We use char because int might match the return type of a gcc2
10338     builtin and then its argument prototype would still apply.  */
10339 char jl_dic_list_e();
10340
10341 int main() {
10342 jl_dic_list_e()
10343 ; return 0; }
10344 EOF
10345 if { (eval echo configure:10346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10346   rm -rf conftest*
10347   eval "ac_cv_lib_$ac_lib_var=yes"
10348 else
10349   echo "configure: failed program was:" >&5
10350   cat conftest.$ac_ext >&5
10351   rm -rf conftest*
10352   eval "ac_cv_lib_$ac_lib_var=no"
10353 fi
10354 rm -f conftest*
10355 xe_check_libs=""
10356
10357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10358   echo "$ac_t""yes" 1>&6
10359   libwnn=wnn4
10360 else
10361   echo "$ac_t""no" 1>&6
10362 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
10363 echo "configure:10364: checking for jl_dic_list_e in -lwnn6" >&5
10364 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
10365
10366 xe_check_libs=" -lwnn6 "
10367 cat > conftest.$ac_ext <<EOF
10368 #line 10369 "configure"
10369 #include "confdefs.h"
10370 /* Override any gcc2 internal prototype to avoid an error.  */
10371 /* We use char because int might match the return type of a gcc2
10372     builtin and then its argument prototype would still apply.  */
10373 char jl_dic_list_e();
10374
10375 int main() {
10376 jl_dic_list_e()
10377 ; return 0; }
10378 EOF
10379 if { (eval echo configure:10380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10380   rm -rf conftest*
10381   eval "ac_cv_lib_$ac_lib_var=yes"
10382 else
10383   echo "configure: failed program was:" >&5
10384   cat conftest.$ac_ext >&5
10385   rm -rf conftest*
10386   eval "ac_cv_lib_$ac_lib_var=no"
10387 fi
10388 rm -f conftest*
10389 xe_check_libs=""
10390
10391 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10392   echo "$ac_t""yes" 1>&6
10393   libwnn=wnn6
10394 else
10395   echo "$ac_t""no" 1>&6
10396 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
10397 echo "configure:10398: checking for dic_list_e in -lwnn6_fromsrc" >&5
10398 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
10399
10400 xe_check_libs=" -lwnn6_fromsrc "
10401 cat > conftest.$ac_ext <<EOF
10402 #line 10403 "configure"
10403 #include "confdefs.h"
10404 /* Override any gcc2 internal prototype to avoid an error.  */
10405 /* We use char because int might match the return type of a gcc2
10406     builtin and then its argument prototype would still apply.  */
10407 char dic_list_e();
10408
10409 int main() {
10410 dic_list_e()
10411 ; return 0; }
10412 EOF
10413 if { (eval echo configure:10414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10414   rm -rf conftest*
10415   eval "ac_cv_lib_$ac_lib_var=yes"
10416 else
10417   echo "configure: failed program was:" >&5
10418   cat conftest.$ac_ext >&5
10419   rm -rf conftest*
10420   eval "ac_cv_lib_$ac_lib_var=no"
10421 fi
10422 rm -f conftest*
10423 xe_check_libs=""
10424
10425 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10426   echo "$ac_t""yes" 1>&6
10427   libwnn=wnn6_fromsrc
10428 else
10429   echo "$ac_t""no" 1>&6
10430 with_wnn=no
10431 fi
10432
10433
10434 fi
10435
10436
10437 fi
10438
10439
10440 fi
10441
10442
10443   fi
10444   test -z "$with_wnn" && with_wnn=yes
10445   if test "$with_wnn" = "yes"; then
10446     { test "$extra_verbose" = "yes" && cat << \EOF
10447     Defining HAVE_WNN
10448 EOF
10449 cat >> confdefs.h <<\EOF
10450 #define HAVE_WNN 1
10451 EOF
10452 }
10453
10454     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
10455     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
10456    echo "    xemacs will be linked with \"mule-wnnfns.o\""
10457  fi
10458     if test "$with_wnn6" != "no"; then
10459       
10460 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
10461 echo "configure:10462: checking for jl_fi_dic_list in -l$libwnn" >&5
10462 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
10463
10464 xe_check_libs=" -l$libwnn "
10465 cat > conftest.$ac_ext <<EOF
10466 #line 10467 "configure"
10467 #include "confdefs.h"
10468 /* Override any gcc2 internal prototype to avoid an error.  */
10469 /* We use char because int might match the return type of a gcc2
10470     builtin and then its argument prototype would still apply.  */
10471 char jl_fi_dic_list();
10472
10473 int main() {
10474 jl_fi_dic_list()
10475 ; return 0; }
10476 EOF
10477 if { (eval echo configure:10478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10478   rm -rf conftest*
10479   eval "ac_cv_lib_$ac_lib_var=yes"
10480 else
10481   echo "configure: failed program was:" >&5
10482   cat conftest.$ac_ext >&5
10483   rm -rf conftest*
10484   eval "ac_cv_lib_$ac_lib_var=no"
10485 fi
10486 rm -f conftest*
10487 xe_check_libs=""
10488
10489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10490   echo "$ac_t""yes" 1>&6
10491   with_wnn6=yes
10492 else
10493   echo "$ac_t""no" 1>&6
10494 fi
10495
10496
10497       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10498     Defining WNN6
10499 EOF
10500 cat >> confdefs.h <<\EOF
10501 #define WNN6 1
10502 EOF
10503 }
10504
10505     fi
10506   fi
10507
10508     canna_includes_found=no
10509   if test "$with_canna" != "no"; then
10510     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10511 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10512 echo "configure:10513: checking for canna/jrkanji.h" >&5
10513
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <canna/jrkanji.h>
10518 EOF
10519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10520 { (eval echo configure:10521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10522 if test -z "$ac_err"; then
10523   rm -rf conftest*
10524   eval "ac_cv_header_$ac_safe=yes"
10525 else
10526   echo "$ac_err" >&5
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=no"
10531 fi
10532 rm -f conftest*
10533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535   canna_includes_found=yes
10536 else
10537   echo "$ac_t""no" 1>&6
10538 fi
10539
10540   fi
10541   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10542       -d "/usr/local/canna/include"; then
10543     save_c_switch_site="$c_switch_site"
10544     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10545     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10546 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10547 echo "configure:10548: checking for canna/jrkanji.h" >&5
10548
10549 cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552 #include <canna/jrkanji.h>
10553 EOF
10554 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10555 { (eval echo configure:10556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10556 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10557 if test -z "$ac_err"; then
10558   rm -rf conftest*
10559   eval "ac_cv_header_$ac_safe=yes"
10560 else
10561   echo "$ac_err" >&5
10562   echo "configure: failed program was:" >&5
10563   cat conftest.$ac_ext >&5
10564   rm -rf conftest*
10565   eval "ac_cv_header_$ac_safe=no"
10566 fi
10567 rm -f conftest*
10568 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10569   echo "$ac_t""yes" 1>&6
10570   canna_includes_found=yes
10571 else
10572   echo "$ac_t""no" 1>&6
10573 fi
10574
10575     if test "$canna_includes_found" != "yes"; then
10576       c_switch_site="$save_c_switch_site"
10577       with_canna="no"
10578     fi
10579   fi
10580
10581   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10582 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10583 echo "configure:10584: checking for canna/RK.h" >&5
10584
10585 cat > conftest.$ac_ext <<EOF
10586 #line 10587 "configure"
10587 #include "confdefs.h"
10588 #include <canna/RK.h>
10589 EOF
10590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10591 { (eval echo configure:10592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10593 if test -z "$ac_err"; then
10594   rm -rf conftest*
10595   eval "ac_cv_header_$ac_safe=yes"
10596 else
10597   echo "$ac_err" >&5
10598   echo "configure: failed program was:" >&5
10599   cat conftest.$ac_ext >&5
10600   rm -rf conftest*
10601   eval "ac_cv_header_$ac_safe=no"
10602 fi
10603 rm -f conftest*
10604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10605   echo "$ac_t""yes" 1>&6
10606   :
10607 else
10608   echo "$ac_t""no" 1>&6
10609 with_canna=no
10610 fi
10611  }
10612   test -z "$with_canna" && { 
10613 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10614 echo "configure:10615: checking for RkBgnBun in -lRKC" >&5
10615 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10616
10617 xe_check_libs=" -lRKC "
10618 cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 /* Override any gcc2 internal prototype to avoid an error.  */
10622 /* We use char because int might match the return type of a gcc2
10623     builtin and then its argument prototype would still apply.  */
10624 char RkBgnBun();
10625
10626 int main() {
10627 RkBgnBun()
10628 ; return 0; }
10629 EOF
10630 if { (eval echo configure:10631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10631   rm -rf conftest*
10632   eval "ac_cv_lib_$ac_lib_var=yes"
10633 else
10634   echo "configure: failed program was:" >&5
10635   cat conftest.$ac_ext >&5
10636   rm -rf conftest*
10637   eval "ac_cv_lib_$ac_lib_var=no"
10638 fi
10639 rm -f conftest*
10640 xe_check_libs=""
10641
10642 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10643   echo "$ac_t""yes" 1>&6
10644   :
10645 else
10646   echo "$ac_t""no" 1>&6
10647 with_canna=no
10648 fi
10649
10650  }
10651   test -z "$with_canna" && { 
10652 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10653 echo "configure:10654: checking for jrKanjiControl in -lcanna" >&5
10654 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10655
10656 xe_check_libs=" -lcanna "
10657 cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 /* Override any gcc2 internal prototype to avoid an error.  */
10661 /* We use char because int might match the return type of a gcc2
10662     builtin and then its argument prototype would still apply.  */
10663 char jrKanjiControl();
10664
10665 int main() {
10666 jrKanjiControl()
10667 ; return 0; }
10668 EOF
10669 if { (eval echo configure:10670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10670   rm -rf conftest*
10671   eval "ac_cv_lib_$ac_lib_var=yes"
10672 else
10673   echo "configure: failed program was:" >&5
10674   cat conftest.$ac_ext >&5
10675   rm -rf conftest*
10676   eval "ac_cv_lib_$ac_lib_var=no"
10677 fi
10678 rm -f conftest*
10679 xe_check_libs=""
10680
10681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10682   echo "$ac_t""yes" 1>&6
10683   :
10684 else
10685   echo "$ac_t""no" 1>&6
10686 with_canna=no
10687 fi
10688
10689  }
10690   test -z "$with_canna" && with_canna=yes
10691   if test "$with_canna" = "yes"; then
10692     { test "$extra_verbose" = "yes" && cat << \EOF
10693     Defining HAVE_CANNA
10694 EOF
10695 cat >> confdefs.h <<\EOF
10696 #define HAVE_CANNA 1
10697 EOF
10698 }
10699
10700     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10701     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10702    echo "    xemacs will be linked with \"mule-canna.o\""
10703  fi
10704   fi
10705
10706 else   for feature in xim canna wnn; do
10707     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10708       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10709     fi
10710     eval "with_${feature}=no"
10711   done
10712 fi 
10713
10714 if test "$need_motif" = "yes" ; then
10715   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10716     
10717 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10718 echo "configure:10719: checking for layout_object_getvalue in -li18n" >&5
10719 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10720
10721 xe_check_libs=" -li18n "
10722 cat > conftest.$ac_ext <<EOF
10723 #line 10724 "configure"
10724 #include "confdefs.h"
10725 /* Override any gcc2 internal prototype to avoid an error.  */
10726 /* We use char because int might match the return type of a gcc2
10727     builtin and then its argument prototype would still apply.  */
10728 char layout_object_getvalue();
10729
10730 int main() {
10731 layout_object_getvalue()
10732 ; return 0; }
10733 EOF
10734 if { (eval echo configure:10735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10735   rm -rf conftest*
10736   eval "ac_cv_lib_$ac_lib_var=yes"
10737 else
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_lib_$ac_lib_var=no"
10742 fi
10743 rm -f conftest*
10744 xe_check_libs=""
10745
10746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10747   echo "$ac_t""yes" 1>&6
10748   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10749 else
10750   echo "$ac_t""no" 1>&6
10751 fi
10752
10753
10754   
10755 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10756     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10757   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10758   
10759         runpath="" runpath_dirs=""
10760   if test -n "$LD_RUN_PATH"; then
10761     runpath="$LD_RUN_PATH"
10762   elif test "$GCC" = "yes"; then
10763         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10764     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10765     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10766     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10767       case "$arg" in P,* | -L* | -R* )
10768         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10769           {
10770 xe_runpath_dir="$dir"
10771   test "$xe_runpath_dir" != "/lib"     -a \
10772         "$xe_runpath_dir" != "/usr/lib" -a \
10773         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10774   eval "$xe_add_unique_runpath_dir"
10775 }
10776         done ;;
10777       esac
10778     done
10779     ld_switch_run="$ld_switch_run_save"
10780     rm -f conftest*
10781   else
10782         for arg in $ld_switch_site $ld_switch_x_site; do
10783       case "$arg" in -L*) {
10784 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10785   test "$xe_runpath_dir" != "/lib"     -a \
10786         "$xe_runpath_dir" != "/usr/lib" -a \
10787         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10788   eval "$xe_add_unique_runpath_dir"
10789 };; esac
10790     done
10791         if test "$opsys $need_motif" = "sol2 yes"; then
10792       xe_runpath_dir="/opt/SUNWdt/lib";
10793       eval "$xe_add_unique_runpath_dir";
10794     fi
10795   fi 
10796   if test -n "$runpath"; then
10797     ld_switch_run="${dash_r}${runpath}"
10798     
10799 if test "$GCC" = "yes"; then
10800   set x $ld_switch_run; shift; ld_switch_run=""
10801   while test -n "$1"; do
10802     case $1 in
10803       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10804       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10805       -Xlinker* ) ;;
10806       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10807     esac
10808     shift
10809   done
10810 fi
10811     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10812   fi
10813 fi
10814
10815 fi
10816
10817 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
10818 do
10819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10820 echo "configure:10821: checking for $ac_func" >&5
10821
10822 cat > conftest.$ac_ext <<EOF
10823 #line 10824 "configure"
10824 #include "confdefs.h"
10825 /* System header to define __stub macros and hopefully few prototypes,
10826     which can conflict with char $ac_func(); below.  */
10827 #include <assert.h>
10828 /* Override any gcc2 internal prototype to avoid an error.  */
10829 /* We use char because int might match the return type of a gcc2
10830     builtin and then its argument prototype would still apply.  */
10831 char $ac_func();
10832
10833 int main() {
10834
10835 /* The GNU C library defines this for functions which it implements
10836     to always fail with ENOSYS.  Some functions are actually named
10837     something starting with __ and the normal name is an alias.  */
10838 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10839 choke me
10840 #else
10841 $ac_func();
10842 #endif
10843
10844 ; return 0; }
10845 EOF
10846 if { (eval echo configure:10847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10847   rm -rf conftest*
10848   eval "ac_cv_func_$ac_func=yes"
10849 else
10850   echo "configure: failed program was:" >&5
10851   cat conftest.$ac_ext >&5
10852   rm -rf conftest*
10853   eval "ac_cv_func_$ac_func=no"
10854 fi
10855 rm -f conftest*
10856
10857 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10860   { test "$extra_verbose" = "yes" && cat << EOF
10861     Defining $ac_tr_func
10862 EOF
10863 cat >> confdefs.h <<EOF
10864 #define $ac_tr_func 1
10865 EOF
10866 }
10867  
10868 else
10869   echo "$ac_t""no" 1>&6
10870 fi
10871 done
10872
10873
10874
10875 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10876 do
10877 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10878 echo "configure:10879: checking for $ac_func" >&5
10879
10880 cat > conftest.$ac_ext <<EOF
10881 #line 10882 "configure"
10882 #include "confdefs.h"
10883 /* System header to define __stub macros and hopefully few prototypes,
10884     which can conflict with char $ac_func(); below.  */
10885 #include <assert.h>
10886 /* Override any gcc2 internal prototype to avoid an error.  */
10887 /* We use char because int might match the return type of a gcc2
10888     builtin and then its argument prototype would still apply.  */
10889 char $ac_func();
10890
10891 int main() {
10892
10893 /* The GNU C library defines this for functions which it implements
10894     to always fail with ENOSYS.  Some functions are actually named
10895     something starting with __ and the normal name is an alias.  */
10896 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10897 choke me
10898 #else
10899 $ac_func();
10900 #endif
10901
10902 ; return 0; }
10903 EOF
10904 if { (eval echo configure:10905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10905   rm -rf conftest*
10906   eval "ac_cv_func_$ac_func=yes"
10907 else
10908   echo "configure: failed program was:" >&5
10909   cat conftest.$ac_ext >&5
10910   rm -rf conftest*
10911   eval "ac_cv_func_$ac_func=no"
10912 fi
10913 rm -f conftest*
10914
10915 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10916   echo "$ac_t""yes" 1>&6
10917     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10918   { test "$extra_verbose" = "yes" && cat << EOF
10919     Defining $ac_tr_func
10920 EOF
10921 cat >> confdefs.h <<EOF
10922 #define $ac_tr_func 1
10923 EOF
10924 }
10925  
10926 else
10927   echo "$ac_t""no" 1>&6
10928 fi
10929 done
10930
10931
10932 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10933 echo "configure:10934: checking for openpty" >&5
10934
10935 cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938 /* System header to define __stub macros and hopefully few prototypes,
10939     which can conflict with char openpty(); below.  */
10940 #include <assert.h>
10941 /* Override any gcc2 internal prototype to avoid an error.  */
10942 /* We use char because int might match the return type of a gcc2
10943     builtin and then its argument prototype would still apply.  */
10944 char openpty();
10945
10946 int main() {
10947
10948 /* The GNU C library defines this for functions which it implements
10949     to always fail with ENOSYS.  Some functions are actually named
10950     something starting with __ and the normal name is an alias.  */
10951 #if defined (__stub_openpty) || defined (__stub___openpty)
10952 choke me
10953 #else
10954 openpty();
10955 #endif
10956
10957 ; return 0; }
10958 EOF
10959 if { (eval echo configure:10960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10960   rm -rf conftest*
10961   eval "ac_cv_func_openpty=yes"
10962 else
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -rf conftest*
10966   eval "ac_cv_func_openpty=no"
10967 fi
10968 rm -f conftest*
10969
10970 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10971   echo "$ac_t""yes" 1>&6
10972   have_openpty=yes
10973 else
10974   echo "$ac_t""no" 1>&6
10975
10976   
10977 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10978 echo "configure:10979: checking for openpty in -lutil" >&5
10979 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10980
10981 xe_check_libs=" -lutil "
10982 cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985 /* Override any gcc2 internal prototype to avoid an error.  */
10986 /* We use char because int might match the return type of a gcc2
10987     builtin and then its argument prototype would still apply.  */
10988 char openpty();
10989
10990 int main() {
10991 openpty()
10992 ; return 0; }
10993 EOF
10994 if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10995   rm -rf conftest*
10996   eval "ac_cv_lib_$ac_lib_var=yes"
10997 else
10998   echo "configure: failed program was:" >&5
10999   cat conftest.$ac_ext >&5
11000   rm -rf conftest*
11001   eval "ac_cv_lib_$ac_lib_var=no"
11002 fi
11003 rm -f conftest*
11004 xe_check_libs=""
11005
11006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11007   echo "$ac_t""yes" 1>&6
11008   have_openpty=yes need_libutil=yes
11009 else
11010   echo "$ac_t""no" 1>&6
11011 fi
11012
11013
11014 fi
11015
11016 if test "$have_openpty" = "yes"; then
11017   { test "$extra_verbose" = "yes" && cat << \EOF
11018     Defining HAVE_OPENPTY
11019 EOF
11020 cat >> confdefs.h <<\EOF
11021 #define HAVE_OPENPTY 1
11022 EOF
11023 }
11024
11025   for ac_hdr in pty.h libutil.h util.h
11026 do
11027 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11028 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11029 echo "configure:11030: checking for $ac_hdr" >&5
11030
11031 cat > conftest.$ac_ext <<EOF
11032 #line 11033 "configure"
11033 #include "confdefs.h"
11034 #include <$ac_hdr>
11035 EOF
11036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11037 { (eval echo configure:11038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11039 if test -z "$ac_err"; then
11040   rm -rf conftest*
11041   eval "ac_cv_header_$ac_safe=yes"
11042 else
11043   echo "$ac_err" >&5
11044   echo "configure: failed program was:" >&5
11045   cat conftest.$ac_ext >&5
11046   rm -rf conftest*
11047   eval "ac_cv_header_$ac_safe=no"
11048 fi
11049 rm -f conftest*
11050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11051   echo "$ac_t""yes" 1>&6
11052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11053   { test "$extra_verbose" = "yes" && cat << EOF
11054     Defining $ac_tr_hdr
11055 EOF
11056 cat >> confdefs.h <<EOF
11057 #define $ac_tr_hdr 1
11058 EOF
11059 }
11060  break
11061 else
11062   echo "$ac_t""no" 1>&6
11063 fi
11064 done
11065
11066   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
11067 fi
11068
11069 for ac_hdr in stropts.h
11070 do
11071 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11072 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11073 echo "configure:11074: checking for $ac_hdr" >&5
11074
11075 cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 #include <$ac_hdr>
11079 EOF
11080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11081 { (eval echo configure:11082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11083 if test -z "$ac_err"; then
11084   rm -rf conftest*
11085   eval "ac_cv_header_$ac_safe=yes"
11086 else
11087   echo "$ac_err" >&5
11088   echo "configure: failed program was:" >&5
11089   cat conftest.$ac_ext >&5
11090   rm -rf conftest*
11091   eval "ac_cv_header_$ac_safe=no"
11092 fi
11093 rm -f conftest*
11094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11097   { test "$extra_verbose" = "yes" && cat << EOF
11098     Defining $ac_tr_hdr
11099 EOF
11100 cat >> confdefs.h <<EOF
11101 #define $ac_tr_hdr 1
11102 EOF
11103 }
11104  
11105 else
11106   echo "$ac_t""no" 1>&6
11107 fi
11108 done
11109
11110 if test "$ac_cv_header_stropts_h" = "yes"; then
11111   for ac_func in isastream
11112 do
11113 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11114 echo "configure:11115: checking for $ac_func" >&5
11115
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 /* System header to define __stub macros and hopefully few prototypes,
11120     which can conflict with char $ac_func(); below.  */
11121 #include <assert.h>
11122 /* Override any gcc2 internal prototype to avoid an error.  */
11123 /* We use char because int might match the return type of a gcc2
11124     builtin and then its argument prototype would still apply.  */
11125 char $ac_func();
11126
11127 int main() {
11128
11129 /* The GNU C library defines this for functions which it implements
11130     to always fail with ENOSYS.  Some functions are actually named
11131     something starting with __ and the normal name is an alias.  */
11132 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11133 choke me
11134 #else
11135 $ac_func();
11136 #endif
11137
11138 ; return 0; }
11139 EOF
11140 if { (eval echo configure:11141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11141   rm -rf conftest*
11142   eval "ac_cv_func_$ac_func=yes"
11143 else
11144   echo "configure: failed program was:" >&5
11145   cat conftest.$ac_ext >&5
11146   rm -rf conftest*
11147   eval "ac_cv_func_$ac_func=no"
11148 fi
11149 rm -f conftest*
11150
11151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11152   echo "$ac_t""yes" 1>&6
11153     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11154   { test "$extra_verbose" = "yes" && cat << EOF
11155     Defining $ac_tr_func
11156 EOF
11157 cat >> confdefs.h <<EOF
11158 #define $ac_tr_func 1
11159 EOF
11160 }
11161  
11162 else
11163   echo "$ac_t""no" 1>&6
11164 fi
11165 done
11166
11167   for ac_hdr in strtio.h
11168 do
11169 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11170 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11171 echo "configure:11172: checking for $ac_hdr" >&5
11172
11173 cat > conftest.$ac_ext <<EOF
11174 #line 11175 "configure"
11175 #include "confdefs.h"
11176 #include <$ac_hdr>
11177 EOF
11178 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11179 { (eval echo configure:11180: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11180 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11181 if test -z "$ac_err"; then
11182   rm -rf conftest*
11183   eval "ac_cv_header_$ac_safe=yes"
11184 else
11185   echo "$ac_err" >&5
11186   echo "configure: failed program was:" >&5
11187   cat conftest.$ac_ext >&5
11188   rm -rf conftest*
11189   eval "ac_cv_header_$ac_safe=no"
11190 fi
11191 rm -f conftest*
11192 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11193   echo "$ac_t""yes" 1>&6
11194     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11195   { test "$extra_verbose" = "yes" && cat << EOF
11196     Defining $ac_tr_hdr
11197 EOF
11198 cat >> confdefs.h <<EOF
11199 #define $ac_tr_hdr 1
11200 EOF
11201 }
11202  
11203 else
11204   echo "$ac_t""no" 1>&6
11205 fi
11206 done
11207  fi
11208
11209 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
11210    echo "    xemacs will be linked with \"realpath.o\""
11211  fi
11212
11213 for ac_func in getloadavg
11214 do
11215 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11216 echo "configure:11217: checking for $ac_func" >&5
11217
11218 cat > conftest.$ac_ext <<EOF
11219 #line 11220 "configure"
11220 #include "confdefs.h"
11221 /* System header to define __stub macros and hopefully few prototypes,
11222     which can conflict with char $ac_func(); below.  */
11223 #include <assert.h>
11224 /* Override any gcc2 internal prototype to avoid an error.  */
11225 /* We use char because int might match the return type of a gcc2
11226     builtin and then its argument prototype would still apply.  */
11227 char $ac_func();
11228
11229 int main() {
11230
11231 /* The GNU C library defines this for functions which it implements
11232     to always fail with ENOSYS.  Some functions are actually named
11233     something starting with __ and the normal name is an alias.  */
11234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11235 choke me
11236 #else
11237 $ac_func();
11238 #endif
11239
11240 ; return 0; }
11241 EOF
11242 if { (eval echo configure:11243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11243   rm -rf conftest*
11244   eval "ac_cv_func_$ac_func=yes"
11245 else
11246   echo "configure: failed program was:" >&5
11247   cat conftest.$ac_ext >&5
11248   rm -rf conftest*
11249   eval "ac_cv_func_$ac_func=no"
11250 fi
11251 rm -f conftest*
11252
11253 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11254   echo "$ac_t""yes" 1>&6
11255     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11256   { test "$extra_verbose" = "yes" && cat << EOF
11257     Defining $ac_tr_func
11258 EOF
11259 cat >> confdefs.h <<EOF
11260 #define $ac_tr_func 1
11261 EOF
11262 }
11263  
11264 else
11265   echo "$ac_t""no" 1>&6
11266 fi
11267 done
11268
11269
11270 if test "$ac_cv_func_getloadavg" = "yes"; then
11271         for ac_hdr in sys/loadavg.h
11272 do
11273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11275 echo "configure:11276: checking for $ac_hdr" >&5
11276
11277 cat > conftest.$ac_ext <<EOF
11278 #line 11279 "configure"
11279 #include "confdefs.h"
11280 #include <$ac_hdr>
11281 EOF
11282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11283 { (eval echo configure:11284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11285 if test -z "$ac_err"; then
11286   rm -rf conftest*
11287   eval "ac_cv_header_$ac_safe=yes"
11288 else
11289   echo "$ac_err" >&5
11290   echo "configure: failed program was:" >&5
11291   cat conftest.$ac_ext >&5
11292   rm -rf conftest*
11293   eval "ac_cv_header_$ac_safe=no"
11294 fi
11295 rm -f conftest*
11296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11297   echo "$ac_t""yes" 1>&6
11298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11299   { test "$extra_verbose" = "yes" && cat << EOF
11300     Defining $ac_tr_hdr
11301 EOF
11302 cat >> confdefs.h <<EOF
11303 #define $ac_tr_hdr 1
11304 EOF
11305 }
11306  
11307 else
11308   echo "$ac_t""no" 1>&6
11309 fi
11310 done
11311
11312 else
11313     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
11314    echo "    xemacs will be linked with \"getloadavg.o\""
11315  fi
11316
11317     
11318 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
11319 echo "configure:11320: checking for kstat_open in -lkstat" >&5
11320 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
11321
11322 xe_check_libs=" -lkstat "
11323 cat > conftest.$ac_ext <<EOF
11324 #line 11325 "configure"
11325 #include "confdefs.h"
11326 /* Override any gcc2 internal prototype to avoid an error.  */
11327 /* We use char because int might match the return type of a gcc2
11328     builtin and then its argument prototype would still apply.  */
11329 char kstat_open();
11330
11331 int main() {
11332 kstat_open()
11333 ; return 0; }
11334 EOF
11335 if { (eval echo configure:11336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11336   rm -rf conftest*
11337   eval "ac_cv_lib_$ac_lib_var=yes"
11338 else
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -rf conftest*
11342   eval "ac_cv_lib_$ac_lib_var=no"
11343 fi
11344 rm -f conftest*
11345 xe_check_libs=""
11346
11347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11348   echo "$ac_t""yes" 1>&6
11349     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11351   { test "$extra_verbose" = "yes" && cat << EOF
11352     Defining $ac_tr_lib
11353 EOF
11354 cat >> confdefs.h <<EOF
11355 #define $ac_tr_lib 1
11356 EOF
11357 }
11358
11359   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
11360
11361 else
11362   echo "$ac_t""no" 1>&6
11363 fi
11364
11365
11366   for ac_hdr in kstat.h
11367 do
11368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11370 echo "configure:11371: checking for $ac_hdr" >&5
11371
11372 cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375 #include <$ac_hdr>
11376 EOF
11377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11378 { (eval echo configure:11379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11380 if test -z "$ac_err"; then
11381   rm -rf conftest*
11382   eval "ac_cv_header_$ac_safe=yes"
11383 else
11384   echo "$ac_err" >&5
11385   echo "configure: failed program was:" >&5
11386   cat conftest.$ac_ext >&5
11387   rm -rf conftest*
11388   eval "ac_cv_header_$ac_safe=no"
11389 fi
11390 rm -f conftest*
11391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11392   echo "$ac_t""yes" 1>&6
11393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11394   { test "$extra_verbose" = "yes" && cat << EOF
11395     Defining $ac_tr_hdr
11396 EOF
11397 cat >> confdefs.h <<EOF
11398 #define $ac_tr_hdr 1
11399 EOF
11400 }
11401  
11402 else
11403   echo "$ac_t""no" 1>&6
11404 fi
11405 done
11406
11407
11408     
11409 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
11410 echo "configure:11411: checking for kvm_read in -lkvm" >&5
11411 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
11412
11413 xe_check_libs=" -lkvm "
11414 cat > conftest.$ac_ext <<EOF
11415 #line 11416 "configure"
11416 #include "confdefs.h"
11417 /* Override any gcc2 internal prototype to avoid an error.  */
11418 /* We use char because int might match the return type of a gcc2
11419     builtin and then its argument prototype would still apply.  */
11420 char kvm_read();
11421
11422 int main() {
11423 kvm_read()
11424 ; return 0; }
11425 EOF
11426 if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11427   rm -rf conftest*
11428   eval "ac_cv_lib_$ac_lib_var=yes"
11429 else
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   eval "ac_cv_lib_$ac_lib_var=no"
11434 fi
11435 rm -f conftest*
11436 xe_check_libs=""
11437
11438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11439   echo "$ac_t""yes" 1>&6
11440     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11441     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11442   { test "$extra_verbose" = "yes" && cat << EOF
11443     Defining $ac_tr_lib
11444 EOF
11445 cat >> confdefs.h <<EOF
11446 #define $ac_tr_lib 1
11447 EOF
11448 }
11449
11450   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
11451
11452 else
11453   echo "$ac_t""no" 1>&6
11454 fi
11455
11456
11457 fi
11458
11459 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
11460 echo "configure:11461: checking whether netdb declares h_errno" >&5
11461 cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 #include <netdb.h>
11465 int main() {
11466 return h_errno;
11467 ; return 0; }
11468 EOF
11469 if { (eval echo configure:11470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11470   rm -rf conftest*
11471   echo "$ac_t""yes" 1>&6
11472    { test "$extra_verbose" = "yes" && cat << \EOF
11473     Defining HAVE_H_ERRNO
11474 EOF
11475 cat >> confdefs.h <<\EOF
11476 #define HAVE_H_ERRNO 1
11477 EOF
11478 }
11479
11480 else
11481   echo "configure: failed program was:" >&5
11482   cat conftest.$ac_ext >&5
11483   rm -rf conftest*
11484   echo "$ac_t""no" 1>&6
11485 fi
11486 rm -f conftest*
11487
11488 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
11489 echo "configure:11490: checking for sigsetjmp" >&5
11490 cat > conftest.$ac_ext <<EOF
11491 #line 11492 "configure"
11492 #include "confdefs.h"
11493 #include <setjmp.h>
11494 int main() {
11495 sigjmp_buf bar; sigsetjmp (bar, 0);
11496 ; return 0; }
11497 EOF
11498 if { (eval echo configure:11499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11499   rm -rf conftest*
11500   echo "$ac_t""yes" 1>&6
11501    { test "$extra_verbose" = "yes" && cat << \EOF
11502     Defining HAVE_SIGSETJMP
11503 EOF
11504 cat >> confdefs.h <<\EOF
11505 #define HAVE_SIGSETJMP 1
11506 EOF
11507 }
11508
11509 else
11510   echo "configure: failed program was:" >&5
11511   cat conftest.$ac_ext >&5
11512   rm -rf conftest*
11513   echo "$ac_t""no" 1>&6
11514 fi
11515 rm -f conftest*
11516
11517 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
11518 echo "configure:11519: checking whether localtime caches TZ" >&5
11519
11520 if test "$ac_cv_func_tzset" = "yes"; then
11521 cat > conftest.$ac_ext <<EOF
11522 #line 11523 "configure"
11523 #include "confdefs.h"
11524 #include <time.h>
11525 #if STDC_HEADERS
11526 # include <stdlib.h>
11527 #endif
11528 extern char **environ;
11529 unset_TZ ()
11530 {
11531   char **from, **to;
11532   for (to = from = environ; (*to = *from); from++)
11533     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
11534       to++;
11535 }
11536 char TZ_GMT0[] = "TZ=GMT0";
11537 char TZ_PST8[] = "TZ=PST8";
11538 main()
11539 {
11540   time_t now = time ((time_t *) 0);
11541   int hour_GMT0, hour_unset;
11542   if (putenv (TZ_GMT0) != 0)
11543     exit (1);
11544   hour_GMT0 = localtime (&now)->tm_hour;
11545   unset_TZ ();
11546   hour_unset = localtime (&now)->tm_hour;
11547   if (putenv (TZ_PST8) != 0)
11548     exit (1);
11549   if (localtime (&now)->tm_hour == hour_GMT0)
11550     exit (1);
11551   unset_TZ ();
11552   if (localtime (&now)->tm_hour != hour_unset)
11553     exit (1);
11554   exit (0);
11555 }
11556 EOF
11557 if { (eval echo configure:11558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11558 then
11559   emacs_cv_localtime_cache=no
11560 else
11561   conftest_rc="$?"
11562   echo "configure: failed program was:" >&5
11563   cat conftest.$ac_ext >&5
11564   rm -fr conftest*
11565   emacs_cv_localtime_cache=yes
11566 fi
11567 rm -fr conftest*
11568 else
11569         # If we lack tzset, report that localtime does not cache TZ,
11570         # since we can't invalidate the cache if we don't have tzset.
11571         emacs_cv_localtime_cache=no
11572 fi
11573 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11574 if test $emacs_cv_localtime_cache = yes; then
11575   { test "$extra_verbose" = "yes" && cat << \EOF
11576     Defining LOCALTIME_CACHE
11577 EOF
11578 cat >> confdefs.h <<\EOF
11579 #define LOCALTIME_CACHE 1
11580 EOF
11581 }
11582
11583 fi
11584
11585 if test "$HAVE_TIMEVAL" = "yes"; then
11586 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11587 echo "configure:11588: checking whether gettimeofday accepts one or two arguments" >&5
11588 cat > conftest.$ac_ext <<EOF
11589 #line 11590 "configure"
11590 #include "confdefs.h"
11591
11592 #ifdef TIME_WITH_SYS_TIME
11593 #include <sys/time.h>
11594 #include <time.h>
11595 #else
11596 #ifdef HAVE_SYS_TIME_H
11597 #include <sys/time.h>
11598 #else
11599 #include <time.h>
11600 #endif
11601 #endif
11602   
11603 int main() {
11604
11605   struct timeval time;
11606   gettimeofday (&time, 0);
11607
11608 ; return 0; }
11609 EOF
11610 if { (eval echo configure:11611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11611   rm -rf conftest*
11612   echo "$ac_t""two" 1>&6
11613 else
11614   echo "configure: failed program was:" >&5
11615   cat conftest.$ac_ext >&5
11616   rm -rf conftest*
11617   echo "$ac_t""one" 1>&6
11618    { test "$extra_verbose" = "yes" && cat << \EOF
11619     Defining GETTIMEOFDAY_ONE_ARGUMENT
11620 EOF
11621 cat >> confdefs.h <<\EOF
11622 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11623 EOF
11624 }
11625
11626 fi
11627 rm -f conftest*
11628 fi
11629
11630
11631 echo $ac_n "checking for inline""... $ac_c" 1>&6
11632 echo "configure:11633: checking for inline" >&5
11633
11634 ac_cv_c_inline=no
11635 for ac_kw in inline __inline__ __inline; do
11636   cat > conftest.$ac_ext <<EOF
11637 #line 11638 "configure"
11638 #include "confdefs.h"
11639
11640 int main() {
11641 } $ac_kw foo() {
11642 ; return 0; }
11643 EOF
11644 if { (eval echo configure:11645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11645   rm -rf conftest*
11646   ac_cv_c_inline=$ac_kw; break
11647 else
11648   echo "configure: failed program was:" >&5
11649   cat conftest.$ac_ext >&5
11650 fi
11651 rm -f conftest*
11652 done
11653
11654
11655 echo "$ac_t""$ac_cv_c_inline" 1>&6
11656 case "$ac_cv_c_inline" in
11657   inline | yes) ;;
11658   no) { test "$extra_verbose" = "yes" && cat << \EOF
11659     Defining inline = 
11660 EOF
11661 cat >> confdefs.h <<\EOF
11662 #define inline 
11663 EOF
11664 }
11665  ;;
11666   *)  { test "$extra_verbose" = "yes" && cat << EOF
11667     Defining inline = $ac_cv_c_inline
11668 EOF
11669 cat >> confdefs.h <<EOF
11670 #define inline $ac_cv_c_inline
11671 EOF
11672 }
11673  ;;
11674 esac
11675
11676 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11677    echo "    xemacs will be linked with \"inline.o\""
11678  fi
11679
11680
11681 if test "$__DECC" != "yes"; then
11682   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11683 # for constant arguments.  Useless!
11684 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11685 echo "configure:11686: checking for working alloca.h" >&5
11686
11687 cat > conftest.$ac_ext <<EOF
11688 #line 11689 "configure"
11689 #include "confdefs.h"
11690 #include <alloca.h>
11691 int main() {
11692 char *p = alloca(2 * sizeof(int));
11693 ; return 0; }
11694 EOF
11695 if { (eval echo configure:11696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11696   rm -rf conftest*
11697   ac_cv_header_alloca_h=yes
11698 else
11699   echo "configure: failed program was:" >&5
11700   cat conftest.$ac_ext >&5
11701   rm -rf conftest*
11702   ac_cv_header_alloca_h=no
11703 fi
11704 rm -f conftest*
11705
11706 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11707 if test $ac_cv_header_alloca_h = yes; then
11708   { test "$extra_verbose" = "yes" && cat << \EOF
11709     Defining HAVE_ALLOCA_H
11710 EOF
11711 cat >> confdefs.h <<\EOF
11712 #define HAVE_ALLOCA_H 1
11713 EOF
11714 }
11715
11716 fi
11717
11718 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11719 echo "configure:11720: checking for alloca" >&5
11720
11721 cat > conftest.$ac_ext <<EOF
11722 #line 11723 "configure"
11723 #include "confdefs.h"
11724
11725 #ifdef __GNUC__
11726 # define alloca __builtin_alloca
11727 #else
11728 # ifdef _MSC_VER
11729 #  include <malloc.h>
11730 #  define alloca _alloca
11731 # else
11732 #  if HAVE_ALLOCA_H
11733 #   include <alloca.h>
11734 #  else
11735 #   ifdef _AIX
11736  #pragma alloca
11737 #   else
11738 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11739 char *alloca ();
11740 #    endif
11741 #   endif
11742 #  endif
11743 # endif
11744 #endif
11745
11746 int main() {
11747 char *p = (char *) alloca(1);
11748 ; return 0; }
11749 EOF
11750 if { (eval echo configure:11751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11751   rm -rf conftest*
11752   ac_cv_func_alloca_works=yes
11753 else
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -rf conftest*
11757   ac_cv_func_alloca_works=no
11758 fi
11759 rm -f conftest*
11760
11761 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11762 if test $ac_cv_func_alloca_works = yes; then
11763   { test "$extra_verbose" = "yes" && cat << \EOF
11764     Defining HAVE_ALLOCA
11765 EOF
11766 cat >> confdefs.h <<\EOF
11767 #define HAVE_ALLOCA 1
11768 EOF
11769 }
11770
11771 fi
11772
11773 if test $ac_cv_func_alloca_works = no; then
11774   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11775   # that cause trouble.  Some versions do not even contain alloca or
11776   # contain a buggy version.  If you still want to use their alloca,
11777   # use ar to extract alloca.o from them instead of compiling alloca.c.
11778   ALLOCA=alloca.${ac_objext}
11779   { test "$extra_verbose" = "yes" && cat << \EOF
11780     Defining C_ALLOCA
11781 EOF
11782 cat >> confdefs.h <<\EOF
11783 #define C_ALLOCA 1
11784 EOF
11785 }
11786
11787
11788 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11789 echo "configure:11790: checking whether alloca needs Cray hooks" >&5
11790
11791 cat > conftest.$ac_ext <<EOF
11792 #line 11793 "configure"
11793 #include "confdefs.h"
11794 #if defined(CRAY) && ! defined(CRAY2)
11795 webecray
11796 #else
11797 wenotbecray
11798 #endif
11799
11800 EOF
11801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11802   egrep "webecray" >/dev/null 2>&1; then
11803   rm -rf conftest*
11804   ac_cv_os_cray=yes
11805 else
11806   rm -rf conftest*
11807   ac_cv_os_cray=no
11808 fi
11809 rm -f conftest*
11810
11811
11812 echo "$ac_t""$ac_cv_os_cray" 1>&6
11813 if test $ac_cv_os_cray = yes; then
11814 for ac_func in _getb67 GETB67 getb67; do
11815   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11816 echo "configure:11817: checking for $ac_func" >&5
11817
11818 cat > conftest.$ac_ext <<EOF
11819 #line 11820 "configure"
11820 #include "confdefs.h"
11821 /* System header to define __stub macros and hopefully few prototypes,
11822     which can conflict with char $ac_func(); below.  */
11823 #include <assert.h>
11824 /* Override any gcc2 internal prototype to avoid an error.  */
11825 /* We use char because int might match the return type of a gcc2
11826     builtin and then its argument prototype would still apply.  */
11827 char $ac_func();
11828
11829 int main() {
11830
11831 /* The GNU C library defines this for functions which it implements
11832     to always fail with ENOSYS.  Some functions are actually named
11833     something starting with __ and the normal name is an alias.  */
11834 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11835 choke me
11836 #else
11837 $ac_func();
11838 #endif
11839
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11843   rm -rf conftest*
11844   eval "ac_cv_func_$ac_func=yes"
11845 else
11846   echo "configure: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   rm -rf conftest*
11849   eval "ac_cv_func_$ac_func=no"
11850 fi
11851 rm -f conftest*
11852
11853 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11854   echo "$ac_t""yes" 1>&6
11855   { test "$extra_verbose" = "yes" && cat << EOF
11856     Defining CRAY_STACKSEG_END = $ac_func
11857 EOF
11858 cat >> confdefs.h <<EOF
11859 #define CRAY_STACKSEG_END $ac_func
11860 EOF
11861 }
11862
11863   break
11864 else
11865   echo "$ac_t""no" 1>&6
11866 fi
11867
11868 done
11869 fi
11870
11871 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11872 echo "configure:11873: checking stack direction for C alloca" >&5
11873
11874 cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 find_stack_direction ()
11878 {
11879   static char *addr = 0;
11880   auto char dummy;
11881   if (addr == 0)
11882     {
11883       addr = &dummy;
11884       return find_stack_direction ();
11885     }
11886   else
11887     return (&dummy > addr) ? 1 : -1;
11888 }
11889 main ()
11890 {
11891   exit (find_stack_direction() < 0);
11892 }
11893 EOF
11894 if { (eval echo configure:11895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11895 then
11896   ac_cv_c_stack_direction=1
11897 else
11898   conftest_rc="$?"
11899   echo "configure: failed program was:" >&5
11900   cat conftest.$ac_ext >&5
11901   rm -fr conftest*
11902   ac_cv_c_stack_direction=-1
11903 fi
11904 rm -fr conftest*
11905
11906 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11907 { test "$extra_verbose" = "yes" && cat << EOF
11908     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11909 EOF
11910 cat >> confdefs.h <<EOF
11911 #define STACK_DIRECTION $ac_cv_c_stack_direction
11912 EOF
11913 }
11914
11915 fi
11916
11917   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11918    echo "    xemacs will be linked with \"$ALLOCA\""
11919  fi
11920 fi
11921
11922 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11923 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11924 echo "configure:11925: checking for vfork.h" >&5
11925
11926 cat > conftest.$ac_ext <<EOF
11927 #line 11928 "configure"
11928 #include "confdefs.h"
11929 #include <vfork.h>
11930 EOF
11931 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11932 { (eval echo configure:11933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11933 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11934 if test -z "$ac_err"; then
11935   rm -rf conftest*
11936   eval "ac_cv_header_$ac_safe=yes"
11937 else
11938   echo "$ac_err" >&5
11939   echo "configure: failed program was:" >&5
11940   cat conftest.$ac_ext >&5
11941   rm -rf conftest*
11942   eval "ac_cv_header_$ac_safe=no"
11943 fi
11944 rm -f conftest*
11945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11946   echo "$ac_t""yes" 1>&6
11947   { test "$extra_verbose" = "yes" && cat << \EOF
11948     Defining HAVE_VFORK_H
11949 EOF
11950 cat >> confdefs.h <<\EOF
11951 #define HAVE_VFORK_H 1
11952 EOF
11953 }
11954
11955 else
11956   echo "$ac_t""no" 1>&6
11957 fi
11958
11959 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11960 echo "configure:11961: checking for working vfork" >&5
11961
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 /* Thanks to Paul Eggert for this test.  */
11966 #include <stdio.h>
11967 #include <sys/types.h>
11968 #include <sys/stat.h>
11969 #ifdef HAVE_UNISTD_H
11970 #include <unistd.h>
11971 #endif
11972 #ifdef HAVE_VFORK_H
11973 #include <vfork.h>
11974 #endif
11975 /* On some sparc systems, changes by the child to local and incoming
11976    argument registers are propagated back to the parent.
11977    The compiler is told about this with #include <vfork.h>,
11978    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11979    Test for this by using a static variable whose address
11980    is put into a register that is clobbered by the vfork.  */
11981 static
11982 #ifdef __cplusplus
11983 sparc_address_test (int arg)
11984 #else
11985 sparc_address_test (arg) int arg;
11986 #endif
11987 {
11988   static pid_t child;
11989   if (!child) {
11990     child = vfork ();
11991     if (child < 0) {
11992       perror ("vfork");
11993       _exit(2);
11994     }
11995     if (!child) {
11996       arg = getpid();
11997       write(-1, "", 0);
11998       _exit (arg);
11999     }
12000   }
12001 }
12002 main() {
12003   pid_t parent = getpid ();
12004   pid_t child;
12005
12006   sparc_address_test ();
12007
12008   child = vfork ();
12009
12010   if (child == 0) {
12011     /* Here is another test for sparc vfork register problems.
12012        This test uses lots of local variables, at least
12013        as many local variables as main has allocated so far
12014        including compiler temporaries.  4 locals are enough for
12015        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
12016        A buggy compiler should reuse the register of parent
12017        for one of the local variables, since it will think that
12018        parent can't possibly be used any more in this routine.
12019        Assigning to the local variable will thus munge parent
12020        in the parent process.  */
12021     pid_t
12022       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12023       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12024     /* Convince the compiler that p..p7 are live; otherwise, it might
12025        use the same hardware register for all 8 local variables.  */
12026     if (p != p1 || p != p2 || p != p3 || p != p4
12027         || p != p5 || p != p6 || p != p7)
12028       _exit(1);
12029
12030     /* On some systems (e.g. IRIX 3.3),
12031        vfork doesn't separate parent from child file descriptors.
12032        If the child closes a descriptor before it execs or exits,
12033        this munges the parent's descriptor as well.
12034        Test for this by closing stdout in the child.  */
12035     _exit(close(fileno(stdout)) != 0);
12036   } else {
12037     int status;
12038     struct stat st;
12039
12040     while (wait(&status) != child)
12041       ;
12042     exit(
12043          /* Was there some problem with vforking?  */
12044          child < 0
12045
12046          /* Did the child fail?  (This shouldn't happen.)  */
12047          || status
12048
12049          /* Did the vfork/compiler bug occur?  */
12050          || parent != getpid()
12051
12052          /* Did the file descriptor bug occur?  */
12053          || fstat(fileno(stdout), &st) != 0
12054          );
12055   }
12056 }
12057 EOF
12058 if { (eval echo configure:12059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12059 then
12060   ac_cv_func_vfork_works=yes
12061 else
12062   conftest_rc="$?"
12063   echo "configure: failed program was:" >&5
12064   cat conftest.$ac_ext >&5
12065   rm -fr conftest*
12066   ac_cv_func_vfork_works=no
12067 fi
12068 rm -fr conftest*
12069
12070 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
12071 if test $ac_cv_func_vfork_works = no; then
12072   { test "$extra_verbose" = "yes" && cat << \EOF
12073     Defining vfork = fork
12074 EOF
12075 cat >> confdefs.h <<\EOF
12076 #define vfork fork
12077 EOF
12078 }
12079
12080 fi
12081
12082
12083 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
12084 echo "configure:12085: checking for working strcoll" >&5
12085
12086 cat > conftest.$ac_ext <<EOF
12087 #line 12088 "configure"
12088 #include "confdefs.h"
12089 #include <string.h>
12090 main ()
12091 {
12092   exit (strcoll ("abc", "def") >= 0 ||
12093         strcoll ("ABC", "DEF") >= 0 ||
12094         strcoll ("123", "456") >= 0);
12095 }
12096 EOF
12097 if { (eval echo configure:12098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12098 then
12099   ac_cv_func_strcoll_works=yes
12100 else
12101   conftest_rc="$?"
12102   echo "configure: failed program was:" >&5
12103   cat conftest.$ac_ext >&5
12104   rm -fr conftest*
12105   ac_cv_func_strcoll_works=no
12106 fi
12107 rm -fr conftest*
12108
12109 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
12110 if test $ac_cv_func_strcoll_works = yes; then
12111   { test "$extra_verbose" = "yes" && cat << \EOF
12112     Defining HAVE_STRCOLL
12113 EOF
12114 cat >> confdefs.h <<\EOF
12115 #define HAVE_STRCOLL 1
12116 EOF
12117 }
12118
12119 fi
12120
12121
12122 for ac_func in getpgrp
12123 do
12124 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12125 echo "configure:12126: checking for $ac_func" >&5
12126
12127 cat > conftest.$ac_ext <<EOF
12128 #line 12129 "configure"
12129 #include "confdefs.h"
12130 /* System header to define __stub macros and hopefully few prototypes,
12131     which can conflict with char $ac_func(); below.  */
12132 #include <assert.h>
12133 /* Override any gcc2 internal prototype to avoid an error.  */
12134 /* We use char because int might match the return type of a gcc2
12135     builtin and then its argument prototype would still apply.  */
12136 char $ac_func();
12137
12138 int main() {
12139
12140 /* The GNU C library defines this for functions which it implements
12141     to always fail with ENOSYS.  Some functions are actually named
12142     something starting with __ and the normal name is an alias.  */
12143 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12144 choke me
12145 #else
12146 $ac_func();
12147 #endif
12148
12149 ; return 0; }
12150 EOF
12151 if { (eval echo configure:12152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12152   rm -rf conftest*
12153   eval "ac_cv_func_$ac_func=yes"
12154 else
12155   echo "configure: failed program was:" >&5
12156   cat conftest.$ac_ext >&5
12157   rm -rf conftest*
12158   eval "ac_cv_func_$ac_func=no"
12159 fi
12160 rm -f conftest*
12161
12162 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12163   echo "$ac_t""yes" 1>&6
12164     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12165   { test "$extra_verbose" = "yes" && cat << EOF
12166     Defining $ac_tr_func
12167 EOF
12168 cat >> confdefs.h <<EOF
12169 #define $ac_tr_func 1
12170 EOF
12171 }
12172  
12173 else
12174   echo "$ac_t""no" 1>&6
12175 fi
12176 done
12177
12178 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
12179 echo "configure:12180: checking whether getpgrp takes no argument" >&5
12180
12181 cat > conftest.$ac_ext <<EOF
12182 #line 12183 "configure"
12183 #include "confdefs.h"
12184
12185 /*
12186  * If this system has a BSD-style getpgrp(),
12187  * which takes a pid argument, exit unsuccessfully.
12188  *
12189  * Snarfed from Chet Ramey's bash pgrp.c test program
12190  */
12191 #include <stdio.h>
12192 #include <sys/types.h>
12193
12194 int     pid;
12195 int     pg1, pg2, pg3, pg4;
12196 int     ng, np, s, child;
12197
12198 main()
12199 {
12200         pid = getpid();
12201         pg1 = getpgrp(0);
12202         pg2 = getpgrp();
12203         pg3 = getpgrp(pid);
12204         pg4 = getpgrp(1);
12205
12206         /*
12207          * If all of these values are the same, it's pretty sure that
12208          * we're on a system that ignores getpgrp's first argument.
12209          */
12210         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
12211                 exit(0);
12212
12213         child = fork();
12214         if (child < 0)
12215                 exit(1);
12216         else if (child == 0) {
12217                 np = getpid();
12218                 /*
12219                  * If this is Sys V, this will not work; pgrp will be
12220                  * set to np because setpgrp just changes a pgrp to be
12221                  * the same as the pid.
12222                  */
12223                 setpgrp(np, pg1);
12224                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
12225                 if (ng == pg1) {
12226                         exit(1);
12227                 } else {
12228                         exit(0);
12229                 }
12230         } else {
12231                 wait(&s);
12232                 exit(s>>8);
12233         }
12234 }
12235
12236 EOF
12237 if { (eval echo configure:12238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12238 then
12239   ac_cv_func_getpgrp_void=yes
12240 else
12241   conftest_rc="$?"
12242   echo "configure: failed program was:" >&5
12243   cat conftest.$ac_ext >&5
12244   rm -fr conftest*
12245   ac_cv_func_getpgrp_void=no
12246 fi
12247 rm -fr conftest*
12248
12249
12250 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
12251 if test $ac_cv_func_getpgrp_void = yes; then
12252   { test "$extra_verbose" = "yes" && cat << \EOF
12253     Defining GETPGRP_VOID
12254 EOF
12255 cat >> confdefs.h <<\EOF
12256 #define GETPGRP_VOID 1
12257 EOF
12258 }
12259
12260 fi
12261
12262
12263 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
12264 echo "configure:12265: checking for working mmap" >&5
12265 case "$opsys" in ultrix* ) have_mmap=no ;; *)
12266 cat > conftest.$ac_ext <<EOF
12267 #line 12268 "configure"
12268 #include "confdefs.h"
12269 #include <stdio.h>
12270 #include <unistd.h>
12271 #include <fcntl.h>
12272 #include <sys/mman.h>
12273
12274 #ifndef MAP_VARIABLE
12275 #define MAP_VARIABLE 0
12276 #endif
12277
12278 #ifndef MAP_FAILED
12279 #define MAP_FAILED -1
12280 #endif
12281
12282 int main (int argc, char *argv[])
12283 {
12284   int fd = -1;
12285   caddr_t p;
12286 #ifndef MAP_ANONYMOUS
12287   fd = open ("/dev/zero", O_RDWR);
12288   if (fd < 0)
12289     return 1;
12290 #define MAP_ANONYMOUS 0
12291 #endif
12292   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
12293            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
12294            fd, 0) != (void *) MAP_FAILED)
12295     return 0;
12296   perror ("conftest: mmap failed");
12297   return 1;
12298 }
12299 EOF
12300 if { (eval echo configure:12301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12301 then
12302   have_mmap=yes
12303 else
12304   conftest_rc="$?"
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -fr conftest*
12308   have_mmap=no
12309 fi
12310 rm -fr conftest* ;;
12311 esac
12312 echo "$ac_t""$have_mmap" 1>&6
12313 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12314     Defining HAVE_MMAP
12315 EOF
12316 cat >> confdefs.h <<\EOF
12317 #define HAVE_MMAP 1
12318 EOF
12319 }
12320
12321
12322 case "$opsys" in cygwin*) 
12323         test "$rel_alloc" = "default" && rel_alloc=no ;;
12324 esac
12325 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
12326 if test "$rel_alloc $have_mmap" = "default yes"; then
12327   if test "$doug_lea_malloc" = "yes"; then
12328         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
12329 echo "configure:12330: checking for M_MMAP_THRESHOLD" >&5
12330     cat > conftest.$ac_ext <<EOF
12331 #line 12332 "configure"
12332 #include "confdefs.h"
12333 #include <malloc.h>
12334 int main() {
12335
12336 #ifndef M_MMAP_THRESHOLD
12337 #error No M_MMAP_THRESHOLD :-(
12338 !@+$%^&*_)(_ - unlikely to compile...
12339 #endif
12340
12341 ; return 0; }
12342 EOF
12343 if { (eval echo configure:12344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12344   rm -rf conftest*
12345   rel_alloc=no; echo "$ac_t""yes" 1>&6;
12346 else
12347   echo "configure: failed program was:" >&5
12348   cat conftest.$ac_ext >&5
12349   rm -rf conftest*
12350   rel_alloc=yes; echo "$ac_t""no" 1>&6;
12351 fi
12352 rm -f conftest*
12353   else
12354     rel_alloc=yes
12355   fi
12356 fi
12357 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12358     Defining REL_ALLOC
12359 EOF
12360 cat >> confdefs.h <<\EOF
12361 #define REL_ALLOC 1
12362 EOF
12363 }
12364
12365
12366 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
12367 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
12368 echo "configure:12369: checking for termios.h" >&5
12369
12370 cat > conftest.$ac_ext <<EOF
12371 #line 12372 "configure"
12372 #include "confdefs.h"
12373 #include <termios.h>
12374 EOF
12375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12376 { (eval echo configure:12377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12378 if test -z "$ac_err"; then
12379   rm -rf conftest*
12380   eval "ac_cv_header_$ac_safe=yes"
12381 else
12382   echo "$ac_err" >&5
12383   echo "configure: failed program was:" >&5
12384   cat conftest.$ac_ext >&5
12385   rm -rf conftest*
12386   eval "ac_cv_header_$ac_safe=no"
12387 fi
12388 rm -f conftest*
12389 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12390   echo "$ac_t""yes" 1>&6
12391   { test "$extra_verbose" = "yes" && cat << \EOF
12392     Defining HAVE_TERMIOS
12393 EOF
12394 cat >> confdefs.h <<\EOF
12395 #define HAVE_TERMIOS 1
12396 EOF
12397 }
12398
12399   { test "$extra_verbose" = "yes" && cat << \EOF
12400     Defining SIGNALS_VIA_CHARACTERS
12401 EOF
12402 cat >> confdefs.h <<\EOF
12403 #define SIGNALS_VIA_CHARACTERS 1
12404 EOF
12405 }
12406
12407   { test "$extra_verbose" = "yes" && cat << \EOF
12408     Defining NO_TERMIO
12409 EOF
12410 cat >> confdefs.h <<\EOF
12411 #define NO_TERMIO 1
12412 EOF
12413 }
12414
12415 else
12416   echo "$ac_t""no" 1>&6
12417 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
12418 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
12419 echo "configure:12420: checking for termio.h" >&5
12420
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 #include <termio.h>
12425 EOF
12426 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12427 { (eval echo configure:12428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12428 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12429 if test -z "$ac_err"; then
12430   rm -rf conftest*
12431   eval "ac_cv_header_$ac_safe=yes"
12432 else
12433   echo "$ac_err" >&5
12434   echo "configure: failed program was:" >&5
12435   cat conftest.$ac_ext >&5
12436   rm -rf conftest*
12437   eval "ac_cv_header_$ac_safe=no"
12438 fi
12439 rm -f conftest*
12440 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12441   echo "$ac_t""yes" 1>&6
12442   { test "$extra_verbose" = "yes" && cat << \EOF
12443     Defining HAVE_TERMIO
12444 EOF
12445 cat >> confdefs.h <<\EOF
12446 #define HAVE_TERMIO 1
12447 EOF
12448 }
12449
12450 else
12451   echo "$ac_t""no" 1>&6
12452 fi
12453
12454 fi
12455
12456
12457
12458 echo $ac_n "checking for socket""... $ac_c" 1>&6
12459 echo "configure:12460: checking for socket" >&5
12460
12461 cat > conftest.$ac_ext <<EOF
12462 #line 12463 "configure"
12463 #include "confdefs.h"
12464 /* System header to define __stub macros and hopefully few prototypes,
12465     which can conflict with char socket(); below.  */
12466 #include <assert.h>
12467 /* Override any gcc2 internal prototype to avoid an error.  */
12468 /* We use char because int might match the return type of a gcc2
12469     builtin and then its argument prototype would still apply.  */
12470 char socket();
12471
12472 int main() {
12473
12474 /* The GNU C library defines this for functions which it implements
12475     to always fail with ENOSYS.  Some functions are actually named
12476     something starting with __ and the normal name is an alias.  */
12477 #if defined (__stub_socket) || defined (__stub___socket)
12478 choke me
12479 #else
12480 socket();
12481 #endif
12482
12483 ; return 0; }
12484 EOF
12485 if { (eval echo configure:12486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12486   rm -rf conftest*
12487   eval "ac_cv_func_socket=yes"
12488 else
12489   echo "configure: failed program was:" >&5
12490   cat conftest.$ac_ext >&5
12491   rm -rf conftest*
12492   eval "ac_cv_func_socket=no"
12493 fi
12494 rm -f conftest*
12495
12496 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
12497   echo "$ac_t""yes" 1>&6
12498   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
12499 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
12500 echo "configure:12501: checking for netinet/in.h" >&5
12501
12502 cat > conftest.$ac_ext <<EOF
12503 #line 12504 "configure"
12504 #include "confdefs.h"
12505 #include <netinet/in.h>
12506 EOF
12507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12508 { (eval echo configure:12509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12510 if test -z "$ac_err"; then
12511   rm -rf conftest*
12512   eval "ac_cv_header_$ac_safe=yes"
12513 else
12514   echo "$ac_err" >&5
12515   echo "configure: failed program was:" >&5
12516   cat conftest.$ac_ext >&5
12517   rm -rf conftest*
12518   eval "ac_cv_header_$ac_safe=no"
12519 fi
12520 rm -f conftest*
12521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12522   echo "$ac_t""yes" 1>&6
12523   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
12524 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
12525 echo "configure:12526: checking for arpa/inet.h" >&5
12526
12527 cat > conftest.$ac_ext <<EOF
12528 #line 12529 "configure"
12529 #include "confdefs.h"
12530 #include <arpa/inet.h>
12531 EOF
12532 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12533 { (eval echo configure:12534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12534 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12535 if test -z "$ac_err"; then
12536   rm -rf conftest*
12537   eval "ac_cv_header_$ac_safe=yes"
12538 else
12539   echo "$ac_err" >&5
12540   echo "configure: failed program was:" >&5
12541   cat conftest.$ac_ext >&5
12542   rm -rf conftest*
12543   eval "ac_cv_header_$ac_safe=no"
12544 fi
12545 rm -f conftest*
12546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12547   echo "$ac_t""yes" 1>&6
12548   
12549   { test "$extra_verbose" = "yes" && cat << \EOF
12550     Defining HAVE_SOCKETS
12551 EOF
12552 cat >> confdefs.h <<\EOF
12553 #define HAVE_SOCKETS 1
12554 EOF
12555 }
12556
12557       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12558 echo "configure:12559: checking "for sun_len member in struct sockaddr_un"" >&5
12559       cat > conftest.$ac_ext <<EOF
12560 #line 12561 "configure"
12561 #include "confdefs.h"
12562
12563 #include <sys/types.h>
12564 #include <sys/socket.h>
12565 #include <sys/un.h>
12566       
12567 int main() {
12568 static struct sockaddr_un x; x.sun_len = 1;
12569 ; return 0; }
12570 EOF
12571 if { (eval echo configure:12572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12572   rm -rf conftest*
12573   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12574     Defining HAVE_SOCKADDR_SUN_LEN
12575 EOF
12576 cat >> confdefs.h <<\EOF
12577 #define HAVE_SOCKADDR_SUN_LEN 1
12578 EOF
12579 }
12580
12581 else
12582   echo "configure: failed program was:" >&5
12583   cat conftest.$ac_ext >&5
12584   rm -rf conftest*
12585   echo "$ac_t""no" 1>&6
12586 fi
12587 rm -f conftest*
12588       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12589 echo "configure:12590: checking "for ip_mreq struct in netinet/in.h"" >&5
12590       cat > conftest.$ac_ext <<EOF
12591 #line 12592 "configure"
12592 #include "confdefs.h"
12593
12594 #include <sys/types.h>
12595 #include <netinet/in.h>
12596       
12597 int main() {
12598 static struct ip_mreq x;
12599 ; return 0; }
12600 EOF
12601 if { (eval echo configure:12602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12602   rm -rf conftest*
12603   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12604     Defining HAVE_MULTICAST
12605 EOF
12606 cat >> confdefs.h <<\EOF
12607 #define HAVE_MULTICAST 1
12608 EOF
12609 }
12610
12611 else
12612   echo "configure: failed program was:" >&5
12613   cat conftest.$ac_ext >&5
12614   rm -rf conftest*
12615   echo "$ac_t""no" 1>&6
12616 fi
12617 rm -f conftest*
12618 else
12619   echo "$ac_t""no" 1>&6
12620 fi
12621
12622 else
12623   echo "$ac_t""no" 1>&6
12624 fi
12625
12626 else
12627   echo "$ac_t""no" 1>&6
12628 fi
12629
12630
12631 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12632 echo "configure:12633: checking for msgget" >&5
12633
12634 cat > conftest.$ac_ext <<EOF
12635 #line 12636 "configure"
12636 #include "confdefs.h"
12637 /* System header to define __stub macros and hopefully few prototypes,
12638     which can conflict with char msgget(); below.  */
12639 #include <assert.h>
12640 /* Override any gcc2 internal prototype to avoid an error.  */
12641 /* We use char because int might match the return type of a gcc2
12642     builtin and then its argument prototype would still apply.  */
12643 char msgget();
12644
12645 int main() {
12646
12647 /* The GNU C library defines this for functions which it implements
12648     to always fail with ENOSYS.  Some functions are actually named
12649     something starting with __ and the normal name is an alias.  */
12650 #if defined (__stub_msgget) || defined (__stub___msgget)
12651 choke me
12652 #else
12653 msgget();
12654 #endif
12655
12656 ; return 0; }
12657 EOF
12658 if { (eval echo configure:12659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12659   rm -rf conftest*
12660   eval "ac_cv_func_msgget=yes"
12661 else
12662   echo "configure: failed program was:" >&5
12663   cat conftest.$ac_ext >&5
12664   rm -rf conftest*
12665   eval "ac_cv_func_msgget=no"
12666 fi
12667 rm -f conftest*
12668
12669 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12670   echo "$ac_t""yes" 1>&6
12671   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12672 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12673 echo "configure:12674: checking for sys/ipc.h" >&5
12674
12675 cat > conftest.$ac_ext <<EOF
12676 #line 12677 "configure"
12677 #include "confdefs.h"
12678 #include <sys/ipc.h>
12679 EOF
12680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12681 { (eval echo configure:12682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12683 if test -z "$ac_err"; then
12684   rm -rf conftest*
12685   eval "ac_cv_header_$ac_safe=yes"
12686 else
12687   echo "$ac_err" >&5
12688   echo "configure: failed program was:" >&5
12689   cat conftest.$ac_ext >&5
12690   rm -rf conftest*
12691   eval "ac_cv_header_$ac_safe=no"
12692 fi
12693 rm -f conftest*
12694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12695   echo "$ac_t""yes" 1>&6
12696   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12697 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12698 echo "configure:12699: checking for sys/msg.h" >&5
12699
12700 cat > conftest.$ac_ext <<EOF
12701 #line 12702 "configure"
12702 #include "confdefs.h"
12703 #include <sys/msg.h>
12704 EOF
12705 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12706 { (eval echo configure:12707: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12707 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12708 if test -z "$ac_err"; then
12709   rm -rf conftest*
12710   eval "ac_cv_header_$ac_safe=yes"
12711 else
12712   echo "$ac_err" >&5
12713   echo "configure: failed program was:" >&5
12714   cat conftest.$ac_ext >&5
12715   rm -rf conftest*
12716   eval "ac_cv_header_$ac_safe=no"
12717 fi
12718 rm -f conftest*
12719 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12720   echo "$ac_t""yes" 1>&6
12721   { test "$extra_verbose" = "yes" && cat << \EOF
12722     Defining HAVE_SYSVIPC
12723 EOF
12724 cat >> confdefs.h <<\EOF
12725 #define HAVE_SYSVIPC 1
12726 EOF
12727 }
12728
12729 else
12730   echo "$ac_t""no" 1>&6
12731 fi
12732
12733 else
12734   echo "$ac_t""no" 1>&6
12735 fi
12736
12737 else
12738   echo "$ac_t""no" 1>&6
12739 fi
12740
12741
12742 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12743 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12744 echo "configure:12745: checking for dirent.h" >&5
12745
12746 cat > conftest.$ac_ext <<EOF
12747 #line 12748 "configure"
12748 #include "confdefs.h"
12749 #include <dirent.h>
12750 EOF
12751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12752 { (eval echo configure:12753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12754 if test -z "$ac_err"; then
12755   rm -rf conftest*
12756   eval "ac_cv_header_$ac_safe=yes"
12757 else
12758   echo "$ac_err" >&5
12759   echo "configure: failed program was:" >&5
12760   cat conftest.$ac_ext >&5
12761   rm -rf conftest*
12762   eval "ac_cv_header_$ac_safe=no"
12763 fi
12764 rm -f conftest*
12765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12766   echo "$ac_t""yes" 1>&6
12767   { test "$extra_verbose" = "yes" && cat << \EOF
12768     Defining SYSV_SYSTEM_DIR
12769 EOF
12770 cat >> confdefs.h <<\EOF
12771 #define SYSV_SYSTEM_DIR 1
12772 EOF
12773 }
12774
12775 else
12776   echo "$ac_t""no" 1>&6
12777 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12778 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12779 echo "configure:12780: checking for sys/dir.h" >&5
12780
12781 cat > conftest.$ac_ext <<EOF
12782 #line 12783 "configure"
12783 #include "confdefs.h"
12784 #include <sys/dir.h>
12785 EOF
12786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12787 { (eval echo configure:12788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12789 if test -z "$ac_err"; then
12790   rm -rf conftest*
12791   eval "ac_cv_header_$ac_safe=yes"
12792 else
12793   echo "$ac_err" >&5
12794   echo "configure: failed program was:" >&5
12795   cat conftest.$ac_ext >&5
12796   rm -rf conftest*
12797   eval "ac_cv_header_$ac_safe=no"
12798 fi
12799 rm -f conftest*
12800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12801   echo "$ac_t""yes" 1>&6
12802   :
12803 else
12804   echo "$ac_t""no" 1>&6
12805 { test "$extra_verbose" = "yes" && cat << \EOF
12806     Defining NONSYSTEM_DIR_LIBRARY
12807 EOF
12808 cat >> confdefs.h <<\EOF
12809 #define NONSYSTEM_DIR_LIBRARY 1
12810 EOF
12811 }
12812
12813 fi
12814
12815 fi
12816
12817
12818 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12819 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12820 echo "configure:12821: checking for nlist.h" >&5
12821
12822 cat > conftest.$ac_ext <<EOF
12823 #line 12824 "configure"
12824 #include "confdefs.h"
12825 #include <nlist.h>
12826 EOF
12827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12828 { (eval echo configure:12829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12830 if test -z "$ac_err"; then
12831   rm -rf conftest*
12832   eval "ac_cv_header_$ac_safe=yes"
12833 else
12834   echo "$ac_err" >&5
12835   echo "configure: failed program was:" >&5
12836   cat conftest.$ac_ext >&5
12837   rm -rf conftest*
12838   eval "ac_cv_header_$ac_safe=no"
12839 fi
12840 rm -f conftest*
12841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12842   echo "$ac_t""yes" 1>&6
12843   { test "$extra_verbose" = "yes" && cat << \EOF
12844     Defining NLIST_STRUCT
12845 EOF
12846 cat >> confdefs.h <<\EOF
12847 #define NLIST_STRUCT 1
12848 EOF
12849 }
12850
12851 else
12852   echo "$ac_t""no" 1>&6
12853 fi
12854
12855
12856
12857 echo "checking "for sound support"" 1>&6
12858 echo "configure:12859: checking "for sound support"" >&5
12859 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12860
12861 if test "$with_native_sound" != "no"; then
12862     if test -n "$native_sound_lib"; then
12863     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12864 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12865 echo "configure:12866: checking for multimedia/audio_device.h" >&5
12866
12867 cat > conftest.$ac_ext <<EOF
12868 #line 12869 "configure"
12869 #include "confdefs.h"
12870 #include <multimedia/audio_device.h>
12871 EOF
12872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12873 { (eval echo configure:12874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12875 if test -z "$ac_err"; then
12876   rm -rf conftest*
12877   eval "ac_cv_header_$ac_safe=yes"
12878 else
12879   echo "$ac_err" >&5
12880   echo "configure: failed program was:" >&5
12881   cat conftest.$ac_ext >&5
12882   rm -rf conftest*
12883   eval "ac_cv_header_$ac_safe=no"
12884 fi
12885 rm -f conftest*
12886 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12887   echo "$ac_t""yes" 1>&6
12888   sound_found=yes sound_cflags=""
12889       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12890    echo "    xemacs will be linked with \"sunplay.o\""
12891  fi
12892 else
12893   echo "$ac_t""no" 1>&6
12894 fi
12895
12896   fi
12897
12898     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12899     sound_found=yes
12900     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12901    echo "    xemacs will be linked with \"sunplay.o\""
12902  fi
12903     if test -d "/usr/demo/SOUND/include"
12904       then sound_cflags="-I/usr/demo/SOUND/include"
12905       else sound_cflags="-I/usr/demo/SOUND"
12906     fi
12907     if test -z "$native_sound_lib" ; then
12908       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12909         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12910         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12911       fi
12912     fi
12913   fi
12914
12915     if test -z "$sound_found"; then
12916     case "$canonical" in
12917     *-sgi-* )
12918       if test -z "$native_sound_lib"; then
12919         
12920 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12921 echo "configure:12922: checking for ALopenport in -laudio" >&5
12922 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12923
12924 xe_check_libs=" -laudio "
12925 cat > conftest.$ac_ext <<EOF
12926 #line 12927 "configure"
12927 #include "confdefs.h"
12928 /* Override any gcc2 internal prototype to avoid an error.  */
12929 /* We use char because int might match the return type of a gcc2
12930     builtin and then its argument prototype would still apply.  */
12931 char ALopenport();
12932
12933 int main() {
12934 ALopenport()
12935 ; return 0; }
12936 EOF
12937 if { (eval echo configure:12938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12938   rm -rf conftest*
12939   eval "ac_cv_lib_$ac_lib_var=yes"
12940 else
12941   echo "configure: failed program was:" >&5
12942   cat conftest.$ac_ext >&5
12943   rm -rf conftest*
12944   eval "ac_cv_lib_$ac_lib_var=no"
12945 fi
12946 rm -f conftest*
12947 xe_check_libs=""
12948
12949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12950   echo "$ac_t""yes" 1>&6
12951   native_sound_lib="-laudio"
12952 else
12953   echo "$ac_t""no" 1>&6
12954 fi
12955
12956
12957       fi
12958       if test -n "$native_sound_lib"; then
12959         sound_found=yes sound_cflags=""
12960         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12961    echo "    xemacs will be linked with \"sgiplay.o\""
12962  fi
12963       fi ;;
12964     hppa*-hp-hpux* )
12965       if test -z "$native_sound_lib"; then
12966         
12967 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12968 echo "configure:12969: checking for AOpenAudio in -lAlib" >&5
12969 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12970
12971 xe_check_libs=" -lAlib "
12972 cat > conftest.$ac_ext <<EOF
12973 #line 12974 "configure"
12974 #include "confdefs.h"
12975 /* Override any gcc2 internal prototype to avoid an error.  */
12976 /* We use char because int might match the return type of a gcc2
12977     builtin and then its argument prototype would still apply.  */
12978 char AOpenAudio();
12979
12980 int main() {
12981 AOpenAudio()
12982 ; return 0; }
12983 EOF
12984 if { (eval echo configure:12985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12985   rm -rf conftest*
12986   eval "ac_cv_lib_$ac_lib_var=yes"
12987 else
12988   echo "configure: failed program was:" >&5
12989   cat conftest.$ac_ext >&5
12990   rm -rf conftest*
12991   eval "ac_cv_lib_$ac_lib_var=no"
12992 fi
12993 rm -f conftest*
12994 xe_check_libs=""
12995
12996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12997   echo "$ac_t""yes" 1>&6
12998   native_sound_lib="-lAlib"
12999 else
13000   echo "$ac_t""no" 1>&6
13001 fi
13002
13003
13004       fi
13005       if test -n "$native_sound_lib"; then
13006         sound_found=yes
13007         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
13008    echo "    xemacs will be linked with \"hpplay.o\""
13009  fi
13010         if test "$GCC" = "yes" # Kludge city
13011           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
13012           else sound_cflags="+e -I/usr/audio/examples"
13013         fi
13014       fi ;;
13015     esac
13016   fi
13017
13018     if test -z "$sound_found"; then
13019     if test "$with_msw" = "yes"; then
13020     sound_found=yes
13021     native_sound_lib=
13022     fi
13023   fi
13024
13025     if test -z "$sound_found"; then
13026     for dir in "machine" "sys" "linux"; do
13027       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
13028 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
13029 echo "configure:13030: checking for ${dir}/soundcard.h" >&5
13030
13031 cat > conftest.$ac_ext <<EOF
13032 #line 13033 "configure"
13033 #include "confdefs.h"
13034 #include <${dir}/soundcard.h>
13035 EOF
13036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13037 { (eval echo configure:13038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13039 if test -z "$ac_err"; then
13040   rm -rf conftest*
13041   eval "ac_cv_header_$ac_safe=yes"
13042 else
13043   echo "$ac_err" >&5
13044   echo "configure: failed program was:" >&5
13045   cat conftest.$ac_ext >&5
13046   rm -rf conftest*
13047   eval "ac_cv_header_$ac_safe=no"
13048 fi
13049 rm -f conftest*
13050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13051   echo "$ac_t""yes" 1>&6
13052   sound_found=yes
13053        need_miscplay=yes
13054         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
13055    echo "    xemacs will be linked with \"linuxplay.o\""
13056  fi
13057         { test "$extra_verbose" = "yes" && cat << EOF
13058     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
13059 EOF
13060 cat >> confdefs.h <<EOF
13061 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
13062 EOF
13063 }
13064
13065         break
13066 else
13067   echo "$ac_t""no" 1>&6
13068 fi
13069
13070     done
13071   fi
13072
13073   test "$sound_found" = "yes" && with_native_sound=yes
13074 fi
13075
13076 if test "$with_native_sound" = "yes"; then
13077   { test "$extra_verbose" = "yes" && cat << \EOF
13078     Defining HAVE_NATIVE_SOUND
13079 EOF
13080 cat >> confdefs.h <<\EOF
13081 #define HAVE_NATIVE_SOUND 1
13082 EOF
13083 }
13084
13085   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
13086 fi
13087
13088 if test "$with_nas_sound" != "no"; then
13089   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
13090 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
13091 echo "configure:13092: checking for audio/audiolib.h" >&5
13092
13093 cat > conftest.$ac_ext <<EOF
13094 #line 13095 "configure"
13095 #include "confdefs.h"
13096 #include <audio/audiolib.h>
13097 EOF
13098 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13099 { (eval echo configure:13100: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13100 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13101 if test -z "$ac_err"; then
13102   rm -rf conftest*
13103   eval "ac_cv_header_$ac_safe=yes"
13104 else
13105   echo "$ac_err" >&5
13106   echo "configure: failed program was:" >&5
13107   cat conftest.$ac_ext >&5
13108   rm -rf conftest*
13109   eval "ac_cv_header_$ac_safe=no"
13110 fi
13111 rm -f conftest*
13112 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13113   echo "$ac_t""yes" 1>&6
13114   
13115     
13116 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
13117 echo "configure:13118: checking for AuOpenServer in -laudio" >&5
13118 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
13119
13120 xe_check_libs=" -laudio "
13121 cat > conftest.$ac_ext <<EOF
13122 #line 13123 "configure"
13123 #include "confdefs.h"
13124 /* Override any gcc2 internal prototype to avoid an error.  */
13125 /* We use char because int might match the return type of a gcc2
13126     builtin and then its argument prototype would still apply.  */
13127 char AuOpenServer();
13128
13129 int main() {
13130 AuOpenServer()
13131 ; return 0; }
13132 EOF
13133 if { (eval echo configure:13134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13134   rm -rf conftest*
13135   eval "ac_cv_lib_$ac_lib_var=yes"
13136 else
13137   echo "configure: failed program was:" >&5
13138   cat conftest.$ac_ext >&5
13139   rm -rf conftest*
13140   eval "ac_cv_lib_$ac_lib_var=no"
13141 fi
13142 rm -f conftest*
13143 xe_check_libs=""
13144
13145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13146   echo "$ac_t""yes" 1>&6
13147   have_nas_sound=yes
13148 else
13149   echo "$ac_t""no" 1>&6
13150 fi
13151
13152
13153 else
13154   echo "$ac_t""no" 1>&6
13155 fi
13156
13157   if test "$have_nas_sound" = "yes"; then
13158     with_nas_sound=yes
13159     { test "$extra_verbose" = "yes" && cat << \EOF
13160     Defining HAVE_NAS_SOUND
13161 EOF
13162 cat >> confdefs.h <<\EOF
13163 #define HAVE_NAS_SOUND 1
13164 EOF
13165 }
13166
13167     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
13168    echo "    xemacs will be linked with \"nas.o\""
13169  fi
13170     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
13171             cat > conftest.$ac_ext <<EOF
13172 #line 13173 "configure"
13173 #include "confdefs.h"
13174 #include <audio/Xtutil.h>
13175 EOF
13176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13177   egrep "AuXtErrorJump" >/dev/null 2>&1; then
13178   :
13179 else
13180   rm -rf conftest*
13181   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
13182     Defining NAS_NO_ERROR_JUMP
13183 EOF
13184 cat >> confdefs.h <<\EOF
13185 #define NAS_NO_ERROR_JUMP 1
13186 EOF
13187 }
13188
13189 fi
13190 rm -f conftest*
13191
13192   else
13193     test "$with_nas_sound" = "yes" && \
13194       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
13195     with_nas_sound=no
13196   fi
13197 fi
13198
13199 if test "$with_esd_sound" != "no"; then
13200   # Extract the first word of "esd-config", so it can be a program name with args.
13201 set dummy esd-config; ac_word=$2
13202 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
13203 echo "configure:13204: checking for $ac_word" >&5
13204
13205 if test -n "$have_esd_config"; then
13206   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
13207 else
13208   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
13209   ac_dummy="$PATH"
13210   for ac_dir in $ac_dummy; do
13211     test -z "$ac_dir" && ac_dir=.
13212     if test -f $ac_dir/$ac_word; then
13213       ac_cv_prog_have_esd_config="yes"
13214       break
13215     fi
13216   done
13217   IFS="$ac_save_ifs"
13218   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
13219 fi
13220 have_esd_config="$ac_cv_prog_have_esd_config"
13221 if test -n "$have_esd_config"; then
13222   echo "$ac_t""$have_esd_config" 1>&6
13223 else
13224   echo "$ac_t""no" 1>&6
13225 fi
13226
13227   if test "$have_esd_config" = "yes"; then
13228     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
13229     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
13230     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
13231     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
13232 echo "configure:13233: checking for esd_play_stream" >&5
13233
13234 cat > conftest.$ac_ext <<EOF
13235 #line 13236 "configure"
13236 #include "confdefs.h"
13237 /* System header to define __stub macros and hopefully few prototypes,
13238     which can conflict with char esd_play_stream(); below.  */
13239 #include <assert.h>
13240 /* Override any gcc2 internal prototype to avoid an error.  */
13241 /* We use char because int might match the return type of a gcc2
13242     builtin and then its argument prototype would still apply.  */
13243 char esd_play_stream();
13244
13245 int main() {
13246
13247 /* The GNU C library defines this for functions which it implements
13248     to always fail with ENOSYS.  Some functions are actually named
13249     something starting with __ and the normal name is an alias.  */
13250 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
13251 choke me
13252 #else
13253 esd_play_stream();
13254 #endif
13255
13256 ; return 0; }
13257 EOF
13258 if { (eval echo configure:13259: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13259   rm -rf conftest*
13260   eval "ac_cv_func_esd_play_stream=yes"
13261 else
13262   echo "configure: failed program was:" >&5
13263   cat conftest.$ac_ext >&5
13264   rm -rf conftest*
13265   eval "ac_cv_func_esd_play_stream=no"
13266 fi
13267 rm -f conftest*
13268
13269 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
13270   echo "$ac_t""yes" 1>&6
13271   have_esd_sound=yes
13272 else
13273   echo "$ac_t""no" 1>&6
13274 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
13275 fi
13276
13277   fi
13278
13279   if test "$have_esd_sound" = "yes"; then
13280     with_esd_sound=yes
13281     need_miscplay=yes
13282     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
13283    echo "    xemacs will be linked with \"esd.o\""
13284  fi
13285     { test "$extra_verbose" = "yes" && cat << \EOF
13286     Defining HAVE_ESD_SOUND
13287 EOF
13288 cat >> confdefs.h <<\EOF
13289 #define HAVE_ESD_SOUND 1
13290 EOF
13291 }
13292
13293   else
13294     test "$with_esd_sound" = "yes" && \
13295       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
13296     with_esd_sound=no
13297   fi
13298 fi
13299
13300 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
13301    echo "    xemacs will be linked with \"miscplay.o\""
13302  fi
13303
13304
13305 test -z "$with_tty" && with_tty=yes
13306
13307 if test "$with_tty" = "yes"  ; then
13308   echo "checking for TTY-related features" 1>&6
13309 echo "configure:13310: checking for TTY-related features" >&5
13310   { test "$extra_verbose" = "yes" && cat << \EOF
13311     Defining HAVE_TTY
13312 EOF
13313 cat >> confdefs.h <<\EOF
13314 #define HAVE_TTY 1
13315 EOF
13316 }
13317
13318   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
13319    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\""
13320  fi
13321
13322     if test -z "$with_ncurses"; then
13323     
13324 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
13325 echo "configure:13326: checking for tgetent in -lncurses" >&5
13326 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
13327
13328 xe_check_libs=" -lncurses "
13329 cat > conftest.$ac_ext <<EOF
13330 #line 13331 "configure"
13331 #include "confdefs.h"
13332 /* Override any gcc2 internal prototype to avoid an error.  */
13333 /* We use char because int might match the return type of a gcc2
13334     builtin and then its argument prototype would still apply.  */
13335 char tgetent();
13336
13337 int main() {
13338 tgetent()
13339 ; return 0; }
13340 EOF
13341 if { (eval echo configure:13342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13342   rm -rf conftest*
13343   eval "ac_cv_lib_$ac_lib_var=yes"
13344 else
13345   echo "configure: failed program was:" >&5
13346   cat conftest.$ac_ext >&5
13347   rm -rf conftest*
13348   eval "ac_cv_lib_$ac_lib_var=no"
13349 fi
13350 rm -f conftest*
13351 xe_check_libs=""
13352
13353 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13354   echo "$ac_t""yes" 1>&6
13355   with_ncurses=yes
13356 else
13357   echo "$ac_t""no" 1>&6
13358 with_ncurses=no
13359 fi
13360
13361
13362   fi
13363   if test "$with_ncurses" = "yes"; then
13364     { test "$extra_verbose" = "yes" && cat << \EOF
13365     Defining HAVE_NCURSES
13366 EOF
13367 cat >> confdefs.h <<\EOF
13368 #define HAVE_NCURSES 1
13369 EOF
13370 }
13371
13372     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13373 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13374 echo "configure:13375: checking for ncurses/curses.h" >&5
13375
13376 cat > conftest.$ac_ext <<EOF
13377 #line 13378 "configure"
13378 #include "confdefs.h"
13379 #include <ncurses/curses.h>
13380 EOF
13381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13382 { (eval echo configure:13383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13384 if test -z "$ac_err"; then
13385   rm -rf conftest*
13386   eval "ac_cv_header_$ac_safe=yes"
13387 else
13388   echo "$ac_err" >&5
13389   echo "configure: failed program was:" >&5
13390   cat conftest.$ac_ext >&5
13391   rm -rf conftest*
13392   eval "ac_cv_header_$ac_safe=no"
13393 fi
13394 rm -f conftest*
13395 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13396   echo "$ac_t""yes" 1>&6
13397   curses_h_file=ncurses/curses.h
13398 else
13399   echo "$ac_t""no" 1>&6
13400 fi
13401
13402     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
13403 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
13404 echo "configure:13405: checking for ncurses/term.h" >&5
13405
13406 cat > conftest.$ac_ext <<EOF
13407 #line 13408 "configure"
13408 #include "confdefs.h"
13409 #include <ncurses/term.h>
13410 EOF
13411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13412 { (eval echo configure:13413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13414 if test -z "$ac_err"; then
13415   rm -rf conftest*
13416   eval "ac_cv_header_$ac_safe=yes"
13417 else
13418   echo "$ac_err" >&5
13419   echo "configure: failed program was:" >&5
13420   cat conftest.$ac_ext >&5
13421   rm -rf conftest*
13422   eval "ac_cv_header_$ac_safe=no"
13423 fi
13424 rm -f conftest*
13425 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13426   echo "$ac_t""yes" 1>&6
13427   term_h_file=ncurses/term.h
13428 else
13429   echo "$ac_t""no" 1>&6
13430 fi
13431
13432     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13433    echo "    xemacs will be linked with \"terminfo.o\""
13434  fi
13435     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
13436
13437     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
13438                         save_c_switch_site="$c_switch_site"
13439       c_switch_site="$c_switch_site -I/usr/include/ncurses"
13440       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
13441 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
13442 echo "configure:13443: checking for ncurses/curses.h" >&5
13443
13444 cat > conftest.$ac_ext <<EOF
13445 #line 13446 "configure"
13446 #include "confdefs.h"
13447 #include <ncurses/curses.h>
13448 EOF
13449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13450 { (eval echo configure:13451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13452 if test -z "$ac_err"; then
13453   rm -rf conftest*
13454   eval "ac_cv_header_$ac_safe=yes"
13455 else
13456   echo "$ac_err" >&5
13457   echo "configure: failed program was:" >&5
13458   cat conftest.$ac_ext >&5
13459   rm -rf conftest*
13460   eval "ac_cv_header_$ac_safe=no"
13461 fi
13462 rm -f conftest*
13463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13464   echo "$ac_t""yes" 1>&6
13465   curses_h_file=ncurses/curses.h
13466 else
13467   echo "$ac_t""no" 1>&6
13468 fi
13469
13470       if test "$ac_cv_header_ncurses_curses_h" = "yes"
13471         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
13472         else c_switch_site="$save_c_switch_site"
13473       fi
13474     fi
13475   else         if test "$have_terminfo" = "yes"; then
13476       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
13477    echo "    xemacs will be linked with \"terminfo.o\""
13478  fi
13479       if test -n "$libs_termcap"; then
13480         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13481       else
13482         for lib in curses termlib termcap; do
13483           
13484 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
13485 echo "configure:13486: checking for tgetent in -l$lib" >&5
13486 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
13487
13488 xe_check_libs=" -l$lib "
13489 cat > conftest.$ac_ext <<EOF
13490 #line 13491 "configure"
13491 #include "confdefs.h"
13492 /* Override any gcc2 internal prototype to avoid an error.  */
13493 /* We use char because int might match the return type of a gcc2
13494     builtin and then its argument prototype would still apply.  */
13495 char tgetent();
13496
13497 int main() {
13498 tgetent()
13499 ; return 0; }
13500 EOF
13501 if { (eval echo configure:13502: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13502   rm -rf conftest*
13503   eval "ac_cv_lib_$ac_lib_var=yes"
13504 else
13505   echo "configure: failed program was:" >&5
13506   cat conftest.$ac_ext >&5
13507   rm -rf conftest*
13508   eval "ac_cv_lib_$ac_lib_var=no"
13509 fi
13510 rm -f conftest*
13511 xe_check_libs=""
13512
13513 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13514   echo "$ac_t""yes" 1>&6
13515   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
13516 else
13517   echo "$ac_t""no" 1>&6
13518 fi
13519
13520
13521         done
13522       fi
13523     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
13524    echo "    xemacs will be linked with \"tparam.o\""
13525  fi
13526                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
13527       if test -n "$libs_termcap"; then
13528         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
13529       else
13530         
13531 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
13532 echo "configure:13533: checking for tgetent in -lcurses" >&5
13533 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
13534
13535 xe_check_libs=" -lcurses "
13536 cat > conftest.$ac_ext <<EOF
13537 #line 13538 "configure"
13538 #include "confdefs.h"
13539 /* Override any gcc2 internal prototype to avoid an error.  */
13540 /* We use char because int might match the return type of a gcc2
13541     builtin and then its argument prototype would still apply.  */
13542 char tgetent();
13543
13544 int main() {
13545 tgetent()
13546 ; return 0; }
13547 EOF
13548 if { (eval echo configure:13549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13549   rm -rf conftest*
13550   eval "ac_cv_lib_$ac_lib_var=yes"
13551 else
13552   echo "configure: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   rm -rf conftest*
13555   eval "ac_cv_lib_$ac_lib_var=no"
13556 fi
13557 rm -f conftest*
13558 xe_check_libs=""
13559
13560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13561   echo "$ac_t""yes" 1>&6
13562   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13563 else
13564   echo "$ac_t""no" 1>&6
13565 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13566 echo "configure:13567: checking for tgetent in -ltermcap" >&5
13567 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13568
13569 xe_check_libs=" -ltermcap "
13570 cat > conftest.$ac_ext <<EOF
13571 #line 13572 "configure"
13572 #include "confdefs.h"
13573 /* Override any gcc2 internal prototype to avoid an error.  */
13574 /* We use char because int might match the return type of a gcc2
13575     builtin and then its argument prototype would still apply.  */
13576 char tgetent();
13577
13578 int main() {
13579 tgetent()
13580 ; return 0; }
13581 EOF
13582 if { (eval echo configure:13583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13583   rm -rf conftest*
13584   eval "ac_cv_lib_$ac_lib_var=yes"
13585 else
13586   echo "configure: failed program was:" >&5
13587   cat conftest.$ac_ext >&5
13588   rm -rf conftest*
13589   eval "ac_cv_lib_$ac_lib_var=no"
13590 fi
13591 rm -f conftest*
13592 xe_check_libs=""
13593
13594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13595   echo "$ac_t""yes" 1>&6
13596   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13597 else
13598   echo "$ac_t""no" 1>&6
13599 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13600    echo "    xemacs will be linked with \"termcap.o\""
13601  fi
13602 fi
13603
13604
13605 fi
13606
13607
13608       fi
13609     fi
13610   fi
13611   { test "$extra_verbose" = "yes" && cat << EOF
13612     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13613 EOF
13614 cat >> confdefs.h <<EOF
13615 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13616 EOF
13617 }
13618
13619   { test "$extra_verbose" = "yes" && cat << EOF
13620     Defining TERM_H_FILE = "${term_h_file-term.h}"
13621 EOF
13622 cat >> confdefs.h <<EOF
13623 #define TERM_H_FILE "${term_h_file-term.h}"
13624 EOF
13625 }
13626
13627
13628     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13629 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13630 echo "configure:13631: checking for gpm.h" >&5
13631
13632 cat > conftest.$ac_ext <<EOF
13633 #line 13634 "configure"
13634 #include "confdefs.h"
13635 #include <gpm.h>
13636 EOF
13637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13638 { (eval echo configure:13639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13640 if test -z "$ac_err"; then
13641   rm -rf conftest*
13642   eval "ac_cv_header_$ac_safe=yes"
13643 else
13644   echo "$ac_err" >&5
13645   echo "configure: failed program was:" >&5
13646   cat conftest.$ac_ext >&5
13647   rm -rf conftest*
13648   eval "ac_cv_header_$ac_safe=no"
13649 fi
13650 rm -f conftest*
13651 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13652   echo "$ac_t""yes" 1>&6
13653   :
13654 else
13655   echo "$ac_t""no" 1>&6
13656 with_gpm=no
13657 fi
13658  }
13659   test -z "$with_gpm" && { 
13660 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13661 echo "configure:13662: checking for Gpm_Open in -lgpm" >&5
13662 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13663
13664 xe_check_libs=" -lgpm "
13665 cat > conftest.$ac_ext <<EOF
13666 #line 13667 "configure"
13667 #include "confdefs.h"
13668 /* Override any gcc2 internal prototype to avoid an error.  */
13669 /* We use char because int might match the return type of a gcc2
13670     builtin and then its argument prototype would still apply.  */
13671 char Gpm_Open();
13672
13673 int main() {
13674 Gpm_Open()
13675 ; return 0; }
13676 EOF
13677 if { (eval echo configure:13678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13678   rm -rf conftest*
13679   eval "ac_cv_lib_$ac_lib_var=yes"
13680 else
13681   echo "configure: failed program was:" >&5
13682   cat conftest.$ac_ext >&5
13683   rm -rf conftest*
13684   eval "ac_cv_lib_$ac_lib_var=no"
13685 fi
13686 rm -f conftest*
13687 xe_check_libs=""
13688
13689 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13690   echo "$ac_t""yes" 1>&6
13691   with_gpm=yes
13692 else
13693   echo "$ac_t""no" 1>&6
13694 with_gpm=no
13695 fi
13696
13697  }
13698   if test "$with_gpm" = "yes"; then
13699     { test "$extra_verbose" = "yes" && cat << \EOF
13700     Defining HAVE_GPM
13701 EOF
13702 cat >> confdefs.h <<\EOF
13703 #define HAVE_GPM 1
13704 EOF
13705 }
13706
13707     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13708    echo "    xemacs will be linked with \"gpmevent.o\""
13709  fi
13710     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13711   fi
13712
13713 else   for feature in ncurses gpm; do
13714     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13715       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13716     fi
13717     eval "with_${feature}=no"
13718   done
13719 fi 
13720 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13721    echo "    xemacs will be linked with \"event-unixoid.o\""
13722  fi
13723
13724
13725 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13726   != "no no no" && echo "checking for database support" 1>&6
13727 echo "configure:13728: checking for database support" >&5
13728
13729 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13730   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13731 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13732 echo "configure:13733: checking for ndbm.h" >&5
13733
13734 cat > conftest.$ac_ext <<EOF
13735 #line 13736 "configure"
13736 #include "confdefs.h"
13737 #include <ndbm.h>
13738 EOF
13739 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13740 { (eval echo configure:13741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13741 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13742 if test -z "$ac_err"; then
13743   rm -rf conftest*
13744   eval "ac_cv_header_$ac_safe=yes"
13745 else
13746   echo "$ac_err" >&5
13747   echo "configure: failed program was:" >&5
13748   cat conftest.$ac_ext >&5
13749   rm -rf conftest*
13750   eval "ac_cv_header_$ac_safe=no"
13751 fi
13752 rm -f conftest*
13753 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13754   echo "$ac_t""yes" 1>&6
13755   :
13756 else
13757   echo "$ac_t""no" 1>&6
13758
13759     test "$with_database_gdbm" = "yes" -o \
13760          "$with_database_dbm"  = "yes" && \
13761       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13762     with_database_gdbm=no with_database_dbm=no
13763 fi
13764
13765 fi
13766
13767 if test "$with_database_gdbm" != "no"; then
13768   
13769 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13770 echo "configure:13771: checking for dbm_open in -lgdbm" >&5
13771 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13772
13773 xe_check_libs=" -lgdbm "
13774 cat > conftest.$ac_ext <<EOF
13775 #line 13776 "configure"
13776 #include "confdefs.h"
13777 /* Override any gcc2 internal prototype to avoid an error.  */
13778 /* We use char because int might match the return type of a gcc2
13779     builtin and then its argument prototype would still apply.  */
13780 char dbm_open();
13781
13782 int main() {
13783 dbm_open()
13784 ; return 0; }
13785 EOF
13786 if { (eval echo configure:13787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13787   rm -rf conftest*
13788   eval "ac_cv_lib_$ac_lib_var=yes"
13789 else
13790   echo "configure: failed program was:" >&5
13791   cat conftest.$ac_ext >&5
13792   rm -rf conftest*
13793   eval "ac_cv_lib_$ac_lib_var=no"
13794 fi
13795 rm -f conftest*
13796 xe_check_libs=""
13797
13798 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13799   echo "$ac_t""yes" 1>&6
13800   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13801 else
13802   echo "$ac_t""no" 1>&6
13803 if test "$with_database_gdbm" = "yes"; then
13804      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13805    fi
13806    with_database_gdbm=no
13807 fi
13808
13809
13810 fi
13811
13812 if test "$with_database_dbm" != "no"; then
13813   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13814 echo "configure:13815: checking for dbm_open" >&5
13815
13816 cat > conftest.$ac_ext <<EOF
13817 #line 13818 "configure"
13818 #include "confdefs.h"
13819 /* System header to define __stub macros and hopefully few prototypes,
13820     which can conflict with char dbm_open(); below.  */
13821 #include <assert.h>
13822 /* Override any gcc2 internal prototype to avoid an error.  */
13823 /* We use char because int might match the return type of a gcc2
13824     builtin and then its argument prototype would still apply.  */
13825 char dbm_open();
13826
13827 int main() {
13828
13829 /* The GNU C library defines this for functions which it implements
13830     to always fail with ENOSYS.  Some functions are actually named
13831     something starting with __ and the normal name is an alias.  */
13832 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13833 choke me
13834 #else
13835 dbm_open();
13836 #endif
13837
13838 ; return 0; }
13839 EOF
13840 if { (eval echo configure:13841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13841   rm -rf conftest*
13842   eval "ac_cv_func_dbm_open=yes"
13843 else
13844   echo "configure: failed program was:" >&5
13845   cat conftest.$ac_ext >&5
13846   rm -rf conftest*
13847   eval "ac_cv_func_dbm_open=no"
13848 fi
13849 rm -f conftest*
13850
13851 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13852   echo "$ac_t""yes" 1>&6
13853   with_database_dbm=yes libdbm=
13854 else
13855   echo "$ac_t""no" 1>&6
13856
13857     
13858 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13859 echo "configure:13860: checking for dbm_open in -ldbm" >&5
13860 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13861
13862 xe_check_libs=" -ldbm "
13863 cat > conftest.$ac_ext <<EOF
13864 #line 13865 "configure"
13865 #include "confdefs.h"
13866 /* Override any gcc2 internal prototype to avoid an error.  */
13867 /* We use char because int might match the return type of a gcc2
13868     builtin and then its argument prototype would still apply.  */
13869 char dbm_open();
13870
13871 int main() {
13872 dbm_open()
13873 ; return 0; }
13874 EOF
13875 if { (eval echo configure:13876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13876   rm -rf conftest*
13877   eval "ac_cv_lib_$ac_lib_var=yes"
13878 else
13879   echo "configure: failed program was:" >&5
13880   cat conftest.$ac_ext >&5
13881   rm -rf conftest*
13882   eval "ac_cv_lib_$ac_lib_var=no"
13883 fi
13884 rm -f conftest*
13885 xe_check_libs=""
13886
13887 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13888   echo "$ac_t""yes" 1>&6
13889   with_database_dbm=yes libdbm=-ldbm
13890 else
13891   echo "$ac_t""no" 1>&6
13892 test "$with_database_dbm" = "yes" && \
13893         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13894       with_database_dbm=no
13895 fi
13896
13897
13898 fi
13899
13900 fi
13901
13902 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13903 test "$with_database_gdbm" = "yes" -o \
13904      "$with_database_dbm"  = "yes" && \
13905   { test "$extra_verbose" = "yes" && cat << \EOF
13906     Defining HAVE_DBM
13907 EOF
13908 cat >> confdefs.h <<\EOF
13909 #define HAVE_DBM 1
13910 EOF
13911 }
13912
13913
13914 if test "$with_database_berkdb" != "no"; then
13915   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13916 echo "configure:13917: checking for Berkeley db.h" >&5
13917   for header in "db/db.h" "db.h"; do
13918     cat > conftest.$ac_ext <<EOF
13919 #line 13920 "configure"
13920 #include "confdefs.h"
13921
13922 #include <stdlib.h>
13923 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13924 #ifdef HAVE_INTTYPES_H
13925 #define __BIT_TYPES_DEFINED__
13926 #include <inttypes.h>
13927 typedef uint8_t  u_int8_t;
13928 typedef uint16_t u_int16_t;
13929 typedef uint32_t u_int32_t;
13930 #ifdef WE_DONT_NEED_QUADS
13931 typedef uint64_t u_int64_t;
13932 #endif
13933 #endif
13934 #endif
13935 #include <$header>
13936
13937 int main() {
13938
13939 ; return 0; }
13940 EOF
13941 if { (eval echo configure:13942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13942   rm -rf conftest*
13943   db_h_file="$header"; break
13944 else
13945   echo "configure: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947 fi
13948 rm -f conftest*
13949   done
13950   if test -z "$db_h_file"
13951   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13952   else echo "$ac_t""$db_h_file" 1>&6
13953   fi
13954
13955   if test "$with_database_berkdb" != "no"; then
13956     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13957 echo "configure:13958: checking for Berkeley DB version" >&5
13958     cat > conftest.$ac_ext <<EOF
13959 #line 13960 "configure"
13960 #include "confdefs.h"
13961 #include <$db_h_file>
13962 #if DB_VERSION_MAJOR > 1
13963 yes
13964 #endif
13965
13966 EOF
13967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13968   egrep "yes" >/dev/null 2>&1; then
13969   rm -rf conftest*
13970   cat > conftest.$ac_ext <<EOF
13971 #line 13972 "configure"
13972 #include "confdefs.h"
13973 #include <$db_h_file>
13974 #if DB_VERSION_MAJOR > 2
13975 yes
13976 #endif
13977
13978 EOF
13979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13980   egrep "yes" >/dev/null 2>&1; then
13981   rm -rf conftest*
13982   echo "$ac_t""3" 1>&6; dbfunc=db_create
13983 else
13984   rm -rf conftest*
13985   
13986     echo "$ac_t""2" 1>&6; dbfunc=db_open
13987 fi
13988 rm -f conftest*
13989
13990 else
13991   rm -rf conftest*
13992   
13993     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13994 fi
13995 rm -f conftest*
13996
13997     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13998 echo "configure:13999: checking for $dbfunc" >&5
13999
14000 cat > conftest.$ac_ext <<EOF
14001 #line 14002 "configure"
14002 #include "confdefs.h"
14003 /* System header to define __stub macros and hopefully few prototypes,
14004     which can conflict with char $dbfunc(); below.  */
14005 #include <assert.h>
14006 /* Override any gcc2 internal prototype to avoid an error.  */
14007 /* We use char because int might match the return type of a gcc2
14008     builtin and then its argument prototype would still apply.  */
14009 char $dbfunc();
14010
14011 int main() {
14012
14013 /* The GNU C library defines this for functions which it implements
14014     to always fail with ENOSYS.  Some functions are actually named
14015     something starting with __ and the normal name is an alias.  */
14016 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
14017 choke me
14018 #else
14019 $dbfunc();
14020 #endif
14021
14022 ; return 0; }
14023 EOF
14024 if { (eval echo configure:14025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14025   rm -rf conftest*
14026   eval "ac_cv_func_$dbfunc=yes"
14027 else
14028   echo "configure: failed program was:" >&5
14029   cat conftest.$ac_ext >&5
14030   rm -rf conftest*
14031   eval "ac_cv_func_$dbfunc=no"
14032 fi
14033 rm -f conftest*
14034
14035 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
14036   echo "$ac_t""yes" 1>&6
14037   with_database_berkdb=yes need_libdb=no
14038 else
14039   echo "$ac_t""no" 1>&6
14040
14041     
14042 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
14043 echo "configure:14044: checking for $dbfunc in -ldb" >&5
14044 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
14045
14046 xe_check_libs=" -ldb "
14047 cat > conftest.$ac_ext <<EOF
14048 #line 14049 "configure"
14049 #include "confdefs.h"
14050 /* Override any gcc2 internal prototype to avoid an error.  */
14051 /* We use char because int might match the return type of a gcc2
14052     builtin and then its argument prototype would still apply.  */
14053 char $dbfunc();
14054
14055 int main() {
14056 $dbfunc()
14057 ; return 0; }
14058 EOF
14059 if { (eval echo configure:14060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14060   rm -rf conftest*
14061   eval "ac_cv_lib_$ac_lib_var=yes"
14062 else
14063   echo "configure: failed program was:" >&5
14064   cat conftest.$ac_ext >&5
14065   rm -rf conftest*
14066   eval "ac_cv_lib_$ac_lib_var=no"
14067 fi
14068 rm -f conftest*
14069 xe_check_libs=""
14070
14071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14072   echo "$ac_t""yes" 1>&6
14073   with_database_berkdb=yes need_libdb=yes
14074 else
14075   echo "$ac_t""no" 1>&6
14076 fi
14077
14078
14079 fi
14080
14081   fi
14082
14083   if test "$with_database_berkdb" = "yes"; then
14084     { test "$extra_verbose" = "yes" && cat << EOF
14085     Defining DB_H_FILE = "$db_h_file"
14086 EOF
14087 cat >> confdefs.h <<EOF
14088 #define DB_H_FILE "$db_h_file"
14089 EOF
14090 }
14091
14092     { test "$extra_verbose" = "yes" && cat << \EOF
14093     Defining HAVE_BERKELEY_DB
14094 EOF
14095 cat >> confdefs.h <<\EOF
14096 #define HAVE_BERKELEY_DB 1
14097 EOF
14098 }
14099
14100     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
14101   else with_database_berkdb=no
14102   fi
14103 fi
14104
14105 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
14106      != "no no no"; then
14107   { test "$extra_verbose" = "yes" && cat << \EOF
14108     Defining HAVE_DATABASE
14109 EOF
14110 cat >> confdefs.h <<\EOF
14111 #define HAVE_DATABASE 1
14112 EOF
14113 }
14114
14115   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
14116    echo "    xemacs will be linked with \"database.o\""
14117  fi
14118   if test "$with_utf_2000" = "yes"; then
14119     { test "$extra_verbose" = "yes" && cat << \EOF
14120     Defining HAVE_CHISE_CLIENT
14121 EOF
14122 cat >> confdefs.h <<\EOF
14123 #define HAVE_CHISE_CLIENT 1
14124 EOF
14125 }
14126
14127   fi
14128 fi
14129
14130 if test "$with_socks" = "yes"; then
14131   
14132 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
14133 echo "configure:14134: checking for SOCKSinit in -lsocks" >&5
14134 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
14135
14136 xe_check_libs=" -lsocks "
14137 cat > conftest.$ac_ext <<EOF
14138 #line 14139 "configure"
14139 #include "confdefs.h"
14140 /* Override any gcc2 internal prototype to avoid an error.  */
14141 /* We use char because int might match the return type of a gcc2
14142     builtin and then its argument prototype would still apply.  */
14143 char SOCKSinit();
14144
14145 int main() {
14146 SOCKSinit()
14147 ; return 0; }
14148 EOF
14149 if { (eval echo configure:14150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14150   rm -rf conftest*
14151   eval "ac_cv_lib_$ac_lib_var=yes"
14152 else
14153   echo "configure: failed program was:" >&5
14154   cat conftest.$ac_ext >&5
14155   rm -rf conftest*
14156   eval "ac_cv_lib_$ac_lib_var=no"
14157 fi
14158 rm -f conftest*
14159 xe_check_libs=""
14160
14161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14162   echo "$ac_t""yes" 1>&6
14163     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
14164     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
14165   { test "$extra_verbose" = "yes" && cat << EOF
14166     Defining $ac_tr_lib
14167 EOF
14168 cat >> confdefs.h <<EOF
14169 #define $ac_tr_lib 1
14170 EOF
14171 }
14172
14173   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
14174
14175 else
14176   echo "$ac_t""no" 1>&6
14177 fi
14178
14179
14180   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
14181     Defining HAVE_SOCKS
14182 EOF
14183 cat >> confdefs.h <<\EOF
14184 #define HAVE_SOCKS 1
14185 EOF
14186 }
14187
14188 fi
14189
14190 if test "$usage_tracking" = "yes"; then
14191   { test "$extra_verbose" = "yes" && cat << \EOF
14192     Defining USAGE_TRACKING
14193 EOF
14194 cat >> confdefs.h <<\EOF
14195 #define USAGE_TRACKING 1
14196 EOF
14197 }
14198
14199   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
14200 fi
14201
14202 if test "$with_modules" != "no"; then
14203   echo "checking for module support" 1>&6
14204 echo "configure:14205: checking for module support" >&5
14205
14206     if test "$with_msw" = "yes"; then
14207     have_dl=yes;
14208   else
14209         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
14210 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
14211 echo "configure:14212: checking for dlfcn.h" >&5
14212
14213 cat > conftest.$ac_ext <<EOF
14214 #line 14215 "configure"
14215 #include "confdefs.h"
14216 #include <dlfcn.h>
14217 EOF
14218 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14219 { (eval echo configure:14220: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14220 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14221 if test -z "$ac_err"; then
14222   rm -rf conftest*
14223   eval "ac_cv_header_$ac_safe=yes"
14224 else
14225   echo "$ac_err" >&5
14226   echo "configure: failed program was:" >&5
14227   cat conftest.$ac_ext >&5
14228   rm -rf conftest*
14229   eval "ac_cv_header_$ac_safe=no"
14230 fi
14231 rm -f conftest*
14232 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14233   echo "$ac_t""yes" 1>&6
14234   
14235       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
14236 echo "configure:14237: checking for dlopen in -lc" >&5
14237       cat > conftest.$ac_ext <<EOF
14238 #line 14239 "configure"
14239 #include "confdefs.h"
14240 #include <dlfcn.h>
14241 int main() {
14242         dlopen ("", 0);
14243 ; return 0; }
14244 EOF
14245 if { (eval echo configure:14246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14246   rm -rf conftest*
14247    have_dl=yes 
14248 else
14249   echo "configure: failed program was:" >&5
14250   cat conftest.$ac_ext >&5
14251   rm -rf conftest*
14252   
14253       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
14254 echo "configure:14255: checking for dlopen in -ldl" >&5
14255       ac_save_LIBS="$LIBS"
14256       LIBS="-ldl $LIBS"
14257       cat > conftest.$ac_ext <<EOF
14258 #line 14259 "configure"
14259 #include "confdefs.h"
14260 #include <dlfcn.h>
14261 int main() {
14262         dlopen ("", 0);
14263 ; return 0; }
14264 EOF
14265 if { (eval echo configure:14266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14266   rm -rf conftest*
14267    have_dl=yes 
14268 else
14269   echo "configure: failed program was:" >&5
14270   cat conftest.$ac_ext >&5
14271   rm -rf conftest*
14272   LIBS="$ac_save_LIBS"
14273 fi
14274 rm -f conftest*
14275       ac_save_LIBS=
14276 fi
14277 rm -f conftest*
14278 else
14279   echo "$ac_t""no" 1>&6
14280 fi
14281
14282     if test -n "$have_dl"; then
14283       { test "$extra_verbose" = "yes" && cat << \EOF
14284     Defining HAVE_DLOPEN
14285 EOF
14286 cat >> confdefs.h <<\EOF
14287 #define HAVE_DLOPEN 1
14288 EOF
14289 }
14290
14291     else
14292       
14293 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
14294 echo "configure:14295: checking for shl_load in -ldld" >&5
14295 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
14296
14297 xe_check_libs=" -ldld "
14298 cat > conftest.$ac_ext <<EOF
14299 #line 14300 "configure"
14300 #include "confdefs.h"
14301 /* Override any gcc2 internal prototype to avoid an error.  */
14302 /* We use char because int might match the return type of a gcc2
14303     builtin and then its argument prototype would still apply.  */
14304 char shl_load();
14305
14306 int main() {
14307 shl_load()
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14311   rm -rf conftest*
14312   eval "ac_cv_lib_$ac_lib_var=yes"
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   eval "ac_cv_lib_$ac_lib_var=no"
14318 fi
14319 rm -f conftest*
14320 xe_check_libs=""
14321
14322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14323   echo "$ac_t""yes" 1>&6
14324   libdl=dld have_dl=yes;
14325         { test "$extra_verbose" = "yes" && cat << \EOF
14326     Defining HAVE_SHL_LOAD
14327 EOF
14328 cat >> confdefs.h <<\EOF
14329 #define HAVE_SHL_LOAD 1
14330 EOF
14331 }
14332
14333 else
14334   echo "$ac_t""no" 1>&6
14335
14336 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
14337 echo "configure:14338: checking for dld_init in -ldld" >&5
14338 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
14339
14340 xe_check_libs=" -ldld "
14341 cat > conftest.$ac_ext <<EOF
14342 #line 14343 "configure"
14343 #include "confdefs.h"
14344 /* Override any gcc2 internal prototype to avoid an error.  */
14345 /* We use char because int might match the return type of a gcc2
14346     builtin and then its argument prototype would still apply.  */
14347 char dld_init();
14348
14349 int main() {
14350 dld_init()
14351 ; return 0; }
14352 EOF
14353 if { (eval echo configure:14354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14354   rm -rf conftest*
14355   eval "ac_cv_lib_$ac_lib_var=yes"
14356 else
14357   echo "configure: failed program was:" >&5
14358   cat conftest.$ac_ext >&5
14359   rm -rf conftest*
14360   eval "ac_cv_lib_$ac_lib_var=no"
14361 fi
14362 rm -f conftest*
14363 xe_check_libs=""
14364
14365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
14366   echo "$ac_t""yes" 1>&6
14367   libdl=dld have_dl=yes;
14368         { test "$extra_verbose" = "yes" && cat << \EOF
14369     Defining HAVE_DLD_INIT
14370 EOF
14371 cat >> confdefs.h <<\EOF
14372 #define HAVE_DLD_INIT 1
14373 EOF
14374 }
14375
14376 else
14377   echo "$ac_t""no" 1>&6
14378 fi
14379
14380
14381 fi
14382
14383
14384     fi
14385   fi 
14386   if test -n "$have_dl"; then
14387         
14388 dll_ld=
14389 dll_ldflags=
14390 dll_cflags=
14391 dll_post=
14392 dll_ldo="-o"
14393 ld_dynamic_link_flags=
14394 xehost=$canonical
14395 xealias=$internal_configuration
14396
14397 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
14398 echo "configure:14399: checking how to build dynamic libraries for ${xehost}" >&5
14399 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
14400 case "$xehost" in
14401 *-*-linux-gnu*) ;;
14402 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
14403 esac
14404
14405 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
14406 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
14407 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
14408
14409 case "$xehost_os" in
14410 aix3*)
14411   # AIX sometimes has problems with the GCC collect2 program.  For some
14412   # reason, if we set the COLLECT_NAMES environment variable, the problems
14413   # vanish in a puff of smoke.
14414   if test "${COLLECT_NAMES+set}" != set; then
14415     COLLECT_NAMES=
14416     export COLLECT_NAMES
14417   fi
14418   ;;
14419 esac
14420
14421 # Now see if the compiler is really GCC.
14422 if test "$GCC" = "yes"; then
14423   XEGCC=yes
14424 else
14425   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
14426 echo "configure:14427: checking checking whether we are using GNU C" >&5
14427   cat > conftest.$ac_ext <<EOF
14428 #line 14429 "configure"
14429 #include "confdefs.h"
14430
14431 #ifdef __GNUC__
14432   yes;
14433 #endif
14434
14435 EOF
14436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14437   egrep "yes" >/dev/null 2>&1; then
14438   rm -rf conftest*
14439   XEGCC=yes
14440 else
14441   rm -rf conftest*
14442   XEGCC=no
14443 fi
14444 rm -f conftest*
14445
14446   echo "$ac_t""${XEGCC}" 1>&6
14447 fi
14448
14449 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
14450 echo "configure:14451: checking how to produce PIC code" >&5
14451 wl=
14452
14453 can_build_shared=yes
14454 if test "$XEGCC" = yes; then
14455   wl='-Wl,'
14456
14457   case "$xehost_os" in
14458   aix[3-9]* | irix[5-9]* | osf[3-9])
14459     # PIC is the default for these OSes.
14460     ;;
14461
14462   os2*)
14463     # We can build DLLs from non-PIC.
14464     ;;
14465   amigaos*)
14466     # FIXME: we need at least 68020 code to build shared libraries, but
14467     # adding the `-m68020' flag to GCC prevents building anything better,
14468     # like `-m68040'.
14469     dll_cflags='-m68020 -resident32 -malways-restore-a4'
14470     ;;
14471   *cygwin* | *mingw* )
14472     # PIC is the default
14473     ;;
14474   *)
14475     dll_cflags='-fPIC'
14476     ;;
14477   esac
14478 else
14479   # PORTME Check for PIC flags for the system compiler.
14480   case "$xehost_os" in
14481   hpux9* | hpux1[0-9]*)
14482     # Is there a better link_static_flag that works with the bundled CC?
14483     wl='-Wl,'
14484     dll_cflags='+Z'
14485     ;;
14486
14487   irix[5-9]*)
14488     wl='-Wl,'
14489     # PIC (with -KPIC) is the default.
14490     ;;
14491
14492   os2*)
14493     # We can build DLLs from non-PIC.
14494     ;;
14495
14496   osf[3-9]*)
14497     # All OSF/1 code is PIC.
14498     wl='-Wl,'
14499     ;;
14500
14501   aix[3-9]*)
14502     # All AIX code is PIC.
14503     wl='-Wl,'
14504     ;;
14505
14506   sco3.2v5*)
14507     dll_cflags='-belf -Kpic'
14508     wl='-Wl,'
14509     ;;
14510
14511   unixware*)
14512     dll_cflags="-KPIC"
14513     wl="-Wl,"
14514     ;;
14515
14516   sysv4*)
14517     dll_cflags="-KPIC"
14518     wl="-Wl,"
14519     ;;
14520
14521   sysv5*)
14522     dll_cflags="-KPIC"
14523     wl="-Wl,"
14524     ;;
14525
14526   solaris2*)
14527     dll_cflags='-KPIC'
14528     wl='-Wl,'
14529     ;;
14530
14531   sunos4*)
14532     dll_cflags='-PIC'
14533     wl='-Qoption ld '
14534     ;;
14535
14536   uts4*)
14537     dll_cflags='-pic'
14538     ;;
14539
14540   *)
14541     can_build_shared=no
14542     ;;
14543   esac
14544 fi
14545
14546 if test -n "$dll_cflags"; then
14547   echo "$ac_t""${dll_cflags}" 1>&6
14548
14549   # Check to make sure the dll_cflags actually works.
14550   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14551 echo "configure:14552: checking if PIC flag ${dll_cflags} really works" >&5
14552   save_CFLAGS="$CFLAGS"
14553   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14554   cat > conftest.$ac_ext <<EOF
14555 #line 14556 "configure"
14556 #include "confdefs.h"
14557
14558 int main() {
14559 int x=0;
14560 ; return 0; }
14561 EOF
14562 if { (eval echo configure:14563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14563   rm -rf conftest*
14564   
14565     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14566     # reports no error.  So, we need to grep stderr for (Bundled).
14567     if grep '(Bundled)' config.log >/dev/null; then
14568       echo "$ac_t""no" 1>&6
14569       can_build_shared=no
14570       dll_cflags=
14571     else
14572       echo "$ac_t""yes" 1>&6
14573     fi
14574 else
14575   echo "configure: failed program was:" >&5
14576   cat conftest.$ac_ext >&5
14577   rm -rf conftest*
14578   echo "$ac_t""no" 1>&6
14579     can_build_shared=no
14580     dll_cflags=
14581 fi
14582 rm -f conftest*
14583   CFLAGS="$save_CFLAGS"
14584 else
14585   echo "$ac_t""none" 1>&6
14586 fi
14587
14588 if test "$can_build_shared" = "yes"; then
14589 cc_produces_so=no
14590 xldf=
14591 xcldf=
14592 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14593 echo "configure:14594: checking if C compiler can produce shared libraries" >&5
14594 if test "$XEGCC" = yes; then
14595   xcldf="-shared"
14596   xldf="-shared"
14597 else # Not using GCC
14598   case "$xehost_os" in
14599     aix[3-9]*)
14600       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14601       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14602       ;;
14603
14604     freebsd2* | netbsd* | openbsd*)
14605       xldf="-Bshareable"
14606       xcldf="${wl}-Bshareable"
14607       ;;
14608
14609     freebsd3*)
14610       xcldf="-shared"
14611       ;;
14612
14613     hpux*)
14614       xldf="-b +s"
14615       xcldf="${wl}-b ${wl}+s"
14616       ;;
14617
14618     irix[5-9]* | osf[3-9]*)
14619       xcldf="${wl}-shared"
14620       xldf="-shared"
14621       ;;
14622
14623     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14624       xcldf="-G"
14625       xldf="-G"
14626       ;;
14627
14628     sunos4*)
14629       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14630       xldf="-assert pure-text -Bstatic"
14631       ;;
14632   esac
14633 fi # End if if we are using gcc
14634
14635 if test -n "$xcldf"; then
14636   save_LDFLAGS=$LDFLAGS
14637   save_LIBS=$LIBS
14638   save_xe_libs=$xe_libs
14639   LDFLAGS="$xcldf $LDFLAGS"
14640   LIBS=
14641   xe_libs=
14642   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14643   cat > conftest.$ac_ext <<EOF
14644 #line 14645 "configure"
14645 #include "confdefs.h"
14646
14647 int main() {
14648 int x=0;
14649 ; return 0; }
14650 EOF
14651 if { (eval echo configure:14652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14652   rm -rf conftest*
14653   cc_produces_so=yes
14654 else
14655   echo "configure: failed program was:" >&5
14656   cat conftest.$ac_ext >&5
14657   rm -rf conftest*
14658   cc_produces_so=no
14659 fi
14660 rm -f conftest*
14661   LDFLAGS=$save_LDFLAGS
14662   LIBS=$save_LIBS
14663   xe_libs=$save_xe_libs
14664   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14665 else
14666   cc_produces_so=no
14667 fi
14668 echo "$ac_t""${cc_produces_so}" 1>&6
14669
14670 LTLD=$LD
14671 if test -z "$LTLD"; then
14672   ac_prog=ld
14673   if test "$XEGCC" = yes; then
14674     # Check if gcc -print-prog-name=ld gives a path.
14675     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14676 echo "configure:14677: checking for ld used by GCC" >&5
14677     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14678     case "$ac_prog" in
14679     # Accept absolute paths.
14680     /*)
14681       if test -z "$LTLD"; then
14682         case "$ac_prog" in
14683           *gcc-lib*) LTLD="$CC"
14684                      ;;
14685           *)         LTLD="$ac_prog"
14686                      ;;
14687         esac
14688       fi
14689       ;;
14690     "")
14691       # If it fails, then pretend we aren't using GCC.
14692       ac_prog=ld
14693       ;;
14694     *)
14695       # If it is relative, then search for the first ld in PATH.
14696       with_gnu_ld=unknown
14697       ;;
14698     esac
14699   else
14700     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14701 echo "configure:14702: checking for GNU ld" >&5
14702   fi
14703
14704   if test -z "$LTLD"; then
14705     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14706     for ac_dir in $PATH; do
14707       test -z "$ac_dir" && ac_dir=.
14708       if test -f "$ac_dir/$ac_prog"; then
14709         LTLD="$ac_dir/$ac_prog"
14710         # Check to see if the program is GNU ld.  I'd rather use --version,
14711         # but apparently some GNU ld's only accept -v.
14712         # Break only if it was the GNU/non-GNU ld that we prefer.
14713         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14714           xe_gnu_ld=yes
14715         else
14716           xe_gnu_ld=no
14717         fi
14718       fi
14719     done
14720     IFS="$ac_save_ifs"
14721   fi
14722
14723   if test -n "$LTLD"; then
14724     echo "$ac_t""${LTLD}" 1>&6
14725   else
14726     echo "$ac_t""no" 1>&6
14727   fi
14728
14729   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14730     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14731     exit 1
14732   fi
14733 fi
14734
14735 ld_dynamic_link_flags=
14736
14737 # Check to see if it really is or isn't GNU ld.
14738 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14739 echo "configure:14740: checking if the linker is GNU ld" >&5
14740 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14741 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14742   xe_gnu_ld=yes
14743 else
14744   xe_gnu_ld=no
14745 fi
14746 echo "$ac_t""${xe_gnu_ld}" 1>&6
14747
14748 case "$xehost_os" in
14749   amigaos* | sunos4*)
14750     # On these operating systems, we should treat GNU ld like the system ld.
14751     gnu_ld_acts_native=yes
14752     ;;
14753   *)
14754     gnu_ld_acts_native=no
14755     ;;
14756 esac
14757
14758 if test "$cc_produces_so" = "yes"; then
14759   dll_ld=$CC
14760   dll_ldflags=$xcldf
14761   can_build_shared=yes
14762   ld_shlibs=yes
14763 else
14764   # OK - only NOW do we futz about with ld.
14765   # See if the linker supports building shared libraries.
14766   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14767 echo "configure:14768: checking whether the linker supports shared libraries" >&5
14768   dll_ld=$CC
14769   dll_ldflags=$LDFLAGS
14770   ld_shlibs=yes
14771   can_build_shared=yes
14772   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14773     # See if GNU ld supports shared libraries.
14774     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14775       dll_ld=$CC
14776       dll_ldflags="-shared"
14777       ld_shlibs=yes
14778     else
14779       ld_shlibs=no
14780     fi
14781   else
14782     # PORTME fill in a description of your system's linker (not GNU ld)
14783     case "$xehost_os" in
14784     aix3*)
14785       dll_ld=$LTLD
14786       dll_ldflags=$xldf
14787       ;;
14788
14789     aix[4-9]*)
14790       dll_ldflags=$xcldf
14791       ;;
14792
14793     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14794     # support.  Future versions do this automatically, but an explicit c++rt0.o
14795     # doesn't break anything, and helps significantly (at the cost of a little
14796     # extra space).
14797     freebsd2.2*)
14798       dll_ld=$LTLD
14799       dll_ldflags=$xldf
14800       dll_post="/usr/lib/c++rt0.o"
14801       ;;
14802
14803     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14804     freebsd2*)
14805       dll_ld=$LTLD
14806       dll_ldflags="-Bshareable"
14807       ;;
14808
14809     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14810     freebsd3*)
14811       dll_ldflags="-shared"
14812       ;;
14813
14814     hpux*)
14815       dll_ld=$LTLD
14816       dll_ldflags=$xldf
14817       ;;
14818
14819     irix[5-9]*)
14820       dll_ld=$LTLD
14821       dll_ldflags=$xldf
14822       ;;
14823
14824     netbsd*)
14825       # Tested with NetBSD 1.2 ld
14826       dll_ld=$LTLD
14827       dll_ldflags=$xldf
14828       ;;
14829
14830     openbsd*)
14831       dll_ld=$LTLD
14832       dll_ldflags=$xldf
14833       ;;
14834
14835     osf3* | osf4*)
14836       dll_ld=$LTLD
14837       dll_ldflags=$xldf
14838       ;;
14839
14840     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14841     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14842       dll_ld=$LTLD
14843       case "$dll_ld" in
14844         *gcc*) dll_ldflags="-shared"
14845                dll_ld=$CC
14846                ;;
14847         *)     dll_ldflags="-G"
14848                ;;
14849       esac
14850       ;;
14851
14852     sunos4*)
14853       if test "$XEGCC" = yes; then
14854         dll_ld=$CC
14855       else
14856         dll_ld=$LTLD
14857       fi
14858       dll_ldflags=$xldf
14859       ;;
14860
14861     uts4*)
14862       dll_ld=$LTLD
14863       dll_ldflags="-G"
14864       ;;
14865
14866     bsdi*)
14867       dll_ldflags="-r"
14868       dll_ld="shlicc2"
14869       ;;
14870
14871     *)
14872       ld_shlibs=no
14873       can_build_shared=no
14874       ;;
14875     esac
14876   fi
14877   echo "$ac_t""${ld_shlibs}" 1>&6
14878   if test "$ld_shlibs" = "no"; then
14879     can_build_shared=no
14880   fi
14881 fi # End of if cc_produces_so = no
14882
14883
14884 if test "$xe_gnu_ld" = yes; then
14885   if test "$ld_shlibs" = yes; then
14886     ld_dynamic_link_flags="${wl}-export-dynamic"
14887   fi
14888 fi
14889
14890 if test -z "$ld_dynamic_link_flags"; then
14891   case "$xehost_os" in
14892   aix[3-9]*)
14893     ld_dynamic_link_flags=
14894     ;;
14895
14896   freebsd2.2*)
14897     ld_dynamic_link_flags=
14898     ;;
14899
14900   freebsd2*)
14901     ld_dynamic_link_flags=
14902     ;;
14903
14904   freebsd3*)
14905     ld_dynamic_link_flags=
14906     ;;
14907
14908   hpux*)
14909     ld_dynamic_link_flags="${wl}-E"
14910     ;;
14911
14912   irix[5-9]*)
14913     ld_dynamic_link_flags=
14914     ;;
14915
14916   netbsd*)
14917     ld_dynamic_link_flags=
14918     ;;
14919
14920   openbsd*)
14921     ld_dynamic_link_flags=
14922     ;;
14923
14924   osf3* | osf4*)
14925     ld_dynamic_link_flags=
14926     ;;
14927
14928   solaris2* | solaris7*)
14929     ld_dynamic_link_flags=
14930     ;;
14931
14932   sco3.2v5* | unixware* | sysv5* | sysv4*)
14933     ld_dynamic_link_flags="${wl}-Bexport"
14934     ;;
14935
14936   sunos4*)
14937     ld_dynamic_link_flags=
14938     ;;
14939
14940   uts4*)
14941     ld_dynamic_link_flags=
14942     ;;
14943
14944   bsdi*)
14945     ld_dynamic_link_flags=
14946     ;;
14947
14948   esac
14949 fi # End of if -z ld_dynamic_link_flags
14950 fi # End of if test "$can_build_shared" = "yes"
14951
14952
14953
14954
14955
14956
14957
14958
14959   fi
14960
14961   if test "$can_build_shared" = "yes"; then
14962     { test "$extra_verbose" = "yes" && cat << \EOF
14963     Defining HAVE_SHLIB
14964 EOF
14965 cat >> confdefs.h <<\EOF
14966 #define HAVE_SHLIB 1
14967 EOF
14968 }
14969
14970     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14971    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14972  fi
14973     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14974     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14975     for ac_func in dlerror _dlerror
14976 do
14977 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14978 echo "configure:14979: checking for $ac_func" >&5
14979
14980 cat > conftest.$ac_ext <<EOF
14981 #line 14982 "configure"
14982 #include "confdefs.h"
14983 /* System header to define __stub macros and hopefully few prototypes,
14984     which can conflict with char $ac_func(); below.  */
14985 #include <assert.h>
14986 /* Override any gcc2 internal prototype to avoid an error.  */
14987 /* We use char because int might match the return type of a gcc2
14988     builtin and then its argument prototype would still apply.  */
14989 char $ac_func();
14990
14991 int main() {
14992
14993 /* The GNU C library defines this for functions which it implements
14994     to always fail with ENOSYS.  Some functions are actually named
14995     something starting with __ and the normal name is an alias.  */
14996 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14997 choke me
14998 #else
14999 $ac_func();
15000 #endif
15001
15002 ; return 0; }
15003 EOF
15004 if { (eval echo configure:15005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15005   rm -rf conftest*
15006   eval "ac_cv_func_$ac_func=yes"
15007 else
15008   echo "configure: failed program was:" >&5
15009   cat conftest.$ac_ext >&5
15010   rm -rf conftest*
15011   eval "ac_cv_func_$ac_func=no"
15012 fi
15013 rm -f conftest*
15014
15015 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15016   echo "$ac_t""yes" 1>&6
15017     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15018   { test "$extra_verbose" = "yes" && cat << EOF
15019     Defining $ac_tr_func
15020 EOF
15021 cat >> confdefs.h <<EOF
15022 #define $ac_tr_func 1
15023 EOF
15024 }
15025  
15026 else
15027   echo "$ac_t""no" 1>&6
15028 fi
15029 done
15030
15031     with_modules=yes
15032   else
15033     if test "$with_modules" = "yes"; then
15034       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
15035     else
15036       echo "configure: warning: "Module support cannot be provided."" 1>&2
15037     fi
15038     with_modules=no
15039   fi
15040 fi
15041
15042 cat > conftest.$ac_ext <<EOF
15043 #line 15044 "configure"
15044 #include "confdefs.h"
15045 int main(int c,char *v[]){return 0;}
15046 EOF
15047 if { (eval echo configure:15048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
15048 then
15049   :
15050 else
15051   conftest_rc="$?"
15052   echo "configure: failed program was:" >&5
15053   cat conftest.$ac_ext >&5
15054   rm -fr conftest*
15055   
15056   echo ""
15057   echo "*** PANIC *** The C compiler can no longer build working executables."
15058   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
15059   echo "*** PANIC *** The most likely reason for this problem is that configure"
15060   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
15061   echo "*** PANIC *** found at run time."
15062   echo "*** PANIC ***"
15063   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
15064   echo "*** PANIC *** On other systems, try telling configure where to find the"
15065   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
15066   echo "*** PANIC ***"
15067   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
15068   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
15069   echo "*** PANIC *** on your system.  Don't do that."
15070   exit 1
15071 fi
15072 rm -fr conftest*
15073
15074 if test "$win32_processes" = "yes"; then
15075   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
15076    echo "    xemacs will be linked with \"process-nt.o\""
15077  fi
15078 else
15079   { test "$extra_verbose" = "yes" && cat << \EOF
15080     Defining HAVE_UNIX_PROCESSES
15081 EOF
15082 cat >> confdefs.h <<\EOF
15083 #define HAVE_UNIX_PROCESSES 1
15084 EOF
15085 }
15086
15087   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
15088    echo "    xemacs will be linked with \"process-unix.o\""
15089  fi
15090 fi
15091
15092
15093
15094 T=""
15095 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15096 CFLAGS="$T"
15097
15098
15099 T=""
15100 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15101 extra_objs="$T"
15102
15103
15104 T=""
15105 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
15106 c_switch_general="$T"
15107
15108
15109 T=""
15110 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
15111 c_switch_window_system="$T"
15112
15113
15114 T=""
15115 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15116 c_switch_all="$T"
15117
15118
15119 T=""
15120 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
15121 ld_switch_general="$T"
15122
15123
15124 T=""
15125 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15126 ld_switch_window_system="$T"
15127
15128
15129 T=""
15130 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15131 ld_switch_all="$T"
15132
15133
15134 T=""
15135 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15136 ld_libs_general="$T"
15137
15138
15139 T=""
15140 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
15141 ld_libs_window_system="$T"
15142
15143
15144 T=""
15145 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15146 ld_libs_all="$T"
15147
15148
15149
15150 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
15151 internal_makefile_list="Makefile.in"
15152 SUBDIR_MAKEFILES=''
15153 test -d lock || mkdir lock
15154 for dir in $MAKE_SUBDIR; do
15155   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
15156         test -d "$d" || mkdir "$d"; cd "$d"
15157       done ) ;;
15158    * ) test -d "$dir" || mkdir "$dir" ;;
15159   esac
15160   
15161 T=""
15162 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15163 SUBDIR_MAKEFILES="$T"
15164
15165   
15166 T=""
15167 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15168 internal_makefile_list="$T"
15169
15170 done
15171
15172
15173
15174
15175 for dir in src/s src/m; do
15176   if test ! -d "$dir" ; then
15177     echo Making symbolic link to "$srcdir/$dir"
15178     ${LN_S} "$srcdir/$dir" "$dir"
15179   fi
15180 done
15181
15182 if test "$extra_verbose" = "yes"; then
15183   echo ""
15184   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
15185   echo ""
15186 fi
15187
15188
15189 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
15190   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
15191   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
15192 fi
15193
15194 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
15195   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
15196   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
15197 fi
15198
15199 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
15200   test "$extra_verbose" = "yes" && echo "creating TAGS"
15201   echo "\f
15202 $srcdir/TAGS,include" > "TAGS"
15203 fi
15204
15205 if test "$__SUNPRO_C" = "yes"; then
15206   test "$extra_verbose" = "yes" && echo "creating .sbinit"
15207   ( echo "# For use with Sun WorkShop's Source browser."
15208     echo "# See sbquery(1) and sbinit(4) for more information"
15209     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
15210   ) > .sbinit
15211 fi
15212
15213 rm -f core
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234 PREFIX=$prefix
15235 while true; do
15236   case "$PREFIX" in
15237     *\$* ) eval "PREFIX=$PREFIX" ;;
15238     *) break ;;
15239   esac
15240 done
15241
15242
15243
15244
15245 EXEC_PREFIX=$exec_prefix
15246 while true; do
15247   case "$EXEC_PREFIX" in
15248     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
15249     *) break ;;
15250   esac
15251 done
15252
15253
15254
15255
15256 INFODIR=$infodir
15257 while true; do
15258   case "$INFODIR" in
15259     *\$* ) eval "INFODIR=$INFODIR" ;;
15260     *) break ;;
15261   esac
15262 done
15263
15264
15265
15266
15267 INFOPATH=$infopath
15268 while true; do
15269   case "$INFOPATH" in
15270     *\$* ) eval "INFOPATH=$INFOPATH" ;;
15271     *) break ;;
15272   esac
15273 done
15274
15275
15276
15277
15278 PACKAGE_PATH=$package_path
15279 while true; do
15280   case "$PACKAGE_PATH" in
15281     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
15282     *) break ;;
15283   esac
15284 done
15285
15286
15287
15288
15289 LISPDIR=$lispdir
15290 while true; do
15291   case "$LISPDIR" in
15292     *\$* ) eval "LISPDIR=$LISPDIR" ;;
15293     *) break ;;
15294   esac
15295 done
15296
15297
15298
15299
15300 MODULEDIR=$moduledir
15301 while true; do
15302   case "$MODULEDIR" in
15303     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
15304     *) break ;;
15305   esac
15306 done
15307
15308
15309
15310
15311 SITELISPDIR=$sitelispdir
15312 while true; do
15313   case "$SITELISPDIR" in
15314     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
15315     *) break ;;
15316   esac
15317 done
15318
15319
15320
15321
15322 SITEMODULEDIR=$sitemoduledir
15323 while true; do
15324   case "$SITEMODULEDIR" in
15325     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
15326     *) break ;;
15327   esac
15328 done
15329
15330
15331
15332
15333 ETCDIR=$etcdir
15334 while true; do
15335   case "$ETCDIR" in
15336     *\$* ) eval "ETCDIR=$ETCDIR" ;;
15337     *) break ;;
15338   esac
15339 done
15340
15341
15342
15343
15344 DOCDIR=$docdir
15345 while true; do
15346   case "$DOCDIR" in
15347     *\$* ) eval "DOCDIR=$DOCDIR" ;;
15348     *) break ;;
15349   esac
15350 done
15351
15352
15353
15354
15355 ARCHLIBDIR=$archlibdir
15356 while true; do
15357   case "$ARCHLIBDIR" in
15358     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
15359     *) break ;;
15360   esac
15361 done
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
15383
15384
15385
15386
15387
15388
15389
15390 : ${XEMACS_CC:=$CC}
15391
15392
15393 if test "$with_prefix" = "yes"; then
15394   { test "$extra_verbose" = "yes" && cat << \EOF
15395     Defining PREFIX_USER_DEFINED
15396 EOF
15397 cat >> confdefs.h <<\EOF
15398 #define PREFIX_USER_DEFINED 1
15399 EOF
15400 }
15401
15402 fi
15403
15404 if test "$with_site_lisp" = "no"; then
15405   { test "$extra_verbose" = "yes" && cat << \EOF
15406     Defining INHIBIT_SITE_LISP
15407 EOF
15408 cat >> confdefs.h <<\EOF
15409 #define INHIBIT_SITE_LISP 1
15410 EOF
15411 }
15412
15413 fi
15414 if test "$with_site_modules" = "no"; then
15415   { test "$extra_verbose" = "yes" && cat << \EOF
15416     Defining INHIBIT_SITE_MODULES
15417 EOF
15418 cat >> confdefs.h <<\EOF
15419 #define INHIBIT_SITE_MODULES 1
15420 EOF
15421 }
15422
15423 fi
15424
15425
15426 T=""
15427 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
15428 ac_configure_args="$T"
15429
15430 { test "$extra_verbose" = "yes" && cat << EOF
15431     Defining EMACS_CONFIGURATION = "$configuration"
15432 EOF
15433 cat >> confdefs.h <<EOF
15434 #define EMACS_CONFIGURATION "$configuration"
15435 EOF
15436 }
15437
15438 { test "$extra_verbose" = "yes" && cat << EOF
15439     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
15440 EOF
15441 cat >> confdefs.h <<EOF
15442 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
15443 EOF
15444 }
15445
15446
15447
15448 null_string=""
15449 { test "$extra_verbose" = "yes" && cat << EOF
15450     Defining LD_SWITCH_X_SITE = $null_string
15451 EOF
15452 cat >> confdefs.h <<EOF
15453 #define LD_SWITCH_X_SITE $null_string
15454 EOF
15455 }
15456
15457 { test "$extra_verbose" = "yes" && cat << EOF
15458     Defining LD_SWITCH_X_SITE_AUX = $null_string
15459 EOF
15460 cat >> confdefs.h <<EOF
15461 #define LD_SWITCH_X_SITE_AUX $null_string
15462 EOF
15463 }
15464
15465 { test "$extra_verbose" = "yes" && cat << EOF
15466     Defining C_SWITCH_X_SITE = $null_string
15467 EOF
15468 cat >> confdefs.h <<EOF
15469 #define C_SWITCH_X_SITE $null_string
15470 EOF
15471 }
15472
15473 { test "$extra_verbose" = "yes" && cat << EOF
15474     Defining LD_SWITCH_SITE = $null_string
15475 EOF
15476 cat >> confdefs.h <<EOF
15477 #define LD_SWITCH_SITE $null_string
15478 EOF
15479 }
15480
15481 { test "$extra_verbose" = "yes" && cat << EOF
15482     Defining C_SWITCH_SITE = $null_string
15483 EOF
15484 cat >> confdefs.h <<EOF
15485 #define C_SWITCH_SITE $null_string
15486 EOF
15487 }
15488
15489
15490
15491 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15492     Defining GNU_MALLOC
15493 EOF
15494 cat >> confdefs.h <<\EOF
15495 #define GNU_MALLOC 1
15496 EOF
15497 }
15498
15499 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15500     Defining USE_SYSTEM_MALLOC
15501 EOF
15502 cat >> confdefs.h <<\EOF
15503 #define USE_SYSTEM_MALLOC 1
15504 EOF
15505 }
15506
15507 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
15508     Defining USE_DEBUG_MALLOC
15509 EOF
15510 cat >> confdefs.h <<\EOF
15511 #define USE_DEBUG_MALLOC 1
15512 EOF
15513 }
15514
15515                                               { test "$extra_verbose" = "yes" && cat << \EOF
15516     Defining USE_SYSTEM_MALLOC
15517 EOF
15518 cat >> confdefs.h <<\EOF
15519 #define USE_SYSTEM_MALLOC 1
15520 EOF
15521 }
15522
15523 fi
15524 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15525     Defining I18N3
15526 EOF
15527 cat >> confdefs.h <<\EOF
15528 #define I18N3 1
15529 EOF
15530 }
15531
15532 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15533     Defining USE_GCC
15534 EOF
15535 cat >> confdefs.h <<\EOF
15536 #define USE_GCC 1
15537 EOF
15538 }
15539
15540 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15541     Defining EXTERNAL_WIDGET
15542 EOF
15543 cat >> confdefs.h <<\EOF
15544 #define EXTERNAL_WIDGET 1
15545 EOF
15546 }
15547
15548 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15549     Defining QUICK_BUILD
15550 EOF
15551 cat >> confdefs.h <<\EOF
15552 #define QUICK_BUILD 1
15553 EOF
15554 }
15555
15556 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15557     Defining PURIFY
15558 EOF
15559 cat >> confdefs.h <<\EOF
15560 #define PURIFY 1
15561 EOF
15562 }
15563
15564 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15565     Defining QUANTIFY
15566 EOF
15567 cat >> confdefs.h <<\EOF
15568 #define QUANTIFY 1
15569 EOF
15570 }
15571
15572 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15573     Defining MAIL_USE_POP
15574 EOF
15575 cat >> confdefs.h <<\EOF
15576 #define MAIL_USE_POP 1
15577 EOF
15578 }
15579
15580 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15581     Defining KERBEROS
15582 EOF
15583 cat >> confdefs.h <<\EOF
15584 #define KERBEROS 1
15585 EOF
15586 }
15587
15588 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15589     Defining HESIOD
15590 EOF
15591 cat >> confdefs.h <<\EOF
15592 #define HESIOD 1
15593 EOF
15594 }
15595
15596 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15597     Defining USE_UNION_TYPE
15598 EOF
15599 cat >> confdefs.h <<\EOF
15600 #define USE_UNION_TYPE 1
15601 EOF
15602 }
15603
15604 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15605     Defining PDUMP
15606 EOF
15607 cat >> confdefs.h <<\EOF
15608 #define PDUMP 1
15609 EOF
15610 }
15611
15612
15613
15614 (
15615 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15616 else
15617   echo "uname -a: `uname -a`"
15618 fi
15619 echo ""
15620 echo "$0 $quoted_arguments"
15621 ) > Installation
15622
15623 if test ! -z ${emacs_beta_version} ; then
15624   if test -z "${emacs_is_beta}" ; then
15625         xemacs_betaname=".${emacs_beta_version}"
15626   else
15627         xemacs_betaname="-b${emacs_beta_version}"
15628   fi
15629 else
15630   xemacs_betaname=""
15631 fi
15632
15633 (
15634 echo "
15635
15636 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15637 "
15638 echo "
15639 Compilation / Installation:"
15640 echo "  Source code location:              $srcdir"
15641 echo "  Installation prefix:               $prefix"
15642 if test -n "$site_includes"; then
15643   echo "  Additional header files:           $site_includes"
15644 fi
15645 if test -n "$site_libraries"; then
15646   echo "  Additional libraries:              $site_libraries"
15647 fi
15648 if test -n "$site_prefixes"; then
15649   echo "  Additional prefixes:               $site_prefixes"
15650 fi
15651 if test -n "$runpath"; then
15652   echo "  Runtime library search path:       $runpath"
15653 fi
15654
15655 if test -n "$opsysfile"
15656 then echo "  Operating system description file: \`$opsysfile'"
15657 else echo "  Not using any operating system description file"
15658 fi
15659 if test -n "$machfile"
15660 then echo "  Machine description file:          \`$machfile'"
15661 else echo "  Not using any machine description file"
15662 fi
15663
15664 echo "  Compiler:                          $CC $CFLAGS"
15665 echo "  Relocating allocator for buffers:  $rel_alloc"
15666 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15667
15668 echo "
15669 Window System:"
15670 if test "$with_msw" = "yes"; then
15671   echo "  Compiling in support for the Microsoft window system."
15672 fi
15673 if test "$with_x11" = "yes"; then
15674   echo "  Compiling in support for the X window system:"
15675   echo "    - X Windows headers location:                 $x_includes"
15676   echo "    - X Windows libraries location:               $x_libraries"
15677   if test "$with_xauth" != yes; then
15678     echo "    - Xau (X authority) not available."
15679   fi
15680   if test "$with_xmu" != yes; then
15681     echo "    - Xmu library not available; substituting equivalent routines."
15682   fi
15683   if test "$with_wmcommand" != no; then
15684     echo "    - Handling WM_COMMAND properly."
15685   fi
15686 fi
15687 if test "$need_athena" = "yes"; then
15688   echo "  Compiling in support for the Athena widget set:"
15689   echo "    - Athena headers location:                    $athena_h_path"
15690   echo "    - Athena library to link:                     $athena_lib"
15691 fi
15692 case "$with_menubars" in
15693   gtk   ) echo "  Using GTK menubars."   ;;
15694   lucid ) echo "  Using Lucid menubars." ;;
15695   motif ) echo "  Using Motif menubars."
15696           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15697           echo "             We recommend using the Lucid menubar instead."
15698           echo "             Re-run configure with --with-menubars='lucid'." ;;
15699     msw ) echo "  Using MS-Windows menubars." ;;
15700 esac
15701 case "$with_scrollbars" in
15702   gtk    ) echo "  Using GTK scrollbars."        ;;
15703   lucid  ) echo "  Using Lucid scrollbars."      ;;
15704   motif  ) echo "  Using Motif scrollbars."      ;;
15705   athena ) echo "  Using Athena scrollbars."     ;;
15706      msw ) echo "  Using MS-Windows scrollbars." ;;
15707 esac
15708 case "$with_dialogs" in
15709   gtk    ) echo "  Using GTK dialog boxes." ;;
15710   motif  ) echo "  Using Motif dialog boxes."
15711            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15712              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15713              echo "             We recommend using the Athena dialog boxes instead."
15714              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15715              echo "             Read the PROBLEMS file for more information."
15716            fi; fi ;;
15717   athena ) echo "  Using Athena dialog boxes."     ;;
15718      msw ) echo "  Using MS-Windows dialog boxes." ;;
15719 esac
15720 case "$with_widgets" in
15721   gtk    ) echo "  Using GTK native widgets."        ;;
15722   motif  ) echo "  Using Motif native widgets."      ;;
15723   athena ) echo "  Using Athena native widgets."     ;;
15724      msw ) echo "  Using MS-Windows native widgets." ;;
15725 esac
15726 if test "$with_dragndrop" = yes; then
15727   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15728   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15729 fi
15730
15731 echo "
15732 TTY:"
15733 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15734 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15735
15736 echo "
15737 Images:"
15738 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15739 if test "$with_xpm" = yes; then
15740   echo "  Compiling in support for XPM  images."
15741 elif test "$with_x11" = yes; then
15742   echo "  WARNING: -----------------------------------------------------------"
15743   echo "  WARNING: Compiling without XPM image support."
15744   if test "$xpm_problem" != ""; then
15745     echo "  Reason: $xpm_problem"
15746   fi
15747   echo "  WARNING: You should strongly consider installing XPM."
15748   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15749   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15750   echo "  WARNING: -----------------------------------------------------------"
15751 fi
15752 if test "$with_png" = yes; then
15753   echo "  Compiling in support for PNG  images."
15754 elif test "$window_system" != "none"; then
15755   echo "  WARNING: -----------------------------------------------------------"
15756   echo "  WARNING: Compiling without PNG image support."
15757   if test "$png_problem" != ""; then
15758     echo "  Reason: $png_problem"
15759   fi
15760   echo "  WARNING: You should strongly consider installing the PNG libraries."
15761   echo "  WARNING: Otherwise certain images and glyphs may not display."
15762   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15763   echo "  WARNING: -----------------------------------------------------------"
15764 fi
15765 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15766 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15767 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15768
15769 echo "
15770 Sound:"
15771 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15772 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15773 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15774 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15775
15776 echo "
15777 Databases:"
15778 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15779 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15780 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15781 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15782 if test "$with_postgresql" = yes; then
15783   echo "  Compiling in support for PostgreSQL."
15784   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15785   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15786 fi
15787
15788 echo "
15789 Internationalization:"
15790 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15791 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15792 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15793 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15794 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15795 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15796 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15797 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15798 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15799 if test "$with_wnn" = yes; then
15800   echo "  Compiling in support for the WNN input method on Mule."
15801   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15802 fi
15803 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15804
15805 echo "
15806 Mail:"
15807 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15808 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15809 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15810 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15811
15812 echo "
15813 Other Features:"
15814 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15815 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15816 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15817 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15818 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15819 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15820 test "$pdump" = yes && echo "  Using the new portable dumper."
15821 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15822 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15823 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15824   != "no no no no no no"; then
15825   echo "  WARNING: ---------------------------------------------------------"
15826   echo "  WARNING: Compiling in support for runtime error checking."
15827   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15828   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15829   echo "  WARNING: ---------------------------------------------------------"
15830 fi
15831 echo ""
15832 ) | tee -a Installation
15833 echo ""
15834
15835
15836 # Remove any trailing slashes in these variables.
15837 test -n "$prefix" &&
15838   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15839 test -n "$exec_prefix" &&
15840   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15841
15842
15843 for file in $internal_makefile_list; do
15844   test "$file" = src/Makefile.in && \
15845     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15846   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15847 done
15848 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15849 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
15850
15851 trap '' 1 2 15
15852
15853 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15854
15855 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15856 # Let make expand exec_prefix.
15857 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15858
15859 # Any assignment to VPATH causes Sun make to only execute
15860 # the first set of double-colon rules, so remove it if not needed.
15861 # If there is a colon in the path, we need to keep it.
15862 if test "x$srcdir" = x.; then
15863   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15864 fi
15865
15866 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15867
15868 DEFS=-DHAVE_CONFIG_H
15869
15870 # Without the "./", some shells look in PATH for config.status.
15871 : ${CONFIG_STATUS=./config.status}
15872
15873 echo creating $CONFIG_STATUS
15874 rm -f $CONFIG_STATUS
15875 cat > $CONFIG_STATUS <<EOF
15876 #! /bin/sh
15877 # Generated automatically by configure.
15878 # Run this file to recreate the current configuration.
15879 # This directory was configured as follows,
15880 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15881 #
15882 # $0 $ac_configure_args
15883 #
15884 # Compiler output produced by configure, useful for debugging
15885 # configure, is in ./config.log if it exists.
15886
15887 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15888 for ac_option
15889 do
15890   case "\$ac_option" in
15891   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15892     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15893     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15894   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15895     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15896     exit 0 ;;
15897   -help | --help | --hel | --he | --h)
15898     echo "\$ac_cs_usage"; exit 0 ;;
15899   *) echo "\$ac_cs_usage"; exit 1 ;;
15900   esac
15901 done
15902
15903 ac_given_srcdir=$srcdir
15904 ac_given_INSTALL="$INSTALL"
15905
15906 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15907 EOF
15908 cat >> $CONFIG_STATUS <<EOF
15909
15910 # Protect against being on the right side of a sed subst in config.status.
15911 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15912  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15913 $ac_vpsub
15914 $extrasub
15915 s%@SHELL@%$SHELL%g
15916 s%@CFLAGS@%$CFLAGS%g
15917 s%@CPPFLAGS@%$CPPFLAGS%g
15918 s%@CXXFLAGS@%$CXXFLAGS%g
15919 s%@FFLAGS@%$FFLAGS%g
15920 s%@DEFS@%$DEFS%g
15921 s%@LDFLAGS@%$LDFLAGS%g
15922 s%@LIBS@%$LIBS%g
15923 s%@exec_prefix@%$exec_prefix%g
15924 s%@prefix@%$prefix%g
15925 s%@program_transform_name@%$program_transform_name%g
15926 s%@bindir@%$bindir%g
15927 s%@sbindir@%$sbindir%g
15928 s%@libexecdir@%$libexecdir%g
15929 s%@datadir@%$datadir%g
15930 s%@sysconfdir@%$sysconfdir%g
15931 s%@sharedstatedir@%$sharedstatedir%g
15932 s%@localstatedir@%$localstatedir%g
15933 s%@libdir@%$libdir%g
15934 s%@includedir@%$includedir%g
15935 s%@oldincludedir@%$oldincludedir%g
15936 s%@infodir@%$infodir%g
15937 s%@mandir@%$mandir%g
15938 s%@LN_S@%$LN_S%g
15939 s%@blddir@%$blddir%g
15940 s%@CC@%$CC%g
15941 s%@CPP@%$CPP%g
15942 s%@start_flags@%$start_flags%g
15943 s%@ld_switch_shared@%$ld_switch_shared%g
15944 s%@start_files@%$start_files%g
15945 s%@ld@%$ld%g
15946 s%@lib_gcc@%$lib_gcc%g
15947 s%@RANLIB@%$RANLIB%g
15948 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15949 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15950 s%@INSTALL_DATA@%$INSTALL_DATA%g
15951 s%@YACC@%$YACC%g
15952 s%@SET_MAKE@%$SET_MAKE%g
15953 s%@GTK_CONFIG@%$GTK_CONFIG%g
15954 s%@X_CFLAGS@%$X_CFLAGS%g
15955 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15956 s%@X_LIBS@%$X_LIBS%g
15957 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15958 s%@install_pp@%$install_pp%g
15959 s%@libs_xauth@%$libs_xauth%g
15960 s%@dnd_objs@%$dnd_objs%g
15961 s%@lwlib_objs@%$lwlib_objs%g
15962 s%@ALLOCA@%$ALLOCA%g
15963 s%@have_esd_config@%$have_esd_config%g
15964 s%@dll_ld@%$dll_ld%g
15965 s%@dll_cflags@%$dll_cflags%g
15966 s%@dll_ldflags@%$dll_ldflags%g
15967 s%@dll_post@%$dll_post%g
15968 s%@dll_ldo@%$dll_ldo%g
15969 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15970 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15971 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15972 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15973 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15974 s%@PROGNAME@%$PROGNAME%g
15975 s%@version@%$version%g
15976 s%@configuration@%$configuration%g
15977 s%@canonical@%$canonical%g
15978 s%@inststaticdir@%$inststaticdir%g
15979 s%@instvardir@%$instvardir%g
15980 s%@srcdir@%$srcdir%g
15981 s%@pkgdir@%$pkgdir%g
15982 s%@statedir@%$statedir%g
15983 s%@extra_includes@%$extra_includes%g
15984 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15985 s%@PREFIX@%$PREFIX%g
15986 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15987 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15988 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15989 s%@INFODIR@%$INFODIR%g
15990 s%@infopath@%$infopath%g
15991 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15992 s%@INFOPATH@%$INFOPATH%g
15993 s%@package_path@%$package_path%g
15994 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15995 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15996 s%@lispdir@%$lispdir%g
15997 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15998 s%@LISPDIR@%$LISPDIR%g
15999 s%@moduledir@%$moduledir%g
16000 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
16001 s%@MODULEDIR@%$MODULEDIR%g
16002 s%@sitelispdir@%$sitelispdir%g
16003 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
16004 s%@SITELISPDIR@%$SITELISPDIR%g
16005 s%@sitemoduledir@%$sitemoduledir%g
16006 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
16007 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
16008 s%@etcdir@%$etcdir%g
16009 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
16010 s%@ETCDIR@%$ETCDIR%g
16011 s%@docdir@%$docdir%g
16012 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
16013 s%@DOCDIR@%$DOCDIR%g
16014 s%@archlibdir@%$archlibdir%g
16015 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
16016 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
16017 s%@bitmapdir@%$bitmapdir%g
16018 s%@extra_objs@%$extra_objs%g
16019 s%@machfile@%$machfile%g
16020 s%@opsysfile@%$opsysfile%g
16021 s%@c_switch_general@%$c_switch_general%g
16022 s%@c_switch_window_system@%$c_switch_window_system%g
16023 s%@c_switch_all@%$c_switch_all%g
16024 s%@ld_switch_general@%$ld_switch_general%g
16025 s%@ld_switch_window_system@%$ld_switch_window_system%g
16026 s%@ld_switch_all@%$ld_switch_all%g
16027 s%@ld_libs_general@%$ld_libs_general%g
16028 s%@ld_libs_window_system@%$ld_libs_window_system%g
16029 s%@ld_libs_all@%$ld_libs_all%g
16030 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
16031 s%@native_sound_lib@%$native_sound_lib%g
16032 s%@sound_cflags@%$sound_cflags%g
16033 s%@dynodump_arch@%$dynodump_arch%g
16034 s%@XEMACS_CC@%$XEMACS_CC%g
16035 s%@internal_makefile_list@%$internal_makefile_list%g
16036
16037 CEOF
16038 EOF
16039
16040 cat >> $CONFIG_STATUS <<\EOF
16041
16042 # Split the substitutions into bite-sized pieces for seds with
16043 # small command number limits, like on Digital OSF/1 and HP-UX.
16044 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
16045 ac_file=1 # Number of current file.
16046 ac_beg=1 # First line for current file.
16047 ac_end=$ac_max_sed_cmds # Line after last line for current file.
16048 ac_more_lines=:
16049 ac_sed_cmds=""
16050 while $ac_more_lines; do
16051   if test $ac_beg -gt 1; then
16052     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
16053   else
16054     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
16055   fi
16056   if test ! -s conftest.s$ac_file; then
16057     ac_more_lines=false
16058     rm -f conftest.s$ac_file
16059   else
16060     if test -z "$ac_sed_cmds"; then
16061       ac_sed_cmds="sed -f conftest.s$ac_file"
16062     else
16063       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
16064     fi
16065     ac_file=`expr $ac_file + 1`
16066     ac_beg=$ac_end
16067     ac_end=`expr $ac_end + $ac_max_sed_cmds`
16068   fi
16069 done
16070 if test -z "$ac_sed_cmds"; then
16071   ac_sed_cmds=cat
16072 fi
16073 EOF
16074
16075 cat >> $CONFIG_STATUS <<EOF
16076
16077 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
16078 EOF
16079 cat >> $CONFIG_STATUS <<\EOF
16080 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
16081   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16082   case "$ac_file" in
16083   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16084        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16085   *) ac_file_in="${ac_file}.in" ;;
16086   esac
16087
16088   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
16089
16090   # Remove last slash and all that follows it.  Not all systems have dirname.
16091   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16092   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16093     # The file is in a subdirectory.
16094     test ! -d "$ac_dir" && mkdir "$ac_dir"
16095     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
16096     # A "../" for each directory in $ac_dir_suffix.
16097     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
16098   else
16099     ac_dir_suffix= ac_dots=
16100   fi
16101
16102   case "$ac_given_srcdir" in
16103   .)  srcdir=.
16104       if test -z "$ac_dots"; then top_srcdir=.
16105       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
16106   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
16107   *) # Relative path.
16108     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
16109     top_srcdir="$ac_dots$ac_given_srcdir" ;;
16110   esac
16111
16112   case "$ac_given_INSTALL" in
16113   [/$]*) INSTALL="$ac_given_INSTALL" ;;
16114   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
16115   esac
16116
16117   echo creating "$ac_file"
16118   rm -f "$ac_file"
16119   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
16120   case "$ac_file" in
16121   *Makefile*) ac_comsub="1i\\
16122 # $configure_input" ;;
16123   *) ac_comsub= ;;
16124   esac
16125
16126   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16127   sed -e "$ac_comsub
16128 s%@configure_input@%$configure_input%g
16129 s%@srcdir@%$srcdir%g
16130 s%@top_srcdir@%$top_srcdir%g
16131 s%@INSTALL@%$INSTALL%g
16132 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
16133 fi; done
16134 rm -f conftest.s*
16135
16136 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16137 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16138 #
16139 # ac_d sets the value in "#define NAME VALUE" lines.
16140 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
16141 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
16142 ac_dC='\3'
16143 ac_dD='%g'
16144 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16145 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16146 ac_uB='\([      ]\)%\1#\2define\3'
16147 ac_uC=' '
16148 ac_uD='\4%g'
16149 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16150 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
16151 ac_eB='$%\1#\2define\3'
16152 ac_eC=' '
16153 ac_eD='%g'
16154
16155 if test "${CONFIG_HEADERS+set}" != set; then
16156 EOF
16157 cat >> $CONFIG_STATUS <<EOF
16158   CONFIG_HEADERS="src/config.h lwlib/config.h"
16159 EOF
16160 cat >> $CONFIG_STATUS <<\EOF
16161 fi
16162 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
16163   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16164   case "$ac_file" in
16165   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
16166        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
16167   *) ac_file_in="${ac_file}.in" ;;
16168   esac
16169
16170   echo creating $ac_file
16171
16172   rm -f conftest.frag conftest.in conftest.out
16173   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
16174   cat $ac_file_inputs > conftest.in
16175
16176 EOF
16177
16178 # Transform confdefs.h into a sed script conftest.vals that substitutes
16179 # the proper values into config.h.in to produce config.h.  And first:
16180 # Protect against being on the right side of a sed subst in config.status.
16181 # Protect against being in an unquoted here document in config.status.
16182 rm -f conftest.vals
16183 cat > conftest.hdr <<\EOF
16184 s/[\\&%]/\\&/g
16185 s%[\\$`]%\\&%g
16186 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
16187 s%ac_d%ac_u%gp
16188 s%ac_u%ac_e%gp
16189 EOF
16190 sed -n -f conftest.hdr confdefs.h > conftest.vals
16191 rm -f conftest.hdr
16192
16193 # This sed command replaces #undef with comments.  This is necessary, for
16194 # example, in the case of _POSIX_SOURCE, which is predefined and required
16195 # on some systems where configure will not decide to define it.
16196 cat >> conftest.vals <<\EOF
16197 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
16198 EOF
16199
16200 # Break up conftest.vals because some shells have a limit on
16201 # the size of here documents, and old seds have small limits too.
16202
16203 rm -f conftest.tail
16204 while :
16205 do
16206   ac_lines=`grep -c . conftest.vals`
16207   # grep -c gives empty output for an empty file on some AIX systems.
16208   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
16209   # Write a limited-size here document to conftest.frag.
16210   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
16211   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
16212   echo 'CEOF
16213   sed -f conftest.frag conftest.in > conftest.out
16214   rm -f conftest.in
16215   mv conftest.out conftest.in
16216 ' >> $CONFIG_STATUS
16217   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16218   rm -f conftest.vals
16219   mv conftest.tail conftest.vals
16220 done
16221 rm -f conftest.vals
16222
16223 cat >> $CONFIG_STATUS <<\EOF
16224   rm -f conftest.frag conftest.h
16225   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
16226   cat conftest.in >> conftest.h
16227   rm -f conftest.in
16228   if cmp -s $ac_file conftest.h 2>/dev/null; then
16229     echo "$ac_file is unchanged"
16230     rm -f conftest.h
16231   else
16232     # Remove last slash and all that follows it.  Not all systems have dirname.
16233       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
16234       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16235       # The file is in a subdirectory.
16236       test ! -d "$ac_dir" && mkdir "$ac_dir"
16237     fi
16238     rm -f $ac_file
16239     mv conftest.h $ac_file
16240   fi
16241 fi; done
16242
16243 EOF
16244 cat >> $CONFIG_STATUS <<EOF
16245 CPP="$CPP"
16246  top_srcdir="$srcdir"
16247  MAKE_SUBDIR="$MAKE_SUBDIR"
16248
16249 EOF
16250 cat >> $CONFIG_STATUS <<\EOF
16251 for dir in . $MAKE_SUBDIR; do
16252   (
16253     cd $dir
16254     rm -f junk.c
16255     < Makefile.in \
16256       sed -e '/^# Generated/d' \
16257           -e 's%/\*\*/#.*%%' \
16258           -e 's/^ *# */#/' \
16259           -e '/^##/d' \
16260           -e '/^#/ {
16261 p
16262 d
16263 }'        \
16264           -e '/./ {
16265 s/\([\"]\)/\\\1/g
16266 s/^/"/
16267 s/$/"/
16268 }'  > junk.c;
16269
16270
16271
16272     echo creating $dir/Makefile
16273 $CPP -I. -I${top_srcdir}/src  junk.c \
16274   | sed -e 's/^\#.*//'          \
16275         -e 's/^[        ][      ]*$//'\
16276         -e 's/^ /       /'              \
16277         -e '/^[ \f]*$/d' \
16278         -e '/^\"/ {
16279         s/\\\([\"]\)/\1/g
16280         s/^[    ]*\"//
16281         s/\"[   ]*$//
16282 }' > Makefile.new
16283     chmod 444 Makefile.new
16284     mv -f Makefile.new Makefile
16285
16286     echo creating $dir/GNUmakefile
16287 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
16288   | sed -e 's/^\#.*//'          \
16289         -e 's/^[        ][      ]*$//'\
16290         -e 's/^ /       /'              \
16291         -e '/^[ \f]*$/d' \
16292         -e '/^\"/ {
16293         s/\\\([\"]\)/\1/g
16294         s/^[    ]*\"//
16295         s/\"[   ]*$//
16296 }' > Makefile.new
16297     chmod 444 Makefile.new
16298     mv -f Makefile.new GNUmakefile
16299
16300     rm -f junk.c
16301   )
16302 done
16303
16304 sed < config.status >> lib-src/config.values \
16305   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
16306   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
16307   -e 's/^\([^ ]*\) $/\1 ""/' \
16308   -e 's/ 1$/ t/'
16309
16310
16311 exit 0
16312 EOF
16313 chmod +x $CONFIG_STATUS
16314 rm -fr confdefs* $ac_clean_files
16315 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1