a7fb810b7087c52cf320afdc4e866e5fdcff207e
[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 $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_prefix='yes'
234 with_site_lisp='no'
235 with_site_modules='yes'
236 with_menubars=''
237 with_scrollbars=''
238 with_widgets=''
239 with_dialogs=''
240 with_file_coding=''
241 cpp='' cppflags='' libs='' ldflags=''
242 extra_includes=''
243 dynamic=''
244 with_x11=''
245 with_msw=''
246 rel_alloc='default'
247 with_system_malloc='default'
248 with_dlmalloc='default'
249 native_sound_lib=''
250 use_assertions="yes"
251 with_toolbars=""
252 with_tty=""
253 use_union_type="no"
254 with_dnet=""
255 pdump="no"
256 with_dragndrop="no"
257
258
259
260
261 arguments="$@"
262
263 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
264 quoted_arguments=
265 for i in "$@"; do
266    case "$i" in
267    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
268    | --no-cr | --no-c) ;;
269    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
270    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
271    *)
272    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
273    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
274    esac
275 done
276
277 while test $# != 0; do
278   arg="$1"; shift
279   case "$arg" in
280     --no-create|--no-recursion) ;;
281         -* )
282             case "$arg" in
283         -*=*)
284           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
285           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
286           valomitted=no
287         ;;
288                                                                           -*)
289                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
290           val="yes" valomitted=yes
291         ;;
292       esac
293
294             optname="$opt"
295       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
296
297             case "${valomitted}-${opt}" in yes-without_* )
298         opt=`echo $opt | sed 's/without/with/'`
299         valomitted="no" val="no" ;;
300       esac
301
302             case "$opt" in
303
304         with_site_lisp  | \
305         with_prefix     | \
306         with_site_modules | \
307         with_x          | \
308         with_x11        | \
309         with_msw        | \
310         with_gcc        | \
311         dynamic         | \
312         with_ncurses    | \
313         with_dnet       | \
314         with_socks      | \
315         with_dragndrop  | \
316         with_cde        | \
317         with_offix      | \
318         with_gpm        | \
319         with_xpm        | \
320         with_xface      | \
321         with_gif        | \
322         with_jpeg       | \
323         with_png        | \
324         with_tiff       | \
325         with_wmcommand  | \
326         with_xmu        | \
327         with_purify     | \
328         with_quantify   | \
329         with_toolbars   | \
330         with_tty        | \
331         with_xfs        | \
332         with_i18n3      | \
333         with_mule       | \
334         with_utf_2000   | \
335         with_text_coding| \
336         with_file_coding| \
337         with_canna      | \
338         with_wnn        | \
339         with_wnn6       | \
340         with_workshop   | \
341         with_sparcworks | \
342         with_tooltalk   | \
343         with_ldap       | \
344         with_postgresql | \
345         with_pop        | \
346         with_kerberos   | \
347         with_hesiod     | \
348         with_dnet       | \
349         with_infodock   | \
350         external_widget | \
351         verbose         | \
352         extra_verbose   | \
353         usage_tracking  | \
354         use_union_type  | \
355         pdump           | \
356         debug           | \
357         use_assertions  | \
358         memory_usage_stats | \
359         with_clash_detection | \
360         with_modules | \
361         quick_build )
362                   case "$val" in
363             y | ye | yes )      val=yes ;;
364             n | no )            val=no  ;;
365             * ) (echo "$progname: Usage error:"
366 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
367 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
368           esac
369           eval "$opt=\"$val\"" ;;
370
371
372                         srcdir          | \
373         compiler        | \
374         cflags          | \
375         cpp             | \
376         cppflags        | \
377         libs            | \
378         ldflags         | \
379         cache_file      | \
380         native_sound_lib| \
381         site_lisp       | \
382         x_includes      | \
383         x_libraries     | \
384         site_includes   | \
385         site_libraries  | \
386         site_prefixes   | \
387         site_runtime_libraries )
388                   if test "$valomitted" = "yes" ; then
389                     if test "$#" = 0 ; then
390               (echo "$progname: Usage error:"
391 echo " " "The \`--$optname' option requires a value."
392 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
393             fi
394             val="$1"; shift
395           fi
396           eval "$opt=\"$val\""
397         ;;
398
399                 rel_alloc | \
400         with_dlmalloc | \
401         with_debug_malloc  | use_debug_malloc | \
402         with_system_malloc | use_system_malloc )
403           case "$val" in
404             y | ye | yes )      val=yes ;;
405             n | no )            val=no  ;;
406             d | de | def | defa | defau | defaul | default ) val=default ;;
407             * ) (echo "$progname: Usage error:"
408 echo " " "The \`--$optname' option requires one of these values:
409   \`yes', \`no', or \`default'."
410 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
411           esac
412           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
413           eval "$opt=\"$val\""
414         ;;
415
416                 "with_database" )
417           with_database_berkdb=no
418           with_database_dbm=no
419           with_database_gdbm=no
420           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
421             case "$x" in
422               no ) ;;
423               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
424               d | db | dbm )                               with_database_dbm=yes    ;;
425               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
426               * ) (echo "$progname: Usage error:"
427 echo " " "The \`--$optname' option value
428   must be either \`no' or a comma-separated list
429   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
430 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
431             esac
432           done
433           if test "$with_database_dbm"  = "yes" -a \
434                   "$with_database_gdbm" = "yes"; then
435           (echo "$progname: Usage error:"
436 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
437   with the \`--$optname' option."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
439           fi
440         ;;
441
442                 "with_sound" )
443                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
444             case "$x" in
445                       n | no | non | none ) new_sdefault=no ;;
446               a | al | all | both ) new_sdefault=yes ;;
447
448               native )       with_native_sound=yes ;;
449               nonative )     with_native_sound=no ;;
450
451               nas )          with_nas_sound=yes ;;
452               nonas )        with_nas_sound=no ;;
453
454               esd )          with_esd_sound=yes ;;
455               noesd )        with_esd_sound=no ;;
456
457               * ) bogus_sound=yes ;;
458             esac
459             if test "$bogus_sound" -o \
460                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
461                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
462                 (echo "$progname: Usage error:"
463 echo " " "Valid types for the \`--$optname' option are:
464   $types.
465 The default is to autodetect all sound support."
466 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
467             elif test -n "$new_sdefault" ; then
468                 with_native_sound=$new_sdefault
469                 with_nas_sound=$new_sdefault
470                 with_esd_sound=$new_sdefault
471                 new_sdefault=   # reset this
472             fi
473             sound_notfirst=true
474           done
475         ;;
476
477                         "with_athena" )
478           case "$val" in
479             xa | xaw )                    val=xaw    ;;
480             3 | 3d | xaw3d )              val=3d     ;;
481                         ne | nex | next | naxtaw)     val=next   ;;
482                         9 | 95 | xaw95 )              val=95     ;;
483             xp | xpm | xawxpm )           val=xpm    ;;
484             * ) (echo "$progname: Usage error:"
485 echo " " "The \`--$optname' option must have one of these values:
486   \`xaw', \`3d', \`next', \`95', or \`xpm'."
487 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
488           esac
489           eval "$opt=\"$val\""
490         ;;
491
492                 "with_xim" )
493           case "$val" in
494             y | ye | yes )                val=yes   ;;
495             n | no | non | none )         val=no    ;;
496             x | xl | xli | xlib )         val=xlib  ;;
497             m | mo | mot | moti | motif ) val=motif ;;
498             * ) (echo "$progname: Usage error:"
499 echo " " "The \`--$optname' option must have one of these values:
500   \`motif', \`xlib', \`yes', or \`no'."
501 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
502           esac
503           eval "$opt=\"$val\""
504         ;;
505
506                 "mail_locking" )
507           case "$val" in
508             lockf )     val=lockf ;;
509             flock )     val=flock ;;
510             file | dot ) val=file  ;;
511             locking )   val=locking  ;;
512             * ) (echo "$progname: Usage error:"
513 echo " " "The \`--$optname' option must have one of these values:
514   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
515 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
516           esac
517           eval "$opt=\"$val\""
518         ;;
519
520                 "error_checking" )
521                           
522           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
523             case "$x" in
524                       n | no | non | none ) new_default=no ;;
525               a | al | all )        new_default=yes ;;
526
527               extents )       error_check_extents=yes ;;
528               noextents )     error_check_extents=no ;;
529
530               typecheck )     error_check_typecheck=yes ;;
531               notypecheck )   error_check_typecheck=no ;;
532
533               bufpos )        error_check_bufpos=yes ;;
534               nobufpos )      error_check_bufpos=no ;;
535
536               gc )            error_check_gc=yes ;;
537               nogc )          error_check_gc=no ;;
538
539               malloc )        error_check_malloc=yes ;;
540               nomalloc )      error_check_malloc=no ;;
541
542               byte_code )     error_check_byte_code=yes ;;
543               nobyte_code )   error_check_byte_code=no ;;
544
545               glyphs )     error_check_glyphs=yes ;;
546               noglyphs )   error_check_glyphs=no ;;
547
548               * ) bogus_error_check=yes ;;
549             esac
550             if test "$bogus_error_check" -o \
551                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
552                 if test "$error_check_default" = yes ; then
553                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
554                 else
555                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
556                 fi
557                 (echo "$progname: Usage error:"
558 echo " " "Valid types for the \`--$optname' option are:
559   $types."
560 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
561             elif test -n "$new_default" ; then
562                 error_check_extents=$new_default
563                 error_check_typecheck=$new_default
564                 error_check_bufpos=$new_default
565                 error_check_gc=$new_default
566                 error_check_malloc=$new_default
567                 error_check_byte_code=$new_default
568                 error_check_glyphs=$new_default
569                 new_default=    # reset this
570             fi
571             echeck_notfirst=true
572           done
573         ;;
574
575                                 
576                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
577         mandir | infodir | infopath | lispdir | etcdir | pkgdir | \
578         archlibdir | docdir | package_path )
579                    if test "$valomitted" = "yes"; then
580              if test "$#" = 0; then
581                  (echo "$progname: Usage error:"
582 echo " " "The \`--$optname' option requires a value."
583 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
584              fi
585              val="$1"; shift
586            fi
587            eval "$opt=\"$val\""
588
589                            case "$opt" in
590                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
591     Defining EXEC_PREFIX_USER_DEFINED
592 EOF
593 cat >> confdefs.h <<\EOF
594 #define EXEC_PREFIX_USER_DEFINED 1
595 EOF
596 }
597  ;;
598              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
599     Defining LISPDIR_USER_DEFINED
600 EOF
601 cat >> confdefs.h <<\EOF
602 #define LISPDIR_USER_DEFINED 1
603 EOF
604 }
605  ;;
606              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
607     Defining SITELISPDIR_USER_DEFINED
608 EOF
609 cat >> confdefs.h <<\EOF
610 #define SITELISPDIR_USER_DEFINED 1
611 EOF
612 }
613  ;;
614              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
615     Defining MODULEDIR_USER_DEFINED
616 EOF
617 cat >> confdefs.h <<\EOF
618 #define MODULEDIR_USER_DEFINED 1
619 EOF
620 }
621  ;;
622              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
623     Defining ETCDIR_USER_DEFINED
624 EOF
625 cat >> confdefs.h <<\EOF
626 #define ETCDIR_USER_DEFINED 1
627 EOF
628 }
629  ;;
630              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
631     Defining INFODIR_USER_DEFINED
632 EOF
633 cat >> confdefs.h <<\EOF
634 #define INFODIR_USER_DEFINED 1
635 EOF
636 }
637  ;;
638              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
639     Defining INFOPATH_USER_DEFINED
640 EOF
641 cat >> confdefs.h <<\EOF
642 #define INFOPATH_USER_DEFINED 1
643 EOF
644 }
645  ;;
646              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
647     Defining PACKAGE_PATH_USER_DEFINED
648 EOF
649 cat >> confdefs.h <<\EOF
650 #define PACKAGE_PATH_USER_DEFINED 1
651 EOF
652 }
653  ;;
654              datadir )
655                 { test "$extra_verbose" = "yes" && cat << \EOF
656     Defining INFODIR_USER_DEFINED
657 EOF
658 cat >> confdefs.h <<\EOF
659 #define INFODIR_USER_DEFINED 1
660 EOF
661 }
662
663                 { test "$extra_verbose" = "yes" && cat << \EOF
664     Defining LISPDIR_USER_DEFINED
665 EOF
666 cat >> confdefs.h <<\EOF
667 #define LISPDIR_USER_DEFINED 1
668 EOF
669 }
670
671                 { test "$extra_verbose" = "yes" && cat << \EOF
672     Defining MODULEDIR_USER_DEFINED
673 EOF
674 cat >> confdefs.h <<\EOF
675 #define MODULEDIR_USER_DEFINED 1
676 EOF
677 }
678
679                 { test "$extra_verbose" = "yes" && cat << \EOF
680     Defining ETCDIR_USER_DEFINED
681 EOF
682 cat >> confdefs.h <<\EOF
683 #define ETCDIR_USER_DEFINED 1
684 EOF
685 }
686
687                 { test "$extra_verbose" = "yes" && cat << \EOF
688     Defining DOCDIR_USER_DEFINED
689 EOF
690 cat >> confdefs.h <<\EOF
691 #define DOCDIR_USER_DEFINED 1
692 EOF
693 }
694
695                 { test "$extra_verbose" = "yes" && cat << \EOF
696     Defining ARCHLIBDIR_USER_DEFINED
697 EOF
698 cat >> confdefs.h <<\EOF
699 #define ARCHLIBDIR_USER_DEFINED 1
700 EOF
701 }
702  ;;
703              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
704     Defining DOCDIR_USER_DEFINED
705 EOF
706 cat >> confdefs.h <<\EOF
707 #define DOCDIR_USER_DEFINED 1
708 EOF
709 }
710  ;;
711              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
712     Defining ARCHLIBDIR_USER_DEFINED
713 EOF
714 cat >> confdefs.h <<\EOF
715 #define ARCHLIBDIR_USER_DEFINED 1
716 EOF
717 }
718  ;;
719            esac
720         ;;
721
722                 "no_create" ) ;;
723
724                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
725
726                 "with_menubars"   | \
727         "with_scrollbars" | \
728         "with_dialogs"    | \
729         "with_widgets" )
730           case "$val" in
731             l | lu | luc | luci | lucid )               val=lucid  ;;
732             m | mo | mot | moti | motif )               val=motif  ;;
733             a | at | ath | athe | athen | athena )      val=athena ;;
734             n | no | non | none )                       val=no     ;;
735             y | ye | yes )                              val=yes    ;;
736             m | ms | msw )                      val=msw    ;;
737             * ) (echo "$progname: Usage error:"
738 echo " " "The \`--$optname' option must have one of these values:
739   \`lucid', \`motif', \`athena', \`yes', or \`no'."
740 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
741           esac
742           eval "$opt=\"$val\""
743         ;;
744
745                 "use_minimal_tagbits" | \
746         "use_indexed_lrecord_implementation" | \
747         "run_in_place"  | \
748         "const_is_losing" | \
749         "with_gnu_make" )
750           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
751         ;;
752
753                 * ) (echo "$progname: Usage error:"
754 echo " " "Unrecognized option: $arg"
755 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
756
757       esac
758     ;;
759
760         *-*-*) configuration="$arg" ;;
761
762         *) (echo "$progname: Usage error:"
763 echo " " "Unrecognized argument: $arg"
764 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
765
766   esac
767 done
768
769
770 test -n "$cpp"      && CPP="$cpp"
771 test -n "$cppflags" && CPPFLAGS="$cppflags"
772 test -n "$libs"     && LIBS="$libs"
773 test -n "$ldflags"  && LDFLAGS="$ldflags"
774
775 eval set x "$quoted_arguments"; shift
776
777 test "$extra_verbose" = "yes" && verbose=yes
778
779 test -n "$with_x" && with_x11="$with_x"
780
781 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
782   test "$with_system_malloc" = "default" && with_system_malloc=yes
783 fi
784
785
786
787 if test "$with_cde $with_tooltalk" = "yes no"; then
788   (echo "$progname: Usage error:"
789 echo " " "--with-cde requires --with-tooltalk"
790 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
791 elif test "$with_tooltalk" = "no" ; then with_cde=no
792 elif test "$with_cde" = "yes"; then with_tooltalk=yes
793 fi
794
795
796 case "$srcdir" in
797
798     "" )
799     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
800       if test -f "$dir/src/lisp.h" -a \
801               -f "$dir/lisp/version.el" ; then
802         srcdir="$dir"
803         break
804       fi
805     done
806     if test -z "$srcdir" ; then
807       (echo "$progname: Usage error:"
808 echo " " "Neither the current directory nor its parent seem to
809   contain the XEmacs sources.  If you do not want to build XEmacs in its
810   source tree, you should run \`$progname' in the directory in which
811   you wish to build XEmacs, using the \`--srcdir' option to say where the
812   sources may be found."
813 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
814     fi
815   ;;
816
817     * )
818     if test ! -f "$srcdir/src/lisp.h" -o \
819             ! -f "$srcdir/lisp/version.el" ; then
820       (echo "$progname: Usage error:"
821 echo " " "The directory specified with the \`--srcdir' option,
822   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
823   either run the \`$progname' script at the top of the XEmacs source
824   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
825 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
826     fi
827   ;;
828 esac
829
830 if test -z "$configuration"; then
831     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
832   if test -z "$configuration"; then
833     (echo "$progname: Usage error:"
834 echo " " "XEmacs has not been ported to this host type.
835 Try explicitly specifying the CONFIGURATION when rerunning configure."
836 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
837   fi
838 fi
839
840 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
841 echo "configure:842: checking whether ln -s works" >&5
842
843 rm -f conftestdata
844 if ln -s X conftestdata 2>/dev/null
845 then
846   rm -f conftestdata
847   ac_cv_prog_LN_S="ln -s"
848 else
849   ac_cv_prog_LN_S=ln
850 fi
851 LN_S="$ac_cv_prog_LN_S"
852 if test "$ac_cv_prog_LN_S" = "ln -s"; then
853   echo "$ac_t""yes" 1>&6
854 else
855   echo "$ac_t""no" 1>&6
856 fi
857
858
859 for dir in lisp etc man info tests; do
860   if test ! -d "$dir" ; then
861     echo Making symbolic link to "$srcdir/$dir"
862     ${LN_S} "$srcdir/$dir" "$dir"
863   fi
864 done
865
866
867 absolute_pwd="`pwd`";
868 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
869 then blddir="$PWD"
870 else blddir="$absolute_pwd"; if test -d "/net"; then
871   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
872   blddir=`echo "$blddir" | \
873    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
874 fi
875 fi
876
877
878 case "$srcdir" in
879   /* ) ;;
880   .  ) srcdir="$blddir" ;;
881   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
882   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
883   srcdir=`echo "$srcdir" | \
884    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
885 fi ;;
886 esac
887
888 if test `pwd` != `sh -c cd $srcdir && pwd`  \
889    && test -f "$srcdir/src/config.h"; then
890   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
891    echo "   as a build directory right now; it has been configured in its own"
892    echo "   right.  To configure in another directory as well, you MUST"
893    echo "   use GNU make.  If you do not have GNU make, then you must"
894    echo "   now do \`make distclean' in $srcdir,"
895    echo "   and then run $progname again.") >&2
896   extrasub='/^VPATH[     ]*=/c\
897 vpath %.c $(srcdir)\
898 vpath %.h $(srcdir)\
899 vpath %.y $(srcdir)\
900 vpath %.l $(srcdir)\
901 vpath %.s $(srcdir)\
902 vpath %.in $(srcdir)'
903 fi
904
905 . "$srcdir/version.sh" || exit 1;
906 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
907 : "${extra_verbose=$beta}"
908 version="${emacs_major_version}.${emacs_minor_version}"
909 { test "$extra_verbose" = "yes" && cat << EOF
910     Defining EMACS_MAJOR_VERSION = $emacs_major_version
911 EOF
912 cat >> confdefs.h <<EOF
913 #define EMACS_MAJOR_VERSION $emacs_major_version
914 EOF
915 }
916
917 { test "$extra_verbose" = "yes" && cat << EOF
918     Defining EMACS_MINOR_VERSION = $emacs_minor_version
919 EOF
920 cat >> confdefs.h <<EOF
921 #define EMACS_MINOR_VERSION $emacs_minor_version
922 EOF
923 }
924
925 if test -n "$emacs_beta_version" ; then
926   if test "$beta" = "yes"; then
927         version="${version}-b${emacs_beta_version}"
928         { test "$extra_verbose" = "yes" && cat << EOF
929     Defining EMACS_BETA_VERSION = $emacs_beta_version
930 EOF
931 cat >> confdefs.h <<EOF
932 #define EMACS_BETA_VERSION $emacs_beta_version
933 EOF
934 }
935
936   else
937         version="${version}.${emacs_beta_version}"
938         { test "$extra_verbose" = "yes" && cat << EOF
939     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
940 EOF
941 cat >> confdefs.h <<EOF
942 #define EMACS_PATCH_LEVEL $emacs_beta_version
943 EOF
944 }
945
946   fi
947 fi
948 { test "$extra_verbose" = "yes" && cat << EOF
949     Defining XEMACS_CODENAME = "$xemacs_codename"
950 EOF
951 cat >> confdefs.h <<EOF
952 #define XEMACS_CODENAME "$xemacs_codename"
953 EOF
954 }
955
956 { test "$extra_verbose" = "yes" && cat << EOF
957     Defining EMACS_VERSION = "$version"
958 EOF
959 cat >> confdefs.h <<EOF
960 #define EMACS_VERSION "$version"
961 EOF
962 }
963
964
965 if test "$with_infodock" = "yes"; then
966   if test ! -f ../../ID-INSTALL; then
967     echo "Cannot build InfoDock without InfoDock sources"
968     with_infodock=no
969   fi
970 fi
971
972 if test "$with_infodock" = "yes"; then
973       { test "$extra_verbose" = "yes" && cat << EOF
974     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
975 EOF
976 cat >> confdefs.h <<EOF
977 #define INFODOCK_MAJOR_VERSION $infodock_major_version
978 EOF
979 }
980
981   { test "$extra_verbose" = "yes" && cat << EOF
982     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
983 EOF
984 cat >> confdefs.h <<EOF
985 #define INFODOCK_MINOR_VERSION $infodock_minor_version
986 EOF
987 }
988
989   { test "$extra_verbose" = "yes" && cat << EOF
990     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
991 EOF
992 cat >> confdefs.h <<EOF
993 #define INFODOCK_BUILD_VERSION $infodock_build_version
994 EOF
995 }
996
997   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
998   PROGNAME=infodock
999   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1000 else
1001   PROGNAME=xemacs
1002 fi
1003
1004 { test "$extra_verbose" = "yes" && cat << EOF
1005     Defining EMACS_PROGNAME = "$PROGNAME"
1006 EOF
1007 cat >> confdefs.h <<EOF
1008 #define EMACS_PROGNAME "$PROGNAME"
1009 EOF
1010 }
1011
1012
1013 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1014 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1015     Defining ERROR_CHECK_EXTENTS
1016 EOF
1017 cat >> confdefs.h <<\EOF
1018 #define ERROR_CHECK_EXTENTS 1
1019 EOF
1020 }
1021
1022 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1023     Defining ERROR_CHECK_TYPECHECK
1024 EOF
1025 cat >> confdefs.h <<\EOF
1026 #define ERROR_CHECK_TYPECHECK 1
1027 EOF
1028 }
1029
1030 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1031     Defining ERROR_CHECK_BUFPOS
1032 EOF
1033 cat >> confdefs.h <<\EOF
1034 #define ERROR_CHECK_BUFPOS 1
1035 EOF
1036 }
1037
1038 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1039     Defining ERROR_CHECK_GC
1040 EOF
1041 cat >> confdefs.h <<\EOF
1042 #define ERROR_CHECK_GC 1
1043 EOF
1044 }
1045
1046 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1047     Defining ERROR_CHECK_MALLOC
1048 EOF
1049 cat >> confdefs.h <<\EOF
1050 #define ERROR_CHECK_MALLOC 1
1051 EOF
1052 }
1053
1054 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1055     Defining ERROR_CHECK_BYTE_CODE
1056 EOF
1057 cat >> confdefs.h <<\EOF
1058 #define ERROR_CHECK_BYTE_CODE 1
1059 EOF
1060 }
1061
1062 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1063     Defining ERROR_CHECK_GLYPHS
1064 EOF
1065 cat >> confdefs.h <<\EOF
1066 #define ERROR_CHECK_GLYPHS 1
1067 EOF
1068 }
1069
1070 if test "${debug:=$beta}" = "yes"; then
1071   use_assertions=yes memory_usage_stats=yes
1072   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1073    echo "    xemacs will be linked with \"debug.o\""
1074  fi
1075   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1076    echo "    xemacs will be linked with \"tests.o\""
1077  fi
1078   { test "$extra_verbose" = "yes" && cat << \EOF
1079     Defining DEBUG_XEMACS
1080 EOF
1081 cat >> confdefs.h <<\EOF
1082 #define DEBUG_XEMACS 1
1083 EOF
1084 }
1085
1086 fi
1087 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1088     Defining USE_ASSERTIONS
1089 EOF
1090 cat >> confdefs.h <<\EOF
1091 #define USE_ASSERTIONS 1
1092 EOF
1093 }
1094
1095 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1096     Defining MEMORY_USAGE_STATS
1097 EOF
1098 cat >> confdefs.h <<\EOF
1099 #define MEMORY_USAGE_STATS 1
1100 EOF
1101 }
1102
1103
1104
1105 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1106 echo "configure:1107: checking "host system type"" >&5
1107 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1108 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1109 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1110 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1111 echo "$ac_t""$configuration" 1>&6
1112
1113
1114
1115
1116
1117 machine='' opsys=''
1118
1119 case "$canonical" in
1120   sparc-*-*        ) machine=sparc ;;
1121   alpha*-*-*       ) machine=alpha ;;
1122   vax-*-*          ) machine=vax ;;
1123   mips-dec-*       ) machine=pmax ;;
1124   mips-sgi-irix6*  ) machine=iris6d ;;
1125   mips-sgi-*       ) machine=iris4d ;;
1126   mips*-linux      ) machine=mips ;;
1127   romp-ibm-*       ) machine=ibmrt ;;
1128   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1129   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1130   powerpc*-*       ) machine=powerpc ;;
1131   hppa-*-*         ) machine=hp800 ;;
1132   m88k-dg-*        ) machine=aviion ;;
1133   m68*-sony-*      ) machine=news ;;
1134   mips-sony-*      ) machine=news-risc ;;
1135   clipper-*        ) machine=clipper ;;
1136   arm*             ) machine=arm ;;
1137   ns32k-*          ) machine=ns32000 ;;
1138 esac
1139
1140 case "$canonical" in
1141   *-*-linux*    ) opsys=linux ;;
1142   *-*-netbsd*   ) opsys=netbsd ;;
1143   *-*-openbsd*  ) opsys=openbsd ;;
1144   *-*-nextstep* ) opsys=nextstep ;;
1145   *-*-vms       ) opsys=vms ;;
1146
1147     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1148   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1149   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1150   *-dec-osf3*                ) opsys=decosf3-1 ;;
1151   *-dec-osf[4-9]*          ) opsys=decosf4-0 ;;
1152
1153     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1154   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1155   *-*-ultrix* )         opsys=ultrix4-3 ;;
1156
1157     *-*-aix3.1*  ) opsys=aix3-1 ;;
1158   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1159   *-*-aix3*    ) opsys=aix3-2   ;;
1160   *-*-aix4.0*  ) opsys=aix4     ;;
1161   *-*-aix4.1*  ) opsys=aix4-1   ;;
1162   *-*-aix4*    ) opsys=aix4-2   ;;
1163
1164     *-gnu* )                    opsys=gnu    ;;
1165   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1166   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1167   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1168   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1169   *-*-aos*   )                  opsys=bsd4-3 ;;
1170   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1171   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1172   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1173   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1174   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1175   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1176         if test -z "$NON_GNU_CPP" ; then
1177           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1178             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1179           done
1180         fi
1181         opsys=usg5-4-2 ;;
1182     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1183     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1184 esac
1185
1186 case "$canonical" in
1187
1188     *-*-netbsd* )
1189     case "$canonical" in
1190       i[3-9]86-*-netbsd*) machine=intel386 ;;
1191       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1192                                             machine=hp9000s300 ;;
1193       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1194       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1195     esac
1196   ;;
1197
1198     *-*-openbsd* )
1199     case "${canonical}" in
1200       i386-*-openbsd*)          machine=intel386 ;;
1201       m68k-*-openbsd*)          machine=hp9000s300 ;;
1202       mipsel-*-openbsd*)        machine=pmax ;;
1203      esac
1204    ;;
1205
1206     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1207   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1208
1209     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1210   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1211
1212     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1213
1214     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1215
1216     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1217
1218     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1219
1220     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1221
1222     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1223   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1224   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1225
1226   
1227     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1228
1229     *-convex-bsd* | *-convex-convexos* )
1230     machine=convex opsys=bsd4-3
1231     NON_GNU_CPP="cc -E -P"
1232   ;;
1233
1234     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1235
1236     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1237   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1238   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1239   m88k-dg-dgux*                           ) opsys=dgux     ;;
1240
1241     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1242   m88k-motorola-sysv4* )
1243                     machine=delta88k opsys=usg5-4-2
1244   ;;
1245   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1246
1247     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1248   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1249
1250     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1251
1252     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1253   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1254   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1255
1256       m88k-harris-cxux* )
1257         case "`uname -r`" in
1258        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1259        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1260     esac
1261     NON_GNU_CPP="/lib/cpp"
1262   ;;
1263     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1264     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1265
1266     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1267
1268     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1269
1270     *-hp-hpux* )
1271         case "$canonical" in
1272       m68*  ) machine=hp9000s300 ;;
1273       hppa* ) machine=hp800      ;;
1274     esac
1275
1276     case "$canonical" in
1277       *-hp-hpux7*  )  opsys=hpux   ;;
1278       *-hp-hpux8*  )  opsys=hpux8  ;;
1279       *-hp-hpux9*  )  opsys=hpux9  ;;
1280       *-hp-hpux10* )  opsys=hpux10 ;;
1281       *-hp-hpux11* )  opsys=hpux11 ;;
1282       *            )  opsys=hpux   ;;
1283     esac
1284
1285         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1286    echo "    xemacs will be linked with \"strcat.o\""
1287  fi ;; esac
1288
1289     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1290         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1291     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1292
1293     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1294   ;;
1295
1296     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1297   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1298
1299     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1300   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1301   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1302   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1303   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1304   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1305
1306     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1307   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1308
1309     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1310
1311     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1312
1313     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1314
1315     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1316
1317       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1318
1319     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1320
1321     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1322
1323     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1324
1325     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1326
1327         mips-mips-usg* ) machine=mips4 ;;
1328   mips-mips-riscos4 )
1329     machine=mips4
1330     NON_GNU_CC="cc -systype bsd43"
1331     NON_GNU_CPP="cc -systype bsd43 -E"
1332     case "$canonical" in
1333       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1334       mips-mips-riscos5* ) opsys=riscos5 ;;
1335     esac
1336   ;;
1337   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1338   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1339
1340     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1341
1342     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1343
1344     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1345   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1346
1347     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1348
1349     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1350
1351     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1352
1353     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1354
1355     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1356   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1357
1358     mips-siemens-sysv* | mips-sni-sysv*)
1359     machine=mips-siemens opsys=usg5-4
1360     NON_GNU_CC=/usr/ccs/bin/cc
1361     NON_GNU_CPP=/usr/ccs/lib/cpp
1362   ;;
1363
1364     mips-nec-sysv*)
1365     machine=mips-nec
1366     NON_GNU_CC=/usr/ccs/bin/cc
1367     NON_GNU_CPP=/usr/ccs/lib/cpp
1368   ;;
1369
1370       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1371   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1372     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1373   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1374   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1375   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1376   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1377   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1378   mips-sgi-irix*      ) opsys=irix5-0 ;;
1379
1380     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1381   *-sony-news* ) opsys=newsos5 ;;
1382
1383     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1384
1385     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1386         case "$canonical" in
1387       m68*-sunos1* )             machine=sun1     ;;
1388       m68*-sunos2* )             machine=sun2     ;;
1389       m68* )                     machine=sun3     ;;
1390       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1391       i*86-*-* )                 machine=intel386 ;;
1392       rs6000* )                  machine=rs6000   ;;
1393     esac
1394
1395         case "$canonical" in *-sunos5*)
1396       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1397     esac
1398
1399                     case "$canonical" in
1400       *-sunos4* )
1401         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1402         : ;;
1403       *-solaris2* )
1404         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1405         RANLIB=':' ;;
1406     esac
1407
1408     case "$canonical" in
1409       *-solaris*          )
1410         opsys=sol2
1411         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1412         { test "$extra_verbose" = "yes" && cat << EOF
1413     Defining OS_RELEASE = $os_release
1414 EOF
1415 cat >> confdefs.h <<EOF
1416 #define OS_RELEASE $os_release
1417 EOF
1418 }
1419  ;;
1420
1421             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1422       *-sunos4.0*         ) opsys=sunos4-0      ;;
1423       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1424       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1425       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1426       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1427       *-mach*             ) opsys=mach-bsd4-3   ;;
1428       *                   ) opsys=bsd4-2        ;;
1429     esac
1430
1431     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1432
1433         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1434   ;;
1435
1436     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1437
1438     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1439   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1440
1441     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1442
1443     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1444
1445     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1446       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1447
1448     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1449
1450     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1451
1452     vax-dec-* )
1453     case "$canonical" in
1454       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1455       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1456       *-mach* )                         opsys=mach-bsd4-3 ;;
1457     esac
1458   ;;
1459
1460     ns16k-whitechapel-* ) machine=mg1 ;;
1461
1462     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1463
1464     i[3-9]86-*-* )
1465     machine=intel386
1466     case "$canonical" in
1467       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1468       *-isc2.2* )               opsys=isc2-2 ;;
1469       *-isc4.0* )               opsys=isc4-0 ;;
1470       *-isc4.* )                opsys=isc4-1
1471                                 GCC_TEST_OPTIONS=-posix
1472                                 NON_GCC_TEST_OPTIONS=-Xp
1473                                 ;;
1474       *-isc* )                  opsys=isc3-0 ;;
1475       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1476       *-esix* )                 opsys=esix ;;
1477       *-mach* )                 opsys=mach-bsd4-3 ;;
1478       *-xenix* )                opsys=xenix ;;
1479       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1480       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1481       *-bsdi4* )                opsys=bsdos4 ;;
1482       *-bsdi3* )                opsys=bsdos3 ;;
1483       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1484       *-bsdi2* )                opsys=bsdos2 ;;
1485       *-sco3.2v5* )             opsys=sco5 ;;
1486       *-sysv5* )                opsys=sco7 ;;
1487       *-386bsd* )               opsys=386bsd ;;
1488       *-freebsd* )              opsys=freebsd ;;
1489       *-nextstep* )             opsys=nextstep ;;
1490       *-pc-cygwin* )            opsys=cygwin32 ;;
1491       *-pc-mingw* )             opsys=mingw32 ;
1492                                 test -z "$with_tty" && with_tty="no";;
1493           esac
1494   ;;
1495
1496     m68k-*-linux* ) machine=m68k opsys=linux ;;
1497
1498 esac
1499
1500 test -z "$machine" && machine=`echo $canonical | sed 's/-.*$//'`
1501 test -z "$opsys"   && opsys=`echo $canonical | sed 's/^^-*-^-*-//'`
1502
1503 if test -r "${srcdir}/src/m/${machine}.h"; then
1504   machfile="m/${machine}.h"
1505   { test "$extra_verbose" = "yes" && cat << EOF
1506     Defining config_machfile = "$machfile"
1507 EOF
1508 cat >> confdefs.h <<EOF
1509 #define config_machfile "$machfile"
1510 EOF
1511 }
1512
1513 else
1514   echo "XEmacs has no builtin knowledge of \`$machine' machines."
1515   echo "Using configure-time autodetection only."
1516 fi
1517
1518 if test -r "${srcdir}/src/s/${opsys}.h"; then
1519   opsysfile="s/${opsys}.h"
1520   { test "$extra_verbose" = "yes" && cat << EOF
1521     Defining config_opsysfile = "$opsysfile"
1522 EOF
1523 cat >> confdefs.h <<EOF
1524 #define config_opsysfile "$opsysfile"
1525 EOF
1526 }
1527
1528 else
1529   echo "XEmacs has no builtin knowledge of \`$opsys' operating systems."
1530   echo "Using configure-time autodetection only."
1531 fi
1532
1533
1534 if test -z "$dynamic"; then
1535   case "$opsys" in
1536     hpux* | sunos4* ) dynamic=no ;;
1537     *) dynamic=yes ;;
1538   esac
1539 fi
1540 if test "$dynamic" = "yes"; then
1541   case "$opsys" in
1542     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1543     decosf* ) ld_call_shared="-call_shared" ;;
1544   esac
1545 else   case "$opsys" in
1546     sol2 )
1547       echo "Static linking is not supported on Solaris 2."
1548       echo "Rerun configure without specifying --dynamic=no."
1549       exit 1 ;;
1550     linux   ) ld_call_shared="-Bstatic" ;;
1551     decosf* ) ld_call_shared="-non_shared" ;;
1552   esac
1553 fi
1554
1555 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1556
1557 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1558 { test "$extra_verbose" = "yes" && cat << EOF
1559     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1560 EOF
1561 cat >> confdefs.h <<EOF
1562 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1563 EOF
1564 }
1565
1566
1567
1568 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1569 if test "$with_workshop $with_tooltalk" = "yes no"; then
1570   (echo "$progname: Usage error:"
1571 echo " " "--with-workshop requires --with-tooltalk"
1572 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1573 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1574 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1575 fi
1576
1577 if test "$with_workshop" = "yes"; then
1578   { test "$extra_verbose" = "yes" && cat << \EOF
1579     Defining SUNPRO
1580 EOF
1581 cat >> confdefs.h <<\EOF
1582 #define SUNPRO 1
1583 EOF
1584 }
1585
1586   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1587    echo "    xemacs will be linked with \"sunpro.o\""
1588  fi
1589 fi
1590
1591 if test "$with_clash_detection" != "no"; then
1592   { test "$extra_verbose" = "yes" && cat << \EOF
1593     Defining CLASH_DETECTION
1594 EOF
1595 cat >> confdefs.h <<\EOF
1596 #define CLASH_DETECTION 1
1597 EOF
1598 }
1599
1600   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1601    echo "    xemacs will be linked with \"filelock.o\""
1602  fi
1603 fi
1604
1605 test -n "$compiler" && CC="$compiler"
1606 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1607 fi
1608
1609 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1610 if test "${CFLAGS-unset}" != unset
1611   then cflags_specified=yes;
1612   else cflags_specified=no;
1613 fi
1614
1615 xe_save_CFLAGS="$CFLAGS"
1616
1617 # Extract the first word of "gcc", so it can be a program name with args.
1618 set dummy gcc; ac_word=$2
1619 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1620 echo "configure:1621: checking for $ac_word" >&5
1621
1622 if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1626   ac_dummy="$PATH"
1627   for ac_dir in $ac_dummy; do
1628     test -z "$ac_dir" && ac_dir=.
1629     if test -f $ac_dir/$ac_word; then
1630       ac_cv_prog_CC="gcc"
1631       break
1632     fi
1633   done
1634   IFS="$ac_save_ifs"
1635 fi
1636 CC="$ac_cv_prog_CC"
1637 if test -n "$CC"; then
1638   echo "$ac_t""$CC" 1>&6
1639 else
1640   echo "$ac_t""no" 1>&6
1641 fi
1642
1643 if test -z "$CC"; then
1644   # Extract the first word of "cc", so it can be a program name with args.
1645 set dummy cc; ac_word=$2
1646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_word" >&5
1648
1649 if test -n "$CC"; then
1650   ac_cv_prog_CC="$CC" # Let the user override the test.
1651 else
1652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1653   ac_prog_rejected=no
1654   ac_dummy="$PATH"
1655   for ac_dir in $ac_dummy; do
1656     test -z "$ac_dir" && ac_dir=.
1657     if test -f $ac_dir/$ac_word; then
1658       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1659         ac_prog_rejected=yes
1660         continue
1661       fi
1662       ac_cv_prog_CC="cc"
1663       break
1664     fi
1665   done
1666   IFS="$ac_save_ifs"
1667 if test $ac_prog_rejected = yes; then
1668   # We found a bogon in the path, so make sure we never use it.
1669   set dummy $ac_cv_prog_CC
1670   shift
1671   if test $# -gt 0; then
1672     # We chose a different compiler from the bogus one.
1673     # However, it has the same basename, so the bogon will be chosen
1674     # first if we set CC to just the basename; use the full file name.
1675     shift
1676     set dummy "$ac_dir/$ac_word" "$@"
1677     shift
1678     ac_cv_prog_CC="$@"
1679   fi
1680 fi
1681 fi
1682 CC="$ac_cv_prog_CC"
1683 if test -n "$CC"; then
1684   echo "$ac_t""$CC" 1>&6
1685 else
1686   echo "$ac_t""no" 1>&6
1687 fi
1688
1689   if test -z "$CC"; then
1690     case "`uname -s`" in
1691     *win32* | *WIN32*)
1692       # Extract the first word of "cl", so it can be a program name with args.
1693 set dummy cl; ac_word=$2
1694 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1695 echo "configure:1696: checking for $ac_word" >&5
1696
1697 if test -n "$CC"; then
1698   ac_cv_prog_CC="$CC" # Let the user override the test.
1699 else
1700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1701   ac_dummy="$PATH"
1702   for ac_dir in $ac_dummy; do
1703     test -z "$ac_dir" && ac_dir=.
1704     if test -f $ac_dir/$ac_word; then
1705       ac_cv_prog_CC="cl"
1706       break
1707     fi
1708   done
1709   IFS="$ac_save_ifs"
1710 fi
1711 CC="$ac_cv_prog_CC"
1712 if test -n "$CC"; then
1713   echo "$ac_t""$CC" 1>&6
1714 else
1715   echo "$ac_t""no" 1>&6
1716 fi
1717  ;;
1718     esac
1719   fi
1720   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1721 fi
1722
1723 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1724 echo "configure:1725: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1725
1726 ac_ext=c
1727 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1728 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1729 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1730 ac_cpp='$CPP '"$xe_cppflags"
1731 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1732 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1733 cross_compiling=no
1734
1735 cat > conftest.$ac_ext << EOF
1736
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739
1740 main(){return(0);}
1741 EOF
1742 if { (eval echo configure:1743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1743   ac_cv_prog_cc_works=yes
1744   # If we can't run a trivial program, we are probably using a cross compiler.
1745   if (./conftest; exit) 2>/dev/null; then
1746     ac_cv_prog_cc_cross=no
1747   else
1748     ac_cv_prog_cc_cross=yes
1749   fi
1750 else
1751   echo "configure: failed program was:" >&5
1752   cat conftest.$ac_ext >&5
1753   ac_cv_prog_cc_works=no
1754 fi
1755 rm -fr conftest*
1756 ac_ext=c
1757 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1758 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1759 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1760 ac_cpp='$CPP '"$xe_cppflags"
1761 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1762 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1763 cross_compiling=no
1764
1765 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1766 if test $ac_cv_prog_cc_works = no; then
1767   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1768 fi
1769 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1770 echo "configure:1771: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1771 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1772 cross_compiling=$ac_cv_prog_cc_cross
1773
1774 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1775 echo "configure:1776: checking whether we are using GNU C" >&5
1776
1777 cat > conftest.c <<EOF
1778 #ifdef __GNUC__
1779   yes;
1780 #endif
1781 EOF
1782 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1783   ac_cv_prog_gcc=yes
1784 else
1785   ac_cv_prog_gcc=no
1786 fi
1787
1788 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1789
1790 if test $ac_cv_prog_gcc = yes; then
1791   GCC=yes
1792 else
1793   GCC=
1794 fi
1795
1796 ac_test_CFLAGS="${CFLAGS+set}"
1797 ac_save_CFLAGS="$CFLAGS"
1798 CFLAGS=
1799 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1800 echo "configure:1801: checking whether ${CC-cc} accepts -g" >&5
1801
1802 echo 'void f(){}' > conftest.c
1803 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1804   ac_cv_prog_cc_g=yes
1805 else
1806   ac_cv_prog_cc_g=no
1807 fi
1808 rm -f conftest*
1809
1810
1811 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1812 if test "$ac_test_CFLAGS" = set; then
1813   CFLAGS="$ac_save_CFLAGS"
1814 elif test $ac_cv_prog_cc_g = yes; then
1815   if test "$GCC" = yes; then
1816     CFLAGS="-g -O2"
1817   else
1818     CFLAGS="-g"
1819   fi
1820 else
1821   if test "$GCC" = yes; then
1822     CFLAGS="-O2"
1823   else
1824     CFLAGS=
1825   fi
1826 fi
1827  
1828 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1829   CC=${NON_GNU_CC-cc}
1830   # Extract the first word of "gcc", so it can be a program name with args.
1831 set dummy gcc; ac_word=$2
1832 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1833 echo "configure:1834: checking for $ac_word" >&5
1834
1835 if test -n "$CC"; then
1836   ac_cv_prog_CC="$CC" # Let the user override the test.
1837 else
1838   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1839   ac_dummy="$PATH"
1840   for ac_dir in $ac_dummy; do
1841     test -z "$ac_dir" && ac_dir=.
1842     if test -f $ac_dir/$ac_word; then
1843       ac_cv_prog_CC="gcc"
1844       break
1845     fi
1846   done
1847   IFS="$ac_save_ifs"
1848 fi
1849 CC="$ac_cv_prog_CC"
1850 if test -n "$CC"; then
1851   echo "$ac_t""$CC" 1>&6
1852 else
1853   echo "$ac_t""no" 1>&6
1854 fi
1855
1856 if test -z "$CC"; then
1857   # Extract the first word of "cc", so it can be a program name with args.
1858 set dummy cc; ac_word=$2
1859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1860 echo "configure:1861: checking for $ac_word" >&5
1861
1862 if test -n "$CC"; then
1863   ac_cv_prog_CC="$CC" # Let the user override the test.
1864 else
1865   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1866   ac_prog_rejected=no
1867   ac_dummy="$PATH"
1868   for ac_dir in $ac_dummy; do
1869     test -z "$ac_dir" && ac_dir=.
1870     if test -f $ac_dir/$ac_word; then
1871       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1872         ac_prog_rejected=yes
1873         continue
1874       fi
1875       ac_cv_prog_CC="cc"
1876       break
1877     fi
1878   done
1879   IFS="$ac_save_ifs"
1880 if test $ac_prog_rejected = yes; then
1881   # We found a bogon in the path, so make sure we never use it.
1882   set dummy $ac_cv_prog_CC
1883   shift
1884   if test $# -gt 0; then
1885     # We chose a different compiler from the bogus one.
1886     # However, it has the same basename, so the bogon will be chosen
1887     # first if we set CC to just the basename; use the full file name.
1888     shift
1889     set dummy "$ac_dir/$ac_word" "$@"
1890     shift
1891     ac_cv_prog_CC="$@"
1892   fi
1893 fi
1894 fi
1895 CC="$ac_cv_prog_CC"
1896 if test -n "$CC"; then
1897   echo "$ac_t""$CC" 1>&6
1898 else
1899   echo "$ac_t""no" 1>&6
1900 fi
1901
1902   if test -z "$CC"; then
1903     case "`uname -s`" in
1904     *win32* | *WIN32*)
1905       # Extract the first word of "cl", so it can be a program name with args.
1906 set dummy cl; ac_word=$2
1907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1908 echo "configure:1909: checking for $ac_word" >&5
1909
1910 if test -n "$CC"; then
1911   ac_cv_prog_CC="$CC" # Let the user override the test.
1912 else
1913   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1914   ac_dummy="$PATH"
1915   for ac_dir in $ac_dummy; do
1916     test -z "$ac_dir" && ac_dir=.
1917     if test -f $ac_dir/$ac_word; then
1918       ac_cv_prog_CC="cl"
1919       break
1920     fi
1921   done
1922   IFS="$ac_save_ifs"
1923 fi
1924 CC="$ac_cv_prog_CC"
1925 if test -n "$CC"; then
1926   echo "$ac_t""$CC" 1>&6
1927 else
1928   echo "$ac_t""no" 1>&6
1929 fi
1930  ;;
1931     esac
1932   fi
1933   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1934 fi
1935
1936 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1937 echo "configure:1938: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1938
1939 ac_ext=c
1940 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1941 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1942 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1943 ac_cpp='$CPP '"$xe_cppflags"
1944 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1945 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1946 cross_compiling=no
1947
1948 cat > conftest.$ac_ext << EOF
1949
1950 #line 1951 "configure"
1951 #include "confdefs.h"
1952
1953 main(){return(0);}
1954 EOF
1955 if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1956   ac_cv_prog_cc_works=yes
1957   # If we can't run a trivial program, we are probably using a cross compiler.
1958   if (./conftest; exit) 2>/dev/null; then
1959     ac_cv_prog_cc_cross=no
1960   else
1961     ac_cv_prog_cc_cross=yes
1962   fi
1963 else
1964   echo "configure: failed program was:" >&5
1965   cat conftest.$ac_ext >&5
1966   ac_cv_prog_cc_works=no
1967 fi
1968 rm -fr conftest*
1969 ac_ext=c
1970 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1971 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1972 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1973 ac_cpp='$CPP '"$xe_cppflags"
1974 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1975 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1976 cross_compiling=no
1977
1978 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1979 if test $ac_cv_prog_cc_works = no; then
1980   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1981 fi
1982 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1983 echo "configure:1984: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1984 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1985 cross_compiling=$ac_cv_prog_cc_cross
1986
1987 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1988 echo "configure:1989: checking whether we are using GNU C" >&5
1989
1990 cat > conftest.c <<EOF
1991 #ifdef __GNUC__
1992   yes;
1993 #endif
1994 EOF
1995 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1996   ac_cv_prog_gcc=yes
1997 else
1998   ac_cv_prog_gcc=no
1999 fi
2000
2001 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2002
2003 if test $ac_cv_prog_gcc = yes; then
2004   GCC=yes
2005 else
2006   GCC=
2007 fi
2008
2009 ac_test_CFLAGS="${CFLAGS+set}"
2010 ac_save_CFLAGS="$CFLAGS"
2011 CFLAGS=
2012 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2013 echo "configure:2014: checking whether ${CC-cc} accepts -g" >&5
2014
2015 echo 'void f(){}' > conftest.c
2016 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2017   ac_cv_prog_cc_g=yes
2018 else
2019   ac_cv_prog_cc_g=no
2020 fi
2021 rm -f conftest*
2022
2023
2024 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2025 if test "$ac_test_CFLAGS" = set; then
2026   CFLAGS="$ac_save_CFLAGS"
2027 elif test $ac_cv_prog_cc_g = yes; then
2028   if test "$GCC" = yes; then
2029     CFLAGS="-g -O2"
2030   else
2031     CFLAGS="-g"
2032   fi
2033 else
2034   if test "$GCC" = yes; then
2035     CFLAGS="-O2"
2036   else
2037     CFLAGS=
2038   fi
2039 fi
2040
2041 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2042   CC=gcc
2043   # Extract the first word of "gcc", so it can be a program name with args.
2044 set dummy gcc; ac_word=$2
2045 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2046 echo "configure:2047: checking for $ac_word" >&5
2047
2048 if test -n "$CC"; then
2049   ac_cv_prog_CC="$CC" # Let the user override the test.
2050 else
2051   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2052   ac_dummy="$PATH"
2053   for ac_dir in $ac_dummy; do
2054     test -z "$ac_dir" && ac_dir=.
2055     if test -f $ac_dir/$ac_word; then
2056       ac_cv_prog_CC="gcc"
2057       break
2058     fi
2059   done
2060   IFS="$ac_save_ifs"
2061 fi
2062 CC="$ac_cv_prog_CC"
2063 if test -n "$CC"; then
2064   echo "$ac_t""$CC" 1>&6
2065 else
2066   echo "$ac_t""no" 1>&6
2067 fi
2068
2069 if test -z "$CC"; then
2070   # Extract the first word of "cc", so it can be a program name with args.
2071 set dummy cc; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074
2075 if test -n "$CC"; then
2076   ac_cv_prog_CC="$CC" # Let the user override the test.
2077 else
2078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2079   ac_prog_rejected=no
2080   ac_dummy="$PATH"
2081   for ac_dir in $ac_dummy; do
2082     test -z "$ac_dir" && ac_dir=.
2083     if test -f $ac_dir/$ac_word; then
2084       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2085         ac_prog_rejected=yes
2086         continue
2087       fi
2088       ac_cv_prog_CC="cc"
2089       break
2090     fi
2091   done
2092   IFS="$ac_save_ifs"
2093 if test $ac_prog_rejected = yes; then
2094   # We found a bogon in the path, so make sure we never use it.
2095   set dummy $ac_cv_prog_CC
2096   shift
2097   if test $# -gt 0; then
2098     # We chose a different compiler from the bogus one.
2099     # However, it has the same basename, so the bogon will be chosen
2100     # first if we set CC to just the basename; use the full file name.
2101     shift
2102     set dummy "$ac_dir/$ac_word" "$@"
2103     shift
2104     ac_cv_prog_CC="$@"
2105   fi
2106 fi
2107 fi
2108 CC="$ac_cv_prog_CC"
2109 if test -n "$CC"; then
2110   echo "$ac_t""$CC" 1>&6
2111 else
2112   echo "$ac_t""no" 1>&6
2113 fi
2114
2115   if test -z "$CC"; then
2116     case "`uname -s`" in
2117     *win32* | *WIN32*)
2118       # Extract the first word of "cl", so it can be a program name with args.
2119 set dummy cl; ac_word=$2
2120 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2121 echo "configure:2122: checking for $ac_word" >&5
2122
2123 if test -n "$CC"; then
2124   ac_cv_prog_CC="$CC" # Let the user override the test.
2125 else
2126   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2127   ac_dummy="$PATH"
2128   for ac_dir in $ac_dummy; do
2129     test -z "$ac_dir" && ac_dir=.
2130     if test -f $ac_dir/$ac_word; then
2131       ac_cv_prog_CC="cl"
2132       break
2133     fi
2134   done
2135   IFS="$ac_save_ifs"
2136 fi
2137 CC="$ac_cv_prog_CC"
2138 if test -n "$CC"; then
2139   echo "$ac_t""$CC" 1>&6
2140 else
2141   echo "$ac_t""no" 1>&6
2142 fi
2143  ;;
2144     esac
2145   fi
2146   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2147 fi
2148
2149 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2150 echo "configure:2151: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2151
2152 ac_ext=c
2153 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2154 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2155 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2156 ac_cpp='$CPP '"$xe_cppflags"
2157 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2158 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2159 cross_compiling=no
2160
2161 cat > conftest.$ac_ext << EOF
2162
2163 #line 2164 "configure"
2164 #include "confdefs.h"
2165
2166 main(){return(0);}
2167 EOF
2168 if { (eval echo configure:2169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2169   ac_cv_prog_cc_works=yes
2170   # If we can't run a trivial program, we are probably using a cross compiler.
2171   if (./conftest; exit) 2>/dev/null; then
2172     ac_cv_prog_cc_cross=no
2173   else
2174     ac_cv_prog_cc_cross=yes
2175   fi
2176 else
2177   echo "configure: failed program was:" >&5
2178   cat conftest.$ac_ext >&5
2179   ac_cv_prog_cc_works=no
2180 fi
2181 rm -fr conftest*
2182 ac_ext=c
2183 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2184 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2185 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2186 ac_cpp='$CPP '"$xe_cppflags"
2187 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2188 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2189 cross_compiling=no
2190
2191 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2192 if test $ac_cv_prog_cc_works = no; then
2193   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2194 fi
2195 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2196 echo "configure:2197: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2197 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2198 cross_compiling=$ac_cv_prog_cc_cross
2199
2200 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2201 echo "configure:2202: checking whether we are using GNU C" >&5
2202
2203 cat > conftest.c <<EOF
2204 #ifdef __GNUC__
2205   yes;
2206 #endif
2207 EOF
2208 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2209: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2209   ac_cv_prog_gcc=yes
2210 else
2211   ac_cv_prog_gcc=no
2212 fi
2213
2214 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2215
2216 if test $ac_cv_prog_gcc = yes; then
2217   GCC=yes
2218 else
2219   GCC=
2220 fi
2221
2222 ac_test_CFLAGS="${CFLAGS+set}"
2223 ac_save_CFLAGS="$CFLAGS"
2224 CFLAGS=
2225 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2226 echo "configure:2227: checking whether ${CC-cc} accepts -g" >&5
2227
2228 echo 'void f(){}' > conftest.c
2229 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2230   ac_cv_prog_cc_g=yes
2231 else
2232   ac_cv_prog_cc_g=no
2233 fi
2234 rm -f conftest*
2235
2236
2237 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2238 if test "$ac_test_CFLAGS" = set; then
2239   CFLAGS="$ac_save_CFLAGS"
2240 elif test $ac_cv_prog_cc_g = yes; then
2241   if test "$GCC" = yes; then
2242     CFLAGS="-g -O2"
2243   else
2244     CFLAGS="-g"
2245   fi
2246 else
2247   if test "$GCC" = yes; then
2248     CFLAGS="-O2"
2249   else
2250     CFLAGS=
2251   fi
2252 fi
2253
2254 fi
2255 CFLAGS="$xe_save_CFLAGS"
2256
2257
2258 test -n "$CPP" -a -d "$CPP" && CPP=
2259
2260 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2261
2262 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2263 echo "configure:2264: checking how to run the C preprocessor" >&5
2264 # On Suns, sometimes $CPP names a directory.
2265 if test -n "$CPP" && test -d "$CPP"; then
2266   CPP=
2267 fi
2268 if test -z "$CPP"; then
2269
2270   # This must be in double quotes, not single quotes, because CPP may get
2271   # substituted into the Makefile and "${CC-cc}" will confuse make.
2272   CPP="${CC-cc} -E"
2273   # On the NeXT, cc -E runs the code through the compiler's parser,
2274   # not just through cpp.
2275   cat > conftest.$ac_ext <<EOF
2276 #line 2277 "configure"
2277 #include "confdefs.h"
2278 #include <assert.h>
2279 Syntax Error
2280 EOF
2281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2282 { (eval echo configure:2283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2284 if test -z "$ac_err"; then
2285   :
2286 else
2287   echo "$ac_err" >&5
2288   echo "configure: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   rm -rf conftest*
2291   CPP="${CC-cc} -E -traditional-cpp"
2292   cat > conftest.$ac_ext <<EOF
2293 #line 2294 "configure"
2294 #include "confdefs.h"
2295 #include <assert.h>
2296 Syntax Error
2297 EOF
2298 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2299 { (eval echo configure:2300: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2300 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2301 if test -z "$ac_err"; then
2302   :
2303 else
2304   echo "$ac_err" >&5
2305   echo "configure: failed program was:" >&5
2306   cat conftest.$ac_ext >&5
2307   rm -rf conftest*
2308   CPP="${CC-cc} -nologo -E"
2309   cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include <assert.h>
2313 Syntax Error
2314 EOF
2315 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2316 { (eval echo configure:2317: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2317 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2318 if test -z "$ac_err"; then
2319   :
2320 else
2321   echo "$ac_err" >&5
2322   echo "configure: failed program was:" >&5
2323   cat conftest.$ac_ext >&5
2324   rm -rf conftest*
2325   CPP=/lib/cpp
2326 fi
2327 rm -f conftest*
2328 fi
2329 rm -f conftest*
2330 fi
2331 rm -f conftest*
2332   ac_cv_prog_CPP="$CPP"
2333   CPP="$ac_cv_prog_CPP"
2334 else
2335   ac_cv_prog_CPP="$CPP"
2336 fi
2337 echo "$ac_t""$CPP" 1>&6
2338
2339
2340
2341 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2342 echo "configure:2343: checking for AIX" >&5
2343 cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 #ifdef _AIX
2347   yes
2348 #endif
2349
2350 EOF
2351 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2352   egrep "yes" >/dev/null 2>&1; then
2353   rm -rf conftest*
2354   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2355     Defining _ALL_SOURCE
2356 EOF
2357 cat >> confdefs.h <<\EOF
2358 #define _ALL_SOURCE 1
2359 EOF
2360 }
2361
2362 else
2363   rm -rf conftest*
2364   echo "$ac_t""no" 1>&6
2365 fi
2366 rm -f conftest*
2367
2368  
2369
2370 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2371 echo "configure:2372: checking for GNU libc" >&5
2372 cat > conftest.$ac_ext <<EOF
2373 #line 2374 "configure"
2374 #include "confdefs.h"
2375 #include <features.h>
2376 int main() {
2377
2378 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2379 #error Not a GNU libc system :-(
2380 ******* ======= ******** &&&&&&&&
2381 #endif
2382
2383 ; return 0; }
2384 EOF
2385 if { (eval echo configure:2386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2386   rm -rf conftest*
2387   have_glibc=yes
2388 else
2389   echo "configure: failed program was:" >&5
2390   cat conftest.$ac_ext >&5
2391   rm -rf conftest*
2392   have_glibc=no
2393 fi
2394 rm -f conftest*
2395 echo "$ac_t""$have_glibc" 1>&6
2396 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2397     Defining _GNU_SOURCE
2398 EOF
2399 cat >> confdefs.h <<\EOF
2400 #define _GNU_SOURCE 1
2401 EOF
2402 }
2403
2404
2405 case "$opsys" in
2406   sol2)
2407    { test "$extra_verbose" = "yes" && cat << \EOF
2408     Defining __EXTENSIONS__
2409 EOF
2410 cat >> confdefs.h <<\EOF
2411 #define __EXTENSIONS__ 1
2412 EOF
2413 }
2414
2415       if test "$os_release" -ge 55; then
2416      { test "$extra_verbose" = "yes" && cat << \EOF
2417     Defining _XOPEN_SOURCE = 500
2418 EOF
2419 cat >> confdefs.h <<\EOF
2420 #define _XOPEN_SOURCE 500
2421 EOF
2422 }
2423
2424      { test "$extra_verbose" = "yes" && cat << \EOF
2425     Defining _XOPEN_SOURCE_EXTENDED
2426 EOF
2427 cat >> confdefs.h <<\EOF
2428 #define _XOPEN_SOURCE_EXTENDED 1
2429 EOF
2430 }
2431
2432    fi ;;
2433   linux)
2434     { test "$extra_verbose" = "yes" && cat << \EOF
2435     Defining _POSIX_C_SOURCE = 199506L
2436 EOF
2437 cat >> confdefs.h <<\EOF
2438 #define _POSIX_C_SOURCE 199506L
2439 EOF
2440 }
2441
2442     { test "$extra_verbose" = "yes" && cat << \EOF
2443     Defining _XOPEN_SOURCE = 500
2444 EOF
2445 cat >> confdefs.h <<\EOF
2446 #define _XOPEN_SOURCE 500
2447 EOF
2448 }
2449
2450     { test "$extra_verbose" = "yes" && cat << \EOF
2451     Defining _XOPEN_SOURCE_EXTENDED
2452 EOF
2453 cat >> confdefs.h <<\EOF
2454 #define _XOPEN_SOURCE_EXTENDED 1
2455 EOF
2456 }
2457
2458     ;;
2459 esac
2460
2461 cat > conftest.$ac_ext <<EOF
2462 #line 2463 "configure"
2463 #include "confdefs.h"
2464 int main () {
2465 #if defined __SUNPRO_C
2466 return 11;
2467 #elif defined __DECC
2468 return 12;
2469 #elif defined __USLC__ && defined __SCO_VERSION__
2470 return 13;
2471 #else
2472 return 0;
2473 #endif
2474 }
2475 EOF
2476 if { (eval echo configure:2477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2477 then
2478   :
2479 else
2480   conftest_rc="$?"
2481   echo "configure: failed program was:" >&5
2482   cat conftest.$ac_ext >&5
2483   rm -fr conftest*
2484   case "$conftest_rc" in
2485   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2486   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2487   13) echo "You appear to be using the SCO C compiler."   ; __USLC__=yes ;;
2488 esac
2489 fi
2490 rm -fr conftest*
2491
2492
2493
2494
2495 echo "Extracting information from the machine- and system-dependent headers..."
2496
2497 tempcname="conftest.c"
2498
2499
2500
2501 cat > $tempcname < confdefs.h
2502 cat >> $tempcname <<EOF
2503 #define NOT_C_CODE
2504 #define C_SWITCH_SITE
2505 #define C_SWITCH_X_SITE
2506 #define LD_SWITCH_SITE
2507 #define LD_SWITCH_X_SITE
2508 #define LD_SWITCH_X_SITE_AUX
2509 #define OS_RELEASE $os_release
2510
2511 #ifdef config_opsysfile
2512 #include "$srcdir/src/$opsysfile"
2513 #endif
2514
2515 #ifdef config_machfile
2516 #include "$srcdir/src/$machfile"
2517 #endif
2518
2519 #ifndef LIBS_MACHINE
2520 #define LIBS_MACHINE
2521 #endif
2522 configure___ libs_machine=LIBS_MACHINE
2523
2524 #ifndef LIBS_SYSTEM
2525 #define LIBS_SYSTEM
2526 #endif
2527 configure___ libs_system=LIBS_SYSTEM
2528
2529 #ifndef LIBS_TERMCAP
2530 #define LIBS_TERMCAP
2531 #endif
2532 configure___ libs_termcap=LIBS_TERMCAP
2533
2534 #ifndef LIB_STANDARD
2535 #define LIB_STANDARD
2536 #endif
2537 configure___ libs_standard=LIB_STANDARD
2538
2539
2540 #ifndef OBJECTS_MACHINE
2541 #define OBJECTS_MACHINE
2542 #endif
2543 configure___ objects_machine=OBJECTS_MACHINE
2544
2545 #ifndef OBJECTS_SYSTEM
2546 #define OBJECTS_SYSTEM
2547 #endif
2548 configure___ objects_system=OBJECTS_SYSTEM
2549
2550
2551 #ifndef C_SWITCH_MACHINE
2552 #define C_SWITCH_MACHINE
2553 #endif
2554 configure___ c_switch_machine=C_SWITCH_MACHINE
2555
2556 #ifndef C_SWITCH_SYSTEM
2557 #define C_SWITCH_SYSTEM
2558 #endif
2559 configure___ c_switch_system=C_SWITCH_SYSTEM
2560
2561
2562 #ifndef LD_SWITCH_MACHINE
2563 #define LD_SWITCH_MACHINE
2564 #endif
2565 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2566
2567 #ifndef LD_SWITCH_SYSTEM
2568 #define LD_SWITCH_SYSTEM
2569 #endif
2570 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2571
2572
2573 #ifndef UNEXEC
2574 #define UNEXEC "unexec.o"
2575 #endif
2576 configure___ unexec=UNEXEC
2577
2578
2579 #ifndef LD_SWITCH_SHARED
2580 #define LD_SWITCH_SHARED "-c"
2581 #endif
2582 configure___ ld_switch_shared=LD_SWITCH_SHARED
2583
2584
2585 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2586 configure___ ordinary_ld=ORDINARY_LD
2587
2588 #ifdef ORDINARY_LINK
2589 #define LD ORDINARY_LD
2590 #else /* no ORDINARY LINK */
2591 #ifdef COFF_ENCAPSULATE
2592 #define LD "\$(CC) -nostdlib"
2593 #else /* not COFF_ENCAPSULATE */
2594 #ifdef LINKER
2595 #define LD LINKER
2596 #else /* ! defined (LINKER) */
2597 #define LD "ld"
2598 #endif /* ! defined (LINKER) */
2599 #endif /* ! defined (COFF_ENCAPSULATE) */
2600 #endif /* not ORDINARY_LINK */
2601 configure___ ld=LD
2602
2603 #ifndef LIB_GCC
2604 #define LIB_GCC
2605 #endif
2606 configure___ lib_gcc=LIB_GCC
2607
2608 #ifndef LD_TEXT_START_ADDR
2609 #define LD_TEXT_START_ADDR
2610 #endif
2611 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2612
2613
2614 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2615 #ifdef NO_REMAP
2616 #ifdef COFF_ENCAPSULATE
2617 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2618 #else /* ! defined (COFF_ENCAPSULATE) */
2619 #define START_FILES "pre-crt0.o /lib/crt0.o"
2620 #endif /* ! defined (COFF_ENCAPSULATE) */
2621 #else /* ! defined (NO_REMAP) */
2622 #define START_FILES "ecrt0.o"
2623 #endif /* ! defined (NO_REMAP) */
2624 #endif /* no ORDINARY_LINK */
2625 #ifndef START_FILES
2626 #define START_FILES
2627 #endif
2628 configure___ start_files=START_FILES
2629
2630 #ifdef ORDINARY_LINK
2631 configure___ ordinary_link=yes
2632 #else
2633 configure___ ordinary_link=no
2634 #endif
2635
2636 #ifdef SYSTEM_MALLOC
2637 configure___ system_malloc=yes
2638 #else
2639 configure___ system_malloc=no
2640 #endif
2641
2642 #ifdef TERMINFO
2643 configure___ have_terminfo=yes
2644 #else
2645 configure___ have_terminfo=no
2646 #endif
2647
2648 #ifdef MAIL_USE_FLOCK
2649 configure___ mail_use_flock=yes
2650 #else
2651 configure___ mail_use_flock=no
2652 #endif
2653
2654 #ifdef MAIL_USE_LOCKF
2655 configure___ mail_use_lockf=yes
2656 #else
2657 configure___ mail_use_lockf=no
2658 #endif
2659
2660 #ifdef MAIL_USE_LOCKING
2661 configure___ mail_use_locking=yes
2662 #else
2663 configure___ mail_use_locking=no
2664 #endif
2665
2666 #ifdef HAVE_WIN32_PROCESSES
2667 configure___ win32_processes=yes
2668 #else
2669 configure___ win32_processes=no
2670 #endif
2671
2672 EOF
2673
2674 CPP=`eval "echo $CPP $CPPFLAGS"`
2675 eval `$CPP -Isrc $tempcname \
2676         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2677
2678 rm $tempcname
2679
2680 if test "$pdump" = "yes"; then
2681   ordinary_link="yes"
2682   ld="${ordinary_ld}"
2683   start_files=
2684   libs_standard=
2685   unexec=
2686   lib_gcc=
2687 fi
2688
2689 test "$extra_verbose" = "yes" && \
2690   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 ""
2691
2692 case "$opsys" in mingw* | cygwin*)
2693   cygwin_include=`eval "gcc -print-file-name=libc.a"` ;
2694   cygwin_include=`eval "dirname $cygwin_include"` ;
2695   cygwin_include="-I$cygwin_include/../include" ;
2696   extra_includes="$cygwin_include/mingw32 $cygwin_include/mingw $cygwin_include" ;
2697   case "$opsys" in mingw*)
2698     c_switch_system="$c_switch_system $extra_includes" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$extra_includes\" to \$c_switch_system"; fi ;;
2699   esac
2700   ;;
2701 esac
2702
2703 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2704
2705
2706 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std1" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std1\" to \$c_switch_site"; fi
2707
2708 if test "$__USLC__" = yes; then
2709   echo $ac_n "checking for whether the -Kalloca compiler flag is needed""... $ac_c" 1>&6
2710 echo "configure:2711: checking for whether the -Kalloca compiler flag is needed" >&5
2711   need_kalloca=no
2712   cat > conftest.$ac_ext <<EOF
2713 #line 2714 "configure"
2714 #include "confdefs.h"
2715
2716 int main() {
2717 void *x = alloca(4);
2718 ; return 0; }
2719 EOF
2720 if { (eval echo configure:2721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2721   rm -rf conftest*
2722   :
2723 else
2724   echo "configure: failed program was:" >&5
2725   cat conftest.$ac_ext >&5
2726   rm -rf conftest*
2727   
2728     xe_save_c_switch_system="$c_switch_system"
2729     c_switch_system="$c_switch_system -Kalloca"
2730     cat > conftest.$ac_ext <<EOF
2731 #line 2732 "configure"
2732 #include "confdefs.h"
2733
2734 int main() {
2735 void *x = alloca(4);
2736 ; return 0; }
2737 EOF
2738 if { (eval echo configure:2739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2739   rm -rf conftest*
2740    need_kalloca=yes 
2741 else
2742   echo "configure: failed program was:" >&5
2743   cat conftest.$ac_ext >&5
2744 fi
2745 rm -f conftest*
2746     c_switch_system="$xe_save_c_switch_system"
2747 fi
2748 rm -f conftest*
2749   echo "$ac_t""$need_kalloca" 1>&6
2750   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
2751 fi
2752
2753 if test "$cflags_specified" = "no"; then
2754       if   test "$GCC" = "yes"; then
2755     CFLAGS="-g -O3 -Wall -Wno-switch -Winline -Wmissing-prototypes -Wshadow"
2756             test "$have_glibc" != "yes" && CFLAGS="$CFLAGS -Wpointer-arith"
2757               elif test "$__SUNPRO_C" = "yes"; then
2758     case "$opsys" in
2759       sol2    ) CFLAGS="-v -xO4" ;;
2760       sunos4* ) CFLAGS="-xO2";;
2761     esac
2762   elif test "$__DECC" = "yes"; then
2763     CFLAGS="-O3"
2764   elif test "$CC" = "xlc"; then
2765     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2766     else
2767     CFLAGS="-O" ;  fi
2768 fi
2769
2770 if test "$GCC" = "yes"; then
2771 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2772 echo "configure:2773: checking for buggy gcc versions" >&5
2773 GCC_VERSION=`$CC --version`
2774 case `uname -s`:`uname -m`:$GCC_VERSION in
2775                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2776                         case "$CFLAGS" in
2777             *-O2*|*-O3*)
2778                 case "$CFLAGS" in
2779                     *-fno-schedule-insns*) ;;
2780                     *)
2781                         echo "$ac_t""yes" 1>&6
2782                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2783                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2784                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2785                         ;;
2786                 esac
2787                 ;;
2788         esac
2789         ;;
2790                     Linux:alpha:egcs-2.91.*)
2791         echo "$ac_t""yes" 1>&6
2792         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2793         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2794         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2795         ;;
2796     *:i*86*:2.7.2*)
2797         case "$CFLAGS" in
2798             *-O2*|*-O3*)
2799                 case "$GCC_VERSION" in
2800                     2.7.2)
2801                         case "$CFLAGS" in
2802                             *-fno-strength-reduce*) ;;
2803                             *)
2804                                 echo "$ac_t""yes" 1>&6
2805                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2806                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2807                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2808                                 ;;
2809                         esac
2810                         ;;
2811                 esac
2812                 case "$CFLAGS" in
2813                  *-fno-caller-saves*) ;;
2814                  *)
2815                     echo "$ac_t""yes" 1>&6
2816                     echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2817                     echo "configure: warning: -fno-caller-saves." 1>&2
2818                     { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2819                     ;;
2820                 esac
2821                 ;;
2822         esac
2823         ;;
2824 esac
2825 echo "$ac_t""no" 1>&6
2826 fi
2827
2828
2829 if test "$GCC" = "yes"; then
2830   set x $ld_switch_system; shift; ld_switch_system=""
2831   while test -n "$1"; do
2832     case $1 in
2833       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2834       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2835       -Xlinker* ) ;;
2836       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2837     esac
2838     shift
2839   done
2840 fi
2841
2842 if test "$GCC" = "yes"; then
2843   set x $ld_switch_machine; shift; ld_switch_machine=""
2844   while test -n "$1"; do
2845     case $1 in
2846       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2847       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2848       -Xlinker* ) ;;
2849       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2850     esac
2851     shift
2852   done
2853 fi
2854
2855 if test "$GCC" = "yes"; then
2856   set x $LDFLAGS; shift; LDFLAGS=""
2857   while test -n "$1"; do
2858     case $1 in
2859       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2860       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2861       -Xlinker* ) ;;
2862       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2863     esac
2864     shift
2865   done
2866 fi
2867
2868 if test "$GCC" = "yes"; then
2869   set x $ld_call_shared; shift; ld_call_shared=""
2870   while test -n "$1"; do
2871     case $1 in
2872       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2873       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2874       -Xlinker* ) ;;
2875       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2876     esac
2877     shift
2878   done
2879 fi
2880
2881 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2882    echo "    xemacs will be linked with \"$objects_machine\""
2883  fi
2884 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2885    echo "    xemacs will be linked with \"$objects_system\""
2886  fi
2887 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2888    echo "    xemacs will be linked with \"$unexec\""
2889  fi
2890 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2891    echo "    xemacs will be linked with \"dumper.o\""
2892  fi
2893
2894 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2895 echo "configure:2896: checking for dynodump" >&5
2896 if test "$unexec" != "unexsol2.o"; then
2897   echo "$ac_t""no" 1>&6
2898 else
2899   echo "$ac_t""yes" 1>&6
2900   { test "$extra_verbose" = "yes" && cat << \EOF
2901     Defining DYNODUMP
2902 EOF
2903 cat >> confdefs.h <<\EOF
2904 #define DYNODUMP 1
2905 EOF
2906 }
2907
2908   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2909   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2910   case "$machine" in
2911     sparc   ) dynodump_arch=sparc ;;
2912     *86*    ) dynodump_arch=i386  ;;
2913     powerpc ) dynodump_arch=ppc   ;;
2914   esac
2915     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
2916 fi
2917
2918
2919 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2920
2921 if test "$unexec" = "unexaix.o"; then
2922   if   test "$dynamic" = "no"; then
2923   start_flags="-Wl,-bnso,-bnodelcsect"
2924   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2925   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2926     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2927   done
2928   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2929     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2930   done
2931   
2932 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2933 echo "configure:2934: checking for terminateAndUnload in -lC" >&5
2934 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2935
2936 xe_check_libs=" -lC "
2937 cat > conftest.$ac_ext <<EOF
2938 #line 2939 "configure"
2939 #include "confdefs.h"
2940 /* Override any gcc2 internal prototype to avoid an error.  */
2941 /* We use char because int might match the return type of a gcc2
2942     builtin and then its argument prototype would still apply.  */
2943 char terminateAndUnload();
2944
2945 int main() {
2946 terminateAndUnload()
2947 ; return 0; }
2948 EOF
2949 if { (eval echo configure:2950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2950   rm -rf conftest*
2951   eval "ac_cv_lib_$ac_lib_var=yes"
2952 else
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   eval "ac_cv_lib_$ac_lib_var=no"
2957 fi
2958 rm -f conftest*
2959 xe_check_libs=""
2960
2961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2962   echo "$ac_t""yes" 1>&6
2963   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2964 else
2965   echo "$ac_t""no" 1>&6
2966 fi
2967
2968
2969   fi
2970 elif test -n "$ld_text_start_addr"; then
2971   start_flags="-T $ld_text_start_addr -e __start"
2972 fi
2973
2974
2975
2976
2977 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2978  test -z "$linker" &&  linker='$(CC) -nostdlib'
2979  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2980 fi
2981 test "$GCC" != "yes" && lib_gcc=
2982
2983
2984
2985
2986
2987 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2988 if test -n "$site_libraries"; then
2989   for arg in $site_libraries; do
2990     case "$arg" in
2991      -* ) ;;
2992      * ) test -d "$arg" || \
2993            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2994        arg="-L${arg}" ;;
2995     esac
2996     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2997   done
2998 fi
2999
3000 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3001 if test -n "$site_includes"; then
3002   for arg in $site_includes; do
3003     case "$arg" in
3004       -* ) ;;
3005       * ) test -d "$arg" || \
3006            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3007       arg="-I${arg}" ;;
3008     esac
3009     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3010   done
3011 fi
3012
3013 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3014 if test -n "$site_prefixes"; then
3015   for dir in $site_prefixes; do
3016     lib_dir="${dir}/lib"
3017     inc_dir="${dir}/include"
3018     if test ! -d "$dir"; then
3019       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3020     elif test ! -d "$lib_dir"; then
3021       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3022     else
3023       if test -d "$inc_dir"; then
3024         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
3025       fi
3026       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
3027     fi
3028   done
3029 fi
3030
3031
3032 for dir in "/usr/ccs/lib"; do
3033   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
3034 done
3035
3036 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3037 if test -n "$site_runtime_libraries"; then
3038   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3039   export LD_RUN_PATH
3040 fi
3041
3042
3043
3044
3045
3046 if test -n "$add_runtime_path"; then :;
3047 elif test "$dynamic" = "no"; then add_runtime_path=no
3048 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3049 else case "$opsys" in
3050        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3051        * ) add_runtime_path=no ;;
3052      esac
3053 fi
3054
3055 if test "$add_runtime_path" = "yes"; then
3056       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3057 echo "configure:3058: checking "for runtime libraries flag"" >&5
3058   case "$opsys" in
3059     sol2 ) dash_r="-R" ;;
3060     decosf* | linux* | irix*) dash_r="-rpath " ;;
3061     *)
3062       dash_r=""
3063       for try_dash_r in "-R" "-R " "-rpath "; do
3064         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3065         
3066 if test "$GCC" = "yes"; then
3067   set x $xe_check_libs; shift; xe_check_libs=""
3068   while test -n "$1"; do
3069     case $1 in
3070       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3071       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3072       -Xlinker* ) ;;
3073       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3074     esac
3075     shift
3076   done
3077 fi
3078         cat > conftest.$ac_ext <<EOF
3079 #line 3080 "configure"
3080 #include "confdefs.h"
3081
3082 int main() {
3083
3084 ; return 0; }
3085 EOF
3086 if { (eval echo configure:3087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3087   rm -rf conftest*
3088   dash_r="$try_dash_r"
3089 else
3090   echo "configure: failed program was:" >&5
3091   cat conftest.$ac_ext >&5
3092 fi
3093 rm -f conftest*
3094         xe_check_libs=""
3095         test -n "$dash_r" && break
3096       done ;;
3097   esac
3098   if test -n "$dash_r";
3099     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3100     else echo "$ac_t""NONE" 1>&6
3101   fi
3102 fi
3103
3104 xe_add_unique_runpath_dir='
3105   xe_add_p=yes
3106   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3107   done
3108   if test "$xe_add_p" = "yes"; then
3109     test -n "$runpath" && runpath="${runpath}:"
3110     runpath="${runpath}${xe_runpath_dir}"
3111     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3112   fi'
3113
3114
3115
3116
3117 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3118     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3119   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3120   
3121         runpath="" runpath_dirs=""
3122   if test -n "$LD_RUN_PATH"; then
3123     runpath="$LD_RUN_PATH"
3124   elif test "$GCC" = "yes"; then
3125         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3126     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3127     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3128     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3129       case "$arg" in P,* | -L* | -R* )
3130         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3131           {
3132 xe_runpath_dir="$dir"
3133   test "$xe_runpath_dir" != "/lib"     -a \
3134         "$xe_runpath_dir" != "/usr/lib" -a \
3135         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3136   eval "$xe_add_unique_runpath_dir"
3137 }
3138         done ;;
3139       esac
3140     done
3141     ld_switch_run="$ld_switch_run_save"
3142     rm -f conftest*
3143   else
3144         for arg in $ld_switch_site $ld_switch_x_site; do
3145       case "$arg" in -L*) {
3146 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3147   test "$xe_runpath_dir" != "/lib"     -a \
3148         "$xe_runpath_dir" != "/usr/lib" -a \
3149         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3150   eval "$xe_add_unique_runpath_dir"
3151 };; esac
3152     done
3153         if test "$opsys $need_motif" = "sol2 yes"; then
3154       xe_runpath_dir="/opt/SUNWdt/lib";
3155       eval "$xe_add_unique_runpath_dir";
3156     fi
3157   fi 
3158   if test -n "$runpath"; then
3159     ld_switch_run="${dash_r}${runpath}"
3160     
3161 if test "$GCC" = "yes"; then
3162   set x $ld_switch_run; shift; ld_switch_run=""
3163   while test -n "$1"; do
3164     case $1 in
3165       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3166       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3167       -Xlinker* ) ;;
3168       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3169     esac
3170     shift
3171   done
3172 fi
3173     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3174   fi
3175 fi
3176
3177
3178
3179 GNU_MALLOC=yes
3180 if test "$with_dlmalloc" != "no"; then
3181         doug_lea_malloc=yes
3182 else
3183         doug_lea_malloc=no
3184 fi
3185 after_morecore_hook_exists=yes
3186 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3187 echo "configure:3188: checking for malloc_set_state" >&5
3188
3189 cat > conftest.$ac_ext <<EOF
3190 #line 3191 "configure"
3191 #include "confdefs.h"
3192 /* System header to define __stub macros and hopefully few prototypes,
3193     which can conflict with char malloc_set_state(); below.  */
3194 #include <assert.h>
3195 /* Override any gcc2 internal prototype to avoid an error.  */
3196 /* We use char because int might match the return type of a gcc2
3197     builtin and then its argument prototype would still apply.  */
3198 char malloc_set_state();
3199
3200 int main() {
3201
3202 /* The GNU C library defines this for functions which it implements
3203     to always fail with ENOSYS.  Some functions are actually named
3204     something starting with __ and the normal name is an alias.  */
3205 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3206 choke me
3207 #else
3208 malloc_set_state();
3209 #endif
3210
3211 ; return 0; }
3212 EOF
3213 if { (eval echo configure:3214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3214   rm -rf conftest*
3215   eval "ac_cv_func_malloc_set_state=yes"
3216 else
3217   echo "configure: failed program was:" >&5
3218   cat conftest.$ac_ext >&5
3219   rm -rf conftest*
3220   eval "ac_cv_func_malloc_set_state=no"
3221 fi
3222 rm -f conftest*
3223
3224 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3225   echo "$ac_t""yes" 1>&6
3226   :
3227 else
3228   echo "$ac_t""no" 1>&6
3229 doug_lea_malloc=no
3230 fi
3231
3232 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3233 echo "configure:3234: checking whether __after_morecore_hook exists" >&5
3234 cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3237 extern void (* __after_morecore_hook)();
3238 int main() {
3239 __after_morecore_hook = 0
3240 ; return 0; }
3241 EOF
3242 if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3243   rm -rf conftest*
3244   echo "$ac_t""yes" 1>&6
3245 else
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   echo "$ac_t""no" 1>&6
3250    after_morecore_hook_exists=no
3251 fi
3252 rm -f conftest*
3253 if test "$system_malloc" = "yes" ; then
3254   GNU_MALLOC=no
3255   GNU_MALLOC_reason="
3256     - The GNU allocators don't work with this system configuration."
3257 elif test "$with_system_malloc" = "yes" ; then
3258   GNU_MALLOC=no
3259   GNU_MALLOC_reason="
3260     - User chose not to use GNU allocators."
3261 elif test "$with_debug_malloc" = "yes" ; then
3262   GNU_MALLOC=no
3263   GNU_MALLOC_reason="
3264     - User chose to use Debugging Malloc."
3265 fi
3266
3267 if test "$doug_lea_malloc" = "yes" -a "$GNU_MALLOC" = "yes" ; then
3268   GNU_MALLOC_reason="
3269     - Using Doug Lea's new malloc from the GNU C Library."
3270   { test "$extra_verbose" = "yes" && cat << \EOF
3271     Defining DOUG_LEA_MALLOC
3272 EOF
3273 cat >> confdefs.h <<\EOF
3274 #define DOUG_LEA_MALLOC 1
3275 EOF
3276 }
3277
3278   if test "$after_morecore_hook_exists" = "no" ; then
3279     GNU_MALLOC_reason="
3280     - Using Doug Lea's new malloc from the Linux C Library."
3281     { test "$extra_verbose" = "yes" && cat << \EOF
3282     Defining _NO_MALLOC_WARNING_
3283 EOF
3284 cat >> confdefs.h <<\EOF
3285 #define _NO_MALLOC_WARNING_ 1
3286 EOF
3287 }
3288
3289   fi
3290 fi
3291
3292
3293
3294
3295 # Extract the first word of "ranlib", so it can be a program name with args.
3296 set dummy ranlib; ac_word=$2
3297 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3298 echo "configure:3299: checking for $ac_word" >&5
3299
3300 if test -n "$RANLIB"; then
3301   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3302 else
3303   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3304   ac_dummy="$PATH"
3305   for ac_dir in $ac_dummy; do
3306     test -z "$ac_dir" && ac_dir=.
3307     if test -f $ac_dir/$ac_word; then
3308       ac_cv_prog_RANLIB="ranlib"
3309       break
3310     fi
3311   done
3312   IFS="$ac_save_ifs"
3313   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3314 fi
3315 RANLIB="$ac_cv_prog_RANLIB"
3316 if test -n "$RANLIB"; then
3317   echo "$ac_t""$RANLIB" 1>&6
3318 else
3319   echo "$ac_t""no" 1>&6
3320 fi
3321
3322 ac_aux_dir=
3323 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3324   if test -f $ac_dir/install-sh; then
3325     ac_aux_dir=$ac_dir
3326     ac_install_sh="$ac_aux_dir/install-sh -c"
3327     break
3328   elif test -f $ac_dir/install.sh; then
3329     ac_aux_dir=$ac_dir
3330     ac_install_sh="$ac_aux_dir/install.sh -c"
3331     break
3332   fi
3333 done
3334 if test -z "$ac_aux_dir"; then
3335   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3336 fi
3337 ac_config_guess=$ac_aux_dir/config.guess
3338 ac_config_sub=$ac_aux_dir/config.sub
3339 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3340
3341 # Find a good install program.  We prefer a C program (faster),
3342 # so one script is as good as another.  But avoid the broken or
3343 # incompatible versions:
3344 # SysV /etc/install, /usr/sbin/install
3345 # SunOS /usr/etc/install
3346 # IRIX /sbin/install
3347 # AIX /bin/install
3348 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3349 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3350 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3351 # ./install, which can be erroneously created by make from ./install.sh.
3352 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3353 echo "configure:3354: checking for a BSD compatible install" >&5
3354 if test -z "$INSTALL"; then
3355
3356   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3357   for ac_dir in $PATH; do
3358     # Account for people who put trailing slashes in PATH elements.
3359     case "$ac_dir/" in
3360     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3361     *)
3362       # OSF1 and SCO ODT 3.0 have their own names for install.
3363       # Don't use installbsd from OSF since it installs stuff as root
3364       # by default.
3365       for ac_prog in ginstall scoinst install; do
3366         if test -f $ac_dir/$ac_prog; then
3367           if test $ac_prog = install &&
3368             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3369             # AIX install.  It has an incompatible calling convention.
3370             :
3371           else
3372             ac_cv_path_install="$ac_dir/$ac_prog -c"
3373             break 2
3374           fi
3375         fi
3376       done
3377       ;;
3378     esac
3379   done
3380   IFS="$ac_save_IFS"
3381
3382   if test "${ac_cv_path_install+set}" = set; then
3383     INSTALL="$ac_cv_path_install"
3384   else
3385     # As a last resort, use the slow shell script.  We don't cache a
3386     # path for INSTALL within a source directory, because that will
3387     # break other packages using the cache if that directory is
3388     # removed, or if the path is relative.
3389     INSTALL="$ac_install_sh"
3390   fi
3391 fi
3392 echo "$ac_t""$INSTALL" 1>&6
3393
3394 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3395 # It thinks the first close brace ends the variable substitution.
3396 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3397
3398 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3399
3400 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3401
3402 for ac_prog in 'bison -y' byacc
3403 do
3404 # Extract the first word of "$ac_prog", so it can be a program name with args.
3405 set dummy $ac_prog; ac_word=$2
3406 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3407 echo "configure:3408: checking for $ac_word" >&5
3408
3409 if test -n "$YACC"; then
3410   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3411 else
3412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3413   ac_dummy="$PATH"
3414   for ac_dir in $ac_dummy; do
3415     test -z "$ac_dir" && ac_dir=.
3416     if test -f $ac_dir/$ac_word; then
3417       ac_cv_prog_YACC="$ac_prog"
3418       break
3419     fi
3420   done
3421   IFS="$ac_save_ifs"
3422 fi
3423 YACC="$ac_cv_prog_YACC"
3424 if test -n "$YACC"; then
3425   echo "$ac_t""$YACC" 1>&6
3426 else
3427   echo "$ac_t""no" 1>&6
3428 fi
3429
3430 test -n "$YACC" && break
3431 done
3432 test -n "$YACC" || YACC="yacc"
3433
3434
3435 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 
3436 do
3437 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3438 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3439 echo "configure:3440: checking for $ac_hdr" >&5
3440
3441 cat > conftest.$ac_ext <<EOF
3442 #line 3443 "configure"
3443 #include "confdefs.h"
3444 #include <$ac_hdr>
3445 EOF
3446 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3447 { (eval echo configure:3448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3448 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3449 if test -z "$ac_err"; then
3450   rm -rf conftest*
3451   eval "ac_cv_header_$ac_safe=yes"
3452 else
3453   echo "$ac_err" >&5
3454   echo "configure: failed program was:" >&5
3455   cat conftest.$ac_ext >&5
3456   rm -rf conftest*
3457   eval "ac_cv_header_$ac_safe=no"
3458 fi
3459 rm -f conftest*
3460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3461   echo "$ac_t""yes" 1>&6
3462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3463   { test "$extra_verbose" = "yes" && cat << EOF
3464     Defining $ac_tr_hdr
3465 EOF
3466 cat >> confdefs.h <<EOF
3467 #define $ac_tr_hdr 1
3468 EOF
3469 }
3470  
3471 else
3472   echo "$ac_t""no" 1>&6
3473 fi
3474 done
3475
3476 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3477 echo "configure:3478: checking for sys/wait.h that is POSIX.1 compatible" >&5
3478
3479 cat > conftest.$ac_ext <<EOF
3480 #line 3481 "configure"
3481 #include "confdefs.h"
3482 #include <sys/types.h>
3483 #include <sys/wait.h>
3484 #ifndef WEXITSTATUS
3485 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3486 #endif
3487 #ifndef WIFEXITED
3488 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3489 #endif
3490 int main() {
3491 int s;
3492 wait (&s);
3493 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3497   rm -rf conftest*
3498   ac_cv_header_sys_wait_h=yes
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   ac_cv_header_sys_wait_h=no
3504 fi
3505 rm -f conftest*
3506
3507 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3508 if test $ac_cv_header_sys_wait_h = yes; then
3509   { test "$extra_verbose" = "yes" && cat << \EOF
3510     Defining HAVE_SYS_WAIT_H
3511 EOF
3512 cat >> confdefs.h <<\EOF
3513 #define HAVE_SYS_WAIT_H 1
3514 EOF
3515 }
3516
3517 fi
3518
3519 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3520 echo "configure:3521: checking for ANSI C header files" >&5
3521
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 #include <stdlib.h>
3526 #include <stdarg.h>
3527 #include <string.h>
3528 #include <float.h>
3529 EOF
3530 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3531 { (eval echo configure:3532: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3532 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3533 if test -z "$ac_err"; then
3534   rm -rf conftest*
3535   ac_cv_header_stdc=yes
3536 else
3537   echo "$ac_err" >&5
3538   echo "configure: failed program was:" >&5
3539   cat conftest.$ac_ext >&5
3540   rm -rf conftest*
3541   ac_cv_header_stdc=no
3542 fi
3543 rm -f conftest*
3544
3545 if test $ac_cv_header_stdc = yes; then
3546   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3547 cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 #include <string.h>
3551 EOF
3552 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3553   egrep "memchr" >/dev/null 2>&1; then
3554   :
3555 else
3556   rm -rf conftest*
3557   ac_cv_header_stdc=no
3558 fi
3559 rm -f conftest*
3560
3561 fi
3562
3563 if test $ac_cv_header_stdc = yes; then
3564   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3565 cat > conftest.$ac_ext <<EOF
3566 #line 3567 "configure"
3567 #include "confdefs.h"
3568 #include <stdlib.h>
3569 EOF
3570 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3571   egrep "free" >/dev/null 2>&1; then
3572   :
3573 else
3574   rm -rf conftest*
3575   ac_cv_header_stdc=no
3576 fi
3577 rm -f conftest*
3578
3579 fi
3580
3581 if test $ac_cv_header_stdc = yes; then
3582   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3583 cat > conftest.$ac_ext <<EOF
3584 #line 3585 "configure"
3585 #include "confdefs.h"
3586 #include <ctype.h>
3587 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3588 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3589 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3590 int main () { int i; for (i = 0; i < 256; i++)
3591 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3592 exit (0); }
3593
3594 EOF
3595 if { (eval echo configure:3596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3596 then
3597   :
3598 else
3599   conftest_rc="$?"
3600   echo "configure: failed program was:" >&5
3601   cat conftest.$ac_ext >&5
3602   rm -fr conftest*
3603   ac_cv_header_stdc=no
3604 fi
3605 rm -fr conftest*
3606 fi
3607
3608 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3609 if test $ac_cv_header_stdc = yes; then
3610   { test "$extra_verbose" = "yes" && cat << \EOF
3611     Defining STDC_HEADERS
3612 EOF
3613 cat >> confdefs.h <<\EOF
3614 #define STDC_HEADERS 1
3615 EOF
3616 }
3617
3618 fi
3619
3620 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3621 echo "configure:3622: checking whether time.h and sys/time.h may both be included" >&5
3622
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 #include <sys/types.h>
3627 #include <sys/time.h>
3628 #include <time.h>
3629 int main() {
3630 struct tm *tp;
3631 ; return 0; }
3632 EOF
3633 if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3634   rm -rf conftest*
3635   ac_cv_header_time=yes
3636 else
3637   echo "configure: failed program was:" >&5
3638   cat conftest.$ac_ext >&5
3639   rm -rf conftest*
3640   ac_cv_header_time=no
3641 fi
3642 rm -f conftest*
3643
3644 echo "$ac_t""$ac_cv_header_time" 1>&6
3645 if test $ac_cv_header_time = yes; then
3646   { test "$extra_verbose" = "yes" && cat << \EOF
3647     Defining TIME_WITH_SYS_TIME
3648 EOF
3649 cat >> confdefs.h <<\EOF
3650 #define TIME_WITH_SYS_TIME 1
3651 EOF
3652 }
3653
3654 fi
3655
3656 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3657 echo "configure:3658: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3658
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <sys/types.h>
3663 #include <signal.h>
3664 /* NetBSD declares sys_siglist in unistd.h.  */
3665 #ifdef HAVE_UNISTD_H
3666 #include <unistd.h>
3667 #endif
3668 int main() {
3669 char *msg = *(sys_siglist + 1);
3670 ; return 0; }
3671 EOF
3672 if { (eval echo configure:3673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3673   rm -rf conftest*
3674   ac_cv_decl_sys_siglist=yes
3675 else
3676   echo "configure: failed program was:" >&5
3677   cat conftest.$ac_ext >&5
3678   rm -rf conftest*
3679   ac_cv_decl_sys_siglist=no
3680 fi
3681 rm -f conftest*
3682
3683 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3684 if test $ac_cv_decl_sys_siglist = yes; then
3685   { test "$extra_verbose" = "yes" && cat << \EOF
3686     Defining SYS_SIGLIST_DECLARED
3687 EOF
3688 cat >> confdefs.h <<\EOF
3689 #define SYS_SIGLIST_DECLARED 1
3690 EOF
3691 }
3692
3693 fi
3694
3695
3696
3697 echo $ac_n "checking for utime""... $ac_c" 1>&6
3698 echo "configure:3699: checking for utime" >&5
3699 cat > conftest.$ac_ext <<EOF
3700 #line 3701 "configure"
3701 #include "confdefs.h"
3702 #include <sys/types.h>
3703 #include <utime.h>
3704 int main() {
3705 struct utimbuf x; x.actime = x.modtime = 0; utime ("/", &x);
3706 ; return 0; }
3707 EOF
3708 if { (eval echo configure:3709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3709   rm -rf conftest*
3710   echo "$ac_t""yes" 1>&6
3711    { test "$extra_verbose" = "yes" && cat << \EOF
3712     Defining HAVE_UTIME
3713 EOF
3714 cat >> confdefs.h <<\EOF
3715 #define HAVE_UTIME 1
3716 EOF
3717 }
3718
3719 else
3720   echo "configure: failed program was:" >&5
3721   cat conftest.$ac_ext >&5
3722   rm -rf conftest*
3723   echo "$ac_t""no" 1>&6
3724       for ac_func in utimes
3725 do
3726 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3727 echo "configure:3728: checking for $ac_func" >&5
3728
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 /* System header to define __stub macros and hopefully few prototypes,
3733     which can conflict with char $ac_func(); below.  */
3734 #include <assert.h>
3735 /* Override any gcc2 internal prototype to avoid an error.  */
3736 /* We use char because int might match the return type of a gcc2
3737     builtin and then its argument prototype would still apply.  */
3738 char $ac_func();
3739
3740 int main() {
3741
3742 /* The GNU C library defines this for functions which it implements
3743     to always fail with ENOSYS.  Some functions are actually named
3744     something starting with __ and the normal name is an alias.  */
3745 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3746 choke me
3747 #else
3748 $ac_func();
3749 #endif
3750
3751 ; return 0; }
3752 EOF
3753 if { (eval echo configure:3754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3754   rm -rf conftest*
3755   eval "ac_cv_func_$ac_func=yes"
3756 else
3757   echo "configure: failed program was:" >&5
3758   cat conftest.$ac_ext >&5
3759   rm -rf conftest*
3760   eval "ac_cv_func_$ac_func=no"
3761 fi
3762 rm -f conftest*
3763
3764 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3765   echo "$ac_t""yes" 1>&6
3766     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3767   { test "$extra_verbose" = "yes" && cat << EOF
3768     Defining $ac_tr_func
3769 EOF
3770 cat >> confdefs.h <<EOF
3771 #define $ac_tr_func 1
3772 EOF
3773 }
3774  
3775 else
3776   echo "$ac_t""no" 1>&6
3777 fi
3778 done
3779
3780 fi
3781 rm -f conftest*
3782
3783
3784 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3785 echo "configure:3786: checking return type of signal handlers" >&5
3786
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3790 #include <sys/types.h>
3791 #include <signal.h>
3792 #ifdef signal
3793 #undef signal
3794 #endif
3795 #ifdef __cplusplus
3796 extern "C" void (*signal (int, void (*)(int)))(int);
3797 #else
3798 void (*signal ()) ();
3799 #endif
3800
3801 int main() {
3802 int i;
3803 ; return 0; }
3804 EOF
3805 if { (eval echo configure:3806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3806   rm -rf conftest*
3807   ac_cv_type_signal=void
3808 else
3809   echo "configure: failed program was:" >&5
3810   cat conftest.$ac_ext >&5
3811   rm -rf conftest*
3812   ac_cv_type_signal=int
3813 fi
3814 rm -f conftest*
3815
3816 echo "$ac_t""$ac_cv_type_signal" 1>&6
3817 { test "$extra_verbose" = "yes" && cat << EOF
3818     Defining RETSIGTYPE = $ac_cv_type_signal
3819 EOF
3820 cat >> confdefs.h <<EOF
3821 #define RETSIGTYPE $ac_cv_type_signal
3822 EOF
3823 }
3824
3825
3826 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3827 echo "configure:3828: checking for size_t" >&5
3828
3829 cat > conftest.$ac_ext <<EOF
3830 #line 3831 "configure"
3831 #include "confdefs.h"
3832 #include <sys/types.h>
3833 #if STDC_HEADERS
3834 #include <stdlib.h>
3835 #include <stddef.h>
3836 #endif
3837 EOF
3838 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3839   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3840   rm -rf conftest*
3841   ac_cv_type_size_t=yes
3842 else
3843   rm -rf conftest*
3844   ac_cv_type_size_t=no
3845 fi
3846 rm -f conftest*
3847
3848 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3849 if test $ac_cv_type_size_t = no; then
3850   { test "$extra_verbose" = "yes" && cat << \EOF
3851     Defining size_t = unsigned
3852 EOF
3853 cat >> confdefs.h <<\EOF
3854 #define size_t unsigned
3855 EOF
3856 }
3857
3858 fi
3859
3860 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3861 echo "configure:3862: checking for pid_t" >&5
3862
3863 cat > conftest.$ac_ext <<EOF
3864 #line 3865 "configure"
3865 #include "confdefs.h"
3866 #include <sys/types.h>
3867 #if STDC_HEADERS
3868 #include <stdlib.h>
3869 #include <stddef.h>
3870 #endif
3871 EOF
3872 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3873   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3874   rm -rf conftest*
3875   ac_cv_type_pid_t=yes
3876 else
3877   rm -rf conftest*
3878   ac_cv_type_pid_t=no
3879 fi
3880 rm -f conftest*
3881
3882 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3883 if test $ac_cv_type_pid_t = no; then
3884   { test "$extra_verbose" = "yes" && cat << \EOF
3885     Defining pid_t = int
3886 EOF
3887 cat >> confdefs.h <<\EOF
3888 #define pid_t int
3889 EOF
3890 }
3891
3892 fi
3893
3894 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3895 echo "configure:3896: checking for uid_t in sys/types.h" >&5
3896
3897 cat > conftest.$ac_ext <<EOF
3898 #line 3899 "configure"
3899 #include "confdefs.h"
3900 #include <sys/types.h>
3901 EOF
3902 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3903   egrep "uid_t" >/dev/null 2>&1; then
3904   rm -rf conftest*
3905   ac_cv_type_uid_t=yes
3906 else
3907   rm -rf conftest*
3908   ac_cv_type_uid_t=no
3909 fi
3910 rm -f conftest*
3911
3912
3913 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3914 if test $ac_cv_type_uid_t = no; then
3915   { test "$extra_verbose" = "yes" && cat << \EOF
3916     Defining uid_t = int
3917 EOF
3918 cat >> confdefs.h <<\EOF
3919 #define uid_t int
3920 EOF
3921 }
3922
3923   { test "$extra_verbose" = "yes" && cat << \EOF
3924     Defining gid_t = int
3925 EOF
3926 cat >> confdefs.h <<\EOF
3927 #define gid_t int
3928 EOF
3929 }
3930
3931 fi
3932
3933 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3934 echo "configure:3935: checking for mode_t" >&5
3935
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #include <sys/types.h>
3940 #if STDC_HEADERS
3941 #include <stdlib.h>
3942 #include <stddef.h>
3943 #endif
3944 EOF
3945 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3946   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3947   rm -rf conftest*
3948   ac_cv_type_mode_t=yes
3949 else
3950   rm -rf conftest*
3951   ac_cv_type_mode_t=no
3952 fi
3953 rm -f conftest*
3954
3955 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3956 if test $ac_cv_type_mode_t = no; then
3957   { test "$extra_verbose" = "yes" && cat << \EOF
3958     Defining mode_t = int
3959 EOF
3960 cat >> confdefs.h <<\EOF
3961 #define mode_t int
3962 EOF
3963 }
3964
3965 fi
3966
3967 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3968 echo "configure:3969: checking for off_t" >&5
3969
3970 cat > conftest.$ac_ext <<EOF
3971 #line 3972 "configure"
3972 #include "confdefs.h"
3973 #include <sys/types.h>
3974 #if STDC_HEADERS
3975 #include <stdlib.h>
3976 #include <stddef.h>
3977 #endif
3978 EOF
3979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3980   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3981   rm -rf conftest*
3982   ac_cv_type_off_t=yes
3983 else
3984   rm -rf conftest*
3985   ac_cv_type_off_t=no
3986 fi
3987 rm -f conftest*
3988
3989 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3990 if test $ac_cv_type_off_t = no; then
3991   { test "$extra_verbose" = "yes" && cat << \EOF
3992     Defining off_t = long
3993 EOF
3994 cat >> confdefs.h <<\EOF
3995 #define off_t long
3996 EOF
3997 }
3998
3999 fi
4000
4001 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4002 echo "configure:4003: checking for ssize_t" >&5
4003
4004 cat > conftest.$ac_ext <<EOF
4005 #line 4006 "configure"
4006 #include "confdefs.h"
4007 #include <sys/types.h>
4008 #if STDC_HEADERS
4009 #include <stdlib.h>
4010 #include <stddef.h>
4011 #endif
4012 EOF
4013 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4014   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4015   rm -rf conftest*
4016   ac_cv_type_ssize_t=yes
4017 else
4018   rm -rf conftest*
4019   ac_cv_type_ssize_t=no
4020 fi
4021 rm -f conftest*
4022
4023 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4024 if test $ac_cv_type_ssize_t = no; then
4025   { test "$extra_verbose" = "yes" && cat << \EOF
4026     Defining ssize_t = int
4027 EOF
4028 cat >> confdefs.h <<\EOF
4029 #define ssize_t int
4030 EOF
4031 }
4032
4033 fi
4034
4035
4036 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
4037 echo "configure:4038: checking for socklen_t" >&5
4038 cat > conftest.$ac_ext <<EOF
4039 #line 4040 "configure"
4040 #include "confdefs.h"
4041 #include <sys/socket.h>
4042 socklen_t x;
4043
4044 int main() {
4045
4046 ; return 0; }
4047 EOF
4048 if { (eval echo configure:4049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4049   rm -rf conftest*
4050   echo "$ac_t""yes" 1>&6
4051 else
4052   echo "configure: failed program was:" >&5
4053   cat conftest.$ac_ext >&5
4054   rm -rf conftest*
4055   
4056 cat > conftest.$ac_ext <<EOF
4057 #line 4058 "configure"
4058 #include "confdefs.h"
4059 #include <sys/socket.h>
4060 int accept (int, struct sockaddr *, size_t *);
4061
4062 int main() {
4063
4064 ; return 0; }
4065 EOF
4066 if { (eval echo configure:4067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4067   rm -rf conftest*
4068   
4069 echo "$ac_t""size_t" 1>&6
4070 { test "$extra_verbose" = "yes" && cat << \EOF
4071     Defining socklen_t = size_t
4072 EOF
4073 cat >> confdefs.h <<\EOF
4074 #define socklen_t size_t
4075 EOF
4076 }
4077
4078 else
4079   echo "configure: failed program was:" >&5
4080   cat conftest.$ac_ext >&5
4081   rm -rf conftest*
4082   
4083 echo "$ac_t""int" 1>&6
4084 { test "$extra_verbose" = "yes" && cat << \EOF
4085     Defining socklen_t = int
4086 EOF
4087 cat >> confdefs.h <<\EOF
4088 #define socklen_t int
4089 EOF
4090 }
4091
4092 fi
4093 rm -f conftest*
4094 fi
4095 rm -f conftest*
4096
4097 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4098 echo "configure:4099: checking for struct timeval" >&5
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4102 #ifdef TIME_WITH_SYS_TIME
4103 #include <sys/time.h>
4104 #include <time.h>
4105 #else
4106 #ifdef HAVE_SYS_TIME_H
4107 #include <sys/time.h>
4108 #else
4109 #include <time.h>
4110 #endif
4111 #endif
4112 int main() {
4113 static struct timeval x; x.tv_sec = x.tv_usec;
4114 ; return 0; }
4115 EOF
4116 if { (eval echo configure:4117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4117   rm -rf conftest*
4118   echo "$ac_t""yes" 1>&6
4119   HAVE_TIMEVAL=yes
4120   { test "$extra_verbose" = "yes" && cat << \EOF
4121     Defining HAVE_TIMEVAL
4122 EOF
4123 cat >> confdefs.h <<\EOF
4124 #define HAVE_TIMEVAL 1
4125 EOF
4126 }
4127
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   echo "$ac_t""no" 1>&6
4133    HAVE_TIMEVAL=no
4134 fi
4135 rm -f conftest*
4136
4137 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4138 echo "configure:4139: checking whether struct tm is in sys/time.h or time.h" >&5
4139
4140 cat > conftest.$ac_ext <<EOF
4141 #line 4142 "configure"
4142 #include "confdefs.h"
4143 #include <sys/types.h>
4144 #include <time.h>
4145 int main() {
4146 struct tm *tp; tp->tm_sec;
4147 ; return 0; }
4148 EOF
4149 if { (eval echo configure:4150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4150   rm -rf conftest*
4151   ac_cv_struct_tm=time.h
4152 else
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   ac_cv_struct_tm=sys/time.h
4157 fi
4158 rm -f conftest*
4159
4160 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4161 if test $ac_cv_struct_tm = sys/time.h; then
4162   { test "$extra_verbose" = "yes" && cat << \EOF
4163     Defining TM_IN_SYS_TIME
4164 EOF
4165 cat >> confdefs.h <<\EOF
4166 #define TM_IN_SYS_TIME 1
4167 EOF
4168 }
4169
4170 fi
4171
4172 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4173 echo "configure:4174: checking for tm_zone in struct tm" >&5
4174
4175 cat > conftest.$ac_ext <<EOF
4176 #line 4177 "configure"
4177 #include "confdefs.h"
4178 #include <sys/types.h>
4179 #include <$ac_cv_struct_tm>
4180 int main() {
4181 struct tm tm; tm.tm_zone;
4182 ; return 0; }
4183 EOF
4184 if { (eval echo configure:4185: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4185   rm -rf conftest*
4186   ac_cv_struct_tm_zone=yes
4187 else
4188   echo "configure: failed program was:" >&5
4189   cat conftest.$ac_ext >&5
4190   rm -rf conftest*
4191   ac_cv_struct_tm_zone=no
4192 fi
4193 rm -f conftest*
4194
4195 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4196 if test "$ac_cv_struct_tm_zone" = yes; then
4197   { test "$extra_verbose" = "yes" && cat << \EOF
4198     Defining HAVE_TM_ZONE
4199 EOF
4200 cat >> confdefs.h <<\EOF
4201 #define HAVE_TM_ZONE 1
4202 EOF
4203 }
4204
4205 else
4206   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4207 echo "configure:4208: checking for tzname" >&5
4208
4209 cat > conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 #include "confdefs.h"
4212 #include <time.h>
4213 #ifndef tzname /* For SGI.  */
4214 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4215 #endif
4216 int main() {
4217 atoi(*tzname);
4218 ; return 0; }
4219 EOF
4220 if { (eval echo configure:4221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4221   rm -rf conftest*
4222   ac_cv_var_tzname=yes
4223 else
4224   echo "configure: failed program was:" >&5
4225   cat conftest.$ac_ext >&5
4226   rm -rf conftest*
4227   ac_cv_var_tzname=no
4228 fi
4229 rm -f conftest*
4230
4231 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4232   if test $ac_cv_var_tzname = yes; then
4233     { test "$extra_verbose" = "yes" && cat << \EOF
4234     Defining HAVE_TZNAME
4235 EOF
4236 cat >> confdefs.h <<\EOF
4237 #define HAVE_TZNAME 1
4238 EOF
4239 }
4240
4241   fi
4242 fi
4243
4244
4245 echo $ac_n "checking for working const""... $ac_c" 1>&6
4246 echo "configure:4247: checking for working const" >&5
4247
4248 cat > conftest.$ac_ext <<EOF
4249 #line 4250 "configure"
4250 #include "confdefs.h"
4251
4252 int main() {
4253
4254 /* Ultrix mips cc rejects this.  */
4255 typedef int charset[2]; const charset x;
4256 /* SunOS 4.1.1 cc rejects this.  */
4257 char const *const *ccp;
4258 char **p;
4259 /* NEC SVR4.0.2 mips cc rejects this.  */
4260 struct point {int x, y;};
4261 static struct point const zero = {0,0};
4262 /* AIX XL C 1.02.0.0 rejects this.
4263    It does not let you subtract one const X* pointer from another in an arm
4264    of an if-expression whose if-part is not a constant expression */
4265 const char *g = "string";
4266 ccp = &g + (g ? g-g : 0);
4267 /* HPUX 7.0 cc rejects these. */
4268 ++ccp;
4269 p = (char**) ccp;
4270 ccp = (char const *const *) p;
4271 { /* SCO 3.2v4 cc rejects this.  */
4272   char *t;
4273   char const *s = 0 ? (char *) 0 : (char const *) 0;
4274
4275   *t++ = 0;
4276 }
4277 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4278   int x[] = {25, 17};
4279   const int *foo = &x[0];
4280   ++foo;
4281 }
4282 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4283   typedef const int *iptr;
4284   iptr p = 0;
4285   ++p;
4286 }
4287 { /* AIX XL C 1.02.0.0 rejects this saying
4288      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4289   struct s { int j; const int *ap[3]; };
4290   struct s *b; b->j = 5;
4291 }
4292 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4293   const int foo = 10;
4294 }
4295
4296 ; return 0; }
4297 EOF
4298 if { (eval echo configure:4299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4299   rm -rf conftest*
4300   ac_cv_c_const=yes
4301 else
4302   echo "configure: failed program was:" >&5
4303   cat conftest.$ac_ext >&5
4304   rm -rf conftest*
4305   ac_cv_c_const=no
4306 fi
4307 rm -f conftest*
4308
4309 echo "$ac_t""$ac_cv_c_const" 1>&6
4310 if test $ac_cv_c_const = no; then
4311   { test "$extra_verbose" = "yes" && cat << \EOF
4312     Defining const = 
4313 EOF
4314 cat >> confdefs.h <<\EOF
4315 #define const 
4316 EOF
4317 }
4318
4319 fi
4320
4321
4322 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4323 echo "configure:4324: checking whether ${MAKE-make} sets \${MAKE}" >&5
4324 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4325
4326 cat > conftestmake <<\EOF
4327 all:
4328         @echo 'ac_maketemp="${MAKE}"'
4329 EOF
4330 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4331 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4332 if test -n "$ac_maketemp"; then
4333   eval ac_cv_prog_make_${ac_make}_set=yes
4334 else
4335   eval ac_cv_prog_make_${ac_make}_set=no
4336 fi
4337 rm -f conftestmake
4338 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4339   echo "$ac_t""yes" 1>&6
4340   SET_MAKE=
4341 else
4342   echo "$ac_t""no" 1>&6
4343   SET_MAKE="MAKE=${MAKE-make}"
4344 fi
4345
4346
4347 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4348 echo "configure:4349: checking whether byte ordering is bigendian" >&5
4349
4350 ac_cv_c_bigendian=unknown
4351 # See if sys/param.h defines the BYTE_ORDER macro.
4352 cat > conftest.$ac_ext <<EOF
4353 #line 4354 "configure"
4354 #include "confdefs.h"
4355 #include <sys/types.h>
4356 #include <sys/param.h>
4357 int main() {
4358
4359 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4360  bogus endian macros
4361 #endif
4362 ; return 0; }
4363 EOF
4364 if { (eval echo configure:4365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4365   rm -rf conftest*
4366   # It does; now see whether it defined to BIG_ENDIAN or not.
4367 cat > conftest.$ac_ext <<EOF
4368 #line 4369 "configure"
4369 #include "confdefs.h"
4370 #include <sys/types.h>
4371 #include <sys/param.h>
4372 int main() {
4373
4374 #if BYTE_ORDER != BIG_ENDIAN
4375  not big endian
4376 #endif
4377 ; return 0; }
4378 EOF
4379 if { (eval echo configure:4380: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4380   rm -rf conftest*
4381   ac_cv_c_bigendian=yes
4382 else
4383   echo "configure: failed program was:" >&5
4384   cat conftest.$ac_ext >&5
4385   rm -rf conftest*
4386   ac_cv_c_bigendian=no
4387 fi
4388 rm -f conftest*
4389 else
4390   echo "configure: failed program was:" >&5
4391   cat conftest.$ac_ext >&5
4392 fi
4393 rm -f conftest*
4394 if test $ac_cv_c_bigendian = unknown; then
4395 cat > conftest.$ac_ext <<EOF
4396 #line 4397 "configure"
4397 #include "confdefs.h"
4398 main () {
4399   /* Are we little or big endian?  From Harbison&Steele.  */
4400   union
4401   {
4402     long l;
4403     char c[sizeof (long)];
4404   } u;
4405   u.l = 1;
4406   exit (u.c[sizeof (long) - 1] == 1);
4407 }
4408 EOF
4409 if { (eval echo configure:4410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4410 then
4411   ac_cv_c_bigendian=no
4412 else
4413   conftest_rc="$?"
4414   echo "configure: failed program was:" >&5
4415   cat conftest.$ac_ext >&5
4416   rm -fr conftest*
4417   ac_cv_c_bigendian=yes
4418 fi
4419 rm -fr conftest*
4420 fi
4421
4422 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4423 if test $ac_cv_c_bigendian = yes; then
4424   { test "$extra_verbose" = "yes" && cat << \EOF
4425     Defining WORDS_BIGENDIAN
4426 EOF
4427 cat >> confdefs.h <<\EOF
4428 #define WORDS_BIGENDIAN 1
4429 EOF
4430 }
4431
4432 fi
4433
4434
4435 echo $ac_n "checking size of short""... $ac_c" 1>&6
4436 echo "configure:4437: checking size of short" >&5
4437
4438 cat > conftest.$ac_ext <<EOF
4439 #line 4440 "configure"
4440 #include "confdefs.h"
4441 #include <stdio.h>
4442 #include <sys/types.h>
4443 main()
4444 {
4445   FILE *f=fopen("conftestval", "w");
4446   if (!f) exit(1);
4447   fprintf(f, "%d\n", sizeof(short));
4448   exit(0);
4449 }
4450 EOF
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4452 then
4453   ac_cv_sizeof_short=`cat conftestval`
4454 else
4455   conftest_rc="$?"
4456   echo "configure: failed program was:" >&5
4457   cat conftest.$ac_ext >&5
4458   rm -fr conftest*
4459   ac_cv_sizeof_short=0
4460 fi
4461 rm -fr conftest*
4462 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4463 { test "$extra_verbose" = "yes" && cat << EOF
4464     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4465 EOF
4466 cat >> confdefs.h <<EOF
4467 #define SIZEOF_SHORT $ac_cv_sizeof_short
4468 EOF
4469 }
4470
4471
4472 if test "$ac_cv_sizeof_short" = 0; then
4473   echo ""
4474   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4475   echo "*** PANIC *** Please examine config.log for compilation errors."
4476   exit 1
4477 fi
4478 echo $ac_n "checking size of int""... $ac_c" 1>&6
4479 echo "configure:4480: checking size of int" >&5
4480
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #include <stdio.h>
4485 #include <sys/types.h>
4486 main()
4487 {
4488   FILE *f=fopen("conftestval", "w");
4489   if (!f) exit(1);
4490   fprintf(f, "%d\n", sizeof(int));
4491   exit(0);
4492 }
4493 EOF
4494 if { (eval echo configure:4495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4495 then
4496   ac_cv_sizeof_int=`cat conftestval`
4497 else
4498   conftest_rc="$?"
4499   echo "configure: failed program was:" >&5
4500   cat conftest.$ac_ext >&5
4501   rm -fr conftest*
4502   ac_cv_sizeof_int=0
4503 fi
4504 rm -fr conftest*
4505 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4506 { test "$extra_verbose" = "yes" && cat << EOF
4507     Defining SIZEOF_INT = $ac_cv_sizeof_int
4508 EOF
4509 cat >> confdefs.h <<EOF
4510 #define SIZEOF_INT $ac_cv_sizeof_int
4511 EOF
4512 }
4513
4514
4515 echo $ac_n "checking size of long""... $ac_c" 1>&6
4516 echo "configure:4517: checking size of long" >&5
4517
4518 cat > conftest.$ac_ext <<EOF
4519 #line 4520 "configure"
4520 #include "confdefs.h"
4521 #include <stdio.h>
4522 #include <sys/types.h>
4523 main()
4524 {
4525   FILE *f=fopen("conftestval", "w");
4526   if (!f) exit(1);
4527   fprintf(f, "%d\n", sizeof(long));
4528   exit(0);
4529 }
4530 EOF
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4532 then
4533   ac_cv_sizeof_long=`cat conftestval`
4534 else
4535   conftest_rc="$?"
4536   echo "configure: failed program was:" >&5
4537   cat conftest.$ac_ext >&5
4538   rm -fr conftest*
4539   ac_cv_sizeof_long=0
4540 fi
4541 rm -fr conftest*
4542 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4543 { test "$extra_verbose" = "yes" && cat << EOF
4544     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4545 EOF
4546 cat >> confdefs.h <<EOF
4547 #define SIZEOF_LONG $ac_cv_sizeof_long
4548 EOF
4549 }
4550
4551
4552 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4553 echo "configure:4554: checking size of long long" >&5
4554
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558 #include <stdio.h>
4559 #include <sys/types.h>
4560 main()
4561 {
4562   FILE *f=fopen("conftestval", "w");
4563   if (!f) exit(1);
4564   fprintf(f, "%d\n", sizeof(long long));
4565   exit(0);
4566 }
4567 EOF
4568 if { (eval echo configure:4569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4569 then
4570   ac_cv_sizeof_long_long=`cat conftestval`
4571 else
4572   conftest_rc="$?"
4573   echo "configure: failed program was:" >&5
4574   cat conftest.$ac_ext >&5
4575   rm -fr conftest*
4576   ac_cv_sizeof_long_long=0
4577 fi
4578 rm -fr conftest*
4579 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4580 { test "$extra_verbose" = "yes" && cat << EOF
4581     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4582 EOF
4583 cat >> confdefs.h <<EOF
4584 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4585 EOF
4586 }
4587
4588
4589 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4590 echo "configure:4591: checking size of void *" >&5
4591
4592 cat > conftest.$ac_ext <<EOF
4593 #line 4594 "configure"
4594 #include "confdefs.h"
4595 #include <stdio.h>
4596 #include <sys/types.h>
4597 main()
4598 {
4599   FILE *f=fopen("conftestval", "w");
4600   if (!f) exit(1);
4601   fprintf(f, "%d\n", sizeof(void *));
4602   exit(0);
4603 }
4604 EOF
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4606 then
4607   ac_cv_sizeof_void_p=`cat conftestval`
4608 else
4609   conftest_rc="$?"
4610   echo "configure: failed program was:" >&5
4611   cat conftest.$ac_ext >&5
4612   rm -fr conftest*
4613   ac_cv_sizeof_void_p=0
4614 fi
4615 rm -fr conftest*
4616 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4617 { test "$extra_verbose" = "yes" && cat << EOF
4618     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4619 EOF
4620 cat >> confdefs.h <<EOF
4621 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4622 EOF
4623 }
4624
4625
4626
4627 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4628 echo "configure:4629: checking for long file names" >&5
4629
4630 ac_cv_sys_long_file_names=yes
4631 # Test for long file names in all the places we know might matter:
4632 #      .                the current directory, where building will happen
4633 #      $prefix/lib      where we will be installing things
4634 #      $exec_prefix/lib likewise
4635 # eval it to expand exec_prefix.
4636 #      $TMPDIR          if set, where it might want to write temporary files
4637 # if $TMPDIR is not set:
4638 #      /tmp             where it might want to write temporary files
4639 #      /var/tmp         likewise
4640 #      /usr/tmp         likewise
4641 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4642   ac_tmpdirs="$TMPDIR"
4643 else
4644   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4645 fi
4646 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4647   test -d $ac_dir || continue
4648   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4649   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4650   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4651   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4652   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4653     ac_cv_sys_long_file_names=no
4654     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4655     break
4656   fi
4657   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4658 done
4659
4660 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4661 if test $ac_cv_sys_long_file_names = yes; then
4662   { test "$extra_verbose" = "yes" && cat << \EOF
4663     Defining HAVE_LONG_FILE_NAMES
4664 EOF
4665 cat >> confdefs.h <<\EOF
4666 #define HAVE_LONG_FILE_NAMES 1
4667 EOF
4668 }
4669
4670 fi
4671
4672
4673 echo $ac_n "checking for sin""... $ac_c" 1>&6
4674 echo "configure:4675: checking for sin" >&5
4675
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4679 /* System header to define __stub macros and hopefully few prototypes,
4680     which can conflict with char sin(); below.  */
4681 #include <assert.h>
4682 /* Override any gcc2 internal prototype to avoid an error.  */
4683 /* We use char because int might match the return type of a gcc2
4684     builtin and then its argument prototype would still apply.  */
4685 char sin();
4686
4687 int main() {
4688
4689 /* The GNU C library defines this for functions which it implements
4690     to always fail with ENOSYS.  Some functions are actually named
4691     something starting with __ and the normal name is an alias.  */
4692 #if defined (__stub_sin) || defined (__stub___sin)
4693 choke me
4694 #else
4695 sin();
4696 #endif
4697
4698 ; return 0; }
4699 EOF
4700 if { (eval echo configure:4701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4701   rm -rf conftest*
4702   eval "ac_cv_func_sin=yes"
4703 else
4704   echo "configure: failed program was:" >&5
4705   cat conftest.$ac_ext >&5
4706   rm -rf conftest*
4707   eval "ac_cv_func_sin=no"
4708 fi
4709 rm -f conftest*
4710
4711 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4712   echo "$ac_t""yes" 1>&6
4713   :
4714 else
4715   echo "$ac_t""no" 1>&6
4716
4717 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4718 echo "configure:4719: checking for sin in -lm" >&5
4719 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4720
4721 xe_check_libs=" -lm "
4722 cat > conftest.$ac_ext <<EOF
4723 #line 4724 "configure"
4724 #include "confdefs.h"
4725 /* Override any gcc2 internal prototype to avoid an error.  */
4726 /* We use char because int might match the return type of a gcc2
4727     builtin and then its argument prototype would still apply.  */
4728 char sin();
4729
4730 int main() {
4731 sin()
4732 ; return 0; }
4733 EOF
4734 if { (eval echo configure:4735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4735   rm -rf conftest*
4736   eval "ac_cv_lib_$ac_lib_var=yes"
4737 else
4738   echo "configure: failed program was:" >&5
4739   cat conftest.$ac_ext >&5
4740   rm -rf conftest*
4741   eval "ac_cv_lib_$ac_lib_var=no"
4742 fi
4743 rm -f conftest*
4744 xe_check_libs=""
4745
4746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4747   echo "$ac_t""yes" 1>&6
4748     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4749     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4750   { test "$extra_verbose" = "yes" && cat << EOF
4751     Defining $ac_tr_lib
4752 EOF
4753 cat >> confdefs.h <<EOF
4754 #define $ac_tr_lib 1
4755 EOF
4756 }
4757
4758   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4759
4760 else
4761   echo "$ac_t""no" 1>&6
4762 fi
4763
4764
4765 fi
4766
4767
4768 { test "$extra_verbose" = "yes" && cat << \EOF
4769     Defining LISP_FLOAT_TYPE
4770 EOF
4771 cat >> confdefs.h <<\EOF
4772 #define LISP_FLOAT_TYPE 1
4773 EOF
4774 }
4775
4776
4777 cat > conftest.$ac_ext <<EOF
4778 #line 4779 "configure"
4779 #include "confdefs.h"
4780 #include <math.h>
4781 int main() {
4782 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4783 ; return 0; }
4784 EOF
4785 if { (eval echo configure:4786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4786   rm -rf conftest*
4787   { test "$extra_verbose" = "yes" && cat << \EOF
4788     Defining HAVE_INVERSE_HYPERBOLIC
4789 EOF
4790 cat >> confdefs.h <<\EOF
4791 #define HAVE_INVERSE_HYPERBOLIC 1
4792 EOF
4793 }
4794
4795 else
4796   echo "configure: failed program was:" >&5
4797   cat conftest.$ac_ext >&5
4798 fi
4799 rm -f conftest*
4800
4801 echo "checking type of mail spool file locking" 1>&6
4802 echo "configure:4803: checking type of mail spool file locking" >&5
4803 for ac_func in lockf flock
4804 do
4805 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4806 echo "configure:4807: checking for $ac_func" >&5
4807
4808 cat > conftest.$ac_ext <<EOF
4809 #line 4810 "configure"
4810 #include "confdefs.h"
4811 /* System header to define __stub macros and hopefully few prototypes,
4812     which can conflict with char $ac_func(); below.  */
4813 #include <assert.h>
4814 /* Override any gcc2 internal prototype to avoid an error.  */
4815 /* We use char because int might match the return type of a gcc2
4816     builtin and then its argument prototype would still apply.  */
4817 char $ac_func();
4818
4819 int main() {
4820
4821 /* The GNU C library defines this for functions which it implements
4822     to always fail with ENOSYS.  Some functions are actually named
4823     something starting with __ and the normal name is an alias.  */
4824 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4825 choke me
4826 #else
4827 $ac_func();
4828 #endif
4829
4830 ; return 0; }
4831 EOF
4832 if { (eval echo configure:4833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4833   rm -rf conftest*
4834   eval "ac_cv_func_$ac_func=yes"
4835 else
4836   echo "configure: failed program was:" >&5
4837   cat conftest.$ac_ext >&5
4838   rm -rf conftest*
4839   eval "ac_cv_func_$ac_func=no"
4840 fi
4841 rm -f conftest*
4842
4843 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4844   echo "$ac_t""yes" 1>&6
4845     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4846   { test "$extra_verbose" = "yes" && cat << EOF
4847     Defining $ac_tr_func
4848 EOF
4849 cat >> confdefs.h <<EOF
4850 #define $ac_tr_func 1
4851 EOF
4852 }
4853  
4854 else
4855   echo "$ac_t""no" 1>&6
4856 fi
4857 done
4858
4859 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4860 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4861 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4862 if   test -z "$mail_locking"; then
4863   case "$opsys" in cygwin* | mingw*)
4864     mail_locking=pop ;;
4865   esac
4866 fi
4867
4868 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4869     Defining MAIL_LOCK_LOCKF
4870 EOF
4871 cat >> confdefs.h <<\EOF
4872 #define MAIL_LOCK_LOCKF 1
4873 EOF
4874 }
4875
4876 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4877     Defining MAIL_LOCK_FLOCK
4878 EOF
4879 cat >> confdefs.h <<\EOF
4880 #define MAIL_LOCK_FLOCK 1
4881 EOF
4882 }
4883
4884 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4885     Defining MAIL_LOCK_LOCKING
4886 EOF
4887 cat >> confdefs.h <<\EOF
4888 #define MAIL_LOCK_LOCKING 1
4889 EOF
4890 }
4891
4892 elif test "$mail_locking" = "pop"; then
4893   with_pop=yes
4894   mail_locking=
4895 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4896     Defining MAIL_LOCK_DOT
4897 EOF
4898 cat >> confdefs.h <<\EOF
4899 #define MAIL_LOCK_DOT 1
4900 EOF
4901 }
4902
4903 fi
4904 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4905   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4906 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4907   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4908 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4909   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4910
4911 case "$opsys" in decosf*)
4912   
4913 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4914 echo "configure:4915: checking for cma_open in -lpthreads" >&5
4915 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4916
4917 xe_check_libs=" -lpthreads "
4918 cat > conftest.$ac_ext <<EOF
4919 #line 4920 "configure"
4920 #include "confdefs.h"
4921 /* Override any gcc2 internal prototype to avoid an error.  */
4922 /* We use char because int might match the return type of a gcc2
4923     builtin and then its argument prototype would still apply.  */
4924 char cma_open();
4925
4926 int main() {
4927 cma_open()
4928 ; return 0; }
4929 EOF
4930 if { (eval echo configure:4931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4931   rm -rf conftest*
4932   eval "ac_cv_lib_$ac_lib_var=yes"
4933 else
4934   echo "configure: failed program was:" >&5
4935   cat conftest.$ac_ext >&5
4936   rm -rf conftest*
4937   eval "ac_cv_lib_$ac_lib_var=no"
4938 fi
4939 rm -f conftest*
4940 xe_check_libs=""
4941
4942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4943   echo "$ac_t""yes" 1>&6
4944     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4945     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4946   { test "$extra_verbose" = "yes" && cat << EOF
4947     Defining $ac_tr_lib
4948 EOF
4949 cat >> confdefs.h <<EOF
4950 #define $ac_tr_lib 1
4951 EOF
4952 }
4953
4954   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4955
4956 else
4957   echo "$ac_t""no" 1>&6
4958 fi
4959
4960
4961   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4962     c_switch_site="$c_switch_site -threads" ;;
4963 esac
4964
4965 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4966 echo "configure:4967: checking whether the -xildoff compiler flag is required" >&5
4967 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4968   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4969     then echo "$ac_t""no" 1>&6;
4970     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
4971   fi
4972   else echo "$ac_t""no" 1>&6
4973 fi
4974
4975 if test "$opsys" = "sol2"; then
4976   if test "$os_release" -ge 56; then
4977     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4978 echo "configure:4979: checking for \"-z ignore\" linker flag" >&5
4979     case "`ld -h 2>&1`" in
4980       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4981         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4982       *) echo "$ac_t""no" 1>&6 ;;
4983     esac
4984   fi
4985 fi
4986
4987
4988 echo "checking "for specified window system"" 1>&6
4989 echo "configure:4990: checking "for specified window system"" >&5
4990
4991 if test "$with_x11" != "no"; then
4992     test "$x_includes $x_libraries" != "NONE NONE" && \
4993    window_system=x11 with_x11=yes
4994
4995         
4996       if test "$x_includes $x_libraries" = "NONE NONE" \
4997     -a -n "$OPENWINHOME" \
4998     -a "$OPENWINHOME" != "/usr/openwin" \
4999     -a -d "$OPENWINHOME"; then
5000       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
5001       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
5002       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
5003   fi
5004
5005   if test "$x_includes" = "NONE"; then
5006                     for dir in "/usr/X11" "/usr/X11R6"; do
5007       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
5008     done
5009   fi
5010
5011   if test "$x_libraries" = "NONE"; then
5012     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
5013       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
5014     done
5015   fi
5016
5017   # If we find X, set shell vars x_includes and x_libraries to the
5018 # paths, otherwise set no_x=yes.
5019 # Uses ac_ vars as temps to allow command line to override cache and checks.
5020 # --without-x overrides everything else, but does not touch the cache.
5021 echo $ac_n "checking for X""... $ac_c" 1>&6
5022 echo "configure:5023: checking for X" >&5
5023
5024 # Check whether --with-x or --without-x was given.
5025 if test "${with_x+set}" = set; then
5026   withval="$with_x"
5027   :
5028 fi
5029
5030 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
5031 if test "x$with_x" = xno; then
5032   # The user explicitly disabled X.
5033   have_x=disabled
5034 else
5035   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
5036     # Both variables are already set.
5037     have_x=yes
5038   else
5039
5040 # One or both of the vars are not set, and there is no cached value.
5041 ac_x_includes=NO ac_x_libraries=NO
5042 rm -fr conftestdir
5043 if mkdir conftestdir; then
5044   cd conftestdir
5045   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
5046   cat > Imakefile <<'EOF'
5047 acfindx:
5048         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
5049 EOF
5050   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5051     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5052     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5053     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5054     for ac_extension in a so sl; do
5055       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5056         test -f $ac_im_libdir/libX11.$ac_extension; then
5057         ac_im_usrlibdir=$ac_im_libdir; break
5058       fi
5059     done
5060     # Screen out bogus values from the imake configuration.  They are
5061     # bogus both because they are the default anyway, and because
5062     # using them would break gcc on systems where it needs fixed includes.
5063     case "$ac_im_incroot" in
5064         /usr/include) ;;
5065         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5066     esac
5067     case "$ac_im_usrlibdir" in
5068         /usr/lib | /lib) ;;
5069         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5070     esac
5071   fi
5072   cd ..
5073   rm -fr conftestdir
5074 fi
5075
5076 if test "$ac_x_includes" = NO; then
5077   # Guess where to find include files, by looking for this one X11 .h file.
5078   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5079
5080   # First, try using that file with no special directory specified.
5081 cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084 #include <$x_direct_test_include>
5085 EOF
5086 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5087 { (eval echo configure:5088: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5088 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5089 if test -z "$ac_err"; then
5090   rm -rf conftest*
5091   # We can compile using X headers with no special include directory.
5092 ac_x_includes=
5093 else
5094   echo "$ac_err" >&5
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   # Look for the header file in a standard set of common directories.
5099 # Check X11 before X11Rn because it is often a symlink to the current release.
5100   for ac_dir in               \
5101     /usr/X11/include          \
5102     /usr/X11R6/include        \
5103     /usr/X11R5/include        \
5104     /usr/X11R4/include        \
5105                               \
5106     /usr/include/X11          \
5107     /usr/include/X11R6        \
5108     /usr/include/X11R5        \
5109     /usr/include/X11R4        \
5110                               \
5111     /usr/local/X11/include    \
5112     /usr/local/X11R6/include  \
5113     /usr/local/X11R5/include  \
5114     /usr/local/X11R4/include  \
5115                               \
5116     /usr/local/include/X11    \
5117     /usr/local/include/X11R6  \
5118     /usr/local/include/X11R5  \
5119     /usr/local/include/X11R4  \
5120                               \
5121     /usr/X386/include         \
5122     /usr/x386/include         \
5123     /usr/XFree86/include/X11  \
5124                               \
5125     /usr/include              \
5126     /usr/local/include        \
5127     /usr/unsupported/include  \
5128     /usr/athena/include       \
5129     /usr/local/x11r5/include  \
5130     /usr/lpp/Xamples/include  \
5131                               \
5132     /usr/openwin/include      \
5133     /usr/openwin/share/include \
5134     ; \
5135   do
5136     if test -r "$ac_dir/$x_direct_test_include"; then
5137       ac_x_includes=$ac_dir
5138       break
5139     fi
5140   done
5141 fi
5142 rm -f conftest*
5143 fi # $ac_x_includes = NO
5144
5145 if test "$ac_x_libraries" = NO; then
5146   # Check for the libraries.
5147
5148   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5149   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5150
5151   # See if we find them without any special options.
5152   # Don't add to $LIBS permanently.
5153   ac_save_LIBS="$LIBS"
5154   LIBS="-l$x_direct_test_library $LIBS"
5155 cat > conftest.$ac_ext <<EOF
5156 #line 5157 "configure"
5157 #include "confdefs.h"
5158
5159 int main() {
5160 ${x_direct_test_function}()
5161 ; return 0; }
5162 EOF
5163 if { (eval echo configure:5164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5164   rm -rf conftest*
5165   LIBS="$ac_save_LIBS"
5166 # We can link X programs with no special library path.
5167 ac_x_libraries=
5168 else
5169   echo "configure: failed program was:" >&5
5170   cat conftest.$ac_ext >&5
5171   rm -rf conftest*
5172   LIBS="$ac_save_LIBS"
5173 # First see if replacing the include by lib works.
5174 # Check X11 before X11Rn because it is often a symlink to the current release.
5175 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5176     /usr/X11/lib          \
5177     /usr/X11R6/lib        \
5178     /usr/X11R5/lib        \
5179     /usr/X11R4/lib        \
5180                           \
5181     /usr/lib/X11          \
5182     /usr/lib/X11R6        \
5183     /usr/lib/X11R5        \
5184     /usr/lib/X11R4        \
5185                           \
5186     /usr/local/X11/lib    \
5187     /usr/local/X11R6/lib  \
5188     /usr/local/X11R5/lib  \
5189     /usr/local/X11R4/lib  \
5190                           \
5191     /usr/local/lib/X11    \
5192     /usr/local/lib/X11R6  \
5193     /usr/local/lib/X11R5  \
5194     /usr/local/lib/X11R4  \
5195                           \
5196     /usr/X386/lib         \
5197     /usr/x386/lib         \
5198     /usr/XFree86/lib/X11  \
5199                           \
5200     /usr/lib              \
5201     /usr/local/lib        \
5202     /usr/unsupported/lib  \
5203     /usr/athena/lib       \
5204     /usr/local/x11r5/lib  \
5205     /usr/lpp/Xamples/lib  \
5206     /lib/usr/lib/X11      \
5207                           \
5208     /usr/openwin/lib      \
5209     /usr/openwin/share/lib \
5210     ; \
5211 do
5212   for ac_extension in a so sl; do
5213     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5214       ac_x_libraries=$ac_dir
5215       break 2
5216     fi
5217   done
5218 done
5219 fi
5220 rm -f conftest*
5221 fi # $ac_x_libraries = NO
5222
5223 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5224   # Didn't find X anywhere.  Cache the known absence of X.
5225   ac_cv_have_x="have_x=no"
5226 else
5227   # Record where we found X for the cache.
5228   ac_cv_have_x="have_x=yes \
5229                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5230 fi
5231   fi
5232   eval "$ac_cv_have_x"
5233 fi # $with_x != no
5234
5235 if test "$have_x" != yes; then
5236   echo "$ac_t""$have_x" 1>&6
5237   no_x=yes
5238 else
5239   # If each of the values was on the command line, it overrides each guess.
5240   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5241   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5242   # Update the cache value to reflect the command line values.
5243   ac_cv_have_x="have_x=yes \
5244                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5245   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5246 fi
5247
5248 if test "$no_x" = yes; then
5249   # Not all programs may use this symbol, but it does not hurt to define it.
5250   { test "$extra_verbose" = "yes" && cat << \EOF
5251     Defining X_DISPLAY_MISSING
5252 EOF
5253 cat >> confdefs.h <<\EOF
5254 #define X_DISPLAY_MISSING 1
5255 EOF
5256 }
5257
5258   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5259 else
5260   if test -n "$x_includes"; then
5261     X_CFLAGS="$X_CFLAGS -I$x_includes"
5262   fi
5263
5264   # It would also be nice to do this for all -L options, not just this one.
5265   if test -n "$x_libraries"; then
5266     X_LIBS="$X_LIBS -L$x_libraries"
5267     # For Solaris; some versions of Sun CC require a space after -R and
5268     # others require no space.  Words are not sufficient . . . .
5269     case "`(uname -sr) 2>/dev/null`" in
5270     "SunOS 5"*)
5271       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5272 echo "configure:5273: checking whether -R must be followed by a space" >&5
5273       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5274       cat > conftest.$ac_ext <<EOF
5275 #line 5276 "configure"
5276 #include "confdefs.h"
5277
5278 int main() {
5279
5280 ; return 0; }
5281 EOF
5282 if { (eval echo configure:5283: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5283   rm -rf conftest*
5284   ac_R_nospace=yes
5285 else
5286   echo "configure: failed program was:" >&5
5287   cat conftest.$ac_ext >&5
5288   rm -rf conftest*
5289   ac_R_nospace=no
5290 fi
5291 rm -f conftest*
5292       if test $ac_R_nospace = yes; then
5293         echo "$ac_t""no" 1>&6
5294         X_LIBS="$X_LIBS -R$x_libraries"
5295       else
5296         LIBS="$ac_xsave_LIBS -R $x_libraries"
5297         cat > conftest.$ac_ext <<EOF
5298 #line 5299 "configure"
5299 #include "confdefs.h"
5300
5301 int main() {
5302
5303 ; return 0; }
5304 EOF
5305 if { (eval echo configure:5306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5306   rm -rf conftest*
5307   ac_R_space=yes
5308 else
5309   echo "configure: failed program was:" >&5
5310   cat conftest.$ac_ext >&5
5311   rm -rf conftest*
5312   ac_R_space=no
5313 fi
5314 rm -f conftest*
5315         if test $ac_R_space = yes; then
5316           echo "$ac_t""yes" 1>&6
5317           X_LIBS="$X_LIBS -R $x_libraries"
5318         else
5319           echo "$ac_t""neither works" 1>&6
5320         fi
5321       fi
5322       LIBS="$ac_xsave_LIBS"
5323     esac
5324   fi
5325
5326   # Check for system-dependent libraries X programs must link with.
5327   # Do this before checking for the system-independent R6 libraries
5328   # (-lICE), since we may need -lsocket or whatever for X linking.
5329
5330   if test "$ISC" = yes; then
5331     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5332   else
5333     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5334     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5335     # the Alpha needs dnet_stub (dnet does not exist).
5336     if test "$with_dnet" = "no" ; then
5337 ac_cv_lib_dnet_dnet_ntoa=no
5338 else
5339
5340 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5341 echo "configure:5342: checking for dnet_ntoa in -ldnet" >&5
5342 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5343
5344 xe_check_libs=" -ldnet "
5345 cat > conftest.$ac_ext <<EOF
5346 #line 5347 "configure"
5347 #include "confdefs.h"
5348 /* Override any gcc2 internal prototype to avoid an error.  */
5349 /* We use char because int might match the return type of a gcc2
5350     builtin and then its argument prototype would still apply.  */
5351 char dnet_ntoa();
5352
5353 int main() {
5354 dnet_ntoa()
5355 ; return 0; }
5356 EOF
5357 if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5358   rm -rf conftest*
5359   eval "ac_cv_lib_$ac_lib_var=yes"
5360 else
5361   echo "configure: failed program was:" >&5
5362   cat conftest.$ac_ext >&5
5363   rm -rf conftest*
5364   eval "ac_cv_lib_$ac_lib_var=no"
5365 fi
5366 rm -f conftest*
5367 xe_check_libs=""
5368
5369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5370   echo "$ac_t""yes" 1>&6
5371   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5372 else
5373   echo "$ac_t""no" 1>&6
5374 fi
5375
5376 fi
5377
5378     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5379       
5380 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5381 echo "configure:5382: checking for dnet_ntoa in -ldnet_stub" >&5
5382 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5383
5384 xe_check_libs=" -ldnet_stub "
5385 cat > conftest.$ac_ext <<EOF
5386 #line 5387 "configure"
5387 #include "confdefs.h"
5388 /* Override any gcc2 internal prototype to avoid an error.  */
5389 /* We use char because int might match the return type of a gcc2
5390     builtin and then its argument prototype would still apply.  */
5391 char dnet_ntoa();
5392
5393 int main() {
5394 dnet_ntoa()
5395 ; return 0; }
5396 EOF
5397 if { (eval echo configure:5398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5398   rm -rf conftest*
5399   eval "ac_cv_lib_$ac_lib_var=yes"
5400 else
5401   echo "configure: failed program was:" >&5
5402   cat conftest.$ac_ext >&5
5403   rm -rf conftest*
5404   eval "ac_cv_lib_$ac_lib_var=no"
5405 fi
5406 rm -f conftest*
5407 xe_check_libs=""
5408
5409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5410   echo "$ac_t""yes" 1>&6
5411   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5412 else
5413   echo "$ac_t""no" 1>&6
5414 fi
5415
5416
5417     fi
5418
5419     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5420     # to get the SysV transport functions.
5421     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5422     # needs -lnsl.
5423     # The nsl library prevents programs from opening the X display
5424     # on Irix 5.2, according to dickey@clark.net.
5425     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5426 echo "configure:5427: checking for gethostbyname" >&5
5427
5428 cat > conftest.$ac_ext <<EOF
5429 #line 5430 "configure"
5430 #include "confdefs.h"
5431 /* System header to define __stub macros and hopefully few prototypes,
5432     which can conflict with char gethostbyname(); below.  */
5433 #include <assert.h>
5434 /* Override any gcc2 internal prototype to avoid an error.  */
5435 /* We use char because int might match the return type of a gcc2
5436     builtin and then its argument prototype would still apply.  */
5437 char gethostbyname();
5438
5439 int main() {
5440
5441 /* The GNU C library defines this for functions which it implements
5442     to always fail with ENOSYS.  Some functions are actually named
5443     something starting with __ and the normal name is an alias.  */
5444 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5445 choke me
5446 #else
5447 gethostbyname();
5448 #endif
5449
5450 ; return 0; }
5451 EOF
5452 if { (eval echo configure:5453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5453   rm -rf conftest*
5454   eval "ac_cv_func_gethostbyname=yes"
5455 else
5456   echo "configure: failed program was:" >&5
5457   cat conftest.$ac_ext >&5
5458   rm -rf conftest*
5459   eval "ac_cv_func_gethostbyname=no"
5460 fi
5461 rm -f conftest*
5462
5463 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5464   echo "$ac_t""yes" 1>&6
5465   :
5466 else
5467   echo "$ac_t""no" 1>&6
5468 fi
5469
5470     if test $ac_cv_func_gethostbyname = no; then
5471       
5472 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5473 echo "configure:5474: checking for gethostbyname in -lnsl" >&5
5474 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5475
5476 xe_check_libs=" -lnsl "
5477 cat > conftest.$ac_ext <<EOF
5478 #line 5479 "configure"
5479 #include "confdefs.h"
5480 /* Override any gcc2 internal prototype to avoid an error.  */
5481 /* We use char because int might match the return type of a gcc2
5482     builtin and then its argument prototype would still apply.  */
5483 char gethostbyname();
5484
5485 int main() {
5486 gethostbyname()
5487 ; return 0; }
5488 EOF
5489 if { (eval echo configure:5490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5490   rm -rf conftest*
5491   eval "ac_cv_lib_$ac_lib_var=yes"
5492 else
5493   echo "configure: failed program was:" >&5
5494   cat conftest.$ac_ext >&5
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=no"
5497 fi
5498 rm -f conftest*
5499 xe_check_libs=""
5500
5501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5502   echo "$ac_t""yes" 1>&6
5503   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5504 else
5505   echo "$ac_t""no" 1>&6
5506 fi
5507
5508
5509     fi
5510
5511     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5512     # socket/setsockopt and other routines are undefined under SCO ODT
5513     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5514     # on later versions), says simon@lia.di.epfl.ch: it contains
5515     # gethostby* variants that don't use the nameserver (or something).
5516     # -lsocket must be given before -lnsl if both are needed.
5517     # We assume that if connect needs -lnsl, so does gethostbyname.
5518     echo $ac_n "checking for connect""... $ac_c" 1>&6
5519 echo "configure:5520: checking for connect" >&5
5520
5521 cat > conftest.$ac_ext <<EOF
5522 #line 5523 "configure"
5523 #include "confdefs.h"
5524 /* System header to define __stub macros and hopefully few prototypes,
5525     which can conflict with char connect(); below.  */
5526 #include <assert.h>
5527 /* Override any gcc2 internal prototype to avoid an error.  */
5528 /* We use char because int might match the return type of a gcc2
5529     builtin and then its argument prototype would still apply.  */
5530 char connect();
5531
5532 int main() {
5533
5534 /* The GNU C library defines this for functions which it implements
5535     to always fail with ENOSYS.  Some functions are actually named
5536     something starting with __ and the normal name is an alias.  */
5537 #if defined (__stub_connect) || defined (__stub___connect)
5538 choke me
5539 #else
5540 connect();
5541 #endif
5542
5543 ; return 0; }
5544 EOF
5545 if { (eval echo configure:5546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5546   rm -rf conftest*
5547   eval "ac_cv_func_connect=yes"
5548 else
5549   echo "configure: failed program was:" >&5
5550   cat conftest.$ac_ext >&5
5551   rm -rf conftest*
5552   eval "ac_cv_func_connect=no"
5553 fi
5554 rm -f conftest*
5555
5556 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5557   echo "$ac_t""yes" 1>&6
5558   :
5559 else
5560   echo "$ac_t""no" 1>&6
5561 fi
5562
5563     if test $ac_cv_func_connect = no; then
5564       
5565 xe_msg_checking="for connect in -lsocket"
5566 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5567 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5568 echo "configure:5569: checking "$xe_msg_checking"" >&5
5569 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5570
5571 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5572 cat > conftest.$ac_ext <<EOF
5573 #line 5574 "configure"
5574 #include "confdefs.h"
5575 /* Override any gcc2 internal prototype to avoid an error.  */
5576 /* We use char because int might match the return type of a gcc2
5577     builtin and then its argument prototype would still apply.  */
5578 char connect();
5579
5580 int main() {
5581 connect()
5582 ; return 0; }
5583 EOF
5584 if { (eval echo configure:5585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5585   rm -rf conftest*
5586   eval "ac_cv_lib_$ac_lib_var=yes"
5587 else
5588   echo "configure: failed program was:" >&5
5589   cat conftest.$ac_ext >&5
5590   rm -rf conftest*
5591   eval "ac_cv_lib_$ac_lib_var=no"
5592 fi
5593 rm -f conftest*
5594 xe_check_libs=""
5595
5596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5597   echo "$ac_t""yes" 1>&6
5598   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5599 else
5600   echo "$ac_t""no" 1>&6
5601 fi
5602
5603
5604     fi
5605
5606     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5607     echo $ac_n "checking for remove""... $ac_c" 1>&6
5608 echo "configure:5609: checking for remove" >&5
5609
5610 cat > conftest.$ac_ext <<EOF
5611 #line 5612 "configure"
5612 #include "confdefs.h"
5613 /* System header to define __stub macros and hopefully few prototypes,
5614     which can conflict with char remove(); below.  */
5615 #include <assert.h>
5616 /* Override any gcc2 internal prototype to avoid an error.  */
5617 /* We use char because int might match the return type of a gcc2
5618     builtin and then its argument prototype would still apply.  */
5619 char remove();
5620
5621 int main() {
5622
5623 /* The GNU C library defines this for functions which it implements
5624     to always fail with ENOSYS.  Some functions are actually named
5625     something starting with __ and the normal name is an alias.  */
5626 #if defined (__stub_remove) || defined (__stub___remove)
5627 choke me
5628 #else
5629 remove();
5630 #endif
5631
5632 ; return 0; }
5633 EOF
5634 if { (eval echo configure:5635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5635   rm -rf conftest*
5636   eval "ac_cv_func_remove=yes"
5637 else
5638   echo "configure: failed program was:" >&5
5639   cat conftest.$ac_ext >&5
5640   rm -rf conftest*
5641   eval "ac_cv_func_remove=no"
5642 fi
5643 rm -f conftest*
5644
5645 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5646   echo "$ac_t""yes" 1>&6
5647   :
5648 else
5649   echo "$ac_t""no" 1>&6
5650 fi
5651
5652     if test $ac_cv_func_remove = no; then
5653       
5654 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5655 echo "configure:5656: checking for remove in -lposix" >&5
5656 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5657
5658 xe_check_libs=" -lposix "
5659 cat > conftest.$ac_ext <<EOF
5660 #line 5661 "configure"
5661 #include "confdefs.h"
5662 /* Override any gcc2 internal prototype to avoid an error.  */
5663 /* We use char because int might match the return type of a gcc2
5664     builtin and then its argument prototype would still apply.  */
5665 char remove();
5666
5667 int main() {
5668 remove()
5669 ; return 0; }
5670 EOF
5671 if { (eval echo configure:5672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5672   rm -rf conftest*
5673   eval "ac_cv_lib_$ac_lib_var=yes"
5674 else
5675   echo "configure: failed program was:" >&5
5676   cat conftest.$ac_ext >&5
5677   rm -rf conftest*
5678   eval "ac_cv_lib_$ac_lib_var=no"
5679 fi
5680 rm -f conftest*
5681 xe_check_libs=""
5682
5683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5684   echo "$ac_t""yes" 1>&6
5685   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5686 else
5687   echo "$ac_t""no" 1>&6
5688 fi
5689
5690
5691     fi
5692
5693     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5694     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5695 echo "configure:5696: checking for shmat" >&5
5696
5697 cat > conftest.$ac_ext <<EOF
5698 #line 5699 "configure"
5699 #include "confdefs.h"
5700 /* System header to define __stub macros and hopefully few prototypes,
5701     which can conflict with char shmat(); below.  */
5702 #include <assert.h>
5703 /* Override any gcc2 internal prototype to avoid an error.  */
5704 /* We use char because int might match the return type of a gcc2
5705     builtin and then its argument prototype would still apply.  */
5706 char shmat();
5707
5708 int main() {
5709
5710 /* The GNU C library defines this for functions which it implements
5711     to always fail with ENOSYS.  Some functions are actually named
5712     something starting with __ and the normal name is an alias.  */
5713 #if defined (__stub_shmat) || defined (__stub___shmat)
5714 choke me
5715 #else
5716 shmat();
5717 #endif
5718
5719 ; return 0; }
5720 EOF
5721 if { (eval echo configure:5722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5722   rm -rf conftest*
5723   eval "ac_cv_func_shmat=yes"
5724 else
5725   echo "configure: failed program was:" >&5
5726   cat conftest.$ac_ext >&5
5727   rm -rf conftest*
5728   eval "ac_cv_func_shmat=no"
5729 fi
5730 rm -f conftest*
5731
5732 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5733   echo "$ac_t""yes" 1>&6
5734   :
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739     if test $ac_cv_func_shmat = no; then
5740       
5741 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5742 echo "configure:5743: checking for shmat in -lipc" >&5
5743 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5744
5745 xe_check_libs=" -lipc "
5746 cat > conftest.$ac_ext <<EOF
5747 #line 5748 "configure"
5748 #include "confdefs.h"
5749 /* Override any gcc2 internal prototype to avoid an error.  */
5750 /* We use char because int might match the return type of a gcc2
5751     builtin and then its argument prototype would still apply.  */
5752 char shmat();
5753
5754 int main() {
5755 shmat()
5756 ; return 0; }
5757 EOF
5758 if { (eval echo configure:5759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5759   rm -rf conftest*
5760   eval "ac_cv_lib_$ac_lib_var=yes"
5761 else
5762   echo "configure: failed program was:" >&5
5763   cat conftest.$ac_ext >&5
5764   rm -rf conftest*
5765   eval "ac_cv_lib_$ac_lib_var=no"
5766 fi
5767 rm -f conftest*
5768 xe_check_libs=""
5769
5770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5771   echo "$ac_t""yes" 1>&6
5772   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5773 else
5774   echo "$ac_t""no" 1>&6
5775 fi
5776
5777
5778     fi
5779   fi
5780
5781   # Check for libraries that X11R6 Xt/Xaw programs need.
5782   ac_save_LDFLAGS="$LDFLAGS"
5783   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5784   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5785   # check for ICE first), but we must link in the order -lSM -lICE or
5786   # we get undefined symbols.  So assume we have SM if we have ICE.
5787   # These have to be linked with before -lX11, unlike the other
5788   # libraries we check for below, so use a different variable.
5789   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5790   
5791 xe_msg_checking="for IceConnectionNumber in -lICE"
5792 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5793 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5794 echo "configure:5795: checking "$xe_msg_checking"" >&5
5795 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5796
5797 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5798 cat > conftest.$ac_ext <<EOF
5799 #line 5800 "configure"
5800 #include "confdefs.h"
5801 /* Override any gcc2 internal prototype to avoid an error.  */
5802 /* We use char because int might match the return type of a gcc2
5803     builtin and then its argument prototype would still apply.  */
5804 char IceConnectionNumber();
5805
5806 int main() {
5807 IceConnectionNumber()
5808 ; return 0; }
5809 EOF
5810 if { (eval echo configure:5811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5811   rm -rf conftest*
5812   eval "ac_cv_lib_$ac_lib_var=yes"
5813 else
5814   echo "configure: failed program was:" >&5
5815   cat conftest.$ac_ext >&5
5816   rm -rf conftest*
5817   eval "ac_cv_lib_$ac_lib_var=no"
5818 fi
5819 rm -f conftest*
5820 xe_check_libs=""
5821
5822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5823   echo "$ac_t""yes" 1>&6
5824   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5825 else
5826   echo "$ac_t""no" 1>&6
5827 fi
5828
5829
5830   LDFLAGS="$ac_save_LDFLAGS"
5831
5832 fi
5833  # Autoconf claims to find X library and include dirs for us.
5834   if test "$no_x" = "yes"
5835   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5836   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5837   fi
5838 fi
5839
5840 case "$with_x11" in
5841   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5842   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5843 esac
5844
5845 if test "$with_x11" = "yes"; then
5846   { test "$extra_verbose" = "yes" && cat << \EOF
5847     Defining HAVE_X_WINDOWS
5848 EOF
5849 cat >> confdefs.h <<\EOF
5850 #define HAVE_X_WINDOWS 1
5851 EOF
5852 }
5853
5854   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5855   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5856
5857       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5858     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5859     if test -d "$lib_dir" -a -d "$inc_dir"; then
5860       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5861         x_libraries="$lib_dir $x_libraries"
5862         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5863       esac
5864       case "$x_includes" in "$inc_dir"* ) ;; *)
5865         x_includes="$inc_dir $x_includes"
5866         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5867       esac
5868       break;       fi
5869   done
5870
5871     for rel in "X11R6" "X11R5" "X11R4"; do
5872     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5873     if test -d "$lib_dir" -a -d "$inc_dir"; then
5874       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5875         x_libraries="$x_libraries $lib_dir"
5876         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5877       esac
5878       case "$x_includes" in "$inc_dir"* ) ;; *)
5879         x_includes="$x_includes $inc_dir"
5880         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5881       esac
5882       break;     fi
5883   done
5884
5885     case "$opsys" in
5886   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 ;;
5887   esac
5888
5889   ld_switch_x_site="$X_LIBS"
5890
5891   
5892 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5893     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5894   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5895   
5896         runpath="" runpath_dirs=""
5897   if test -n "$LD_RUN_PATH"; then
5898     runpath="$LD_RUN_PATH"
5899   elif test "$GCC" = "yes"; then
5900         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5901     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5902     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5903     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5904       case "$arg" in P,* | -L* | -R* )
5905         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5906           {
5907 xe_runpath_dir="$dir"
5908   test "$xe_runpath_dir" != "/lib"     -a \
5909         "$xe_runpath_dir" != "/usr/lib" -a \
5910         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5911   eval "$xe_add_unique_runpath_dir"
5912 }
5913         done ;;
5914       esac
5915     done
5916     ld_switch_run="$ld_switch_run_save"
5917     rm -f conftest*
5918   else
5919         for arg in $ld_switch_site $ld_switch_x_site; do
5920       case "$arg" in -L*) {
5921 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5922   test "$xe_runpath_dir" != "/lib"     -a \
5923         "$xe_runpath_dir" != "/usr/lib" -a \
5924         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5925   eval "$xe_add_unique_runpath_dir"
5926 };; esac
5927     done
5928         if test "$opsys $need_motif" = "sol2 yes"; then
5929       xe_runpath_dir="/opt/SUNWdt/lib";
5930       eval "$xe_add_unique_runpath_dir";
5931     fi
5932   fi 
5933   if test -n "$runpath"; then
5934     ld_switch_run="${dash_r}${runpath}"
5935     
5936 if test "$GCC" = "yes"; then
5937   set x $ld_switch_run; shift; ld_switch_run=""
5938   while test -n "$1"; do
5939     case $1 in
5940       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5941       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5942       -Xlinker* ) ;;
5943       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5944     esac
5945     shift
5946   done
5947 fi
5948     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5949   fi
5950 fi
5951
5952
5953   if test "$extra_verbose" = "yes"; then
5954     echo; echo "X11 compilation variables:"
5955     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5956     echo
5957   fi
5958
5959             bitmapdirs=
5960   if test "$x_includes" != NONE; then
5961     for i in $x_includes; do
5962       if test -d "$i/bitmaps"; then
5963         bitmapdirs="$i/bitmaps:$bitmapdirs"
5964       fi
5965       if test -d "$i/X11/bitmaps"; then
5966         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5967       fi
5968     done
5969     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5970   fi
5971   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5972     Defining BITMAPDIR = "$bitmapdirs"
5973 EOF
5974 cat >> confdefs.h <<EOF
5975 #define BITMAPDIR "$bitmapdirs"
5976 EOF
5977 }
5978
5979
5980     echo "checking for X defines extracted by xmkmf" 1>&6
5981 echo "configure:5982: checking for X defines extracted by xmkmf" >&5
5982   rm -fr conftestdir
5983   if mkdir conftestdir; then
5984     cd conftestdir
5985     cat > Imakefile <<'EOF'
5986 xetest:
5987         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5988 EOF
5989     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5990       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5991       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5992     fi
5993     cd ..
5994     rm -fr conftestdir
5995     for word in $xmkmf_defines; do
5996       case "$word" in -D* )
5997         sym=`echo '' $word | sed -e 's:^ *-D::' -e 's:=.*::'`
5998         case "$word" in
5999           -D*=* ) val=`echo '' $word | sed -e 's:^.*=::'` ;;
6000           *     ) val=1 ;;
6001         esac
6002         if grep "^#define $sym " confdefs.h >/dev/null; then :; else
6003           if test "$val" = "1"
6004             then { test "$extra_verbose" = "yes" && cat << EOF
6005     Defining $sym
6006 EOF
6007 cat >> confdefs.h <<EOF
6008 #define $sym 1
6009 EOF
6010 }
6011
6012             else { test "$extra_verbose" = "yes" && cat << EOF
6013     Defining $sym = $val
6014 EOF
6015 cat >> confdefs.h <<EOF
6016 #define $sym $val
6017 EOF
6018 }
6019
6020           fi
6021         fi  ;;
6022       esac
6023     done
6024   fi
6025
6026     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
6027 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
6028 echo "configure:6029: checking for X11/Intrinsic.h" >&5
6029
6030 cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033 #include <X11/Intrinsic.h>
6034 EOF
6035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6036 { (eval echo configure:6037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6038 if test -z "$ac_err"; then
6039   rm -rf conftest*
6040   eval "ac_cv_header_$ac_safe=yes"
6041 else
6042   echo "$ac_err" >&5
6043   echo "configure: failed program was:" >&5
6044   cat conftest.$ac_ext >&5
6045   rm -rf conftest*
6046   eval "ac_cv_header_$ac_safe=no"
6047 fi
6048 rm -f conftest*
6049 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6050   echo "$ac_t""yes" 1>&6
6051   :
6052 else
6053   echo "$ac_t""no" 1>&6
6054 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
6055 fi
6056
6057
6058       
6059 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6060 echo "configure:6061: checking for XOpenDisplay in -lX11" >&5
6061 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6062
6063 xe_check_libs=" -lX11 "
6064 cat > conftest.$ac_ext <<EOF
6065 #line 6066 "configure"
6066 #include "confdefs.h"
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 /* We use char because int might match the return type of a gcc2
6069     builtin and then its argument prototype would still apply.  */
6070 char XOpenDisplay();
6071
6072 int main() {
6073 XOpenDisplay()
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=no"
6084 fi
6085 rm -f conftest*
6086 xe_check_libs=""
6087
6088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6089   echo "$ac_t""yes" 1>&6
6090   have_lib_x11=yes
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094
6095
6096   if test "$have_lib_x11" != "yes"; then
6097     
6098 xe_msg_checking="for XGetFontProperty in -lX11"
6099 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6100 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6101 echo "configure:6102: checking "$xe_msg_checking"" >&5
6102 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6103
6104 xe_check_libs=" -lX11 -b i486-linuxaout"
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 /* Override any gcc2 internal prototype to avoid an error.  */
6109 /* We use char because int might match the return type of a gcc2
6110     builtin and then its argument prototype would still apply.  */
6111 char XGetFontProperty();
6112
6113 int main() {
6114 XGetFontProperty()
6115 ; return 0; }
6116 EOF
6117 if { (eval echo configure:6118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6118   rm -rf conftest*
6119   eval "ac_cv_lib_$ac_lib_var=yes"
6120 else
6121   echo "configure: failed program was:" >&5
6122   cat conftest.$ac_ext >&5
6123   rm -rf conftest*
6124   eval "ac_cv_lib_$ac_lib_var=no"
6125 fi
6126 rm -f conftest*
6127 xe_check_libs=""
6128
6129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6130   echo "$ac_t""yes" 1>&6
6131   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6132 else
6133   echo "$ac_t""no" 1>&6
6134 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6135 fi
6136
6137
6138   fi
6139   libs_x="-lX11"
6140   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6141
6142     
6143 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6144 echo "configure:6145: checking for XShapeSelectInput in -lXext" >&5
6145 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6146
6147 xe_check_libs=" -lXext "
6148 cat > conftest.$ac_ext <<EOF
6149 #line 6150 "configure"
6150 #include "confdefs.h"
6151 /* Override any gcc2 internal prototype to avoid an error.  */
6152 /* We use char because int might match the return type of a gcc2
6153     builtin and then its argument prototype would still apply.  */
6154 char XShapeSelectInput();
6155
6156 int main() {
6157 XShapeSelectInput()
6158 ; return 0; }
6159 EOF
6160 if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6161   rm -rf conftest*
6162   eval "ac_cv_lib_$ac_lib_var=yes"
6163 else
6164   echo "configure: failed program was:" >&5
6165   cat conftest.$ac_ext >&5
6166   rm -rf conftest*
6167   eval "ac_cv_lib_$ac_lib_var=no"
6168 fi
6169 rm -f conftest*
6170 xe_check_libs=""
6171
6172 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6173   echo "$ac_t""yes" 1>&6
6174   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6175 else
6176   echo "$ac_t""no" 1>&6
6177 fi
6178
6179
6180
6181     
6182 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6183 echo "configure:6184: checking for XtOpenDisplay in -lXt" >&5
6184 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6185
6186 xe_check_libs=" -lXt "
6187 cat > conftest.$ac_ext <<EOF
6188 #line 6189 "configure"
6189 #include "confdefs.h"
6190 /* Override any gcc2 internal prototype to avoid an error.  */
6191 /* We use char because int might match the return type of a gcc2
6192     builtin and then its argument prototype would still apply.  */
6193 char XtOpenDisplay();
6194
6195 int main() {
6196 XtOpenDisplay()
6197 ; return 0; }
6198 EOF
6199 if { (eval echo configure:6200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6200   rm -rf conftest*
6201   eval "ac_cv_lib_$ac_lib_var=yes"
6202 else
6203   echo "configure: failed program was:" >&5
6204   cat conftest.$ac_ext >&5
6205   rm -rf conftest*
6206   eval "ac_cv_lib_$ac_lib_var=no"
6207 fi
6208 rm -f conftest*
6209 xe_check_libs=""
6210
6211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6212   echo "$ac_t""yes" 1>&6
6213   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6214 else
6215   echo "$ac_t""no" 1>&6
6216 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6217 fi
6218
6219
6220
6221   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6222 echo "configure:6223: checking the version of X11 being used" >&5
6223   cat > conftest.$ac_ext <<EOF
6224 #line 6225 "configure"
6225 #include "confdefs.h"
6226 #include <X11/Intrinsic.h>
6227     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6230 then
6231   ./conftest foobar; x11_release=$?
6232 else
6233   conftest_rc="$?"
6234   echo "configure: failed program was:" >&5
6235   cat conftest.$ac_ext >&5
6236   rm -fr conftest*
6237   x11_release=4
6238 fi
6239 rm -fr conftest*
6240   echo "$ac_t""R${x11_release}" 1>&6
6241   { test "$extra_verbose" = "yes" && cat << EOF
6242     Defining THIS_IS_X11R${x11_release}
6243 EOF
6244 cat >> confdefs.h <<EOF
6245 #define THIS_IS_X11R${x11_release} 1
6246 EOF
6247 }
6248
6249
6250   if test "${x11_release}" = "4"; then
6251     case "$with_widgets" in
6252       "" | "no") with_widgets=no ;;
6253       *) { echo "Error:" "Widget support requires X11R5 or greater" >&2; exit 1; } ;;
6254     esac
6255   fi
6256
6257   for ac_func in XConvertCase
6258 do
6259 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6260 echo "configure:6261: checking for $ac_func" >&5
6261
6262 cat > conftest.$ac_ext <<EOF
6263 #line 6264 "configure"
6264 #include "confdefs.h"
6265 /* System header to define __stub macros and hopefully few prototypes,
6266     which can conflict with char $ac_func(); below.  */
6267 #include <assert.h>
6268 /* Override any gcc2 internal prototype to avoid an error.  */
6269 /* We use char because int might match the return type of a gcc2
6270     builtin and then its argument prototype would still apply.  */
6271 char $ac_func();
6272
6273 int main() {
6274
6275 /* The GNU C library defines this for functions which it implements
6276     to always fail with ENOSYS.  Some functions are actually named
6277     something starting with __ and the normal name is an alias.  */
6278 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6279 choke me
6280 #else
6281 $ac_func();
6282 #endif
6283
6284 ; return 0; }
6285 EOF
6286 if { (eval echo configure:6287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6287   rm -rf conftest*
6288   eval "ac_cv_func_$ac_func=yes"
6289 else
6290   echo "configure: failed program was:" >&5
6291   cat conftest.$ac_ext >&5
6292   rm -rf conftest*
6293   eval "ac_cv_func_$ac_func=no"
6294 fi
6295 rm -f conftest*
6296
6297 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6298   echo "$ac_t""yes" 1>&6
6299     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6300   { test "$extra_verbose" = "yes" && cat << EOF
6301     Defining $ac_tr_func
6302 EOF
6303 cat >> confdefs.h <<EOF
6304 #define $ac_tr_func 1
6305 EOF
6306 }
6307  
6308 else
6309   echo "$ac_t""no" 1>&6
6310 fi
6311 done
6312
6313
6314   for ac_hdr in X11/Xlocale.h
6315 do
6316 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6317 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6318 echo "configure:6319: checking for $ac_hdr" >&5
6319
6320 cat > conftest.$ac_ext <<EOF
6321 #line 6322 "configure"
6322 #include "confdefs.h"
6323 #include <$ac_hdr>
6324 EOF
6325 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6326 { (eval echo configure:6327: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6327 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6328 if test -z "$ac_err"; then
6329   rm -rf conftest*
6330   eval "ac_cv_header_$ac_safe=yes"
6331 else
6332   echo "$ac_err" >&5
6333   echo "configure: failed program was:" >&5
6334   cat conftest.$ac_ext >&5
6335   rm -rf conftest*
6336   eval "ac_cv_header_$ac_safe=no"
6337 fi
6338 rm -f conftest*
6339 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6340   echo "$ac_t""yes" 1>&6
6341     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6342   { test "$extra_verbose" = "yes" && cat << EOF
6343     Defining $ac_tr_hdr
6344 EOF
6345 cat >> confdefs.h <<EOF
6346 #define $ac_tr_hdr 1
6347 EOF
6348 }
6349  
6350 else
6351   echo "$ac_t""no" 1>&6
6352 fi
6353 done
6354
6355
6356     for ac_func in XRegisterIMInstantiateCallback
6357 do
6358 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6359 echo "configure:6360: checking for $ac_func" >&5
6360
6361 cat > conftest.$ac_ext <<EOF
6362 #line 6363 "configure"
6363 #include "confdefs.h"
6364 /* System header to define __stub macros and hopefully few prototypes,
6365     which can conflict with char $ac_func(); below.  */
6366 #include <assert.h>
6367 /* Override any gcc2 internal prototype to avoid an error.  */
6368 /* We use char because int might match the return type of a gcc2
6369     builtin and then its argument prototype would still apply.  */
6370 char $ac_func();
6371
6372 int main() {
6373
6374 /* The GNU C library defines this for functions which it implements
6375     to always fail with ENOSYS.  Some functions are actually named
6376     something starting with __ and the normal name is an alias.  */
6377 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6378 choke me
6379 #else
6380 $ac_func();
6381 #endif
6382
6383 ; return 0; }
6384 EOF
6385 if { (eval echo configure:6386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6386   rm -rf conftest*
6387   eval "ac_cv_func_$ac_func=yes"
6388 else
6389   echo "configure: failed program was:" >&5
6390   cat conftest.$ac_ext >&5
6391   rm -rf conftest*
6392   eval "ac_cv_func_$ac_func=no"
6393 fi
6394 rm -f conftest*
6395
6396 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6397   echo "$ac_t""yes" 1>&6
6398     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6399   { test "$extra_verbose" = "yes" && cat << EOF
6400     Defining $ac_tr_func
6401 EOF
6402 cat >> confdefs.h <<EOF
6403 #define $ac_tr_func 1
6404 EOF
6405 }
6406  
6407 else
6408   echo "$ac_t""no" 1>&6
6409 fi
6410 done
6411
6412   echo $ac_n "checking for standard XRegisterIMInstantiateCallback prototype""... $ac_c" 1>&6
6413 echo "configure:6414: checking for standard XRegisterIMInstantiateCallback prototype" >&5
6414   cat > conftest.$ac_ext <<EOF
6415 #line 6416 "configure"
6416 #include "confdefs.h"
6417
6418 #define NeedFunctionPrototypes 1
6419 #include <X11/Xlib.h>
6420 extern Bool XRegisterIMInstantiateCallback(
6421    Display*, struct _XrmHashBucketRec*, char*, char*, XIMProc, XPointer*);
6422
6423 int main() {
6424
6425 ; return 0; }
6426 EOF
6427 if { (eval echo configure:6428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6428   rm -rf conftest*
6429   echo "$ac_t""yes" 1>&6
6430 else
6431   echo "configure: failed program was:" >&5
6432   cat conftest.$ac_ext >&5
6433   rm -rf conftest*
6434   echo "$ac_t""no" 1>&6
6435    { test "$extra_verbose" = "yes" && cat << \EOF
6436     Defining XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE
6437 EOF
6438 cat >> confdefs.h <<\EOF
6439 #define XREGISTERIMINSTANTIATECALLBACK_NONSTANDARD_PROTOTYPE 1
6440 EOF
6441 }
6442
6443 fi
6444 rm -f conftest*
6445
6446     test -z "$with_xmu" && { 
6447 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6448 echo "configure:6449: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6449 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6450
6451 xe_check_libs=" -lXmu "
6452 cat > conftest.$ac_ext <<EOF
6453 #line 6454 "configure"
6454 #include "confdefs.h"
6455 /* Override any gcc2 internal prototype to avoid an error.  */
6456 /* We use char because int might match the return type of a gcc2
6457     builtin and then its argument prototype would still apply.  */
6458 char XmuReadBitmapDataFromFile();
6459
6460 int main() {
6461 XmuReadBitmapDataFromFile()
6462 ; return 0; }
6463 EOF
6464 if { (eval echo configure:6465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6465   rm -rf conftest*
6466   eval "ac_cv_lib_$ac_lib_var=yes"
6467 else
6468   echo "configure: failed program was:" >&5
6469   cat conftest.$ac_ext >&5
6470   rm -rf conftest*
6471   eval "ac_cv_lib_$ac_lib_var=no"
6472 fi
6473 rm -f conftest*
6474 xe_check_libs=""
6475
6476 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6477   echo "$ac_t""yes" 1>&6
6478   with_xmu=yes
6479 else
6480   echo "$ac_t""no" 1>&6
6481 with_xmu=no
6482 fi
6483
6484  }
6485   if test "$with_xmu" = "no"; then
6486     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6487    echo "    xemacs will be linked with \"xmu.o\""
6488  fi
6489   else
6490     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6491     { test "$extra_verbose" = "yes" && cat << \EOF
6492     Defining HAVE_XMU
6493 EOF
6494 cat >> confdefs.h <<\EOF
6495 #define HAVE_XMU 1
6496 EOF
6497 }
6498
6499   fi
6500
6501       
6502 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6503 echo "configure:6504: checking for main in -lXbsd" >&5
6504 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6505
6506 xe_check_libs=" -lXbsd "
6507 cat > conftest.$ac_ext <<EOF
6508 #line 6509 "configure"
6509 #include "confdefs.h"
6510
6511 int main() {
6512 main()
6513 ; return 0; }
6514 EOF
6515 if { (eval echo configure:6516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6516   rm -rf conftest*
6517   eval "ac_cv_lib_$ac_lib_var=yes"
6518 else
6519   echo "configure: failed program was:" >&5
6520   cat conftest.$ac_ext >&5
6521   rm -rf conftest*
6522   eval "ac_cv_lib_$ac_lib_var=no"
6523 fi
6524 rm -f conftest*
6525 xe_check_libs=""
6526
6527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6528   echo "$ac_t""yes" 1>&6
6529   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6530 else
6531   echo "$ac_t""no" 1>&6
6532 fi
6533
6534
6535
6536     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6537         if test "$GCC" = "yes"; then
6538       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6539       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6540     else
6541       case "$CC" in
6542         "xlc" ) CC="xlc_r" ;;
6543         "xlC" ) CC="xlC_r" ;;
6544         "cc"  ) CC="cc_r" ;;
6545       esac
6546     fi
6547   fi
6548
6549 fi 
6550 if test "$with_msw" != "no"; then
6551   echo "checking for MS-Windows" 1>&6
6552 echo "configure:6553: checking for MS-Windows" >&5
6553   
6554 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6555 echo "configure:6556: checking for main in -lgdi32" >&5
6556 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6557
6558 xe_check_libs=" -lgdi32 "
6559 cat > conftest.$ac_ext <<EOF
6560 #line 6561 "configure"
6561 #include "confdefs.h"
6562
6563 int main() {
6564 main()
6565 ; return 0; }
6566 EOF
6567 if { (eval echo configure:6568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6568   rm -rf conftest*
6569   eval "ac_cv_lib_$ac_lib_var=yes"
6570 else
6571   echo "configure: failed program was:" >&5
6572   cat conftest.$ac_ext >&5
6573   rm -rf conftest*
6574   eval "ac_cv_lib_$ac_lib_var=no"
6575 fi
6576 rm -f conftest*
6577 xe_check_libs=""
6578
6579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6580   echo "$ac_t""yes" 1>&6
6581   with_msw=yes
6582 else
6583   echo "$ac_t""no" 1>&6
6584 fi
6585
6586
6587   if test "$with_msw" = "yes"; then
6588     { test "$extra_verbose" = "yes" && cat << \EOF
6589     Defining HAVE_MS_WINDOWS
6590 EOF
6591 cat >> confdefs.h <<\EOF
6592 #define HAVE_MS_WINDOWS 1
6593 EOF
6594 }
6595
6596
6597         MAKE_SUBDIR="$MAKE_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$MAKE_SUBDIR"; fi
6598     SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$SRC_SUBDIR_DEPS"; fi
6599     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR netinstall" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"netinstall\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
6600
6601     install_pp="$blddir/lib-src/installexe.sh"
6602     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
6603     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6604     if test "$window_system" != x11; then
6605         window_system=msw
6606         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6607             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6608    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6609  fi
6610         test "$with_menubars"   != "no" && with_menubars=msw \
6611             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6612    echo "    xemacs will be linked with \"menubar-msw.o\""
6613  fi
6614         test "$with_toolbars"   != "no" && with_toolbars=msw \
6615             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6616    echo "    xemacs will be linked with \"toolbar-msw.o\""
6617  fi
6618         test "$with_dialogs"   != "no" && with_dialogs=msw \
6619             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6620    echo "    xemacs will be linked with \"dialog-msw.o\""
6621  fi
6622         test "$with_widgets"   != "no" && with_widgets=msw
6623     else
6624         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6625    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6626  fi
6627         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6628    echo "    xemacs will be linked with \"menubar-msw.o\""
6629  fi
6630         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6631    echo "    xemacs will be linked with \"toolbar-msw.o\""
6632  fi
6633         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6634    echo "    xemacs will be linked with \"dialog-msw.o\""
6635  fi
6636     fi
6637         cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6640 #include <fcntl.h>
6641     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6642 EOF
6643 if { (eval echo configure:6644: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6644 then
6645   { test "$extra_verbose" = "yes" && cat << \EOF
6646     Defining HAVE_MSG_SELECT
6647 EOF
6648 cat >> confdefs.h <<\EOF
6649 #define HAVE_MSG_SELECT 1
6650 EOF
6651 }
6652
6653 else
6654   conftest_rc="$?"
6655   echo "configure: failed program was:" >&5
6656   cat conftest.$ac_ext >&5
6657 fi
6658 rm -fr conftest*
6659     with_file_coding=yes
6660     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
6661    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\""
6662  fi
6663   fi
6664 fi
6665
6666
6667
6668 test -z "$window_system" && window_system="none"
6669
6670 if test "$window_system" = "none"; then
6671   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6672   do
6673     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6674        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6675     fi
6676     eval "with_${feature}=no"
6677   done
6678 else
6679   test -z "$with_toolbars" && with_toolbars=yes
6680 fi
6681
6682 if test "$with_msw" != "yes"; then
6683   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6684   do
6685     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6686        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6687     fi
6688     eval "with_${feature}=no"
6689   done
6690 else
6691   :
6692 fi
6693
6694 if test "$with_x11" != "yes"; then
6695             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6696   do
6697     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6698        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6699     fi
6700     eval "with_${feature}=no"
6701   done
6702 fi
6703
6704 if test "$with_x11" = "yes"; then
6705   ac_safe=`echo "X11/extensions/shape.h" | sed 'y%./+-%__p_%'`
6706 echo $ac_n "checking for X11/extensions/shape.h""... $ac_c" 1>&6
6707 echo "configure:6708: checking for X11/extensions/shape.h" >&5
6708
6709 cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 #include <X11/extensions/shape.h>
6713 EOF
6714 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6715 { (eval echo configure:6716: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6716 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6717 if test -z "$ac_err"; then
6718   rm -rf conftest*
6719   eval "ac_cv_header_$ac_safe=yes"
6720 else
6721   echo "$ac_err" >&5
6722   echo "configure: failed program was:" >&5
6723   cat conftest.$ac_ext >&5
6724   rm -rf conftest*
6725   eval "ac_cv_header_$ac_safe=no"
6726 fi
6727 rm -f conftest*
6728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6729   echo "$ac_t""yes" 1>&6
6730   
6731    { test "$extra_verbose" = "yes" && cat << \EOF
6732     Defining HAVE_BALLOON_HELP
6733 EOF
6734 cat >> confdefs.h <<\EOF
6735 #define HAVE_BALLOON_HELP 1
6736 EOF
6737 }
6738
6739    extra_objs="$extra_objs balloon_help.o balloon-x.o" &&  if test "$extra_verbose" = "yes"; then
6740    echo "    xemacs will be linked with \"balloon_help.o balloon-x.o\""
6741  fi
6742 else
6743   echo "$ac_t""no" 1>&6
6744 fi
6745
6746 fi
6747
6748 bitmapdir=
6749
6750 case "$window_system" in
6751   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6752   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6753   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6754 esac
6755
6756 case "$x_libraries" in *X11R4* )
6757   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6758   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6759 esac
6760
6761 echo "checking for WM_COMMAND option" 1>&6
6762 echo "configure:6763: checking for WM_COMMAND option" >&5;
6763 if test "$with_wmcommand" != "no"; then
6764   { test "$extra_verbose" = "yes" && cat << \EOF
6765     Defining HAVE_WMCOMMAND
6766 EOF
6767 cat >> confdefs.h <<\EOF
6768 #define HAVE_WMCOMMAND 1
6769 EOF
6770 }
6771
6772 fi
6773
6774 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6775 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6776 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6777 echo "configure:6778: checking for X11/Xauth.h" >&5
6778
6779 cat > conftest.$ac_ext <<EOF
6780 #line 6781 "configure"
6781 #include "confdefs.h"
6782 #include <X11/Xauth.h>
6783 EOF
6784 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6785 { (eval echo configure:6786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6786 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6787 if test -z "$ac_err"; then
6788   rm -rf conftest*
6789   eval "ac_cv_header_$ac_safe=yes"
6790 else
6791   echo "$ac_err" >&5
6792   echo "configure: failed program was:" >&5
6793   cat conftest.$ac_ext >&5
6794   rm -rf conftest*
6795   eval "ac_cv_header_$ac_safe=no"
6796 fi
6797 rm -f conftest*
6798 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6799   echo "$ac_t""yes" 1>&6
6800   :
6801 else
6802   echo "$ac_t""no" 1>&6
6803 with_xauth=no
6804 fi
6805  }
6806 test -z "$with_xauth" && { 
6807 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6808 echo "configure:6809: checking for XauGetAuthByAddr in -lXau" >&5
6809 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6810
6811 xe_check_libs=" -lXau "
6812 cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6815 /* Override any gcc2 internal prototype to avoid an error.  */
6816 /* We use char because int might match the return type of a gcc2
6817     builtin and then its argument prototype would still apply.  */
6818 char XauGetAuthByAddr();
6819
6820 int main() {
6821 XauGetAuthByAddr()
6822 ; return 0; }
6823 EOF
6824 if { (eval echo configure:6825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6825   rm -rf conftest*
6826   eval "ac_cv_lib_$ac_lib_var=yes"
6827 else
6828   echo "configure: failed program was:" >&5
6829   cat conftest.$ac_ext >&5
6830   rm -rf conftest*
6831   eval "ac_cv_lib_$ac_lib_var=no"
6832 fi
6833 rm -f conftest*
6834 xe_check_libs=""
6835
6836 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6837   echo "$ac_t""yes" 1>&6
6838   :
6839 else
6840   echo "$ac_t""no" 1>&6
6841 with_xauth=no
6842 fi
6843
6844  }
6845 test -z "$with_xauth" && with_xauth=yes
6846 if test "$with_xauth" = "yes"; then
6847   { test "$extra_verbose" = "yes" && cat << \EOF
6848     Defining HAVE_XAUTH
6849 EOF
6850 cat >> confdefs.h <<\EOF
6851 #define HAVE_XAUTH 1
6852 EOF
6853 }
6854
6855   
6856 T=""
6857 for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
6858 libs_xauth="$T"
6859
6860 fi
6861
6862
6863
6864
6865 if test "$with_tooltalk" != "no" ; then
6866       for dir in "" "Tt/" "desktop/" ; do
6867     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6868 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6869 echo "configure:6870: checking for ${dir}tt_c.h" >&5
6870
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 #include <${dir}tt_c.h>
6875 EOF
6876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6877 { (eval echo configure:6878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6879 if test -z "$ac_err"; then
6880   rm -rf conftest*
6881   eval "ac_cv_header_$ac_safe=yes"
6882 else
6883   echo "$ac_err" >&5
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_header_$ac_safe=no"
6888 fi
6889 rm -f conftest*
6890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6891   echo "$ac_t""yes" 1>&6
6892   tt_c_h_file="${dir}tt_c.h"; break
6893 else
6894   echo "$ac_t""no" 1>&6
6895 fi
6896
6897   done
6898   if test -z "$tt_c_h_file"; then
6899     if test "$with_tooltalk" = "yes"; then
6900       (echo "$progname: Usage error:"
6901 echo " " "Unable to find required tooltalk header files."
6902 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6903     fi
6904     with_tooltalk=no
6905   fi
6906 fi
6907 if test "$with_tooltalk" != "no" ; then
6908   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6909     
6910 xe_msg_checking="for tt_message_create in -ltt"
6911 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6912 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6913 echo "configure:6914: checking "$xe_msg_checking"" >&5
6914 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6915
6916 xe_check_libs=" -ltt $extra_libs"
6917 cat > conftest.$ac_ext <<EOF
6918 #line 6919 "configure"
6919 #include "confdefs.h"
6920 /* Override any gcc2 internal prototype to avoid an error.  */
6921 /* We use char because int might match the return type of a gcc2
6922     builtin and then its argument prototype would still apply.  */
6923 char tt_message_create();
6924
6925 int main() {
6926 tt_message_create()
6927 ; return 0; }
6928 EOF
6929 if { (eval echo configure:6930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6930   rm -rf conftest*
6931   eval "ac_cv_lib_$ac_lib_var=yes"
6932 else
6933   echo "configure: failed program was:" >&5
6934   cat conftest.$ac_ext >&5
6935   rm -rf conftest*
6936   eval "ac_cv_lib_$ac_lib_var=no"
6937 fi
6938 rm -f conftest*
6939 xe_check_libs=""
6940
6941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6942   echo "$ac_t""yes" 1>&6
6943   tt_libs="-ltt $extra_libs"; break
6944 else
6945   echo "$ac_t""no" 1>&6
6946 :
6947 fi
6948
6949
6950   done
6951   if test -z "$tt_libs"; then
6952     if test "$with_tooltalk" = "yes"; then
6953       (echo "$progname: Usage error:"
6954 echo " " "Unable to find required tooltalk libraries."
6955 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6956     fi
6957     with_tooltalk=no
6958   fi
6959 fi
6960 test -z "$with_tooltalk" && with_tooltalk=yes
6961 if test "$with_tooltalk" = "yes"; then
6962   { test "$extra_verbose" = "yes" && cat << \EOF
6963     Defining TOOLTALK
6964 EOF
6965 cat >> confdefs.h <<\EOF
6966 #define TOOLTALK 1
6967 EOF
6968 }
6969
6970   { test "$extra_verbose" = "yes" && cat << EOF
6971     Defining TT_C_H_FILE = "$tt_c_h_file"
6972 EOF
6973 cat >> confdefs.h <<EOF
6974 #define TT_C_H_FILE "$tt_c_h_file"
6975 EOF
6976 }
6977
6978   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6979   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6980    echo "    xemacs will be linked with \"tooltalk.o\""
6981  fi
6982 fi
6983
6984 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6985 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6986 echo "configure:6987: checking for Dt/Dt.h" >&5
6987
6988 cat > conftest.$ac_ext <<EOF
6989 #line 6990 "configure"
6990 #include "confdefs.h"
6991 #include <Dt/Dt.h>
6992 EOF
6993 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6994 { (eval echo configure:6995: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6995 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6996 if test -z "$ac_err"; then
6997   rm -rf conftest*
6998   eval "ac_cv_header_$ac_safe=yes"
6999 else
7000   echo "$ac_err" >&5
7001   echo "configure: failed program was:" >&5
7002   cat conftest.$ac_ext >&5
7003   rm -rf conftest*
7004   eval "ac_cv_header_$ac_safe=no"
7005 fi
7006 rm -f conftest*
7007 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7008   echo "$ac_t""yes" 1>&6
7009   :
7010 else
7011   echo "$ac_t""no" 1>&6
7012 with_cde=no
7013 fi
7014  }
7015 test -z "$with_cde" && { 
7016 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
7017 echo "configure:7018: checking for DtDndDragStart in -lDtSvc" >&5
7018 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
7019
7020 xe_check_libs=" -lDtSvc "
7021 cat > conftest.$ac_ext <<EOF
7022 #line 7023 "configure"
7023 #include "confdefs.h"
7024 /* Override any gcc2 internal prototype to avoid an error.  */
7025 /* We use char because int might match the return type of a gcc2
7026     builtin and then its argument prototype would still apply.  */
7027 char DtDndDragStart();
7028
7029 int main() {
7030 DtDndDragStart()
7031 ; return 0; }
7032 EOF
7033 if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7034   rm -rf conftest*
7035   eval "ac_cv_lib_$ac_lib_var=yes"
7036 else
7037   echo "configure: failed program was:" >&5
7038   cat conftest.$ac_ext >&5
7039   rm -rf conftest*
7040   eval "ac_cv_lib_$ac_lib_var=no"
7041 fi
7042 rm -f conftest*
7043 xe_check_libs=""
7044
7045 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7046   echo "$ac_t""yes" 1>&6
7047   :
7048 else
7049   echo "$ac_t""no" 1>&6
7050 with_cde=no
7051 fi
7052
7053  }
7054 test -z "$with_cde" && with_cde=yes
7055 if test "$with_dragndrop" = no; then
7056   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
7057   with_cde=no
7058 fi
7059 if test "$with_cde" = "yes" ; then
7060   { test "$extra_verbose" = "yes" && cat << \EOF
7061     Defining HAVE_CDE
7062 EOF
7063 cat >> confdefs.h <<\EOF
7064 #define HAVE_CDE 1
7065 EOF
7066 }
7067
7068   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
7069   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
7070   with_tooltalk=yes # CDE requires Tooltalk
7071   need_motif=yes    # CDE requires Motif
7072 fi
7073
7074 test "$window_system" != "x11" && with_offix=no
7075 if test "$with_xmu" != yes -a "$with_x11" = yes; then
7076   echo "configure: warning: No OffiX without real Xmu support" 1>&2
7077   with_offix=no
7078 fi
7079 if test "$with_dragndrop" = no; then
7080   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
7081   with_offix=no
7082 fi
7083 if test "$with_cde" = yes; then
7084   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
7085   with_offix=no
7086 fi
7087 test -z "$with_offix" && with_offix=no
7088 if test "$with_offix" = "yes"; then
7089   { test "$extra_verbose" = "yes" && cat << \EOF
7090     Defining HAVE_OFFIX_DND
7091 EOF
7092 cat >> confdefs.h <<\EOF
7093 #define HAVE_OFFIX_DND 1
7094 EOF
7095 }
7096
7097   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
7098   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
7099 fi
7100
7101 if test "$with_dragndrop" != "no" ; then
7102   echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
7103 echo "configure:7104: checking if drag and drop API is needed" >&5
7104   if test -n "$dragndrop_proto" ; then
7105     with_dragndrop=yes
7106     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
7107     { test "$extra_verbose" = "yes" && cat << \EOF
7108     Defining HAVE_DRAGNDROP
7109 EOF
7110 cat >> confdefs.h <<\EOF
7111 #define HAVE_DRAGNDROP 1
7112 EOF
7113 }
7114
7115     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
7116   else
7117     with_dragndrop=no
7118     echo "$ac_t""no" 1>&6
7119   fi
7120 fi
7121
7122 echo "checking for LDAP" 1>&6
7123 echo "configure:7124: checking for LDAP" >&5
7124 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
7125 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
7126 echo "configure:7127: checking for ldap.h" >&5
7127
7128 cat > conftest.$ac_ext <<EOF
7129 #line 7130 "configure"
7130 #include "confdefs.h"
7131 #include <ldap.h>
7132 EOF
7133 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7134 { (eval echo configure:7135: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7135 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7136 if test -z "$ac_err"; then
7137   rm -rf conftest*
7138   eval "ac_cv_header_$ac_safe=yes"
7139 else
7140   echo "$ac_err" >&5
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -rf conftest*
7144   eval "ac_cv_header_$ac_safe=no"
7145 fi
7146 rm -f conftest*
7147 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7148   echo "$ac_t""yes" 1>&6
7149   :
7150 else
7151   echo "$ac_t""no" 1>&6
7152 with_ldap=no
7153 fi
7154  }
7155 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
7156 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
7157 echo "configure:7158: checking for lber.h" >&5
7158
7159 cat > conftest.$ac_ext <<EOF
7160 #line 7161 "configure"
7161 #include "confdefs.h"
7162 #include <lber.h>
7163 EOF
7164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7165 { (eval echo configure:7166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7167 if test -z "$ac_err"; then
7168   rm -rf conftest*
7169   eval "ac_cv_header_$ac_safe=yes"
7170 else
7171   echo "$ac_err" >&5
7172   echo "configure: failed program was:" >&5
7173   cat conftest.$ac_ext >&5
7174   rm -rf conftest*
7175   eval "ac_cv_header_$ac_safe=no"
7176 fi
7177 rm -f conftest*
7178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7179   echo "$ac_t""yes" 1>&6
7180   :
7181 else
7182   echo "$ac_t""no" 1>&6
7183 with_ldap=no
7184 fi
7185  }
7186 if test "$with_ldap" != "no"; then
7187   
7188 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
7189 echo "configure:7190: checking for ldap_search in -lldap" >&5
7190 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
7191
7192 xe_check_libs=" -lldap "
7193 cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 /* Override any gcc2 internal prototype to avoid an error.  */
7197 /* We use char because int might match the return type of a gcc2
7198     builtin and then its argument prototype would still apply.  */
7199 char ldap_search();
7200
7201 int main() {
7202 ldap_search()
7203 ; return 0; }
7204 EOF
7205 if { (eval echo configure:7206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7206   rm -rf conftest*
7207   eval "ac_cv_lib_$ac_lib_var=yes"
7208 else
7209   echo "configure: failed program was:" >&5
7210   cat conftest.$ac_ext >&5
7211   rm -rf conftest*
7212   eval "ac_cv_lib_$ac_lib_var=no"
7213 fi
7214 rm -f conftest*
7215 xe_check_libs=""
7216
7217 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7218   echo "$ac_t""yes" 1>&6
7219   with_ldap_nolber=yes
7220 else
7221   echo "$ac_t""no" 1>&6
7222 with_ldap_nolber=no
7223 fi
7224
7225
7226   test "$with_ldap_nolber" = "no" && { 
7227 xe_msg_checking="for ldap_open in -lldap"
7228 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7229 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7230 echo "configure:7231: checking "$xe_msg_checking"" >&5
7231 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7232
7233 xe_check_libs=" -lldap -llber"
7234 cat > conftest.$ac_ext <<EOF
7235 #line 7236 "configure"
7236 #include "confdefs.h"
7237 /* Override any gcc2 internal prototype to avoid an error.  */
7238 /* We use char because int might match the return type of a gcc2
7239     builtin and then its argument prototype would still apply.  */
7240 char ldap_open();
7241
7242 int main() {
7243 ldap_open()
7244 ; return 0; }
7245 EOF
7246 if { (eval echo configure:7247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7247   rm -rf conftest*
7248   eval "ac_cv_lib_$ac_lib_var=yes"
7249 else
7250   echo "configure: failed program was:" >&5
7251   cat conftest.$ac_ext >&5
7252   rm -rf conftest*
7253   eval "ac_cv_lib_$ac_lib_var=no"
7254 fi
7255 rm -f conftest*
7256 xe_check_libs=""
7257
7258 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7259   echo "$ac_t""yes" 1>&6
7260   with_ldap_lber=yes
7261 else
7262   echo "$ac_t""no" 1>&6
7263 with_ldap_lber=no
7264 fi
7265
7266  }
7267   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7268 xe_msg_checking="for ldap_open in -lldap"
7269 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7270 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7271 echo "configure:7272: checking "$xe_msg_checking"" >&5
7272 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7273
7274 xe_check_libs=" -lldap -llber -lkrb"
7275 cat > conftest.$ac_ext <<EOF
7276 #line 7277 "configure"
7277 #include "confdefs.h"
7278 /* Override any gcc2 internal prototype to avoid an error.  */
7279 /* We use char because int might match the return type of a gcc2
7280     builtin and then its argument prototype would still apply.  */
7281 char ldap_open();
7282
7283 int main() {
7284 ldap_open()
7285 ; return 0; }
7286 EOF
7287 if { (eval echo configure:7288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7288   rm -rf conftest*
7289   eval "ac_cv_lib_$ac_lib_var=yes"
7290 else
7291   echo "configure: failed program was:" >&5
7292   cat conftest.$ac_ext >&5
7293   rm -rf conftest*
7294   eval "ac_cv_lib_$ac_lib_var=no"
7295 fi
7296 rm -f conftest*
7297 xe_check_libs=""
7298
7299 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7300   echo "$ac_t""yes" 1>&6
7301   with_ldap_krb=yes
7302 else
7303   echo "$ac_t""no" 1>&6
7304 with_ldap_krb=no
7305 fi
7306
7307  }
7308   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7309 xe_msg_checking="for ldap_open in -lldap"
7310 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7311 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7312 echo "configure:7313: checking "$xe_msg_checking"" >&5
7313 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7314
7315 xe_check_libs=" -lldap -llber -lkrb -ldes"
7316 cat > conftest.$ac_ext <<EOF
7317 #line 7318 "configure"
7318 #include "confdefs.h"
7319 /* Override any gcc2 internal prototype to avoid an error.  */
7320 /* We use char because int might match the return type of a gcc2
7321     builtin and then its argument prototype would still apply.  */
7322 char ldap_open();
7323
7324 int main() {
7325 ldap_open()
7326 ; return 0; }
7327 EOF
7328 if { (eval echo configure:7329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7329   rm -rf conftest*
7330   eval "ac_cv_lib_$ac_lib_var=yes"
7331 else
7332   echo "configure: failed program was:" >&5
7333   cat conftest.$ac_ext >&5
7334   rm -rf conftest*
7335   eval "ac_cv_lib_$ac_lib_var=no"
7336 fi
7337 rm -f conftest*
7338 xe_check_libs=""
7339
7340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7341   echo "$ac_t""yes" 1>&6
7342   with_ldap_krbdes=yes
7343 else
7344   echo "$ac_t""no" 1>&6
7345 with_ldap_krbdes=no
7346 fi
7347
7348  }
7349   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
7350 fi
7351 if test "$with_ldap" = "yes"; then
7352   { test "$extra_verbose" = "yes" && cat << \EOF
7353     Defining HAVE_LDAP
7354 EOF
7355 cat >> confdefs.h <<\EOF
7356 #define HAVE_LDAP 1
7357 EOF
7358 }
7359
7360   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7361    echo "    xemacs will be linked with \"eldap.o\""
7362  fi
7363   if test "$with_ldap_nolber" = "yes" ; then
7364     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7365   else
7366     if test "$with_ldap_krb" = "yes" ; then
7367       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7368     fi
7369     if test "$with_ldap_krbdes" = "yes" ; then
7370       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7371       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7372     fi
7373     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7374     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7375   fi
7376   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7377 do
7378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7379 echo "configure:7380: checking for $ac_func" >&5
7380
7381 cat > conftest.$ac_ext <<EOF
7382 #line 7383 "configure"
7383 #include "confdefs.h"
7384 /* System header to define __stub macros and hopefully few prototypes,
7385     which can conflict with char $ac_func(); below.  */
7386 #include <assert.h>
7387 /* Override any gcc2 internal prototype to avoid an error.  */
7388 /* We use char because int might match the return type of a gcc2
7389     builtin and then its argument prototype would still apply.  */
7390 char $ac_func();
7391
7392 int main() {
7393
7394 /* The GNU C library defines this for functions which it implements
7395     to always fail with ENOSYS.  Some functions are actually named
7396     something starting with __ and the normal name is an alias.  */
7397 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7398 choke me
7399 #else
7400 $ac_func();
7401 #endif
7402
7403 ; return 0; }
7404 EOF
7405 if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7406   rm -rf conftest*
7407   eval "ac_cv_func_$ac_func=yes"
7408 else
7409   echo "configure: failed program was:" >&5
7410   cat conftest.$ac_ext >&5
7411   rm -rf conftest*
7412   eval "ac_cv_func_$ac_func=no"
7413 fi
7414 rm -f conftest*
7415
7416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7417   echo "$ac_t""yes" 1>&6
7418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7419   { test "$extra_verbose" = "yes" && cat << EOF
7420     Defining $ac_tr_func
7421 EOF
7422 cat >> confdefs.h <<EOF
7423 #define $ac_tr_func 1
7424 EOF
7425 }
7426  
7427 else
7428   echo "$ac_t""no" 1>&6
7429 fi
7430 done
7431
7432 fi
7433
7434 if test "$with_postgresql" != "no"; then
7435   echo "checking for PostgreSQL" 1>&6
7436 echo "configure:7437: checking for PostgreSQL" >&5
7437
7438   for header_dir in "" "pgsql/" "postgresql/"; do
7439     ac_safe=`echo "${header_dir}libpq-fe.h" | sed 'y%./+-%__p_%'`
7440 echo $ac_n "checking for ${header_dir}libpq-fe.h""... $ac_c" 1>&6
7441 echo "configure:7442: checking for ${header_dir}libpq-fe.h" >&5
7442
7443 cat > conftest.$ac_ext <<EOF
7444 #line 7445 "configure"
7445 #include "confdefs.h"
7446 #include <${header_dir}libpq-fe.h>
7447 EOF
7448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7449 { (eval echo configure:7450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7451 if test -z "$ac_err"; then
7452   rm -rf conftest*
7453   eval "ac_cv_header_$ac_safe=yes"
7454 else
7455   echo "$ac_err" >&5
7456   echo "configure: failed program was:" >&5
7457   cat conftest.$ac_ext >&5
7458   rm -rf conftest*
7459   eval "ac_cv_header_$ac_safe=no"
7460 fi
7461 rm -f conftest*
7462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7463   echo "$ac_t""yes" 1>&6
7464   libpq_fe_h_file=${header_dir}libpq-fe.h; break
7465 else
7466   echo "$ac_t""no" 1>&6
7467 fi
7468
7469   done
7470
7471   test -n "$libpq_fe_h_file" && { 
7472 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7473 echo "configure:7474: checking for PQconnectdb in -lpq" >&5
7474 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7475
7476 xe_check_libs=" -lpq "
7477 cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 /* Override any gcc2 internal prototype to avoid an error.  */
7481 /* We use char because int might match the return type of a gcc2
7482     builtin and then its argument prototype would still apply.  */
7483 char PQconnectdb();
7484
7485 int main() {
7486 PQconnectdb()
7487 ; return 0; }
7488 EOF
7489 if { (eval echo configure:7490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7490   rm -rf conftest*
7491   eval "ac_cv_lib_$ac_lib_var=yes"
7492 else
7493   echo "configure: failed program was:" >&5
7494   cat conftest.$ac_ext >&5
7495   rm -rf conftest*
7496   eval "ac_cv_lib_$ac_lib_var=no"
7497 fi
7498 rm -f conftest*
7499 xe_check_libs=""
7500
7501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7502   echo "$ac_t""yes" 1>&6
7503   have_libpq=yes
7504 else
7505   echo "$ac_t""no" 1>&6
7506 fi
7507
7508  }
7509
7510   if test -n "$libpq_fe_h_file" -a "$have_libpq" = "yes"; then
7511     with_postgresql=yes
7512     { test "$extra_verbose" = "yes" && cat << \EOF
7513     Defining HAVE_POSTGRESQL
7514 EOF
7515 cat >> confdefs.h <<\EOF
7516 #define HAVE_POSTGRESQL 1
7517 EOF
7518 }
7519
7520     
7521 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7522 echo "configure:7523: checking for PQconnectStart in -lpq" >&5
7523 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7524
7525 xe_check_libs=" -lpq "
7526 cat > conftest.$ac_ext <<EOF
7527 #line 7528 "configure"
7528 #include "confdefs.h"
7529 /* Override any gcc2 internal prototype to avoid an error.  */
7530 /* We use char because int might match the return type of a gcc2
7531     builtin and then its argument prototype would still apply.  */
7532 char PQconnectStart();
7533
7534 int main() {
7535 PQconnectStart()
7536 ; return 0; }
7537 EOF
7538 if { (eval echo configure:7539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7539   rm -rf conftest*
7540   eval "ac_cv_lib_$ac_lib_var=yes"
7541 else
7542   echo "configure: failed program was:" >&5
7543   cat conftest.$ac_ext >&5
7544   rm -rf conftest*
7545   eval "ac_cv_lib_$ac_lib_var=no"
7546 fi
7547 rm -f conftest*
7548 xe_check_libs=""
7549
7550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7551   echo "$ac_t""yes" 1>&6
7552   with_postgresqlv7=yes;
7553                  { test "$extra_verbose" = "yes" && cat << \EOF
7554     Defining HAVE_POSTGRESQLV7
7555 EOF
7556 cat >> confdefs.h <<\EOF
7557 #define HAVE_POSTGRESQLV7 1
7558 EOF
7559 }
7560
7561 else
7562   echo "$ac_t""no" 1>&6
7563 fi
7564
7565
7566     { test "$extra_verbose" = "yes" && cat << EOF
7567     Defining LIBPQ_FE_H_FILE = "$libpq_fe_h_file"
7568 EOF
7569 cat >> confdefs.h <<EOF
7570 #define LIBPQ_FE_H_FILE "$libpq_fe_h_file"
7571 EOF
7572 }
7573
7574     LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7575     extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7576    echo "    xemacs will be linked with \"postgresql.o\""
7577  fi
7578   elif test "$with_postgresql" = "yes"; then
7579     { echo "Error:" "Required PostgreSQL support cannot be provided.  Check --site-prefixes." >&2; exit 1; }
7580   fi
7581 fi
7582
7583
7584 if test "$window_system" != "none"; then
7585   echo "checking for graphics libraries" 1>&6
7586 echo "configure:7587: checking for graphics libraries" >&5
7587
7588     xpm_problem=""
7589   if test -z "$with_xpm"; then
7590     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7591 echo "configure:7592: checking for Xpm - no older than 3.4f" >&5
7592     xe_check_libs=-lXpm
7593     cat > conftest.$ac_ext <<EOF
7594 #line 7595 "configure"
7595 #include "confdefs.h"
7596 #define XPM_NUMBERS
7597 #include <X11/xpm.h>
7598     int main(int c, char **v) {
7599     return c == 1 ? 0 :
7600       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7601       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7602 EOF
7603 if { (eval echo configure:7604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7604 then
7605   ./conftest dummy_arg; xpm_status=$?;
7606       if test "$xpm_status" = "0"; then
7607         with_xpm=yes;
7608       else
7609         with_xpm=no;
7610         if test "$xpm_status" = "1"; then
7611           xpm_problem="Xpm library version and header file version don't match!"
7612         elif test "$xpm_status" = "2"; then
7613           xpm_problem="Xpm library version is too old!"
7614         else
7615           xpm_problem="Internal xpm detection logic error!"
7616         fi
7617         echo "
7618 *** WARNING *** $xpm_problem
7619   I'm not touching that with a 10-foot pole!
7620   If you really want to use the installed version of Xpm, rerun
7621   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7622     fi
7623 else
7624   conftest_rc="$?"
7625   echo "configure: failed program was:" >&5
7626   cat conftest.$ac_ext >&5
7627   rm -fr conftest*
7628   with_xpm=no
7629 fi
7630 rm -fr conftest*
7631     xe_check_libs=
7632     echo "$ac_t""$with_xpm" 1>&6
7633   fi
7634   if test "$with_xpm" = "yes"; then
7635                 { test "$extra_verbose" = "yes" && cat << \EOF
7636     Defining HAVE_XPM
7637 EOF
7638 cat >> confdefs.h <<\EOF
7639 #define HAVE_XPM 1
7640 EOF
7641 }
7642
7643     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7644     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7645 echo "configure:7646: checking for \"FOR_MSW\" xpm" >&5
7646     xe_check_libs=-lXpm
7647     cat > conftest.$ac_ext <<EOF
7648 #line 7649 "configure"
7649 #include "confdefs.h"
7650
7651 int main() {
7652 XpmCreatePixmapFromData()
7653 ; return 0; }
7654 EOF
7655 if { (eval echo configure:7656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7656   rm -rf conftest*
7657   xpm_for_msw=no
7658 else
7659   echo "configure: failed program was:" >&5
7660   cat conftest.$ac_ext >&5
7661   rm -rf conftest*
7662   xpm_for_msw=yes
7663 fi
7664 rm -f conftest*
7665     xe_check_libs=
7666     echo "$ac_t""$xpm_for_msw" 1>&6
7667     if test "$xpm_for_msw" = "yes"; then
7668       { test "$extra_verbose" = "yes" && cat << \EOF
7669     Defining FOR_MSW
7670 EOF
7671 cat >> confdefs.h <<\EOF
7672 #define FOR_MSW 1
7673 EOF
7674 }
7675
7676     fi
7677   fi
7678
7679     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7680 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7681 echo "configure:7682: checking for compface.h" >&5
7682
7683 cat > conftest.$ac_ext <<EOF
7684 #line 7685 "configure"
7685 #include "confdefs.h"
7686 #include <compface.h>
7687 EOF
7688 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7689 { (eval echo configure:7690: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7690 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7691 if test -z "$ac_err"; then
7692   rm -rf conftest*
7693   eval "ac_cv_header_$ac_safe=yes"
7694 else
7695   echo "$ac_err" >&5
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   eval "ac_cv_header_$ac_safe=no"
7700 fi
7701 rm -f conftest*
7702 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7703   echo "$ac_t""yes" 1>&6
7704   :
7705 else
7706   echo "$ac_t""no" 1>&6
7707 with_xface=no
7708 fi
7709  }
7710   test -z "$with_xface" && { 
7711 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7712 echo "configure:7713: checking for UnGenFace in -lcompface" >&5
7713 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7714
7715 xe_check_libs=" -lcompface "
7716 cat > conftest.$ac_ext <<EOF
7717 #line 7718 "configure"
7718 #include "confdefs.h"
7719 /* Override any gcc2 internal prototype to avoid an error.  */
7720 /* We use char because int might match the return type of a gcc2
7721     builtin and then its argument prototype would still apply.  */
7722 char UnGenFace();
7723
7724 int main() {
7725 UnGenFace()
7726 ; return 0; }
7727 EOF
7728 if { (eval echo configure:7729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7729   rm -rf conftest*
7730   eval "ac_cv_lib_$ac_lib_var=yes"
7731 else
7732   echo "configure: failed program was:" >&5
7733   cat conftest.$ac_ext >&5
7734   rm -rf conftest*
7735   eval "ac_cv_lib_$ac_lib_var=no"
7736 fi
7737 rm -f conftest*
7738 xe_check_libs=""
7739
7740 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7741   echo "$ac_t""yes" 1>&6
7742   : 
7743 else
7744   echo "$ac_t""no" 1>&6
7745 with_xface=no
7746 fi
7747
7748  }
7749   test -z "$with_xface" && with_xface=yes
7750   if test "$with_xface" = "yes"; then
7751     { test "$extra_verbose" = "yes" && cat << \EOF
7752     Defining HAVE_XFACE
7753 EOF
7754 cat >> confdefs.h <<\EOF
7755 #define HAVE_XFACE 1
7756 EOF
7757 }
7758
7759     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7760   fi
7761
7762         if test "$with_gif" != "no"; then
7763     with_gif="yes"
7764     { test "$extra_verbose" = "yes" && cat << \EOF
7765     Defining HAVE_GIF
7766 EOF
7767 cat >> confdefs.h <<\EOF
7768 #define HAVE_GIF 1
7769 EOF
7770 }
7771
7772     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7773    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7774  fi
7775   fi
7776
7777       if test "$with_png $with_tiff" != "no no"; then
7778     
7779 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7780 echo "configure:7781: checking for inflate in -lc" >&5
7781 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7782
7783 xe_check_libs=" -lc "
7784 cat > conftest.$ac_ext <<EOF
7785 #line 7786 "configure"
7786 #include "confdefs.h"
7787 /* Override any gcc2 internal prototype to avoid an error.  */
7788 /* We use char because int might match the return type of a gcc2
7789     builtin and then its argument prototype would still apply.  */
7790 char inflate();
7791
7792 int main() {
7793 inflate()
7794 ; return 0; }
7795 EOF
7796 if { (eval echo configure:7797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7797   rm -rf conftest*
7798   eval "ac_cv_lib_$ac_lib_var=yes"
7799 else
7800   echo "configure: failed program was:" >&5
7801   cat conftest.$ac_ext >&5
7802   rm -rf conftest*
7803   eval "ac_cv_lib_$ac_lib_var=no"
7804 fi
7805 rm -f conftest*
7806 xe_check_libs=""
7807
7808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7809   echo "$ac_t""yes" 1>&6
7810   :
7811 else
7812   echo "$ac_t""no" 1>&6
7813
7814 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7815 echo "configure:7816: checking for inflate in -lz" >&5
7816 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7817
7818 xe_check_libs=" -lz "
7819 cat > conftest.$ac_ext <<EOF
7820 #line 7821 "configure"
7821 #include "confdefs.h"
7822 /* Override any gcc2 internal prototype to avoid an error.  */
7823 /* We use char because int might match the return type of a gcc2
7824     builtin and then its argument prototype would still apply.  */
7825 char inflate();
7826
7827 int main() {
7828 inflate()
7829 ; return 0; }
7830 EOF
7831 if { (eval echo configure:7832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7832   rm -rf conftest*
7833   eval "ac_cv_lib_$ac_lib_var=yes"
7834 else
7835   echo "configure: failed program was:" >&5
7836   cat conftest.$ac_ext >&5
7837   rm -rf conftest*
7838   eval "ac_cv_lib_$ac_lib_var=no"
7839 fi
7840 rm -f conftest*
7841 xe_check_libs=""
7842
7843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7844   echo "$ac_t""yes" 1>&6
7845   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7846 else
7847   echo "$ac_t""no" 1>&6
7848
7849 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7850 echo "configure:7851: checking for inflate in -lgz" >&5
7851 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7852
7853 xe_check_libs=" -lgz "
7854 cat > conftest.$ac_ext <<EOF
7855 #line 7856 "configure"
7856 #include "confdefs.h"
7857 /* Override any gcc2 internal prototype to avoid an error.  */
7858 /* We use char because int might match the return type of a gcc2
7859     builtin and then its argument prototype would still apply.  */
7860 char inflate();
7861
7862 int main() {
7863 inflate()
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7867   rm -rf conftest*
7868   eval "ac_cv_lib_$ac_lib_var=yes"
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872   rm -rf conftest*
7873   eval "ac_cv_lib_$ac_lib_var=no"
7874 fi
7875 rm -f conftest*
7876 xe_check_libs=""
7877
7878 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7879   echo "$ac_t""yes" 1>&6
7880   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7881 else
7882   echo "$ac_t""no" 1>&6
7883 fi
7884
7885
7886 fi
7887
7888
7889 fi
7890
7891
7892   fi
7893
7894     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7895 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7896 echo "configure:7897: checking for jpeglib.h" >&5
7897
7898 cat > conftest.$ac_ext <<EOF
7899 #line 7900 "configure"
7900 #include "confdefs.h"
7901 #include <jpeglib.h>
7902 EOF
7903 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7904 { (eval echo configure:7905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7905 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7906 if test -z "$ac_err"; then
7907   rm -rf conftest*
7908   eval "ac_cv_header_$ac_safe=yes"
7909 else
7910   echo "$ac_err" >&5
7911   echo "configure: failed program was:" >&5
7912   cat conftest.$ac_ext >&5
7913   rm -rf conftest*
7914   eval "ac_cv_header_$ac_safe=no"
7915 fi
7916 rm -f conftest*
7917 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7918   echo "$ac_t""yes" 1>&6
7919   :
7920 else
7921   echo "$ac_t""no" 1>&6
7922 with_jpeg=no
7923 fi
7924  }
7925   test -z "$with_jpeg" && { 
7926 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7927 echo "configure:7928: checking for jpeg_destroy_decompress in -ljpeg" >&5
7928 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7929
7930 xe_check_libs=" -ljpeg "
7931 cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 /* Override any gcc2 internal prototype to avoid an error.  */
7935 /* We use char because int might match the return type of a gcc2
7936     builtin and then its argument prototype would still apply.  */
7937 char jpeg_destroy_decompress();
7938
7939 int main() {
7940 jpeg_destroy_decompress()
7941 ; return 0; }
7942 EOF
7943 if { (eval echo configure:7944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7944   rm -rf conftest*
7945   eval "ac_cv_lib_$ac_lib_var=yes"
7946 else
7947   echo "configure: failed program was:" >&5
7948   cat conftest.$ac_ext >&5
7949   rm -rf conftest*
7950   eval "ac_cv_lib_$ac_lib_var=no"
7951 fi
7952 rm -f conftest*
7953 xe_check_libs=""
7954
7955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7956   echo "$ac_t""yes" 1>&6
7957   :
7958 else
7959   echo "$ac_t""no" 1>&6
7960 with_jpeg=no
7961 fi
7962
7963  }
7964   test -z "$with_jpeg" && with_jpeg=yes
7965   if test "$with_jpeg" = "yes"; then
7966     { test "$extra_verbose" = "yes" && cat << \EOF
7967     Defining HAVE_JPEG
7968 EOF
7969 cat >> confdefs.h <<\EOF
7970 #define HAVE_JPEG 1
7971 EOF
7972 }
7973
7974     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7975   fi
7976
7977     png_problem=""
7978   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7979 echo "configure:7980: checking for pow" >&5
7980
7981 cat > conftest.$ac_ext <<EOF
7982 #line 7983 "configure"
7983 #include "confdefs.h"
7984 /* System header to define __stub macros and hopefully few prototypes,
7985     which can conflict with char pow(); below.  */
7986 #include <assert.h>
7987 /* Override any gcc2 internal prototype to avoid an error.  */
7988 /* We use char because int might match the return type of a gcc2
7989     builtin and then its argument prototype would still apply.  */
7990 char pow();
7991
7992 int main() {
7993
7994 /* The GNU C library defines this for functions which it implements
7995     to always fail with ENOSYS.  Some functions are actually named
7996     something starting with __ and the normal name is an alias.  */
7997 #if defined (__stub_pow) || defined (__stub___pow)
7998 choke me
7999 #else
8000 pow();
8001 #endif
8002
8003 ; return 0; }
8004 EOF
8005 if { (eval echo configure:8006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8006   rm -rf conftest*
8007   eval "ac_cv_func_pow=yes"
8008 else
8009   echo "configure: failed program was:" >&5
8010   cat conftest.$ac_ext >&5
8011   rm -rf conftest*
8012   eval "ac_cv_func_pow=no"
8013 fi
8014 rm -f conftest*
8015
8016 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
8017   echo "$ac_t""yes" 1>&6
8018   :
8019 else
8020   echo "$ac_t""no" 1>&6
8021 with_png=no
8022 fi
8023  }
8024   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
8025 echo $ac_n "checking for png.h""... $ac_c" 1>&6
8026 echo "configure:8027: checking for png.h" >&5
8027
8028 cat > conftest.$ac_ext <<EOF
8029 #line 8030 "configure"
8030 #include "confdefs.h"
8031 #include <png.h>
8032 EOF
8033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8034 { (eval echo configure:8035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8036 if test -z "$ac_err"; then
8037   rm -rf conftest*
8038   eval "ac_cv_header_$ac_safe=yes"
8039 else
8040   echo "$ac_err" >&5
8041   echo "configure: failed program was:" >&5
8042   cat conftest.$ac_ext >&5
8043   rm -rf conftest*
8044   eval "ac_cv_header_$ac_safe=no"
8045 fi
8046 rm -f conftest*
8047 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8048   echo "$ac_t""yes" 1>&6
8049   :
8050 else
8051   echo "$ac_t""no" 1>&6
8052 with_png=no
8053 fi
8054  }
8055   test -z "$with_png" && { 
8056 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
8057 echo "configure:8058: checking for png_read_image in -lpng" >&5
8058 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
8059
8060 xe_check_libs=" -lpng "
8061 cat > conftest.$ac_ext <<EOF
8062 #line 8063 "configure"
8063 #include "confdefs.h"
8064 /* Override any gcc2 internal prototype to avoid an error.  */
8065 /* We use char because int might match the return type of a gcc2
8066     builtin and then its argument prototype would still apply.  */
8067 char png_read_image();
8068
8069 int main() {
8070 png_read_image()
8071 ; return 0; }
8072 EOF
8073 if { (eval echo configure:8074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8074   rm -rf conftest*
8075   eval "ac_cv_lib_$ac_lib_var=yes"
8076 else
8077   echo "configure: failed program was:" >&5
8078   cat conftest.$ac_ext >&5
8079   rm -rf conftest*
8080   eval "ac_cv_lib_$ac_lib_var=no"
8081 fi
8082 rm -f conftest*
8083 xe_check_libs=""
8084
8085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8086   echo "$ac_t""yes" 1>&6
8087   :
8088 else
8089   echo "$ac_t""no" 1>&6
8090 with_png=no
8091 fi
8092
8093  }
8094   if test -z "$with_png"; then
8095     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8096 echo "configure:8097: checking for workable png version information" >&5
8097     xe_check_libs="-lpng -lz"
8098     cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 #include <png.h>
8102     int main(int c, char **v) {
8103     if (c == 1) return 0;
8104     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8105     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8106 EOF
8107 if { (eval echo configure:8108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8108 then
8109   ./conftest dummy_arg; png_status=$?;
8110       if test "$png_status" = "0"; then
8111         with_png=yes;
8112       else
8113         with_png=no;
8114         if test "$png_status" = "1"; then
8115           png_problem="PNG library version and header file don't match!"
8116         elif test "$png_status" = "2"; then
8117           png_problem="PNG library version too old (pre 1.0.2)!"
8118         fi
8119         echo "
8120 *** WARNING *** $png_problem
8121   I'm not touching that with a 10-foot pole!
8122   If you really want to use the installed version of libPNG, rerun
8123   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8124     fi
8125 else
8126   conftest_rc="$?"
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -fr conftest*
8130   with_png=no
8131 fi
8132 rm -fr conftest*
8133     xe_check_libs=
8134     echo "$ac_t""$with_png" 1>&6
8135   fi
8136   if test "$with_png" = "yes"; then
8137     { test "$extra_verbose" = "yes" && cat << \EOF
8138     Defining HAVE_PNG
8139 EOF
8140 cat >> confdefs.h <<\EOF
8141 #define HAVE_PNG 1
8142 EOF
8143 }
8144
8145     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8146   fi
8147
8148     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8149 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8150 echo "configure:8151: checking for tiffio.h" >&5
8151
8152 cat > conftest.$ac_ext <<EOF
8153 #line 8154 "configure"
8154 #include "confdefs.h"
8155 #include <tiffio.h>
8156 EOF
8157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8158 { (eval echo configure:8159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8160 if test -z "$ac_err"; then
8161   rm -rf conftest*
8162   eval "ac_cv_header_$ac_safe=yes"
8163 else
8164   echo "$ac_err" >&5
8165   echo "configure: failed program was:" >&5
8166   cat conftest.$ac_ext >&5
8167   rm -rf conftest*
8168   eval "ac_cv_header_$ac_safe=no"
8169 fi
8170 rm -f conftest*
8171 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8172   echo "$ac_t""yes" 1>&6
8173   :
8174 else
8175   echo "$ac_t""no" 1>&6
8176 with_tiff=no
8177 fi
8178  }
8179   test -z "$with_tiff" && { 
8180 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8181 echo "configure:8182: checking for TIFFClientOpen in -ltiff" >&5
8182 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8183
8184 xe_check_libs=" -ltiff "
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 /* Override any gcc2 internal prototype to avoid an error.  */
8189 /* We use char because int might match the return type of a gcc2
8190     builtin and then its argument prototype would still apply.  */
8191 char TIFFClientOpen();
8192
8193 int main() {
8194 TIFFClientOpen()
8195 ; return 0; }
8196 EOF
8197 if { (eval echo configure:8198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8198   rm -rf conftest*
8199   eval "ac_cv_lib_$ac_lib_var=yes"
8200 else
8201   echo "configure: failed program was:" >&5
8202   cat conftest.$ac_ext >&5
8203   rm -rf conftest*
8204   eval "ac_cv_lib_$ac_lib_var=no"
8205 fi
8206 rm -f conftest*
8207 xe_check_libs=""
8208
8209 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8210   echo "$ac_t""yes" 1>&6
8211   :
8212 else
8213   echo "$ac_t""no" 1>&6
8214 with_tiff=no
8215 fi
8216
8217  }
8218   test -z "$with_tiff" && with_tiff=yes
8219   if test "$with_tiff" = "yes"; then
8220     { test "$extra_verbose" = "yes" && cat << \EOF
8221     Defining HAVE_TIFF
8222 EOF
8223 cat >> confdefs.h <<\EOF
8224 #define HAVE_TIFF 1
8225 EOF
8226 }
8227
8228     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8229   fi
8230 fi
8231
8232
8233 if test "$with_x11" = "yes"; then
8234
8235   echo "checking for X11 graphics libraries" 1>&6
8236 echo "configure:8237: checking for X11 graphics libraries" >&5
8237
8238   echo "checking for the Athena widgets" 1>&6
8239 echo "configure:8240: checking for the Athena widgets" >&5
8240
8241     case "$with_athena" in
8242         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8243     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8244     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8245     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8246     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8247     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8248   esac
8249
8250     if test "$athena_3d" = "no"; then
8251     
8252 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8253 echo "configure:8254: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8254 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8255
8256 xe_check_libs=" -l$athena_variant "
8257 cat > conftest.$ac_ext <<EOF
8258 #line 8259 "configure"
8259 #include "confdefs.h"
8260 /* Override any gcc2 internal prototype to avoid an error.  */
8261 /* We use char because int might match the return type of a gcc2
8262     builtin and then its argument prototype would still apply.  */
8263 char XawScrollbarSetThumb();
8264
8265 int main() {
8266 XawScrollbarSetThumb()
8267 ; return 0; }
8268 EOF
8269 if { (eval echo configure:8270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8270   rm -rf conftest*
8271   eval "ac_cv_lib_$ac_lib_var=yes"
8272 else
8273   echo "configure: failed program was:" >&5
8274   cat conftest.$ac_ext >&5
8275   rm -rf conftest*
8276   eval "ac_cv_lib_$ac_lib_var=no"
8277 fi
8278 rm -f conftest*
8279 xe_check_libs=""
8280
8281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8282   echo "$ac_t""yes" 1>&6
8283           
8284 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8285 echo "configure:8286: checking for threeDClassRec in -l$athena_variant" >&5
8286 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8287
8288 xe_check_libs=" -l$athena_variant "
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 /* Override any gcc2 internal prototype to avoid an error.  */
8293 /* We use char because int might match the return type of a gcc2
8294     builtin and then its argument prototype would still apply.  */
8295 char threeDClassRec();
8296
8297 int main() {
8298 threeDClassRec()
8299 ; return 0; }
8300 EOF
8301 if { (eval echo configure:8302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8302   rm -rf conftest*
8303   eval "ac_cv_lib_$ac_lib_var=yes"
8304 else
8305   echo "configure: failed program was:" >&5
8306   cat conftest.$ac_ext >&5
8307   rm -rf conftest*
8308   eval "ac_cv_lib_$ac_lib_var=no"
8309 fi
8310 rm -f conftest*
8311 xe_check_libs=""
8312
8313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8314   echo "$ac_t""yes" 1>&6
8315   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8316 else
8317   echo "$ac_t""no" 1>&6
8318 athena_lib=$athena_variant
8319 fi
8320
8321
8322       
8323 else
8324   echo "$ac_t""no" 1>&6
8325 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8326 fi
8327
8328
8329   else
8330         
8331 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8332 echo "configure:8333: checking for threeDClassRec in -l$athena_variant" >&5
8333 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8334
8335 xe_check_libs=" -l$athena_variant "
8336 cat > conftest.$ac_ext <<EOF
8337 #line 8338 "configure"
8338 #include "confdefs.h"
8339 /* Override any gcc2 internal prototype to avoid an error.  */
8340 /* We use char because int might match the return type of a gcc2
8341     builtin and then its argument prototype would still apply.  */
8342 char threeDClassRec();
8343
8344 int main() {
8345 threeDClassRec()
8346 ; return 0; }
8347 EOF
8348 if { (eval echo configure:8349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8349   rm -rf conftest*
8350   eval "ac_cv_lib_$ac_lib_var=yes"
8351 else
8352   echo "configure: failed program was:" >&5
8353   cat conftest.$ac_ext >&5
8354   rm -rf conftest*
8355   eval "ac_cv_lib_$ac_lib_var=no"
8356 fi
8357 rm -f conftest*
8358 xe_check_libs=""
8359
8360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8361   echo "$ac_t""yes" 1>&6
8362   athena_lib=$athena_variant
8363 else
8364   echo "$ac_t""no" 1>&6
8365 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8366 echo "configure:8367: checking for threeDClassRec in -lXaw" >&5
8367 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8368
8369 xe_check_libs=" -lXaw "
8370 cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373 /* Override any gcc2 internal prototype to avoid an error.  */
8374 /* We use char because int might match the return type of a gcc2
8375     builtin and then its argument prototype would still apply.  */
8376 char threeDClassRec();
8377
8378 int main() {
8379 threeDClassRec()
8380 ; return 0; }
8381 EOF
8382 if { (eval echo configure:8383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8383   rm -rf conftest*
8384   eval "ac_cv_lib_$ac_lib_var=yes"
8385 else
8386   echo "configure: failed program was:" >&5
8387   cat conftest.$ac_ext >&5
8388   rm -rf conftest*
8389   eval "ac_cv_lib_$ac_lib_var=no"
8390 fi
8391 rm -f conftest*
8392 xe_check_libs=""
8393
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8395   echo "$ac_t""yes" 1>&6
8396   athena_lib=Xaw;
8397           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8398         
8399 else
8400   echo "$ac_t""no" 1>&6
8401 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8402 fi
8403
8404
8405 fi
8406
8407
8408   fi
8409
8410     if test "$athena_3d" = "no"; then
8411     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8412 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8413 echo "configure:8414: checking for X11/Xaw/ThreeD.h" >&5
8414
8415 cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 #include <X11/Xaw/ThreeD.h>
8419 EOF
8420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8421 { (eval echo configure:8422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8423 if test -z "$ac_err"; then
8424   rm -rf conftest*
8425   eval "ac_cv_header_$ac_safe=yes"
8426 else
8427   echo "$ac_err" >&5
8428   echo "configure: failed program was:" >&5
8429   cat conftest.$ac_ext >&5
8430   rm -rf conftest*
8431   eval "ac_cv_header_$ac_safe=no"
8432 fi
8433 rm -f conftest*
8434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8435   echo "$ac_t""yes" 1>&6
8436   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8437 else
8438   echo "$ac_t""no" 1>&6
8439 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8440 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8441 echo "configure:8442: checking for X11/Xaw/XawInit.h" >&5
8442
8443 cat > conftest.$ac_ext <<EOF
8444 #line 8445 "configure"
8445 #include "confdefs.h"
8446 #include <X11/Xaw/XawInit.h>
8447 EOF
8448 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8449 { (eval echo configure:8450: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8450 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8451 if test -z "$ac_err"; then
8452   rm -rf conftest*
8453   eval "ac_cv_header_$ac_safe=yes"
8454 else
8455   echo "$ac_err" >&5
8456   echo "configure: failed program was:" >&5
8457   cat conftest.$ac_ext >&5
8458   rm -rf conftest*
8459   eval "ac_cv_header_$ac_safe=no"
8460 fi
8461 rm -f conftest*
8462 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8463   echo "$ac_t""yes" 1>&6
8464   athena_h_path=X11/Xaw
8465 else
8466   echo "$ac_t""no" 1>&6
8467 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8468 fi
8469
8470 fi
8471
8472   else
8473             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8474 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8475 echo "configure:8476: checking for X11/$athena_variant/XawInit.h" >&5
8476
8477 cat > conftest.$ac_ext <<EOF
8478 #line 8479 "configure"
8479 #include "confdefs.h"
8480 #include <X11/$athena_variant/XawInit.h>
8481 EOF
8482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8483 { (eval echo configure:8484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8485 if test -z "$ac_err"; then
8486   rm -rf conftest*
8487   eval "ac_cv_header_$ac_safe=yes"
8488 else
8489   echo "$ac_err" >&5
8490   echo "configure: failed program was:" >&5
8491   cat conftest.$ac_ext >&5
8492   rm -rf conftest*
8493   eval "ac_cv_header_$ac_safe=no"
8494 fi
8495 rm -f conftest*
8496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8497   echo "$ac_t""yes" 1>&6
8498   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8499 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8500 echo "configure:8501: checking for X11/$athena_variant/ThreeD.h" >&5
8501
8502 cat > conftest.$ac_ext <<EOF
8503 #line 8504 "configure"
8504 #include "confdefs.h"
8505 #include <X11/$athena_variant/ThreeD.h>
8506 EOF
8507 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8508 { (eval echo configure:8509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8509 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8510 if test -z "$ac_err"; then
8511   rm -rf conftest*
8512   eval "ac_cv_header_$ac_safe=yes"
8513 else
8514   echo "$ac_err" >&5
8515   echo "configure: failed program was:" >&5
8516   cat conftest.$ac_ext >&5
8517   rm -rf conftest*
8518   eval "ac_cv_header_$ac_safe=no"
8519 fi
8520 rm -f conftest*
8521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8522   echo "$ac_t""yes" 1>&6
8523   athena_h_path=X11/$athena_variant
8524 else
8525   echo "$ac_t""no" 1>&6
8526 fi
8527
8528 else
8529   echo "$ac_t""no" 1>&6
8530 fi
8531
8532
8533         if test -z "$athena_h_path"; then
8534       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8535 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8536 echo "configure:8537: checking for $athena_variant/XawInit.h" >&5
8537
8538 cat > conftest.$ac_ext <<EOF
8539 #line 8540 "configure"
8540 #include "confdefs.h"
8541 #include <$athena_variant/XawInit.h>
8542 EOF
8543 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8544 { (eval echo configure:8545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8545 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8546 if test -z "$ac_err"; then
8547   rm -rf conftest*
8548   eval "ac_cv_header_$ac_safe=yes"
8549 else
8550   echo "$ac_err" >&5
8551   echo "configure: failed program was:" >&5
8552   cat conftest.$ac_ext >&5
8553   rm -rf conftest*
8554   eval "ac_cv_header_$ac_safe=no"
8555 fi
8556 rm -f conftest*
8557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8558   echo "$ac_t""yes" 1>&6
8559   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8560 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8561 echo "configure:8562: checking for $athena_variant/ThreeD.h" >&5
8562
8563 cat > conftest.$ac_ext <<EOF
8564 #line 8565 "configure"
8565 #include "confdefs.h"
8566 #include <$athena_variant/ThreeD.h>
8567 EOF
8568 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8569 { (eval echo configure:8570: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8570 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8571 if test -z "$ac_err"; then
8572   rm -rf conftest*
8573   eval "ac_cv_header_$ac_safe=yes"
8574 else
8575   echo "$ac_err" >&5
8576   echo "configure: failed program was:" >&5
8577   cat conftest.$ac_ext >&5
8578   rm -rf conftest*
8579   eval "ac_cv_header_$ac_safe=no"
8580 fi
8581 rm -f conftest*
8582 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8583   echo "$ac_t""yes" 1>&6
8584   athena_h_path=$athena_variant
8585 else
8586   echo "$ac_t""no" 1>&6
8587 fi
8588
8589 else
8590   echo "$ac_t""no" 1>&6
8591 fi
8592
8593     fi
8594
8595         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8596       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8597 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8598 echo "configure:8599: checking for X11/Xaw3d/XawInit.h" >&5
8599
8600 cat > conftest.$ac_ext <<EOF
8601 #line 8602 "configure"
8602 #include "confdefs.h"
8603 #include <X11/Xaw3d/XawInit.h>
8604 EOF
8605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8606 { (eval echo configure:8607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8608 if test -z "$ac_err"; then
8609   rm -rf conftest*
8610   eval "ac_cv_header_$ac_safe=yes"
8611 else
8612   echo "$ac_err" >&5
8613   echo "configure: failed program was:" >&5
8614   cat conftest.$ac_ext >&5
8615   rm -rf conftest*
8616   eval "ac_cv_header_$ac_safe=no"
8617 fi
8618 rm -f conftest*
8619 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8620   echo "$ac_t""yes" 1>&6
8621   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8622 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8623 echo "configure:8624: checking for X11/Xaw3d/ThreeD.h" >&5
8624
8625 cat > conftest.$ac_ext <<EOF
8626 #line 8627 "configure"
8627 #include "confdefs.h"
8628 #include <X11/Xaw3d/ThreeD.h>
8629 EOF
8630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8631 { (eval echo configure:8632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8633 if test -z "$ac_err"; then
8634   rm -rf conftest*
8635   eval "ac_cv_header_$ac_safe=yes"
8636 else
8637   echo "$ac_err" >&5
8638   echo "configure: failed program was:" >&5
8639   cat conftest.$ac_ext >&5
8640   rm -rf conftest*
8641   eval "ac_cv_header_$ac_safe=no"
8642 fi
8643 rm -f conftest*
8644 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8645   echo "$ac_t""yes" 1>&6
8646   
8647             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8648             athena_h_path=X11/Xaw3d
8649           
8650 else
8651   echo "$ac_t""no" 1>&6
8652 fi
8653
8654 else
8655   echo "$ac_t""no" 1>&6
8656 fi
8657
8658     fi
8659
8660         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8661       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8662 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8663 echo "configure:8664: checking for Xaw3d/XawInit.h" >&5
8664
8665 cat > conftest.$ac_ext <<EOF
8666 #line 8667 "configure"
8667 #include "confdefs.h"
8668 #include <Xaw3d/XawInit.h>
8669 EOF
8670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8671 { (eval echo configure:8672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8673 if test -z "$ac_err"; then
8674   rm -rf conftest*
8675   eval "ac_cv_header_$ac_safe=yes"
8676 else
8677   echo "$ac_err" >&5
8678   echo "configure: failed program was:" >&5
8679   cat conftest.$ac_ext >&5
8680   rm -rf conftest*
8681   eval "ac_cv_header_$ac_safe=no"
8682 fi
8683 rm -f conftest*
8684 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8685   echo "$ac_t""yes" 1>&6
8686   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8687 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8688 echo "configure:8689: checking for Xaw3d/ThreeD.h" >&5
8689
8690 cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 #include <Xaw3d/ThreeD.h>
8694 EOF
8695 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8696 { (eval echo configure:8697: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8697 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8698 if test -z "$ac_err"; then
8699   rm -rf conftest*
8700   eval "ac_cv_header_$ac_safe=yes"
8701 else
8702   echo "$ac_err" >&5
8703   echo "configure: failed program was:" >&5
8704   cat conftest.$ac_ext >&5
8705   rm -rf conftest*
8706   eval "ac_cv_header_$ac_safe=no"
8707 fi
8708 rm -f conftest*
8709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8710   echo "$ac_t""yes" 1>&6
8711   
8712             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8713             athena_h_path=Xaw3d
8714           
8715 else
8716   echo "$ac_t""no" 1>&6
8717 fi
8718
8719 else
8720   echo "$ac_t""no" 1>&6
8721 fi
8722
8723     fi
8724
8725             if test -z "$athena_h_path"; then
8726       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8727 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8728 echo "configure:8729: checking for X11/Xaw/ThreeD.h" >&5
8729
8730 cat > conftest.$ac_ext <<EOF
8731 #line 8732 "configure"
8732 #include "confdefs.h"
8733 #include <X11/Xaw/ThreeD.h>
8734 EOF
8735 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8736 { (eval echo configure:8737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8737 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8738 if test -z "$ac_err"; then
8739   rm -rf conftest*
8740   eval "ac_cv_header_$ac_safe=yes"
8741 else
8742   echo "$ac_err" >&5
8743   echo "configure: failed program was:" >&5
8744   cat conftest.$ac_ext >&5
8745   rm -rf conftest*
8746   eval "ac_cv_header_$ac_safe=no"
8747 fi
8748 rm -f conftest*
8749 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8750   echo "$ac_t""yes" 1>&6
8751   
8752           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8753           athena_h_path=X11/Xaw
8754         
8755 else
8756   echo "$ac_t""no" 1>&6
8757 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8758 fi
8759
8760     fi
8761   fi
8762
8763     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8764     have_xaw=yes
8765   else
8766     have_xaw=no
8767   fi
8768
8769     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8770 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8771 echo "configure:8772: checking for Xm/Xm.h" >&5
8772
8773 cat > conftest.$ac_ext <<EOF
8774 #line 8775 "configure"
8775 #include "confdefs.h"
8776 #include <Xm/Xm.h>
8777 EOF
8778 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8779 { (eval echo configure:8780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8780 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8781 if test -z "$ac_err"; then
8782   rm -rf conftest*
8783   eval "ac_cv_header_$ac_safe=yes"
8784 else
8785   echo "$ac_err" >&5
8786   echo "configure: failed program was:" >&5
8787   cat conftest.$ac_ext >&5
8788   rm -rf conftest*
8789   eval "ac_cv_header_$ac_safe=no"
8790 fi
8791 rm -f conftest*
8792 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8793   echo "$ac_t""yes" 1>&6
8794   
8795 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8796 echo "configure:8797: checking for XmStringFree in -lXm" >&5
8797 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8798
8799 xe_check_libs=" -lXm "
8800 cat > conftest.$ac_ext <<EOF
8801 #line 8802 "configure"
8802 #include "confdefs.h"
8803 /* Override any gcc2 internal prototype to avoid an error.  */
8804 /* We use char because int might match the return type of a gcc2
8805     builtin and then its argument prototype would still apply.  */
8806 char XmStringFree();
8807
8808 int main() {
8809 XmStringFree()
8810 ; return 0; }
8811 EOF
8812 if { (eval echo configure:8813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8813   rm -rf conftest*
8814   eval "ac_cv_lib_$ac_lib_var=yes"
8815 else
8816   echo "configure: failed program was:" >&5
8817   cat conftest.$ac_ext >&5
8818   rm -rf conftest*
8819   eval "ac_cv_lib_$ac_lib_var=no"
8820 fi
8821 rm -f conftest*
8822 xe_check_libs=""
8823
8824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8825   echo "$ac_t""yes" 1>&6
8826   have_motif=yes
8827 else
8828   echo "$ac_t""no" 1>&6
8829 have_motif=no
8830 fi
8831
8832
8833 else
8834   echo "$ac_t""no" 1>&6
8835 have_motif=no
8836 fi
8837
8838
8839   if test "$have_motif" = "yes"; then
8840         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8841 echo "configure:8842: checking for Lesstif" >&5
8842     cat > conftest.$ac_ext <<EOF
8843 #line 8844 "configure"
8844 #include "confdefs.h"
8845 #include <Xm/Xm.h>
8846 #ifdef LESSTIF_VERSION
8847 yes
8848 #endif
8849
8850 EOF
8851 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8852   egrep "yes" >/dev/null 2>&1; then
8853   rm -rf conftest*
8854   have_lesstif=yes
8855 else
8856   rm -rf conftest*
8857   have_lesstif=no
8858 fi
8859 rm -f conftest*
8860
8861   echo "$ac_t""$have_lesstif" 1>&6
8862   fi
8863
8864 fi 
8865
8866 case "$with_menubars" in "" | "yes" | "athena" )
8867   with_menubars="lucid" ;;
8868 esac
8869 case "$with_dialogs" in "" | "yes" | "lucid" )
8870   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8871   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8872   else with_dialogs=no
8873   fi ;;
8874 esac
8875 case "$with_scrollbars" in "" | "yes" )
8876   with_scrollbars="lucid" ;;
8877 esac
8878 case "$with_widgets" in "" | "yes" | "lucid")
8879   if   test "$have_motif" = "yes"; then with_widgets="motif"
8880   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8881   else with_widgets=no
8882   fi ;;
8883 esac
8884
8885 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8886
8887 case "$all_widgets" in
8888   *athena* )
8889     if test "$have_xaw" != "yes"; then
8890       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8891     fi
8892
8893         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8894
8895         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8896
8897                     { test "$extra_verbose" = "yes" && cat << EOF
8898     Defining ATHENA_Scrollbar_h_ = "$athena_h_path/Scrollbar.h"
8899 EOF
8900 cat >> confdefs.h <<EOF
8901 #define ATHENA_Scrollbar_h_ "$athena_h_path/Scrollbar.h"
8902 EOF
8903 }
8904
8905     { test "$extra_verbose" = "yes" && cat << EOF
8906     Defining ATHENA_Dialog_h_ = "$athena_h_path/Dialog.h"
8907 EOF
8908 cat >> confdefs.h <<EOF
8909 #define ATHENA_Dialog_h_ "$athena_h_path/Dialog.h"
8910 EOF
8911 }
8912
8913     { test "$extra_verbose" = "yes" && cat << EOF
8914     Defining ATHENA_Form_h_ = "$athena_h_path/Form.h"
8915 EOF
8916 cat >> confdefs.h <<EOF
8917 #define ATHENA_Form_h_ "$athena_h_path/Form.h"
8918 EOF
8919 }
8920
8921     { test "$extra_verbose" = "yes" && cat << EOF
8922     Defining ATHENA_Command_h_ = "$athena_h_path/Command.h"
8923 EOF
8924 cat >> confdefs.h <<EOF
8925 #define ATHENA_Command_h_ "$athena_h_path/Command.h"
8926 EOF
8927 }
8928
8929     { test "$extra_verbose" = "yes" && cat << EOF
8930     Defining ATHENA_Label_h_ = "$athena_h_path/Label.h"
8931 EOF
8932 cat >> confdefs.h <<EOF
8933 #define ATHENA_Label_h_ "$athena_h_path/Label.h"
8934 EOF
8935 }
8936
8937     { test "$extra_verbose" = "yes" && cat << EOF
8938     Defining ATHENA_LabelP_h_ = "$athena_h_path/LabelP.h"
8939 EOF
8940 cat >> confdefs.h <<EOF
8941 #define ATHENA_LabelP_h_ "$athena_h_path/LabelP.h"
8942 EOF
8943 }
8944
8945     { test "$extra_verbose" = "yes" && cat << EOF
8946     Defining ATHENA_Toggle_h_ = "$athena_h_path/Toggle.h"
8947 EOF
8948 cat >> confdefs.h <<EOF
8949 #define ATHENA_Toggle_h_ "$athena_h_path/Toggle.h"
8950 EOF
8951 }
8952
8953     { test "$extra_verbose" = "yes" && cat << EOF
8954     Defining ATHENA_ToggleP_h_ = "$athena_h_path/ToggleP.h"
8955 EOF
8956 cat >> confdefs.h <<EOF
8957 #define ATHENA_ToggleP_h_ "$athena_h_path/ToggleP.h"
8958 EOF
8959 }
8960
8961     { test "$extra_verbose" = "yes" && cat << EOF
8962     Defining ATHENA_AsciiText_h_ = "$athena_h_path/AsciiText.h"
8963 EOF
8964 cat >> confdefs.h <<EOF
8965 #define ATHENA_AsciiText_h_ "$athena_h_path/AsciiText.h"
8966 EOF
8967 }
8968
8969     { test "$extra_verbose" = "yes" && cat << EOF
8970     Defining ATHENA_XawInit_h_ = "$athena_h_path/XawInit.h"
8971 EOF
8972 cat >> confdefs.h <<EOF
8973 #define ATHENA_XawInit_h_ "$athena_h_path/XawInit.h"
8974 EOF
8975 }
8976
8977
8978     { test "$extra_verbose" = "yes" && cat << \EOF
8979     Defining LWLIB_USES_ATHENA
8980 EOF
8981 cat >> confdefs.h <<\EOF
8982 #define LWLIB_USES_ATHENA 1
8983 EOF
8984 }
8985
8986     { test "$extra_verbose" = "yes" && cat << \EOF
8987     Defining NEED_ATHENA
8988 EOF
8989 cat >> confdefs.h <<\EOF
8990 #define NEED_ATHENA 1
8991 EOF
8992 }
8993
8994     need_athena="yes"
8995
8996     if test "$athena_3d" = "yes"; then
8997       { test "$extra_verbose" = "yes" && cat << \EOF
8998     Defining HAVE_ATHENA_3D
8999 EOF
9000 cat >> confdefs.h <<\EOF
9001 #define HAVE_ATHENA_3D 1
9002 EOF
9003 }
9004
9005     fi
9006   ;;
9007 esac
9008
9009 case "$all_widgets" in *motif* )
9010   { test "$extra_verbose" = "yes" && cat << \EOF
9011     Defining LWLIB_USES_MOTIF
9012 EOF
9013 cat >> confdefs.h <<\EOF
9014 #define LWLIB_USES_MOTIF 1
9015 EOF
9016 }
9017
9018   { test "$extra_verbose" = "yes" && cat << \EOF
9019     Defining NEED_MOTIF
9020 EOF
9021 cat >> confdefs.h <<\EOF
9022 #define NEED_MOTIF 1
9023 EOF
9024 }
9025
9026   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
9027   need_motif=yes ;;
9028 esac
9029
9030 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9031 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
9032 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
9033 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
9034         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
9035 case "$with_widgets" in athena* )
9036         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;;
9037 esac
9038 case "$all_widgets" in *lucid* )
9039   { test "$extra_verbose" = "yes" && cat << \EOF
9040     Defining NEED_LUCID
9041 EOF
9042 cat >> confdefs.h <<\EOF
9043 #define NEED_LUCID 1
9044 EOF
9045 }
9046
9047   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
9048 esac
9049
9050
9051
9052 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9053     Defining LWLIB_SCROLLBARS_ATHENA
9054 EOF
9055 cat >> confdefs.h <<\EOF
9056 #define LWLIB_SCROLLBARS_ATHENA 1
9057 EOF
9058 }
9059
9060 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9061     Defining LWLIB_DIALOGS_ATHENA
9062 EOF
9063 cat >> confdefs.h <<\EOF
9064 #define LWLIB_DIALOGS_ATHENA 1
9065 EOF
9066 }
9067
9068
9069 if test "$athena_3d" = "yes"; then
9070   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9071     Defining LWLIB_SCROLLBARS_ATHENA3D
9072 EOF
9073 cat >> confdefs.h <<\EOF
9074 #define LWLIB_SCROLLBARS_ATHENA3D 1
9075 EOF
9076 }
9077
9078   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
9079     Defining LWLIB_DIALOGS_ATHENA3D
9080 EOF
9081 cat >> confdefs.h <<\EOF
9082 #define LWLIB_DIALOGS_ATHENA3D 1
9083 EOF
9084 }
9085
9086 fi
9087
9088 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
9089     Defining LWLIB_WIDGETS_ATHENA
9090 EOF
9091 cat >> confdefs.h <<\EOF
9092 #define LWLIB_WIDGETS_ATHENA 1
9093 EOF
9094 }
9095 ;; esac
9096 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
9097         { test "$extra_verbose" = "yes" && cat << \EOF
9098     Defining LWLIB_TABS_LUCID
9099 EOF
9100 cat >> confdefs.h <<\EOF
9101 #define LWLIB_TABS_LUCID 1
9102 EOF
9103 }
9104
9105
9106 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9107     Defining HAVE_MENUBARS
9108 EOF
9109 cat >> confdefs.h <<\EOF
9110 #define HAVE_MENUBARS 1
9111 EOF
9112 }
9113
9114 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9115     Defining HAVE_SCROLLBARS
9116 EOF
9117 cat >> confdefs.h <<\EOF
9118 #define HAVE_SCROLLBARS 1
9119 EOF
9120 }
9121
9122 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9123     Defining HAVE_DIALOGS
9124 EOF
9125 cat >> confdefs.h <<\EOF
9126 #define HAVE_DIALOGS 1
9127 EOF
9128 }
9129
9130 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9131     Defining HAVE_TOOLBARS
9132 EOF
9133 cat >> confdefs.h <<\EOF
9134 #define HAVE_TOOLBARS 1
9135 EOF
9136 }
9137
9138 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
9139     Defining HAVE_WIDGETS
9140 EOF
9141 cat >> confdefs.h <<\EOF
9142 #define HAVE_WIDGETS 1
9143 EOF
9144 }
9145
9146
9147 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9148     Defining LWLIB_MENUBARS_LUCID
9149 EOF
9150 cat >> confdefs.h <<\EOF
9151 #define LWLIB_MENUBARS_LUCID 1
9152 EOF
9153 }
9154
9155 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9156     Defining LWLIB_SCROLLBARS_LUCID
9157 EOF
9158 cat >> confdefs.h <<\EOF
9159 #define LWLIB_SCROLLBARS_LUCID 1
9160 EOF
9161 }
9162
9163
9164 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9165     Defining LWLIB_MENUBARS_MOTIF
9166 EOF
9167 cat >> confdefs.h <<\EOF
9168 #define LWLIB_MENUBARS_MOTIF 1
9169 EOF
9170 }
9171
9172 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9173     Defining LWLIB_SCROLLBARS_MOTIF
9174 EOF
9175 cat >> confdefs.h <<\EOF
9176 #define LWLIB_SCROLLBARS_MOTIF 1
9177 EOF
9178 }
9179
9180 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9181     Defining LWLIB_DIALOGS_MOTIF
9182 EOF
9183 cat >> confdefs.h <<\EOF
9184 #define LWLIB_DIALOGS_MOTIF 1
9185 EOF
9186 }
9187
9188 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9189     Defining LWLIB_WIDGETS_MOTIF
9190 EOF
9191 cat >> confdefs.h <<\EOF
9192 #define LWLIB_WIDGETS_MOTIF 1
9193 EOF
9194 }
9195
9196
9197 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9198    echo "    xemacs will be linked with \"menubar.o\""
9199  fi
9200 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9201    echo "    xemacs will be linked with \"scrollbar.o\""
9202  fi
9203 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9204    echo "    xemacs will be linked with \"dialog.o\""
9205  fi
9206 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9207    echo "    xemacs will be linked with \"toolbar.o\""
9208  fi
9209
9210 if test "$with_x11" = "yes"; then
9211   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9212    echo "    xemacs will be linked with \"menubar-x.o\""
9213  fi
9214   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9215    echo "    xemacs will be linked with \"scrollbar-x.o\""
9216  fi
9217   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9218    echo "    xemacs will be linked with \"dialog-x.o\""
9219  fi
9220   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9221    echo "    xemacs will be linked with \"toolbar-x.o\""
9222  fi
9223   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9224    echo "    xemacs will be linked with \"gui-x.o\""
9225  fi
9226 fi
9227
9228
9229 test -z "$with_mule" && with_mule=no
9230 test -z "$with_file_coding" && with_file_coding=no
9231
9232
9233 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9234   { test "$extra_verbose" = "yes" && cat << \EOF
9235     Defining FILE_CODING
9236 EOF
9237 cat >> confdefs.h <<\EOF
9238 #define FILE_CODING 1
9239 EOF
9240 }
9241
9242   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9243    echo "    xemacs will be linked with \"file-coding.o\""
9244  fi
9245 fi
9246
9247 if test "$with_mule" = "yes" ; then
9248   echo "checking for Mule-related features" 1>&6
9249 echo "configure:9250: checking for Mule-related features" >&5
9250   { test "$extra_verbose" = "yes" && cat << \EOF
9251     Defining MULE
9252 EOF
9253 cat >> confdefs.h <<\EOF
9254 #define MULE 1
9255 EOF
9256 }
9257
9258   { test "$extra_verbose" = "yes" && cat << \EOF
9259     Defining FILE_CODING
9260 EOF
9261 cat >> confdefs.h <<\EOF
9262 #define FILE_CODING 1
9263 EOF
9264 }
9265
9266   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9267    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9268  fi
9269   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9270     { test "$extra_verbose" = "yes" && cat << \EOF
9271     Defining TEXT_CODING
9272 EOF
9273 cat >> confdefs.h <<\EOF
9274 #define TEXT_CODING 1
9275 EOF
9276 }
9277
9278     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9279    echo "    xemacs will be linked with \"text-coding.o\""
9280  fi
9281   else
9282     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9283    echo "    xemacs will be linked with \"file-coding.o\""
9284  fi
9285   fi
9286     for ac_hdr in libintl.h
9287 do
9288 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9289 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9290 echo "configure:9291: checking for $ac_hdr" >&5
9291
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295 #include <$ac_hdr>
9296 EOF
9297 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9298 { (eval echo configure:9299: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9299 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9300 if test -z "$ac_err"; then
9301   rm -rf conftest*
9302   eval "ac_cv_header_$ac_safe=yes"
9303 else
9304   echo "$ac_err" >&5
9305   echo "configure: failed program was:" >&5
9306   cat conftest.$ac_ext >&5
9307   rm -rf conftest*
9308   eval "ac_cv_header_$ac_safe=no"
9309 fi
9310 rm -f conftest*
9311 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9312   echo "$ac_t""yes" 1>&6
9313     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9314   { test "$extra_verbose" = "yes" && cat << EOF
9315     Defining $ac_tr_hdr
9316 EOF
9317 cat >> confdefs.h <<EOF
9318 #define $ac_tr_hdr 1
9319 EOF
9320 }
9321  
9322 else
9323   echo "$ac_t""no" 1>&6
9324 fi
9325 done
9326
9327   
9328 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9329 echo "configure:9330: checking for strerror in -lintl" >&5
9330 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9331
9332 xe_check_libs=" -lintl "
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336 /* Override any gcc2 internal prototype to avoid an error.  */
9337 /* We use char because int might match the return type of a gcc2
9338     builtin and then its argument prototype would still apply.  */
9339 char strerror();
9340
9341 int main() {
9342 strerror()
9343 ; return 0; }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9346   rm -rf conftest*
9347   eval "ac_cv_lib_$ac_lib_var=yes"
9348 else
9349   echo "configure: failed program was:" >&5
9350   cat conftest.$ac_ext >&5
9351   rm -rf conftest*
9352   eval "ac_cv_lib_$ac_lib_var=no"
9353 fi
9354 rm -f conftest*
9355 xe_check_libs=""
9356
9357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9358   echo "$ac_t""yes" 1>&6
9359     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9360     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9361   { test "$extra_verbose" = "yes" && cat << EOF
9362     Defining $ac_tr_lib
9363 EOF
9364 cat >> confdefs.h <<EOF
9365 #define $ac_tr_lib 1
9366 EOF
9367 }
9368
9369   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9370
9371 else
9372   echo "$ac_t""no" 1>&6
9373 fi
9374
9375
9376
9377   if test "$with_utf_2000" = "yes" ; then
9378     { test "$extra_verbose" = "yes" && cat << \EOF
9379     Defining CHAR_IS_UCS4
9380 EOF
9381 cat >> confdefs.h <<\EOF
9382 #define CHAR_IS_UCS4 1
9383 EOF
9384 }
9385
9386     { test "$extra_verbose" = "yes" && cat << \EOF
9387     Defining UTF2000
9388 EOF
9389 cat >> confdefs.h <<\EOF
9390 #define UTF2000 1
9391 EOF
9392 }
9393
9394   fi
9395
9396   echo "checking for Mule input methods" 1>&6
9397 echo "configure:9398: checking for Mule input methods" >&5
9398         case "$with_xim" in "" | "yes" )
9399     echo "checking for XIM" 1>&6
9400 echo "configure:9401: checking for XIM" >&5
9401     
9402 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9403 echo "configure:9404: checking for XOpenIM in -lX11" >&5
9404 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9405
9406 xe_check_libs=" -lX11 "
9407 cat > conftest.$ac_ext <<EOF
9408 #line 9409 "configure"
9409 #include "confdefs.h"
9410 /* Override any gcc2 internal prototype to avoid an error.  */
9411 /* We use char because int might match the return type of a gcc2
9412     builtin and then its argument prototype would still apply.  */
9413 char XOpenIM();
9414
9415 int main() {
9416 XOpenIM()
9417 ; return 0; }
9418 EOF
9419 if { (eval echo configure:9420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=yes"
9422 else
9423   echo "configure: failed program was:" >&5
9424   cat conftest.$ac_ext >&5
9425   rm -rf conftest*
9426   eval "ac_cv_lib_$ac_lib_var=no"
9427 fi
9428 rm -f conftest*
9429 xe_check_libs=""
9430
9431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9432   echo "$ac_t""yes" 1>&6
9433   with_xim=xlib
9434 else
9435   echo "$ac_t""no" 1>&6
9436 with_xim=no
9437 fi
9438
9439
9440         if test "$have_motif $have_lesstif" = "yes no"; then
9441       
9442 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9443 echo "configure:9444: checking for XmImMbLookupString in -lXm" >&5
9444 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9445
9446 xe_check_libs=" -lXm "
9447 cat > conftest.$ac_ext <<EOF
9448 #line 9449 "configure"
9449 #include "confdefs.h"
9450 /* Override any gcc2 internal prototype to avoid an error.  */
9451 /* We use char because int might match the return type of a gcc2
9452     builtin and then its argument prototype would still apply.  */
9453 char XmImMbLookupString();
9454
9455 int main() {
9456 XmImMbLookupString()
9457 ; return 0; }
9458 EOF
9459 if { (eval echo configure:9460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9460   rm -rf conftest*
9461   eval "ac_cv_lib_$ac_lib_var=yes"
9462 else
9463   echo "configure: failed program was:" >&5
9464   cat conftest.$ac_ext >&5
9465   rm -rf conftest*
9466   eval "ac_cv_lib_$ac_lib_var=no"
9467 fi
9468 rm -f conftest*
9469 xe_check_libs=""
9470
9471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9472   echo "$ac_t""yes" 1>&6
9473   with_xim=motif
9474 else
9475   echo "$ac_t""no" 1>&6
9476 fi
9477
9478
9479     fi ;;
9480   esac
9481   if test "$with_xim" != "no"; then
9482     { test "$extra_verbose" = "yes" && cat << \EOF
9483     Defining HAVE_XIM
9484 EOF
9485 cat >> confdefs.h <<\EOF
9486 #define HAVE_XIM 1
9487 EOF
9488 }
9489
9490     if test "$with_xim" = "xlib"; then
9491       { test "$extra_verbose" = "yes" && cat << \EOF
9492     Defining XIM_XLIB
9493 EOF
9494 cat >> confdefs.h <<\EOF
9495 #define XIM_XLIB 1
9496 EOF
9497 }
9498
9499       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9500    echo "    xemacs will be linked with \"input-method-xlib.o\""
9501  fi
9502     fi
9503     if test "$with_xim" = "motif"; then
9504       { test "$extra_verbose" = "yes" && cat << \EOF
9505     Defining XIM_MOTIF
9506 EOF
9507 cat >> confdefs.h <<\EOF
9508 #define XIM_MOTIF 1
9509 EOF
9510 }
9511
9512       need_motif=yes
9513       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9514    echo "    xemacs will be linked with \"input-method-motif.o\""
9515  fi
9516     fi
9517     if test "$with_xim" = "motif"; then
9518       with_xfs=no
9519     fi
9520   fi
9521
9522     if test "$with_xfs" = "yes" ; then
9523     echo "checking for XFontSet" 1>&6
9524 echo "configure:9525: checking for XFontSet" >&5
9525     
9526 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9527 echo "configure:9528: checking for XmbDrawString in -lX11" >&5
9528 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9529
9530 xe_check_libs=" -lX11 "
9531 cat > conftest.$ac_ext <<EOF
9532 #line 9533 "configure"
9533 #include "confdefs.h"
9534 /* Override any gcc2 internal prototype to avoid an error.  */
9535 /* We use char because int might match the return type of a gcc2
9536     builtin and then its argument prototype would still apply.  */
9537 char XmbDrawString();
9538
9539 int main() {
9540 XmbDrawString()
9541 ; return 0; }
9542 EOF
9543 if { (eval echo configure:9544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9544   rm -rf conftest*
9545   eval "ac_cv_lib_$ac_lib_var=yes"
9546 else
9547   echo "configure: failed program was:" >&5
9548   cat conftest.$ac_ext >&5
9549   rm -rf conftest*
9550   eval "ac_cv_lib_$ac_lib_var=no"
9551 fi
9552 rm -f conftest*
9553 xe_check_libs=""
9554
9555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9556   echo "$ac_t""yes" 1>&6
9557   :
9558 else
9559   echo "$ac_t""no" 1>&6
9560 with_xfs=no
9561 fi
9562
9563
9564     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9565       { test "$extra_verbose" = "yes" && cat << \EOF
9566     Defining USE_XFONTSET
9567 EOF
9568 cat >> confdefs.h <<\EOF
9569 #define USE_XFONTSET 1
9570 EOF
9571 }
9572
9573       if test "$with_xim" = "no" ; then
9574         extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9575    echo "    xemacs will be linked with \"input-method-xlib.o\""
9576  fi
9577       fi
9578     fi
9579   fi 
9580     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9581   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9582 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9583 echo "configure:9584: checking for wnn/jllib.h" >&5
9584
9585 cat > conftest.$ac_ext <<EOF
9586 #line 9587 "configure"
9587 #include "confdefs.h"
9588 #include <wnn/jllib.h>
9589 EOF
9590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9591 { (eval echo configure:9592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9593 if test -z "$ac_err"; then
9594   rm -rf conftest*
9595   eval "ac_cv_header_$ac_safe=yes"
9596 else
9597   echo "$ac_err" >&5
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_header_$ac_safe=no"
9602 fi
9603 rm -f conftest*
9604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9605   echo "$ac_t""yes" 1>&6
9606   :
9607 else
9608   echo "$ac_t""no" 1>&6
9609 with_wnn=no
9610 fi
9611  }
9612     test -z "$with_wnn" && { ac_safe=`echo "wnn/commonhd.h" | sed 'y%./+-%__p_%'`
9613 echo $ac_n "checking for wnn/commonhd.h""... $ac_c" 1>&6
9614 echo "configure:9615: checking for wnn/commonhd.h" >&5
9615
9616 cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 #include <wnn/commonhd.h>
9620 EOF
9621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9622 { (eval echo configure:9623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9624 if test -z "$ac_err"; then
9625   rm -rf conftest*
9626   eval "ac_cv_header_$ac_safe=yes"
9627 else
9628   echo "$ac_err" >&5
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   eval "ac_cv_header_$ac_safe=no"
9633 fi
9634 rm -f conftest*
9635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9636   echo "$ac_t""yes" 1>&6
9637   :
9638 else
9639   echo "$ac_t""no" 1>&6
9640 with_wnn=no
9641 fi
9642  }
9643     if test "$with_wnn" != "no"; then
9644     for ac_func in crypt
9645 do
9646 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9647 echo "configure:9648: checking for $ac_func" >&5
9648
9649 cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652 /* System header to define __stub macros and hopefully few prototypes,
9653     which can conflict with char $ac_func(); below.  */
9654 #include <assert.h>
9655 /* Override any gcc2 internal prototype to avoid an error.  */
9656 /* We use char because int might match the return type of a gcc2
9657     builtin and then its argument prototype would still apply.  */
9658 char $ac_func();
9659
9660 int main() {
9661
9662 /* The GNU C library defines this for functions which it implements
9663     to always fail with ENOSYS.  Some functions are actually named
9664     something starting with __ and the normal name is an alias.  */
9665 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9666 choke me
9667 #else
9668 $ac_func();
9669 #endif
9670
9671 ; return 0; }
9672 EOF
9673 if { (eval echo configure:9674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9674   rm -rf conftest*
9675   eval "ac_cv_func_$ac_func=yes"
9676 else
9677   echo "configure: failed program was:" >&5
9678   cat conftest.$ac_ext >&5
9679   rm -rf conftest*
9680   eval "ac_cv_func_$ac_func=no"
9681 fi
9682 rm -f conftest*
9683
9684 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9685   echo "$ac_t""yes" 1>&6
9686     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9687   { test "$extra_verbose" = "yes" && cat << EOF
9688     Defining $ac_tr_func
9689 EOF
9690 cat >> confdefs.h <<EOF
9691 #define $ac_tr_func 1
9692 EOF
9693 }
9694  
9695 else
9696   echo "$ac_t""no" 1>&6
9697 fi
9698 done
9699
9700     test "$ac_cv_func_crypt" != "yes" && { 
9701 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9702 echo "configure:9703: checking for crypt in -lcrypt" >&5
9703 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9704
9705 xe_check_libs=" -lcrypt "
9706 cat > conftest.$ac_ext <<EOF
9707 #line 9708 "configure"
9708 #include "confdefs.h"
9709 /* Override any gcc2 internal prototype to avoid an error.  */
9710 /* We use char because int might match the return type of a gcc2
9711     builtin and then its argument prototype would still apply.  */
9712 char crypt();
9713
9714 int main() {
9715 crypt()
9716 ; return 0; }
9717 EOF
9718 if { (eval echo configure:9719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9719   rm -rf conftest*
9720   eval "ac_cv_lib_$ac_lib_var=yes"
9721 else
9722   echo "configure: failed program was:" >&5
9723   cat conftest.$ac_ext >&5
9724   rm -rf conftest*
9725   eval "ac_cv_lib_$ac_lib_var=no"
9726 fi
9727 rm -f conftest*
9728 xe_check_libs=""
9729
9730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9731   echo "$ac_t""yes" 1>&6
9732     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9733     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9734   { test "$extra_verbose" = "yes" && cat << EOF
9735     Defining $ac_tr_lib
9736 EOF
9737 cat >> confdefs.h <<EOF
9738 #define $ac_tr_lib 1
9739 EOF
9740 }
9741
9742   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9743
9744 else
9745   echo "$ac_t""no" 1>&6
9746 fi
9747
9748  }
9749   fi
9750     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9751     
9752 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9753 echo "configure:9754: checking for jl_dic_list_e in -lwnn" >&5
9754 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9755
9756 xe_check_libs=" -lwnn "
9757 cat > conftest.$ac_ext <<EOF
9758 #line 9759 "configure"
9759 #include "confdefs.h"
9760 /* Override any gcc2 internal prototype to avoid an error.  */
9761 /* We use char because int might match the return type of a gcc2
9762     builtin and then its argument prototype would still apply.  */
9763 char jl_dic_list_e();
9764
9765 int main() {
9766 jl_dic_list_e()
9767 ; return 0; }
9768 EOF
9769 if { (eval echo configure:9770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9770   rm -rf conftest*
9771   eval "ac_cv_lib_$ac_lib_var=yes"
9772 else
9773   echo "configure: failed program was:" >&5
9774   cat conftest.$ac_ext >&5
9775   rm -rf conftest*
9776   eval "ac_cv_lib_$ac_lib_var=no"
9777 fi
9778 rm -f conftest*
9779 xe_check_libs=""
9780
9781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9782   echo "$ac_t""yes" 1>&6
9783   libwnn=wnn
9784 else
9785   echo "$ac_t""no" 1>&6
9786 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9787 echo "configure:9788: checking for jl_dic_list_e in -lwnn4" >&5
9788 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9789
9790 xe_check_libs=" -lwnn4 "
9791 cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 /* Override any gcc2 internal prototype to avoid an error.  */
9795 /* We use char because int might match the return type of a gcc2
9796     builtin and then its argument prototype would still apply.  */
9797 char jl_dic_list_e();
9798
9799 int main() {
9800 jl_dic_list_e()
9801 ; return 0; }
9802 EOF
9803 if { (eval echo configure:9804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9804   rm -rf conftest*
9805   eval "ac_cv_lib_$ac_lib_var=yes"
9806 else
9807   echo "configure: failed program was:" >&5
9808   cat conftest.$ac_ext >&5
9809   rm -rf conftest*
9810   eval "ac_cv_lib_$ac_lib_var=no"
9811 fi
9812 rm -f conftest*
9813 xe_check_libs=""
9814
9815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9816   echo "$ac_t""yes" 1>&6
9817   libwnn=wnn4
9818 else
9819   echo "$ac_t""no" 1>&6
9820 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9821 echo "configure:9822: checking for jl_dic_list_e in -lwnn6" >&5
9822 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9823
9824 xe_check_libs=" -lwnn6 "
9825 cat > conftest.$ac_ext <<EOF
9826 #line 9827 "configure"
9827 #include "confdefs.h"
9828 /* Override any gcc2 internal prototype to avoid an error.  */
9829 /* We use char because int might match the return type of a gcc2
9830     builtin and then its argument prototype would still apply.  */
9831 char jl_dic_list_e();
9832
9833 int main() {
9834 jl_dic_list_e()
9835 ; return 0; }
9836 EOF
9837 if { (eval echo configure:9838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9838   rm -rf conftest*
9839   eval "ac_cv_lib_$ac_lib_var=yes"
9840 else
9841   echo "configure: failed program was:" >&5
9842   cat conftest.$ac_ext >&5
9843   rm -rf conftest*
9844   eval "ac_cv_lib_$ac_lib_var=no"
9845 fi
9846 rm -f conftest*
9847 xe_check_libs=""
9848
9849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9850   echo "$ac_t""yes" 1>&6
9851   libwnn=wnn6
9852 else
9853   echo "$ac_t""no" 1>&6
9854 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9855 echo "configure:9856: checking for dic_list_e in -lwnn6_fromsrc" >&5
9856 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9857
9858 xe_check_libs=" -lwnn6_fromsrc "
9859 cat > conftest.$ac_ext <<EOF
9860 #line 9861 "configure"
9861 #include "confdefs.h"
9862 /* Override any gcc2 internal prototype to avoid an error.  */
9863 /* We use char because int might match the return type of a gcc2
9864     builtin and then its argument prototype would still apply.  */
9865 char dic_list_e();
9866
9867 int main() {
9868 dic_list_e()
9869 ; return 0; }
9870 EOF
9871 if { (eval echo configure:9872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9872   rm -rf conftest*
9873   eval "ac_cv_lib_$ac_lib_var=yes"
9874 else
9875   echo "configure: failed program was:" >&5
9876   cat conftest.$ac_ext >&5
9877   rm -rf conftest*
9878   eval "ac_cv_lib_$ac_lib_var=no"
9879 fi
9880 rm -f conftest*
9881 xe_check_libs=""
9882
9883 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9884   echo "$ac_t""yes" 1>&6
9885   libwnn=wnn6_fromsrc
9886 else
9887   echo "$ac_t""no" 1>&6
9888 with_wnn=no
9889 fi
9890
9891
9892 fi
9893
9894
9895 fi
9896
9897
9898 fi
9899
9900
9901   fi
9902   test -z "$with_wnn" && with_wnn=yes
9903   if test "$with_wnn" = "yes"; then
9904     { test "$extra_verbose" = "yes" && cat << \EOF
9905     Defining HAVE_WNN
9906 EOF
9907 cat >> confdefs.h <<\EOF
9908 #define HAVE_WNN 1
9909 EOF
9910 }
9911
9912     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9913     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9914    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9915  fi
9916     if test "$with_wnn6" != "no"; then
9917       
9918 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9919 echo "configure:9920: checking for jl_fi_dic_list in -l$libwnn" >&5
9920 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9921
9922 xe_check_libs=" -l$libwnn "
9923 cat > conftest.$ac_ext <<EOF
9924 #line 9925 "configure"
9925 #include "confdefs.h"
9926 /* Override any gcc2 internal prototype to avoid an error.  */
9927 /* We use char because int might match the return type of a gcc2
9928     builtin and then its argument prototype would still apply.  */
9929 char jl_fi_dic_list();
9930
9931 int main() {
9932 jl_fi_dic_list()
9933 ; return 0; }
9934 EOF
9935 if { (eval echo configure:9936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9936   rm -rf conftest*
9937   eval "ac_cv_lib_$ac_lib_var=yes"
9938 else
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -rf conftest*
9942   eval "ac_cv_lib_$ac_lib_var=no"
9943 fi
9944 rm -f conftest*
9945 xe_check_libs=""
9946
9947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9948   echo "$ac_t""yes" 1>&6
9949   with_wnn6=yes
9950 else
9951   echo "$ac_t""no" 1>&6
9952 fi
9953
9954
9955       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9956     Defining WNN6
9957 EOF
9958 cat >> confdefs.h <<\EOF
9959 #define WNN6 1
9960 EOF
9961 }
9962
9963     fi
9964   fi
9965
9966     canna_includes_found=no
9967   if test "$with_canna" != "no"; then
9968     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9969 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9970 echo "configure:9971: checking for canna/jrkanji.h" >&5
9971
9972 cat > conftest.$ac_ext <<EOF
9973 #line 9974 "configure"
9974 #include "confdefs.h"
9975 #include <canna/jrkanji.h>
9976 EOF
9977 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9978 { (eval echo configure:9979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9979 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9980 if test -z "$ac_err"; then
9981   rm -rf conftest*
9982   eval "ac_cv_header_$ac_safe=yes"
9983 else
9984   echo "$ac_err" >&5
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -rf conftest*
9988   eval "ac_cv_header_$ac_safe=no"
9989 fi
9990 rm -f conftest*
9991 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9992   echo "$ac_t""yes" 1>&6
9993   canna_includes_found=yes
9994 else
9995   echo "$ac_t""no" 1>&6
9996 fi
9997
9998   fi
9999   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
10000       -d "/usr/local/canna/include"; then
10001     save_c_switch_site="$c_switch_site"
10002     c_switch_site="$c_switch_site -I/usr/local/canna/include"
10003     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
10004 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
10005 echo "configure:10006: checking for canna/jrkanji.h" >&5
10006
10007 cat > conftest.$ac_ext <<EOF
10008 #line 10009 "configure"
10009 #include "confdefs.h"
10010 #include <canna/jrkanji.h>
10011 EOF
10012 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10013 { (eval echo configure:10014: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10014 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10015 if test -z "$ac_err"; then
10016   rm -rf conftest*
10017   eval "ac_cv_header_$ac_safe=yes"
10018 else
10019   echo "$ac_err" >&5
10020   echo "configure: failed program was:" >&5
10021   cat conftest.$ac_ext >&5
10022   rm -rf conftest*
10023   eval "ac_cv_header_$ac_safe=no"
10024 fi
10025 rm -f conftest*
10026 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10027   echo "$ac_t""yes" 1>&6
10028   canna_includes_found=yes
10029 else
10030   echo "$ac_t""no" 1>&6
10031 fi
10032
10033     if test "$canna_includes_found" != "yes"; then
10034       c_switch_site="$save_c_switch_site"
10035       with_canna="no"
10036     fi
10037   fi
10038
10039   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
10040 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
10041 echo "configure:10042: checking for canna/RK.h" >&5
10042
10043 cat > conftest.$ac_ext <<EOF
10044 #line 10045 "configure"
10045 #include "confdefs.h"
10046 #include <canna/RK.h>
10047 EOF
10048 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10049 { (eval echo configure:10050: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10050 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10051 if test -z "$ac_err"; then
10052   rm -rf conftest*
10053   eval "ac_cv_header_$ac_safe=yes"
10054 else
10055   echo "$ac_err" >&5
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -rf conftest*
10059   eval "ac_cv_header_$ac_safe=no"
10060 fi
10061 rm -f conftest*
10062 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10063   echo "$ac_t""yes" 1>&6
10064   :
10065 else
10066   echo "$ac_t""no" 1>&6
10067 with_canna=no
10068 fi
10069  }
10070   test -z "$with_canna" && { 
10071 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
10072 echo "configure:10073: checking for RkBgnBun in -lRKC" >&5
10073 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
10074
10075 xe_check_libs=" -lRKC "
10076 cat > conftest.$ac_ext <<EOF
10077 #line 10078 "configure"
10078 #include "confdefs.h"
10079 /* Override any gcc2 internal prototype to avoid an error.  */
10080 /* We use char because int might match the return type of a gcc2
10081     builtin and then its argument prototype would still apply.  */
10082 char RkBgnBun();
10083
10084 int main() {
10085 RkBgnBun()
10086 ; return 0; }
10087 EOF
10088 if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10089   rm -rf conftest*
10090   eval "ac_cv_lib_$ac_lib_var=yes"
10091 else
10092   echo "configure: failed program was:" >&5
10093   cat conftest.$ac_ext >&5
10094   rm -rf conftest*
10095   eval "ac_cv_lib_$ac_lib_var=no"
10096 fi
10097 rm -f conftest*
10098 xe_check_libs=""
10099
10100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10101   echo "$ac_t""yes" 1>&6
10102   :
10103 else
10104   echo "$ac_t""no" 1>&6
10105 with_canna=no
10106 fi
10107
10108  }
10109   test -z "$with_canna" && { 
10110 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
10111 echo "configure:10112: checking for jrKanjiControl in -lcanna" >&5
10112 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
10113
10114 xe_check_libs=" -lcanna "
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 /* We use char because int might match the return type of a gcc2
10120     builtin and then its argument prototype would still apply.  */
10121 char jrKanjiControl();
10122
10123 int main() {
10124 jrKanjiControl()
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=yes"
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=no"
10135 fi
10136 rm -f conftest*
10137 xe_check_libs=""
10138
10139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10140   echo "$ac_t""yes" 1>&6
10141   :
10142 else
10143   echo "$ac_t""no" 1>&6
10144 with_canna=no
10145 fi
10146
10147  }
10148   test -z "$with_canna" && with_canna=yes
10149   if test "$with_canna" = "yes"; then
10150     { test "$extra_verbose" = "yes" && cat << \EOF
10151     Defining HAVE_CANNA
10152 EOF
10153 cat >> confdefs.h <<\EOF
10154 #define HAVE_CANNA 1
10155 EOF
10156 }
10157
10158     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
10159     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
10160    echo "    xemacs will be linked with \"mule-canna.o\""
10161  fi
10162   fi
10163
10164 else   for feature in xim canna wnn; do
10165     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10166       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
10167     fi
10168     eval "with_${feature}=no"
10169   done
10170 fi 
10171
10172 if test "$need_motif" = "yes" ; then
10173   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
10174     
10175 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
10176 echo "configure:10177: checking for layout_object_getvalue in -li18n" >&5
10177 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10178
10179 xe_check_libs=" -li18n "
10180 cat > conftest.$ac_ext <<EOF
10181 #line 10182 "configure"
10182 #include "confdefs.h"
10183 /* Override any gcc2 internal prototype to avoid an error.  */
10184 /* We use char because int might match the return type of a gcc2
10185     builtin and then its argument prototype would still apply.  */
10186 char layout_object_getvalue();
10187
10188 int main() {
10189 layout_object_getvalue()
10190 ; return 0; }
10191 EOF
10192 if { (eval echo configure:10193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10193   rm -rf conftest*
10194   eval "ac_cv_lib_$ac_lib_var=yes"
10195 else
10196   echo "configure: failed program was:" >&5
10197   cat conftest.$ac_ext >&5
10198   rm -rf conftest*
10199   eval "ac_cv_lib_$ac_lib_var=no"
10200 fi
10201 rm -f conftest*
10202 xe_check_libs=""
10203
10204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10205   echo "$ac_t""yes" 1>&6
10206   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10207 else
10208   echo "$ac_t""no" 1>&6
10209 fi
10210
10211
10212   
10213 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10214     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10215   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10216   
10217         runpath="" runpath_dirs=""
10218   if test -n "$LD_RUN_PATH"; then
10219     runpath="$LD_RUN_PATH"
10220   elif test "$GCC" = "yes"; then
10221         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10222     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10223     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10224     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10225       case "$arg" in P,* | -L* | -R* )
10226         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10227           {
10228 xe_runpath_dir="$dir"
10229   test "$xe_runpath_dir" != "/lib"     -a \
10230         "$xe_runpath_dir" != "/usr/lib" -a \
10231         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10232   eval "$xe_add_unique_runpath_dir"
10233 }
10234         done ;;
10235       esac
10236     done
10237     ld_switch_run="$ld_switch_run_save"
10238     rm -f conftest*
10239   else
10240         for arg in $ld_switch_site $ld_switch_x_site; do
10241       case "$arg" in -L*) {
10242 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10243   test "$xe_runpath_dir" != "/lib"     -a \
10244         "$xe_runpath_dir" != "/usr/lib" -a \
10245         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10246   eval "$xe_add_unique_runpath_dir"
10247 };; esac
10248     done
10249         if test "$opsys $need_motif" = "sol2 yes"; then
10250       xe_runpath_dir="/opt/SUNWdt/lib";
10251       eval "$xe_add_unique_runpath_dir";
10252     fi
10253   fi 
10254   if test -n "$runpath"; then
10255     ld_switch_run="${dash_r}${runpath}"
10256     
10257 if test "$GCC" = "yes"; then
10258   set x $ld_switch_run; shift; ld_switch_run=""
10259   while test -n "$1"; do
10260     case $1 in
10261       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10262       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10263       -Xlinker* ) ;;
10264       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10265     esac
10266     shift
10267   done
10268 fi
10269     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10270   fi
10271 fi
10272
10273 fi
10274
10275 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
10276 do
10277 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10278 echo "configure:10279: checking for $ac_func" >&5
10279
10280 cat > conftest.$ac_ext <<EOF
10281 #line 10282 "configure"
10282 #include "confdefs.h"
10283 /* System header to define __stub macros and hopefully few prototypes,
10284     which can conflict with char $ac_func(); below.  */
10285 #include <assert.h>
10286 /* Override any gcc2 internal prototype to avoid an error.  */
10287 /* We use char because int might match the return type of a gcc2
10288     builtin and then its argument prototype would still apply.  */
10289 char $ac_func();
10290
10291 int main() {
10292
10293 /* The GNU C library defines this for functions which it implements
10294     to always fail with ENOSYS.  Some functions are actually named
10295     something starting with __ and the normal name is an alias.  */
10296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10297 choke me
10298 #else
10299 $ac_func();
10300 #endif
10301
10302 ; return 0; }
10303 EOF
10304 if { (eval echo configure:10305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10305   rm -rf conftest*
10306   eval "ac_cv_func_$ac_func=yes"
10307 else
10308   echo "configure: failed program was:" >&5
10309   cat conftest.$ac_ext >&5
10310   rm -rf conftest*
10311   eval "ac_cv_func_$ac_func=no"
10312 fi
10313 rm -f conftest*
10314
10315 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10316   echo "$ac_t""yes" 1>&6
10317     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10318   { test "$extra_verbose" = "yes" && cat << EOF
10319     Defining $ac_tr_func
10320 EOF
10321 cat >> confdefs.h <<EOF
10322 #define $ac_tr_func 1
10323 EOF
10324 }
10325  
10326 else
10327   echo "$ac_t""no" 1>&6
10328 fi
10329 done
10330
10331
10332
10333 for ac_func in getpt _getpty grantpt unlockpt ptsname killpg tcgetpgrp
10334 do
10335 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10336 echo "configure:10337: checking for $ac_func" >&5
10337
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 /* System header to define __stub macros and hopefully few prototypes,
10342     which can conflict with char $ac_func(); below.  */
10343 #include <assert.h>
10344 /* Override any gcc2 internal prototype to avoid an error.  */
10345 /* We use char because int might match the return type of a gcc2
10346     builtin and then its argument prototype would still apply.  */
10347 char $ac_func();
10348
10349 int main() {
10350
10351 /* The GNU C library defines this for functions which it implements
10352     to always fail with ENOSYS.  Some functions are actually named
10353     something starting with __ and the normal name is an alias.  */
10354 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10355 choke me
10356 #else
10357 $ac_func();
10358 #endif
10359
10360 ; return 0; }
10361 EOF
10362 if { (eval echo configure:10363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10363   rm -rf conftest*
10364   eval "ac_cv_func_$ac_func=yes"
10365 else
10366   echo "configure: failed program was:" >&5
10367   cat conftest.$ac_ext >&5
10368   rm -rf conftest*
10369   eval "ac_cv_func_$ac_func=no"
10370 fi
10371 rm -f conftest*
10372
10373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10376   { test "$extra_verbose" = "yes" && cat << EOF
10377     Defining $ac_tr_func
10378 EOF
10379 cat >> confdefs.h <<EOF
10380 #define $ac_tr_func 1
10381 EOF
10382 }
10383  
10384 else
10385   echo "$ac_t""no" 1>&6
10386 fi
10387 done
10388
10389
10390 echo $ac_n "checking for openpty""... $ac_c" 1>&6
10391 echo "configure:10392: checking for openpty" >&5
10392
10393 cat > conftest.$ac_ext <<EOF
10394 #line 10395 "configure"
10395 #include "confdefs.h"
10396 /* System header to define __stub macros and hopefully few prototypes,
10397     which can conflict with char openpty(); below.  */
10398 #include <assert.h>
10399 /* Override any gcc2 internal prototype to avoid an error.  */
10400 /* We use char because int might match the return type of a gcc2
10401     builtin and then its argument prototype would still apply.  */
10402 char openpty();
10403
10404 int main() {
10405
10406 /* The GNU C library defines this for functions which it implements
10407     to always fail with ENOSYS.  Some functions are actually named
10408     something starting with __ and the normal name is an alias.  */
10409 #if defined (__stub_openpty) || defined (__stub___openpty)
10410 choke me
10411 #else
10412 openpty();
10413 #endif
10414
10415 ; return 0; }
10416 EOF
10417 if { (eval echo configure:10418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10418   rm -rf conftest*
10419   eval "ac_cv_func_openpty=yes"
10420 else
10421   echo "configure: failed program was:" >&5
10422   cat conftest.$ac_ext >&5
10423   rm -rf conftest*
10424   eval "ac_cv_func_openpty=no"
10425 fi
10426 rm -f conftest*
10427
10428 if eval "test \"`echo '$ac_cv_func_'openpty`\" = yes"; then
10429   echo "$ac_t""yes" 1>&6
10430   have_openpty=yes
10431 else
10432   echo "$ac_t""no" 1>&6
10433
10434   
10435 echo $ac_n "checking for openpty in -lutil""... $ac_c" 1>&6
10436 echo "configure:10437: checking for openpty in -lutil" >&5
10437 ac_lib_var=`echo util'_'openpty | sed 'y%./+-%__p_%'`
10438
10439 xe_check_libs=" -lutil "
10440 cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 /* Override any gcc2 internal prototype to avoid an error.  */
10444 /* We use char because int might match the return type of a gcc2
10445     builtin and then its argument prototype would still apply.  */
10446 char openpty();
10447
10448 int main() {
10449 openpty()
10450 ; return 0; }
10451 EOF
10452 if { (eval echo configure:10453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10453   rm -rf conftest*
10454   eval "ac_cv_lib_$ac_lib_var=yes"
10455 else
10456   echo "configure: failed program was:" >&5
10457   cat conftest.$ac_ext >&5
10458   rm -rf conftest*
10459   eval "ac_cv_lib_$ac_lib_var=no"
10460 fi
10461 rm -f conftest*
10462 xe_check_libs=""
10463
10464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10465   echo "$ac_t""yes" 1>&6
10466   have_openpty=yes need_libutil=yes
10467 else
10468   echo "$ac_t""no" 1>&6
10469 fi
10470
10471
10472 fi
10473
10474 if test "$have_openpty" = "yes"; then
10475   { test "$extra_verbose" = "yes" && cat << \EOF
10476     Defining HAVE_OPENPTY
10477 EOF
10478 cat >> confdefs.h <<\EOF
10479 #define HAVE_OPENPTY 1
10480 EOF
10481 }
10482
10483   for ac_hdr in pty.h libutil.h util.h
10484 do
10485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10487 echo "configure:10488: checking for $ac_hdr" >&5
10488
10489 cat > conftest.$ac_ext <<EOF
10490 #line 10491 "configure"
10491 #include "confdefs.h"
10492 #include <$ac_hdr>
10493 EOF
10494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10495 { (eval echo configure:10496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10497 if test -z "$ac_err"; then
10498   rm -rf conftest*
10499   eval "ac_cv_header_$ac_safe=yes"
10500 else
10501   echo "$ac_err" >&5
10502   echo "configure: failed program was:" >&5
10503   cat conftest.$ac_ext >&5
10504   rm -rf conftest*
10505   eval "ac_cv_header_$ac_safe=no"
10506 fi
10507 rm -f conftest*
10508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10509   echo "$ac_t""yes" 1>&6
10510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10511   { test "$extra_verbose" = "yes" && cat << EOF
10512     Defining $ac_tr_hdr
10513 EOF
10514 cat >> confdefs.h <<EOF
10515 #define $ac_tr_hdr 1
10516 EOF
10517 }
10518  break
10519 else
10520   echo "$ac_t""no" 1>&6
10521 fi
10522 done
10523
10524   test "$need_libutil" = "yes" && libs_system="$libs_system -lutil" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lutil\" to \$libs_system"; fi
10525 fi
10526
10527 for ac_hdr in stropts.h
10528 do
10529 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10530 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10531 echo "configure:10532: checking for $ac_hdr" >&5
10532
10533 cat > conftest.$ac_ext <<EOF
10534 #line 10535 "configure"
10535 #include "confdefs.h"
10536 #include <$ac_hdr>
10537 EOF
10538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10539 { (eval echo configure:10540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10541 if test -z "$ac_err"; then
10542   rm -rf conftest*
10543   eval "ac_cv_header_$ac_safe=yes"
10544 else
10545   echo "$ac_err" >&5
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   eval "ac_cv_header_$ac_safe=no"
10550 fi
10551 rm -f conftest*
10552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10553   echo "$ac_t""yes" 1>&6
10554     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10555   { test "$extra_verbose" = "yes" && cat << EOF
10556     Defining $ac_tr_hdr
10557 EOF
10558 cat >> confdefs.h <<EOF
10559 #define $ac_tr_hdr 1
10560 EOF
10561 }
10562  
10563 else
10564   echo "$ac_t""no" 1>&6
10565 fi
10566 done
10567
10568 if test "$ac_cv_header_stropts_h" = "yes"; then
10569   for ac_func in isastream
10570 do
10571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10572 echo "configure:10573: checking for $ac_func" >&5
10573
10574 cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577 /* System header to define __stub macros and hopefully few prototypes,
10578     which can conflict with char $ac_func(); below.  */
10579 #include <assert.h>
10580 /* Override any gcc2 internal prototype to avoid an error.  */
10581 /* We use char because int might match the return type of a gcc2
10582     builtin and then its argument prototype would still apply.  */
10583 char $ac_func();
10584
10585 int main() {
10586
10587 /* The GNU C library defines this for functions which it implements
10588     to always fail with ENOSYS.  Some functions are actually named
10589     something starting with __ and the normal name is an alias.  */
10590 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10591 choke me
10592 #else
10593 $ac_func();
10594 #endif
10595
10596 ; return 0; }
10597 EOF
10598 if { (eval echo configure:10599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10599   rm -rf conftest*
10600   eval "ac_cv_func_$ac_func=yes"
10601 else
10602   echo "configure: failed program was:" >&5
10603   cat conftest.$ac_ext >&5
10604   rm -rf conftest*
10605   eval "ac_cv_func_$ac_func=no"
10606 fi
10607 rm -f conftest*
10608
10609 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10610   echo "$ac_t""yes" 1>&6
10611     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10612   { test "$extra_verbose" = "yes" && cat << EOF
10613     Defining $ac_tr_func
10614 EOF
10615 cat >> confdefs.h <<EOF
10616 #define $ac_tr_func 1
10617 EOF
10618 }
10619  
10620 else
10621   echo "$ac_t""no" 1>&6
10622 fi
10623 done
10624
10625   for ac_hdr in strtio.h
10626 do
10627 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10628 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10629 echo "configure:10630: checking for $ac_hdr" >&5
10630
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634 #include <$ac_hdr>
10635 EOF
10636 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10637 { (eval echo configure:10638: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10638 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10639 if test -z "$ac_err"; then
10640   rm -rf conftest*
10641   eval "ac_cv_header_$ac_safe=yes"
10642 else
10643   echo "$ac_err" >&5
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   eval "ac_cv_header_$ac_safe=no"
10648 fi
10649 rm -f conftest*
10650 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10651   echo "$ac_t""yes" 1>&6
10652     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10653   { test "$extra_verbose" = "yes" && cat << EOF
10654     Defining $ac_tr_hdr
10655 EOF
10656 cat >> confdefs.h <<EOF
10657 #define $ac_tr_hdr 1
10658 EOF
10659 }
10660  
10661 else
10662   echo "$ac_t""no" 1>&6
10663 fi
10664 done
10665  fi
10666
10667 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10668    echo "    xemacs will be linked with \"realpath.o\""
10669  fi
10670
10671 for ac_func in getloadavg
10672 do
10673 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10674 echo "configure:10675: checking for $ac_func" >&5
10675
10676 cat > conftest.$ac_ext <<EOF
10677 #line 10678 "configure"
10678 #include "confdefs.h"
10679 /* System header to define __stub macros and hopefully few prototypes,
10680     which can conflict with char $ac_func(); below.  */
10681 #include <assert.h>
10682 /* Override any gcc2 internal prototype to avoid an error.  */
10683 /* We use char because int might match the return type of a gcc2
10684     builtin and then its argument prototype would still apply.  */
10685 char $ac_func();
10686
10687 int main() {
10688
10689 /* The GNU C library defines this for functions which it implements
10690     to always fail with ENOSYS.  Some functions are actually named
10691     something starting with __ and the normal name is an alias.  */
10692 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10693 choke me
10694 #else
10695 $ac_func();
10696 #endif
10697
10698 ; return 0; }
10699 EOF
10700 if { (eval echo configure:10701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10701   rm -rf conftest*
10702   eval "ac_cv_func_$ac_func=yes"
10703 else
10704   echo "configure: failed program was:" >&5
10705   cat conftest.$ac_ext >&5
10706   rm -rf conftest*
10707   eval "ac_cv_func_$ac_func=no"
10708 fi
10709 rm -f conftest*
10710
10711 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10712   echo "$ac_t""yes" 1>&6
10713     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10714   { test "$extra_verbose" = "yes" && cat << EOF
10715     Defining $ac_tr_func
10716 EOF
10717 cat >> confdefs.h <<EOF
10718 #define $ac_tr_func 1
10719 EOF
10720 }
10721  
10722 else
10723   echo "$ac_t""no" 1>&6
10724 fi
10725 done
10726
10727
10728 if test "$ac_cv_func_getloadavg" = "yes"; then
10729         for ac_hdr in sys/loadavg.h
10730 do
10731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10733 echo "configure:10734: checking for $ac_hdr" >&5
10734
10735 cat > conftest.$ac_ext <<EOF
10736 #line 10737 "configure"
10737 #include "confdefs.h"
10738 #include <$ac_hdr>
10739 EOF
10740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10741 { (eval echo configure:10742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10743 if test -z "$ac_err"; then
10744   rm -rf conftest*
10745   eval "ac_cv_header_$ac_safe=yes"
10746 else
10747   echo "$ac_err" >&5
10748   echo "configure: failed program was:" >&5
10749   cat conftest.$ac_ext >&5
10750   rm -rf conftest*
10751   eval "ac_cv_header_$ac_safe=no"
10752 fi
10753 rm -f conftest*
10754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10755   echo "$ac_t""yes" 1>&6
10756     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10757   { test "$extra_verbose" = "yes" && cat << EOF
10758     Defining $ac_tr_hdr
10759 EOF
10760 cat >> confdefs.h <<EOF
10761 #define $ac_tr_hdr 1
10762 EOF
10763 }
10764  
10765 else
10766   echo "$ac_t""no" 1>&6
10767 fi
10768 done
10769
10770 else
10771     extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10772    echo "    xemacs will be linked with \"getloadavg.o\""
10773  fi
10774
10775     
10776 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10777 echo "configure:10778: checking for kstat_open in -lkstat" >&5
10778 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10779
10780 xe_check_libs=" -lkstat "
10781 cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 /* Override any gcc2 internal prototype to avoid an error.  */
10785 /* We use char because int might match the return type of a gcc2
10786     builtin and then its argument prototype would still apply.  */
10787 char kstat_open();
10788
10789 int main() {
10790 kstat_open()
10791 ; return 0; }
10792 EOF
10793 if { (eval echo configure:10794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10794   rm -rf conftest*
10795   eval "ac_cv_lib_$ac_lib_var=yes"
10796 else
10797   echo "configure: failed program was:" >&5
10798   cat conftest.$ac_ext >&5
10799   rm -rf conftest*
10800   eval "ac_cv_lib_$ac_lib_var=no"
10801 fi
10802 rm -f conftest*
10803 xe_check_libs=""
10804
10805 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10806   echo "$ac_t""yes" 1>&6
10807     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10808     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10809   { test "$extra_verbose" = "yes" && cat << EOF
10810     Defining $ac_tr_lib
10811 EOF
10812 cat >> confdefs.h <<EOF
10813 #define $ac_tr_lib 1
10814 EOF
10815 }
10816
10817   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10818
10819 else
10820   echo "$ac_t""no" 1>&6
10821 fi
10822
10823
10824   for ac_hdr in kstat.h
10825 do
10826 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10827 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10828 echo "configure:10829: checking for $ac_hdr" >&5
10829
10830 cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 #include <$ac_hdr>
10834 EOF
10835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10836 { (eval echo configure:10837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10838 if test -z "$ac_err"; then
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=yes"
10841 else
10842   echo "$ac_err" >&5
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   eval "ac_cv_header_$ac_safe=no"
10847 fi
10848 rm -f conftest*
10849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10852   { test "$extra_verbose" = "yes" && cat << EOF
10853     Defining $ac_tr_hdr
10854 EOF
10855 cat >> confdefs.h <<EOF
10856 #define $ac_tr_hdr 1
10857 EOF
10858 }
10859  
10860 else
10861   echo "$ac_t""no" 1>&6
10862 fi
10863 done
10864
10865
10866     
10867 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10868 echo "configure:10869: checking for kvm_read in -lkvm" >&5
10869 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10870
10871 xe_check_libs=" -lkvm "
10872 cat > conftest.$ac_ext <<EOF
10873 #line 10874 "configure"
10874 #include "confdefs.h"
10875 /* Override any gcc2 internal prototype to avoid an error.  */
10876 /* We use char because int might match the return type of a gcc2
10877     builtin and then its argument prototype would still apply.  */
10878 char kvm_read();
10879
10880 int main() {
10881 kvm_read()
10882 ; return 0; }
10883 EOF
10884 if { (eval echo configure:10885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10885   rm -rf conftest*
10886   eval "ac_cv_lib_$ac_lib_var=yes"
10887 else
10888   echo "configure: failed program was:" >&5
10889   cat conftest.$ac_ext >&5
10890   rm -rf conftest*
10891   eval "ac_cv_lib_$ac_lib_var=no"
10892 fi
10893 rm -f conftest*
10894 xe_check_libs=""
10895
10896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10897   echo "$ac_t""yes" 1>&6
10898     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10899     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10900   { test "$extra_verbose" = "yes" && cat << EOF
10901     Defining $ac_tr_lib
10902 EOF
10903 cat >> confdefs.h <<EOF
10904 #define $ac_tr_lib 1
10905 EOF
10906 }
10907
10908   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10909
10910 else
10911   echo "$ac_t""no" 1>&6
10912 fi
10913
10914
10915 fi
10916
10917 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10918 echo "configure:10919: checking whether netdb declares h_errno" >&5
10919 cat > conftest.$ac_ext <<EOF
10920 #line 10921 "configure"
10921 #include "confdefs.h"
10922 #include <netdb.h>
10923 int main() {
10924 return h_errno;
10925 ; return 0; }
10926 EOF
10927 if { (eval echo configure:10928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10928   rm -rf conftest*
10929   echo "$ac_t""yes" 1>&6
10930    { test "$extra_verbose" = "yes" && cat << \EOF
10931     Defining HAVE_H_ERRNO
10932 EOF
10933 cat >> confdefs.h <<\EOF
10934 #define HAVE_H_ERRNO 1
10935 EOF
10936 }
10937
10938 else
10939   echo "configure: failed program was:" >&5
10940   cat conftest.$ac_ext >&5
10941   rm -rf conftest*
10942   echo "$ac_t""no" 1>&6
10943 fi
10944 rm -f conftest*
10945
10946 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10947 echo "configure:10948: checking for sigsetjmp" >&5
10948 cat > conftest.$ac_ext <<EOF
10949 #line 10950 "configure"
10950 #include "confdefs.h"
10951 #include <setjmp.h>
10952 int main() {
10953 sigjmp_buf bar; sigsetjmp (bar, 0);
10954 ; return 0; }
10955 EOF
10956 if { (eval echo configure:10957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10957   rm -rf conftest*
10958   echo "$ac_t""yes" 1>&6
10959    { test "$extra_verbose" = "yes" && cat << \EOF
10960     Defining HAVE_SIGSETJMP
10961 EOF
10962 cat >> confdefs.h <<\EOF
10963 #define HAVE_SIGSETJMP 1
10964 EOF
10965 }
10966
10967 else
10968   echo "configure: failed program was:" >&5
10969   cat conftest.$ac_ext >&5
10970   rm -rf conftest*
10971   echo "$ac_t""no" 1>&6
10972 fi
10973 rm -f conftest*
10974
10975 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10976 echo "configure:10977: checking whether localtime caches TZ" >&5
10977
10978 if test "$ac_cv_func_tzset" = "yes"; then
10979 cat > conftest.$ac_ext <<EOF
10980 #line 10981 "configure"
10981 #include "confdefs.h"
10982 #include <time.h>
10983 #if STDC_HEADERS
10984 # include <stdlib.h>
10985 #endif
10986 extern char **environ;
10987 unset_TZ ()
10988 {
10989   char **from, **to;
10990   for (to = from = environ; (*to = *from); from++)
10991     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10992       to++;
10993 }
10994 char TZ_GMT0[] = "TZ=GMT0";
10995 char TZ_PST8[] = "TZ=PST8";
10996 main()
10997 {
10998   time_t now = time ((time_t *) 0);
10999   int hour_GMT0, hour_unset;
11000   if (putenv (TZ_GMT0) != 0)
11001     exit (1);
11002   hour_GMT0 = localtime (&now)->tm_hour;
11003   unset_TZ ();
11004   hour_unset = localtime (&now)->tm_hour;
11005   if (putenv (TZ_PST8) != 0)
11006     exit (1);
11007   if (localtime (&now)->tm_hour == hour_GMT0)
11008     exit (1);
11009   unset_TZ ();
11010   if (localtime (&now)->tm_hour != hour_unset)
11011     exit (1);
11012   exit (0);
11013 }
11014 EOF
11015 if { (eval echo configure:11016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11016 then
11017   emacs_cv_localtime_cache=no
11018 else
11019   conftest_rc="$?"
11020   echo "configure: failed program was:" >&5
11021   cat conftest.$ac_ext >&5
11022   rm -fr conftest*
11023   emacs_cv_localtime_cache=yes
11024 fi
11025 rm -fr conftest*
11026 else
11027         # If we lack tzset, report that localtime does not cache TZ,
11028         # since we can't invalidate the cache if we don't have tzset.
11029         emacs_cv_localtime_cache=no
11030 fi
11031 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
11032 if test $emacs_cv_localtime_cache = yes; then
11033   { test "$extra_verbose" = "yes" && cat << \EOF
11034     Defining LOCALTIME_CACHE
11035 EOF
11036 cat >> confdefs.h <<\EOF
11037 #define LOCALTIME_CACHE 1
11038 EOF
11039 }
11040
11041 fi
11042
11043 if test "$HAVE_TIMEVAL" = "yes"; then
11044 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
11045 echo "configure:11046: checking whether gettimeofday accepts one or two arguments" >&5
11046 cat > conftest.$ac_ext <<EOF
11047 #line 11048 "configure"
11048 #include "confdefs.h"
11049
11050 #ifdef TIME_WITH_SYS_TIME
11051 #include <sys/time.h>
11052 #include <time.h>
11053 #else
11054 #ifdef HAVE_SYS_TIME_H
11055 #include <sys/time.h>
11056 #else
11057 #include <time.h>
11058 #endif
11059 #endif
11060   
11061 int main() {
11062
11063   struct timeval time;
11064   gettimeofday (&time, 0);
11065
11066 ; return 0; }
11067 EOF
11068 if { (eval echo configure:11069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11069   rm -rf conftest*
11070   echo "$ac_t""two" 1>&6
11071 else
11072   echo "configure: failed program was:" >&5
11073   cat conftest.$ac_ext >&5
11074   rm -rf conftest*
11075   echo "$ac_t""one" 1>&6
11076    { test "$extra_verbose" = "yes" && cat << \EOF
11077     Defining GETTIMEOFDAY_ONE_ARGUMENT
11078 EOF
11079 cat >> confdefs.h <<\EOF
11080 #define GETTIMEOFDAY_ONE_ARGUMENT 1
11081 EOF
11082 }
11083
11084 fi
11085 rm -f conftest*
11086 fi
11087
11088
11089 echo $ac_n "checking for inline""... $ac_c" 1>&6
11090 echo "configure:11091: checking for inline" >&5
11091
11092 ac_cv_c_inline=no
11093 for ac_kw in inline __inline__ __inline; do
11094   cat > conftest.$ac_ext <<EOF
11095 #line 11096 "configure"
11096 #include "confdefs.h"
11097
11098 int main() {
11099 } $ac_kw foo() {
11100 ; return 0; }
11101 EOF
11102 if { (eval echo configure:11103: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11103   rm -rf conftest*
11104   ac_cv_c_inline=$ac_kw; break
11105 else
11106   echo "configure: failed program was:" >&5
11107   cat conftest.$ac_ext >&5
11108 fi
11109 rm -f conftest*
11110 done
11111
11112
11113 echo "$ac_t""$ac_cv_c_inline" 1>&6
11114 case "$ac_cv_c_inline" in
11115   inline | yes) ;;
11116   no) { test "$extra_verbose" = "yes" && cat << \EOF
11117     Defining inline = 
11118 EOF
11119 cat >> confdefs.h <<\EOF
11120 #define inline 
11121 EOF
11122 }
11123  ;;
11124   *)  { test "$extra_verbose" = "yes" && cat << EOF
11125     Defining inline = $ac_cv_c_inline
11126 EOF
11127 cat >> confdefs.h <<EOF
11128 #define inline $ac_cv_c_inline
11129 EOF
11130 }
11131  ;;
11132 esac
11133
11134 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
11135    echo "    xemacs will be linked with \"inline.o\""
11136  fi
11137
11138
11139 if test "$__DECC" != "yes"; then
11140   # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
11141 # for constant arguments.  Useless!
11142 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
11143 echo "configure:11144: checking for working alloca.h" >&5
11144
11145 cat > conftest.$ac_ext <<EOF
11146 #line 11147 "configure"
11147 #include "confdefs.h"
11148 #include <alloca.h>
11149 int main() {
11150 char *p = alloca(2 * sizeof(int));
11151 ; return 0; }
11152 EOF
11153 if { (eval echo configure:11154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11154   rm -rf conftest*
11155   ac_cv_header_alloca_h=yes
11156 else
11157   echo "configure: failed program was:" >&5
11158   cat conftest.$ac_ext >&5
11159   rm -rf conftest*
11160   ac_cv_header_alloca_h=no
11161 fi
11162 rm -f conftest*
11163
11164 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
11165 if test $ac_cv_header_alloca_h = yes; then
11166   { test "$extra_verbose" = "yes" && cat << \EOF
11167     Defining HAVE_ALLOCA_H
11168 EOF
11169 cat >> confdefs.h <<\EOF
11170 #define HAVE_ALLOCA_H 1
11171 EOF
11172 }
11173
11174 fi
11175
11176 echo $ac_n "checking for alloca""... $ac_c" 1>&6
11177 echo "configure:11178: checking for alloca" >&5
11178
11179 cat > conftest.$ac_ext <<EOF
11180 #line 11181 "configure"
11181 #include "confdefs.h"
11182
11183 #ifdef __GNUC__
11184 # define alloca __builtin_alloca
11185 #else
11186 # ifdef _MSC_VER
11187 #  include <malloc.h>
11188 #  define alloca _alloca
11189 # else
11190 #  if HAVE_ALLOCA_H
11191 #   include <alloca.h>
11192 #  else
11193 #   ifdef _AIX
11194  #pragma alloca
11195 #   else
11196 #    ifndef alloca /* predefined by HP cc +Olibcalls */
11197 char *alloca ();
11198 #    endif
11199 #   endif
11200 #  endif
11201 # endif
11202 #endif
11203
11204 int main() {
11205 char *p = (char *) alloca(1);
11206 ; return 0; }
11207 EOF
11208 if { (eval echo configure:11209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11209   rm -rf conftest*
11210   ac_cv_func_alloca_works=yes
11211 else
11212   echo "configure: failed program was:" >&5
11213   cat conftest.$ac_ext >&5
11214   rm -rf conftest*
11215   ac_cv_func_alloca_works=no
11216 fi
11217 rm -f conftest*
11218
11219 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
11220 if test $ac_cv_func_alloca_works = yes; then
11221   { test "$extra_verbose" = "yes" && cat << \EOF
11222     Defining HAVE_ALLOCA
11223 EOF
11224 cat >> confdefs.h <<\EOF
11225 #define HAVE_ALLOCA 1
11226 EOF
11227 }
11228
11229 fi
11230
11231 if test $ac_cv_func_alloca_works = no; then
11232   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
11233   # that cause trouble.  Some versions do not even contain alloca or
11234   # contain a buggy version.  If you still want to use their alloca,
11235   # use ar to extract alloca.o from them instead of compiling alloca.c.
11236   ALLOCA=alloca.${ac_objext}
11237   { test "$extra_verbose" = "yes" && cat << \EOF
11238     Defining C_ALLOCA
11239 EOF
11240 cat >> confdefs.h <<\EOF
11241 #define C_ALLOCA 1
11242 EOF
11243 }
11244
11245
11246 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
11247 echo "configure:11248: checking whether alloca needs Cray hooks" >&5
11248
11249 cat > conftest.$ac_ext <<EOF
11250 #line 11251 "configure"
11251 #include "confdefs.h"
11252 #if defined(CRAY) && ! defined(CRAY2)
11253 webecray
11254 #else
11255 wenotbecray
11256 #endif
11257
11258 EOF
11259 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11260   egrep "webecray" >/dev/null 2>&1; then
11261   rm -rf conftest*
11262   ac_cv_os_cray=yes
11263 else
11264   rm -rf conftest*
11265   ac_cv_os_cray=no
11266 fi
11267 rm -f conftest*
11268
11269
11270 echo "$ac_t""$ac_cv_os_cray" 1>&6
11271 if test $ac_cv_os_cray = yes; then
11272 for ac_func in _getb67 GETB67 getb67; do
11273   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11274 echo "configure:11275: checking for $ac_func" >&5
11275
11276 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 /* System header to define __stub macros and hopefully few prototypes,
11280     which can conflict with char $ac_func(); below.  */
11281 #include <assert.h>
11282 /* Override any gcc2 internal prototype to avoid an error.  */
11283 /* We use char because int might match the return type of a gcc2
11284     builtin and then its argument prototype would still apply.  */
11285 char $ac_func();
11286
11287 int main() {
11288
11289 /* The GNU C library defines this for functions which it implements
11290     to always fail with ENOSYS.  Some functions are actually named
11291     something starting with __ and the normal name is an alias.  */
11292 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11293 choke me
11294 #else
11295 $ac_func();
11296 #endif
11297
11298 ; return 0; }
11299 EOF
11300 if { (eval echo configure:11301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11301   rm -rf conftest*
11302   eval "ac_cv_func_$ac_func=yes"
11303 else
11304   echo "configure: failed program was:" >&5
11305   cat conftest.$ac_ext >&5
11306   rm -rf conftest*
11307   eval "ac_cv_func_$ac_func=no"
11308 fi
11309 rm -f conftest*
11310
11311 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11312   echo "$ac_t""yes" 1>&6
11313   { test "$extra_verbose" = "yes" && cat << EOF
11314     Defining CRAY_STACKSEG_END = $ac_func
11315 EOF
11316 cat >> confdefs.h <<EOF
11317 #define CRAY_STACKSEG_END $ac_func
11318 EOF
11319 }
11320
11321   break
11322 else
11323   echo "$ac_t""no" 1>&6
11324 fi
11325
11326 done
11327 fi
11328
11329 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
11330 echo "configure:11331: checking stack direction for C alloca" >&5
11331
11332 cat > conftest.$ac_ext <<EOF
11333 #line 11334 "configure"
11334 #include "confdefs.h"
11335 find_stack_direction ()
11336 {
11337   static char *addr = 0;
11338   auto char dummy;
11339   if (addr == 0)
11340     {
11341       addr = &dummy;
11342       return find_stack_direction ();
11343     }
11344   else
11345     return (&dummy > addr) ? 1 : -1;
11346 }
11347 main ()
11348 {
11349   exit (find_stack_direction() < 0);
11350 }
11351 EOF
11352 if { (eval echo configure:11353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11353 then
11354   ac_cv_c_stack_direction=1
11355 else
11356   conftest_rc="$?"
11357   echo "configure: failed program was:" >&5
11358   cat conftest.$ac_ext >&5
11359   rm -fr conftest*
11360   ac_cv_c_stack_direction=-1
11361 fi
11362 rm -fr conftest*
11363
11364 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
11365 { test "$extra_verbose" = "yes" && cat << EOF
11366     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
11367 EOF
11368 cat >> confdefs.h <<EOF
11369 #define STACK_DIRECTION $ac_cv_c_stack_direction
11370 EOF
11371 }
11372
11373 fi
11374
11375   test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
11376    echo "    xemacs will be linked with \"$ALLOCA\""
11377  fi
11378 fi
11379
11380 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
11381 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
11382 echo "configure:11383: checking for vfork.h" >&5
11383
11384 cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387 #include <vfork.h>
11388 EOF
11389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11390 { (eval echo configure:11391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11392 if test -z "$ac_err"; then
11393   rm -rf conftest*
11394   eval "ac_cv_header_$ac_safe=yes"
11395 else
11396   echo "$ac_err" >&5
11397   echo "configure: failed program was:" >&5
11398   cat conftest.$ac_ext >&5
11399   rm -rf conftest*
11400   eval "ac_cv_header_$ac_safe=no"
11401 fi
11402 rm -f conftest*
11403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11404   echo "$ac_t""yes" 1>&6
11405   { test "$extra_verbose" = "yes" && cat << \EOF
11406     Defining HAVE_VFORK_H
11407 EOF
11408 cat >> confdefs.h <<\EOF
11409 #define HAVE_VFORK_H 1
11410 EOF
11411 }
11412
11413 else
11414   echo "$ac_t""no" 1>&6
11415 fi
11416
11417 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
11418 echo "configure:11419: checking for working vfork" >&5
11419
11420 cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423 /* Thanks to Paul Eggert for this test.  */
11424 #include <stdio.h>
11425 #include <sys/types.h>
11426 #include <sys/stat.h>
11427 #ifdef HAVE_UNISTD_H
11428 #include <unistd.h>
11429 #endif
11430 #ifdef HAVE_VFORK_H
11431 #include <vfork.h>
11432 #endif
11433 /* On some sparc systems, changes by the child to local and incoming
11434    argument registers are propagated back to the parent.
11435    The compiler is told about this with #include <vfork.h>,
11436    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
11437    Test for this by using a static variable whose address
11438    is put into a register that is clobbered by the vfork.  */
11439 static
11440 #ifdef __cplusplus
11441 sparc_address_test (int arg)
11442 #else
11443 sparc_address_test (arg) int arg;
11444 #endif
11445 {
11446   static pid_t child;
11447   if (!child) {
11448     child = vfork ();
11449     if (child < 0) {
11450       perror ("vfork");
11451       _exit(2);
11452     }
11453     if (!child) {
11454       arg = getpid();
11455       write(-1, "", 0);
11456       _exit (arg);
11457     }
11458   }
11459 }
11460 main() {
11461   pid_t parent = getpid ();
11462   pid_t child;
11463
11464   sparc_address_test ();
11465
11466   child = vfork ();
11467
11468   if (child == 0) {
11469     /* Here is another test for sparc vfork register problems.
11470        This test uses lots of local variables, at least
11471        as many local variables as main has allocated so far
11472        including compiler temporaries.  4 locals are enough for
11473        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
11474        A buggy compiler should reuse the register of parent
11475        for one of the local variables, since it will think that
11476        parent can't possibly be used any more in this routine.
11477        Assigning to the local variable will thus munge parent
11478        in the parent process.  */
11479     pid_t
11480       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
11481       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
11482     /* Convince the compiler that p..p7 are live; otherwise, it might
11483        use the same hardware register for all 8 local variables.  */
11484     if (p != p1 || p != p2 || p != p3 || p != p4
11485         || p != p5 || p != p6 || p != p7)
11486       _exit(1);
11487
11488     /* On some systems (e.g. IRIX 3.3),
11489        vfork doesn't separate parent from child file descriptors.
11490        If the child closes a descriptor before it execs or exits,
11491        this munges the parent's descriptor as well.
11492        Test for this by closing stdout in the child.  */
11493     _exit(close(fileno(stdout)) != 0);
11494   } else {
11495     int status;
11496     struct stat st;
11497
11498     while (wait(&status) != child)
11499       ;
11500     exit(
11501          /* Was there some problem with vforking?  */
11502          child < 0
11503
11504          /* Did the child fail?  (This shouldn't happen.)  */
11505          || status
11506
11507          /* Did the vfork/compiler bug occur?  */
11508          || parent != getpid()
11509
11510          /* Did the file descriptor bug occur?  */
11511          || fstat(fileno(stdout), &st) != 0
11512          );
11513   }
11514 }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11517 then
11518   ac_cv_func_vfork_works=yes
11519 else
11520   conftest_rc="$?"
11521   echo "configure: failed program was:" >&5
11522   cat conftest.$ac_ext >&5
11523   rm -fr conftest*
11524   ac_cv_func_vfork_works=no
11525 fi
11526 rm -fr conftest*
11527
11528 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
11529 if test $ac_cv_func_vfork_works = no; then
11530   { test "$extra_verbose" = "yes" && cat << \EOF
11531     Defining vfork = fork
11532 EOF
11533 cat >> confdefs.h <<\EOF
11534 #define vfork fork
11535 EOF
11536 }
11537
11538 fi
11539
11540
11541 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
11542 echo "configure:11543: checking for working strcoll" >&5
11543
11544 cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 #include <string.h>
11548 main ()
11549 {
11550   exit (strcoll ("abc", "def") >= 0 ||
11551         strcoll ("ABC", "DEF") >= 0 ||
11552         strcoll ("123", "456") >= 0);
11553 }
11554 EOF
11555 if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11556 then
11557   ac_cv_func_strcoll_works=yes
11558 else
11559   conftest_rc="$?"
11560   echo "configure: failed program was:" >&5
11561   cat conftest.$ac_ext >&5
11562   rm -fr conftest*
11563   ac_cv_func_strcoll_works=no
11564 fi
11565 rm -fr conftest*
11566
11567 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
11568 if test $ac_cv_func_strcoll_works = yes; then
11569   { test "$extra_verbose" = "yes" && cat << \EOF
11570     Defining HAVE_STRCOLL
11571 EOF
11572 cat >> confdefs.h <<\EOF
11573 #define HAVE_STRCOLL 1
11574 EOF
11575 }
11576
11577 fi
11578
11579
11580 for ac_func in getpgrp
11581 do
11582 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11583 echo "configure:11584: checking for $ac_func" >&5
11584
11585 cat > conftest.$ac_ext <<EOF
11586 #line 11587 "configure"
11587 #include "confdefs.h"
11588 /* System header to define __stub macros and hopefully few prototypes,
11589     which can conflict with char $ac_func(); below.  */
11590 #include <assert.h>
11591 /* Override any gcc2 internal prototype to avoid an error.  */
11592 /* We use char because int might match the return type of a gcc2
11593     builtin and then its argument prototype would still apply.  */
11594 char $ac_func();
11595
11596 int main() {
11597
11598 /* The GNU C library defines this for functions which it implements
11599     to always fail with ENOSYS.  Some functions are actually named
11600     something starting with __ and the normal name is an alias.  */
11601 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11602 choke me
11603 #else
11604 $ac_func();
11605 #endif
11606
11607 ; return 0; }
11608 EOF
11609 if { (eval echo configure:11610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11610   rm -rf conftest*
11611   eval "ac_cv_func_$ac_func=yes"
11612 else
11613   echo "configure: failed program was:" >&5
11614   cat conftest.$ac_ext >&5
11615   rm -rf conftest*
11616   eval "ac_cv_func_$ac_func=no"
11617 fi
11618 rm -f conftest*
11619
11620 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11621   echo "$ac_t""yes" 1>&6
11622     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11623   { test "$extra_verbose" = "yes" && cat << EOF
11624     Defining $ac_tr_func
11625 EOF
11626 cat >> confdefs.h <<EOF
11627 #define $ac_tr_func 1
11628 EOF
11629 }
11630  
11631 else
11632   echo "$ac_t""no" 1>&6
11633 fi
11634 done
11635
11636 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11637 echo "configure:11638: checking whether getpgrp takes no argument" >&5
11638
11639 cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642
11643 /*
11644  * If this system has a BSD-style getpgrp(),
11645  * which takes a pid argument, exit unsuccessfully.
11646  *
11647  * Snarfed from Chet Ramey's bash pgrp.c test program
11648  */
11649 #include <stdio.h>
11650 #include <sys/types.h>
11651
11652 int     pid;
11653 int     pg1, pg2, pg3, pg4;
11654 int     ng, np, s, child;
11655
11656 main()
11657 {
11658         pid = getpid();
11659         pg1 = getpgrp(0);
11660         pg2 = getpgrp();
11661         pg3 = getpgrp(pid);
11662         pg4 = getpgrp(1);
11663
11664         /*
11665          * If all of these values are the same, it's pretty sure that
11666          * we're on a system that ignores getpgrp's first argument.
11667          */
11668         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11669                 exit(0);
11670
11671         child = fork();
11672         if (child < 0)
11673                 exit(1);
11674         else if (child == 0) {
11675                 np = getpid();
11676                 /*
11677                  * If this is Sys V, this will not work; pgrp will be
11678                  * set to np because setpgrp just changes a pgrp to be
11679                  * the same as the pid.
11680                  */
11681                 setpgrp(np, pg1);
11682                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11683                 if (ng == pg1) {
11684                         exit(1);
11685                 } else {
11686                         exit(0);
11687                 }
11688         } else {
11689                 wait(&s);
11690                 exit(s>>8);
11691         }
11692 }
11693
11694 EOF
11695 if { (eval echo configure:11696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11696 then
11697   ac_cv_func_getpgrp_void=yes
11698 else
11699   conftest_rc="$?"
11700   echo "configure: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   rm -fr conftest*
11703   ac_cv_func_getpgrp_void=no
11704 fi
11705 rm -fr conftest*
11706
11707
11708 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11709 if test $ac_cv_func_getpgrp_void = yes; then
11710   { test "$extra_verbose" = "yes" && cat << \EOF
11711     Defining GETPGRP_VOID
11712 EOF
11713 cat >> confdefs.h <<\EOF
11714 #define GETPGRP_VOID 1
11715 EOF
11716 }
11717
11718 fi
11719
11720
11721 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11722 echo "configure:11723: checking for working mmap" >&5
11723 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11724 cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727 #include <stdio.h>
11728 #include <unistd.h>
11729 #include <fcntl.h>
11730 #include <sys/mman.h>
11731
11732 #ifndef MAP_VARIABLE
11733 #define MAP_VARIABLE 0
11734 #endif
11735
11736 #ifndef MAP_FAILED
11737 #define MAP_FAILED -1
11738 #endif
11739
11740 int main (int argc, char *argv[])
11741 {
11742   int fd = -1;
11743   caddr_t p;
11744 #ifndef MAP_ANONYMOUS
11745   fd = open ("/dev/zero", O_RDWR);
11746   if (fd < 0)
11747     return 1;
11748 #define MAP_ANONYMOUS 0
11749 #endif
11750   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11751            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11752            fd, 0) != (void *) MAP_FAILED)
11753     return 0;
11754   perror ("conftest: mmap failed");
11755   return 1;
11756 }
11757 EOF
11758 if { (eval echo configure:11759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11759 then
11760   have_mmap=yes
11761 else
11762   conftest_rc="$?"
11763   echo "configure: failed program was:" >&5
11764   cat conftest.$ac_ext >&5
11765   rm -fr conftest*
11766   have_mmap=no
11767 fi
11768 rm -fr conftest* ;;
11769 esac
11770 echo "$ac_t""$have_mmap" 1>&6
11771 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11772     Defining HAVE_MMAP
11773 EOF
11774 cat >> confdefs.h <<\EOF
11775 #define HAVE_MMAP 1
11776 EOF
11777 }
11778
11779
11780 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11781 if test "$rel_alloc $have_mmap" = "default yes"; then
11782   if test "$doug_lea_malloc" = "yes"; then
11783         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11784 echo "configure:11785: checking for M_MMAP_THRESHOLD" >&5
11785     cat > conftest.$ac_ext <<EOF
11786 #line 11787 "configure"
11787 #include "confdefs.h"
11788 #include <malloc.h>
11789 int main() {
11790
11791 #ifndef M_MMAP_THRESHOLD
11792 #error No M_MMAP_THRESHOLD :-(
11793 !@+$%^&*_)(_ - unlikely to compile...
11794 #endif
11795
11796 ; return 0; }
11797 EOF
11798 if { (eval echo configure:11799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11799   rm -rf conftest*
11800   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11801 else
11802   echo "configure: failed program was:" >&5
11803   cat conftest.$ac_ext >&5
11804   rm -rf conftest*
11805   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11806 fi
11807 rm -f conftest*
11808   else
11809     rel_alloc=yes
11810   fi
11811 fi
11812 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11813     Defining REL_ALLOC
11814 EOF
11815 cat >> confdefs.h <<\EOF
11816 #define REL_ALLOC 1
11817 EOF
11818 }
11819
11820
11821 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11822 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11823 echo "configure:11824: checking for termios.h" >&5
11824
11825 cat > conftest.$ac_ext <<EOF
11826 #line 11827 "configure"
11827 #include "confdefs.h"
11828 #include <termios.h>
11829 EOF
11830 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11831 { (eval echo configure:11832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11832 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11833 if test -z "$ac_err"; then
11834   rm -rf conftest*
11835   eval "ac_cv_header_$ac_safe=yes"
11836 else
11837   echo "$ac_err" >&5
11838   echo "configure: failed program was:" >&5
11839   cat conftest.$ac_ext >&5
11840   rm -rf conftest*
11841   eval "ac_cv_header_$ac_safe=no"
11842 fi
11843 rm -f conftest*
11844 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11845   echo "$ac_t""yes" 1>&6
11846   { test "$extra_verbose" = "yes" && cat << \EOF
11847     Defining HAVE_TERMIOS
11848 EOF
11849 cat >> confdefs.h <<\EOF
11850 #define HAVE_TERMIOS 1
11851 EOF
11852 }
11853
11854   { test "$extra_verbose" = "yes" && cat << \EOF
11855     Defining SIGNALS_VIA_CHARACTERS
11856 EOF
11857 cat >> confdefs.h <<\EOF
11858 #define SIGNALS_VIA_CHARACTERS 1
11859 EOF
11860 }
11861
11862   { test "$extra_verbose" = "yes" && cat << \EOF
11863     Defining NO_TERMIO
11864 EOF
11865 cat >> confdefs.h <<\EOF
11866 #define NO_TERMIO 1
11867 EOF
11868 }
11869
11870 else
11871   echo "$ac_t""no" 1>&6
11872 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11873 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11874 echo "configure:11875: checking for termio.h" >&5
11875
11876 cat > conftest.$ac_ext <<EOF
11877 #line 11878 "configure"
11878 #include "confdefs.h"
11879 #include <termio.h>
11880 EOF
11881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11882 { (eval echo configure:11883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11884 if test -z "$ac_err"; then
11885   rm -rf conftest*
11886   eval "ac_cv_header_$ac_safe=yes"
11887 else
11888   echo "$ac_err" >&5
11889   echo "configure: failed program was:" >&5
11890   cat conftest.$ac_ext >&5
11891   rm -rf conftest*
11892   eval "ac_cv_header_$ac_safe=no"
11893 fi
11894 rm -f conftest*
11895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11896   echo "$ac_t""yes" 1>&6
11897   { test "$extra_verbose" = "yes" && cat << \EOF
11898     Defining HAVE_TERMIO
11899 EOF
11900 cat >> confdefs.h <<\EOF
11901 #define HAVE_TERMIO 1
11902 EOF
11903 }
11904
11905 else
11906   echo "$ac_t""no" 1>&6
11907 fi
11908
11909 fi
11910
11911
11912
11913 echo $ac_n "checking for socket""... $ac_c" 1>&6
11914 echo "configure:11915: checking for socket" >&5
11915
11916 cat > conftest.$ac_ext <<EOF
11917 #line 11918 "configure"
11918 #include "confdefs.h"
11919 /* System header to define __stub macros and hopefully few prototypes,
11920     which can conflict with char socket(); below.  */
11921 #include <assert.h>
11922 /* Override any gcc2 internal prototype to avoid an error.  */
11923 /* We use char because int might match the return type of a gcc2
11924     builtin and then its argument prototype would still apply.  */
11925 char socket();
11926
11927 int main() {
11928
11929 /* The GNU C library defines this for functions which it implements
11930     to always fail with ENOSYS.  Some functions are actually named
11931     something starting with __ and the normal name is an alias.  */
11932 #if defined (__stub_socket) || defined (__stub___socket)
11933 choke me
11934 #else
11935 socket();
11936 #endif
11937
11938 ; return 0; }
11939 EOF
11940 if { (eval echo configure:11941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11941   rm -rf conftest*
11942   eval "ac_cv_func_socket=yes"
11943 else
11944   echo "configure: failed program was:" >&5
11945   cat conftest.$ac_ext >&5
11946   rm -rf conftest*
11947   eval "ac_cv_func_socket=no"
11948 fi
11949 rm -f conftest*
11950
11951 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11952   echo "$ac_t""yes" 1>&6
11953   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11954 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11955 echo "configure:11956: checking for netinet/in.h" >&5
11956
11957 cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960 #include <netinet/in.h>
11961 EOF
11962 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11963 { (eval echo configure:11964: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11964 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11965 if test -z "$ac_err"; then
11966   rm -rf conftest*
11967   eval "ac_cv_header_$ac_safe=yes"
11968 else
11969   echo "$ac_err" >&5
11970   echo "configure: failed program was:" >&5
11971   cat conftest.$ac_ext >&5
11972   rm -rf conftest*
11973   eval "ac_cv_header_$ac_safe=no"
11974 fi
11975 rm -f conftest*
11976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11977   echo "$ac_t""yes" 1>&6
11978   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11979 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11980 echo "configure:11981: checking for arpa/inet.h" >&5
11981
11982 cat > conftest.$ac_ext <<EOF
11983 #line 11984 "configure"
11984 #include "confdefs.h"
11985 #include <arpa/inet.h>
11986 EOF
11987 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11988 { (eval echo configure:11989: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11989 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11990 if test -z "$ac_err"; then
11991   rm -rf conftest*
11992   eval "ac_cv_header_$ac_safe=yes"
11993 else
11994   echo "$ac_err" >&5
11995   echo "configure: failed program was:" >&5
11996   cat conftest.$ac_ext >&5
11997   rm -rf conftest*
11998   eval "ac_cv_header_$ac_safe=no"
11999 fi
12000 rm -f conftest*
12001 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12002   echo "$ac_t""yes" 1>&6
12003   
12004   { test "$extra_verbose" = "yes" && cat << \EOF
12005     Defining HAVE_SOCKETS
12006 EOF
12007 cat >> confdefs.h <<\EOF
12008 #define HAVE_SOCKETS 1
12009 EOF
12010 }
12011
12012       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
12013 echo "configure:12014: checking "for sun_len member in struct sockaddr_un"" >&5
12014       cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017
12018 #include <sys/types.h>
12019 #include <sys/socket.h>
12020 #include <sys/un.h>
12021       
12022 int main() {
12023 static struct sockaddr_un x; x.sun_len = 1;
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12029     Defining HAVE_SOCKADDR_SUN_LEN
12030 EOF
12031 cat >> confdefs.h <<\EOF
12032 #define HAVE_SOCKADDR_SUN_LEN 1
12033 EOF
12034 }
12035
12036 else
12037   echo "configure: failed program was:" >&5
12038   cat conftest.$ac_ext >&5
12039   rm -rf conftest*
12040   echo "$ac_t""no" 1>&6
12041 fi
12042 rm -f conftest*
12043       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
12044 echo "configure:12045: checking "for ip_mreq struct in netinet/in.h"" >&5
12045       cat > conftest.$ac_ext <<EOF
12046 #line 12047 "configure"
12047 #include "confdefs.h"
12048
12049 #include <sys/types.h>
12050 #include <netinet/in.h>
12051       
12052 int main() {
12053 static struct ip_mreq x;
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
12059     Defining HAVE_MULTICAST
12060 EOF
12061 cat >> confdefs.h <<\EOF
12062 #define HAVE_MULTICAST 1
12063 EOF
12064 }
12065
12066 else
12067   echo "configure: failed program was:" >&5
12068   cat conftest.$ac_ext >&5
12069   rm -rf conftest*
12070   echo "$ac_t""no" 1>&6
12071 fi
12072 rm -f conftest*
12073 else
12074   echo "$ac_t""no" 1>&6
12075 fi
12076
12077 else
12078   echo "$ac_t""no" 1>&6
12079 fi
12080
12081 else
12082   echo "$ac_t""no" 1>&6
12083 fi
12084
12085
12086 echo $ac_n "checking for msgget""... $ac_c" 1>&6
12087 echo "configure:12088: checking for msgget" >&5
12088
12089 cat > conftest.$ac_ext <<EOF
12090 #line 12091 "configure"
12091 #include "confdefs.h"
12092 /* System header to define __stub macros and hopefully few prototypes,
12093     which can conflict with char msgget(); below.  */
12094 #include <assert.h>
12095 /* Override any gcc2 internal prototype to avoid an error.  */
12096 /* We use char because int might match the return type of a gcc2
12097     builtin and then its argument prototype would still apply.  */
12098 char msgget();
12099
12100 int main() {
12101
12102 /* The GNU C library defines this for functions which it implements
12103     to always fail with ENOSYS.  Some functions are actually named
12104     something starting with __ and the normal name is an alias.  */
12105 #if defined (__stub_msgget) || defined (__stub___msgget)
12106 choke me
12107 #else
12108 msgget();
12109 #endif
12110
12111 ; return 0; }
12112 EOF
12113 if { (eval echo configure:12114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12114   rm -rf conftest*
12115   eval "ac_cv_func_msgget=yes"
12116 else
12117   echo "configure: failed program was:" >&5
12118   cat conftest.$ac_ext >&5
12119   rm -rf conftest*
12120   eval "ac_cv_func_msgget=no"
12121 fi
12122 rm -f conftest*
12123
12124 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
12125   echo "$ac_t""yes" 1>&6
12126   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
12127 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
12128 echo "configure:12129: checking for sys/ipc.h" >&5
12129
12130 cat > conftest.$ac_ext <<EOF
12131 #line 12132 "configure"
12132 #include "confdefs.h"
12133 #include <sys/ipc.h>
12134 EOF
12135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12136 { (eval echo configure:12137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12138 if test -z "$ac_err"; then
12139   rm -rf conftest*
12140   eval "ac_cv_header_$ac_safe=yes"
12141 else
12142   echo "$ac_err" >&5
12143   echo "configure: failed program was:" >&5
12144   cat conftest.$ac_ext >&5
12145   rm -rf conftest*
12146   eval "ac_cv_header_$ac_safe=no"
12147 fi
12148 rm -f conftest*
12149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12150   echo "$ac_t""yes" 1>&6
12151   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
12152 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
12153 echo "configure:12154: checking for sys/msg.h" >&5
12154
12155 cat > conftest.$ac_ext <<EOF
12156 #line 12157 "configure"
12157 #include "confdefs.h"
12158 #include <sys/msg.h>
12159 EOF
12160 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12161 { (eval echo configure:12162: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12162 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12163 if test -z "$ac_err"; then
12164   rm -rf conftest*
12165   eval "ac_cv_header_$ac_safe=yes"
12166 else
12167   echo "$ac_err" >&5
12168   echo "configure: failed program was:" >&5
12169   cat conftest.$ac_ext >&5
12170   rm -rf conftest*
12171   eval "ac_cv_header_$ac_safe=no"
12172 fi
12173 rm -f conftest*
12174 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12175   echo "$ac_t""yes" 1>&6
12176   { test "$extra_verbose" = "yes" && cat << \EOF
12177     Defining HAVE_SYSVIPC
12178 EOF
12179 cat >> confdefs.h <<\EOF
12180 #define HAVE_SYSVIPC 1
12181 EOF
12182 }
12183
12184 else
12185   echo "$ac_t""no" 1>&6
12186 fi
12187
12188 else
12189   echo "$ac_t""no" 1>&6
12190 fi
12191
12192 else
12193   echo "$ac_t""no" 1>&6
12194 fi
12195
12196
12197 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
12198 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
12199 echo "configure:12200: checking for dirent.h" >&5
12200
12201 cat > conftest.$ac_ext <<EOF
12202 #line 12203 "configure"
12203 #include "confdefs.h"
12204 #include <dirent.h>
12205 EOF
12206 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12207 { (eval echo configure:12208: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12208 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12209 if test -z "$ac_err"; then
12210   rm -rf conftest*
12211   eval "ac_cv_header_$ac_safe=yes"
12212 else
12213   echo "$ac_err" >&5
12214   echo "configure: failed program was:" >&5
12215   cat conftest.$ac_ext >&5
12216   rm -rf conftest*
12217   eval "ac_cv_header_$ac_safe=no"
12218 fi
12219 rm -f conftest*
12220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12221   echo "$ac_t""yes" 1>&6
12222   { test "$extra_verbose" = "yes" && cat << \EOF
12223     Defining SYSV_SYSTEM_DIR
12224 EOF
12225 cat >> confdefs.h <<\EOF
12226 #define SYSV_SYSTEM_DIR 1
12227 EOF
12228 }
12229
12230 else
12231   echo "$ac_t""no" 1>&6
12232 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
12233 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
12234 echo "configure:12235: checking for sys/dir.h" >&5
12235
12236 cat > conftest.$ac_ext <<EOF
12237 #line 12238 "configure"
12238 #include "confdefs.h"
12239 #include <sys/dir.h>
12240 EOF
12241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12242 { (eval echo configure:12243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12244 if test -z "$ac_err"; then
12245   rm -rf conftest*
12246   eval "ac_cv_header_$ac_safe=yes"
12247 else
12248   echo "$ac_err" >&5
12249   echo "configure: failed program was:" >&5
12250   cat conftest.$ac_ext >&5
12251   rm -rf conftest*
12252   eval "ac_cv_header_$ac_safe=no"
12253 fi
12254 rm -f conftest*
12255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12256   echo "$ac_t""yes" 1>&6
12257   :
12258 else
12259   echo "$ac_t""no" 1>&6
12260 { test "$extra_verbose" = "yes" && cat << \EOF
12261     Defining NONSYSTEM_DIR_LIBRARY
12262 EOF
12263 cat >> confdefs.h <<\EOF
12264 #define NONSYSTEM_DIR_LIBRARY 1
12265 EOF
12266 }
12267
12268 fi
12269
12270 fi
12271
12272
12273 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
12274 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
12275 echo "configure:12276: checking for nlist.h" >&5
12276
12277 cat > conftest.$ac_ext <<EOF
12278 #line 12279 "configure"
12279 #include "confdefs.h"
12280 #include <nlist.h>
12281 EOF
12282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12283 { (eval echo configure:12284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12285 if test -z "$ac_err"; then
12286   rm -rf conftest*
12287   eval "ac_cv_header_$ac_safe=yes"
12288 else
12289   echo "$ac_err" >&5
12290   echo "configure: failed program was:" >&5
12291   cat conftest.$ac_ext >&5
12292   rm -rf conftest*
12293   eval "ac_cv_header_$ac_safe=no"
12294 fi
12295 rm -f conftest*
12296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12297   echo "$ac_t""yes" 1>&6
12298   { test "$extra_verbose" = "yes" && cat << \EOF
12299     Defining NLIST_STRUCT
12300 EOF
12301 cat >> confdefs.h <<\EOF
12302 #define NLIST_STRUCT 1
12303 EOF
12304 }
12305
12306 else
12307   echo "$ac_t""no" 1>&6
12308 fi
12309
12310
12311
12312 echo "checking "for sound support"" 1>&6
12313 echo "configure:12314: checking "for sound support"" >&5
12314 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
12315
12316 if test "$with_native_sound" != "no"; then
12317     if test -n "$native_sound_lib"; then
12318     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
12319 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
12320 echo "configure:12321: checking for multimedia/audio_device.h" >&5
12321
12322 cat > conftest.$ac_ext <<EOF
12323 #line 12324 "configure"
12324 #include "confdefs.h"
12325 #include <multimedia/audio_device.h>
12326 EOF
12327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12328 { (eval echo configure:12329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12330 if test -z "$ac_err"; then
12331   rm -rf conftest*
12332   eval "ac_cv_header_$ac_safe=yes"
12333 else
12334   echo "$ac_err" >&5
12335   echo "configure: failed program was:" >&5
12336   cat conftest.$ac_ext >&5
12337   rm -rf conftest*
12338   eval "ac_cv_header_$ac_safe=no"
12339 fi
12340 rm -f conftest*
12341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12342   echo "$ac_t""yes" 1>&6
12343   sound_found=yes sound_cflags=""
12344       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12345    echo "    xemacs will be linked with \"sunplay.o\""
12346  fi
12347 else
12348   echo "$ac_t""no" 1>&6
12349 fi
12350
12351   fi
12352
12353     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
12354     sound_found=yes
12355     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
12356    echo "    xemacs will be linked with \"sunplay.o\""
12357  fi
12358     if test -d "/usr/demo/SOUND/include"
12359       then sound_cflags="-I/usr/demo/SOUND/include"
12360       else sound_cflags="-I/usr/demo/SOUND"
12361     fi
12362     if test -z "$native_sound_lib" ; then
12363       if test -r "/usr/demo/SOUND/lib/libaudio.a"
12364         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
12365         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
12366       fi
12367     fi
12368   fi
12369
12370     if test -z "$sound_found"; then
12371     case "$canonical" in
12372     *-sgi-* )
12373       if test -z "$native_sound_lib"; then
12374         
12375 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
12376 echo "configure:12377: checking for ALopenport in -laudio" >&5
12377 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
12378
12379 xe_check_libs=" -laudio "
12380 cat > conftest.$ac_ext <<EOF
12381 #line 12382 "configure"
12382 #include "confdefs.h"
12383 /* Override any gcc2 internal prototype to avoid an error.  */
12384 /* We use char because int might match the return type of a gcc2
12385     builtin and then its argument prototype would still apply.  */
12386 char ALopenport();
12387
12388 int main() {
12389 ALopenport()
12390 ; return 0; }
12391 EOF
12392 if { (eval echo configure:12393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12393   rm -rf conftest*
12394   eval "ac_cv_lib_$ac_lib_var=yes"
12395 else
12396   echo "configure: failed program was:" >&5
12397   cat conftest.$ac_ext >&5
12398   rm -rf conftest*
12399   eval "ac_cv_lib_$ac_lib_var=no"
12400 fi
12401 rm -f conftest*
12402 xe_check_libs=""
12403
12404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12405   echo "$ac_t""yes" 1>&6
12406   native_sound_lib="-laudio"
12407 else
12408   echo "$ac_t""no" 1>&6
12409 fi
12410
12411
12412       fi
12413       if test -n "$native_sound_lib"; then
12414         sound_found=yes sound_cflags=""
12415         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
12416    echo "    xemacs will be linked with \"sgiplay.o\""
12417  fi
12418       fi ;;
12419     hppa*-hp-hpux* )
12420       if test -z "$native_sound_lib"; then
12421         
12422 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
12423 echo "configure:12424: checking for AOpenAudio in -lAlib" >&5
12424 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
12425
12426 xe_check_libs=" -lAlib "
12427 cat > conftest.$ac_ext <<EOF
12428 #line 12429 "configure"
12429 #include "confdefs.h"
12430 /* Override any gcc2 internal prototype to avoid an error.  */
12431 /* We use char because int might match the return type of a gcc2
12432     builtin and then its argument prototype would still apply.  */
12433 char AOpenAudio();
12434
12435 int main() {
12436 AOpenAudio()
12437 ; return 0; }
12438 EOF
12439 if { (eval echo configure:12440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12440   rm -rf conftest*
12441   eval "ac_cv_lib_$ac_lib_var=yes"
12442 else
12443   echo "configure: failed program was:" >&5
12444   cat conftest.$ac_ext >&5
12445   rm -rf conftest*
12446   eval "ac_cv_lib_$ac_lib_var=no"
12447 fi
12448 rm -f conftest*
12449 xe_check_libs=""
12450
12451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12452   echo "$ac_t""yes" 1>&6
12453   native_sound_lib="-lAlib"
12454 else
12455   echo "$ac_t""no" 1>&6
12456 fi
12457
12458
12459       fi
12460       if test -n "$native_sound_lib"; then
12461         sound_found=yes
12462         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
12463    echo "    xemacs will be linked with \"hpplay.o\""
12464  fi
12465         if test "$GCC" = "yes" # Kludge city
12466           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
12467           else sound_cflags="+e -I/usr/audio/examples"
12468         fi
12469       fi ;;
12470     esac
12471   fi
12472
12473     if test -z "$sound_found"; then
12474     for dir in "machine" "sys" "linux"; do
12475       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
12476 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
12477 echo "configure:12478: checking for ${dir}/soundcard.h" >&5
12478
12479 cat > conftest.$ac_ext <<EOF
12480 #line 12481 "configure"
12481 #include "confdefs.h"
12482 #include <${dir}/soundcard.h>
12483 EOF
12484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12485 { (eval echo configure:12486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12486 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12487 if test -z "$ac_err"; then
12488   rm -rf conftest*
12489   eval "ac_cv_header_$ac_safe=yes"
12490 else
12491   echo "$ac_err" >&5
12492   echo "configure: failed program was:" >&5
12493   cat conftest.$ac_ext >&5
12494   rm -rf conftest*
12495   eval "ac_cv_header_$ac_safe=no"
12496 fi
12497 rm -f conftest*
12498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12499   echo "$ac_t""yes" 1>&6
12500   sound_found=yes
12501        need_miscplay=yes
12502         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
12503    echo "    xemacs will be linked with \"linuxplay.o\""
12504  fi
12505         { test "$extra_verbose" = "yes" && cat << EOF
12506     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
12507 EOF
12508 cat >> confdefs.h <<EOF
12509 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
12510 EOF
12511 }
12512
12513         break
12514 else
12515   echo "$ac_t""no" 1>&6
12516 fi
12517
12518     done
12519   fi
12520
12521     if test -z "$sound_found"; then
12522     if test "$with_msw" = "yes"; then
12523     sound_found=yes
12524     native_sound_lib=
12525     fi
12526   fi
12527
12528   test "$sound_found" = "yes" && with_native_sound=yes
12529 fi
12530
12531 if test "$with_native_sound" = "yes"; then
12532   { test "$extra_verbose" = "yes" && cat << \EOF
12533     Defining HAVE_NATIVE_SOUND
12534 EOF
12535 cat >> confdefs.h <<\EOF
12536 #define HAVE_NATIVE_SOUND 1
12537 EOF
12538 }
12539
12540   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
12541 fi
12542
12543 if test "$with_nas_sound" != "no"; then
12544   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
12545 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
12546 echo "configure:12547: checking for audio/audiolib.h" >&5
12547
12548 cat > conftest.$ac_ext <<EOF
12549 #line 12550 "configure"
12550 #include "confdefs.h"
12551 #include <audio/audiolib.h>
12552 EOF
12553 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12554 { (eval echo configure:12555: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12555 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12556 if test -z "$ac_err"; then
12557   rm -rf conftest*
12558   eval "ac_cv_header_$ac_safe=yes"
12559 else
12560   echo "$ac_err" >&5
12561   echo "configure: failed program was:" >&5
12562   cat conftest.$ac_ext >&5
12563   rm -rf conftest*
12564   eval "ac_cv_header_$ac_safe=no"
12565 fi
12566 rm -f conftest*
12567 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12568   echo "$ac_t""yes" 1>&6
12569   
12570     
12571 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
12572 echo "configure:12573: checking for AuOpenServer in -laudio" >&5
12573 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
12574
12575 xe_check_libs=" -laudio "
12576 cat > conftest.$ac_ext <<EOF
12577 #line 12578 "configure"
12578 #include "confdefs.h"
12579 /* Override any gcc2 internal prototype to avoid an error.  */
12580 /* We use char because int might match the return type of a gcc2
12581     builtin and then its argument prototype would still apply.  */
12582 char AuOpenServer();
12583
12584 int main() {
12585 AuOpenServer()
12586 ; return 0; }
12587 EOF
12588 if { (eval echo configure:12589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12589   rm -rf conftest*
12590   eval "ac_cv_lib_$ac_lib_var=yes"
12591 else
12592   echo "configure: failed program was:" >&5
12593   cat conftest.$ac_ext >&5
12594   rm -rf conftest*
12595   eval "ac_cv_lib_$ac_lib_var=no"
12596 fi
12597 rm -f conftest*
12598 xe_check_libs=""
12599
12600 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12601   echo "$ac_t""yes" 1>&6
12602   have_nas_sound=yes
12603 else
12604   echo "$ac_t""no" 1>&6
12605 fi
12606
12607
12608 else
12609   echo "$ac_t""no" 1>&6
12610 fi
12611
12612   if test "$have_nas_sound" = "yes"; then
12613     with_nas_sound=yes
12614     { test "$extra_verbose" = "yes" && cat << \EOF
12615     Defining HAVE_NAS_SOUND
12616 EOF
12617 cat >> confdefs.h <<\EOF
12618 #define HAVE_NAS_SOUND 1
12619 EOF
12620 }
12621
12622     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12623    echo "    xemacs will be linked with \"nas.o\""
12624  fi
12625     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12626             cat > conftest.$ac_ext <<EOF
12627 #line 12628 "configure"
12628 #include "confdefs.h"
12629 #include <audio/Xtutil.h>
12630 EOF
12631 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12632   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12633   :
12634 else
12635   rm -rf conftest*
12636   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12637     Defining NAS_NO_ERROR_JUMP
12638 EOF
12639 cat >> confdefs.h <<\EOF
12640 #define NAS_NO_ERROR_JUMP 1
12641 EOF
12642 }
12643
12644 fi
12645 rm -f conftest*
12646
12647   else
12648     test "$with_nas_sound" = "yes" && \
12649       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12650     with_nas_sound=no
12651   fi
12652 fi
12653
12654 if test "$with_esd_sound" != "no"; then
12655   # Extract the first word of "esd-config", so it can be a program name with args.
12656 set dummy esd-config; ac_word=$2
12657 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12658 echo "configure:12659: checking for $ac_word" >&5
12659
12660 if test -n "$have_esd_config"; then
12661   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12662 else
12663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12664   ac_dummy="$PATH"
12665   for ac_dir in $ac_dummy; do
12666     test -z "$ac_dir" && ac_dir=.
12667     if test -f $ac_dir/$ac_word; then
12668       ac_cv_prog_have_esd_config="yes"
12669       break
12670     fi
12671   done
12672   IFS="$ac_save_ifs"
12673   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12674 fi
12675 have_esd_config="$ac_cv_prog_have_esd_config"
12676 if test -n "$have_esd_config"; then
12677   echo "$ac_t""$have_esd_config" 1>&6
12678 else
12679   echo "$ac_t""no" 1>&6
12680 fi
12681
12682   if test "$have_esd_config" = "yes"; then
12683     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12684     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
12685     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12686     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12687 echo "configure:12688: checking for esd_play_stream" >&5
12688
12689 cat > conftest.$ac_ext <<EOF
12690 #line 12691 "configure"
12691 #include "confdefs.h"
12692 /* System header to define __stub macros and hopefully few prototypes,
12693     which can conflict with char esd_play_stream(); below.  */
12694 #include <assert.h>
12695 /* Override any gcc2 internal prototype to avoid an error.  */
12696 /* We use char because int might match the return type of a gcc2
12697     builtin and then its argument prototype would still apply.  */
12698 char esd_play_stream();
12699
12700 int main() {
12701
12702 /* The GNU C library defines this for functions which it implements
12703     to always fail with ENOSYS.  Some functions are actually named
12704     something starting with __ and the normal name is an alias.  */
12705 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12706 choke me
12707 #else
12708 esd_play_stream();
12709 #endif
12710
12711 ; return 0; }
12712 EOF
12713 if { (eval echo configure:12714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12714   rm -rf conftest*
12715   eval "ac_cv_func_esd_play_stream=yes"
12716 else
12717   echo "configure: failed program was:" >&5
12718   cat conftest.$ac_ext >&5
12719   rm -rf conftest*
12720   eval "ac_cv_func_esd_play_stream=no"
12721 fi
12722 rm -f conftest*
12723
12724 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12725   echo "$ac_t""yes" 1>&6
12726   have_esd_sound=yes
12727 else
12728   echo "$ac_t""no" 1>&6
12729 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12730 fi
12731
12732   fi
12733
12734   if test "$have_esd_sound" = "yes"; then
12735     with_esd_sound=yes
12736     need_miscplay=yes
12737     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12738    echo "    xemacs will be linked with \"esd.o\""
12739  fi
12740     { test "$extra_verbose" = "yes" && cat << \EOF
12741     Defining HAVE_ESD_SOUND
12742 EOF
12743 cat >> confdefs.h <<\EOF
12744 #define HAVE_ESD_SOUND 1
12745 EOF
12746 }
12747
12748   else
12749     test "$with_esd_sound" = "yes" && \
12750       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12751     with_esd_sound=no
12752   fi
12753 fi
12754
12755 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12756    echo "    xemacs will be linked with \"miscplay.o\""
12757  fi
12758
12759
12760 test -z "$with_tty" && with_tty=yes
12761
12762 if test "$with_tty" = "yes"  ; then
12763   echo "checking for TTY-related features" 1>&6
12764 echo "configure:12765: checking for TTY-related features" >&5
12765   { test "$extra_verbose" = "yes" && cat << \EOF
12766     Defining HAVE_TTY
12767 EOF
12768 cat >> confdefs.h <<\EOF
12769 #define HAVE_TTY 1
12770 EOF
12771 }
12772
12773   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
12774    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\""
12775  fi
12776
12777     if test -z "$with_ncurses"; then
12778     
12779 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12780 echo "configure:12781: checking for tgetent in -lncurses" >&5
12781 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12782
12783 xe_check_libs=" -lncurses "
12784 cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 /* Override any gcc2 internal prototype to avoid an error.  */
12788 /* We use char because int might match the return type of a gcc2
12789     builtin and then its argument prototype would still apply.  */
12790 char tgetent();
12791
12792 int main() {
12793 tgetent()
12794 ; return 0; }
12795 EOF
12796 if { (eval echo configure:12797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12797   rm -rf conftest*
12798   eval "ac_cv_lib_$ac_lib_var=yes"
12799 else
12800   echo "configure: failed program was:" >&5
12801   cat conftest.$ac_ext >&5
12802   rm -rf conftest*
12803   eval "ac_cv_lib_$ac_lib_var=no"
12804 fi
12805 rm -f conftest*
12806 xe_check_libs=""
12807
12808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12809   echo "$ac_t""yes" 1>&6
12810   with_ncurses=yes
12811 else
12812   echo "$ac_t""no" 1>&6
12813 with_ncurses=no
12814 fi
12815
12816
12817   fi
12818   if test "$with_ncurses" = "yes"; then
12819     { test "$extra_verbose" = "yes" && cat << \EOF
12820     Defining HAVE_NCURSES
12821 EOF
12822 cat >> confdefs.h <<\EOF
12823 #define HAVE_NCURSES 1
12824 EOF
12825 }
12826
12827     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12828 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12829 echo "configure:12830: checking for ncurses/curses.h" >&5
12830
12831 cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 #include <ncurses/curses.h>
12835 EOF
12836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12837 { (eval echo configure:12838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12839 if test -z "$ac_err"; then
12840   rm -rf conftest*
12841   eval "ac_cv_header_$ac_safe=yes"
12842 else
12843   echo "$ac_err" >&5
12844   echo "configure: failed program was:" >&5
12845   cat conftest.$ac_ext >&5
12846   rm -rf conftest*
12847   eval "ac_cv_header_$ac_safe=no"
12848 fi
12849 rm -f conftest*
12850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12851   echo "$ac_t""yes" 1>&6
12852   curses_h_file=ncurses/curses.h
12853 else
12854   echo "$ac_t""no" 1>&6
12855 fi
12856
12857     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12858 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12859 echo "configure:12860: checking for ncurses/term.h" >&5
12860
12861 cat > conftest.$ac_ext <<EOF
12862 #line 12863 "configure"
12863 #include "confdefs.h"
12864 #include <ncurses/term.h>
12865 EOF
12866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12867 { (eval echo configure:12868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12869 if test -z "$ac_err"; then
12870   rm -rf conftest*
12871   eval "ac_cv_header_$ac_safe=yes"
12872 else
12873   echo "$ac_err" >&5
12874   echo "configure: failed program was:" >&5
12875   cat conftest.$ac_ext >&5
12876   rm -rf conftest*
12877   eval "ac_cv_header_$ac_safe=no"
12878 fi
12879 rm -f conftest*
12880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12881   echo "$ac_t""yes" 1>&6
12882   term_h_file=ncurses/term.h
12883 else
12884   echo "$ac_t""no" 1>&6
12885 fi
12886
12887     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12888    echo "    xemacs will be linked with \"terminfo.o\""
12889  fi
12890     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12891
12892     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12893                         save_c_switch_site="$c_switch_site"
12894       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12895       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12896 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12897 echo "configure:12898: checking for ncurses/curses.h" >&5
12898
12899 cat > conftest.$ac_ext <<EOF
12900 #line 12901 "configure"
12901 #include "confdefs.h"
12902 #include <ncurses/curses.h>
12903 EOF
12904 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12905 { (eval echo configure:12906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12906 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12907 if test -z "$ac_err"; then
12908   rm -rf conftest*
12909   eval "ac_cv_header_$ac_safe=yes"
12910 else
12911   echo "$ac_err" >&5
12912   echo "configure: failed program was:" >&5
12913   cat conftest.$ac_ext >&5
12914   rm -rf conftest*
12915   eval "ac_cv_header_$ac_safe=no"
12916 fi
12917 rm -f conftest*
12918 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12919   echo "$ac_t""yes" 1>&6
12920   curses_h_file=ncurses/curses.h
12921 else
12922   echo "$ac_t""no" 1>&6
12923 fi
12924
12925       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12926         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12927         else c_switch_site="$save_c_switch_site"
12928       fi
12929     fi
12930   else         if test "$have_terminfo" = "yes"; then
12931       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12932    echo "    xemacs will be linked with \"terminfo.o\""
12933  fi
12934       if test -n "$libs_termcap"; then
12935         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12936       else
12937         for lib in curses termlib termcap; do
12938           
12939 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12940 echo "configure:12941: checking for tgetent in -l$lib" >&5
12941 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12942
12943 xe_check_libs=" -l$lib "
12944 cat > conftest.$ac_ext <<EOF
12945 #line 12946 "configure"
12946 #include "confdefs.h"
12947 /* Override any gcc2 internal prototype to avoid an error.  */
12948 /* We use char because int might match the return type of a gcc2
12949     builtin and then its argument prototype would still apply.  */
12950 char tgetent();
12951
12952 int main() {
12953 tgetent()
12954 ; return 0; }
12955 EOF
12956 if { (eval echo configure:12957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12957   rm -rf conftest*
12958   eval "ac_cv_lib_$ac_lib_var=yes"
12959 else
12960   echo "configure: failed program was:" >&5
12961   cat conftest.$ac_ext >&5
12962   rm -rf conftest*
12963   eval "ac_cv_lib_$ac_lib_var=no"
12964 fi
12965 rm -f conftest*
12966 xe_check_libs=""
12967
12968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12969   echo "$ac_t""yes" 1>&6
12970   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12971 else
12972   echo "$ac_t""no" 1>&6
12973 fi
12974
12975
12976         done
12977       fi
12978     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12979    echo "    xemacs will be linked with \"tparam.o\""
12980  fi
12981                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12982       if test -n "$libs_termcap"; then
12983         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12984       else
12985         
12986 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12987 echo "configure:12988: checking for tgetent in -lcurses" >&5
12988 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12989
12990 xe_check_libs=" -lcurses "
12991 cat > conftest.$ac_ext <<EOF
12992 #line 12993 "configure"
12993 #include "confdefs.h"
12994 /* Override any gcc2 internal prototype to avoid an error.  */
12995 /* We use char because int might match the return type of a gcc2
12996     builtin and then its argument prototype would still apply.  */
12997 char tgetent();
12998
12999 int main() {
13000 tgetent()
13001 ; return 0; }
13002 EOF
13003 if { (eval echo configure:13004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13004   rm -rf conftest*
13005   eval "ac_cv_lib_$ac_lib_var=yes"
13006 else
13007   echo "configure: failed program was:" >&5
13008   cat conftest.$ac_ext >&5
13009   rm -rf conftest*
13010   eval "ac_cv_lib_$ac_lib_var=no"
13011 fi
13012 rm -f conftest*
13013 xe_check_libs=""
13014
13015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13016   echo "$ac_t""yes" 1>&6
13017   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
13018 else
13019   echo "$ac_t""no" 1>&6
13020 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
13021 echo "configure:13022: checking for tgetent in -ltermcap" >&5
13022 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
13023
13024 xe_check_libs=" -ltermcap "
13025 cat > conftest.$ac_ext <<EOF
13026 #line 13027 "configure"
13027 #include "confdefs.h"
13028 /* Override any gcc2 internal prototype to avoid an error.  */
13029 /* We use char because int might match the return type of a gcc2
13030     builtin and then its argument prototype would still apply.  */
13031 char tgetent();
13032
13033 int main() {
13034 tgetent()
13035 ; return 0; }
13036 EOF
13037 if { (eval echo configure:13038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13038   rm -rf conftest*
13039   eval "ac_cv_lib_$ac_lib_var=yes"
13040 else
13041   echo "configure: failed program was:" >&5
13042   cat conftest.$ac_ext >&5
13043   rm -rf conftest*
13044   eval "ac_cv_lib_$ac_lib_var=no"
13045 fi
13046 rm -f conftest*
13047 xe_check_libs=""
13048
13049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13050   echo "$ac_t""yes" 1>&6
13051   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
13052 else
13053   echo "$ac_t""no" 1>&6
13054 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
13055    echo "    xemacs will be linked with \"termcap.o\""
13056  fi
13057 fi
13058
13059
13060 fi
13061
13062
13063       fi
13064     fi
13065   fi
13066   { test "$extra_verbose" = "yes" && cat << EOF
13067     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
13068 EOF
13069 cat >> confdefs.h <<EOF
13070 #define CURSES_H_FILE "${curses_h_file-curses.h}"
13071 EOF
13072 }
13073
13074   { test "$extra_verbose" = "yes" && cat << EOF
13075     Defining TERM_H_FILE = "${term_h_file-term.h}"
13076 EOF
13077 cat >> confdefs.h <<EOF
13078 #define TERM_H_FILE "${term_h_file-term.h}"
13079 EOF
13080 }
13081
13082
13083     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
13084 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
13085 echo "configure:13086: checking for gpm.h" >&5
13086
13087 cat > conftest.$ac_ext <<EOF
13088 #line 13089 "configure"
13089 #include "confdefs.h"
13090 #include <gpm.h>
13091 EOF
13092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13093 { (eval echo configure:13094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13095 if test -z "$ac_err"; then
13096   rm -rf conftest*
13097   eval "ac_cv_header_$ac_safe=yes"
13098 else
13099   echo "$ac_err" >&5
13100   echo "configure: failed program was:" >&5
13101   cat conftest.$ac_ext >&5
13102   rm -rf conftest*
13103   eval "ac_cv_header_$ac_safe=no"
13104 fi
13105 rm -f conftest*
13106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13107   echo "$ac_t""yes" 1>&6
13108   :
13109 else
13110   echo "$ac_t""no" 1>&6
13111 with_gpm=no
13112 fi
13113  }
13114   test -z "$with_gpm" && { 
13115 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
13116 echo "configure:13117: checking for Gpm_Open in -lgpm" >&5
13117 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
13118
13119 xe_check_libs=" -lgpm "
13120 cat > conftest.$ac_ext <<EOF
13121 #line 13122 "configure"
13122 #include "confdefs.h"
13123 /* Override any gcc2 internal prototype to avoid an error.  */
13124 /* We use char because int might match the return type of a gcc2
13125     builtin and then its argument prototype would still apply.  */
13126 char Gpm_Open();
13127
13128 int main() {
13129 Gpm_Open()
13130 ; return 0; }
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13133   rm -rf conftest*
13134   eval "ac_cv_lib_$ac_lib_var=yes"
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -rf conftest*
13139   eval "ac_cv_lib_$ac_lib_var=no"
13140 fi
13141 rm -f conftest*
13142 xe_check_libs=""
13143
13144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13145   echo "$ac_t""yes" 1>&6
13146   with_gpm=yes
13147 else
13148   echo "$ac_t""no" 1>&6
13149 with_gpm=no
13150 fi
13151
13152  }
13153   if test "$with_gpm" = "yes"; then
13154     { test "$extra_verbose" = "yes" && cat << \EOF
13155     Defining HAVE_GPM
13156 EOF
13157 cat >> confdefs.h <<\EOF
13158 #define HAVE_GPM 1
13159 EOF
13160 }
13161
13162     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
13163    echo "    xemacs will be linked with \"gpmevent.o\""
13164  fi
13165     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
13166   fi
13167
13168 else   for feature in ncurses gpm; do
13169     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
13170       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
13171     fi
13172     eval "with_${feature}=no"
13173   done
13174 fi 
13175 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
13176    echo "    xemacs will be linked with \"event-unixoid.o\""
13177  fi
13178
13179
13180 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13181   != "no no no" && echo "checking for database support" 1>&6
13182 echo "configure:13183: checking for database support" >&5
13183
13184 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
13185   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
13186 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
13187 echo "configure:13188: checking for ndbm.h" >&5
13188
13189 cat > conftest.$ac_ext <<EOF
13190 #line 13191 "configure"
13191 #include "confdefs.h"
13192 #include <ndbm.h>
13193 EOF
13194 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13195 { (eval echo configure:13196: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13196 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13197 if test -z "$ac_err"; then
13198   rm -rf conftest*
13199   eval "ac_cv_header_$ac_safe=yes"
13200 else
13201   echo "$ac_err" >&5
13202   echo "configure: failed program was:" >&5
13203   cat conftest.$ac_ext >&5
13204   rm -rf conftest*
13205   eval "ac_cv_header_$ac_safe=no"
13206 fi
13207 rm -f conftest*
13208 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13209   echo "$ac_t""yes" 1>&6
13210   :
13211 else
13212   echo "$ac_t""no" 1>&6
13213
13214     test "$with_database_gdbm" = "yes" -o \
13215          "$with_database_dbm"  = "yes" && \
13216       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13217     with_database_gdbm=no with_database_dbm=no
13218 fi
13219
13220 fi
13221
13222 if test "$with_database_gdbm" != "no"; then
13223   
13224 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
13225 echo "configure:13226: checking for dbm_open in -lgdbm" >&5
13226 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
13227
13228 xe_check_libs=" -lgdbm "
13229 cat > conftest.$ac_ext <<EOF
13230 #line 13231 "configure"
13231 #include "confdefs.h"
13232 /* Override any gcc2 internal prototype to avoid an error.  */
13233 /* We use char because int might match the return type of a gcc2
13234     builtin and then its argument prototype would still apply.  */
13235 char dbm_open();
13236
13237 int main() {
13238 dbm_open()
13239 ; return 0; }
13240 EOF
13241 if { (eval echo configure:13242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13242   rm -rf conftest*
13243   eval "ac_cv_lib_$ac_lib_var=yes"
13244 else
13245   echo "configure: failed program was:" >&5
13246   cat conftest.$ac_ext >&5
13247   rm -rf conftest*
13248   eval "ac_cv_lib_$ac_lib_var=no"
13249 fi
13250 rm -f conftest*
13251 xe_check_libs=""
13252
13253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13254   echo "$ac_t""yes" 1>&6
13255   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
13256 else
13257   echo "$ac_t""no" 1>&6
13258 if test "$with_database_gdbm" = "yes"; then
13259      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
13260    fi
13261    with_database_gdbm=no
13262 fi
13263
13264
13265 fi
13266
13267 if test "$with_database_dbm" != "no"; then
13268   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
13269 echo "configure:13270: checking for dbm_open" >&5
13270
13271 cat > conftest.$ac_ext <<EOF
13272 #line 13273 "configure"
13273 #include "confdefs.h"
13274 /* System header to define __stub macros and hopefully few prototypes,
13275     which can conflict with char dbm_open(); below.  */
13276 #include <assert.h>
13277 /* Override any gcc2 internal prototype to avoid an error.  */
13278 /* We use char because int might match the return type of a gcc2
13279     builtin and then its argument prototype would still apply.  */
13280 char dbm_open();
13281
13282 int main() {
13283
13284 /* The GNU C library defines this for functions which it implements
13285     to always fail with ENOSYS.  Some functions are actually named
13286     something starting with __ and the normal name is an alias.  */
13287 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
13288 choke me
13289 #else
13290 dbm_open();
13291 #endif
13292
13293 ; return 0; }
13294 EOF
13295 if { (eval echo configure:13296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13296   rm -rf conftest*
13297   eval "ac_cv_func_dbm_open=yes"
13298 else
13299   echo "configure: failed program was:" >&5
13300   cat conftest.$ac_ext >&5
13301   rm -rf conftest*
13302   eval "ac_cv_func_dbm_open=no"
13303 fi
13304 rm -f conftest*
13305
13306 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
13307   echo "$ac_t""yes" 1>&6
13308   with_database_dbm=yes libdbm=
13309 else
13310   echo "$ac_t""no" 1>&6
13311
13312     
13313 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
13314 echo "configure:13315: checking for dbm_open in -ldbm" >&5
13315 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
13316
13317 xe_check_libs=" -ldbm "
13318 cat > conftest.$ac_ext <<EOF
13319 #line 13320 "configure"
13320 #include "confdefs.h"
13321 /* Override any gcc2 internal prototype to avoid an error.  */
13322 /* We use char because int might match the return type of a gcc2
13323     builtin and then its argument prototype would still apply.  */
13324 char dbm_open();
13325
13326 int main() {
13327 dbm_open()
13328 ; return 0; }
13329 EOF
13330 if { (eval echo configure:13331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13331   rm -rf conftest*
13332   eval "ac_cv_lib_$ac_lib_var=yes"
13333 else
13334   echo "configure: failed program was:" >&5
13335   cat conftest.$ac_ext >&5
13336   rm -rf conftest*
13337   eval "ac_cv_lib_$ac_lib_var=no"
13338 fi
13339 rm -f conftest*
13340 xe_check_libs=""
13341
13342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13343   echo "$ac_t""yes" 1>&6
13344   with_database_dbm=yes libdbm=-ldbm
13345 else
13346   echo "$ac_t""no" 1>&6
13347 test "$with_database_dbm" = "yes" && \
13348         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
13349       with_database_dbm=no
13350 fi
13351
13352
13353 fi
13354
13355 fi
13356
13357 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
13358 test "$with_database_gdbm" = "yes" -o \
13359      "$with_database_dbm"  = "yes" && \
13360   { test "$extra_verbose" = "yes" && cat << \EOF
13361     Defining HAVE_DBM
13362 EOF
13363 cat >> confdefs.h <<\EOF
13364 #define HAVE_DBM 1
13365 EOF
13366 }
13367
13368
13369 if test "$with_database_berkdb" != "no"; then
13370   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
13371 echo "configure:13372: checking for Berkeley db.h" >&5
13372   for header in "db/db.h" "db.h"; do
13373     cat > conftest.$ac_ext <<EOF
13374 #line 13375 "configure"
13375 #include "confdefs.h"
13376
13377 #include <stdlib.h>
13378 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
13379 #ifdef HAVE_INTTYPES_H
13380 #define __BIT_TYPES_DEFINED__
13381 #include <inttypes.h>
13382 typedef uint8_t  u_int8_t;
13383 typedef uint16_t u_int16_t;
13384 typedef uint32_t u_int32_t;
13385 #ifdef WE_DONT_NEED_QUADS
13386 typedef uint64_t u_int64_t;
13387 #endif
13388 #endif
13389 #endif
13390 #include <$header>
13391
13392 int main() {
13393
13394 ; return 0; }
13395 EOF
13396 if { (eval echo configure:13397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13397   rm -rf conftest*
13398   db_h_file="$header"; break
13399 else
13400   echo "configure: failed program was:" >&5
13401   cat conftest.$ac_ext >&5
13402 fi
13403 rm -f conftest*
13404   done
13405   if test -z "$db_h_file"
13406   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
13407   else echo "$ac_t""$db_h_file" 1>&6
13408   fi
13409
13410   if test "$with_database_berkdb" != "no"; then
13411     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
13412 echo "configure:13413: checking for Berkeley DB version" >&5
13413     cat > conftest.$ac_ext <<EOF
13414 #line 13415 "configure"
13415 #include "confdefs.h"
13416 #include <$db_h_file>
13417 #if DB_VERSION_MAJOR > 1
13418 yes
13419 #endif
13420
13421 EOF
13422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13423   egrep "yes" >/dev/null 2>&1; then
13424   rm -rf conftest*
13425   cat > conftest.$ac_ext <<EOF
13426 #line 13427 "configure"
13427 #include "confdefs.h"
13428 #include <$db_h_file>
13429 #if DB_VERSION_MAJOR > 2
13430 yes
13431 #endif
13432
13433 EOF
13434 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13435   egrep "yes" >/dev/null 2>&1; then
13436   rm -rf conftest*
13437   echo "$ac_t""3" 1>&6; dbfunc=db_create
13438 else
13439   rm -rf conftest*
13440   
13441     echo "$ac_t""2" 1>&6; dbfunc=db_open
13442 fi
13443 rm -f conftest*
13444
13445 else
13446   rm -rf conftest*
13447   
13448     echo "$ac_t""1" 1>&6; dbfunc=dbopen
13449 fi
13450 rm -f conftest*
13451
13452     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
13453 echo "configure:13454: checking for $dbfunc" >&5
13454
13455 cat > conftest.$ac_ext <<EOF
13456 #line 13457 "configure"
13457 #include "confdefs.h"
13458 /* System header to define __stub macros and hopefully few prototypes,
13459     which can conflict with char $dbfunc(); below.  */
13460 #include <assert.h>
13461 /* Override any gcc2 internal prototype to avoid an error.  */
13462 /* We use char because int might match the return type of a gcc2
13463     builtin and then its argument prototype would still apply.  */
13464 char $dbfunc();
13465
13466 int main() {
13467
13468 /* The GNU C library defines this for functions which it implements
13469     to always fail with ENOSYS.  Some functions are actually named
13470     something starting with __ and the normal name is an alias.  */
13471 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
13472 choke me
13473 #else
13474 $dbfunc();
13475 #endif
13476
13477 ; return 0; }
13478 EOF
13479 if { (eval echo configure:13480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13480   rm -rf conftest*
13481   eval "ac_cv_func_$dbfunc=yes"
13482 else
13483   echo "configure: failed program was:" >&5
13484   cat conftest.$ac_ext >&5
13485   rm -rf conftest*
13486   eval "ac_cv_func_$dbfunc=no"
13487 fi
13488 rm -f conftest*
13489
13490 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
13491   echo "$ac_t""yes" 1>&6
13492   with_database_berkdb=yes need_libdb=no
13493 else
13494   echo "$ac_t""no" 1>&6
13495
13496     
13497 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
13498 echo "configure:13499: checking for $dbfunc in -ldb" >&5
13499 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
13500
13501 xe_check_libs=" -ldb "
13502 cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 /* Override any gcc2 internal prototype to avoid an error.  */
13506 /* We use char because int might match the return type of a gcc2
13507     builtin and then its argument prototype would still apply.  */
13508 char $dbfunc();
13509
13510 int main() {
13511 $dbfunc()
13512 ; return 0; }
13513 EOF
13514 if { (eval echo configure:13515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13515   rm -rf conftest*
13516   eval "ac_cv_lib_$ac_lib_var=yes"
13517 else
13518   echo "configure: failed program was:" >&5
13519   cat conftest.$ac_ext >&5
13520   rm -rf conftest*
13521   eval "ac_cv_lib_$ac_lib_var=no"
13522 fi
13523 rm -f conftest*
13524 xe_check_libs=""
13525
13526 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13527   echo "$ac_t""yes" 1>&6
13528   with_database_berkdb=yes need_libdb=yes
13529 else
13530   echo "$ac_t""no" 1>&6
13531 fi
13532
13533
13534 fi
13535
13536   fi
13537
13538   if test "$with_database_berkdb" = "yes"; then
13539     { test "$extra_verbose" = "yes" && cat << EOF
13540     Defining DB_H_FILE = "$db_h_file"
13541 EOF
13542 cat >> confdefs.h <<EOF
13543 #define DB_H_FILE "$db_h_file"
13544 EOF
13545 }
13546
13547     { test "$extra_verbose" = "yes" && cat << \EOF
13548     Defining HAVE_BERKELEY_DB
13549 EOF
13550 cat >> confdefs.h <<\EOF
13551 #define HAVE_BERKELEY_DB 1
13552 EOF
13553 }
13554
13555     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
13556   else with_database_berkdb=no
13557   fi
13558 fi
13559
13560 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
13561      != "no no no"; then
13562   { test "$extra_verbose" = "yes" && cat << \EOF
13563     Defining HAVE_DATABASE
13564 EOF
13565 cat >> confdefs.h <<\EOF
13566 #define HAVE_DATABASE 1
13567 EOF
13568 }
13569
13570   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
13571    echo "    xemacs will be linked with \"database.o\""
13572  fi
13573   if test "$with_utf_2000" = "yes"; then
13574     { test "$extra_verbose" = "yes" && cat << \EOF
13575     Defining HAVE_CHISE_CLIENT
13576 EOF
13577 cat >> confdefs.h <<\EOF
13578 #define HAVE_CHISE_CLIENT 1
13579 EOF
13580 }
13581
13582   fi
13583 fi
13584
13585 if test "$with_socks" = "yes"; then
13586   
13587 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
13588 echo "configure:13589: checking for SOCKSinit in -lsocks" >&5
13589 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
13590
13591 xe_check_libs=" -lsocks "
13592 cat > conftest.$ac_ext <<EOF
13593 #line 13594 "configure"
13594 #include "confdefs.h"
13595 /* Override any gcc2 internal prototype to avoid an error.  */
13596 /* We use char because int might match the return type of a gcc2
13597     builtin and then its argument prototype would still apply.  */
13598 char SOCKSinit();
13599
13600 int main() {
13601 SOCKSinit()
13602 ; return 0; }
13603 EOF
13604 if { (eval echo configure:13605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13605   rm -rf conftest*
13606   eval "ac_cv_lib_$ac_lib_var=yes"
13607 else
13608   echo "configure: failed program was:" >&5
13609   cat conftest.$ac_ext >&5
13610   rm -rf conftest*
13611   eval "ac_cv_lib_$ac_lib_var=no"
13612 fi
13613 rm -f conftest*
13614 xe_check_libs=""
13615
13616 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13617   echo "$ac_t""yes" 1>&6
13618     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
13619     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
13620   { test "$extra_verbose" = "yes" && cat << EOF
13621     Defining $ac_tr_lib
13622 EOF
13623 cat >> confdefs.h <<EOF
13624 #define $ac_tr_lib 1
13625 EOF
13626 }
13627
13628   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
13629
13630 else
13631   echo "$ac_t""no" 1>&6
13632 fi
13633
13634
13635   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13636     Defining HAVE_SOCKS
13637 EOF
13638 cat >> confdefs.h <<\EOF
13639 #define HAVE_SOCKS 1
13640 EOF
13641 }
13642
13643 fi
13644
13645 if test "$usage_tracking" = "yes"; then
13646   { test "$extra_verbose" = "yes" && cat << \EOF
13647     Defining USAGE_TRACKING
13648 EOF
13649 cat >> confdefs.h <<\EOF
13650 #define USAGE_TRACKING 1
13651 EOF
13652 }
13653
13654   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13655 fi
13656
13657 if test "$with_modules" != "no"; then
13658   echo "checking for module support" 1>&6
13659 echo "configure:13660: checking for module support" >&5
13660
13661     if test "$with_msw" = "yes"; then
13662     have_dl=yes;
13663   else
13664         ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13665 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13666 echo "configure:13667: checking for dlfcn.h" >&5
13667
13668 cat > conftest.$ac_ext <<EOF
13669 #line 13670 "configure"
13670 #include "confdefs.h"
13671 #include <dlfcn.h>
13672 EOF
13673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13674 { (eval echo configure:13675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13676 if test -z "$ac_err"; then
13677   rm -rf conftest*
13678   eval "ac_cv_header_$ac_safe=yes"
13679 else
13680   echo "$ac_err" >&5
13681   echo "configure: failed program was:" >&5
13682   cat conftest.$ac_ext >&5
13683   rm -rf conftest*
13684   eval "ac_cv_header_$ac_safe=no"
13685 fi
13686 rm -f conftest*
13687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13688   echo "$ac_t""yes" 1>&6
13689   
13690       echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13691 echo "configure:13692: checking for dlopen in -lc" >&5
13692       cat > conftest.$ac_ext <<EOF
13693 #line 13694 "configure"
13694 #include "confdefs.h"
13695 #include <dlfcn.h>
13696 int main() {
13697         dlopen ("", 0);
13698 ; return 0; }
13699 EOF
13700 if { (eval echo configure:13701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13701   rm -rf conftest*
13702    have_dl=yes 
13703 else
13704   echo "configure: failed program was:" >&5
13705   cat conftest.$ac_ext >&5
13706   rm -rf conftest*
13707   
13708       echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13709 echo "configure:13710: checking for dlopen in -ldl" >&5
13710       ac_save_LIBS="$LIBS"
13711       LIBS="-ldl $LIBS"
13712       cat > conftest.$ac_ext <<EOF
13713 #line 13714 "configure"
13714 #include "confdefs.h"
13715 #include <dlfcn.h>
13716 int main() {
13717         dlopen ("", 0);
13718 ; return 0; }
13719 EOF
13720 if { (eval echo configure:13721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13721   rm -rf conftest*
13722    have_dl=yes 
13723 else
13724   echo "configure: failed program was:" >&5
13725   cat conftest.$ac_ext >&5
13726   rm -rf conftest*
13727   LIBS="$ac_save_LIBS"
13728 fi
13729 rm -f conftest*
13730       ac_save_LIBS=
13731 fi
13732 rm -f conftest*
13733 else
13734   echo "$ac_t""no" 1>&6
13735 fi
13736
13737     if test -n "$have_dl"; then
13738       { test "$extra_verbose" = "yes" && cat << \EOF
13739     Defining HAVE_DLOPEN
13740 EOF
13741 cat >> confdefs.h <<\EOF
13742 #define HAVE_DLOPEN 1
13743 EOF
13744 }
13745
13746     else
13747       
13748 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13749 echo "configure:13750: checking for shl_load in -ldld" >&5
13750 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13751
13752 xe_check_libs=" -ldld "
13753 cat > conftest.$ac_ext <<EOF
13754 #line 13755 "configure"
13755 #include "confdefs.h"
13756 /* Override any gcc2 internal prototype to avoid an error.  */
13757 /* We use char because int might match the return type of a gcc2
13758     builtin and then its argument prototype would still apply.  */
13759 char shl_load();
13760
13761 int main() {
13762 shl_load()
13763 ; return 0; }
13764 EOF
13765 if { (eval echo configure:13766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13766   rm -rf conftest*
13767   eval "ac_cv_lib_$ac_lib_var=yes"
13768 else
13769   echo "configure: failed program was:" >&5
13770   cat conftest.$ac_ext >&5
13771   rm -rf conftest*
13772   eval "ac_cv_lib_$ac_lib_var=no"
13773 fi
13774 rm -f conftest*
13775 xe_check_libs=""
13776
13777 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13778   echo "$ac_t""yes" 1>&6
13779   libdl=dld have_dl=yes;
13780         { test "$extra_verbose" = "yes" && cat << \EOF
13781     Defining HAVE_SHL_LOAD
13782 EOF
13783 cat >> confdefs.h <<\EOF
13784 #define HAVE_SHL_LOAD 1
13785 EOF
13786 }
13787
13788 else
13789   echo "$ac_t""no" 1>&6
13790
13791 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13792 echo "configure:13793: checking for dld_init in -ldld" >&5
13793 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13794
13795 xe_check_libs=" -ldld "
13796 cat > conftest.$ac_ext <<EOF
13797 #line 13798 "configure"
13798 #include "confdefs.h"
13799 /* Override any gcc2 internal prototype to avoid an error.  */
13800 /* We use char because int might match the return type of a gcc2
13801     builtin and then its argument prototype would still apply.  */
13802 char dld_init();
13803
13804 int main() {
13805 dld_init()
13806 ; return 0; }
13807 EOF
13808 if { (eval echo configure:13809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13809   rm -rf conftest*
13810   eval "ac_cv_lib_$ac_lib_var=yes"
13811 else
13812   echo "configure: failed program was:" >&5
13813   cat conftest.$ac_ext >&5
13814   rm -rf conftest*
13815   eval "ac_cv_lib_$ac_lib_var=no"
13816 fi
13817 rm -f conftest*
13818 xe_check_libs=""
13819
13820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13821   echo "$ac_t""yes" 1>&6
13822   libdl=dld have_dl=yes;
13823         { test "$extra_verbose" = "yes" && cat << \EOF
13824     Defining HAVE_DLD_INIT
13825 EOF
13826 cat >> confdefs.h <<\EOF
13827 #define HAVE_DLD_INIT 1
13828 EOF
13829 }
13830
13831 else
13832   echo "$ac_t""no" 1>&6
13833 fi
13834
13835
13836 fi
13837
13838
13839     fi
13840   fi 
13841   if test -n "$have_dl"; then
13842         
13843 dll_ld=
13844 dll_ldflags=
13845 dll_cflags=
13846 dll_post=
13847 dll_ldo="-o"
13848 ld_dynamic_link_flags=
13849 xehost=$canonical
13850 xealias=$internal_configuration
13851
13852 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13853 echo "configure:13854: checking how to build dynamic libraries for ${xehost}" >&5
13854 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13855 case "$xehost" in
13856 *-*-linux-gnu*) ;;
13857 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13858 esac
13859
13860 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13861 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13862 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13863
13864 case "$xehost_os" in
13865 aix3*)
13866   # AIX sometimes has problems with the GCC collect2 program.  For some
13867   # reason, if we set the COLLECT_NAMES environment variable, the problems
13868   # vanish in a puff of smoke.
13869   if test "${COLLECT_NAMES+set}" != set; then
13870     COLLECT_NAMES=
13871     export COLLECT_NAMES
13872   fi
13873   ;;
13874 esac
13875
13876 # Now see if the compiler is really GCC.
13877 if test "$GCC" = "yes"; then
13878   XEGCC=yes
13879 else
13880   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13881 echo "configure:13882: checking checking whether we are using GNU C" >&5
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885
13886 #ifdef __GNUC__
13887   yes;
13888 #endif
13889
13890 EOF
13891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13892   egrep "yes" >/dev/null 2>&1; then
13893   rm -rf conftest*
13894   XEGCC=yes
13895 else
13896   rm -rf conftest*
13897   XEGCC=no
13898 fi
13899 rm -f conftest*
13900
13901   echo "$ac_t""${XEGCC}" 1>&6
13902 fi
13903
13904 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13905 echo "configure:13906: checking how to produce PIC code" >&5
13906 wl=
13907
13908 can_build_shared=yes
13909 if test "$XEGCC" = yes; then
13910   wl='-Wl,'
13911
13912   case "$xehost_os" in
13913   aix[3-9]* | irix[5-9]* | osf[3-9])
13914     # PIC is the default for these OSes.
13915     ;;
13916
13917   os2*)
13918     # We can build DLLs from non-PIC.
13919     ;;
13920   amigaos*)
13921     # FIXME: we need at least 68020 code to build shared libraries, but
13922     # adding the `-m68020' flag to GCC prevents building anything better,
13923     # like `-m68040'.
13924     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13925     ;;
13926   *cygwin* | *mingw* )
13927     # PIC is the default
13928     ;;
13929   *)
13930     dll_cflags='-fPIC'
13931     ;;
13932   esac
13933 else
13934   # PORTME Check for PIC flags for the system compiler.
13935   case "$xehost_os" in
13936   hpux9* | hpux1[0-9]*)
13937     # Is there a better link_static_flag that works with the bundled CC?
13938     wl='-Wl,'
13939     dll_cflags='+Z'
13940     ;;
13941
13942   irix[5-9]*)
13943     wl='-Wl,'
13944     # PIC (with -KPIC) is the default.
13945     ;;
13946
13947   os2*)
13948     # We can build DLLs from non-PIC.
13949     ;;
13950
13951   osf[3-9]*)
13952     # All OSF/1 code is PIC.
13953     wl='-Wl,'
13954     ;;
13955
13956   aix[3-9]*)
13957     # All AIX code is PIC.
13958     wl='-Wl,'
13959     ;;
13960
13961   sco3.2v5*)
13962     dll_cflags='-belf -Kpic'
13963     wl='-Wl,'
13964     ;;
13965
13966   unixware*)
13967     dll_cflags="-KPIC"
13968     wl="-Wl,"
13969     ;;
13970
13971   sysv4*)
13972     dll_cflags="-KPIC"
13973     wl="-Wl,"
13974     ;;
13975
13976   sysv5*)
13977     dll_cflags="-KPIC"
13978     wl="-Wl,"
13979     ;;
13980
13981   solaris2*)
13982     dll_cflags='-KPIC'
13983     wl='-Wl,'
13984     ;;
13985
13986   sunos4*)
13987     dll_cflags='-PIC'
13988     wl='-Qoption ld '
13989     ;;
13990
13991   uts4*)
13992     dll_cflags='-pic'
13993     ;;
13994
13995   *)
13996     can_build_shared=no
13997     ;;
13998   esac
13999 fi
14000
14001 if test -n "$dll_cflags"; then
14002   echo "$ac_t""${dll_cflags}" 1>&6
14003
14004   # Check to make sure the dll_cflags actually works.
14005   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
14006 echo "configure:14007: checking if PIC flag ${dll_cflags} really works" >&5
14007   save_CFLAGS="$CFLAGS"
14008   CFLAGS="$CFLAGS $dll_cflags -DPIC"
14009   cat > conftest.$ac_ext <<EOF
14010 #line 14011 "configure"
14011 #include "confdefs.h"
14012
14013 int main() {
14014 int x=0;
14015 ; return 0; }
14016 EOF
14017 if { (eval echo configure:14018: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
14018   rm -rf conftest*
14019   
14020     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
14021     # reports no error.  So, we need to grep stderr for (Bundled).
14022     if grep '(Bundled)' config.log >/dev/null; then
14023       echo "$ac_t""no" 1>&6
14024       can_build_shared=no
14025       dll_cflags=
14026     else
14027       echo "$ac_t""yes" 1>&6
14028     fi
14029 else
14030   echo "configure: failed program was:" >&5
14031   cat conftest.$ac_ext >&5
14032   rm -rf conftest*
14033   echo "$ac_t""no" 1>&6
14034     can_build_shared=no
14035     dll_cflags=
14036 fi
14037 rm -f conftest*
14038   CFLAGS="$save_CFLAGS"
14039 else
14040   echo "$ac_t""none" 1>&6
14041 fi
14042
14043 if test "$can_build_shared" = "yes"; then
14044 cc_produces_so=no
14045 xldf=
14046 xcldf=
14047 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
14048 echo "configure:14049: checking if C compiler can produce shared libraries" >&5
14049 if test "$XEGCC" = yes; then
14050   xcldf="-shared"
14051   xldf="-shared"
14052 else # Not using GCC
14053   case "$xehost_os" in
14054     aix[3-9]*)
14055       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
14056       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
14057       ;;
14058
14059     freebsd2* | netbsd* | openbsd*)
14060       xldf="-Bshareable"
14061       xcldf="${wl}-Bshareable"
14062       ;;
14063
14064     freebsd3*)
14065       xcldf="-shared"
14066       ;;
14067
14068     hpux*)
14069       xldf="-b +s"
14070       xcldf="${wl}-b ${wl}+s"
14071       ;;
14072
14073     irix[5-9]* | osf[3-9]*)
14074       xcldf="${wl}-shared"
14075       xldf="-shared"
14076       ;;
14077
14078     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
14079       xcldf="-G"
14080       xldf="-G"
14081       ;;
14082
14083     sunos4*)
14084       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
14085       xldf="-assert pure-text -Bstatic"
14086       ;;
14087   esac
14088 fi # End if if we are using gcc
14089
14090 if test -n "$xcldf"; then
14091   save_LDFLAGS=$LDFLAGS
14092   save_LIBS=$LIBS
14093   save_xe_libs=$xe_libs
14094   LDFLAGS="$xcldf $LDFLAGS"
14095   LIBS=
14096   xe_libs=
14097   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14098   cat > conftest.$ac_ext <<EOF
14099 #line 14100 "configure"
14100 #include "confdefs.h"
14101
14102 int main() {
14103 int x=0;
14104 ; return 0; }
14105 EOF
14106 if { (eval echo configure:14107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14107   rm -rf conftest*
14108   cc_produces_so=yes
14109 else
14110   echo "configure: failed program was:" >&5
14111   cat conftest.$ac_ext >&5
14112   rm -rf conftest*
14113   cc_produces_so=no
14114 fi
14115 rm -f conftest*
14116   LDFLAGS=$save_LDFLAGS
14117   LIBS=$save_LIBS
14118   xe_libs=$save_xe_libs
14119   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
14120 else
14121   cc_produces_so=no
14122 fi
14123 echo "$ac_t""${cc_produces_so}" 1>&6
14124
14125 LTLD=$LD
14126 if test -z "$LTLD"; then
14127   ac_prog=ld
14128   if test "$XEGCC" = yes; then
14129     # Check if gcc -print-prog-name=ld gives a path.
14130     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
14131 echo "configure:14132: checking for ld used by GCC" >&5
14132     ac_prog=`($CC -print-prog-name=ld) 2>&5`
14133     case "$ac_prog" in
14134     # Accept absolute paths.
14135     /*)
14136       if test -z "$LTLD"; then
14137         case "$ac_prog" in
14138           *gcc-lib*) LTLD="$CC"
14139                      ;;
14140           *)         LTLD="$ac_prog"
14141                      ;;
14142         esac
14143       fi
14144       ;;
14145     "")
14146       # If it fails, then pretend we aren't using GCC.
14147       ac_prog=ld
14148       ;;
14149     *)
14150       # If it is relative, then search for the first ld in PATH.
14151       with_gnu_ld=unknown
14152       ;;
14153     esac
14154   else
14155     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
14156 echo "configure:14157: checking for GNU ld" >&5
14157   fi
14158
14159   if test -z "$LTLD"; then
14160     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
14161     for ac_dir in $PATH; do
14162       test -z "$ac_dir" && ac_dir=.
14163       if test -f "$ac_dir/$ac_prog"; then
14164         LTLD="$ac_dir/$ac_prog"
14165         # Check to see if the program is GNU ld.  I'd rather use --version,
14166         # but apparently some GNU ld's only accept -v.
14167         # Break only if it was the GNU/non-GNU ld that we prefer.
14168         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
14169           xe_gnu_ld=yes
14170         else
14171           xe_gnu_ld=no
14172         fi
14173       fi
14174     done
14175     IFS="$ac_save_ifs"
14176   fi
14177
14178   if test -n "$LTLD"; then
14179     echo "$ac_t""${LTLD}" 1>&6
14180   else
14181     echo "$ac_t""no" 1>&6
14182   fi
14183
14184   if test -z "$LTLD" -a "$cc_produces_so" = no; then
14185     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
14186     exit 1
14187   fi
14188 fi
14189
14190 ld_dynamic_link_flags=
14191
14192 # Check to see if it really is or isn't GNU ld.
14193 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
14194 echo "configure:14195: checking if the linker is GNU ld" >&5
14195 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
14196 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
14197   xe_gnu_ld=yes
14198 else
14199   xe_gnu_ld=no
14200 fi
14201 echo "$ac_t""${xe_gnu_ld}" 1>&6
14202
14203 case "$xehost_os" in
14204   amigaos* | sunos4*)
14205     # On these operating systems, we should treat GNU ld like the system ld.
14206     gnu_ld_acts_native=yes
14207     ;;
14208   *)
14209     gnu_ld_acts_native=no
14210     ;;
14211 esac
14212
14213 if test "$cc_produces_so" = "yes"; then
14214   dll_ld=$CC
14215   dll_ldflags=$xcldf
14216   can_build_shared=yes
14217   ld_shlibs=yes
14218 else
14219   # OK - only NOW do we futz about with ld.
14220   # See if the linker supports building shared libraries.
14221   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
14222 echo "configure:14223: checking whether the linker supports shared libraries" >&5
14223   dll_ld=$CC
14224   dll_ldflags=$LDFLAGS
14225   ld_shlibs=yes
14226   can_build_shared=yes
14227   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
14228     # See if GNU ld supports shared libraries.
14229     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
14230       dll_ld=$CC
14231       dll_ldflags="-shared"
14232       ld_shlibs=yes
14233     else
14234       ld_shlibs=no
14235     fi
14236   else
14237     # PORTME fill in a description of your system's linker (not GNU ld)
14238     case "$xehost_os" in
14239     aix3*)
14240       dll_ld=$LTLD
14241       dll_ldflags=$xldf
14242       ;;
14243
14244     aix[4-9]*)
14245       dll_ldflags=$xcldf
14246       ;;
14247
14248     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
14249     # support.  Future versions do this automatically, but an explicit c++rt0.o
14250     # doesn't break anything, and helps significantly (at the cost of a little
14251     # extra space).
14252     freebsd2.2*)
14253       dll_ld=$LTLD
14254       dll_ldflags=$xldf
14255       dll_post="/usr/lib/c++rt0.o"
14256       ;;
14257
14258     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
14259     freebsd2*)
14260       dll_ld=$LTLD
14261       dll_ldflags="-Bshareable"
14262       ;;
14263
14264     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
14265     freebsd3*)
14266       dll_ldflags="-shared"
14267       ;;
14268
14269     hpux*)
14270       dll_ld=$LTLD
14271       dll_ldflags=$xldf
14272       ;;
14273
14274     irix[5-9]*)
14275       dll_ld=$LTLD
14276       dll_ldflags=$xldf
14277       ;;
14278
14279     netbsd*)
14280       # Tested with NetBSD 1.2 ld
14281       dll_ld=$LTLD
14282       dll_ldflags=$xldf
14283       ;;
14284
14285     openbsd*)
14286       dll_ld=$LTLD
14287       dll_ldflags=$xldf
14288       ;;
14289
14290     osf3* | osf4*)
14291       dll_ld=$LTLD
14292       dll_ldflags=$xldf
14293       ;;
14294
14295     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
14296     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
14297       dll_ld=$LTLD
14298       case "$dll_ld" in
14299         *gcc*) dll_ldflags="-shared"
14300                dll_ld=$CC
14301                ;;
14302         *)     dll_ldflags="-G"
14303                ;;
14304       esac
14305       ;;
14306
14307     sunos4*)
14308       if test "$XEGCC" = yes; then
14309         dll_ld=$CC
14310       else
14311         dll_ld=$LTLD
14312       fi
14313       dll_ldflags=$xldf
14314       ;;
14315
14316     uts4*)
14317       dll_ld=$LTLD
14318       dll_ldflags="-G"
14319       ;;
14320
14321     bsdi*)
14322       dll_ldflags="-r"
14323       dll_ld="shlicc2"
14324       ;;
14325
14326     *)
14327       ld_shlibs=no
14328       can_build_shared=no
14329       ;;
14330     esac
14331   fi
14332   echo "$ac_t""${ld_shlibs}" 1>&6
14333   if test "$ld_shlibs" = "no"; then
14334     can_build_shared=no
14335   fi
14336 fi # End of if cc_produces_so = no
14337
14338
14339 if test "$xe_gnu_ld" = yes; then
14340   if test "$ld_shlibs" = yes; then
14341     ld_dynamic_link_flags="${wl}-export-dynamic"
14342   fi
14343 fi
14344
14345 if test -z "$ld_dynamic_link_flags"; then
14346   case "$xehost_os" in
14347   aix[3-9]*)
14348     ld_dynamic_link_flags=
14349     ;;
14350
14351   freebsd2.2*)
14352     ld_dynamic_link_flags=
14353     ;;
14354
14355   freebsd2*)
14356     ld_dynamic_link_flags=
14357     ;;
14358
14359   freebsd3*)
14360     ld_dynamic_link_flags=
14361     ;;
14362
14363   hpux*)
14364     ld_dynamic_link_flags="${wl}-E"
14365     ;;
14366
14367   irix[5-9]*)
14368     ld_dynamic_link_flags=
14369     ;;
14370
14371   netbsd*)
14372     ld_dynamic_link_flags=
14373     ;;
14374
14375   openbsd*)
14376     ld_dynamic_link_flags=
14377     ;;
14378
14379   osf3* | osf4*)
14380     ld_dynamic_link_flags=
14381     ;;
14382
14383   solaris2* | solaris7*)
14384     ld_dynamic_link_flags=
14385     ;;
14386
14387   sco3.2v5* | unixware* | sysv5* | sysv4*)
14388     ld_dynamic_link_flags="${wl}-Bexport"
14389     ;;
14390
14391   sunos4*)
14392     ld_dynamic_link_flags=
14393     ;;
14394
14395   uts4*)
14396     ld_dynamic_link_flags=
14397     ;;
14398
14399   bsdi*)
14400     ld_dynamic_link_flags=
14401     ;;
14402
14403   esac
14404 fi # End of if -z ld_dynamic_link_flags
14405 fi # End of if test "$can_build_shared" = "yes"
14406
14407
14408
14409
14410
14411
14412
14413
14414   fi
14415
14416   if test "$can_build_shared" = "yes"; then
14417     { test "$extra_verbose" = "yes" && cat << \EOF
14418     Defining HAVE_SHLIB
14419 EOF
14420 cat >> confdefs.h <<\EOF
14421 #define HAVE_SHLIB 1
14422 EOF
14423 }
14424
14425     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
14426    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
14427  fi
14428     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
14429     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
14430     for ac_func in dlerror _dlerror
14431 do
14432 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14433 echo "configure:14434: checking for $ac_func" >&5
14434
14435 cat > conftest.$ac_ext <<EOF
14436 #line 14437 "configure"
14437 #include "confdefs.h"
14438 /* System header to define __stub macros and hopefully few prototypes,
14439     which can conflict with char $ac_func(); below.  */
14440 #include <assert.h>
14441 /* Override any gcc2 internal prototype to avoid an error.  */
14442 /* We use char because int might match the return type of a gcc2
14443     builtin and then its argument prototype would still apply.  */
14444 char $ac_func();
14445
14446 int main() {
14447
14448 /* The GNU C library defines this for functions which it implements
14449     to always fail with ENOSYS.  Some functions are actually named
14450     something starting with __ and the normal name is an alias.  */
14451 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14452 choke me
14453 #else
14454 $ac_func();
14455 #endif
14456
14457 ; return 0; }
14458 EOF
14459 if { (eval echo configure:14460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14460   rm -rf conftest*
14461   eval "ac_cv_func_$ac_func=yes"
14462 else
14463   echo "configure: failed program was:" >&5
14464   cat conftest.$ac_ext >&5
14465   rm -rf conftest*
14466   eval "ac_cv_func_$ac_func=no"
14467 fi
14468 rm -f conftest*
14469
14470 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14471   echo "$ac_t""yes" 1>&6
14472     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14473   { test "$extra_verbose" = "yes" && cat << EOF
14474     Defining $ac_tr_func
14475 EOF
14476 cat >> confdefs.h <<EOF
14477 #define $ac_tr_func 1
14478 EOF
14479 }
14480  
14481 else
14482   echo "$ac_t""no" 1>&6
14483 fi
14484 done
14485
14486     with_modules=yes
14487   else
14488     if test "$with_modules" = "yes"; then
14489       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
14490     else
14491       echo "configure: warning: "Module support cannot be provided."" 1>&2
14492     fi
14493     with_modules=no
14494   fi
14495 fi
14496
14497 cat > conftest.$ac_ext <<EOF
14498 #line 14499 "configure"
14499 #include "confdefs.h"
14500 int main(int c,char *v[]){return 0;}
14501 EOF
14502 if { (eval echo configure:14503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
14503 then
14504   :
14505 else
14506   conftest_rc="$?"
14507   echo "configure: failed program was:" >&5
14508   cat conftest.$ac_ext >&5
14509   rm -fr conftest*
14510   
14511   echo ""
14512   echo "*** PANIC *** The C compiler can no longer build working executables."
14513   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
14514   echo "*** PANIC *** The most likely reason for this problem is that configure"
14515   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
14516   echo "*** PANIC *** found at run time."
14517   echo "*** PANIC ***"
14518   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
14519   echo "*** PANIC *** On other systems, try telling configure where to find the"
14520   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
14521   echo "*** PANIC ***"
14522   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
14523   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
14524   echo "*** PANIC *** on your system.  Don't do that."
14525   exit 1
14526 fi
14527 rm -fr conftest*
14528
14529 if test "$win32_processes" = "yes"; then
14530   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
14531    echo "    xemacs will be linked with \"process-nt.o\""
14532  fi
14533 else
14534   { test "$extra_verbose" = "yes" && cat << \EOF
14535     Defining HAVE_UNIX_PROCESSES
14536 EOF
14537 cat >> confdefs.h <<\EOF
14538 #define HAVE_UNIX_PROCESSES 1
14539 EOF
14540 }
14541
14542   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
14543    echo "    xemacs will be linked with \"process-unix.o\""
14544  fi
14545 fi
14546
14547
14548
14549 T=""
14550 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14551 CFLAGS="$T"
14552
14553
14554 T=""
14555 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14556 extra_objs="$T"
14557
14558
14559 T=""
14560 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
14561 c_switch_general="$T"
14562
14563
14564 T=""
14565 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14566 c_switch_window_system="$T"
14567
14568
14569 T=""
14570 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14571 c_switch_all="$T"
14572
14573
14574 T=""
14575 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
14576 ld_switch_general="$T"
14577
14578
14579 T=""
14580 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14581 ld_switch_window_system="$T"
14582
14583
14584 T=""
14585 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14586 ld_switch_all="$T"
14587
14588
14589 T=""
14590 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14591 ld_libs_general="$T"
14592
14593
14594 T=""
14595 for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14596 ld_libs_window_system="$T"
14597
14598
14599 T=""
14600 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14601 ld_libs_all="$T"
14602
14603
14604
14605 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
14606 internal_makefile_list="Makefile.in"
14607 SUBDIR_MAKEFILES=''
14608 test -d lock || mkdir lock
14609 for dir in $MAKE_SUBDIR; do
14610   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14611         test -d "$d" || mkdir "$d"; cd "$d"
14612       done ) ;;
14613    * ) test -d "$dir" || mkdir "$dir" ;;
14614   esac
14615   
14616 T=""
14617 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14618 SUBDIR_MAKEFILES="$T"
14619
14620   
14621 T=""
14622 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14623 internal_makefile_list="$T"
14624
14625 done
14626
14627
14628
14629
14630 for dir in src/s src/m; do
14631   if test ! -d "$dir" ; then
14632     echo Making symbolic link to "$srcdir/$dir"
14633     ${LN_S} "$srcdir/$dir" "$dir"
14634   fi
14635 done
14636
14637 if test "$extra_verbose" = "yes"; then
14638   echo ""
14639   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
14640   echo ""
14641 fi
14642
14643
14644 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14645   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14646   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14647 fi
14648
14649 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14650   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14651   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14652 fi
14653
14654 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14655   test "$extra_verbose" = "yes" && echo "creating TAGS"
14656   echo "\f
14657 $srcdir/TAGS,include" > "TAGS"
14658 fi
14659
14660 if test "$__SUNPRO_C" = "yes"; then
14661   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14662   ( echo "# For use with Sun WorkShop's Source browser."
14663     echo "# See sbquery(1) and sbinit(4) for more information"
14664     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14665   ) > .sbinit
14666 fi
14667
14668 rm -f core
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689 PREFIX=$prefix
14690 while true; do
14691   case "$PREFIX" in
14692     *\$* ) eval "PREFIX=$PREFIX" ;;
14693     *) break ;;
14694   esac
14695 done
14696
14697
14698
14699
14700 EXEC_PREFIX=$exec_prefix
14701 while true; do
14702   case "$EXEC_PREFIX" in
14703     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14704     *) break ;;
14705   esac
14706 done
14707
14708
14709
14710
14711 INFODIR=$infodir
14712 while true; do
14713   case "$INFODIR" in
14714     *\$* ) eval "INFODIR=$INFODIR" ;;
14715     *) break ;;
14716   esac
14717 done
14718
14719
14720
14721
14722 INFOPATH=$infopath
14723 while true; do
14724   case "$INFOPATH" in
14725     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14726     *) break ;;
14727   esac
14728 done
14729
14730
14731
14732
14733 PACKAGE_PATH=$package_path
14734 while true; do
14735   case "$PACKAGE_PATH" in
14736     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14737     *) break ;;
14738   esac
14739 done
14740
14741
14742
14743
14744 LISPDIR=$lispdir
14745 while true; do
14746   case "$LISPDIR" in
14747     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14748     *) break ;;
14749   esac
14750 done
14751
14752
14753
14754
14755 MODULEDIR=$moduledir
14756 while true; do
14757   case "$MODULEDIR" in
14758     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14759     *) break ;;
14760   esac
14761 done
14762
14763
14764
14765
14766 SITELISPDIR=$sitelispdir
14767 while true; do
14768   case "$SITELISPDIR" in
14769     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14770     *) break ;;
14771   esac
14772 done
14773
14774
14775
14776
14777 SITEMODULEDIR=$sitemoduledir
14778 while true; do
14779   case "$SITEMODULEDIR" in
14780     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14781     *) break ;;
14782   esac
14783 done
14784
14785
14786
14787
14788 ETCDIR=$etcdir
14789 while true; do
14790   case "$ETCDIR" in
14791     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14792     *) break ;;
14793   esac
14794 done
14795
14796
14797
14798
14799 DOCDIR=$docdir
14800 while true; do
14801   case "$DOCDIR" in
14802     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14803     *) break ;;
14804   esac
14805 done
14806
14807
14808
14809
14810 ARCHLIBDIR=$archlibdir
14811 while true; do
14812   case "$ARCHLIBDIR" in
14813     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14814     *) break ;;
14815   esac
14816 done
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14838
14839
14840
14841
14842
14843
14844
14845 : ${XEMACS_CC:=$CC}
14846
14847
14848 if test "$with_prefix" = "yes"; then
14849   { test "$extra_verbose" = "yes" && cat << \EOF
14850     Defining PREFIX_USER_DEFINED
14851 EOF
14852 cat >> confdefs.h <<\EOF
14853 #define PREFIX_USER_DEFINED 1
14854 EOF
14855 }
14856
14857 fi
14858
14859 if test "$with_site_lisp" = "no"; then
14860   { test "$extra_verbose" = "yes" && cat << \EOF
14861     Defining INHIBIT_SITE_LISP
14862 EOF
14863 cat >> confdefs.h <<\EOF
14864 #define INHIBIT_SITE_LISP 1
14865 EOF
14866 }
14867
14868 fi
14869 if test "$with_site_modules" = "no"; then
14870   { test "$extra_verbose" = "yes" && cat << \EOF
14871     Defining INHIBIT_SITE_MODULES
14872 EOF
14873 cat >> confdefs.h <<\EOF
14874 #define INHIBIT_SITE_MODULES 1
14875 EOF
14876 }
14877
14878 fi
14879
14880
14881 T=""
14882 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14883 ac_configure_args="$T"
14884
14885 { test "$extra_verbose" = "yes" && cat << EOF
14886     Defining EMACS_CONFIGURATION = "$configuration"
14887 EOF
14888 cat >> confdefs.h <<EOF
14889 #define EMACS_CONFIGURATION "$configuration"
14890 EOF
14891 }
14892
14893 { test "$extra_verbose" = "yes" && cat << EOF
14894     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14895 EOF
14896 cat >> confdefs.h <<EOF
14897 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14898 EOF
14899 }
14900
14901
14902
14903 null_string=""
14904 { test "$extra_verbose" = "yes" && cat << EOF
14905     Defining LD_SWITCH_X_SITE = $null_string
14906 EOF
14907 cat >> confdefs.h <<EOF
14908 #define LD_SWITCH_X_SITE $null_string
14909 EOF
14910 }
14911
14912 { test "$extra_verbose" = "yes" && cat << EOF
14913     Defining LD_SWITCH_X_SITE_AUX = $null_string
14914 EOF
14915 cat >> confdefs.h <<EOF
14916 #define LD_SWITCH_X_SITE_AUX $null_string
14917 EOF
14918 }
14919
14920 { test "$extra_verbose" = "yes" && cat << EOF
14921     Defining C_SWITCH_X_SITE = $null_string
14922 EOF
14923 cat >> confdefs.h <<EOF
14924 #define C_SWITCH_X_SITE $null_string
14925 EOF
14926 }
14927
14928 { test "$extra_verbose" = "yes" && cat << EOF
14929     Defining LD_SWITCH_SITE = $null_string
14930 EOF
14931 cat >> confdefs.h <<EOF
14932 #define LD_SWITCH_SITE $null_string
14933 EOF
14934 }
14935
14936 { test "$extra_verbose" = "yes" && cat << EOF
14937     Defining C_SWITCH_SITE = $null_string
14938 EOF
14939 cat >> confdefs.h <<EOF
14940 #define C_SWITCH_SITE $null_string
14941 EOF
14942 }
14943
14944
14945
14946 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14947     Defining GNU_MALLOC
14948 EOF
14949 cat >> confdefs.h <<\EOF
14950 #define GNU_MALLOC 1
14951 EOF
14952 }
14953
14954 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14955     Defining USE_SYSTEM_MALLOC
14956 EOF
14957 cat >> confdefs.h <<\EOF
14958 #define USE_SYSTEM_MALLOC 1
14959 EOF
14960 }
14961
14962 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14963     Defining USE_DEBUG_MALLOC
14964 EOF
14965 cat >> confdefs.h <<\EOF
14966 #define USE_DEBUG_MALLOC 1
14967 EOF
14968 }
14969
14970                                               { test "$extra_verbose" = "yes" && cat << \EOF
14971     Defining USE_SYSTEM_MALLOC
14972 EOF
14973 cat >> confdefs.h <<\EOF
14974 #define USE_SYSTEM_MALLOC 1
14975 EOF
14976 }
14977
14978 fi
14979 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14980     Defining I18N3
14981 EOF
14982 cat >> confdefs.h <<\EOF
14983 #define I18N3 1
14984 EOF
14985 }
14986
14987 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14988     Defining USE_GCC
14989 EOF
14990 cat >> confdefs.h <<\EOF
14991 #define USE_GCC 1
14992 EOF
14993 }
14994
14995 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14996     Defining EXTERNAL_WIDGET
14997 EOF
14998 cat >> confdefs.h <<\EOF
14999 #define EXTERNAL_WIDGET 1
15000 EOF
15001 }
15002
15003 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15004     Defining QUICK_BUILD
15005 EOF
15006 cat >> confdefs.h <<\EOF
15007 #define QUICK_BUILD 1
15008 EOF
15009 }
15010
15011 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15012     Defining PURIFY
15013 EOF
15014 cat >> confdefs.h <<\EOF
15015 #define PURIFY 1
15016 EOF
15017 }
15018
15019 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15020     Defining QUANTIFY
15021 EOF
15022 cat >> confdefs.h <<\EOF
15023 #define QUANTIFY 1
15024 EOF
15025 }
15026
15027 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15028     Defining MAIL_USE_POP
15029 EOF
15030 cat >> confdefs.h <<\EOF
15031 #define MAIL_USE_POP 1
15032 EOF
15033 }
15034
15035 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15036     Defining KERBEROS
15037 EOF
15038 cat >> confdefs.h <<\EOF
15039 #define KERBEROS 1
15040 EOF
15041 }
15042
15043 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15044     Defining HESIOD
15045 EOF
15046 cat >> confdefs.h <<\EOF
15047 #define HESIOD 1
15048 EOF
15049 }
15050
15051 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15052     Defining USE_UNION_TYPE
15053 EOF
15054 cat >> confdefs.h <<\EOF
15055 #define USE_UNION_TYPE 1
15056 EOF
15057 }
15058
15059 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
15060     Defining PDUMP
15061 EOF
15062 cat >> confdefs.h <<\EOF
15063 #define PDUMP 1
15064 EOF
15065 }
15066
15067
15068
15069 (
15070 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
15071 else
15072   echo "uname -a: `uname -a`"
15073 fi
15074 echo ""
15075 echo "$0 $quoted_arguments"
15076 ) > Installation
15077
15078 if test ! -z ${emacs_beta_version} ; then
15079   if test -z "${emacs_is_beta}" ; then
15080         xemacs_betaname=".${emacs_beta_version}"
15081   else
15082         xemacs_betaname="-b${emacs_beta_version}"
15083   fi
15084 else
15085   xemacs_betaname=""
15086 fi
15087
15088 (
15089 echo "
15090
15091 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
15092 "
15093 echo "
15094 Compilation / Installation:"
15095 echo "  Source code location:              $srcdir"
15096 echo "  Installation prefix:               $prefix"
15097 if test -n "$site_includes"; then
15098   echo "  Additional header files:           $site_includes"
15099 fi
15100 if test -n "$site_libraries"; then
15101   echo "  Additional libraries:              $site_libraries"
15102 fi
15103 if test -n "$site_prefixes"; then
15104   echo "  Additional prefixes:               $site_prefixes"
15105 fi
15106 if test -n "$runpath"; then
15107   echo "  Runtime library search path:       $runpath"
15108 fi
15109
15110 if test -n "$opsysfile"
15111 then echo "  Operating system description file: \`$opsysfile'"
15112 else echo "  Not using any operating system description file"
15113 fi
15114 if test -n "$machfile"
15115 then echo "  Machine description file:          \`$machfile'"
15116 else echo "  Not using any machine description file"
15117 fi
15118
15119 echo "  Compiler:                          $CC $CFLAGS"
15120 echo "  Relocating allocator for buffers:  $rel_alloc"
15121 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
15122
15123 echo "
15124 Window System:"
15125 if test "$with_msw" = "yes"; then
15126   echo "  Compiling in support for the Microsoft window system."
15127 fi
15128 if test "$with_x11" = "yes"; then
15129   echo "  Compiling in support for the X window system:"
15130   echo "    - X Windows headers location:                 $x_includes"
15131   echo "    - X Windows libraries location:               $x_libraries"
15132   if test "$with_xauth" != yes; then
15133     echo "    - Xau (X authority) not available."
15134   fi
15135   if test "$with_xmu" != yes; then
15136     echo "    - Xmu library not available; substituting equivalent routines."
15137   fi
15138   if test "$with_wmcommand" != no; then
15139     echo "    - Handling WM_COMMAND properly."
15140   fi
15141 fi
15142 if test "$need_athena" = "yes"; then
15143   echo "  Compiling in support for the Athena widget set:"
15144   echo "    - Athena headers location:                    $athena_h_path"
15145   echo "    - Athena library to link:                     $athena_lib"
15146 fi
15147 case "$with_menubars" in
15148   lucid ) echo "  Using Lucid menubars." ;;
15149   motif ) echo "  Using Motif menubars."
15150           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
15151           echo "             We recommend using the Lucid menubar instead."
15152           echo "             Re-run configure with --with-menubars='lucid'." ;;
15153     msw ) echo "  Using MS-Windows menubars." ;;
15154 esac
15155 case "$with_scrollbars" in
15156   lucid  ) echo "  Using Lucid scrollbars."      ;;
15157   motif  ) echo "  Using Motif scrollbars."      ;;
15158   athena ) echo "  Using Athena scrollbars."     ;;
15159      msw ) echo "  Using MS-Windows scrollbars." ;;
15160 esac
15161 case "$with_dialogs" in
15162   motif  ) echo "  Using Motif dialog boxes."
15163            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
15164              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
15165              echo "             We recommend using the Athena dialog boxes instead."
15166              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
15167              echo "             Read the PROBLEMS file for more information."
15168            fi; fi ;;
15169   athena ) echo "  Using Athena dialog boxes."     ;;
15170      msw ) echo "  Using MS-Windows dialog boxes." ;;
15171 esac
15172 case "$with_widgets" in
15173   motif  ) echo "  Using Motif native widgets."      ;;
15174   athena ) echo "  Using Athena native widgets."     ;;
15175      msw ) echo "  Using MS-Windows native widgets." ;;
15176 esac
15177 if test "$with_dragndrop" = yes; then
15178   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
15179   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
15180 fi
15181
15182 echo "
15183 TTY:"
15184 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
15185 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
15186
15187 echo "
15188 Images:"
15189 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
15190 if test "$with_xpm" = yes; then
15191   echo "  Compiling in support for XPM  images."
15192 elif test "$with_x11" = yes; then
15193   echo "  WARNING: -----------------------------------------------------------"
15194   echo "  WARNING: Compiling without XPM image support."
15195   if test "$xpm_problem" != ""; then
15196     echo "  Reason: $xpm_problem"
15197   fi
15198   echo "  WARNING: You should strongly consider installing XPM."
15199   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
15200   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15201   echo "  WARNING: -----------------------------------------------------------"
15202 fi
15203 if test "$with_png" = yes; then
15204   echo "  Compiling in support for PNG  images."
15205 elif test "$window_system" != "none"; then
15206   echo "  WARNING: -----------------------------------------------------------"
15207   echo "  WARNING: Compiling without PNG image support."
15208   if test "$png_problem" != ""; then
15209     echo "  Reason: $png_problem"
15210   fi
15211   echo "  WARNING: You should strongly consider installing the PNG libraries."
15212   echo "  WARNING: Otherwise certain images and glyphs may not display."
15213   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
15214   echo "  WARNING: -----------------------------------------------------------"
15215 fi
15216 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
15217 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
15218 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
15219
15220 echo "
15221 Sound:"
15222 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
15223 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
15224 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
15225 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
15226
15227 echo "
15228 Databases:"
15229 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
15230 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
15231 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
15232 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
15233 if test "$with_postgresql" = yes; then
15234   echo "  Compiling in support for PostgreSQL."
15235   echo "    - Using PostgreSQL header file:  $libpq_fe_h_file"
15236   test "$with_postgresqlv7" = yes && echo "    - Using PostgreSQL V7 bindings."
15237 fi
15238
15239 echo "
15240 Internationalization:"
15241 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
15242 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
15243 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
15244 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
15245 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
15246 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
15247 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
15248 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
15249 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
15250 if test "$with_wnn" = yes; then
15251   echo "  Compiling in support for the WNN input method on Mule."
15252   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
15253 fi
15254 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
15255
15256 echo "
15257 Mail:"
15258 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
15259 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
15260 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
15261 test -n "$mail_locking" && echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
15262
15263 echo "
15264 Other Features:"
15265 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
15266 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
15267 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
15268 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
15269 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
15270 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
15271 test "$pdump" = yes && echo "  Using the new portable dumper."
15272 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
15273 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
15274 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
15275   != "no no no no no no"; then
15276   echo "  WARNING: ---------------------------------------------------------"
15277   echo "  WARNING: Compiling in support for runtime error checking."
15278   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
15279   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
15280   echo "  WARNING: ---------------------------------------------------------"
15281 fi
15282 echo ""
15283 ) | tee -a Installation
15284 echo ""
15285
15286
15287 # Remove any trailing slashes in these variables.
15288 test -n "$prefix" &&
15289   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15290 test -n "$exec_prefix" &&
15291   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
15292
15293
15294 for file in $internal_makefile_list; do
15295   test "$file" = src/Makefile.in && \
15296     file="src/Makefile.in:src/Makefile.in.in:src/depend"
15297   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
15298 done
15299 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
15300 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
15301
15302 trap '' 1 2 15
15303
15304 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
15305
15306 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15307 # Let make expand exec_prefix.
15308 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15309
15310 # Any assignment to VPATH causes Sun make to only execute
15311 # the first set of double-colon rules, so remove it if not needed.
15312 # If there is a colon in the path, we need to keep it.
15313 if test "x$srcdir" = x.; then
15314   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
15315 fi
15316
15317 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
15318
15319 DEFS=-DHAVE_CONFIG_H
15320
15321 # Without the "./", some shells look in PATH for config.status.
15322 : ${CONFIG_STATUS=./config.status}
15323
15324 echo creating $CONFIG_STATUS
15325 rm -f $CONFIG_STATUS
15326 cat > $CONFIG_STATUS <<EOF
15327 #! /bin/sh
15328 # Generated automatically by configure.
15329 # Run this file to recreate the current configuration.
15330 # This directory was configured as follows,
15331 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
15332 #
15333 # $0 $ac_configure_args
15334 #
15335 # Compiler output produced by configure, useful for debugging
15336 # configure, is in ./config.log if it exists.
15337
15338 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
15339 for ac_option
15340 do
15341   case "\$ac_option" in
15342   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15343     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
15344     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
15345   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
15346     echo "$CONFIG_STATUS generated by autoconf version 2.13"
15347     exit 0 ;;
15348   -help | --help | --hel | --he | --h)
15349     echo "\$ac_cs_usage"; exit 0 ;;
15350   *) echo "\$ac_cs_usage"; exit 1 ;;
15351   esac
15352 done
15353
15354 ac_given_srcdir=$srcdir
15355 ac_given_INSTALL="$INSTALL"
15356
15357 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
15358 EOF
15359 cat >> $CONFIG_STATUS <<EOF
15360
15361 # Protect against being on the right side of a sed subst in config.status.
15362 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
15363  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
15364 $ac_vpsub
15365 $extrasub
15366 s%@SHELL@%$SHELL%g
15367 s%@CFLAGS@%$CFLAGS%g
15368 s%@CPPFLAGS@%$CPPFLAGS%g
15369 s%@CXXFLAGS@%$CXXFLAGS%g
15370 s%@FFLAGS@%$FFLAGS%g
15371 s%@DEFS@%$DEFS%g
15372 s%@LDFLAGS@%$LDFLAGS%g
15373 s%@LIBS@%$LIBS%g
15374 s%@exec_prefix@%$exec_prefix%g
15375 s%@prefix@%$prefix%g
15376 s%@program_transform_name@%$program_transform_name%g
15377 s%@bindir@%$bindir%g
15378 s%@sbindir@%$sbindir%g
15379 s%@libexecdir@%$libexecdir%g
15380 s%@datadir@%$datadir%g
15381 s%@sysconfdir@%$sysconfdir%g
15382 s%@sharedstatedir@%$sharedstatedir%g
15383 s%@localstatedir@%$localstatedir%g
15384 s%@libdir@%$libdir%g
15385 s%@includedir@%$includedir%g
15386 s%@oldincludedir@%$oldincludedir%g
15387 s%@infodir@%$infodir%g
15388 s%@mandir@%$mandir%g
15389 s%@LN_S@%$LN_S%g
15390 s%@blddir@%$blddir%g
15391 s%@CC@%$CC%g
15392 s%@CPP@%$CPP%g
15393 s%@start_flags@%$start_flags%g
15394 s%@ld_switch_shared@%$ld_switch_shared%g
15395 s%@start_files@%$start_files%g
15396 s%@ld@%$ld%g
15397 s%@lib_gcc@%$lib_gcc%g
15398 s%@RANLIB@%$RANLIB%g
15399 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
15400 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
15401 s%@INSTALL_DATA@%$INSTALL_DATA%g
15402 s%@YACC@%$YACC%g
15403 s%@SET_MAKE@%$SET_MAKE%g
15404 s%@X_CFLAGS@%$X_CFLAGS%g
15405 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
15406 s%@X_LIBS@%$X_LIBS%g
15407 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
15408 s%@install_pp@%$install_pp%g
15409 s%@libs_xauth@%$libs_xauth%g
15410 s%@dnd_objs@%$dnd_objs%g
15411 s%@lwlib_objs@%$lwlib_objs%g
15412 s%@ALLOCA@%$ALLOCA%g
15413 s%@have_esd_config@%$have_esd_config%g
15414 s%@dll_ld@%$dll_ld%g
15415 s%@dll_cflags@%$dll_cflags%g
15416 s%@dll_ldflags@%$dll_ldflags%g
15417 s%@dll_post@%$dll_post%g
15418 s%@dll_ldo@%$dll_ldo%g
15419 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
15420 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
15421 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
15422 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
15423 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
15424 s%@PROGNAME@%$PROGNAME%g
15425 s%@version@%$version%g
15426 s%@configuration@%$configuration%g
15427 s%@canonical@%$canonical%g
15428 s%@inststaticdir@%$inststaticdir%g
15429 s%@instvardir@%$instvardir%g
15430 s%@srcdir@%$srcdir%g
15431 s%@pkgdir@%$pkgdir%g
15432 s%@statedir@%$statedir%g
15433 s%@extra_includes@%$extra_includes%g
15434 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
15435 s%@PREFIX@%$PREFIX%g
15436 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
15437 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
15438 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
15439 s%@INFODIR@%$INFODIR%g
15440 s%@infopath@%$infopath%g
15441 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
15442 s%@INFOPATH@%$INFOPATH%g
15443 s%@package_path@%$package_path%g
15444 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
15445 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
15446 s%@lispdir@%$lispdir%g
15447 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
15448 s%@LISPDIR@%$LISPDIR%g
15449 s%@moduledir@%$moduledir%g
15450 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
15451 s%@MODULEDIR@%$MODULEDIR%g
15452 s%@sitelispdir@%$sitelispdir%g
15453 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
15454 s%@SITELISPDIR@%$SITELISPDIR%g
15455 s%@sitemoduledir@%$sitemoduledir%g
15456 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
15457 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
15458 s%@etcdir@%$etcdir%g
15459 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
15460 s%@ETCDIR@%$ETCDIR%g
15461 s%@docdir@%$docdir%g
15462 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
15463 s%@DOCDIR@%$DOCDIR%g
15464 s%@archlibdir@%$archlibdir%g
15465 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
15466 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
15467 s%@bitmapdir@%$bitmapdir%g
15468 s%@extra_objs@%$extra_objs%g
15469 s%@machfile@%$machfile%g
15470 s%@opsysfile@%$opsysfile%g
15471 s%@c_switch_general@%$c_switch_general%g
15472 s%@c_switch_window_system@%$c_switch_window_system%g
15473 s%@c_switch_all@%$c_switch_all%g
15474 s%@ld_switch_general@%$ld_switch_general%g
15475 s%@ld_switch_window_system@%$ld_switch_window_system%g
15476 s%@ld_switch_all@%$ld_switch_all%g
15477 s%@ld_libs_general@%$ld_libs_general%g
15478 s%@ld_libs_window_system@%$ld_libs_window_system%g
15479 s%@ld_libs_all@%$ld_libs_all%g
15480 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
15481 s%@native_sound_lib@%$native_sound_lib%g
15482 s%@sound_cflags@%$sound_cflags%g
15483 s%@dynodump_arch@%$dynodump_arch%g
15484 s%@XEMACS_CC@%$XEMACS_CC%g
15485 s%@internal_makefile_list@%$internal_makefile_list%g
15486
15487 CEOF
15488 EOF
15489
15490 cat >> $CONFIG_STATUS <<\EOF
15491
15492 # Split the substitutions into bite-sized pieces for seds with
15493 # small command number limits, like on Digital OSF/1 and HP-UX.
15494 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
15495 ac_file=1 # Number of current file.
15496 ac_beg=1 # First line for current file.
15497 ac_end=$ac_max_sed_cmds # Line after last line for current file.
15498 ac_more_lines=:
15499 ac_sed_cmds=""
15500 while $ac_more_lines; do
15501   if test $ac_beg -gt 1; then
15502     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
15503   else
15504     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
15505   fi
15506   if test ! -s conftest.s$ac_file; then
15507     ac_more_lines=false
15508     rm -f conftest.s$ac_file
15509   else
15510     if test -z "$ac_sed_cmds"; then
15511       ac_sed_cmds="sed -f conftest.s$ac_file"
15512     else
15513       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
15514     fi
15515     ac_file=`expr $ac_file + 1`
15516     ac_beg=$ac_end
15517     ac_end=`expr $ac_end + $ac_max_sed_cmds`
15518   fi
15519 done
15520 if test -z "$ac_sed_cmds"; then
15521   ac_sed_cmds=cat
15522 fi
15523 EOF
15524
15525 cat >> $CONFIG_STATUS <<EOF
15526
15527 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
15528 EOF
15529 cat >> $CONFIG_STATUS <<\EOF
15530 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
15531   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15532   case "$ac_file" in
15533   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15534        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15535   *) ac_file_in="${ac_file}.in" ;;
15536   esac
15537
15538   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
15539
15540   # Remove last slash and all that follows it.  Not all systems have dirname.
15541   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15542   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15543     # The file is in a subdirectory.
15544     test ! -d "$ac_dir" && mkdir "$ac_dir"
15545     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
15546     # A "../" for each directory in $ac_dir_suffix.
15547     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
15548   else
15549     ac_dir_suffix= ac_dots=
15550   fi
15551
15552   case "$ac_given_srcdir" in
15553   .)  srcdir=.
15554       if test -z "$ac_dots"; then top_srcdir=.
15555       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
15556   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
15557   *) # Relative path.
15558     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
15559     top_srcdir="$ac_dots$ac_given_srcdir" ;;
15560   esac
15561
15562   case "$ac_given_INSTALL" in
15563   [/$]*) INSTALL="$ac_given_INSTALL" ;;
15564   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
15565   esac
15566
15567   echo creating "$ac_file"
15568   rm -f "$ac_file"
15569   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
15570   case "$ac_file" in
15571   *Makefile*) ac_comsub="1i\\
15572 # $configure_input" ;;
15573   *) ac_comsub= ;;
15574   esac
15575
15576   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15577   sed -e "$ac_comsub
15578 s%@configure_input@%$configure_input%g
15579 s%@srcdir@%$srcdir%g
15580 s%@top_srcdir@%$top_srcdir%g
15581 s%@INSTALL@%$INSTALL%g
15582 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15583 fi; done
15584 rm -f conftest.s*
15585
15586 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15587 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15588 #
15589 # ac_d sets the value in "#define NAME VALUE" lines.
15590 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15591 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15592 ac_dC='\3'
15593 ac_dD='%g'
15594 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15595 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15596 ac_uB='\([      ]\)%\1#\2define\3'
15597 ac_uC=' '
15598 ac_uD='\4%g'
15599 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15600 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15601 ac_eB='$%\1#\2define\3'
15602 ac_eC=' '
15603 ac_eD='%g'
15604
15605 if test "${CONFIG_HEADERS+set}" != set; then
15606 EOF
15607 cat >> $CONFIG_STATUS <<EOF
15608   CONFIG_HEADERS="src/config.h lwlib/config.h"
15609 EOF
15610 cat >> $CONFIG_STATUS <<\EOF
15611 fi
15612 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15613   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15614   case "$ac_file" in
15615   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15616        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15617   *) ac_file_in="${ac_file}.in" ;;
15618   esac
15619
15620   echo creating $ac_file
15621
15622   rm -f conftest.frag conftest.in conftest.out
15623   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15624   cat $ac_file_inputs > conftest.in
15625
15626 EOF
15627
15628 # Transform confdefs.h into a sed script conftest.vals that substitutes
15629 # the proper values into config.h.in to produce config.h.  And first:
15630 # Protect against being on the right side of a sed subst in config.status.
15631 # Protect against being in an unquoted here document in config.status.
15632 rm -f conftest.vals
15633 cat > conftest.hdr <<\EOF
15634 s/[\\&%]/\\&/g
15635 s%[\\$`]%\\&%g
15636 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15637 s%ac_d%ac_u%gp
15638 s%ac_u%ac_e%gp
15639 EOF
15640 sed -n -f conftest.hdr confdefs.h > conftest.vals
15641 rm -f conftest.hdr
15642
15643 # This sed command replaces #undef with comments.  This is necessary, for
15644 # example, in the case of _POSIX_SOURCE, which is predefined and required
15645 # on some systems where configure will not decide to define it.
15646 cat >> conftest.vals <<\EOF
15647 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15648 EOF
15649
15650 # Break up conftest.vals because some shells have a limit on
15651 # the size of here documents, and old seds have small limits too.
15652
15653 rm -f conftest.tail
15654 while :
15655 do
15656   ac_lines=`grep -c . conftest.vals`
15657   # grep -c gives empty output for an empty file on some AIX systems.
15658   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15659   # Write a limited-size here document to conftest.frag.
15660   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15661   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15662   echo 'CEOF
15663   sed -f conftest.frag conftest.in > conftest.out
15664   rm -f conftest.in
15665   mv conftest.out conftest.in
15666 ' >> $CONFIG_STATUS
15667   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15668   rm -f conftest.vals
15669   mv conftest.tail conftest.vals
15670 done
15671 rm -f conftest.vals
15672
15673 cat >> $CONFIG_STATUS <<\EOF
15674   rm -f conftest.frag conftest.h
15675   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15676   cat conftest.in >> conftest.h
15677   rm -f conftest.in
15678   if cmp -s $ac_file conftest.h 2>/dev/null; then
15679     echo "$ac_file is unchanged"
15680     rm -f conftest.h
15681   else
15682     # Remove last slash and all that follows it.  Not all systems have dirname.
15683       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15684       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15685       # The file is in a subdirectory.
15686       test ! -d "$ac_dir" && mkdir "$ac_dir"
15687     fi
15688     rm -f $ac_file
15689     mv conftest.h $ac_file
15690   fi
15691 fi; done
15692
15693 EOF
15694 cat >> $CONFIG_STATUS <<EOF
15695 CPP="$CPP"
15696  top_srcdir="$srcdir"
15697  MAKE_SUBDIR="$MAKE_SUBDIR"
15698
15699 EOF
15700 cat >> $CONFIG_STATUS <<\EOF
15701 for dir in . $MAKE_SUBDIR; do
15702   (
15703     cd $dir
15704     rm -f junk.c
15705     < Makefile.in \
15706       sed -e '/^# Generated/d' \
15707           -e 's%/\*\*/#.*%%' \
15708           -e 's/^ *# */#/' \
15709           -e '/^##/d' \
15710           -e '/^#/ {
15711 p
15712 d
15713 }'        \
15714           -e '/./ {
15715 s/\([\"]\)/\\\1/g
15716 s/^/"/
15717 s/$/"/
15718 }'  > junk.c;
15719
15720
15721
15722     echo creating $dir/Makefile
15723 $CPP -I. -I${top_srcdir}/src  junk.c \
15724   | sed -e 's/^\#.*//'          \
15725         -e 's/^[        ][      ]*$//'\
15726         -e 's/^ /       /'              \
15727         -e '/^[ \f]*$/d' \
15728         -e '/^\"/ {
15729         s/\\\([\"]\)/\1/g
15730         s/^[    ]*\"//
15731         s/\"[   ]*$//
15732 }' > Makefile.new
15733     chmod 444 Makefile.new
15734     mv -f Makefile.new Makefile
15735
15736     echo creating $dir/GNUmakefile
15737 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15738   | sed -e 's/^\#.*//'          \
15739         -e 's/^[        ][      ]*$//'\
15740         -e 's/^ /       /'              \
15741         -e '/^[ \f]*$/d' \
15742         -e '/^\"/ {
15743         s/\\\([\"]\)/\1/g
15744         s/^[    ]*\"//
15745         s/\"[   ]*$//
15746 }' > Makefile.new
15747     chmod 444 Makefile.new
15748     mv -f Makefile.new GNUmakefile
15749
15750     rm -f junk.c
15751   )
15752 done
15753
15754 sed < config.status >> lib-src/config.values \
15755   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15756   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15757   -e 's/^\([^ ]*\) $/\1 ""/' \
15758   -e 's/ 1$/ t/'
15759
15760
15761 exit 0
15762 EOF
15763 chmod +x $CONFIG_STATUS
15764 rm -fr confdefs* $ac_clean_files
15765 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1