Sync with r21-2-33 and r21-2-33-utf-2000.
[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, 93, 94, 95, 96 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) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 SHELL=${CONFIG_SHELL-/bin/sh}
96 ac_max_here_lines=12
97
98 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
99
100 # File descriptor usage:
101 # 0 standard input
102 # 1 file creation
103 # 2 errors and warnings
104 # 3 some systems may open it to /dev/tty
105 # 4 used on the Kubota Titan
106 # 6 checking for... messages and results
107 # 5 compiler messages saved in config.log
108 if test "$silent" = yes; then
109   exec 6>/dev/null
110 else
111   exec 6>&1
112 fi
113 exec 5>./config.log
114
115 echo "\
116 This file contains any messages produced by compilers while
117 running configure, to aid debugging if configure makes a mistake.
118 " 1>&5
119
120 # Strip out --no-create and --no-recursion so they do not pile up.
121 # Also quote any args containing shell metacharacters.
122 ac_configure_args=
123 for ac_arg
124 do
125   case "$ac_arg" in
126   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
127   | --no-cr | --no-c) ;;
128   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
129   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
130   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
131   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
132   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
133   esac
134 done
135
136 # NLS nuisances.
137 # Only set these to C if already set.  These must not be set unconditionally
138 # because not all systems understand e.g. LANG=C (notably SCO).
139 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
140 # Non-C LC_CTYPE values break the ctype check.
141 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
142 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
143 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
144 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
145
146 # confdefs.h avoids OS command line length limits that DEFS can exceed.
147 rm -rf conftest* confdefs.h
148 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
149 echo > confdefs.h
150
151 # A filename unique to this package, relative to the directory that
152 # configure is in, which we can look for to find out if srcdir is correct.
153 ac_unique_file=src/lisp.h
154
155 # Find the source files, if location was not specified.
156 if test -z "$srcdir"; then
157   ac_srcdir_defaulted=yes
158   # Try the directory containing this script, then its parent.
159   ac_prog=$0
160   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
161   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
162   srcdir=$ac_confdir
163   if test ! -r $srcdir/$ac_unique_file; then
164     srcdir=..
165   fi
166 else
167   ac_srcdir_defaulted=no
168 fi
169 if test ! -r $srcdir/$ac_unique_file; then
170   if test "$ac_srcdir_defaulted" = yes; then
171     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
172   else
173     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
174   fi
175 fi
176 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
177
178 # Prefer explicitly selected file to automatically selected ones.
179 if test -z "$CONFIG_SITE"; then
180   if test "x$prefix" != xNONE; then
181     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
182   else
183     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
184   fi
185 fi
186 for ac_site_file in $CONFIG_SITE; do
187   if test -r "$ac_site_file"; then
188     echo "loading site script $ac_site_file"
189     . "$ac_site_file"
190   fi
191 done
192
193
194 ac_ext=c
195 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
196 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
197 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
198 ac_cpp='$CPP '"$xe_cppflags"
199 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
200 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
201 cross_compiling=no
202
203 ac_exeext=
204 ac_objext=o
205 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
206   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
207   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
208     ac_n= ac_c='
209 ' ac_t='        '
210   else
211     ac_n=-n ac_c= ac_t=
212   fi
213 else
214   ac_n= ac_c='\c' ac_t=
215 fi
216
217
218 progname="`echo $0 | sed 's:^\./\./:\./:'`"
219
220
221 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
222 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
223
224 prefix='/usr/local'
225 exec_prefix='${prefix}'
226 bindir='${exec_prefix}/bin'
227 datadir='${prefix}/lib'
228 statedir='${prefix}/lib'
229 libdir='${exec_prefix}/lib'
230 mandir='${prefix}/man/man1'
231 inststaticdir='${PROGNAME}'
232 instvardir='${PROGNAME}-${version}'
233 infodir='${datadir}/${instvardir}/info'
234 infopath=''
235 install_pp=''
236 lispdir='${datadir}/${instvardir}/lisp'
237 moduledir='${datadir}/${instvardir}/${configuration}/modules'
238 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
239 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
240 pkgdir='${datadir}/${instvardir}/lisp'
241 package_path=''
242 etcdir='${datadir}/${instvardir}/etc'
243 lockdir='${statedir}/${inststaticdir}/lock'
244 archlibdir='${datadir}/${instvardir}/${configuration}'
245 docdir='${archlibdir}'
246 with_prefix='yes'
247 with_site_lisp='no'
248 with_site_modules='yes'
249 with_menubars=''
250 with_scrollbars=''
251 with_widgets=''
252 with_dialogs=''
253 with_file_coding=''
254 cpp='' cppflags='' libs='' ldflags=''
255 dynamic=''
256 with_x11=''
257 with_msw=''
258 rel_alloc='default'
259 with_system_malloc='default'
260 with_dlmalloc='default'
261 native_sound_lib=''
262 use_assertions="yes"
263 with_toolbars=""
264 with_tty=""
265 use_union_type="no"
266 with_dnet=""
267 pdump="no"
268 with_dragndrop="no"
269
270
271
272
273 arguments="$@"
274
275 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
276 quoted_arguments=
277 for i in "$@"; do
278    case "$i" in
279    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
280    | --no-cr | --no-c) ;;
281    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
282    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
283    *)
284    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
285    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
286    esac
287 done
288
289 while test $# != 0; do
290   arg="$1"; shift
291   case "$arg" in
292     --no-create|--no-recursion) ;;
293         -* )
294             case "$arg" in
295         -*=*)
296           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
297           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
298           valomitted=no
299         ;;
300                                                                           -*)
301                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
302           val="yes" valomitted=yes
303         ;;
304       esac
305
306             optname="$opt"
307       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
308
309             case "${valomitted}-${opt}" in yes-without_* )
310         opt=`echo $opt | sed 's/without/with/'`
311         valomitted="no" val="no" ;;
312       esac
313
314             case "$opt" in
315
316         with_site_lisp  | \
317         with_prefix     | \
318         with_site_modules | \
319         with_x          | \
320         with_x11        | \
321         with_msw        | \
322         with_gcc        | \
323         dynamic         | \
324         with_ncurses    | \
325         with_dnet       | \
326         with_socks      | \
327         with_dragndrop  | \
328         with_cde        | \
329         with_offix      | \
330         with_gpm        | \
331         with_xpm        | \
332         with_xface      | \
333         with_gif        | \
334         with_jpeg       | \
335         with_png        | \
336         with_tiff       | \
337         with_wmcommand  | \
338         with_xmu        | \
339         with_purify     | \
340         with_quantify   | \
341         with_toolbars   | \
342         with_tty        | \
343         with_xfs        | \
344         with_i18n3      | \
345         with_mule       | \
346         with_utf_2000   | \
347         with_text_coding| \
348         with_file_coding| \
349         with_canna      | \
350         with_wnn        | \
351         with_wnn6       | \
352         with_workshop   | \
353         with_sparcworks | \
354         with_tooltalk   | \
355         with_ldap       | \
356         with_postgresql | \
357         with_pop        | \
358         with_kerberos   | \
359         with_hesiod     | \
360         with_dnet       | \
361         with_infodock   | \
362         external_widget | \
363         verbose         | \
364         extra_verbose   | \
365         usage_tracking  | \
366         use_union_type  | \
367         pdump           | \
368         debug           | \
369         use_assertions  | \
370         memory_usage_stats | \
371         with_clash_detection | \
372         with_modules | \
373         quick_build )
374                   case "$val" in
375             y | ye | yes )      val=yes ;;
376             n | no )            val=no  ;;
377             * ) (echo "$progname: Usage error:"
378 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
379 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
380           esac
381           eval "$opt=\"$val\"" ;;
382
383
384                         srcdir          | \
385         compiler        | \
386         cflags          | \
387         cpp             | \
388         cppflags        | \
389         libs            | \
390         ldflags         | \
391         cache_file      | \
392         native_sound_lib| \
393         site_lisp       | \
394         x_includes      | \
395         x_libraries     | \
396         site_includes   | \
397         site_libraries  | \
398         site_prefixes   | \
399         site_runtime_libraries )
400                   if test "$valomitted" = "yes" ; then
401                     if test "$#" = 0 ; then
402               (echo "$progname: Usage error:"
403 echo " " "The \`--$optname' option requires a value."
404 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
405             fi
406             val="$1"; shift
407           fi
408           eval "$opt=\"$val\""
409         ;;
410
411                 rel_alloc | \
412         with_dlmalloc | \
413         with_debug_malloc  | use_debug_malloc | \
414         with_system_malloc | use_system_malloc )
415           case "$val" in
416             y | ye | yes )      val=yes ;;
417             n | no )            val=no  ;;
418             d | de | def | defa | defau | defaul | default ) val=default ;;
419             * ) (echo "$progname: Usage error:"
420 echo " " "The \`--$optname' option requires one of these values:
421   \`yes', \`no', or \`default'."
422 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
423           esac
424           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
425           eval "$opt=\"$val\""
426         ;;
427
428                 "with_database" )
429           with_database_berkdb=no
430           with_database_dbm=no
431           with_database_gdbm=no
432           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
433             case "$x" in
434               no ) ;;
435               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
436               d | db | dbm )                               with_database_dbm=yes    ;;
437               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
438               * ) (echo "$progname: Usage error:"
439 echo " " "The \`--$optname' option value
440   must be either \`no' or a comma-separated list
441   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
442 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
443             esac
444           done
445           if test "$with_database_dbm"  = "yes" -a \
446                   "$with_database_gdbm" = "yes"; then
447           (echo "$progname: Usage error:"
448 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
449   with the \`--$optname' option."
450 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
451           fi
452         ;;
453
454                 "with_sound" )
455                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
456             case "$x" in
457                       n | no | non | none ) new_sdefault=no ;;
458               a | al | all | both ) new_sdefault=yes ;;
459
460               native )       with_native_sound=yes ;;
461               nonative )     with_native_sound=no ;;
462
463               nas )          with_nas_sound=yes ;;
464               nonas )        with_nas_sound=no ;;
465
466               esd )          with_esd_sound=yes ;;
467               noesd )        with_esd_sound=no ;;
468
469               * ) bogus_sound=yes ;;
470             esac
471             if test "$bogus_sound" -o \
472                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
473                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
474                 (echo "$progname: Usage error:"
475 echo " " "Valid types for the \`--$optname' option are:
476   $types.
477 The default is to autodetect all sound support."
478 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
479             elif test -n "$new_sdefault" ; then
480                 with_native_sound=$new_sdefault
481                 with_nas_sound=$new_sdefault
482                 with_esd_sound=$new_sdefault
483                 new_sdefault=   # reset this
484             fi
485             sound_notfirst=true
486           done
487         ;;
488
489                         "with_athena" )
490           case "$val" in
491             xa | xaw )                    val=xaw    ;;
492             3 | 3d | xaw3d )              val=3d     ;;
493                         ne | nex | next | naxtaw)     val=next   ;;
494                         9 | 95 | xaw95 )              val=95     ;;
495             xp | xpm | xawxpm )           val=xpm    ;;
496             * ) (echo "$progname: Usage error:"
497 echo " " "The \`--$optname' option must have one of these values:
498   \`xaw', \`3d', \`next', \`95', or \`xpm'."
499 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
500           esac
501           eval "$opt=\"$val\""
502         ;;
503
504                 "with_xim" )
505           case "$val" in
506             y | ye | yes )                val=yes   ;;
507             n | no | non | none )         val=no    ;;
508             x | xl | xli | xlib )         val=xlib  ;;
509             m | mo | mot | moti | motif ) val=motif ;;
510             * ) (echo "$progname: Usage error:"
511 echo " " "The \`--$optname' option must have one of these values:
512   \`motif', \`xlib', \`yes', or \`no'."
513 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
514           esac
515           eval "$opt=\"$val\""
516         ;;
517
518                 "mail_locking" )
519           case "$val" in
520             lockf )     val=lockf ;;
521             flock )     val=flock ;;
522             file | dot ) val=file  ;;
523             locking )   val=locking  ;;
524             * ) (echo "$progname: Usage error:"
525 echo " " "The \`--$optname' option must have one of these values:
526   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
527 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
528           esac
529           eval "$opt=\"$val\""
530         ;;
531
532                 "error_checking" )
533                           
534           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
535             case "$x" in
536                       n | no | non | none ) new_default=no ;;
537               a | al | all )        new_default=yes ;;
538
539               extents )       error_check_extents=yes ;;
540               noextents )     error_check_extents=no ;;
541
542               typecheck )     error_check_typecheck=yes ;;
543               notypecheck )   error_check_typecheck=no ;;
544
545               bufpos )        error_check_bufpos=yes ;;
546               nobufpos )      error_check_bufpos=no ;;
547
548               gc )            error_check_gc=yes ;;
549               nogc )          error_check_gc=no ;;
550
551               malloc )        error_check_malloc=yes ;;
552               nomalloc )      error_check_malloc=no ;;
553
554               byte_code )     error_check_byte_code=yes ;;
555               nobyte_code )   error_check_byte_code=no ;;
556
557               glyphs )     error_check_glyphs=yes ;;
558               noglyphs )   error_check_glyphs=no ;;
559
560               * ) bogus_error_check=yes ;;
561             esac
562             if test "$bogus_error_check" -o \
563                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
564                 if test "$error_check_default" = yes ; then
565                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', \`noglyphs' and \`nobyte-code'."
566                 else
567                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', \`glyphs' and \`byte-code'."
568                 fi
569                 (echo "$progname: Usage error:"
570 echo " " "Valid types for the \`--$optname' option are:
571   $types."
572 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
573             elif test -n "$new_default" ; then
574                 error_check_extents=$new_default
575                 error_check_typecheck=$new_default
576                 error_check_bufpos=$new_default
577                 error_check_gc=$new_default
578                 error_check_malloc=$new_default
579                 error_check_byte_code=$new_default
580                 error_check_glyphs=$new_default
581                 new_default=    # reset this
582             fi
583             echeck_notfirst=true
584           done
585         ;;
586
587                                 
588                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
589         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
590         archlibdir | docdir | package_path )
591                    if test "$valomitted" = "yes"; then
592              if test "$#" = 0; then
593                  (echo "$progname: Usage error:"
594 echo " " "The \`--$optname' option requires a value."
595 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
596              fi
597              val="$1"; shift
598            fi
599            eval "$opt=\"$val\""
600
601                            case "$opt" in
602                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining EXEC_PREFIX_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define EXEC_PREFIX_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining LISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define LISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining SITELISPDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define SITELISPDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining MODULEDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define MODULEDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining ETCDIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define ETCDIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFODIR_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFODIR_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining INFOPATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define INFOPATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
659     Defining PACKAGE_PATH_USER_DEFINED
660 EOF
661 cat >> confdefs.h <<\EOF
662 #define PACKAGE_PATH_USER_DEFINED 1
663 EOF
664 }
665  ;;
666              datadir )
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining INFODIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define INFODIR_USER_DEFINED 1
672 EOF
673 }
674
675                 { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LISPDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LISPDIR_USER_DEFINED 1
680 EOF
681 }
682
683             { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining MODULEDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define MODULEDIR_USER_DEFINED 1
688 EOF
689 }
690
691                 { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ETCDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ETCDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining LOCKDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define LOCKDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining DOCDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define DOCDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
716     Defining ARCHLIBDIR_USER_DEFINED
717 EOF
718 cat >> confdefs.h <<\EOF
719 #define ARCHLIBDIR_USER_DEFINED 1
720 EOF
721 }
722  ;;
723            esac
724         ;;
725
726                 "no_create" ) ;;
727
728                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
729
730                 "with_menubars"   | \
731         "with_scrollbars" | \
732         "with_dialogs" | \
733         "with_widgets" )
734           case "$val" in
735             l | lu | luc | luci | lucid )               val=lucid  ;;
736             m | mo | mot | moti | motif )               val=motif  ;;
737             a | at | ath | athe | athen | athena )      val=athena ;;
738             n | no | non | none )                       val=no ;;
739             * ) (echo "$progname: Usage error:"
740 echo " " "The \`--$optname' option must have one of these values:
741   \`lucid', \`motif', \`athena', or \`no'."
742 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
743           esac
744           eval "$opt=\"$val\""
745         ;;
746
747                 "use_minimal_tagbits" | \
748         "use_indexed_lrecord_implementation" | \
749         "run_in_place"  | \
750         "const_is_losing" | \
751         "with_gnu_make" )
752           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
753         ;;
754
755                 * ) (echo "$progname: Usage error:"
756 echo " " "Unrecognized option: $arg"
757 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
758
759       esac
760     ;;
761
762         *-*-*) configuration="$arg" ;;
763
764         *) (echo "$progname: Usage error:"
765 echo " " "Unrecognized argument: $arg"
766 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
767
768   esac
769 done
770
771
772 test -n "$cpp"      && CPP="$cpp"
773 test -n "$cppflags" && CPPFLAGS="$cppflags"
774 test -n "$libs"     && LIBS="$libs"
775 test -n "$ldflags"  && LDFLAGS="$ldflags"
776
777 eval set x "$quoted_arguments"; shift
778
779 test "$extra_verbose" = "yes" && verbose=yes
780
781 test -n "$with_x" && with_x11="$with_x"
782
783 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
784   test "$with_system_malloc" = "default" && with_system_malloc=yes
785 fi
786
787
788
789 if test "$with_cde $with_tooltalk" = "yes no"; then
790   (echo "$progname: Usage error:"
791 echo " " "--with-cde requires --with-tooltalk"
792 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
793 elif test "$with_tooltalk" = "no" ; then with_cde=no
794 elif test "$with_cde" = "yes"; then with_tooltalk=yes
795 fi
796
797
798 case "$srcdir" in
799
800     "" )
801     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
802       if test -f "$dir/src/lisp.h" -a \
803               -f "$dir/lisp/version.el" ; then
804         srcdir="$dir"
805         break
806       fi
807     done
808     if test -z "$srcdir" ; then
809       (echo "$progname: Usage error:"
810 echo " " "Neither the current directory nor its parent seem to
811   contain the XEmacs sources.  If you do not want to build XEmacs in its
812   source tree, you should run \`$progname' in the directory in which
813   you wish to build XEmacs, using the \`--srcdir' option to say where the
814   sources may be found."
815 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
816     fi
817   ;;
818
819     * )
820     if test ! -f "$srcdir/src/lisp.h" -o \
821             ! -f "$srcdir/lisp/version.el" ; then
822       (echo "$progname: Usage error:"
823 echo " " "The directory specified with the \`--srcdir' option,
824   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
825   either run the \`$progname' script at the top of the XEmacs source
826   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
827 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
828     fi
829   ;;
830 esac
831
832 if test -z "$configuration"; then
833     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
834   if test -z "$configuration"; then
835     (echo "$progname: Usage error:"
836 echo " " "XEmacs has not been ported to this host type.
837 Try explicitly specifying the CONFIGURATION when rerunning configure."
838 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
839   fi
840 fi
841
842 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
843 echo "configure:844: checking whether ln -s works" >&5
844
845 rm -f conftestdata
846 if ln -s X conftestdata 2>/dev/null
847 then
848   rm -f conftestdata
849   ac_cv_prog_LN_S="ln -s"
850 else
851   ac_cv_prog_LN_S=ln
852 fi
853 LN_S="$ac_cv_prog_LN_S"
854 if test "$ac_cv_prog_LN_S" = "ln -s"; then
855   echo "$ac_t""yes" 1>&6
856 else
857   echo "$ac_t""no" 1>&6
858 fi
859
860
861 for dir in lisp etc man info tests; do
862   if test ! -d "$dir" ; then
863     echo Making symbolic link to "$srcdir/$dir"
864     ${LN_S} "$srcdir/$dir" "$dir"
865   fi
866 done
867
868
869 absolute_pwd="`pwd`";
870 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
871 then blddir="$PWD"
872 else blddir="$absolute_pwd"; if test -d "/net"; then
873   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
874   blddir=`echo "$blddir" | \
875    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
876 fi
877 fi
878
879
880 case "$srcdir" in
881   /* ) ;;
882   .  ) srcdir="$blddir" ;;
883   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
884   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
885   srcdir=`echo "$srcdir" | \
886    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
887 fi ;;
888 esac
889
890 if test `pwd` != `sh -c cd $srcdir && pwd`  \
891    && test -f "$srcdir/src/config.h"; then
892   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
893    echo "   as a build directory right now; it has been configured in its own"
894    echo "   right.  To configure in another directory as well, you MUST"
895    echo "   use GNU make.  If you do not have GNU make, then you must"
896    echo "   now do \`make distclean' in $srcdir,"
897    echo "   and then run $progname again.") >&2
898   extrasub='/^VPATH[     ]*=/c\
899 vpath %.c $(srcdir)\
900 vpath %.h $(srcdir)\
901 vpath %.y $(srcdir)\
902 vpath %.l $(srcdir)\
903 vpath %.s $(srcdir)\
904 vpath %.in $(srcdir)'
905 fi
906
907 . "$srcdir/version.sh" || exit 1;
908 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
909 : "${extra_verbose=$beta}"
910 version="${emacs_major_version}.${emacs_minor_version}"
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MAJOR_VERSION = $emacs_major_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MAJOR_VERSION $emacs_major_version
916 EOF
917 }
918
919 { test "$extra_verbose" = "yes" && cat << EOF
920     Defining EMACS_MINOR_VERSION = $emacs_minor_version
921 EOF
922 cat >> confdefs.h <<EOF
923 #define EMACS_MINOR_VERSION $emacs_minor_version
924 EOF
925 }
926
927 if test -n "$emacs_beta_version" ; then
928   if test "$beta" = "yes"; then
929         version="${version}-b${emacs_beta_version}"
930         { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_BETA_VERSION = $emacs_beta_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_BETA_VERSION $emacs_beta_version
935 EOF
936 }
937
938   else
939         version="${version}.${emacs_beta_version}"
940         { test "$extra_verbose" = "yes" && cat << EOF
941     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
942 EOF
943 cat >> confdefs.h <<EOF
944 #define EMACS_PATCH_LEVEL $emacs_beta_version
945 EOF
946 }
947
948   fi
949 fi
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining XEMACS_CODENAME = "$xemacs_codename"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define XEMACS_CODENAME "$xemacs_codename"
955 EOF
956 }
957
958 { test "$extra_verbose" = "yes" && cat << EOF
959     Defining EMACS_VERSION = "$version"
960 EOF
961 cat >> confdefs.h <<EOF
962 #define EMACS_VERSION "$version"
963 EOF
964 }
965
966
967 if test "$with_infodock" = "yes"; then
968   if test ! -f ../../ID-INSTALL; then
969     echo "Cannot build InfoDock without InfoDock sources"
970     with_infodock=no
971   fi
972 fi
973
974 if test "$with_infodock" = "yes"; then
975       { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MAJOR_VERSION $infodock_major_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_MINOR_VERSION $infodock_minor_version
988 EOF
989 }
990
991   { test "$extra_verbose" = "yes" && cat << EOF
992     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
993 EOF
994 cat >> confdefs.h <<EOF
995 #define INFODOCK_BUILD_VERSION $infodock_build_version
996 EOF
997 }
998
999   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
1000   PROGNAME=infodock
1001   CPPFLAGS="$CPPFLAGS -DINFODOCK"
1002 else
1003   PROGNAME=xemacs
1004 fi
1005
1006 { test "$extra_verbose" = "yes" && cat << EOF
1007     Defining EMACS_PROGNAME = "$PROGNAME"
1008 EOF
1009 cat >> confdefs.h <<EOF
1010 #define EMACS_PROGNAME "$PROGNAME"
1011 EOF
1012 }
1013
1014
1015 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1016 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1017     Defining ERROR_CHECK_EXTENTS
1018 EOF
1019 cat >> confdefs.h <<\EOF
1020 #define ERROR_CHECK_EXTENTS 1
1021 EOF
1022 }
1023
1024 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1025     Defining ERROR_CHECK_TYPECHECK
1026 EOF
1027 cat >> confdefs.h <<\EOF
1028 #define ERROR_CHECK_TYPECHECK 1
1029 EOF
1030 }
1031
1032 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1033     Defining ERROR_CHECK_BUFPOS
1034 EOF
1035 cat >> confdefs.h <<\EOF
1036 #define ERROR_CHECK_BUFPOS 1
1037 EOF
1038 }
1039
1040 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1041     Defining ERROR_CHECK_GC
1042 EOF
1043 cat >> confdefs.h <<\EOF
1044 #define ERROR_CHECK_GC 1
1045 EOF
1046 }
1047
1048 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1049     Defining ERROR_CHECK_MALLOC
1050 EOF
1051 cat >> confdefs.h <<\EOF
1052 #define ERROR_CHECK_MALLOC 1
1053 EOF
1054 }
1055
1056 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1057     Defining ERROR_CHECK_BYTE_CODE
1058 EOF
1059 cat >> confdefs.h <<\EOF
1060 #define ERROR_CHECK_BYTE_CODE 1
1061 EOF
1062 }
1063
1064 test "${error_check_glyphs=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining ERROR_CHECK_GLYPHS
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define ERROR_CHECK_GLYPHS 1
1069 EOF
1070 }
1071
1072 if test "${debug:=$beta}" = "yes"; then
1073   use_assertions=yes memory_usage_stats=yes
1074   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1075    echo "    xemacs will be linked with \"debug.o\""
1076  fi
1077   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1078    echo "    xemacs will be linked with \"tests.o\""
1079  fi
1080   { test "$extra_verbose" = "yes" && cat << \EOF
1081     Defining DEBUG_XEMACS
1082 EOF
1083 cat >> confdefs.h <<\EOF
1084 #define DEBUG_XEMACS 1
1085 EOF
1086 }
1087
1088 fi
1089 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1090     Defining USE_ASSERTIONS
1091 EOF
1092 cat >> confdefs.h <<\EOF
1093 #define USE_ASSERTIONS 1
1094 EOF
1095 }
1096
1097 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1098     Defining MEMORY_USAGE_STATS
1099 EOF
1100 cat >> confdefs.h <<\EOF
1101 #define MEMORY_USAGE_STATS 1
1102 EOF
1103 }
1104
1105
1106
1107 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1108 echo "configure:1109: checking "host system type"" >&5
1109 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1110 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1111 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1112 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1113 echo "$ac_t""$configuration" 1>&6
1114
1115
1116
1117
1118
1119 machine='' opsys=''
1120
1121 case "$canonical" in
1122   sparc-*-*        ) machine=sparc ;;
1123   alpha*-*-*       ) machine=alpha ;;
1124   vax-*-*          ) machine=vax ;;
1125   mips-dec-*       ) machine=pmax ;;
1126   mips-sgi-irix6*  ) machine=iris6d ;;
1127   mips-sgi-*       ) machine=iris4d ;;
1128   mips*-linux      ) machine=mips ;;
1129   romp-ibm-*       ) machine=ibmrt ;;
1130   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1131   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1132   powerpc*-*       ) machine=powerpc ;;
1133   hppa-*-*         ) machine=hp800 ;;
1134   m88k-dg-*        ) machine=aviion ;;
1135   m68*-sony-*      ) machine=news ;;
1136   mips-sony-*      ) machine=news-risc ;;
1137   clipper-*        ) machine=clipper ;;
1138   arm*             ) machine=arm ;;
1139   ns32k-*          ) machine=ns32000 ;;
1140 esac
1141
1142 case "$canonical" in
1143   *-*-linux*    ) opsys=linux ;;
1144   *-*-netbsd*   ) opsys=netbsd ;;
1145   *-*-openbsd*  ) opsys=openbsd ;;
1146   *-*-nextstep* ) opsys=nextstep ;;
1147   *-*-vms       ) opsys=vms ;;
1148
1149     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1150   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1151   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1152   *-dec-osf3*                ) opsys=decosf3-1 ;;
1153   *-dec-osf4*                ) opsys=decosf4-0 ;;
1154
1155     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1156   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1157   *-*-ultrix* )         opsys=ultrix4-3 ;;
1158
1159     *-*-aix3.1*  ) opsys=aix3-1 ;;
1160   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1161   *-*-aix3*    ) opsys=aix3-2   ;;
1162   *-*-aix4.0*  ) opsys=aix4     ;;
1163   *-*-aix4.1*  ) opsys=aix4-1   ;;
1164   *-*-aix4*    ) opsys=aix4-2   ;;
1165
1166     *-gnu* )                    opsys=gnu    ;;
1167   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1168   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1169   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1170   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1171   *-*-aos*   )                  opsys=bsd4-3 ;;
1172   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1173   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1174   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1175   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1176   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1177   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1178         if test -z "$NON_GNU_CPP" ; then
1179           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1180             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1181           done
1182         fi
1183         opsys=usg5-4-2 ;;
1184     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1185     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1186 esac
1187
1188 case "$canonical" in
1189
1190     *-*-netbsd* )
1191     case "$canonical" in
1192       i[3-9]86-*-netbsd*) machine=intel386 ;;
1193       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1194                                             machine=hp9000s300 ;;
1195       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1196       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1197     esac
1198   ;;
1199
1200     *-*-openbsd* )
1201     case "${canonical}" in
1202       i386-*-openbsd*)          machine=intel386 ;;
1203       m68k-*-openbsd*)          machine=hp9000s300 ;;
1204       mipsel-*-openbsd*)        machine=pmax ;;
1205      esac
1206    ;;
1207
1208     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1209   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1210
1211     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1212   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1213
1214     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1215
1216     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1217
1218     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1219
1220     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1221
1222     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1223
1224     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1225   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1226   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1227
1228   
1229     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1230
1231     *-convex-bsd* | *-convex-convexos* )
1232     machine=convex opsys=bsd4-3
1233     NON_GNU_CPP="cc -E -P"
1234   ;;
1235
1236     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1237
1238     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1239   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1240   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1241   m88k-dg-dgux*                           ) opsys=dgux     ;;
1242
1243     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1244   m88k-motorola-sysv4* )
1245                     machine=delta88k opsys=usg5-4-2
1246   ;;
1247   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1248
1249     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1250   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1251
1252     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1253
1254     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1255   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1256   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1257
1258       m88k-harris-cxux* )
1259         case "`uname -r`" in
1260        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1261        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1262     esac
1263     NON_GNU_CPP="/lib/cpp"
1264   ;;
1265     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1266     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1267
1268     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1269
1270     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1271
1272     *-hp-hpux* )
1273         case "$canonical" in
1274       m68*  ) machine=hp9000s300 ;;
1275       hppa* ) machine=hp800      ;;
1276     esac
1277
1278     case "$canonical" in
1279       *-hp-hpux7*  )  opsys=hpux   ;;
1280       *-hp-hpux8*  )  opsys=hpux8  ;;
1281       *-hp-hpux9*  )  opsys=hpux9  ;;
1282       *-hp-hpux10* )  opsys=hpux10 ;;
1283       *-hp-hpux11* )  opsys=hpux11 ;;
1284       *            )  opsys=hpux   ;;
1285     esac
1286
1287         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1288    echo "    xemacs will be linked with \"strcat.o\""
1289  fi ;; esac
1290
1291     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1292         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1293     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1294
1295     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1296   ;;
1297
1298     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1299   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1300
1301     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1302   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1303   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1304   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1305   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1306   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1307
1308     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1309   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1310
1311     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1312
1313     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1314
1315     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1316
1317     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1318
1319       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1320
1321     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1322
1323     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1324
1325     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1326
1327     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1328
1329         mips-mips-usg* ) machine=mips4 ;;
1330   mips-mips-riscos4 )
1331     machine=mips4
1332     NON_GNU_CC="cc -systype bsd43"
1333     NON_GNU_CPP="cc -systype bsd43 -E"
1334     case "$canonical" in
1335       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1336       mips-mips-riscos5* ) opsys=riscos5 ;;
1337     esac
1338   ;;
1339   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1340   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1341
1342     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1343
1344     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1345
1346     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1347   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1348
1349     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1350
1351     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1352
1353     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1354
1355     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1356
1357     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1358   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1359
1360     mips-siemens-sysv* | mips-sni-sysv*)
1361     machine=mips-siemens opsys=usg5-4
1362     NON_GNU_CC=/usr/ccs/bin/cc
1363     NON_GNU_CPP=/usr/ccs/lib/cpp
1364   ;;
1365
1366     mips-nec-sysv*)
1367     machine=mips-nec
1368     NON_GNU_CC=/usr/ccs/bin/cc
1369     NON_GNU_CPP=/usr/ccs/lib/cpp
1370   ;;
1371
1372       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1373   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1374     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1375   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1376   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1377   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1378   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1379   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1380   mips-sgi-irix*      ) opsys=irix5-0 ;;
1381
1382     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1383   *-sony-news* ) opsys=newsos5 ;;
1384
1385     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1386
1387     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1388         case "$canonical" in
1389       m68*-sunos1* )             machine=sun1     ;;
1390       m68*-sunos2* )             machine=sun2     ;;
1391       m68* )                     machine=sun3     ;;
1392       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1393       i*86-*-* )                 machine=intel386 ;;
1394       rs6000* )                  machine=rs6000   ;;
1395     esac
1396
1397         case "$canonical" in *-sunos5*)
1398       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1399     esac
1400
1401                     case "$canonical" in
1402       *-sunos4* )
1403         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1404         : ;;
1405       *-solaris2* )
1406         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1407         RANLIB=':' ;;
1408     esac
1409
1410     case "$canonical" in
1411       *-solaris*          )
1412         opsys=sol2
1413         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1414         { test "$extra_verbose" = "yes" && cat << EOF
1415     Defining OS_RELEASE = $os_release
1416 EOF
1417 cat >> confdefs.h <<EOF
1418 #define OS_RELEASE $os_release
1419 EOF
1420 }
1421  ;;
1422
1423             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1424       *-sunos4.0*         ) opsys=sunos4-0      ;;
1425       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1426       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1427       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1428       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1429       *-mach*             ) opsys=mach-bsd4-3   ;;
1430       *                   ) opsys=bsd4-2        ;;
1431     esac
1432
1433     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1434
1435         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1436   ;;
1437
1438     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1439
1440     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1441   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1442
1443     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1444
1445     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1446
1447     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1448       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1449
1450     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1451
1452     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1453
1454     vax-dec-* )
1455     case "$canonical" in
1456       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1457       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1458       *-mach* )                         opsys=mach-bsd4-3 ;;
1459     esac
1460   ;;
1461
1462     ns16k-whitechapel-* ) machine=mg1 ;;
1463
1464     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1465
1466     i[3-9]86-*-* )
1467     machine=intel386
1468     case "$canonical" in
1469       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1470       *-isc2.2* )               opsys=isc2-2 ;;
1471       *-isc4.0* )               opsys=isc4-0 ;;
1472       *-isc4.* )                opsys=isc4-1
1473                                 GCC_TEST_OPTIONS=-posix
1474                                 NON_GCC_TEST_OPTIONS=-Xp
1475                                 ;;
1476       *-isc* )                  opsys=isc3-0 ;;
1477       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1478       *-esix* )                 opsys=esix ;;
1479       *-mach* )                 opsys=mach-bsd4-3 ;;
1480       *-xenix* )                opsys=xenix ;;
1481       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1482       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1483       *-bsdi4* )                opsys=bsdos4 ;;
1484       *-bsdi3* )                opsys=bsdos3 ;;
1485       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1486       *-bsdi2* )                opsys=bsdos2 ;;
1487       *-sco3.2v5* )             opsys=sco5 ;
1488                                                         if test "$dynamic" = "yes" ; then
1489                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1490         else
1491                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1492         fi ;;
1493       *-sysv5* )                opsys=sco7 ;;
1494       *-386bsd* )               opsys=386bsd ;;
1495       *-freebsd* )              opsys=freebsd ;;
1496       *-nextstep* )             opsys=nextstep ;;
1497       *-pc-cygwin* )            opsys=cygwin32 ;;
1498       *-pc-mingw* )             opsys=mingw32 ;
1499                                 test -z "$with_tty" && with_tty="no";;
1500           esac
1501   ;;
1502
1503     m68k-*-linux* ) machine=m68k opsys=linux ;;
1504
1505 esac
1506
1507 if test -z "$machine" -o -z "$opsys"; then
1508   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1509    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1510   ) >&2
1511   exit 1
1512 fi
1513
1514 if test -z "$dynamic"; then
1515   case "$opsys" in
1516     hpux* | sunos4* ) dynamic=no ;;
1517     *) dynamic=yes ;;
1518   esac
1519 fi
1520 if test "$dynamic" = "yes"; then
1521   case "$opsys" in
1522     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1523     decosf* ) ld_call_shared="-call_shared" ;;
1524   esac
1525 else   case "$opsys" in
1526     sol2 )
1527       echo "Static linking is not supported on Solaris 2."
1528       echo "Rerun configure without specifying --dynamic=no."
1529       exit 1 ;;
1530     linux   ) ld_call_shared="-Bstatic" ;;
1531     decosf* ) ld_call_shared="-non_shared" ;;
1532   esac
1533 fi
1534
1535 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1536
1537 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1538 { test "$extra_verbose" = "yes" && cat << EOF
1539     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1540 EOF
1541 cat >> confdefs.h <<EOF
1542 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1543 EOF
1544 }
1545
1546
1547 machfile="m/${machine}.h"
1548 opsysfile="s/${opsys}.h"
1549
1550
1551 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1552 if test "$with_workshop $with_tooltalk" = "yes no"; then
1553   (echo "$progname: Usage error:"
1554 echo " " "--with-workshop requires --with-tooltalk"
1555 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1556 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1557 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1558 fi
1559
1560 if test "$with_workshop" = "yes"; then
1561   { test "$extra_verbose" = "yes" && cat << \EOF
1562     Defining SUNPRO
1563 EOF
1564 cat >> confdefs.h <<\EOF
1565 #define SUNPRO 1
1566 EOF
1567 }
1568
1569   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1570    echo "    xemacs will be linked with \"sunpro.o\""
1571  fi
1572 fi
1573
1574 if test "$with_clash_detection" != "no"; then
1575   { test "$extra_verbose" = "yes" && cat << \EOF
1576     Defining CLASH_DETECTION
1577 EOF
1578 cat >> confdefs.h <<\EOF
1579 #define CLASH_DETECTION 1
1580 EOF
1581 }
1582
1583   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1584    echo "    xemacs will be linked with \"filelock.o\""
1585  fi
1586 fi
1587
1588 test -n "$compiler" && CC="$compiler"
1589 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1590 fi
1591
1592 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1593 if test "${CFLAGS-unset}" != unset
1594   then cflags_specified=yes;
1595   else cflags_specified=no;
1596 fi
1597
1598 xe_save_CFLAGS="$CFLAGS"
1599
1600 # Extract the first word of "gcc", so it can be a program name with args.
1601 set dummy gcc; ac_word=$2
1602 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1603 echo "configure:1604: checking for $ac_word" >&5
1604
1605 if test -n "$CC"; then
1606   ac_cv_prog_CC="$CC" # Let the user override the test.
1607 else
1608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1609   ac_dummy="$PATH"
1610   for ac_dir in $ac_dummy; do
1611     test -z "$ac_dir" && ac_dir=.
1612     if test -f $ac_dir/$ac_word; then
1613       ac_cv_prog_CC="gcc"
1614       break
1615     fi
1616   done
1617   IFS="$ac_save_ifs"
1618 fi
1619 CC="$ac_cv_prog_CC"
1620 if test -n "$CC"; then
1621   echo "$ac_t""$CC" 1>&6
1622 else
1623   echo "$ac_t""no" 1>&6
1624 fi
1625
1626 if test -z "$CC"; then
1627   # Extract the first word of "cc", so it can be a program name with args.
1628 set dummy cc; ac_word=$2
1629 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1630 echo "configure:1631: checking for $ac_word" >&5
1631
1632 if test -n "$CC"; then
1633   ac_cv_prog_CC="$CC" # Let the user override the test.
1634 else
1635   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1636   ac_prog_rejected=no
1637   ac_dummy="$PATH"
1638   for ac_dir in $ac_dummy; do
1639     test -z "$ac_dir" && ac_dir=.
1640     if test -f $ac_dir/$ac_word; then
1641       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1642         ac_prog_rejected=yes
1643         continue
1644       fi
1645       ac_cv_prog_CC="cc"
1646       break
1647     fi
1648   done
1649   IFS="$ac_save_ifs"
1650 if test $ac_prog_rejected = yes; then
1651   # We found a bogon in the path, so make sure we never use it.
1652   set dummy $ac_cv_prog_CC
1653   shift
1654   if test $# -gt 0; then
1655     # We chose a different compiler from the bogus one.
1656     # However, it has the same basename, so the bogon will be chosen
1657     # first if we set CC to just the basename; use the full file name.
1658     shift
1659     set dummy "$ac_dir/$ac_word" "$@"
1660     shift
1661     ac_cv_prog_CC="$@"
1662   fi
1663 fi
1664 fi
1665 CC="$ac_cv_prog_CC"
1666 if test -n "$CC"; then
1667   echo "$ac_t""$CC" 1>&6
1668 else
1669   echo "$ac_t""no" 1>&6
1670 fi
1671
1672   if test -z "$CC"; then
1673     case "`uname -s`" in
1674     *win32* | *WIN32*)
1675       # Extract the first word of "cl", so it can be a program name with args.
1676 set dummy cl; ac_word=$2
1677 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1678 echo "configure:1679: checking for $ac_word" >&5
1679
1680 if test -n "$CC"; then
1681   ac_cv_prog_CC="$CC" # Let the user override the test.
1682 else
1683   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1684   ac_dummy="$PATH"
1685   for ac_dir in $ac_dummy; do
1686     test -z "$ac_dir" && ac_dir=.
1687     if test -f $ac_dir/$ac_word; then
1688       ac_cv_prog_CC="cl"
1689       break
1690     fi
1691   done
1692   IFS="$ac_save_ifs"
1693 fi
1694 CC="$ac_cv_prog_CC"
1695 if test -n "$CC"; then
1696   echo "$ac_t""$CC" 1>&6
1697 else
1698   echo "$ac_t""no" 1>&6
1699 fi
1700  ;;
1701     esac
1702   fi
1703   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1704 fi
1705
1706 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1707 echo "configure:1708: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1708
1709 ac_ext=c
1710 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1711 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1712 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1713 ac_cpp='$CPP '"$xe_cppflags"
1714 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1715 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1716 cross_compiling=no
1717
1718 cat > conftest.$ac_ext << EOF
1719
1720 #line 1721 "configure"
1721 #include "confdefs.h"
1722
1723 main(){return(0);}
1724 EOF
1725 if { (eval echo configure:1726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1726   ac_cv_prog_cc_works=yes
1727   # If we can't run a trivial program, we are probably using a cross compiler.
1728   if (./conftest; exit) 2>/dev/null; then
1729     ac_cv_prog_cc_cross=no
1730   else
1731     ac_cv_prog_cc_cross=yes
1732   fi
1733 else
1734   echo "configure: failed program was:" >&5
1735   cat conftest.$ac_ext >&5
1736   ac_cv_prog_cc_works=no
1737 fi
1738 rm -fr conftest*
1739 ac_ext=c
1740 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1741 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1742 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1743 ac_cpp='$CPP '"$xe_cppflags"
1744 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1745 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1746 cross_compiling=no
1747
1748 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1749 if test $ac_cv_prog_cc_works = no; then
1750   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1751 fi
1752 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1753 echo "configure:1754: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1754 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1755 cross_compiling=$ac_cv_prog_cc_cross
1756
1757 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1758 echo "configure:1759: checking whether we are using GNU C" >&5
1759
1760 cat > conftest.c <<EOF
1761 #ifdef __GNUC__
1762   yes;
1763 #endif
1764 EOF
1765 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1766: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1766   ac_cv_prog_gcc=yes
1767 else
1768   ac_cv_prog_gcc=no
1769 fi
1770
1771 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1772
1773 if test $ac_cv_prog_gcc = yes; then
1774   GCC=yes
1775 else
1776   GCC=
1777 fi
1778
1779 ac_test_CFLAGS="${CFLAGS+set}"
1780 ac_save_CFLAGS="$CFLAGS"
1781 CFLAGS=
1782 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1783 echo "configure:1784: checking whether ${CC-cc} accepts -g" >&5
1784
1785 echo 'void f(){}' > conftest.c
1786 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1787   ac_cv_prog_cc_g=yes
1788 else
1789   ac_cv_prog_cc_g=no
1790 fi
1791 rm -f conftest*
1792
1793
1794 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1795 if test "$ac_test_CFLAGS" = set; then
1796   CFLAGS="$ac_save_CFLAGS"
1797 elif test $ac_cv_prog_cc_g = yes; then
1798   if test "$GCC" = yes; then
1799     CFLAGS="-g -O2"
1800   else
1801     CFLAGS="-g"
1802   fi
1803 else
1804   if test "$GCC" = yes; then
1805     CFLAGS="-O2"
1806   else
1807     CFLAGS=
1808   fi
1809 fi
1810  
1811 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1812   CC=${NON_GNU_CC-cc}
1813   # Extract the first word of "gcc", so it can be a program name with args.
1814 set dummy gcc; ac_word=$2
1815 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1816 echo "configure:1817: checking for $ac_word" >&5
1817
1818 if test -n "$CC"; then
1819   ac_cv_prog_CC="$CC" # Let the user override the test.
1820 else
1821   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1822   ac_dummy="$PATH"
1823   for ac_dir in $ac_dummy; do
1824     test -z "$ac_dir" && ac_dir=.
1825     if test -f $ac_dir/$ac_word; then
1826       ac_cv_prog_CC="gcc"
1827       break
1828     fi
1829   done
1830   IFS="$ac_save_ifs"
1831 fi
1832 CC="$ac_cv_prog_CC"
1833 if test -n "$CC"; then
1834   echo "$ac_t""$CC" 1>&6
1835 else
1836   echo "$ac_t""no" 1>&6
1837 fi
1838
1839 if test -z "$CC"; then
1840   # Extract the first word of "cc", so it can be a program name with args.
1841 set dummy cc; ac_word=$2
1842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1843 echo "configure:1844: checking for $ac_word" >&5
1844
1845 if test -n "$CC"; then
1846   ac_cv_prog_CC="$CC" # Let the user override the test.
1847 else
1848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1849   ac_prog_rejected=no
1850   ac_dummy="$PATH"
1851   for ac_dir in $ac_dummy; do
1852     test -z "$ac_dir" && ac_dir=.
1853     if test -f $ac_dir/$ac_word; then
1854       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1855         ac_prog_rejected=yes
1856         continue
1857       fi
1858       ac_cv_prog_CC="cc"
1859       break
1860     fi
1861   done
1862   IFS="$ac_save_ifs"
1863 if test $ac_prog_rejected = yes; then
1864   # We found a bogon in the path, so make sure we never use it.
1865   set dummy $ac_cv_prog_CC
1866   shift
1867   if test $# -gt 0; then
1868     # We chose a different compiler from the bogus one.
1869     # However, it has the same basename, so the bogon will be chosen
1870     # first if we set CC to just the basename; use the full file name.
1871     shift
1872     set dummy "$ac_dir/$ac_word" "$@"
1873     shift
1874     ac_cv_prog_CC="$@"
1875   fi
1876 fi
1877 fi
1878 CC="$ac_cv_prog_CC"
1879 if test -n "$CC"; then
1880   echo "$ac_t""$CC" 1>&6
1881 else
1882   echo "$ac_t""no" 1>&6
1883 fi
1884
1885   if test -z "$CC"; then
1886     case "`uname -s`" in
1887     *win32* | *WIN32*)
1888       # Extract the first word of "cl", so it can be a program name with args.
1889 set dummy cl; ac_word=$2
1890 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1891 echo "configure:1892: checking for $ac_word" >&5
1892
1893 if test -n "$CC"; then
1894   ac_cv_prog_CC="$CC" # Let the user override the test.
1895 else
1896   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1897   ac_dummy="$PATH"
1898   for ac_dir in $ac_dummy; do
1899     test -z "$ac_dir" && ac_dir=.
1900     if test -f $ac_dir/$ac_word; then
1901       ac_cv_prog_CC="cl"
1902       break
1903     fi
1904   done
1905   IFS="$ac_save_ifs"
1906 fi
1907 CC="$ac_cv_prog_CC"
1908 if test -n "$CC"; then
1909   echo "$ac_t""$CC" 1>&6
1910 else
1911   echo "$ac_t""no" 1>&6
1912 fi
1913  ;;
1914     esac
1915   fi
1916   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1917 fi
1918
1919 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1920 echo "configure:1921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1921
1922 ac_ext=c
1923 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1924 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1925 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1926 ac_cpp='$CPP '"$xe_cppflags"
1927 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1928 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1929 cross_compiling=no
1930
1931 cat > conftest.$ac_ext << EOF
1932
1933 #line 1934 "configure"
1934 #include "confdefs.h"
1935
1936 main(){return(0);}
1937 EOF
1938 if { (eval echo configure:1939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1939   ac_cv_prog_cc_works=yes
1940   # If we can't run a trivial program, we are probably using a cross compiler.
1941   if (./conftest; exit) 2>/dev/null; then
1942     ac_cv_prog_cc_cross=no
1943   else
1944     ac_cv_prog_cc_cross=yes
1945   fi
1946 else
1947   echo "configure: failed program was:" >&5
1948   cat conftest.$ac_ext >&5
1949   ac_cv_prog_cc_works=no
1950 fi
1951 rm -fr conftest*
1952 ac_ext=c
1953 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1954 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1955 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1956 ac_cpp='$CPP '"$xe_cppflags"
1957 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1958 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1959 cross_compiling=no
1960
1961 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1962 if test $ac_cv_prog_cc_works = no; then
1963   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1964 fi
1965 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1966 echo "configure:1967: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1967 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1968 cross_compiling=$ac_cv_prog_cc_cross
1969
1970 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1971 echo "configure:1972: checking whether we are using GNU C" >&5
1972
1973 cat > conftest.c <<EOF
1974 #ifdef __GNUC__
1975   yes;
1976 #endif
1977 EOF
1978 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1979: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1979   ac_cv_prog_gcc=yes
1980 else
1981   ac_cv_prog_gcc=no
1982 fi
1983
1984 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1985
1986 if test $ac_cv_prog_gcc = yes; then
1987   GCC=yes
1988 else
1989   GCC=
1990 fi
1991
1992 ac_test_CFLAGS="${CFLAGS+set}"
1993 ac_save_CFLAGS="$CFLAGS"
1994 CFLAGS=
1995 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1996 echo "configure:1997: checking whether ${CC-cc} accepts -g" >&5
1997
1998 echo 'void f(){}' > conftest.c
1999 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2000   ac_cv_prog_cc_g=yes
2001 else
2002   ac_cv_prog_cc_g=no
2003 fi
2004 rm -f conftest*
2005
2006
2007 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2008 if test "$ac_test_CFLAGS" = set; then
2009   CFLAGS="$ac_save_CFLAGS"
2010 elif test $ac_cv_prog_cc_g = yes; then
2011   if test "$GCC" = yes; then
2012     CFLAGS="-g -O2"
2013   else
2014     CFLAGS="-g"
2015   fi
2016 else
2017   if test "$GCC" = yes; then
2018     CFLAGS="-O2"
2019   else
2020     CFLAGS=
2021   fi
2022 fi
2023
2024 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2025   CC=gcc
2026   # Extract the first word of "gcc", so it can be a program name with args.
2027 set dummy gcc; ac_word=$2
2028 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2029 echo "configure:2030: checking for $ac_word" >&5
2030
2031 if test -n "$CC"; then
2032   ac_cv_prog_CC="$CC" # Let the user override the test.
2033 else
2034   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2035   ac_dummy="$PATH"
2036   for ac_dir in $ac_dummy; do
2037     test -z "$ac_dir" && ac_dir=.
2038     if test -f $ac_dir/$ac_word; then
2039       ac_cv_prog_CC="gcc"
2040       break
2041     fi
2042   done
2043   IFS="$ac_save_ifs"
2044 fi
2045 CC="$ac_cv_prog_CC"
2046 if test -n "$CC"; then
2047   echo "$ac_t""$CC" 1>&6
2048 else
2049   echo "$ac_t""no" 1>&6
2050 fi
2051
2052 if test -z "$CC"; then
2053   # Extract the first word of "cc", so it can be a program name with args.
2054 set dummy cc; ac_word=$2
2055 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2056 echo "configure:2057: checking for $ac_word" >&5
2057
2058 if test -n "$CC"; then
2059   ac_cv_prog_CC="$CC" # Let the user override the test.
2060 else
2061   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2062   ac_prog_rejected=no
2063   ac_dummy="$PATH"
2064   for ac_dir in $ac_dummy; do
2065     test -z "$ac_dir" && ac_dir=.
2066     if test -f $ac_dir/$ac_word; then
2067       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2068         ac_prog_rejected=yes
2069         continue
2070       fi
2071       ac_cv_prog_CC="cc"
2072       break
2073     fi
2074   done
2075   IFS="$ac_save_ifs"
2076 if test $ac_prog_rejected = yes; then
2077   # We found a bogon in the path, so make sure we never use it.
2078   set dummy $ac_cv_prog_CC
2079   shift
2080   if test $# -gt 0; then
2081     # We chose a different compiler from the bogus one.
2082     # However, it has the same basename, so the bogon will be chosen
2083     # first if we set CC to just the basename; use the full file name.
2084     shift
2085     set dummy "$ac_dir/$ac_word" "$@"
2086     shift
2087     ac_cv_prog_CC="$@"
2088   fi
2089 fi
2090 fi
2091 CC="$ac_cv_prog_CC"
2092 if test -n "$CC"; then
2093   echo "$ac_t""$CC" 1>&6
2094 else
2095   echo "$ac_t""no" 1>&6
2096 fi
2097
2098   if test -z "$CC"; then
2099     case "`uname -s`" in
2100     *win32* | *WIN32*)
2101       # Extract the first word of "cl", so it can be a program name with args.
2102 set dummy cl; ac_word=$2
2103 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2104 echo "configure:2105: checking for $ac_word" >&5
2105
2106 if test -n "$CC"; then
2107   ac_cv_prog_CC="$CC" # Let the user override the test.
2108 else
2109   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2110   ac_dummy="$PATH"
2111   for ac_dir in $ac_dummy; do
2112     test -z "$ac_dir" && ac_dir=.
2113     if test -f $ac_dir/$ac_word; then
2114       ac_cv_prog_CC="cl"
2115       break
2116     fi
2117   done
2118   IFS="$ac_save_ifs"
2119 fi
2120 CC="$ac_cv_prog_CC"
2121 if test -n "$CC"; then
2122   echo "$ac_t""$CC" 1>&6
2123 else
2124   echo "$ac_t""no" 1>&6
2125 fi
2126  ;;
2127     esac
2128   fi
2129   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2130 fi
2131
2132 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2133 echo "configure:2134: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2134
2135 ac_ext=c
2136 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2137 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2138 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2139 ac_cpp='$CPP '"$xe_cppflags"
2140 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2141 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2142 cross_compiling=no
2143
2144 cat > conftest.$ac_ext << EOF
2145
2146 #line 2147 "configure"
2147 #include "confdefs.h"
2148
2149 main(){return(0);}
2150 EOF
2151 if { (eval echo configure:2152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2152   ac_cv_prog_cc_works=yes
2153   # If we can't run a trivial program, we are probably using a cross compiler.
2154   if (./conftest; exit) 2>/dev/null; then
2155     ac_cv_prog_cc_cross=no
2156   else
2157     ac_cv_prog_cc_cross=yes
2158   fi
2159 else
2160   echo "configure: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   ac_cv_prog_cc_works=no
2163 fi
2164 rm -fr conftest*
2165 ac_ext=c
2166 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2167 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2168 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2169 ac_cpp='$CPP '"$xe_cppflags"
2170 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2171 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2172 cross_compiling=no
2173
2174 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2175 if test $ac_cv_prog_cc_works = no; then
2176   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2177 fi
2178 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2179 echo "configure:2180: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2180 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2181 cross_compiling=$ac_cv_prog_cc_cross
2182
2183 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2184 echo "configure:2185: checking whether we are using GNU C" >&5
2185
2186 cat > conftest.c <<EOF
2187 #ifdef __GNUC__
2188   yes;
2189 #endif
2190 EOF
2191 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2192   ac_cv_prog_gcc=yes
2193 else
2194   ac_cv_prog_gcc=no
2195 fi
2196
2197 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2198
2199 if test $ac_cv_prog_gcc = yes; then
2200   GCC=yes
2201 else
2202   GCC=
2203 fi
2204
2205 ac_test_CFLAGS="${CFLAGS+set}"
2206 ac_save_CFLAGS="$CFLAGS"
2207 CFLAGS=
2208 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2209 echo "configure:2210: checking whether ${CC-cc} accepts -g" >&5
2210
2211 echo 'void f(){}' > conftest.c
2212 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2213   ac_cv_prog_cc_g=yes
2214 else
2215   ac_cv_prog_cc_g=no
2216 fi
2217 rm -f conftest*
2218
2219
2220 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2221 if test "$ac_test_CFLAGS" = set; then
2222   CFLAGS="$ac_save_CFLAGS"
2223 elif test $ac_cv_prog_cc_g = yes; then
2224   if test "$GCC" = yes; then
2225     CFLAGS="-g -O2"
2226   else
2227     CFLAGS="-g"
2228   fi
2229 else
2230   if test "$GCC" = yes; then
2231     CFLAGS="-O2"
2232   else
2233     CFLAGS=
2234   fi
2235 fi
2236
2237 fi
2238 CFLAGS="$xe_save_CFLAGS"
2239
2240
2241 test -n "$CPP" -a -d "$CPP" && CPP=
2242
2243 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2244
2245 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2246 echo "configure:2247: checking how to run the C preprocessor" >&5
2247 # On Suns, sometimes $CPP names a directory.
2248 if test -n "$CPP" && test -d "$CPP"; then
2249   CPP=
2250 fi
2251 if test -z "$CPP"; then
2252
2253   # This must be in double quotes, not single quotes, because CPP may get
2254   # substituted into the Makefile and "${CC-cc}" will confuse make.
2255   CPP="${CC-cc} -E"
2256   # On the NeXT, cc -E runs the code through the compiler's parser,
2257   # not just through cpp.
2258   cat > conftest.$ac_ext <<EOF
2259 #line 2260 "configure"
2260 #include "confdefs.h"
2261 #include <assert.h>
2262 Syntax Error
2263 EOF
2264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2265 { (eval echo configure:2266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2267 if test -z "$ac_err"; then
2268   :
2269 else
2270   echo "$ac_err" >&5
2271   echo "configure: failed program was:" >&5
2272   cat conftest.$ac_ext >&5
2273   rm -rf conftest*
2274   CPP="${CC-cc} -E -traditional-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} -nologo -E"
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=/lib/cpp
2309 fi
2310 rm -f conftest*
2311 fi
2312 rm -f conftest*
2313 fi
2314 rm -f conftest*
2315   ac_cv_prog_CPP="$CPP"
2316   CPP="$ac_cv_prog_CPP"
2317 else
2318   ac_cv_prog_CPP="$CPP"
2319 fi
2320 echo "$ac_t""$CPP" 1>&6
2321
2322
2323
2324 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2325 echo "configure:2326: checking for AIX" >&5
2326 cat > conftest.$ac_ext <<EOF
2327 #line 2328 "configure"
2328 #include "confdefs.h"
2329 #ifdef _AIX
2330   yes
2331 #endif
2332
2333 EOF
2334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2335   egrep "yes" >/dev/null 2>&1; then
2336   rm -rf conftest*
2337   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2338     Defining _ALL_SOURCE
2339 EOF
2340 cat >> confdefs.h <<\EOF
2341 #define _ALL_SOURCE 1
2342 EOF
2343 }
2344
2345 else
2346   rm -rf conftest*
2347   echo "$ac_t""no" 1>&6
2348 fi
2349 rm -f conftest*
2350
2351  
2352 cat > $srcdir/conffoo.h <<EOF
2353 #define CONFFOO 1
2354 EOF
2355 echo $ac_n "checking for a working inclusion macro""... $ac_c" 1>&6
2356 echo "configure:2357: checking for a working inclusion macro" >&5
2357 cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360
2361 int main() {
2362
2363 #define SMART_INCLUDE(path,file) <path/file>
2364 #define CONFFOO_H_PATH $srcdir
2365 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2366 #include CONFFOO_INCLUDE(conffoo.h)
2367
2368 ; return 0; }
2369 EOF
2370 if { (eval echo configure:2371: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2371   rm -rf conftest*
2372    echo "$ac_t""direct" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2373     Defining SMART_INCLUDE_INDIRECTIONS = 0
2374 EOF
2375 cat >> confdefs.h <<\EOF
2376 #define SMART_INCLUDE_INDIRECTIONS 0
2377 EOF
2378 }
2379  
2380 else
2381   echo "configure: failed program was:" >&5
2382   cat conftest.$ac_ext >&5
2383   rm -rf conftest*
2384   cat > conftest.$ac_ext <<EOF
2385 #line 2386 "configure"
2386 #include "confdefs.h"
2387
2388 int main() {
2389
2390 #define GLUE_INCLUDE(path,file)  <##path##/##file##>
2391 #define SMART_INCLUDE(path,file) GLUE_INCLUDE(path,file)
2392 #define CONFFOO_H_PATH $srcdir
2393 #define CONFFOO_INCLUDE(file) SMART_INCLUDE(CONFFOO_H_PATH,file)
2394 #include CONFFOO_INCLUDE(conffoo.h)
2395
2396 ; return 0; }
2397 EOF
2398 if { (eval echo configure:2399: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2399   rm -rf conftest*
2400    echo "$ac_t""simple" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2401     Defining SMART_INCLUDE_INDIRECTIONS = 1
2402 EOF
2403 cat >> confdefs.h <<\EOF
2404 #define SMART_INCLUDE_INDIRECTIONS 1
2405 EOF
2406 }
2407  
2408 else
2409   echo "configure: failed program was:" >&5
2410   cat conftest.$ac_ext >&5
2411   rm -rf conftest*
2412   cat > conftest.$ac_ext <<EOF
2413 #line 2414 "configure"
2414 #include "confdefs.h"
2415
2416 int main() {
2417
2418 #define GLUE_INCLUDE_2(path,file)  <##path##/##file##>
2419 #define GLUE_INCLUDE_1(path,file) GLUE_INCLUDE_2(path,file)
2420 #define SMART_INCLUDE(path,file) GLUE_INCLUDE_1(path,file)
2421 #define CONFFOO_H_PATH $srcdir
2422 #define CONFFOO_INCLUDE(file) SMART_INCLUDE (CONFFOO_H_PATH,file)
2423 #include CONFFOO_INCLUDE(conffoo.h)
2424
2425 ; return 0; }
2426 EOF
2427 if { (eval echo configure:2428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2428   rm -rf conftest*
2429    echo "$ac_t""double" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2430     Defining SMART_INCLUDE_INDIRECTIONS = 2
2431 EOF
2432 cat >> confdefs.h <<\EOF
2433 #define SMART_INCLUDE_INDIRECTIONS 2
2434 EOF
2435 }
2436  
2437 else
2438   echo "configure: failed program was:" >&5
2439   cat conftest.$ac_ext >&5
2440   rm -rf conftest*
2441   { echo "configure: error: Cannot define a proper SMART_INCLUDE macro. Please report." 1>&2; exit 1; }
2442 fi
2443 rm -f conftest*
2444 fi
2445 rm -f conftest*
2446 fi
2447 rm -f conftest*
2448 rm -f $srcdir/conffoo.h
2449
2450
2451
2452 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2453 echo "configure:2454: checking for GNU libc" >&5
2454 cat > conftest.$ac_ext <<EOF
2455 #line 2456 "configure"
2456 #include "confdefs.h"
2457 #include <features.h>
2458 int main() {
2459
2460 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2461 #error Not a GNU libc system :-(
2462 ******* ======= ******** &&&&&&&&
2463 #endif
2464
2465 ; return 0; }
2466 EOF
2467 if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2468   rm -rf conftest*
2469   have_glibc=yes
2470 else
2471   echo "configure: failed program was:" >&5
2472   cat conftest.$ac_ext >&5
2473   rm -rf conftest*
2474   have_glibc=no
2475 fi
2476 rm -f conftest*
2477 echo "$ac_t""$have_glibc" 1>&6
2478 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2479     Defining _GNU_SOURCE
2480 EOF
2481 cat >> confdefs.h <<\EOF
2482 #define _GNU_SOURCE 1
2483 EOF
2484 }
2485
2486
2487 case "$opsys" in
2488   sol2)
2489    { test "$extra_verbose" = "yes" && cat << \EOF
2490     Defining __EXTENSIONS__
2491 EOF
2492 cat >> confdefs.h <<\EOF
2493 #define __EXTENSIONS__ 1
2494 EOF
2495 }
2496
2497       if test "$os_release" -ge 55; then
2498      { test "$extra_verbose" = "yes" && cat << \EOF
2499     Defining _XOPEN_SOURCE = 500
2500 EOF
2501 cat >> confdefs.h <<\EOF
2502 #define _XOPEN_SOURCE 500
2503 EOF
2504 }
2505
2506      { test "$extra_verbose" = "yes" && cat << \EOF
2507     Defining _XOPEN_SOURCE_EXTENDED
2508 EOF
2509 cat >> confdefs.h <<\EOF
2510 #define _XOPEN_SOURCE_EXTENDED 1
2511 EOF
2512 }
2513
2514    fi ;;
2515   linux)
2516     { test "$extra_verbose" = "yes" && cat << \EOF
2517     Defining _POSIX_C_SOURCE = 199506L
2518 EOF
2519 cat >> confdefs.h <<\EOF
2520 #define _POSIX_C_SOURCE 199506L
2521 EOF
2522 }
2523
2524     { test "$extra_verbose" = "yes" && cat << \EOF
2525     Defining _XOPEN_SOURCE = 500
2526 EOF
2527 cat >> confdefs.h <<\EOF
2528 #define _XOPEN_SOURCE 500
2529 EOF
2530 }
2531
2532     { test "$extra_verbose" = "yes" && cat << \EOF
2533     Defining _XOPEN_SOURCE_EXTENDED
2534 EOF
2535 cat >> confdefs.h <<\EOF
2536 #define _XOPEN_SOURCE_EXTENDED 1
2537 EOF
2538 }
2539
2540     ;;
2541 esac
2542
2543 cat > conftest.$ac_ext <<EOF
2544 #line 2545 "configure"
2545 #include "confdefs.h"
2546 int main () {
2547 #if defined __SUNPRO_C
2548 return 11;
2549 #elif defined __DECC
2550 return 12;
2551 #else
2552 return 0;
2553 #endif
2554 }
2555 EOF
2556 if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2557 then
2558   :
2559 else
2560   conftest_rc="$?"
2561   echo "configure: failed program was:" >&5
2562   cat conftest.$ac_ext >&5
2563   rm -fr conftest*
2564   case "$conftest_rc" in
2565   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2566   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2567 esac
2568 fi
2569 rm -fr conftest*
2570
2571
2572
2573
2574 echo "Extracting information from the machine- and system-dependent headers..."
2575
2576 tempcname="conftest.c"
2577
2578
2579
2580 cat > $tempcname <<EOF
2581 #define NOT_C_CODE
2582 #define C_SWITCH_SITE
2583 #define C_SWITCH_X_SITE
2584 #define LD_SWITCH_SITE
2585 #define LD_SWITCH_X_SITE
2586 #define LD_SWITCH_X_SITE_AUX
2587 #define OS_RELEASE $os_release
2588 #include "$srcdir/src/$opsysfile"
2589 #include "$srcdir/src/$machfile"
2590
2591 #ifndef LIBS_MACHINE
2592 #define LIBS_MACHINE
2593 #endif
2594 configure___ libs_machine=LIBS_MACHINE
2595
2596 #ifndef LIBS_SYSTEM
2597 #define LIBS_SYSTEM
2598 #endif
2599 configure___ libs_system=LIBS_SYSTEM
2600
2601 #ifndef LIBS_TERMCAP
2602 #define LIBS_TERMCAP
2603 #endif
2604 configure___ libs_termcap=LIBS_TERMCAP
2605
2606 #ifndef LIB_STANDARD
2607 #define LIB_STANDARD
2608 #endif
2609 configure___ libs_standard=LIB_STANDARD
2610
2611
2612 #ifndef OBJECTS_MACHINE
2613 #define OBJECTS_MACHINE
2614 #endif
2615 configure___ objects_machine=OBJECTS_MACHINE
2616
2617 #ifndef OBJECTS_SYSTEM
2618 #define OBJECTS_SYSTEM
2619 #endif
2620 configure___ objects_system=OBJECTS_SYSTEM
2621
2622
2623 #ifndef C_SWITCH_MACHINE
2624 #define C_SWITCH_MACHINE
2625 #endif
2626 configure___ c_switch_machine=C_SWITCH_MACHINE
2627
2628 #ifndef C_SWITCH_SYSTEM
2629 #define C_SWITCH_SYSTEM
2630 #endif
2631 configure___ c_switch_system=C_SWITCH_SYSTEM
2632
2633
2634 #ifndef LD_SWITCH_MACHINE
2635 #define LD_SWITCH_MACHINE
2636 #endif
2637 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2638
2639 #ifndef LD_SWITCH_SYSTEM
2640 #define LD_SWITCH_SYSTEM
2641 #endif
2642 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2643
2644
2645 #ifndef UNEXEC
2646 #define UNEXEC "unexec.o"
2647 #endif
2648 configure___ unexec=UNEXEC
2649
2650
2651 #ifndef LD_SWITCH_SHARED
2652 #define LD_SWITCH_SHARED "-c"
2653 #endif
2654 configure___ ld_switch_shared=LD_SWITCH_SHARED
2655
2656
2657 #define ORDINARY_LD "\$(CC) \$(CFLAGS)"
2658 configure___ ordinary_ld=ORDINARY_LD
2659
2660 #ifdef ORDINARY_LINK
2661 #define LD ORDINARY_LD
2662 #else /* no ORDINARY LINK */
2663 #ifdef COFF_ENCAPSULATE
2664 #define LD "\$(CC) -nostdlib"
2665 #else /* not COFF_ENCAPSULATE */
2666 #ifdef LINKER
2667 #define LD LINKER
2668 #else /* ! defined (LINKER) */
2669 #define LD "ld"
2670 #endif /* ! defined (LINKER) */
2671 #endif /* ! defined (COFF_ENCAPSULATE) */
2672 #endif /* not ORDINARY_LINK */
2673 configure___ ld=LD
2674
2675 #ifndef LIB_GCC
2676 #define LIB_GCC
2677 #endif
2678 configure___ lib_gcc=LIB_GCC
2679
2680 #ifndef LD_TEXT_START_ADDR
2681 #define LD_TEXT_START_ADDR
2682 #endif
2683 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2684
2685
2686 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2687 #ifdef NO_REMAP
2688 #ifdef COFF_ENCAPSULATE
2689 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2690 #else /* ! defined (COFF_ENCAPSULATE) */
2691 #define START_FILES "pre-crt0.o /lib/crt0.o"
2692 #endif /* ! defined (COFF_ENCAPSULATE) */
2693 #else /* ! defined (NO_REMAP) */
2694 #define START_FILES "ecrt0.o"
2695 #endif /* ! defined (NO_REMAP) */
2696 #endif /* no ORDINARY_LINK */
2697 #ifndef START_FILES
2698 #define START_FILES
2699 #endif
2700 configure___ start_files=START_FILES
2701
2702 #ifdef ORDINARY_LINK
2703 configure___ ordinary_link=yes
2704 #else
2705 configure___ ordinary_link=no
2706 #endif
2707
2708 #ifdef SYSTEM_MALLOC
2709 configure___ system_malloc=yes
2710 #else
2711 configure___ system_malloc=no
2712 #endif
2713
2714 #ifdef TERMINFO
2715 configure___ have_terminfo=yes
2716 #else
2717 configure___ have_terminfo=no
2718 #endif
2719
2720 #ifdef MAIL_USE_FLOCK
2721 configure___ mail_use_flock=yes
2722 #else
2723 configure___ mail_use_flock=no
2724 #endif
2725
2726 #ifdef MAIL_USE_LOCKF
2727 configure___ mail_use_lockf=yes
2728 #else
2729 configure___ mail_use_lockf=no
2730 #endif
2731
2732 #ifdef MAIL_USE_LOCKING
2733 configure___ mail_use_locking=yes
2734 #else
2735 configure___ mail_use_locking=no
2736 #endif
2737
2738 #ifdef HAVE_WIN32_PROCESSES
2739 configure___ win32_processes=yes
2740 #else
2741 configure___ win32_processes=no
2742 #endif
2743
2744 EOF
2745
2746 CPP=`eval "echo $CPP $CPPFLAGS"`
2747 eval `$CPP -Isrc $tempcname \
2748         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2749
2750 rm $tempcname
2751
2752 if test "$pdump" = "yes"; then
2753   ordinary_link="yes"
2754   ld="${ordinary_ld}"
2755   start_files=
2756   libs_standard=
2757   unexec=
2758   lib_gcc=      
2759 fi
2760
2761 test "$extra_verbose" = "yes" && \
2762   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 ""
2763
2764 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2765         mingw_include=`eval "dirname $mingw_include"` ;
2766         mingw_include="-I$mingw_include/../include/mingw32" ;
2767         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2768 esac
2769
2770 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2771
2772 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2773
2774 if test "$cflags_specified" = "no"; then
2775       if   test "$GCC" = "yes"; then
2776     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2777               elif test "$__SUNPRO_C" = "yes"; then
2778     case "$opsys" in
2779       sol2    ) CFLAGS="-v -xO4" ;;
2780       sunos4* ) CFLAGS="-xO2";;
2781     esac
2782   elif test "$__DECC" = "yes"; then
2783     CFLAGS="-O3"
2784   elif test "$CC" = "xlc"; then
2785     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2786     else
2787     CFLAGS="-O" ;  fi
2788 fi
2789
2790 if test "$GCC" = "yes"; then
2791 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2792 echo "configure:2793: checking for buggy gcc versions" >&5
2793 GCC_VERSION=`$CC --version`
2794 case `uname -s`:`uname -m`:$GCC_VERSION in
2795                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2796                         case "$CFLAGS" in
2797             *-O2*|*-O3*)
2798                 case "$CFLAGS" in
2799                     *-fno-schedule-insns*) ;;
2800                     *)
2801                         echo "$ac_t""Yes" 1>&6
2802                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2803                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2804                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2805                         ;;
2806                 esac
2807                 ;;
2808         esac
2809         ;;
2810                     Linux:alpha:egcs-2.91.*)
2811         echo "$ac_t""Yes" 1>&6
2812         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2813         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2814         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2815         ;;
2816     *:i*86*:2.7.2*)
2817         case "$GCC_VERSION" in
2818             2.7.2)
2819                 case "$CFLAGS" in
2820                     *-O2*|*-O3*)
2821                         case "$CFLAGS" in
2822                             *-fno-strength-reduce*) ;;
2823                             *)
2824                                 echo "$ac_t""Yes" 1>&6
2825                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2826                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2827                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2828                                 ;;
2829                         esac
2830                         ;;
2831                 esac
2832                 ;;
2833         esac
2834         case "$CFLAGS" in
2835          *-fno-caller-saves*) ;;
2836          *)
2837             echo "$ac_t""Yes" 1>&6
2838             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2839             echo "configure: warning: -fno-caller-saves." 1>&2
2840             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2841             ;;
2842         esac
2843         ;;
2844 esac
2845 fi
2846 echo "$ac_t""No" 1>&6
2847
2848
2849 if test "$GCC" = "yes"; then
2850   set x $ld_switch_system; shift; ld_switch_system=""
2851   while test -n "$1"; do
2852     case $1 in
2853       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2854       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2855       -Xlinker* ) ;;
2856       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2857     esac
2858     shift
2859   done
2860 fi
2861
2862 if test "$GCC" = "yes"; then
2863   set x $ld_switch_machine; shift; ld_switch_machine=""
2864   while test -n "$1"; do
2865     case $1 in
2866       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2867       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2868       -Xlinker* ) ;;
2869       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2870     esac
2871     shift
2872   done
2873 fi
2874
2875 if test "$GCC" = "yes"; then
2876   set x $LDFLAGS; shift; LDFLAGS=""
2877   while test -n "$1"; do
2878     case $1 in
2879       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2880       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2881       -Xlinker* ) ;;
2882       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2883     esac
2884     shift
2885   done
2886 fi
2887
2888 if test "$GCC" = "yes"; then
2889   set x $ld_call_shared; shift; ld_call_shared=""
2890   while test -n "$1"; do
2891     case $1 in
2892       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2893       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2894       -Xlinker* ) ;;
2895       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2896     esac
2897     shift
2898   done
2899 fi
2900
2901 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2902    echo "    xemacs will be linked with \"$objects_machine\""
2903  fi
2904 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2905    echo "    xemacs will be linked with \"$objects_system\""
2906  fi
2907 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2908    echo "    xemacs will be linked with \"$unexec\""
2909  fi
2910 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2911    echo "    xemacs will be linked with \"dumper.o\""
2912  fi
2913
2914 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2915 echo "configure:2916: checking for dynodump" >&5
2916 if test "$unexec" != "unexsol2.o"; then
2917   echo "$ac_t""no" 1>&6
2918 else
2919   echo "$ac_t""yes" 1>&6
2920   { test "$extra_verbose" = "yes" && cat << \EOF
2921     Defining DYNODUMP
2922 EOF
2923 cat >> confdefs.h <<\EOF
2924 #define DYNODUMP 1
2925 EOF
2926 }
2927
2928   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2929   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2930   case "$machine" in
2931     sparc   ) dynodump_arch=sparc ;;
2932     *86*    ) dynodump_arch=i386  ;;
2933     powerpc ) dynodump_arch=ppc   ;;
2934   esac
2935     test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
2936 fi
2937
2938
2939 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2940
2941 if test "$unexec" = "unexaix.o"; then
2942   if   test "$dynamic" = "no"; then
2943   start_flags="-Wl,-bnso,-bnodelcsect"
2944   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2945   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2946     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2947   done
2948   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2949     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2950   done
2951   
2952 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2953 echo "configure:2954: checking for terminateAndUnload in -lC" >&5
2954 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2955
2956 xe_check_libs=" -lC "
2957 cat > conftest.$ac_ext <<EOF
2958 #line 2959 "configure"
2959 #include "confdefs.h"
2960 /* Override any gcc2 internal prototype to avoid an error.  */
2961 /* We use char because int might match the return type of a gcc2
2962     builtin and then its argument prototype would still apply.  */
2963 char terminateAndUnload();
2964
2965 int main() {
2966 terminateAndUnload()
2967 ; return 0; }
2968 EOF
2969 if { (eval echo configure:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2970   rm -rf conftest*
2971   eval "ac_cv_lib_$ac_lib_var=yes"
2972 else
2973   echo "configure: failed program was:" >&5
2974   cat conftest.$ac_ext >&5
2975   rm -rf conftest*
2976   eval "ac_cv_lib_$ac_lib_var=no"
2977 fi
2978 rm -f conftest*
2979 xe_check_libs=""
2980
2981 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2982   echo "$ac_t""yes" 1>&6
2983   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2984 else
2985   echo "$ac_t""no" 1>&6
2986 fi
2987
2988
2989   fi
2990 elif test -n "$ld_text_start_addr"; then
2991   start_flags="-T $ld_text_start_addr -e __start"
2992 fi
2993
2994
2995
2996
2997 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2998  test -z "$linker" &&  linker='$(CC) -nostdlib'
2999  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
3000 fi
3001 test "$GCC" != "yes" && lib_gcc=
3002
3003
3004
3005
3006
3007 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3008 if test -n "$site_libraries"; then
3009   for arg in $site_libraries; do
3010     case "$arg" in
3011      -* ) ;;
3012      * ) test -d "$arg" || \
3013            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
3014        arg="-L${arg}" ;;
3015     esac
3016     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
3017   done
3018 fi
3019
3020 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3021 if test -n "$site_includes"; then
3022   for arg in $site_includes; do
3023     case "$arg" in
3024       -* ) ;;
3025       * ) test -d "$arg" || \
3026            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
3027       arg="-I${arg}" ;;
3028     esac
3029     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
3030   done
3031 fi
3032
3033 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3034 if test -n "$site_prefixes"; then
3035   for dir in $site_prefixes; do
3036     lib_dir="${dir}/lib"
3037     inc_dir="${dir}/include"
3038     if test ! -d "$dir"; then
3039       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
3040     elif test ! -d "$lib_dir"; then
3041       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
3042     else
3043       if test -d "$inc_dir"; then
3044         c_switch_site="$c_switch_site "-I$inc_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-I$inc_dir"\" to \$c_switch_site"; fi
3045       fi
3046       ld_switch_site="$ld_switch_site "-L$lib_dir"" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \""-L$lib_dir"\" to \$ld_switch_site"; fi
3047     fi
3048   done
3049 fi
3050
3051
3052 for dir in "/usr/ccs/lib"; do
3053   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
3054 done
3055
3056 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
3057 if test -n "$site_runtime_libraries"; then
3058   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
3059   export LD_RUN_PATH
3060 fi
3061
3062
3063
3064
3065
3066 if test -n "$add_runtime_path"; then :;
3067 elif test "$dynamic" = "no"; then add_runtime_path=no
3068 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
3069 else case "$opsys" in
3070        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
3071        * ) add_runtime_path=no ;;
3072      esac
3073 fi
3074
3075 if test "$add_runtime_path" = "yes"; then
3076       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
3077 echo "configure:3078: checking "for runtime libraries flag"" >&5
3078   case "$opsys" in
3079     sol2 ) dash_r="-R" ;;
3080     decosf* | linux* | irix*) dash_r="-rpath " ;;
3081     *)
3082       dash_r=""
3083       for try_dash_r in "-R" "-R " "-rpath "; do
3084         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
3085         
3086 if test "$GCC" = "yes"; then
3087   set x $xe_check_libs; shift; xe_check_libs=""
3088   while test -n "$1"; do
3089     case $1 in
3090       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
3091       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
3092       -Xlinker* ) ;;
3093       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
3094     esac
3095     shift
3096   done
3097 fi
3098         cat > conftest.$ac_ext <<EOF
3099 #line 3100 "configure"
3100 #include "confdefs.h"
3101
3102 int main() {
3103
3104 ; return 0; }
3105 EOF
3106 if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3107   rm -rf conftest*
3108   dash_r="$try_dash_r"
3109 else
3110   echo "configure: failed program was:" >&5
3111   cat conftest.$ac_ext >&5
3112 fi
3113 rm -f conftest*
3114         xe_check_libs=""
3115         test -n "$dash_r" && break
3116       done ;;
3117   esac
3118   if test -n "$dash_r";
3119     then echo "$ac_t"""\"${dash_r}\""" 1>&6
3120     else echo "$ac_t""NONE" 1>&6
3121   fi
3122 fi
3123
3124 xe_add_unique_runpath_dir='
3125   xe_add_p=yes
3126   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3127   done
3128   if test "$xe_add_p" = "yes"; then
3129     test -n "$runpath" && runpath="${runpath}:"
3130     runpath="${runpath}${xe_runpath_dir}"
3131     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3132   fi'
3133
3134
3135
3136
3137 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3138     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3139   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3140   
3141         runpath="" runpath_dirs=""
3142   if test -n "$LD_RUN_PATH"; then
3143     runpath="$LD_RUN_PATH"
3144   elif test "$GCC" = "yes"; then
3145         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3146     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3147     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3148     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3149       case "$arg" in P,* | -L* | -R* )
3150         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3151           {
3152 xe_runpath_dir="$dir"
3153   test "$xe_runpath_dir" != "/lib"     -a \
3154         "$xe_runpath_dir" != "/usr/lib" -a \
3155         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3156   eval "$xe_add_unique_runpath_dir"
3157 }
3158         done ;;
3159       esac
3160     done
3161     ld_switch_run="$ld_switch_run_save"
3162     rm -f conftest*
3163   else
3164         for arg in $ld_switch_site $ld_switch_x_site; do
3165       case "$arg" in -L*) {
3166 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3167   test "$xe_runpath_dir" != "/lib"     -a \
3168         "$xe_runpath_dir" != "/usr/lib" -a \
3169         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3170   eval "$xe_add_unique_runpath_dir"
3171 };; esac
3172     done
3173         if test "$opsys $need_motif" = "sol2 yes"; then
3174       xe_runpath_dir="/opt/SUNWdt/lib";
3175       eval "$xe_add_unique_runpath_dir";
3176     fi
3177   fi 
3178   if test -n "$runpath"; then
3179     ld_switch_run="${dash_r}${runpath}"
3180     
3181 if test "$GCC" = "yes"; then
3182   set x $ld_switch_run; shift; ld_switch_run=""
3183   while test -n "$1"; do
3184     case $1 in
3185       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3186       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3187       -Xlinker* ) ;;
3188       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3189     esac
3190     shift
3191   done
3192 fi
3193     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3194   fi
3195 fi
3196
3197
3198
3199
3200 GNU_MALLOC=yes
3201 if test "$with_dlmalloc" != "no"; then
3202         doug_lea_malloc=yes
3203 else
3204         doug_lea_malloc=no
3205 fi
3206 after_morecore_hook_exists=yes
3207 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3208 echo "configure:3209: checking for malloc_get_state" >&5
3209
3210 cat > conftest.$ac_ext <<EOF
3211 #line 3212 "configure"
3212 #include "confdefs.h"
3213 /* System header to define __stub macros and hopefully few prototypes,
3214     which can conflict with char malloc_get_state(); below.  */
3215 #include <assert.h>
3216 /* Override any gcc2 internal prototype to avoid an error.  */
3217 /* We use char because int might match the return type of a gcc2
3218     builtin and then its argument prototype would still apply.  */
3219 char malloc_get_state();
3220
3221 int main() {
3222
3223 /* The GNU C library defines this for functions which it implements
3224     to always fail with ENOSYS.  Some functions are actually named
3225     something starting with __ and the normal name is an alias.  */
3226 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3227 choke me
3228 #else
3229 malloc_get_state();
3230 #endif
3231
3232 ; return 0; }
3233 EOF
3234 if { (eval echo configure:3235: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3235   rm -rf conftest*
3236   eval "ac_cv_func_malloc_get_state=yes"
3237 else
3238   echo "configure: failed program was:" >&5
3239   cat conftest.$ac_ext >&5
3240   rm -rf conftest*
3241   eval "ac_cv_func_malloc_get_state=no"
3242 fi
3243 rm -f conftest*
3244
3245 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3246   echo "$ac_t""yes" 1>&6
3247   :
3248 else
3249   echo "$ac_t""no" 1>&6
3250 doug_lea_malloc=no
3251 fi
3252
3253 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3254 echo "configure:3255: checking for malloc_set_state" >&5
3255
3256 cat > conftest.$ac_ext <<EOF
3257 #line 3258 "configure"
3258 #include "confdefs.h"
3259 /* System header to define __stub macros and hopefully few prototypes,
3260     which can conflict with char malloc_set_state(); below.  */
3261 #include <assert.h>
3262 /* Override any gcc2 internal prototype to avoid an error.  */
3263 /* We use char because int might match the return type of a gcc2
3264     builtin and then its argument prototype would still apply.  */
3265 char malloc_set_state();
3266
3267 int main() {
3268
3269 /* The GNU C library defines this for functions which it implements
3270     to always fail with ENOSYS.  Some functions are actually named
3271     something starting with __ and the normal name is an alias.  */
3272 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3273 choke me
3274 #else
3275 malloc_set_state();
3276 #endif
3277
3278 ; return 0; }
3279 EOF
3280 if { (eval echo configure:3281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3281   rm -rf conftest*
3282   eval "ac_cv_func_malloc_set_state=yes"
3283 else
3284   echo "configure: failed program was:" >&5
3285   cat conftest.$ac_ext >&5
3286   rm -rf conftest*
3287   eval "ac_cv_func_malloc_set_state=no"
3288 fi
3289 rm -f conftest*
3290
3291 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3292   echo "$ac_t""yes" 1>&6
3293   :
3294 else
3295   echo "$ac_t""no" 1>&6
3296 doug_lea_malloc=no
3297 fi
3298
3299 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3300 echo "configure:3301: checking whether __after_morecore_hook exists" >&5
3301 cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304 extern void (* __after_morecore_hook)();
3305 int main() {
3306 __after_morecore_hook = 0
3307 ; return 0; }
3308 EOF
3309 if { (eval echo configure:3310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3310   rm -rf conftest*
3311   echo "$ac_t""yes" 1>&6
3312 else
3313   echo "configure: failed program was:" >&5
3314   cat conftest.$ac_ext >&5
3315   rm -rf conftest*
3316   echo "$ac_t""no" 1>&6
3317    after_morecore_hook_exists=no
3318 fi
3319 rm -f conftest*
3320 if test "$system_malloc" = "yes" ; then
3321   GNU_MALLOC=no
3322   GNU_MALLOC_reason="
3323     - The GNU allocators don't work with this system configuration."
3324 elif test "$with_system_malloc" = "yes" ; then
3325   GNU_MALLOC=no
3326   GNU_MALLOC_reason="
3327     - User chose not to use GNU allocators."
3328 elif test "$with_debug_malloc" = "yes" ; then
3329   GNU_MALLOC=no
3330   GNU_MALLOC_reason="
3331     - User chose to use Debugging Malloc."
3332 fi
3333
3334 if test "$doug_lea_malloc" = "yes" ; then
3335   if test "$GNU_MALLOC" = yes ; then
3336     GNU_MALLOC_reason="
3337     - Using Doug Lea's new malloc from the GNU C Library."
3338   fi
3339   { test "$extra_verbose" = "yes" && cat << \EOF
3340     Defining DOUG_LEA_MALLOC
3341 EOF
3342 cat >> confdefs.h <<\EOF
3343 #define DOUG_LEA_MALLOC 1
3344 EOF
3345 }
3346
3347   if test "$after_morecore_hook_exists" = "no" ; then
3348     GNU_MALLOC_reason="
3349     - Using Doug Lea's new malloc from the Linux C Library."
3350     { test "$extra_verbose" = "yes" && cat << \EOF
3351     Defining _NO_MALLOC_WARNING_
3352 EOF
3353 cat >> confdefs.h <<\EOF
3354 #define _NO_MALLOC_WARNING_ 1
3355 EOF
3356 }
3357
3358   fi
3359   use_minimal_tagbits=yes
3360 fi
3361
3362
3363
3364
3365 # Extract the first word of "ranlib", so it can be a program name with args.
3366 set dummy ranlib; ac_word=$2
3367 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3368 echo "configure:3369: checking for $ac_word" >&5
3369
3370 if test -n "$RANLIB"; then
3371   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3372 else
3373   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3374   ac_dummy="$PATH"
3375   for ac_dir in $ac_dummy; do
3376     test -z "$ac_dir" && ac_dir=.
3377     if test -f $ac_dir/$ac_word; then
3378       ac_cv_prog_RANLIB="ranlib"
3379       break
3380     fi
3381   done
3382   IFS="$ac_save_ifs"
3383   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3384 fi
3385 RANLIB="$ac_cv_prog_RANLIB"
3386 if test -n "$RANLIB"; then
3387   echo "$ac_t""$RANLIB" 1>&6
3388 else
3389   echo "$ac_t""no" 1>&6
3390 fi
3391
3392 ac_aux_dir=
3393 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3394   if test -f $ac_dir/install-sh; then
3395     ac_aux_dir=$ac_dir
3396     ac_install_sh="$ac_aux_dir/install-sh -c"
3397     break
3398   elif test -f $ac_dir/install.sh; then
3399     ac_aux_dir=$ac_dir
3400     ac_install_sh="$ac_aux_dir/install.sh -c"
3401     break
3402   fi
3403 done
3404 if test -z "$ac_aux_dir"; then
3405   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3406 fi
3407 ac_config_guess=$ac_aux_dir/config.guess
3408 ac_config_sub=$ac_aux_dir/config.sub
3409 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3410
3411 # Find a good install program.  We prefer a C program (faster),
3412 # so one script is as good as another.  But avoid the broken or
3413 # incompatible versions:
3414 # SysV /etc/install, /usr/sbin/install
3415 # SunOS /usr/etc/install
3416 # IRIX /sbin/install
3417 # AIX /bin/install
3418 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3419 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3420 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3421 # ./install, which can be erroneously created by make from ./install.sh.
3422 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3423 echo "configure:3424: checking for a BSD compatible install" >&5
3424 if test -z "$INSTALL"; then
3425
3426   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3427   for ac_dir in $PATH; do
3428     # Account for people who put trailing slashes in PATH elements.
3429     case "$ac_dir/" in
3430     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3431     *)
3432       # OSF1 and SCO ODT 3.0 have their own names for install.
3433       # Don't use installbsd from OSF since it installs stuff as root
3434       # by default.
3435       for ac_prog in ginstall scoinst install; do
3436         if test -f $ac_dir/$ac_prog; then
3437           if test $ac_prog = install &&
3438             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3439             # AIX install.  It has an incompatible calling convention.
3440             :
3441           else
3442             ac_cv_path_install="$ac_dir/$ac_prog -c"
3443             break 2
3444           fi
3445         fi
3446       done
3447       ;;
3448     esac
3449   done
3450   IFS="$ac_save_IFS"
3451
3452   if test "${ac_cv_path_install+set}" = set; then
3453     INSTALL="$ac_cv_path_install"
3454   else
3455     # As a last resort, use the slow shell script.  We don't cache a
3456     # path for INSTALL within a source directory, because that will
3457     # break other packages using the cache if that directory is
3458     # removed, or if the path is relative.
3459     INSTALL="$ac_install_sh"
3460   fi
3461 fi
3462 echo "$ac_t""$INSTALL" 1>&6
3463
3464 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3465 # It thinks the first close brace ends the variable substitution.
3466 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3467
3468 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3469
3470 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3471
3472 for ac_prog in 'bison -y' byacc
3473 do
3474 # Extract the first word of "$ac_prog", so it can be a program name with args.
3475 set dummy $ac_prog; ac_word=$2
3476 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3477 echo "configure:3478: checking for $ac_word" >&5
3478
3479 if test -n "$YACC"; then
3480   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3481 else
3482   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3483   ac_dummy="$PATH"
3484   for ac_dir in $ac_dummy; do
3485     test -z "$ac_dir" && ac_dir=.
3486     if test -f $ac_dir/$ac_word; then
3487       ac_cv_prog_YACC="$ac_prog"
3488       break
3489     fi
3490   done
3491   IFS="$ac_save_ifs"
3492 fi
3493 YACC="$ac_cv_prog_YACC"
3494 if test -n "$YACC"; then
3495   echo "$ac_t""$YACC" 1>&6
3496 else
3497   echo "$ac_t""no" 1>&6
3498 fi
3499
3500 test -n "$YACC" && break
3501 done
3502 test -n "$YACC" || YACC="yacc"
3503
3504
3505 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3506 do
3507 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3508 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3509 echo "configure:3510: checking for $ac_hdr" >&5
3510
3511 cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 #include <$ac_hdr>
3515 EOF
3516 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3517 { (eval echo configure:3518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3518 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3519 if test -z "$ac_err"; then
3520   rm -rf conftest*
3521   eval "ac_cv_header_$ac_safe=yes"
3522 else
3523   echo "$ac_err" >&5
3524   echo "configure: failed program was:" >&5
3525   cat conftest.$ac_ext >&5
3526   rm -rf conftest*
3527   eval "ac_cv_header_$ac_safe=no"
3528 fi
3529 rm -f conftest*
3530 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3531   echo "$ac_t""yes" 1>&6
3532     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3533   { test "$extra_verbose" = "yes" && cat << EOF
3534     Defining $ac_tr_hdr
3535 EOF
3536 cat >> confdefs.h <<EOF
3537 #define $ac_tr_hdr 1
3538 EOF
3539 }
3540  
3541 else
3542   echo "$ac_t""no" 1>&6
3543 fi
3544 done
3545
3546 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3547 echo "configure:3548: checking for sys/wait.h that is POSIX.1 compatible" >&5
3548
3549 cat > conftest.$ac_ext <<EOF
3550 #line 3551 "configure"
3551 #include "confdefs.h"
3552 #include <sys/types.h>
3553 #include <sys/wait.h>
3554 #ifndef WEXITSTATUS
3555 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3556 #endif
3557 #ifndef WIFEXITED
3558 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3559 #endif
3560 int main() {
3561 int s;
3562 wait (&s);
3563 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3564 ; return 0; }
3565 EOF
3566 if { (eval echo configure:3567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3567   rm -rf conftest*
3568   ac_cv_header_sys_wait_h=yes
3569 else
3570   echo "configure: failed program was:" >&5
3571   cat conftest.$ac_ext >&5
3572   rm -rf conftest*
3573   ac_cv_header_sys_wait_h=no
3574 fi
3575 rm -f conftest*
3576
3577 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3578 if test $ac_cv_header_sys_wait_h = yes; then
3579   { test "$extra_verbose" = "yes" && cat << \EOF
3580     Defining HAVE_SYS_WAIT_H
3581 EOF
3582 cat >> confdefs.h <<\EOF
3583 #define HAVE_SYS_WAIT_H 1
3584 EOF
3585 }
3586
3587 fi
3588
3589 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3590 echo "configure:3591: checking for ANSI C header files" >&5
3591
3592 cat > conftest.$ac_ext <<EOF
3593 #line 3594 "configure"
3594 #include "confdefs.h"
3595 #include <stdlib.h>
3596 #include <stdarg.h>
3597 #include <string.h>
3598 #include <float.h>
3599 EOF
3600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3601 { (eval echo configure:3602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3603 if test -z "$ac_err"; then
3604   rm -rf conftest*
3605   ac_cv_header_stdc=yes
3606 else
3607   echo "$ac_err" >&5
3608   echo "configure: failed program was:" >&5
3609   cat conftest.$ac_ext >&5
3610   rm -rf conftest*
3611   ac_cv_header_stdc=no
3612 fi
3613 rm -f conftest*
3614
3615 if test $ac_cv_header_stdc = yes; then
3616   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <string.h>
3621 EOF
3622 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623   egrep "memchr" >/dev/null 2>&1; then
3624   :
3625 else
3626   rm -rf conftest*
3627   ac_cv_header_stdc=no
3628 fi
3629 rm -f conftest*
3630
3631 fi
3632
3633 if test $ac_cv_header_stdc = yes; then
3634   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3638 #include <stdlib.h>
3639 EOF
3640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3641   egrep "free" >/dev/null 2>&1; then
3642   :
3643 else
3644   rm -rf conftest*
3645   ac_cv_header_stdc=no
3646 fi
3647 rm -f conftest*
3648
3649 fi
3650
3651 if test $ac_cv_header_stdc = yes; then
3652   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3653 cat > conftest.$ac_ext <<EOF
3654 #line 3655 "configure"
3655 #include "confdefs.h"
3656 #include <ctype.h>
3657 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3658 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3659 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3660 int main () { int i; for (i = 0; i < 256; i++)
3661 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3662 exit (0); }
3663
3664 EOF
3665 if { (eval echo configure:3666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3666 then
3667   :
3668 else
3669   conftest_rc="$?"
3670   echo "configure: failed program was:" >&5
3671   cat conftest.$ac_ext >&5
3672   rm -fr conftest*
3673   ac_cv_header_stdc=no
3674 fi
3675 rm -fr conftest*
3676 fi
3677
3678 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3679 if test $ac_cv_header_stdc = yes; then
3680   { test "$extra_verbose" = "yes" && cat << \EOF
3681     Defining STDC_HEADERS
3682 EOF
3683 cat >> confdefs.h <<\EOF
3684 #define STDC_HEADERS 1
3685 EOF
3686 }
3687
3688 fi
3689
3690 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3691 echo "configure:3692: checking whether time.h and sys/time.h may both be included" >&5
3692
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <sys/types.h>
3697 #include <sys/time.h>
3698 #include <time.h>
3699 int main() {
3700 struct tm *tp;
3701 ; return 0; }
3702 EOF
3703 if { (eval echo configure:3704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3704   rm -rf conftest*
3705   ac_cv_header_time=yes
3706 else
3707   echo "configure: failed program was:" >&5
3708   cat conftest.$ac_ext >&5
3709   rm -rf conftest*
3710   ac_cv_header_time=no
3711 fi
3712 rm -f conftest*
3713
3714 echo "$ac_t""$ac_cv_header_time" 1>&6
3715 if test $ac_cv_header_time = yes; then
3716   { test "$extra_verbose" = "yes" && cat << \EOF
3717     Defining TIME_WITH_SYS_TIME
3718 EOF
3719 cat >> confdefs.h <<\EOF
3720 #define TIME_WITH_SYS_TIME 1
3721 EOF
3722 }
3723
3724 fi
3725
3726 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3727 echo "configure:3728: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3728
3729 cat > conftest.$ac_ext <<EOF
3730 #line 3731 "configure"
3731 #include "confdefs.h"
3732 #include <sys/types.h>
3733 #include <signal.h>
3734 /* NetBSD declares sys_siglist in unistd.h.  */
3735 #ifdef HAVE_UNISTD_H
3736 #include <unistd.h>
3737 #endif
3738 int main() {
3739 char *msg = *(sys_siglist + 1);
3740 ; return 0; }
3741 EOF
3742 if { (eval echo configure:3743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3743   rm -rf conftest*
3744   ac_cv_decl_sys_siglist=yes
3745 else
3746   echo "configure: failed program was:" >&5
3747   cat conftest.$ac_ext >&5
3748   rm -rf conftest*
3749   ac_cv_decl_sys_siglist=no
3750 fi
3751 rm -f conftest*
3752
3753 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3754 if test $ac_cv_decl_sys_siglist = yes; then
3755   { test "$extra_verbose" = "yes" && cat << \EOF
3756     Defining SYS_SIGLIST_DECLARED
3757 EOF
3758 cat >> confdefs.h <<\EOF
3759 #define SYS_SIGLIST_DECLARED 1
3760 EOF
3761 }
3762
3763 fi
3764
3765
3766 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3767 echo "configure:3768: checking for struct utimbuf" >&5
3768 cat > conftest.$ac_ext <<EOF
3769 #line 3770 "configure"
3770 #include "confdefs.h"
3771 #ifdef TIME_WITH_SYS_TIME
3772 #include <sys/time.h>
3773 #include <time.h>
3774 #else
3775 #ifdef HAVE_SYS_TIME_H
3776 #include <sys/time.h>
3777 #else
3778 #include <time.h>
3779 #endif
3780 #endif
3781 #ifdef HAVE_UTIME_H
3782 #include <utime.h>
3783 #endif
3784 int main() {
3785 static struct utimbuf x; x.actime = x.modtime;
3786 ; return 0; }
3787 EOF
3788 if { (eval echo configure:3789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3789   rm -rf conftest*
3790   echo "$ac_t""yes" 1>&6
3791    { test "$extra_verbose" = "yes" && cat << \EOF
3792     Defining HAVE_STRUCT_UTIMBUF
3793 EOF
3794 cat >> confdefs.h <<\EOF
3795 #define HAVE_STRUCT_UTIMBUF 1
3796 EOF
3797 }
3798
3799 else
3800   echo "configure: failed program was:" >&5
3801   cat conftest.$ac_ext >&5
3802   rm -rf conftest*
3803   echo "$ac_t""no" 1>&6
3804 fi
3805 rm -f conftest*
3806
3807 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3808 echo "configure:3809: checking return type of signal handlers" >&5
3809
3810 cat > conftest.$ac_ext <<EOF
3811 #line 3812 "configure"
3812 #include "confdefs.h"
3813 #include <sys/types.h>
3814 #include <signal.h>
3815 #ifdef signal
3816 #undef signal
3817 #endif
3818 #ifdef __cplusplus
3819 extern "C" void (*signal (int, void (*)(int)))(int);
3820 #else
3821 void (*signal ()) ();
3822 #endif
3823
3824 int main() {
3825 int i;
3826 ; return 0; }
3827 EOF
3828 if { (eval echo configure:3829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3829   rm -rf conftest*
3830   ac_cv_type_signal=void
3831 else
3832   echo "configure: failed program was:" >&5
3833   cat conftest.$ac_ext >&5
3834   rm -rf conftest*
3835   ac_cv_type_signal=int
3836 fi
3837 rm -f conftest*
3838
3839 echo "$ac_t""$ac_cv_type_signal" 1>&6
3840 { test "$extra_verbose" = "yes" && cat << EOF
3841     Defining RETSIGTYPE = $ac_cv_type_signal
3842 EOF
3843 cat >> confdefs.h <<EOF
3844 #define RETSIGTYPE $ac_cv_type_signal
3845 EOF
3846 }
3847
3848
3849 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3850 echo "configure:3851: checking for size_t" >&5
3851
3852 cat > conftest.$ac_ext <<EOF
3853 #line 3854 "configure"
3854 #include "confdefs.h"
3855 #include <sys/types.h>
3856 #if STDC_HEADERS
3857 #include <stdlib.h>
3858 #include <stddef.h>
3859 #endif
3860 EOF
3861 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3862   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3863   rm -rf conftest*
3864   ac_cv_type_size_t=yes
3865 else
3866   rm -rf conftest*
3867   ac_cv_type_size_t=no
3868 fi
3869 rm -f conftest*
3870
3871 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3872 if test $ac_cv_type_size_t = no; then
3873   { test "$extra_verbose" = "yes" && cat << \EOF
3874     Defining size_t = unsigned
3875 EOF
3876 cat >> confdefs.h <<\EOF
3877 #define size_t unsigned
3878 EOF
3879 }
3880
3881 fi
3882
3883 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3884 echo "configure:3885: checking for pid_t" >&5
3885
3886 cat > conftest.$ac_ext <<EOF
3887 #line 3888 "configure"
3888 #include "confdefs.h"
3889 #include <sys/types.h>
3890 #if STDC_HEADERS
3891 #include <stdlib.h>
3892 #include <stddef.h>
3893 #endif
3894 EOF
3895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3896   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3897   rm -rf conftest*
3898   ac_cv_type_pid_t=yes
3899 else
3900   rm -rf conftest*
3901   ac_cv_type_pid_t=no
3902 fi
3903 rm -f conftest*
3904
3905 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3906 if test $ac_cv_type_pid_t = no; then
3907   { test "$extra_verbose" = "yes" && cat << \EOF
3908     Defining pid_t = int
3909 EOF
3910 cat >> confdefs.h <<\EOF
3911 #define pid_t int
3912 EOF
3913 }
3914
3915 fi
3916
3917 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3918 echo "configure:3919: checking for uid_t in sys/types.h" >&5
3919
3920 cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3923 #include <sys/types.h>
3924 EOF
3925 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3926   egrep "uid_t" >/dev/null 2>&1; then
3927   rm -rf conftest*
3928   ac_cv_type_uid_t=yes
3929 else
3930   rm -rf conftest*
3931   ac_cv_type_uid_t=no
3932 fi
3933 rm -f conftest*
3934
3935
3936 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3937 if test $ac_cv_type_uid_t = no; then
3938   { test "$extra_verbose" = "yes" && cat << \EOF
3939     Defining uid_t = int
3940 EOF
3941 cat >> confdefs.h <<\EOF
3942 #define uid_t int
3943 EOF
3944 }
3945
3946   { test "$extra_verbose" = "yes" && cat << \EOF
3947     Defining gid_t = int
3948 EOF
3949 cat >> confdefs.h <<\EOF
3950 #define gid_t int
3951 EOF
3952 }
3953
3954 fi
3955
3956 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3957 echo "configure:3958: checking for mode_t" >&5
3958
3959 cat > conftest.$ac_ext <<EOF
3960 #line 3961 "configure"
3961 #include "confdefs.h"
3962 #include <sys/types.h>
3963 #if STDC_HEADERS
3964 #include <stdlib.h>
3965 #include <stddef.h>
3966 #endif
3967 EOF
3968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3969   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3970   rm -rf conftest*
3971   ac_cv_type_mode_t=yes
3972 else
3973   rm -rf conftest*
3974   ac_cv_type_mode_t=no
3975 fi
3976 rm -f conftest*
3977
3978 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3979 if test $ac_cv_type_mode_t = no; then
3980   { test "$extra_verbose" = "yes" && cat << \EOF
3981     Defining mode_t = int
3982 EOF
3983 cat >> confdefs.h <<\EOF
3984 #define mode_t int
3985 EOF
3986 }
3987
3988 fi
3989
3990 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3991 echo "configure:3992: checking for off_t" >&5
3992
3993 cat > conftest.$ac_ext <<EOF
3994 #line 3995 "configure"
3995 #include "confdefs.h"
3996 #include <sys/types.h>
3997 #if STDC_HEADERS
3998 #include <stdlib.h>
3999 #include <stddef.h>
4000 #endif
4001 EOF
4002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4003   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4004   rm -rf conftest*
4005   ac_cv_type_off_t=yes
4006 else
4007   rm -rf conftest*
4008   ac_cv_type_off_t=no
4009 fi
4010 rm -f conftest*
4011
4012 echo "$ac_t""$ac_cv_type_off_t" 1>&6
4013 if test $ac_cv_type_off_t = no; then
4014   { test "$extra_verbose" = "yes" && cat << \EOF
4015     Defining off_t = long
4016 EOF
4017 cat >> confdefs.h <<\EOF
4018 #define off_t long
4019 EOF
4020 }
4021
4022 fi
4023
4024 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
4025 echo "configure:4026: checking for ssize_t" >&5
4026
4027 cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 #include <sys/types.h>
4031 #if STDC_HEADERS
4032 #include <stdlib.h>
4033 #include <stddef.h>
4034 #endif
4035 EOF
4036 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4037   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
4038   rm -rf conftest*
4039   ac_cv_type_ssize_t=yes
4040 else
4041   rm -rf conftest*
4042   ac_cv_type_ssize_t=no
4043 fi
4044 rm -f conftest*
4045
4046 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
4047 if test $ac_cv_type_ssize_t = no; then
4048   { test "$extra_verbose" = "yes" && cat << \EOF
4049     Defining ssize_t = int
4050 EOF
4051 cat >> confdefs.h <<\EOF
4052 #define ssize_t int
4053 EOF
4054 }
4055
4056 fi
4057
4058
4059 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
4060 echo "configure:4061: checking for struct timeval" >&5
4061 cat > conftest.$ac_ext <<EOF
4062 #line 4063 "configure"
4063 #include "confdefs.h"
4064 #ifdef TIME_WITH_SYS_TIME
4065 #include <sys/time.h>
4066 #include <time.h>
4067 #else
4068 #ifdef HAVE_SYS_TIME_H
4069 #include <sys/time.h>
4070 #else
4071 #include <time.h>
4072 #endif
4073 #endif
4074 int main() {
4075 static struct timeval x; x.tv_sec = x.tv_usec;
4076 ; return 0; }
4077 EOF
4078 if { (eval echo configure:4079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4079   rm -rf conftest*
4080   echo "$ac_t""yes" 1>&6
4081   HAVE_TIMEVAL=yes
4082   { test "$extra_verbose" = "yes" && cat << \EOF
4083     Defining HAVE_TIMEVAL
4084 EOF
4085 cat >> confdefs.h <<\EOF
4086 #define HAVE_TIMEVAL 1
4087 EOF
4088 }
4089
4090 else
4091   echo "configure: failed program was:" >&5
4092   cat conftest.$ac_ext >&5
4093   rm -rf conftest*
4094   echo "$ac_t""no" 1>&6
4095    HAVE_TIMEVAL=no
4096 fi
4097 rm -f conftest*
4098
4099 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
4100 echo "configure:4101: checking whether struct tm is in sys/time.h or time.h" >&5
4101
4102 cat > conftest.$ac_ext <<EOF
4103 #line 4104 "configure"
4104 #include "confdefs.h"
4105 #include <sys/types.h>
4106 #include <time.h>
4107 int main() {
4108 struct tm *tp; tp->tm_sec;
4109 ; return 0; }
4110 EOF
4111 if { (eval echo configure:4112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4112   rm -rf conftest*
4113   ac_cv_struct_tm=time.h
4114 else
4115   echo "configure: failed program was:" >&5
4116   cat conftest.$ac_ext >&5
4117   rm -rf conftest*
4118   ac_cv_struct_tm=sys/time.h
4119 fi
4120 rm -f conftest*
4121
4122 echo "$ac_t""$ac_cv_struct_tm" 1>&6
4123 if test $ac_cv_struct_tm = sys/time.h; then
4124   { test "$extra_verbose" = "yes" && cat << \EOF
4125     Defining TM_IN_SYS_TIME
4126 EOF
4127 cat >> confdefs.h <<\EOF
4128 #define TM_IN_SYS_TIME 1
4129 EOF
4130 }
4131
4132 fi
4133
4134 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4135 echo "configure:4136: checking for tm_zone in struct tm" >&5
4136
4137 cat > conftest.$ac_ext <<EOF
4138 #line 4139 "configure"
4139 #include "confdefs.h"
4140 #include <sys/types.h>
4141 #include <$ac_cv_struct_tm>
4142 int main() {
4143 struct tm tm; tm.tm_zone;
4144 ; return 0; }
4145 EOF
4146 if { (eval echo configure:4147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4147   rm -rf conftest*
4148   ac_cv_struct_tm_zone=yes
4149 else
4150   echo "configure: failed program was:" >&5
4151   cat conftest.$ac_ext >&5
4152   rm -rf conftest*
4153   ac_cv_struct_tm_zone=no
4154 fi
4155 rm -f conftest*
4156
4157 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4158 if test "$ac_cv_struct_tm_zone" = yes; then
4159   { test "$extra_verbose" = "yes" && cat << \EOF
4160     Defining HAVE_TM_ZONE
4161 EOF
4162 cat >> confdefs.h <<\EOF
4163 #define HAVE_TM_ZONE 1
4164 EOF
4165 }
4166
4167 else
4168   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4169 echo "configure:4170: checking for tzname" >&5
4170
4171 cat > conftest.$ac_ext <<EOF
4172 #line 4173 "configure"
4173 #include "confdefs.h"
4174 #include <time.h>
4175 #ifndef tzname /* For SGI.  */
4176 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4177 #endif
4178 int main() {
4179 atoi(*tzname);
4180 ; return 0; }
4181 EOF
4182 if { (eval echo configure:4183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4183   rm -rf conftest*
4184   ac_cv_var_tzname=yes
4185 else
4186   echo "configure: failed program was:" >&5
4187   cat conftest.$ac_ext >&5
4188   rm -rf conftest*
4189   ac_cv_var_tzname=no
4190 fi
4191 rm -f conftest*
4192
4193 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4194   if test $ac_cv_var_tzname = yes; then
4195     { test "$extra_verbose" = "yes" && cat << \EOF
4196     Defining HAVE_TZNAME
4197 EOF
4198 cat >> confdefs.h <<\EOF
4199 #define HAVE_TZNAME 1
4200 EOF
4201 }
4202
4203   fi
4204 fi
4205
4206
4207 echo $ac_n "checking for working const""... $ac_c" 1>&6
4208 echo "configure:4209: checking for working const" >&5
4209
4210 cat > conftest.$ac_ext <<EOF
4211 #line 4212 "configure"
4212 #include "confdefs.h"
4213
4214 int main() {
4215
4216 /* Ultrix mips cc rejects this.  */
4217 typedef int charset[2]; const charset x = {0,0};
4218 /* SunOS 4.1.1 cc rejects this.  */
4219 char const *const *ccp;
4220 char **p;
4221 /* NEC SVR4.0.2 mips cc rejects this.  */
4222 struct point {int x, y;};
4223 static struct point const zero = {0,0};
4224 /* AIX XL C 1.02.0.0 rejects this.
4225    It does not let you subtract one const X* pointer from another in an arm
4226    of an if-expression whose if-part is not a constant expression */
4227 const char *g = "string";
4228 ccp = &g + (g ? g-g : 0);
4229 /* HPUX 7.0 cc rejects these. */
4230 ++ccp;
4231 p = (char**) ccp;
4232 ccp = (char const *const *) p;
4233 { /* SCO 3.2v4 cc rejects this.  */
4234   char *t;
4235   char const *s = 0 ? (char *) 0 : (char const *) 0;
4236
4237   *t++ = 0;
4238 }
4239 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4240   int x[] = {25, 17};
4241   const int *foo = &x[0];
4242   ++foo;
4243 }
4244 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4245   typedef const int *iptr;
4246   iptr p = 0;
4247   ++p;
4248 }
4249 { /* AIX XL C 1.02.0.0 rejects this saying
4250      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4251   struct s { int j; const int *ap[3]; };
4252   struct s *b; b->j = 5;
4253 }
4254 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4255   const int foo = 10;
4256 }
4257
4258 ; return 0; }
4259 EOF
4260 if { (eval echo configure:4261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4261   rm -rf conftest*
4262   ac_cv_c_const=yes
4263 else
4264   echo "configure: failed program was:" >&5
4265   cat conftest.$ac_ext >&5
4266   rm -rf conftest*
4267   ac_cv_c_const=no
4268 fi
4269 rm -f conftest*
4270
4271 echo "$ac_t""$ac_cv_c_const" 1>&6
4272 if test $ac_cv_c_const = no; then
4273   { test "$extra_verbose" = "yes" && cat << \EOF
4274     Defining const = 
4275 EOF
4276 cat >> confdefs.h <<\EOF
4277 #define const 
4278 EOF
4279 }
4280
4281 fi
4282
4283
4284 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4285 echo "configure:4286: checking whether ${MAKE-make} sets \${MAKE}" >&5
4286 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4287
4288 cat > conftestmake <<\EOF
4289 all:
4290         @echo 'ac_maketemp="${MAKE}"'
4291 EOF
4292 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4293 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4294 if test -n "$ac_maketemp"; then
4295   eval ac_cv_prog_make_${ac_make}_set=yes
4296 else
4297   eval ac_cv_prog_make_${ac_make}_set=no
4298 fi
4299 rm -f conftestmake
4300 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4301   echo "$ac_t""yes" 1>&6
4302   SET_MAKE=
4303 else
4304   echo "$ac_t""no" 1>&6
4305   SET_MAKE="MAKE=${MAKE-make}"
4306 fi
4307
4308
4309 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4310 echo "configure:4311: checking whether byte ordering is bigendian" >&5
4311
4312 ac_cv_c_bigendian=unknown
4313 # See if sys/param.h defines the BYTE_ORDER macro.
4314 cat > conftest.$ac_ext <<EOF
4315 #line 4316 "configure"
4316 #include "confdefs.h"
4317 #include <sys/types.h>
4318 #include <sys/param.h>
4319 int main() {
4320
4321 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4322  bogus endian macros
4323 #endif
4324 ; return 0; }
4325 EOF
4326 if { (eval echo configure:4327: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4327   rm -rf conftest*
4328   # It does; now see whether it defined to BIG_ENDIAN or not.
4329 cat > conftest.$ac_ext <<EOF
4330 #line 4331 "configure"
4331 #include "confdefs.h"
4332 #include <sys/types.h>
4333 #include <sys/param.h>
4334 int main() {
4335
4336 #if BYTE_ORDER != BIG_ENDIAN
4337  not big endian
4338 #endif
4339 ; return 0; }
4340 EOF
4341 if { (eval echo configure:4342: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4342   rm -rf conftest*
4343   ac_cv_c_bigendian=yes
4344 else
4345   echo "configure: failed program was:" >&5
4346   cat conftest.$ac_ext >&5
4347   rm -rf conftest*
4348   ac_cv_c_bigendian=no
4349 fi
4350 rm -f conftest*
4351 else
4352   echo "configure: failed program was:" >&5
4353   cat conftest.$ac_ext >&5
4354 fi
4355 rm -f conftest*
4356 if test $ac_cv_c_bigendian = unknown; then
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 main () {
4361   /* Are we little or big endian?  From Harbison&Steele.  */
4362   union
4363   {
4364     long l;
4365     char c[sizeof (long)];
4366   } u;
4367   u.l = 1;
4368   exit (u.c[sizeof (long) - 1] == 1);
4369 }
4370 EOF
4371 if { (eval echo configure:4372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4372 then
4373   ac_cv_c_bigendian=no
4374 else
4375   conftest_rc="$?"
4376   echo "configure: failed program was:" >&5
4377   cat conftest.$ac_ext >&5
4378   rm -fr conftest*
4379   ac_cv_c_bigendian=yes
4380 fi
4381 rm -fr conftest*
4382 fi
4383
4384 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4385 if test $ac_cv_c_bigendian = yes; then
4386   { test "$extra_verbose" = "yes" && cat << \EOF
4387     Defining WORDS_BIGENDIAN
4388 EOF
4389 cat >> confdefs.h <<\EOF
4390 #define WORDS_BIGENDIAN 1
4391 EOF
4392 }
4393
4394 fi
4395
4396
4397 echo $ac_n "checking size of short""... $ac_c" 1>&6
4398 echo "configure:4399: checking size of short" >&5
4399
4400 cat > conftest.$ac_ext <<EOF
4401 #line 4402 "configure"
4402 #include "confdefs.h"
4403 #include <stdio.h>
4404 main()
4405 {
4406   FILE *f=fopen("conftestval", "w");
4407   if (!f) exit(1);
4408   fprintf(f, "%d\n", sizeof(short));
4409   exit(0);
4410 }
4411 EOF
4412 if { (eval echo configure:4413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4413 then
4414   ac_cv_sizeof_short=`cat conftestval`
4415 else
4416   conftest_rc="$?"
4417   echo "configure: failed program was:" >&5
4418   cat conftest.$ac_ext >&5
4419   rm -fr conftest*
4420   ac_cv_sizeof_short=0
4421 fi
4422 rm -fr conftest*
4423 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4424 { test "$extra_verbose" = "yes" && cat << EOF
4425     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4426 EOF
4427 cat >> confdefs.h <<EOF
4428 #define SIZEOF_SHORT $ac_cv_sizeof_short
4429 EOF
4430 }
4431
4432
4433 if test "$ac_cv_sizeof_short" = 0; then
4434   echo ""
4435   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4436   echo "*** PANIC *** Please examine config.log for compilation errors."
4437   exit 1
4438 fi
4439 echo $ac_n "checking size of int""... $ac_c" 1>&6
4440 echo "configure:4441: checking size of int" >&5
4441
4442 cat > conftest.$ac_ext <<EOF
4443 #line 4444 "configure"
4444 #include "confdefs.h"
4445 #include <stdio.h>
4446 main()
4447 {
4448   FILE *f=fopen("conftestval", "w");
4449   if (!f) exit(1);
4450   fprintf(f, "%d\n", sizeof(int));
4451   exit(0);
4452 }
4453 EOF
4454 if { (eval echo configure:4455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4455 then
4456   ac_cv_sizeof_int=`cat conftestval`
4457 else
4458   conftest_rc="$?"
4459   echo "configure: failed program was:" >&5
4460   cat conftest.$ac_ext >&5
4461   rm -fr conftest*
4462   ac_cv_sizeof_int=0
4463 fi
4464 rm -fr conftest*
4465 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4466 { test "$extra_verbose" = "yes" && cat << EOF
4467     Defining SIZEOF_INT = $ac_cv_sizeof_int
4468 EOF
4469 cat >> confdefs.h <<EOF
4470 #define SIZEOF_INT $ac_cv_sizeof_int
4471 EOF
4472 }
4473
4474
4475 echo $ac_n "checking size of long""... $ac_c" 1>&6
4476 echo "configure:4477: checking size of long" >&5
4477
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 #include <stdio.h>
4482 main()
4483 {
4484   FILE *f=fopen("conftestval", "w");
4485   if (!f) exit(1);
4486   fprintf(f, "%d\n", sizeof(long));
4487   exit(0);
4488 }
4489 EOF
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4491 then
4492   ac_cv_sizeof_long=`cat conftestval`
4493 else
4494   conftest_rc="$?"
4495   echo "configure: failed program was:" >&5
4496   cat conftest.$ac_ext >&5
4497   rm -fr conftest*
4498   ac_cv_sizeof_long=0
4499 fi
4500 rm -fr conftest*
4501 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4502 { test "$extra_verbose" = "yes" && cat << EOF
4503     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4504 EOF
4505 cat >> confdefs.h <<EOF
4506 #define SIZEOF_LONG $ac_cv_sizeof_long
4507 EOF
4508 }
4509
4510
4511 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4512 echo "configure:4513: checking size of long long" >&5
4513
4514 cat > conftest.$ac_ext <<EOF
4515 #line 4516 "configure"
4516 #include "confdefs.h"
4517 #include <stdio.h>
4518 main()
4519 {
4520   FILE *f=fopen("conftestval", "w");
4521   if (!f) exit(1);
4522   fprintf(f, "%d\n", sizeof(long long));
4523   exit(0);
4524 }
4525 EOF
4526 if { (eval echo configure:4527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4527 then
4528   ac_cv_sizeof_long_long=`cat conftestval`
4529 else
4530   conftest_rc="$?"
4531   echo "configure: failed program was:" >&5
4532   cat conftest.$ac_ext >&5
4533   rm -fr conftest*
4534   ac_cv_sizeof_long_long=0
4535 fi
4536 rm -fr conftest*
4537 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4538 { test "$extra_verbose" = "yes" && cat << EOF
4539     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4540 EOF
4541 cat >> confdefs.h <<EOF
4542 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4543 EOF
4544 }
4545
4546
4547 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4548 echo "configure:4549: checking size of void *" >&5
4549
4550 cat > conftest.$ac_ext <<EOF
4551 #line 4552 "configure"
4552 #include "confdefs.h"
4553 #include <stdio.h>
4554 main()
4555 {
4556   FILE *f=fopen("conftestval", "w");
4557   if (!f) exit(1);
4558   fprintf(f, "%d\n", sizeof(void *));
4559   exit(0);
4560 }
4561 EOF
4562 if { (eval echo configure:4563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4563 then
4564   ac_cv_sizeof_void_p=`cat conftestval`
4565 else
4566   conftest_rc="$?"
4567   echo "configure: failed program was:" >&5
4568   cat conftest.$ac_ext >&5
4569   rm -fr conftest*
4570   ac_cv_sizeof_void_p=0
4571 fi
4572 rm -fr conftest*
4573 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4574 { test "$extra_verbose" = "yes" && cat << EOF
4575     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4576 EOF
4577 cat >> confdefs.h <<EOF
4578 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4579 EOF
4580 }
4581
4582
4583
4584 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4585 echo "configure:4586: checking for long file names" >&5
4586
4587 ac_cv_sys_long_file_names=yes
4588 # Test for long file names in all the places we know might matter:
4589 #      .                the current directory, where building will happen
4590 #      $prefix/lib      where we will be installing things
4591 #      $exec_prefix/lib likewise
4592 # eval it to expand exec_prefix.
4593 #      $TMPDIR          if set, where it might want to write temporary files
4594 # if $TMPDIR is not set:
4595 #      /tmp             where it might want to write temporary files
4596 #      /var/tmp         likewise
4597 #      /usr/tmp         likewise
4598 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4599   ac_tmpdirs="$TMPDIR"
4600 else
4601   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4602 fi
4603 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4604   test -d $ac_dir || continue
4605   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4606   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4607   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4608   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4609   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4610     ac_cv_sys_long_file_names=no
4611     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4612     break
4613   fi
4614   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4615 done
4616
4617 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4618 if test $ac_cv_sys_long_file_names = yes; then
4619   { test "$extra_verbose" = "yes" && cat << \EOF
4620     Defining HAVE_LONG_FILE_NAMES
4621 EOF
4622 cat >> confdefs.h <<\EOF
4623 #define HAVE_LONG_FILE_NAMES 1
4624 EOF
4625 }
4626
4627 fi
4628
4629
4630 echo $ac_n "checking for sin""... $ac_c" 1>&6
4631 echo "configure:4632: checking for sin" >&5
4632
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 /* System header to define __stub macros and hopefully few prototypes,
4637     which can conflict with char sin(); below.  */
4638 #include <assert.h>
4639 /* Override any gcc2 internal prototype to avoid an error.  */
4640 /* We use char because int might match the return type of a gcc2
4641     builtin and then its argument prototype would still apply.  */
4642 char sin();
4643
4644 int main() {
4645
4646 /* The GNU C library defines this for functions which it implements
4647     to always fail with ENOSYS.  Some functions are actually named
4648     something starting with __ and the normal name is an alias.  */
4649 #if defined (__stub_sin) || defined (__stub___sin)
4650 choke me
4651 #else
4652 sin();
4653 #endif
4654
4655 ; return 0; }
4656 EOF
4657 if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4658   rm -rf conftest*
4659   eval "ac_cv_func_sin=yes"
4660 else
4661   echo "configure: failed program was:" >&5
4662   cat conftest.$ac_ext >&5
4663   rm -rf conftest*
4664   eval "ac_cv_func_sin=no"
4665 fi
4666 rm -f conftest*
4667
4668 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4669   echo "$ac_t""yes" 1>&6
4670   :
4671 else
4672   echo "$ac_t""no" 1>&6
4673
4674 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4675 echo "configure:4676: checking for sin in -lm" >&5
4676 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4677
4678 xe_check_libs=" -lm "
4679 cat > conftest.$ac_ext <<EOF
4680 #line 4681 "configure"
4681 #include "confdefs.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 sin()
4689 ; return 0; }
4690 EOF
4691 if { (eval echo configure:4692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4692   rm -rf conftest*
4693   eval "ac_cv_lib_$ac_lib_var=yes"
4694 else
4695   echo "configure: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   rm -rf conftest*
4698   eval "ac_cv_lib_$ac_lib_var=no"
4699 fi
4700 rm -f conftest*
4701 xe_check_libs=""
4702
4703 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4704   echo "$ac_t""yes" 1>&6
4705     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4706     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4707   { test "$extra_verbose" = "yes" && cat << EOF
4708     Defining $ac_tr_lib
4709 EOF
4710 cat >> confdefs.h <<EOF
4711 #define $ac_tr_lib 1
4712 EOF
4713 }
4714
4715   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4716
4717 else
4718   echo "$ac_t""no" 1>&6
4719 fi
4720
4721
4722 fi
4723
4724
4725 { test "$extra_verbose" = "yes" && cat << \EOF
4726     Defining LISP_FLOAT_TYPE
4727 EOF
4728 cat >> confdefs.h <<\EOF
4729 #define LISP_FLOAT_TYPE 1
4730 EOF
4731 }
4732
4733
4734 cat > conftest.$ac_ext <<EOF
4735 #line 4736 "configure"
4736 #include "confdefs.h"
4737 #include <math.h>
4738 int main() {
4739 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4740 ; return 0; }
4741 EOF
4742 if { (eval echo configure:4743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4743   rm -rf conftest*
4744   { test "$extra_verbose" = "yes" && cat << \EOF
4745     Defining HAVE_INVERSE_HYPERBOLIC
4746 EOF
4747 cat >> confdefs.h <<\EOF
4748 #define HAVE_INVERSE_HYPERBOLIC 1
4749 EOF
4750 }
4751
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755 fi
4756 rm -f conftest*
4757
4758 echo "checking type of mail spool file locking" 1>&6
4759 echo "configure:4760: checking type of mail spool file locking" >&5
4760 for ac_func in lockf flock
4761 do
4762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4763 echo "configure:4764: checking for $ac_func" >&5
4764
4765 cat > conftest.$ac_ext <<EOF
4766 #line 4767 "configure"
4767 #include "confdefs.h"
4768 /* System header to define __stub macros and hopefully few prototypes,
4769     which can conflict with char $ac_func(); below.  */
4770 #include <assert.h>
4771 /* Override any gcc2 internal prototype to avoid an error.  */
4772 /* We use char because int might match the return type of a gcc2
4773     builtin and then its argument prototype would still apply.  */
4774 char $ac_func();
4775
4776 int main() {
4777
4778 /* The GNU C library defines this for functions which it implements
4779     to always fail with ENOSYS.  Some functions are actually named
4780     something starting with __ and the normal name is an alias.  */
4781 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4782 choke me
4783 #else
4784 $ac_func();
4785 #endif
4786
4787 ; return 0; }
4788 EOF
4789 if { (eval echo configure:4790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790   rm -rf conftest*
4791   eval "ac_cv_func_$ac_func=yes"
4792 else
4793   echo "configure: failed program was:" >&5
4794   cat conftest.$ac_ext >&5
4795   rm -rf conftest*
4796   eval "ac_cv_func_$ac_func=no"
4797 fi
4798 rm -f conftest*
4799
4800 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4801   echo "$ac_t""yes" 1>&6
4802     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4803   { test "$extra_verbose" = "yes" && cat << EOF
4804     Defining $ac_tr_func
4805 EOF
4806 cat >> confdefs.h <<EOF
4807 #define $ac_tr_func 1
4808 EOF
4809 }
4810  
4811 else
4812   echo "$ac_t""no" 1>&6
4813 fi
4814 done
4815
4816 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4817 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4818 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4819 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4820     Defining MAIL_LOCK_LOCKF
4821 EOF
4822 cat >> confdefs.h <<\EOF
4823 #define MAIL_LOCK_LOCKF 1
4824 EOF
4825 }
4826
4827 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4828     Defining MAIL_LOCK_FLOCK
4829 EOF
4830 cat >> confdefs.h <<\EOF
4831 #define MAIL_LOCK_FLOCK 1
4832 EOF
4833 }
4834
4835 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4836     Defining MAIL_LOCK_LOCKING
4837 EOF
4838 cat >> confdefs.h <<\EOF
4839 #define MAIL_LOCK_LOCKING 1
4840 EOF
4841 }
4842
4843 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4844     Defining MAIL_LOCK_DOT
4845 EOF
4846 cat >> confdefs.h <<\EOF
4847 #define MAIL_LOCK_DOT 1
4848 EOF
4849 }
4850
4851 fi
4852 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4853   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4854 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4855   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4856 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4857   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4858
4859 case "$opsys" in decosf*)
4860   
4861 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4862 echo "configure:4863: checking for cma_open in -lpthreads" >&5
4863 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4864
4865 xe_check_libs=" -lpthreads "
4866 cat > conftest.$ac_ext <<EOF
4867 #line 4868 "configure"
4868 #include "confdefs.h"
4869 /* Override any gcc2 internal prototype to avoid an error.  */
4870 /* We use char because int might match the return type of a gcc2
4871     builtin and then its argument prototype would still apply.  */
4872 char cma_open();
4873
4874 int main() {
4875 cma_open()
4876 ; return 0; }
4877 EOF
4878 if { (eval echo configure:4879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4879   rm -rf conftest*
4880   eval "ac_cv_lib_$ac_lib_var=yes"
4881 else
4882   echo "configure: failed program was:" >&5
4883   cat conftest.$ac_ext >&5
4884   rm -rf conftest*
4885   eval "ac_cv_lib_$ac_lib_var=no"
4886 fi
4887 rm -f conftest*
4888 xe_check_libs=""
4889
4890 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4891   echo "$ac_t""yes" 1>&6
4892     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4893     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4894   { test "$extra_verbose" = "yes" && cat << EOF
4895     Defining $ac_tr_lib
4896 EOF
4897 cat >> confdefs.h <<EOF
4898 #define $ac_tr_lib 1
4899 EOF
4900 }
4901
4902   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4903
4904 else
4905   echo "$ac_t""no" 1>&6
4906 fi
4907
4908
4909   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4910     c_switch_site="$c_switch_site -threads" ;;
4911 esac
4912
4913 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4914 echo "configure:4915: checking whether the -xildoff compiler flag is required" >&5
4915 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4916   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4917     then echo "$ac_t""no" 1>&6;
4918     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
4919   fi
4920   else echo "$ac_t""no" 1>&6
4921 fi
4922
4923 if test "$opsys" = "sol2"; then
4924   if test "$os_release" -ge 56; then
4925     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4926 echo "configure:4927: checking for \"-z ignore\" linker flag" >&5
4927     case "`ld -h 2>&1`" in
4928       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4929         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4930       *) echo "$ac_t""no" 1>&6 ;;
4931     esac
4932   fi
4933 fi
4934
4935
4936 echo "checking "for specified window system"" 1>&6
4937 echo "configure:4938: checking "for specified window system"" >&5
4938
4939 if test "$with_x11" != "no"; then
4940     test "$x_includes $x_libraries" != "NONE NONE" && \
4941    window_system=x11 with_x11=yes
4942
4943         
4944       if test "$x_includes $x_libraries" = "NONE NONE" \
4945     -a -n "$OPENWINHOME" \
4946     -a "$OPENWINHOME" != "/usr/openwin" \
4947     -a -d "$OPENWINHOME"; then
4948       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4949       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4950       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4951   fi
4952
4953   if test "$x_includes" = "NONE"; then
4954                     for dir in "/usr/X11" "/usr/X11R6"; do
4955       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4956     done
4957   fi
4958
4959   if test "$x_libraries" = "NONE"; then
4960     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4961       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4962     done
4963   fi
4964
4965   # If we find X, set shell vars x_includes and x_libraries to the
4966 # paths, otherwise set no_x=yes.
4967 # Uses ac_ vars as temps to allow command line to override cache and checks.
4968 # --without-x overrides everything else, but does not touch the cache.
4969 echo $ac_n "checking for X""... $ac_c" 1>&6
4970 echo "configure:4971: checking for X" >&5
4971
4972 # Check whether --with-x or --without-x was given.
4973 if test "${with_x+set}" = set; then
4974   withval="$with_x"
4975   :
4976 fi
4977
4978 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4979 if test "x$with_x" = xno; then
4980   # The user explicitly disabled X.
4981   have_x=disabled
4982 else
4983   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4984     # Both variables are already set.
4985     have_x=yes
4986   else
4987
4988 # One or both of the vars are not set, and there is no cached value.
4989 ac_x_includes=NO ac_x_libraries=NO
4990 rm -fr conftestdir
4991 if mkdir conftestdir; then
4992   cd conftestdir
4993   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4994   cat > Imakefile <<'EOF'
4995 acfindx:
4996         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4997 EOF
4998   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4999     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5000     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
5001     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
5002     for ac_extension in a so sl; do
5003       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
5004         test -f $ac_im_libdir/libX11.$ac_extension; then
5005         ac_im_usrlibdir=$ac_im_libdir; break
5006       fi
5007     done
5008     # Screen out bogus values from the imake configuration.  They are
5009     # bogus both because they are the default anyway, and because
5010     # using them would break gcc on systems where it needs fixed includes.
5011     case "$ac_im_incroot" in
5012         /usr/include) ;;
5013         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
5014     esac
5015     case "$ac_im_usrlibdir" in
5016         /usr/lib | /lib) ;;
5017         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
5018     esac
5019   fi
5020   cd ..
5021   rm -fr conftestdir
5022 fi
5023
5024 if test "$ac_x_includes" = NO; then
5025   # Guess where to find include files, by looking for this one X11 .h file.
5026   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
5027
5028   # First, try using that file with no special directory specified.
5029 cat > conftest.$ac_ext <<EOF
5030 #line 5031 "configure"
5031 #include "confdefs.h"
5032 #include <$x_direct_test_include>
5033 EOF
5034 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5035 { (eval echo configure:5036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5036 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5037 if test -z "$ac_err"; then
5038   rm -rf conftest*
5039   # We can compile using X headers with no special include directory.
5040 ac_x_includes=
5041 else
5042   echo "$ac_err" >&5
5043   echo "configure: failed program was:" >&5
5044   cat conftest.$ac_ext >&5
5045   rm -rf conftest*
5046   # Look for the header file in a standard set of common directories.
5047 # Check X11 before X11Rn because it is often a symlink to the current release.
5048   for ac_dir in               \
5049     /usr/X11/include          \
5050     /usr/X11R6/include        \
5051     /usr/X11R5/include        \
5052     /usr/X11R4/include        \
5053                               \
5054     /usr/include/X11          \
5055     /usr/include/X11R6        \
5056     /usr/include/X11R5        \
5057     /usr/include/X11R4        \
5058                               \
5059     /usr/local/X11/include    \
5060     /usr/local/X11R6/include  \
5061     /usr/local/X11R5/include  \
5062     /usr/local/X11R4/include  \
5063                               \
5064     /usr/local/include/X11    \
5065     /usr/local/include/X11R6  \
5066     /usr/local/include/X11R5  \
5067     /usr/local/include/X11R4  \
5068                               \
5069     /usr/X386/include         \
5070     /usr/x386/include         \
5071     /usr/XFree86/include/X11  \
5072                               \
5073     /usr/include              \
5074     /usr/local/include        \
5075     /usr/unsupported/include  \
5076     /usr/athena/include       \
5077     /usr/local/x11r5/include  \
5078     /usr/lpp/Xamples/include  \
5079                               \
5080     /usr/openwin/include      \
5081     /usr/openwin/share/include \
5082     ; \
5083   do
5084     if test -r "$ac_dir/$x_direct_test_include"; then
5085       ac_x_includes=$ac_dir
5086       break
5087     fi
5088   done
5089 fi
5090 rm -f conftest*
5091 fi # $ac_x_includes = NO
5092
5093 if test "$ac_x_libraries" = NO; then
5094   # Check for the libraries.
5095
5096   test -z "$x_direct_test_library" && x_direct_test_library=Xt
5097   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
5098
5099   # See if we find them without any special options.
5100   # Don't add to $LIBS permanently.
5101   ac_save_LIBS="$LIBS"
5102   LIBS="-l$x_direct_test_library $LIBS"
5103 cat > conftest.$ac_ext <<EOF
5104 #line 5105 "configure"
5105 #include "confdefs.h"
5106
5107 int main() {
5108 ${x_direct_test_function}()
5109 ; return 0; }
5110 EOF
5111 if { (eval echo configure:5112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5112   rm -rf conftest*
5113   LIBS="$ac_save_LIBS"
5114 # We can link X programs with no special library path.
5115 ac_x_libraries=
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   LIBS="$ac_save_LIBS"
5121 # First see if replacing the include by lib works.
5122 # Check X11 before X11Rn because it is often a symlink to the current release.
5123 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
5124     /usr/X11/lib          \
5125     /usr/X11R6/lib        \
5126     /usr/X11R5/lib        \
5127     /usr/X11R4/lib        \
5128                           \
5129     /usr/lib/X11          \
5130     /usr/lib/X11R6        \
5131     /usr/lib/X11R5        \
5132     /usr/lib/X11R4        \
5133                           \
5134     /usr/local/X11/lib    \
5135     /usr/local/X11R6/lib  \
5136     /usr/local/X11R5/lib  \
5137     /usr/local/X11R4/lib  \
5138                           \
5139     /usr/local/lib/X11    \
5140     /usr/local/lib/X11R6  \
5141     /usr/local/lib/X11R5  \
5142     /usr/local/lib/X11R4  \
5143                           \
5144     /usr/X386/lib         \
5145     /usr/x386/lib         \
5146     /usr/XFree86/lib/X11  \
5147                           \
5148     /usr/lib              \
5149     /usr/local/lib        \
5150     /usr/unsupported/lib  \
5151     /usr/athena/lib       \
5152     /usr/local/x11r5/lib  \
5153     /usr/lpp/Xamples/lib  \
5154     /lib/usr/lib/X11      \
5155                           \
5156     /usr/openwin/lib      \
5157     /usr/openwin/share/lib \
5158     ; \
5159 do
5160   for ac_extension in a so sl; do
5161     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5162       ac_x_libraries=$ac_dir
5163       break 2
5164     fi
5165   done
5166 done
5167 fi
5168 rm -f conftest*
5169 fi # $ac_x_libraries = NO
5170
5171 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5172   # Didn't find X anywhere.  Cache the known absence of X.
5173   ac_cv_have_x="have_x=no"
5174 else
5175   # Record where we found X for the cache.
5176   ac_cv_have_x="have_x=yes \
5177                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5178 fi
5179   fi
5180   eval "$ac_cv_have_x"
5181 fi # $with_x != no
5182
5183 if test "$have_x" != yes; then
5184   echo "$ac_t""$have_x" 1>&6
5185   no_x=yes
5186 else
5187   # If each of the values was on the command line, it overrides each guess.
5188   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5189   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5190   # Update the cache value to reflect the command line values.
5191   ac_cv_have_x="have_x=yes \
5192                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5193   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5194 fi
5195
5196 if test "$no_x" = yes; then
5197   # Not all programs may use this symbol, but it does not hurt to define it.
5198   { test "$extra_verbose" = "yes" && cat << \EOF
5199     Defining X_DISPLAY_MISSING
5200 EOF
5201 cat >> confdefs.h <<\EOF
5202 #define X_DISPLAY_MISSING 1
5203 EOF
5204 }
5205
5206   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5207 else
5208   if test -n "$x_includes"; then
5209     X_CFLAGS="$X_CFLAGS -I$x_includes"
5210   fi
5211
5212   # It would also be nice to do this for all -L options, not just this one.
5213   if test -n "$x_libraries"; then
5214     X_LIBS="$X_LIBS -L$x_libraries"
5215     # For Solaris; some versions of Sun CC require a space after -R and
5216     # others require no space.  Words are not sufficient . . . .
5217     case "`(uname -sr) 2>/dev/null`" in
5218     "SunOS 5"*)
5219       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5220 echo "configure:5221: checking whether -R must be followed by a space" >&5
5221       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5222       cat > conftest.$ac_ext <<EOF
5223 #line 5224 "configure"
5224 #include "confdefs.h"
5225
5226 int main() {
5227
5228 ; return 0; }
5229 EOF
5230 if { (eval echo configure:5231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5231   rm -rf conftest*
5232   ac_R_nospace=yes
5233 else
5234   echo "configure: failed program was:" >&5
5235   cat conftest.$ac_ext >&5
5236   rm -rf conftest*
5237   ac_R_nospace=no
5238 fi
5239 rm -f conftest*
5240       if test $ac_R_nospace = yes; then
5241         echo "$ac_t""no" 1>&6
5242         X_LIBS="$X_LIBS -R$x_libraries"
5243       else
5244         LIBS="$ac_xsave_LIBS -R $x_libraries"
5245         cat > conftest.$ac_ext <<EOF
5246 #line 5247 "configure"
5247 #include "confdefs.h"
5248
5249 int main() {
5250
5251 ; return 0; }
5252 EOF
5253 if { (eval echo configure:5254: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5254   rm -rf conftest*
5255   ac_R_space=yes
5256 else
5257   echo "configure: failed program was:" >&5
5258   cat conftest.$ac_ext >&5
5259   rm -rf conftest*
5260   ac_R_space=no
5261 fi
5262 rm -f conftest*
5263         if test $ac_R_space = yes; then
5264           echo "$ac_t""yes" 1>&6
5265           X_LIBS="$X_LIBS -R $x_libraries"
5266         else
5267           echo "$ac_t""neither works" 1>&6
5268         fi
5269       fi
5270       LIBS="$ac_xsave_LIBS"
5271     esac
5272   fi
5273
5274   # Check for system-dependent libraries X programs must link with.
5275   # Do this before checking for the system-independent R6 libraries
5276   # (-lICE), since we may need -lsocket or whatever for X linking.
5277
5278   if test "$ISC" = yes; then
5279     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5280   else
5281     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5282     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5283     # the Alpha needs dnet_stub (dnet does not exist).
5284     if test "$with_dnet" = "no" ; then
5285 ac_cv_lib_dnet_dnet_ntoa=no
5286 else
5287
5288 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5289 echo "configure:5290: checking for dnet_ntoa in -ldnet" >&5
5290 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5291
5292 xe_check_libs=" -ldnet "
5293 cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296 /* Override any gcc2 internal prototype to avoid an error.  */
5297 /* We use char because int might match the return type of a gcc2
5298     builtin and then its argument prototype would still apply.  */
5299 char dnet_ntoa();
5300
5301 int main() {
5302 dnet_ntoa()
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   eval "ac_cv_lib_$ac_lib_var=yes"
5308 else
5309   echo "configure: failed program was:" >&5
5310   cat conftest.$ac_ext >&5
5311   rm -rf conftest*
5312   eval "ac_cv_lib_$ac_lib_var=no"
5313 fi
5314 rm -f conftest*
5315 xe_check_libs=""
5316
5317 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5318   echo "$ac_t""yes" 1>&6
5319   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5320 else
5321   echo "$ac_t""no" 1>&6
5322 fi
5323
5324 fi
5325
5326     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5327       
5328 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5329 echo "configure:5330: checking for dnet_ntoa in -ldnet_stub" >&5
5330 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5331
5332 xe_check_libs=" -ldnet_stub "
5333 cat > conftest.$ac_ext <<EOF
5334 #line 5335 "configure"
5335 #include "confdefs.h"
5336 /* Override any gcc2 internal prototype to avoid an error.  */
5337 /* We use char because int might match the return type of a gcc2
5338     builtin and then its argument prototype would still apply.  */
5339 char dnet_ntoa();
5340
5341 int main() {
5342 dnet_ntoa()
5343 ; return 0; }
5344 EOF
5345 if { (eval echo configure:5346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5346   rm -rf conftest*
5347   eval "ac_cv_lib_$ac_lib_var=yes"
5348 else
5349   echo "configure: failed program was:" >&5
5350   cat conftest.$ac_ext >&5
5351   rm -rf conftest*
5352   eval "ac_cv_lib_$ac_lib_var=no"
5353 fi
5354 rm -f conftest*
5355 xe_check_libs=""
5356
5357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5358   echo "$ac_t""yes" 1>&6
5359   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5360 else
5361   echo "$ac_t""no" 1>&6
5362 fi
5363
5364
5365     fi
5366
5367     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5368     # to get the SysV transport functions.
5369     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5370     # needs -lnsl.
5371     # The nsl library prevents programs from opening the X display
5372     # on Irix 5.2, according to dickey@clark.net.
5373     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5374 echo "configure:5375: checking for gethostbyname" >&5
5375
5376 cat > conftest.$ac_ext <<EOF
5377 #line 5378 "configure"
5378 #include "confdefs.h"
5379 /* System header to define __stub macros and hopefully few prototypes,
5380     which can conflict with char gethostbyname(); below.  */
5381 #include <assert.h>
5382 /* Override any gcc2 internal prototype to avoid an error.  */
5383 /* We use char because int might match the return type of a gcc2
5384     builtin and then its argument prototype would still apply.  */
5385 char gethostbyname();
5386
5387 int main() {
5388
5389 /* The GNU C library defines this for functions which it implements
5390     to always fail with ENOSYS.  Some functions are actually named
5391     something starting with __ and the normal name is an alias.  */
5392 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5393 choke me
5394 #else
5395 gethostbyname();
5396 #endif
5397
5398 ; return 0; }
5399 EOF
5400 if { (eval echo configure:5401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5401   rm -rf conftest*
5402   eval "ac_cv_func_gethostbyname=yes"
5403 else
5404   echo "configure: failed program was:" >&5
5405   cat conftest.$ac_ext >&5
5406   rm -rf conftest*
5407   eval "ac_cv_func_gethostbyname=no"
5408 fi
5409 rm -f conftest*
5410
5411 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5412   echo "$ac_t""yes" 1>&6
5413   :
5414 else
5415   echo "$ac_t""no" 1>&6
5416 fi
5417
5418     if test $ac_cv_func_gethostbyname = no; then
5419       
5420 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5421 echo "configure:5422: checking for gethostbyname in -lnsl" >&5
5422 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5423
5424 xe_check_libs=" -lnsl "
5425 cat > conftest.$ac_ext <<EOF
5426 #line 5427 "configure"
5427 #include "confdefs.h"
5428 /* Override any gcc2 internal prototype to avoid an error.  */
5429 /* We use char because int might match the return type of a gcc2
5430     builtin and then its argument prototype would still apply.  */
5431 char gethostbyname();
5432
5433 int main() {
5434 gethostbyname()
5435 ; return 0; }
5436 EOF
5437 if { (eval echo configure:5438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5438   rm -rf conftest*
5439   eval "ac_cv_lib_$ac_lib_var=yes"
5440 else
5441   echo "configure: failed program was:" >&5
5442   cat conftest.$ac_ext >&5
5443   rm -rf conftest*
5444   eval "ac_cv_lib_$ac_lib_var=no"
5445 fi
5446 rm -f conftest*
5447 xe_check_libs=""
5448
5449 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5450   echo "$ac_t""yes" 1>&6
5451   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5452 else
5453   echo "$ac_t""no" 1>&6
5454 fi
5455
5456
5457     fi
5458
5459     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5460     # socket/setsockopt and other routines are undefined under SCO ODT
5461     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5462     # on later versions), says simon@lia.di.epfl.ch: it contains
5463     # gethostby* variants that don't use the nameserver (or something).
5464     # -lsocket must be given before -lnsl if both are needed.
5465     # We assume that if connect needs -lnsl, so does gethostbyname.
5466     echo $ac_n "checking for connect""... $ac_c" 1>&6
5467 echo "configure:5468: checking for connect" >&5
5468
5469 cat > conftest.$ac_ext <<EOF
5470 #line 5471 "configure"
5471 #include "confdefs.h"
5472 /* System header to define __stub macros and hopefully few prototypes,
5473     which can conflict with char connect(); below.  */
5474 #include <assert.h>
5475 /* Override any gcc2 internal prototype to avoid an error.  */
5476 /* We use char because int might match the return type of a gcc2
5477     builtin and then its argument prototype would still apply.  */
5478 char connect();
5479
5480 int main() {
5481
5482 /* The GNU C library defines this for functions which it implements
5483     to always fail with ENOSYS.  Some functions are actually named
5484     something starting with __ and the normal name is an alias.  */
5485 #if defined (__stub_connect) || defined (__stub___connect)
5486 choke me
5487 #else
5488 connect();
5489 #endif
5490
5491 ; return 0; }
5492 EOF
5493 if { (eval echo configure:5494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5494   rm -rf conftest*
5495   eval "ac_cv_func_connect=yes"
5496 else
5497   echo "configure: failed program was:" >&5
5498   cat conftest.$ac_ext >&5
5499   rm -rf conftest*
5500   eval "ac_cv_func_connect=no"
5501 fi
5502 rm -f conftest*
5503
5504 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5505   echo "$ac_t""yes" 1>&6
5506   :
5507 else
5508   echo "$ac_t""no" 1>&6
5509 fi
5510
5511     if test $ac_cv_func_connect = no; then
5512       
5513 xe_msg_checking="for connect in -lsocket"
5514 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5515 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5516 echo "configure:5517: checking "$xe_msg_checking"" >&5
5517 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5518
5519 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5520 cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 /* Override any gcc2 internal prototype to avoid an error.  */
5524 /* We use char because int might match the return type of a gcc2
5525     builtin and then its argument prototype would still apply.  */
5526 char connect();
5527
5528 int main() {
5529 connect()
5530 ; return 0; }
5531 EOF
5532 if { (eval echo configure:5533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5533   rm -rf conftest*
5534   eval "ac_cv_lib_$ac_lib_var=yes"
5535 else
5536   echo "configure: failed program was:" >&5
5537   cat conftest.$ac_ext >&5
5538   rm -rf conftest*
5539   eval "ac_cv_lib_$ac_lib_var=no"
5540 fi
5541 rm -f conftest*
5542 xe_check_libs=""
5543
5544 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5545   echo "$ac_t""yes" 1>&6
5546   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5547 else
5548   echo "$ac_t""no" 1>&6
5549 fi
5550
5551
5552     fi
5553
5554     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5555     echo $ac_n "checking for remove""... $ac_c" 1>&6
5556 echo "configure:5557: checking for remove" >&5
5557
5558 cat > conftest.$ac_ext <<EOF
5559 #line 5560 "configure"
5560 #include "confdefs.h"
5561 /* System header to define __stub macros and hopefully few prototypes,
5562     which can conflict with char remove(); below.  */
5563 #include <assert.h>
5564 /* Override any gcc2 internal prototype to avoid an error.  */
5565 /* We use char because int might match the return type of a gcc2
5566     builtin and then its argument prototype would still apply.  */
5567 char remove();
5568
5569 int main() {
5570
5571 /* The GNU C library defines this for functions which it implements
5572     to always fail with ENOSYS.  Some functions are actually named
5573     something starting with __ and the normal name is an alias.  */
5574 #if defined (__stub_remove) || defined (__stub___remove)
5575 choke me
5576 #else
5577 remove();
5578 #endif
5579
5580 ; return 0; }
5581 EOF
5582 if { (eval echo configure:5583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5583   rm -rf conftest*
5584   eval "ac_cv_func_remove=yes"
5585 else
5586   echo "configure: failed program was:" >&5
5587   cat conftest.$ac_ext >&5
5588   rm -rf conftest*
5589   eval "ac_cv_func_remove=no"
5590 fi
5591 rm -f conftest*
5592
5593 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5594   echo "$ac_t""yes" 1>&6
5595   :
5596 else
5597   echo "$ac_t""no" 1>&6
5598 fi
5599
5600     if test $ac_cv_func_remove = no; then
5601       
5602 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5603 echo "configure:5604: checking for remove in -lposix" >&5
5604 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5605
5606 xe_check_libs=" -lposix "
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 /* Override any gcc2 internal prototype to avoid an error.  */
5611 /* We use char because int might match the return type of a gcc2
5612     builtin and then its argument prototype would still apply.  */
5613 char remove();
5614
5615 int main() {
5616 remove()
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=yes"
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_lib_$ac_lib_var=no"
5627 fi
5628 rm -f conftest*
5629 xe_check_libs=""
5630
5631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5632   echo "$ac_t""yes" 1>&6
5633   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637
5638
5639     fi
5640
5641     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5642     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5643 echo "configure:5644: checking for shmat" >&5
5644
5645 cat > conftest.$ac_ext <<EOF
5646 #line 5647 "configure"
5647 #include "confdefs.h"
5648 /* System header to define __stub macros and hopefully few prototypes,
5649     which can conflict with char shmat(); below.  */
5650 #include <assert.h>
5651 /* Override any gcc2 internal prototype to avoid an error.  */
5652 /* We use char because int might match the return type of a gcc2
5653     builtin and then its argument prototype would still apply.  */
5654 char shmat();
5655
5656 int main() {
5657
5658 /* The GNU C library defines this for functions which it implements
5659     to always fail with ENOSYS.  Some functions are actually named
5660     something starting with __ and the normal name is an alias.  */
5661 #if defined (__stub_shmat) || defined (__stub___shmat)
5662 choke me
5663 #else
5664 shmat();
5665 #endif
5666
5667 ; return 0; }
5668 EOF
5669 if { (eval echo configure:5670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5670   rm -rf conftest*
5671   eval "ac_cv_func_shmat=yes"
5672 else
5673   echo "configure: failed program was:" >&5
5674   cat conftest.$ac_ext >&5
5675   rm -rf conftest*
5676   eval "ac_cv_func_shmat=no"
5677 fi
5678 rm -f conftest*
5679
5680 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5681   echo "$ac_t""yes" 1>&6
5682   :
5683 else
5684   echo "$ac_t""no" 1>&6
5685 fi
5686
5687     if test $ac_cv_func_shmat = no; then
5688       
5689 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5690 echo "configure:5691: checking for shmat in -lipc" >&5
5691 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5692
5693 xe_check_libs=" -lipc "
5694 cat > conftest.$ac_ext <<EOF
5695 #line 5696 "configure"
5696 #include "confdefs.h"
5697 /* Override any gcc2 internal prototype to avoid an error.  */
5698 /* We use char because int might match the return type of a gcc2
5699     builtin and then its argument prototype would still apply.  */
5700 char shmat();
5701
5702 int main() {
5703 shmat()
5704 ; return 0; }
5705 EOF
5706 if { (eval echo configure:5707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5707   rm -rf conftest*
5708   eval "ac_cv_lib_$ac_lib_var=yes"
5709 else
5710   echo "configure: failed program was:" >&5
5711   cat conftest.$ac_ext >&5
5712   rm -rf conftest*
5713   eval "ac_cv_lib_$ac_lib_var=no"
5714 fi
5715 rm -f conftest*
5716 xe_check_libs=""
5717
5718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5719   echo "$ac_t""yes" 1>&6
5720   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5721 else
5722   echo "$ac_t""no" 1>&6
5723 fi
5724
5725
5726     fi
5727   fi
5728
5729   # Check for libraries that X11R6 Xt/Xaw programs need.
5730   ac_save_LDFLAGS="$LDFLAGS"
5731   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5732   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5733   # check for ICE first), but we must link in the order -lSM -lICE or
5734   # we get undefined symbols.  So assume we have SM if we have ICE.
5735   # These have to be linked with before -lX11, unlike the other
5736   # libraries we check for below, so use a different variable.
5737   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5738   
5739 xe_msg_checking="for IceConnectionNumber in -lICE"
5740 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5741 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5742 echo "configure:5743: checking "$xe_msg_checking"" >&5
5743 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5744
5745 xe_check_libs=" -lICE $X_EXTRA_LIBS"
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 IceConnectionNumber();
5753
5754 int main() {
5755 IceConnectionNumber()
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_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5773 else
5774   echo "$ac_t""no" 1>&6
5775 fi
5776
5777
5778   LDFLAGS="$ac_save_LDFLAGS"
5779
5780 fi
5781  # Autoconf claims to find X library and include dirs for us.
5782   if test "$no_x" = "yes"
5783   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5784   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5785   fi
5786 fi
5787
5788 case "$with_x11" in
5789   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5790   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5791 esac
5792
5793 if test "$with_x11" = "yes"; then
5794   { test "$extra_verbose" = "yes" && cat << \EOF
5795     Defining HAVE_X_WINDOWS
5796 EOF
5797 cat >> confdefs.h <<\EOF
5798 #define HAVE_X_WINDOWS 1
5799 EOF
5800 }
5801
5802   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5803   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5804
5805       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5806     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5807     if test -d "$lib_dir" -a -d "$inc_dir"; then
5808       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5809         x_libraries="$lib_dir $x_libraries"
5810         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5811       esac
5812       case "$x_includes" in "$inc_dir"* ) ;; *)
5813         x_includes="$inc_dir $x_includes"
5814         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5815       esac
5816       break;       fi
5817   done
5818
5819     for rel in "X11R6" "X11R5" "X11R4"; do
5820     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5821     if test -d "$lib_dir" -a -d "$inc_dir"; then
5822       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5823         x_libraries="$x_libraries $lib_dir"
5824         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5825       esac
5826       case "$x_includes" in "$inc_dir"* ) ;; *)
5827         x_includes="$x_includes $inc_dir"
5828         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5829       esac
5830       break;     fi
5831   done
5832
5833     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
5834
5835   ld_switch_x_site="$X_LIBS"
5836
5837   
5838 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5839     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5840   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5841   
5842         runpath="" runpath_dirs=""
5843   if test -n "$LD_RUN_PATH"; then
5844     runpath="$LD_RUN_PATH"
5845   elif test "$GCC" = "yes"; then
5846         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5847     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5848     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5849     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5850       case "$arg" in P,* | -L* | -R* )
5851         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5852           {
5853 xe_runpath_dir="$dir"
5854   test "$xe_runpath_dir" != "/lib"     -a \
5855         "$xe_runpath_dir" != "/usr/lib" -a \
5856         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5857   eval "$xe_add_unique_runpath_dir"
5858 }
5859         done ;;
5860       esac
5861     done
5862     ld_switch_run="$ld_switch_run_save"
5863     rm -f conftest*
5864   else
5865         for arg in $ld_switch_site $ld_switch_x_site; do
5866       case "$arg" in -L*) {
5867 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5868   test "$xe_runpath_dir" != "/lib"     -a \
5869         "$xe_runpath_dir" != "/usr/lib" -a \
5870         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5871   eval "$xe_add_unique_runpath_dir"
5872 };; esac
5873     done
5874         if test "$opsys $need_motif" = "sol2 yes"; then
5875       xe_runpath_dir="/opt/SUNWdt/lib";
5876       eval "$xe_add_unique_runpath_dir";
5877     fi
5878   fi 
5879   if test -n "$runpath"; then
5880     ld_switch_run="${dash_r}${runpath}"
5881     
5882 if test "$GCC" = "yes"; then
5883   set x $ld_switch_run; shift; ld_switch_run=""
5884   while test -n "$1"; do
5885     case $1 in
5886       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5887       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5888       -Xlinker* ) ;;
5889       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5890     esac
5891     shift
5892   done
5893 fi
5894     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5895   fi
5896 fi
5897
5898
5899   if test "$extra_verbose" = "yes"; then
5900     echo; echo "X11 compilation variables:"
5901     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5902     echo
5903   fi
5904
5905             bitmapdirs=
5906   if test "$x_includes" != NONE; then
5907     for i in $x_includes; do
5908       if test -d "$i/bitmaps"; then
5909         bitmapdirs="$i/bitmaps:$bitmapdirs"
5910       fi
5911       if test -d "$i/X11/bitmaps"; then
5912         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5913       fi
5914     done
5915     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5916   fi
5917   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5918     Defining BITMAPDIR = "$bitmapdirs"
5919 EOF
5920 cat >> confdefs.h <<EOF
5921 #define BITMAPDIR "$bitmapdirs"
5922 EOF
5923 }
5924
5925
5926     echo "checking for X defines extracted by xmkmf" 1>&6
5927 echo "configure:5928: checking for X defines extracted by xmkmf" >&5
5928   rm -fr conftestdir
5929   if mkdir conftestdir; then
5930     cd conftestdir
5931     cat > Imakefile <<'EOF'
5932 xetest:
5933         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5934 EOF
5935     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5936       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5937       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5938     fi
5939     cd ..
5940     rm -fr conftestdir
5941     for word in $xmkmf_defines; do
5942       case "$word" in
5943         -D*=* ) ;;
5944         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5945               { test "$extra_verbose" = "yes" && cat << EOF
5946     Defining $word
5947 EOF
5948 cat >> confdefs.h <<EOF
5949 #define $word 1
5950 EOF
5951 }
5952  ;;
5953       esac
5954     done
5955   fi
5956
5957     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5958 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5959 echo "configure:5960: checking for X11/Intrinsic.h" >&5
5960
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 #include <X11/Intrinsic.h>
5965 EOF
5966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5967 { (eval echo configure:5968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5969 if test -z "$ac_err"; then
5970   rm -rf conftest*
5971   eval "ac_cv_header_$ac_safe=yes"
5972 else
5973   echo "$ac_err" >&5
5974   echo "configure: failed program was:" >&5
5975   cat conftest.$ac_ext >&5
5976   rm -rf conftest*
5977   eval "ac_cv_header_$ac_safe=no"
5978 fi
5979 rm -f conftest*
5980 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5981   echo "$ac_t""yes" 1>&6
5982   :
5983 else
5984   echo "$ac_t""no" 1>&6
5985 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5986 fi
5987
5988
5989       
5990 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5991 echo "configure:5992: checking for XOpenDisplay in -lX11" >&5
5992 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5993
5994 xe_check_libs=" -lX11 "
5995 cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
5998 /* Override any gcc2 internal prototype to avoid an error.  */
5999 /* We use char because int might match the return type of a gcc2
6000     builtin and then its argument prototype would still apply.  */
6001 char XOpenDisplay();
6002
6003 int main() {
6004 XOpenDisplay()
6005 ; return 0; }
6006 EOF
6007 if { (eval echo configure:6008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6008   rm -rf conftest*
6009   eval "ac_cv_lib_$ac_lib_var=yes"
6010 else
6011   echo "configure: failed program was:" >&5
6012   cat conftest.$ac_ext >&5
6013   rm -rf conftest*
6014   eval "ac_cv_lib_$ac_lib_var=no"
6015 fi
6016 rm -f conftest*
6017 xe_check_libs=""
6018
6019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6020   echo "$ac_t""yes" 1>&6
6021   have_lib_x11=yes
6022 else
6023   echo "$ac_t""no" 1>&6
6024 fi
6025
6026
6027   if test "$have_lib_x11" != "yes"; then
6028     
6029 xe_msg_checking="for XGetFontProperty in -lX11"
6030 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
6031 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6032 echo "configure:6033: checking "$xe_msg_checking"" >&5
6033 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
6034
6035 xe_check_libs=" -lX11 -b i486-linuxaout"
6036 cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 /* Override any gcc2 internal prototype to avoid an error.  */
6040 /* We use char because int might match the return type of a gcc2
6041     builtin and then its argument prototype would still apply.  */
6042 char XGetFontProperty();
6043
6044 int main() {
6045 XGetFontProperty()
6046 ; return 0; }
6047 EOF
6048 if { (eval echo configure:6049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6049   rm -rf conftest*
6050   eval "ac_cv_lib_$ac_lib_var=yes"
6051 else
6052   echo "configure: failed program was:" >&5
6053   cat conftest.$ac_ext >&5
6054   rm -rf conftest*
6055   eval "ac_cv_lib_$ac_lib_var=no"
6056 fi
6057 rm -f conftest*
6058 xe_check_libs=""
6059
6060 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6061   echo "$ac_t""yes" 1>&6
6062   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
6063 else
6064   echo "$ac_t""no" 1>&6
6065 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6066 fi
6067
6068
6069   fi
6070   libs_x="-lX11"
6071   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
6072
6073     
6074 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
6075 echo "configure:6076: checking for XShapeSelectInput in -lXext" >&5
6076 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
6077
6078 xe_check_libs=" -lXext "
6079 cat > conftest.$ac_ext <<EOF
6080 #line 6081 "configure"
6081 #include "confdefs.h"
6082 /* Override any gcc2 internal prototype to avoid an error.  */
6083 /* We use char because int might match the return type of a gcc2
6084     builtin and then its argument prototype would still apply.  */
6085 char XShapeSelectInput();
6086
6087 int main() {
6088 XShapeSelectInput()
6089 ; return 0; }
6090 EOF
6091 if { (eval echo configure:6092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6092   rm -rf conftest*
6093   eval "ac_cv_lib_$ac_lib_var=yes"
6094 else
6095   echo "configure: failed program was:" >&5
6096   cat conftest.$ac_ext >&5
6097   rm -rf conftest*
6098   eval "ac_cv_lib_$ac_lib_var=no"
6099 fi
6100 rm -f conftest*
6101 xe_check_libs=""
6102
6103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6104   echo "$ac_t""yes" 1>&6
6105   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
6106 else
6107   echo "$ac_t""no" 1>&6
6108 fi
6109
6110
6111
6112     
6113 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
6114 echo "configure:6115: checking for XtOpenDisplay in -lXt" >&5
6115 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
6116
6117 xe_check_libs=" -lXt "
6118 cat > conftest.$ac_ext <<EOF
6119 #line 6120 "configure"
6120 #include "confdefs.h"
6121 /* Override any gcc2 internal prototype to avoid an error.  */
6122 /* We use char because int might match the return type of a gcc2
6123     builtin and then its argument prototype would still apply.  */
6124 char XtOpenDisplay();
6125
6126 int main() {
6127 XtOpenDisplay()
6128 ; return 0; }
6129 EOF
6130 if { (eval echo configure:6131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6131   rm -rf conftest*
6132   eval "ac_cv_lib_$ac_lib_var=yes"
6133 else
6134   echo "configure: failed program was:" >&5
6135   cat conftest.$ac_ext >&5
6136   rm -rf conftest*
6137   eval "ac_cv_lib_$ac_lib_var=no"
6138 fi
6139 rm -f conftest*
6140 xe_check_libs=""
6141
6142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6143   echo "$ac_t""yes" 1>&6
6144   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6145 else
6146   echo "$ac_t""no" 1>&6
6147 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6148 fi
6149
6150
6151
6152   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6153 echo "configure:6154: checking the version of X11 being used" >&5
6154   cat > conftest.$ac_ext <<EOF
6155 #line 6156 "configure"
6156 #include "confdefs.h"
6157 #include <X11/Intrinsic.h>
6158     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6159 EOF
6160 if { (eval echo configure:6161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6161 then
6162   ./conftest foobar; x11_release=$?
6163 else
6164   conftest_rc="$?"
6165   echo "configure: failed program was:" >&5
6166   cat conftest.$ac_ext >&5
6167   rm -fr conftest*
6168   x11_release=4
6169 fi
6170 rm -fr conftest*
6171   echo "$ac_t""R${x11_release}" 1>&6
6172   { test "$extra_verbose" = "yes" && cat << EOF
6173     Defining THIS_IS_X11R${x11_release}
6174 EOF
6175 cat >> confdefs.h <<EOF
6176 #define THIS_IS_X11R${x11_release} 1
6177 EOF
6178 }
6179
6180
6181   for ac_func in XConvertCase
6182 do
6183 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6184 echo "configure:6185: checking for $ac_func" >&5
6185
6186 cat > conftest.$ac_ext <<EOF
6187 #line 6188 "configure"
6188 #include "confdefs.h"
6189 /* System header to define __stub macros and hopefully few prototypes,
6190     which can conflict with char $ac_func(); below.  */
6191 #include <assert.h>
6192 /* Override any gcc2 internal prototype to avoid an error.  */
6193 /* We use char because int might match the return type of a gcc2
6194     builtin and then its argument prototype would still apply.  */
6195 char $ac_func();
6196
6197 int main() {
6198
6199 /* The GNU C library defines this for functions which it implements
6200     to always fail with ENOSYS.  Some functions are actually named
6201     something starting with __ and the normal name is an alias.  */
6202 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6203 choke me
6204 #else
6205 $ac_func();
6206 #endif
6207
6208 ; return 0; }
6209 EOF
6210 if { (eval echo configure:6211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6211   rm -rf conftest*
6212   eval "ac_cv_func_$ac_func=yes"
6213 else
6214   echo "configure: failed program was:" >&5
6215   cat conftest.$ac_ext >&5
6216   rm -rf conftest*
6217   eval "ac_cv_func_$ac_func=no"
6218 fi
6219 rm -f conftest*
6220
6221 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6222   echo "$ac_t""yes" 1>&6
6223     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6224   { test "$extra_verbose" = "yes" && cat << EOF
6225     Defining $ac_tr_func
6226 EOF
6227 cat >> confdefs.h <<EOF
6228 #define $ac_tr_func 1
6229 EOF
6230 }
6231  
6232 else
6233   echo "$ac_t""no" 1>&6
6234 fi
6235 done
6236
6237
6238   for ac_hdr in X11/Xlocale.h
6239 do
6240 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6241 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6242 echo "configure:6243: checking for $ac_hdr" >&5
6243
6244 cat > conftest.$ac_ext <<EOF
6245 #line 6246 "configure"
6246 #include "confdefs.h"
6247 #include <$ac_hdr>
6248 EOF
6249 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6250 { (eval echo configure:6251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6251 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6252 if test -z "$ac_err"; then
6253   rm -rf conftest*
6254   eval "ac_cv_header_$ac_safe=yes"
6255 else
6256   echo "$ac_err" >&5
6257   echo "configure: failed program was:" >&5
6258   cat conftest.$ac_ext >&5
6259   rm -rf conftest*
6260   eval "ac_cv_header_$ac_safe=no"
6261 fi
6262 rm -f conftest*
6263 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6264   echo "$ac_t""yes" 1>&6
6265     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6266   { test "$extra_verbose" = "yes" && cat << EOF
6267     Defining $ac_tr_hdr
6268 EOF
6269 cat >> confdefs.h <<EOF
6270 #define $ac_tr_hdr 1
6271 EOF
6272 }
6273  
6274 else
6275   echo "$ac_t""no" 1>&6
6276 fi
6277 done
6278
6279
6280     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6281 echo "configure:6282: checking for XFree86" >&5
6282   if test -d "/usr/X386/include" -o \
6283           -f "/etc/XF86Config"    -o \
6284           -f "/etc/X11/XF86Config" -o \
6285           -f "/usr/X11R6/lib/X11/XF86Config"; then
6286     echo "$ac_t""yes" 1>&6
6287     { test "$extra_verbose" = "yes" && cat << \EOF
6288     Defining HAVE_XFREE386
6289 EOF
6290 cat >> confdefs.h <<\EOF
6291 #define HAVE_XFREE386 1
6292 EOF
6293 }
6294
6295   else
6296     echo "$ac_t""no" 1>&6
6297   fi
6298
6299     test -z "$with_xmu" && { 
6300 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6301 echo "configure:6302: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6302 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6303
6304 xe_check_libs=" -lXmu "
6305 cat > conftest.$ac_ext <<EOF
6306 #line 6307 "configure"
6307 #include "confdefs.h"
6308 /* Override any gcc2 internal prototype to avoid an error.  */
6309 /* We use char because int might match the return type of a gcc2
6310     builtin and then its argument prototype would still apply.  */
6311 char XmuReadBitmapDataFromFile();
6312
6313 int main() {
6314 XmuReadBitmapDataFromFile()
6315 ; return 0; }
6316 EOF
6317 if { (eval echo configure:6318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6318   rm -rf conftest*
6319   eval "ac_cv_lib_$ac_lib_var=yes"
6320 else
6321   echo "configure: failed program was:" >&5
6322   cat conftest.$ac_ext >&5
6323   rm -rf conftest*
6324   eval "ac_cv_lib_$ac_lib_var=no"
6325 fi
6326 rm -f conftest*
6327 xe_check_libs=""
6328
6329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6330   echo "$ac_t""yes" 1>&6
6331   with_xmu=yes
6332 else
6333   echo "$ac_t""no" 1>&6
6334 with_xmu=no
6335 fi
6336
6337  }
6338   if test "$with_xmu" = "no"; then
6339     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6340    echo "    xemacs will be linked with \"xmu.o\""
6341  fi
6342   else
6343     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6344     { test "$extra_verbose" = "yes" && cat << \EOF
6345     Defining HAVE_XMU
6346 EOF
6347 cat >> confdefs.h <<\EOF
6348 #define HAVE_XMU 1
6349 EOF
6350 }
6351
6352   fi
6353
6354       
6355 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6356 echo "configure:6357: checking for main in -lXbsd" >&5
6357 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6358
6359 xe_check_libs=" -lXbsd "
6360 cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363
6364 int main() {
6365 main()
6366 ; return 0; }
6367 EOF
6368 if { (eval echo configure:6369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6369   rm -rf conftest*
6370   eval "ac_cv_lib_$ac_lib_var=yes"
6371 else
6372   echo "configure: failed program was:" >&5
6373   cat conftest.$ac_ext >&5
6374   rm -rf conftest*
6375   eval "ac_cv_lib_$ac_lib_var=no"
6376 fi
6377 rm -f conftest*
6378 xe_check_libs=""
6379
6380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6381   echo "$ac_t""yes" 1>&6
6382   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6383 else
6384   echo "$ac_t""no" 1>&6
6385 fi
6386
6387
6388
6389     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6390         if test "$GCC" = "yes"; then
6391       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6392       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6393     else
6394       case "$CC" in
6395         "xlc" ) CC="xlc_r" ;;
6396         "xlC" ) CC="xlC_r" ;;
6397         "cc"  ) CC="cc_r" ;;
6398       esac
6399     fi
6400   fi
6401
6402 fi 
6403 if test "$with_msw" != "no"; then
6404   echo "checking for MS-Windows" 1>&6
6405 echo "configure:6406: checking for MS-Windows" >&5
6406   
6407 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6408 echo "configure:6409: checking for main in -lgdi32" >&5
6409 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6410
6411 xe_check_libs=" -lgdi32 "
6412 cat > conftest.$ac_ext <<EOF
6413 #line 6414 "configure"
6414 #include "confdefs.h"
6415
6416 int main() {
6417 main()
6418 ; return 0; }
6419 EOF
6420 if { (eval echo configure:6421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6421   rm -rf conftest*
6422   eval "ac_cv_lib_$ac_lib_var=yes"
6423 else
6424   echo "configure: failed program was:" >&5
6425   cat conftest.$ac_ext >&5
6426   rm -rf conftest*
6427   eval "ac_cv_lib_$ac_lib_var=no"
6428 fi
6429 rm -f conftest*
6430 xe_check_libs=""
6431
6432 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6433   echo "$ac_t""yes" 1>&6
6434   with_msw=yes
6435 else
6436   echo "$ac_t""no" 1>&6
6437 fi
6438
6439
6440   if test "$with_msw" = "yes"; then
6441     { test "$extra_verbose" = "yes" && cat << \EOF
6442     Defining HAVE_MS_WINDOWS
6443 EOF
6444 cat >> confdefs.h <<\EOF
6445 #define HAVE_MS_WINDOWS 1
6446 EOF
6447 }
6448
6449     install_pp="$blddir/lib-src/installexe.sh"
6450     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6451     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6452     if test "$window_system" != x11; then
6453         window_system=msw
6454         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6455             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6456    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6457  fi
6458         test "$with_menubars"   != "no" && with_menubars=msw \
6459             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6460    echo "    xemacs will be linked with \"menubar-msw.o\""
6461  fi
6462         test "$with_toolbars"   != "no" && with_toolbars=msw \
6463             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6464    echo "    xemacs will be linked with \"toolbar-msw.o\""
6465  fi
6466         test "$with_dialogs"   != "no" && with_dialogs=msw \
6467             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6468    echo "    xemacs will be linked with \"dialog-msw.o\""
6469  fi
6470         test "$with_widgets"   != "no" && with_widgets=msw
6471     else
6472         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6473    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6474  fi
6475         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6476    echo "    xemacs will be linked with \"menubar-msw.o\""
6477  fi
6478         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6479    echo "    xemacs will be linked with \"toolbar-msw.o\""
6480  fi
6481         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6482    echo "    xemacs will be linked with \"dialog-msw.o\""
6483  fi
6484     fi
6485         cat > conftest.$ac_ext <<EOF
6486 #line 6487 "configure"
6487 #include "confdefs.h"
6488 #include <fcntl.h>
6489     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6490 EOF
6491 if { (eval echo configure:6492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6492 then
6493   { test "$extra_verbose" = "yes" && cat << \EOF
6494     Defining HAVE_MSG_SELECT
6495 EOF
6496 cat >> confdefs.h <<\EOF
6497 #define HAVE_MSG_SELECT 1
6498 EOF
6499 }
6500
6501 else
6502   conftest_rc="$?"
6503   echo "configure: failed program was:" >&5
6504   cat conftest.$ac_ext >&5
6505 fi
6506 rm -fr conftest*
6507     with_file_coding=yes
6508     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
6509    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\""
6510  fi
6511   fi
6512 fi
6513
6514
6515
6516 test -z "$window_system" && window_system="none"
6517
6518 if test "$window_system" = "none"; then
6519   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6520   do
6521     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6522        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6523     fi
6524     eval "with_${feature}=no"
6525   done
6526 else
6527   test -z "$with_toolbars" && with_toolbars=yes
6528 fi
6529
6530 if test "$with_msw" != "yes"; then
6531   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6532   do
6533     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6534        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6535     fi
6536     eval "with_${feature}=no"
6537   done
6538 else
6539   :
6540 fi
6541
6542 if test "$with_x11" != "yes"; then
6543             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6544   do
6545     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6546        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6547     fi
6548     eval "with_${feature}=no"
6549   done
6550 fi
6551
6552 bitmapdir=
6553
6554 case "$window_system" in
6555   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6556   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6557   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6558 esac
6559
6560 case "$x_libraries" in *X11R4* )
6561   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6562   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6563 esac
6564
6565 echo "checking for WM_COMMAND option" 1>&6
6566 echo "configure:6567: checking for WM_COMMAND option" >&5;
6567 if test "$with_wmcommand" != "no"; then
6568   { test "$extra_verbose" = "yes" && cat << \EOF
6569     Defining HAVE_WMCOMMAND
6570 EOF
6571 cat >> confdefs.h <<\EOF
6572 #define HAVE_WMCOMMAND 1
6573 EOF
6574 }
6575
6576 fi
6577
6578 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6579 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6580 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6581 echo "configure:6582: checking for X11/Xauth.h" >&5
6582
6583 cat > conftest.$ac_ext <<EOF
6584 #line 6585 "configure"
6585 #include "confdefs.h"
6586 #include <X11/Xauth.h>
6587 EOF
6588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6589 { (eval echo configure:6590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6591 if test -z "$ac_err"; then
6592   rm -rf conftest*
6593   eval "ac_cv_header_$ac_safe=yes"
6594 else
6595   echo "$ac_err" >&5
6596   echo "configure: failed program was:" >&5
6597   cat conftest.$ac_ext >&5
6598   rm -rf conftest*
6599   eval "ac_cv_header_$ac_safe=no"
6600 fi
6601 rm -f conftest*
6602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6603   echo "$ac_t""yes" 1>&6
6604   :
6605 else
6606   echo "$ac_t""no" 1>&6
6607 with_xauth=no
6608 fi
6609  }
6610 test -z "$with_xauth" && { 
6611 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6612 echo "configure:6613: checking for XauGetAuthByAddr in -lXau" >&5
6613 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6614
6615 xe_check_libs=" -lXau "
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6619 /* Override any gcc2 internal prototype to avoid an error.  */
6620 /* We use char because int might match the return type of a gcc2
6621     builtin and then its argument prototype would still apply.  */
6622 char XauGetAuthByAddr();
6623
6624 int main() {
6625 XauGetAuthByAddr()
6626 ; return 0; }
6627 EOF
6628 if { (eval echo configure:6629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6629   rm -rf conftest*
6630   eval "ac_cv_lib_$ac_lib_var=yes"
6631 else
6632   echo "configure: failed program was:" >&5
6633   cat conftest.$ac_ext >&5
6634   rm -rf conftest*
6635   eval "ac_cv_lib_$ac_lib_var=no"
6636 fi
6637 rm -f conftest*
6638 xe_check_libs=""
6639
6640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6641   echo "$ac_t""yes" 1>&6
6642   :
6643 else
6644   echo "$ac_t""no" 1>&6
6645 with_xauth=no
6646 fi
6647
6648  }
6649 test -z "$with_xauth" && with_xauth=yes
6650 if test "$with_xauth" = "yes"; then
6651   { test "$extra_verbose" = "yes" && cat << \EOF
6652     Defining HAVE_XAUTH
6653 EOF
6654 cat >> confdefs.h <<\EOF
6655 #define HAVE_XAUTH 1
6656 EOF
6657 }
6658
6659   
6660 T=""
6661 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
6662 libs_xauth="$T"
6663
6664 fi
6665
6666
6667
6668
6669 if test "$with_tooltalk" != "no" ; then
6670       for dir in "" "Tt/" "desktop/" ; do
6671     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6672 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6673 echo "configure:6674: checking for ${dir}tt_c.h" >&5
6674
6675 cat > conftest.$ac_ext <<EOF
6676 #line 6677 "configure"
6677 #include "confdefs.h"
6678 #include <${dir}tt_c.h>
6679 EOF
6680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6681 { (eval echo configure:6682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6683 if test -z "$ac_err"; then
6684   rm -rf conftest*
6685   eval "ac_cv_header_$ac_safe=yes"
6686 else
6687   echo "$ac_err" >&5
6688   echo "configure: failed program was:" >&5
6689   cat conftest.$ac_ext >&5
6690   rm -rf conftest*
6691   eval "ac_cv_header_$ac_safe=no"
6692 fi
6693 rm -f conftest*
6694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   tt_c_h_file="${dir}tt_c.h"; break
6697 else
6698   echo "$ac_t""no" 1>&6
6699 fi
6700
6701   done
6702   if test -z "$tt_c_h_file"; then
6703     if test "$with_tooltalk" = "yes"; then
6704       (echo "$progname: Usage error:"
6705 echo " " "Unable to find required tooltalk header files."
6706 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6707     fi
6708     with_tooltalk=no
6709   fi
6710 fi
6711 if test "$with_tooltalk" != "no" ; then
6712   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6713     
6714 xe_msg_checking="for tt_message_create in -ltt"
6715 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6716 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6717 echo "configure:6718: checking "$xe_msg_checking"" >&5
6718 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6719
6720 xe_check_libs=" -ltt $extra_libs"
6721 cat > conftest.$ac_ext <<EOF
6722 #line 6723 "configure"
6723 #include "confdefs.h"
6724 /* Override any gcc2 internal prototype to avoid an error.  */
6725 /* We use char because int might match the return type of a gcc2
6726     builtin and then its argument prototype would still apply.  */
6727 char tt_message_create();
6728
6729 int main() {
6730 tt_message_create()
6731 ; return 0; }
6732 EOF
6733 if { (eval echo configure:6734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6734   rm -rf conftest*
6735   eval "ac_cv_lib_$ac_lib_var=yes"
6736 else
6737   echo "configure: failed program was:" >&5
6738   cat conftest.$ac_ext >&5
6739   rm -rf conftest*
6740   eval "ac_cv_lib_$ac_lib_var=no"
6741 fi
6742 rm -f conftest*
6743 xe_check_libs=""
6744
6745 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6746   echo "$ac_t""yes" 1>&6
6747   tt_libs="-ltt $extra_libs"; break
6748 else
6749   echo "$ac_t""no" 1>&6
6750 :
6751 fi
6752
6753
6754   done
6755   if test -z "$tt_libs"; then
6756     if test "$with_tooltalk" = "yes"; then
6757       (echo "$progname: Usage error:"
6758 echo " " "Unable to find required tooltalk libraries."
6759 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6760     fi
6761     with_tooltalk=no
6762   fi
6763 fi
6764 test -z "$with_tooltalk" && with_tooltalk=yes
6765 if test "$with_tooltalk" = "yes"; then
6766   { test "$extra_verbose" = "yes" && cat << \EOF
6767     Defining TOOLTALK
6768 EOF
6769 cat >> confdefs.h <<\EOF
6770 #define TOOLTALK 1
6771 EOF
6772 }
6773
6774   { test "$extra_verbose" = "yes" && cat << EOF
6775     Defining TT_C_H_FILE = "$tt_c_h_file"
6776 EOF
6777 cat >> confdefs.h <<EOF
6778 #define TT_C_H_FILE "$tt_c_h_file"
6779 EOF
6780 }
6781
6782   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6783   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6784    echo "    xemacs will be linked with \"tooltalk.o\""
6785  fi
6786 fi
6787
6788 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6789 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6790 echo "configure:6791: checking for Dt/Dt.h" >&5
6791
6792 cat > conftest.$ac_ext <<EOF
6793 #line 6794 "configure"
6794 #include "confdefs.h"
6795 #include <Dt/Dt.h>
6796 EOF
6797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6798 { (eval echo configure:6799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6800 if test -z "$ac_err"; then
6801   rm -rf conftest*
6802   eval "ac_cv_header_$ac_safe=yes"
6803 else
6804   echo "$ac_err" >&5
6805   echo "configure: failed program was:" >&5
6806   cat conftest.$ac_ext >&5
6807   rm -rf conftest*
6808   eval "ac_cv_header_$ac_safe=no"
6809 fi
6810 rm -f conftest*
6811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6812   echo "$ac_t""yes" 1>&6
6813   :
6814 else
6815   echo "$ac_t""no" 1>&6
6816 with_cde=no
6817 fi
6818  }
6819 test -z "$with_cde" && { 
6820 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6821 echo "configure:6822: checking for DtDndDragStart in -lDtSvc" >&5
6822 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6823
6824 xe_check_libs=" -lDtSvc "
6825 cat > conftest.$ac_ext <<EOF
6826 #line 6827 "configure"
6827 #include "confdefs.h"
6828 /* Override any gcc2 internal prototype to avoid an error.  */
6829 /* We use char because int might match the return type of a gcc2
6830     builtin and then its argument prototype would still apply.  */
6831 char DtDndDragStart();
6832
6833 int main() {
6834 DtDndDragStart()
6835 ; return 0; }
6836 EOF
6837 if { (eval echo configure:6838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6838   rm -rf conftest*
6839   eval "ac_cv_lib_$ac_lib_var=yes"
6840 else
6841   echo "configure: failed program was:" >&5
6842   cat conftest.$ac_ext >&5
6843   rm -rf conftest*
6844   eval "ac_cv_lib_$ac_lib_var=no"
6845 fi
6846 rm -f conftest*
6847 xe_check_libs=""
6848
6849 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6850   echo "$ac_t""yes" 1>&6
6851   :
6852 else
6853   echo "$ac_t""no" 1>&6
6854 with_cde=no
6855 fi
6856
6857  }
6858 test -z "$with_cde" && with_cde=yes
6859 if test "$with_dragndrop" = no; then
6860   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6861   with_cde=no
6862 fi
6863 if test "$with_cde" = "yes" ; then
6864   { test "$extra_verbose" = "yes" && cat << \EOF
6865     Defining HAVE_CDE
6866 EOF
6867 cat >> confdefs.h <<\EOF
6868 #define HAVE_CDE 1
6869 EOF
6870 }
6871
6872   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6873   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6874   with_tooltalk=yes # CDE requires Tooltalk
6875   need_motif=yes    # CDE requires Motif
6876 fi
6877
6878 test "$window_system" != "x11" && with_offix=no
6879 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6880   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6881   with_offix=no
6882 fi
6883 if test "$with_dragndrop" = no; then
6884   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6885   with_offix=no
6886 fi
6887 if test "$with_cde" = yes; then
6888   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6889   with_offix=no
6890 fi
6891 test -z "$with_offix" && with_offix=no
6892 if test "$with_offix" = "yes"; then
6893   { test "$extra_verbose" = "yes" && cat << \EOF
6894     Defining HAVE_OFFIX_DND
6895 EOF
6896 cat >> confdefs.h <<\EOF
6897 #define HAVE_OFFIX_DND 1
6898 EOF
6899 }
6900
6901   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6902   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6903 fi
6904
6905 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6906 echo "configure:6907: checking if drag and drop API is needed" >&5
6907 if test "$with_dragndrop" != "no" ; then
6908   if test -n "$dragndrop_proto" ; then
6909     with_dragndrop=yes
6910     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6911     { test "$extra_verbose" = "yes" && cat << \EOF
6912     Defining HAVE_DRAGNDROP
6913 EOF
6914 cat >> confdefs.h <<\EOF
6915 #define HAVE_DRAGNDROP 1
6916 EOF
6917 }
6918
6919     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6920   else
6921     with_dragndrop=no
6922     echo "$ac_t""no" 1>&6
6923   fi
6924 fi
6925
6926 echo "checking for LDAP" 1>&6
6927 echo "configure:6928: checking for LDAP" >&5
6928 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6929 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6930 echo "configure:6931: checking for ldap.h" >&5
6931
6932 cat > conftest.$ac_ext <<EOF
6933 #line 6934 "configure"
6934 #include "confdefs.h"
6935 #include <ldap.h>
6936 EOF
6937 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6938 { (eval echo configure:6939: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6939 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6940 if test -z "$ac_err"; then
6941   rm -rf conftest*
6942   eval "ac_cv_header_$ac_safe=yes"
6943 else
6944   echo "$ac_err" >&5
6945   echo "configure: failed program was:" >&5
6946   cat conftest.$ac_ext >&5
6947   rm -rf conftest*
6948   eval "ac_cv_header_$ac_safe=no"
6949 fi
6950 rm -f conftest*
6951 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6952   echo "$ac_t""yes" 1>&6
6953   :
6954 else
6955   echo "$ac_t""no" 1>&6
6956 with_ldap=no
6957 fi
6958  }
6959 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6960 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6961 echo "configure:6962: checking for lber.h" >&5
6962
6963 cat > conftest.$ac_ext <<EOF
6964 #line 6965 "configure"
6965 #include "confdefs.h"
6966 #include <lber.h>
6967 EOF
6968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6969 { (eval echo configure:6970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6971 if test -z "$ac_err"; then
6972   rm -rf conftest*
6973   eval "ac_cv_header_$ac_safe=yes"
6974 else
6975   echo "$ac_err" >&5
6976   echo "configure: failed program was:" >&5
6977   cat conftest.$ac_ext >&5
6978   rm -rf conftest*
6979   eval "ac_cv_header_$ac_safe=no"
6980 fi
6981 rm -f conftest*
6982 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6983   echo "$ac_t""yes" 1>&6
6984   :
6985 else
6986   echo "$ac_t""no" 1>&6
6987 with_ldap=no
6988 fi
6989  }
6990 if test "$with_ldap" != "no"; then
6991   
6992 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6993 echo "configure:6994: checking for ldap_search in -lldap" >&5
6994 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6995
6996 xe_check_libs=" -lldap "
6997 cat > conftest.$ac_ext <<EOF
6998 #line 6999 "configure"
6999 #include "confdefs.h"
7000 /* Override any gcc2 internal prototype to avoid an error.  */
7001 /* We use char because int might match the return type of a gcc2
7002     builtin and then its argument prototype would still apply.  */
7003 char ldap_search();
7004
7005 int main() {
7006 ldap_search()
7007 ; return 0; }
7008 EOF
7009 if { (eval echo configure:7010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7010   rm -rf conftest*
7011   eval "ac_cv_lib_$ac_lib_var=yes"
7012 else
7013   echo "configure: failed program was:" >&5
7014   cat conftest.$ac_ext >&5
7015   rm -rf conftest*
7016   eval "ac_cv_lib_$ac_lib_var=no"
7017 fi
7018 rm -f conftest*
7019 xe_check_libs=""
7020
7021 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7022   echo "$ac_t""yes" 1>&6
7023   with_ldap_nolber=yes
7024 else
7025   echo "$ac_t""no" 1>&6
7026 with_ldap_nolber=no
7027 fi
7028
7029
7030   test "$with_ldap_nolber" = "no" && { 
7031 xe_msg_checking="for ldap_open in -lldap"
7032 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
7033 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7034 echo "configure:7035: checking "$xe_msg_checking"" >&5
7035 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7036
7037 xe_check_libs=" -lldap -llber"
7038 cat > conftest.$ac_ext <<EOF
7039 #line 7040 "configure"
7040 #include "confdefs.h"
7041 /* Override any gcc2 internal prototype to avoid an error.  */
7042 /* We use char because int might match the return type of a gcc2
7043     builtin and then its argument prototype would still apply.  */
7044 char ldap_open();
7045
7046 int main() {
7047 ldap_open()
7048 ; return 0; }
7049 EOF
7050 if { (eval echo configure:7051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7051   rm -rf conftest*
7052   eval "ac_cv_lib_$ac_lib_var=yes"
7053 else
7054   echo "configure: failed program was:" >&5
7055   cat conftest.$ac_ext >&5
7056   rm -rf conftest*
7057   eval "ac_cv_lib_$ac_lib_var=no"
7058 fi
7059 rm -f conftest*
7060 xe_check_libs=""
7061
7062 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7063   echo "$ac_t""yes" 1>&6
7064   with_ldap_lber=yes
7065 else
7066   echo "$ac_t""no" 1>&6
7067 with_ldap_lber=no
7068 fi
7069
7070  }
7071   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
7072 xe_msg_checking="for ldap_open in -lldap"
7073 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
7074 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7075 echo "configure:7076: checking "$xe_msg_checking"" >&5
7076 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7077
7078 xe_check_libs=" -lldap -llber -lkrb"
7079 cat > conftest.$ac_ext <<EOF
7080 #line 7081 "configure"
7081 #include "confdefs.h"
7082 /* Override any gcc2 internal prototype to avoid an error.  */
7083 /* We use char because int might match the return type of a gcc2
7084     builtin and then its argument prototype would still apply.  */
7085 char ldap_open();
7086
7087 int main() {
7088 ldap_open()
7089 ; return 0; }
7090 EOF
7091 if { (eval echo configure:7092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7092   rm -rf conftest*
7093   eval "ac_cv_lib_$ac_lib_var=yes"
7094 else
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_lib_$ac_lib_var=no"
7099 fi
7100 rm -f conftest*
7101 xe_check_libs=""
7102
7103 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7104   echo "$ac_t""yes" 1>&6
7105   with_ldap_krb=yes
7106 else
7107   echo "$ac_t""no" 1>&6
7108 with_ldap_krb=no
7109 fi
7110
7111  }
7112   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
7113 xe_msg_checking="for ldap_open in -lldap"
7114 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
7115 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
7116 echo "configure:7117: checking "$xe_msg_checking"" >&5
7117 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
7118
7119 xe_check_libs=" -lldap -llber -lkrb -ldes"
7120 cat > conftest.$ac_ext <<EOF
7121 #line 7122 "configure"
7122 #include "confdefs.h"
7123 /* Override any gcc2 internal prototype to avoid an error.  */
7124 /* We use char because int might match the return type of a gcc2
7125     builtin and then its argument prototype would still apply.  */
7126 char ldap_open();
7127
7128 int main() {
7129 ldap_open()
7130 ; return 0; }
7131 EOF
7132 if { (eval echo configure:7133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7133   rm -rf conftest*
7134   eval "ac_cv_lib_$ac_lib_var=yes"
7135 else
7136   echo "configure: failed program was:" >&5
7137   cat conftest.$ac_ext >&5
7138   rm -rf conftest*
7139   eval "ac_cv_lib_$ac_lib_var=no"
7140 fi
7141 rm -f conftest*
7142 xe_check_libs=""
7143
7144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7145   echo "$ac_t""yes" 1>&6
7146   with_ldap_krbdes=yes
7147 else
7148   echo "$ac_t""no" 1>&6
7149 with_ldap_krbdes=no
7150 fi
7151
7152  }
7153   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
7154 fi
7155 if test "$with_ldap" = "yes"; then
7156   { test "$extra_verbose" = "yes" && cat << \EOF
7157     Defining HAVE_LDAP
7158 EOF
7159 cat >> confdefs.h <<\EOF
7160 #define HAVE_LDAP 1
7161 EOF
7162 }
7163
7164   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7165    echo "    xemacs will be linked with \"eldap.o\""
7166  fi
7167   if test "$with_ldap_nolber" = "yes" ; then
7168     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7169   else
7170     if test "$with_ldap_krb" = "yes" ; then
7171       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7172     fi
7173     if test "$with_ldap_krbdes" = "yes" ; then
7174       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7175       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7176     fi
7177     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7178     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7179   fi
7180   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7181 do
7182 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7183 echo "configure:7184: checking for $ac_func" >&5
7184
7185 cat > conftest.$ac_ext <<EOF
7186 #line 7187 "configure"
7187 #include "confdefs.h"
7188 /* System header to define __stub macros and hopefully few prototypes,
7189     which can conflict with char $ac_func(); below.  */
7190 #include <assert.h>
7191 /* Override any gcc2 internal prototype to avoid an error.  */
7192 /* We use char because int might match the return type of a gcc2
7193     builtin and then its argument prototype would still apply.  */
7194 char $ac_func();
7195
7196 int main() {
7197
7198 /* The GNU C library defines this for functions which it implements
7199     to always fail with ENOSYS.  Some functions are actually named
7200     something starting with __ and the normal name is an alias.  */
7201 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7202 choke me
7203 #else
7204 $ac_func();
7205 #endif
7206
7207 ; return 0; }
7208 EOF
7209 if { (eval echo configure:7210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7210   rm -rf conftest*
7211   eval "ac_cv_func_$ac_func=yes"
7212 else
7213   echo "configure: failed program was:" >&5
7214   cat conftest.$ac_ext >&5
7215   rm -rf conftest*
7216   eval "ac_cv_func_$ac_func=no"
7217 fi
7218 rm -f conftest*
7219
7220 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7221   echo "$ac_t""yes" 1>&6
7222     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7223   { test "$extra_verbose" = "yes" && cat << EOF
7224     Defining $ac_tr_func
7225 EOF
7226 cat >> confdefs.h <<EOF
7227 #define $ac_tr_func 1
7228 EOF
7229 }
7230  
7231 else
7232   echo "$ac_t""no" 1>&6
7233 fi
7234 done
7235
7236 fi
7237
7238 echo "checking for PostgreSQL" 1>&6
7239 echo "configure:7240: checking for PostgreSQL" >&5
7240 postgres_h_path=""
7241 postgres_includes_found=no
7242 save_c_switch_site="$c_switch_site"
7243
7244 if test "$with_postgresql" != "no"; then
7245         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7246 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7247 echo "configure:7248: checking for libpq-fe.h" >&5
7248
7249 cat > conftest.$ac_ext <<EOF
7250 #line 7251 "configure"
7251 #include "confdefs.h"
7252 #include <libpq-fe.h>
7253 EOF
7254 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7255 { (eval echo configure:7256: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7256 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7257 if test -z "$ac_err"; then
7258   rm -rf conftest*
7259   eval "ac_cv_header_$ac_safe=yes"
7260 else
7261   echo "$ac_err" >&5
7262   echo "configure: failed program was:" >&5
7263   cat conftest.$ac_ext >&5
7264   rm -rf conftest*
7265   eval "ac_cv_header_$ac_safe=no"
7266 fi
7267 rm -f conftest*
7268 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7269   echo "$ac_t""yes" 1>&6
7270   postgres_includes_found=yes
7271 else
7272   echo "$ac_t""no" 1>&6
7273 fi
7274
7275 fi
7276
7277 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7278         -d "/usr/local/pgsql/include"; then
7279         c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
7280         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7281 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7282 echo "configure:7283: checking for libpq-fe.h" >&5
7283
7284 cat > conftest.$ac_ext <<EOF
7285 #line 7286 "configure"
7286 #include "confdefs.h"
7287 #include <libpq-fe.h>
7288 EOF
7289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7290 { (eval echo configure:7291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7292 if test -z "$ac_err"; then
7293   rm -rf conftest*
7294   eval "ac_cv_header_$ac_safe=yes"
7295 else
7296   echo "$ac_err" >&5
7297   echo "configure: failed program was:" >&5
7298   cat conftest.$ac_ext >&5
7299   rm -rf conftest*
7300   eval "ac_cv_header_$ac_safe=no"
7301 fi
7302 rm -f conftest*
7303 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7304   echo "$ac_t""yes" 1>&6
7305   postgres_includes_found=yes
7306 else
7307   echo "$ac_t""no" 1>&6
7308 fi
7309
7310         if test "$postgres_includes_found" != "yes"; then
7311                 postgres_h_path="/usr/local/pgsql/include"
7312         fi
7313         c_switch_site="$save_c_switch_site"
7314 fi
7315 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7316         -d "/usr/include/pgsql"; then
7317         c_switch_site="$c_switch_site -I/usr/include/pgsql"
7318         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7319 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7320 echo "configure:7321: checking for libpq-fe.h" >&5
7321
7322 cat > conftest.$ac_ext <<EOF
7323 #line 7324 "configure"
7324 #include "confdefs.h"
7325 #include <libpq-fe.h>
7326 EOF
7327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7328 { (eval echo configure:7329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7330 if test -z "$ac_err"; then
7331   rm -rf conftest*
7332   eval "ac_cv_header_$ac_safe=yes"
7333 else
7334   echo "$ac_err" >&5
7335   echo "configure: failed program was:" >&5
7336   cat conftest.$ac_ext >&5
7337   rm -rf conftest*
7338   eval "ac_cv_header_$ac_safe=no"
7339 fi
7340 rm -f conftest*
7341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7342   echo "$ac_t""yes" 1>&6
7343   postgres_includes_found=yes
7344 else
7345   echo "$ac_t""no" 1>&6
7346 fi
7347
7348         if test "$postgres_includes_found" = "yes"; then
7349                 postgres_h_path="pgsql"
7350         fi
7351                 c_switch_site="$save_c_switch_site"
7352         fi
7353 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7354         -d "/usr/include/postgresql"; then
7355         c_switch_site="$c_switch_site -I/usr/include/postgresql"
7356         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7357 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7358 echo "configure:7359: checking for libpq-fe.h" >&5
7359
7360 cat > conftest.$ac_ext <<EOF
7361 #line 7362 "configure"
7362 #include "confdefs.h"
7363 #include <libpq-fe.h>
7364 EOF
7365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7366 { (eval echo configure:7367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7368 if test -z "$ac_err"; then
7369   rm -rf conftest*
7370   eval "ac_cv_header_$ac_safe=yes"
7371 else
7372   echo "$ac_err" >&5
7373   echo "configure: failed program was:" >&5
7374   cat conftest.$ac_ext >&5
7375   rm -rf conftest*
7376   eval "ac_cv_header_$ac_safe=no"
7377 fi
7378 rm -f conftest*
7379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7380   echo "$ac_t""yes" 1>&6
7381   postgres_includes_found=yes
7382 else
7383   echo "$ac_t""no" 1>&6
7384 fi
7385
7386         if test "$postgres_includes_found" = "yes"; then
7387                 postgres_h_path="postgresql"
7388 fi
7389         c_switch_site="$save_c_switch_site"
7390 fi
7391
7392 if test "$postgres_includes_found" = "yes"; then
7393         
7394 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7395 echo "configure:7396: checking for PQconnectdb in -lpq" >&5
7396 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7397
7398 xe_check_libs=" -lpq "
7399 cat > conftest.$ac_ext <<EOF
7400 #line 7401 "configure"
7401 #include "confdefs.h"
7402 /* Override any gcc2 internal prototype to avoid an error.  */
7403 /* We use char because int might match the return type of a gcc2
7404     builtin and then its argument prototype would still apply.  */
7405 char PQconnectdb();
7406
7407 int main() {
7408 PQconnectdb()
7409 ; return 0; }
7410 EOF
7411 if { (eval echo configure:7412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7412   rm -rf conftest*
7413   eval "ac_cv_lib_$ac_lib_var=yes"
7414 else
7415   echo "configure: failed program was:" >&5
7416   cat conftest.$ac_ext >&5
7417   rm -rf conftest*
7418   eval "ac_cv_lib_$ac_lib_var=no"
7419 fi
7420 rm -f conftest*
7421 xe_check_libs=""
7422
7423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7424   echo "$ac_t""yes" 1>&6
7425   with_postgresql=yes
7426 else
7427   echo "$ac_t""no" 1>&6
7428 with_postgresql=no
7429 fi
7430
7431
7432 fi
7433 if test "$with_postgresql" = "yes"; then
7434         
7435 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7436 echo "configure:7437: checking for PQconnectStart in -lpq" >&5
7437 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7438
7439 xe_check_libs=" -lpq "
7440 cat > conftest.$ac_ext <<EOF
7441 #line 7442 "configure"
7442 #include "confdefs.h"
7443 /* Override any gcc2 internal prototype to avoid an error.  */
7444 /* We use char because int might match the return type of a gcc2
7445     builtin and then its argument prototype would still apply.  */
7446 char PQconnectStart();
7447
7448 int main() {
7449 PQconnectStart()
7450 ; return 0; }
7451 EOF
7452 if { (eval echo configure:7453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7453   rm -rf conftest*
7454   eval "ac_cv_lib_$ac_lib_var=yes"
7455 else
7456   echo "configure: failed program was:" >&5
7457   cat conftest.$ac_ext >&5
7458   rm -rf conftest*
7459   eval "ac_cv_lib_$ac_lib_var=no"
7460 fi
7461 rm -f conftest*
7462 xe_check_libs=""
7463
7464 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7465   echo "$ac_t""yes" 1>&6
7466   with_postgresqlv7=yes
7467 else
7468   echo "$ac_t""no" 1>&6
7469 with_postgresqlv7=no
7470 fi
7471
7472
7473 fi
7474 if test "$with_postgresql" = "yes"; then
7475         if test -n "$postgres_h_path"; then
7476                 { test "$extra_verbose" = "yes" && cat << EOF
7477     Defining POSTGRES_H_PATH = $postgres_h_path
7478 EOF
7479 cat >> confdefs.h <<EOF
7480 #define POSTGRES_H_PATH $postgres_h_path
7481 EOF
7482 }
7483
7484         fi
7485         { test "$extra_verbose" = "yes" && cat << \EOF
7486     Defining HAVE_POSTGRESQL
7487 EOF
7488 cat >> confdefs.h <<\EOF
7489 #define HAVE_POSTGRESQL 1
7490 EOF
7491 }
7492
7493         if test "$with_postgresqlv7" = "yes"; then
7494                 { test "$extra_verbose" = "yes" && cat << \EOF
7495     Defining HAVE_POSTGRESQLV7
7496 EOF
7497 cat >> confdefs.h <<\EOF
7498 #define HAVE_POSTGRESQLV7 1
7499 EOF
7500 }
7501
7502         fi
7503         LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7504         extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7505    echo "    xemacs will be linked with \"postgresql.o\""
7506  fi
7507 fi
7508
7509
7510 if test "$window_system" != "none"; then
7511   echo "checking for graphics libraries" 1>&6
7512 echo "configure:7513: checking for graphics libraries" >&5
7513
7514     xpm_problem=""
7515   if test -z "$with_xpm"; then
7516     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7517 echo "configure:7518: checking for Xpm - no older than 3.4f" >&5
7518     xe_check_libs=-lXpm
7519     cat > conftest.$ac_ext <<EOF
7520 #line 7521 "configure"
7521 #include "confdefs.h"
7522 #define XPM_NUMBERS
7523 #include <X11/xpm.h>
7524     int main(int c, char **v) {
7525     return c == 1 ? 0 :
7526       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7527       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7528 EOF
7529 if { (eval echo configure:7530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7530 then
7531   ./conftest dummy_arg; xpm_status=$?;
7532       if test "$xpm_status" = "0"; then
7533         with_xpm=yes;
7534       else
7535         with_xpm=no;
7536         if test "$xpm_status" = "1"; then
7537           xpm_problem="Xpm library version and header file version don't match!"
7538         elif test "$xpm_status" = "2"; then
7539           xpm_problem="Xpm library version is too old!"
7540         else
7541           xpm_problem="Internal xpm detection logic error!"
7542         fi
7543         echo "
7544 *** WARNING *** $xpm_problem
7545   I'm not touching that with a 10-foot pole!
7546   If you really want to use the installed version of Xpm, rerun
7547   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7548     fi
7549 else
7550   conftest_rc="$?"
7551   echo "configure: failed program was:" >&5
7552   cat conftest.$ac_ext >&5
7553   rm -fr conftest*
7554   with_xpm=no
7555 fi
7556 rm -fr conftest*
7557     xe_check_libs=
7558     echo "$ac_t""$with_xpm" 1>&6
7559   fi
7560   if test "$with_xpm" = "yes"; then
7561     { test "$extra_verbose" = "yes" && cat << \EOF
7562     Defining HAVE_XPM
7563 EOF
7564 cat >> confdefs.h <<\EOF
7565 #define HAVE_XPM 1
7566 EOF
7567 }
7568
7569     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7570     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7571 echo "configure:7572: checking for \"FOR_MSW\" xpm" >&5
7572     xe_check_libs=-lXpm
7573     cat > conftest.$ac_ext <<EOF
7574 #line 7575 "configure"
7575 #include "confdefs.h"
7576
7577 int main() {
7578 XpmCreatePixmapFromData()
7579 ; return 0; }
7580 EOF
7581 if { (eval echo configure:7582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7582   rm -rf conftest*
7583   xpm_for_msw=no
7584 else
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   xpm_for_msw=yes
7589 fi
7590 rm -f conftest*
7591     xe_check_libs=
7592     echo "$ac_t""$xpm_for_msw" 1>&6
7593     if test "$xpm_for_msw" = "yes"; then
7594       { test "$extra_verbose" = "yes" && cat << \EOF
7595     Defining FOR_MSW
7596 EOF
7597 cat >> confdefs.h <<\EOF
7598 #define FOR_MSW 1
7599 EOF
7600 }
7601
7602     fi
7603   fi
7604
7605     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7606 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7607 echo "configure:7608: checking for compface.h" >&5
7608
7609 cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 #include <compface.h>
7613 EOF
7614 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7615 { (eval echo configure:7616: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7616 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7617 if test -z "$ac_err"; then
7618   rm -rf conftest*
7619   eval "ac_cv_header_$ac_safe=yes"
7620 else
7621   echo "$ac_err" >&5
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   eval "ac_cv_header_$ac_safe=no"
7626 fi
7627 rm -f conftest*
7628 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7629   echo "$ac_t""yes" 1>&6
7630   :
7631 else
7632   echo "$ac_t""no" 1>&6
7633 with_xface=no
7634 fi
7635  }
7636   test -z "$with_xface" && { 
7637 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7638 echo "configure:7639: checking for UnGenFace in -lcompface" >&5
7639 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7640
7641 xe_check_libs=" -lcompface "
7642 cat > conftest.$ac_ext <<EOF
7643 #line 7644 "configure"
7644 #include "confdefs.h"
7645 /* Override any gcc2 internal prototype to avoid an error.  */
7646 /* We use char because int might match the return type of a gcc2
7647     builtin and then its argument prototype would still apply.  */
7648 char UnGenFace();
7649
7650 int main() {
7651 UnGenFace()
7652 ; return 0; }
7653 EOF
7654 if { (eval echo configure:7655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7655   rm -rf conftest*
7656   eval "ac_cv_lib_$ac_lib_var=yes"
7657 else
7658   echo "configure: failed program was:" >&5
7659   cat conftest.$ac_ext >&5
7660   rm -rf conftest*
7661   eval "ac_cv_lib_$ac_lib_var=no"
7662 fi
7663 rm -f conftest*
7664 xe_check_libs=""
7665
7666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7667   echo "$ac_t""yes" 1>&6
7668   : 
7669 else
7670   echo "$ac_t""no" 1>&6
7671 with_xface=no
7672 fi
7673
7674  }
7675   test -z "$with_xface" && with_xface=yes
7676   if test "$with_xface" = "yes"; then
7677     { test "$extra_verbose" = "yes" && cat << \EOF
7678     Defining HAVE_XFACE
7679 EOF
7680 cat >> confdefs.h <<\EOF
7681 #define HAVE_XFACE 1
7682 EOF
7683 }
7684
7685     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7686   fi
7687
7688         if test "$with_gif" != "no"; then
7689     with_gif="yes"
7690     { test "$extra_verbose" = "yes" && cat << \EOF
7691     Defining HAVE_GIF
7692 EOF
7693 cat >> confdefs.h <<\EOF
7694 #define HAVE_GIF 1
7695 EOF
7696 }
7697
7698     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7699    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7700  fi
7701   fi
7702
7703       if test "$with_png $with_tiff" != "no no"; then
7704     
7705 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7706 echo "configure:7707: checking for inflate in -lc" >&5
7707 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7708
7709 xe_check_libs=" -lc "
7710 cat > conftest.$ac_ext <<EOF
7711 #line 7712 "configure"
7712 #include "confdefs.h"
7713 /* Override any gcc2 internal prototype to avoid an error.  */
7714 /* We use char because int might match the return type of a gcc2
7715     builtin and then its argument prototype would still apply.  */
7716 char inflate();
7717
7718 int main() {
7719 inflate()
7720 ; return 0; }
7721 EOF
7722 if { (eval echo configure:7723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7723   rm -rf conftest*
7724   eval "ac_cv_lib_$ac_lib_var=yes"
7725 else
7726   echo "configure: failed program was:" >&5
7727   cat conftest.$ac_ext >&5
7728   rm -rf conftest*
7729   eval "ac_cv_lib_$ac_lib_var=no"
7730 fi
7731 rm -f conftest*
7732 xe_check_libs=""
7733
7734 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7735   echo "$ac_t""yes" 1>&6
7736   :
7737 else
7738   echo "$ac_t""no" 1>&6
7739
7740 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7741 echo "configure:7742: checking for inflate in -lz" >&5
7742 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7743
7744 xe_check_libs=" -lz "
7745 cat > conftest.$ac_ext <<EOF
7746 #line 7747 "configure"
7747 #include "confdefs.h"
7748 /* Override any gcc2 internal prototype to avoid an error.  */
7749 /* We use char because int might match the return type of a gcc2
7750     builtin and then its argument prototype would still apply.  */
7751 char inflate();
7752
7753 int main() {
7754 inflate()
7755 ; return 0; }
7756 EOF
7757 if { (eval echo configure:7758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7758   rm -rf conftest*
7759   eval "ac_cv_lib_$ac_lib_var=yes"
7760 else
7761   echo "configure: failed program was:" >&5
7762   cat conftest.$ac_ext >&5
7763   rm -rf conftest*
7764   eval "ac_cv_lib_$ac_lib_var=no"
7765 fi
7766 rm -f conftest*
7767 xe_check_libs=""
7768
7769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7770   echo "$ac_t""yes" 1>&6
7771   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7772 else
7773   echo "$ac_t""no" 1>&6
7774
7775 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7776 echo "configure:7777: checking for inflate in -lgz" >&5
7777 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7778
7779 xe_check_libs=" -lgz "
7780 cat > conftest.$ac_ext <<EOF
7781 #line 7782 "configure"
7782 #include "confdefs.h"
7783 /* Override any gcc2 internal prototype to avoid an error.  */
7784 /* We use char because int might match the return type of a gcc2
7785     builtin and then its argument prototype would still apply.  */
7786 char inflate();
7787
7788 int main() {
7789 inflate()
7790 ; return 0; }
7791 EOF
7792 if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7793   rm -rf conftest*
7794   eval "ac_cv_lib_$ac_lib_var=yes"
7795 else
7796   echo "configure: failed program was:" >&5
7797   cat conftest.$ac_ext >&5
7798   rm -rf conftest*
7799   eval "ac_cv_lib_$ac_lib_var=no"
7800 fi
7801 rm -f conftest*
7802 xe_check_libs=""
7803
7804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7805   echo "$ac_t""yes" 1>&6
7806   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7807 else
7808   echo "$ac_t""no" 1>&6
7809 fi
7810
7811
7812 fi
7813
7814
7815 fi
7816
7817
7818   fi
7819
7820     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7821 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7822 echo "configure:7823: checking for jpeglib.h" >&5
7823
7824 cat > conftest.$ac_ext <<EOF
7825 #line 7826 "configure"
7826 #include "confdefs.h"
7827 #include <jpeglib.h>
7828 EOF
7829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7830 { (eval echo configure:7831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7832 if test -z "$ac_err"; then
7833   rm -rf conftest*
7834   eval "ac_cv_header_$ac_safe=yes"
7835 else
7836   echo "$ac_err" >&5
7837   echo "configure: failed program was:" >&5
7838   cat conftest.$ac_ext >&5
7839   rm -rf conftest*
7840   eval "ac_cv_header_$ac_safe=no"
7841 fi
7842 rm -f conftest*
7843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7844   echo "$ac_t""yes" 1>&6
7845   :
7846 else
7847   echo "$ac_t""no" 1>&6
7848 with_jpeg=no
7849 fi
7850  }
7851   test -z "$with_jpeg" && { 
7852 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7853 echo "configure:7854: checking for jpeg_destroy_decompress in -ljpeg" >&5
7854 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7855
7856 xe_check_libs=" -ljpeg "
7857 cat > conftest.$ac_ext <<EOF
7858 #line 7859 "configure"
7859 #include "confdefs.h"
7860 /* Override any gcc2 internal prototype to avoid an error.  */
7861 /* We use char because int might match the return type of a gcc2
7862     builtin and then its argument prototype would still apply.  */
7863 char jpeg_destroy_decompress();
7864
7865 int main() {
7866 jpeg_destroy_decompress()
7867 ; return 0; }
7868 EOF
7869 if { (eval echo configure:7870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7870   rm -rf conftest*
7871   eval "ac_cv_lib_$ac_lib_var=yes"
7872 else
7873   echo "configure: failed program was:" >&5
7874   cat conftest.$ac_ext >&5
7875   rm -rf conftest*
7876   eval "ac_cv_lib_$ac_lib_var=no"
7877 fi
7878 rm -f conftest*
7879 xe_check_libs=""
7880
7881 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7882   echo "$ac_t""yes" 1>&6
7883   :
7884 else
7885   echo "$ac_t""no" 1>&6
7886 with_jpeg=no
7887 fi
7888
7889  }
7890   test -z "$with_jpeg" && with_jpeg=yes
7891   if test "$with_jpeg" = "yes"; then
7892     { test "$extra_verbose" = "yes" && cat << \EOF
7893     Defining HAVE_JPEG
7894 EOF
7895 cat >> confdefs.h <<\EOF
7896 #define HAVE_JPEG 1
7897 EOF
7898 }
7899
7900     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7901   fi
7902
7903     png_problem=""
7904   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7905 echo "configure:7906: checking for pow" >&5
7906
7907 cat > conftest.$ac_ext <<EOF
7908 #line 7909 "configure"
7909 #include "confdefs.h"
7910 /* System header to define __stub macros and hopefully few prototypes,
7911     which can conflict with char pow(); below.  */
7912 #include <assert.h>
7913 /* Override any gcc2 internal prototype to avoid an error.  */
7914 /* We use char because int might match the return type of a gcc2
7915     builtin and then its argument prototype would still apply.  */
7916 char pow();
7917
7918 int main() {
7919
7920 /* The GNU C library defines this for functions which it implements
7921     to always fail with ENOSYS.  Some functions are actually named
7922     something starting with __ and the normal name is an alias.  */
7923 #if defined (__stub_pow) || defined (__stub___pow)
7924 choke me
7925 #else
7926 pow();
7927 #endif
7928
7929 ; return 0; }
7930 EOF
7931 if { (eval echo configure:7932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7932   rm -rf conftest*
7933   eval "ac_cv_func_pow=yes"
7934 else
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   eval "ac_cv_func_pow=no"
7939 fi
7940 rm -f conftest*
7941
7942 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7943   echo "$ac_t""yes" 1>&6
7944   :
7945 else
7946   echo "$ac_t""no" 1>&6
7947 with_png=no
7948 fi
7949  }
7950   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7951 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7952 echo "configure:7953: checking for png.h" >&5
7953
7954 cat > conftest.$ac_ext <<EOF
7955 #line 7956 "configure"
7956 #include "confdefs.h"
7957 #include <png.h>
7958 EOF
7959 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7960 { (eval echo configure:7961: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7961 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7962 if test -z "$ac_err"; then
7963   rm -rf conftest*
7964   eval "ac_cv_header_$ac_safe=yes"
7965 else
7966   echo "$ac_err" >&5
7967   echo "configure: failed program was:" >&5
7968   cat conftest.$ac_ext >&5
7969   rm -rf conftest*
7970   eval "ac_cv_header_$ac_safe=no"
7971 fi
7972 rm -f conftest*
7973 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7974   echo "$ac_t""yes" 1>&6
7975   :
7976 else
7977   echo "$ac_t""no" 1>&6
7978 with_png=no
7979 fi
7980  }
7981   test -z "$with_png" && { 
7982 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7983 echo "configure:7984: checking for png_read_image in -lpng" >&5
7984 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7985
7986 xe_check_libs=" -lpng "
7987 cat > conftest.$ac_ext <<EOF
7988 #line 7989 "configure"
7989 #include "confdefs.h"
7990 /* Override any gcc2 internal prototype to avoid an error.  */
7991 /* We use char because int might match the return type of a gcc2
7992     builtin and then its argument prototype would still apply.  */
7993 char png_read_image();
7994
7995 int main() {
7996 png_read_image()
7997 ; return 0; }
7998 EOF
7999 if { (eval echo configure:8000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8000   rm -rf conftest*
8001   eval "ac_cv_lib_$ac_lib_var=yes"
8002 else
8003   echo "configure: failed program was:" >&5
8004   cat conftest.$ac_ext >&5
8005   rm -rf conftest*
8006   eval "ac_cv_lib_$ac_lib_var=no"
8007 fi
8008 rm -f conftest*
8009 xe_check_libs=""
8010
8011 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8012   echo "$ac_t""yes" 1>&6
8013   :
8014 else
8015   echo "$ac_t""no" 1>&6
8016 with_png=no
8017 fi
8018
8019  }
8020   if test -z "$with_png"; then
8021     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
8022 echo "configure:8023: checking for workable png version information" >&5
8023     xe_check_libs="-lpng -lz"
8024     cat > conftest.$ac_ext <<EOF
8025 #line 8026 "configure"
8026 #include "confdefs.h"
8027 #include <png.h>
8028     int main(int c, char **v) {
8029     if (c == 1) return 0;
8030     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
8031     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
8032 EOF
8033 if { (eval echo configure:8034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8034 then
8035   ./conftest dummy_arg; png_status=$?;
8036       if test "$png_status" = "0"; then
8037         with_png=yes;
8038       else
8039         with_png=no;
8040         if test "$png_status" = "1"; then
8041           png_problem="PNG library version and header file don't match!"
8042         elif test "$png_status" = "2"; then
8043           png_problem="PNG library version too old (pre 1.0.2)!"
8044         fi
8045         echo "
8046 *** WARNING *** $png_problem
8047   I'm not touching that with a 10-foot pole!
8048   If you really want to use the installed version of libPNG, rerun
8049   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
8050     fi
8051 else
8052   conftest_rc="$?"
8053   echo "configure: failed program was:" >&5
8054   cat conftest.$ac_ext >&5
8055   rm -fr conftest*
8056   with_png=no
8057 fi
8058 rm -fr conftest*
8059     xe_check_libs=
8060     echo "$ac_t""$with_png" 1>&6
8061   fi
8062   if test "$with_png" = "yes"; then
8063     { test "$extra_verbose" = "yes" && cat << \EOF
8064     Defining HAVE_PNG
8065 EOF
8066 cat >> confdefs.h <<\EOF
8067 #define HAVE_PNG 1
8068 EOF
8069 }
8070
8071     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
8072   fi
8073
8074     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
8075 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
8076 echo "configure:8077: checking for tiffio.h" >&5
8077
8078 cat > conftest.$ac_ext <<EOF
8079 #line 8080 "configure"
8080 #include "confdefs.h"
8081 #include <tiffio.h>
8082 EOF
8083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8084 { (eval echo configure:8085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8085 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8086 if test -z "$ac_err"; then
8087   rm -rf conftest*
8088   eval "ac_cv_header_$ac_safe=yes"
8089 else
8090   echo "$ac_err" >&5
8091   echo "configure: failed program was:" >&5
8092   cat conftest.$ac_ext >&5
8093   rm -rf conftest*
8094   eval "ac_cv_header_$ac_safe=no"
8095 fi
8096 rm -f conftest*
8097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8098   echo "$ac_t""yes" 1>&6
8099   :
8100 else
8101   echo "$ac_t""no" 1>&6
8102 with_tiff=no
8103 fi
8104  }
8105   test -z "$with_tiff" && { 
8106 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
8107 echo "configure:8108: checking for TIFFClientOpen in -ltiff" >&5
8108 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
8109
8110 xe_check_libs=" -ltiff "
8111 cat > conftest.$ac_ext <<EOF
8112 #line 8113 "configure"
8113 #include "confdefs.h"
8114 /* Override any gcc2 internal prototype to avoid an error.  */
8115 /* We use char because int might match the return type of a gcc2
8116     builtin and then its argument prototype would still apply.  */
8117 char TIFFClientOpen();
8118
8119 int main() {
8120 TIFFClientOpen()
8121 ; return 0; }
8122 EOF
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8124   rm -rf conftest*
8125   eval "ac_cv_lib_$ac_lib_var=yes"
8126 else
8127   echo "configure: failed program was:" >&5
8128   cat conftest.$ac_ext >&5
8129   rm -rf conftest*
8130   eval "ac_cv_lib_$ac_lib_var=no"
8131 fi
8132 rm -f conftest*
8133 xe_check_libs=""
8134
8135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8136   echo "$ac_t""yes" 1>&6
8137   :
8138 else
8139   echo "$ac_t""no" 1>&6
8140 with_tiff=no
8141 fi
8142
8143  }
8144   test -z "$with_tiff" && with_tiff=yes
8145   if test "$with_tiff" = "yes"; then
8146     { test "$extra_verbose" = "yes" && cat << \EOF
8147     Defining HAVE_TIFF
8148 EOF
8149 cat >> confdefs.h <<\EOF
8150 #define HAVE_TIFF 1
8151 EOF
8152 }
8153
8154     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
8155   fi
8156 fi
8157
8158
8159 if test "$with_x11" = "yes"; then
8160
8161   echo "checking for X11 graphics libraries" 1>&6
8162 echo "configure:8163: checking for X11 graphics libraries" >&5
8163
8164   echo "checking for the Athena widgets" 1>&6
8165 echo "configure:8166: checking for the Athena widgets" >&5
8166
8167     case "$with_athena" in
8168         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
8169     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
8170     "next")     athena_variant=neXtaw   athena_3d=yes ;;
8171     "95")       athena_variant=Xaw95    athena_3d=yes ;;
8172     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
8173     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
8174   esac
8175
8176     if test "$athena_3d" = "no"; then
8177     
8178 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8179 echo "configure:8180: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8180 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8181
8182 xe_check_libs=" -l$athena_variant "
8183 cat > conftest.$ac_ext <<EOF
8184 #line 8185 "configure"
8185 #include "confdefs.h"
8186 /* Override any gcc2 internal prototype to avoid an error.  */
8187 /* We use char because int might match the return type of a gcc2
8188     builtin and then its argument prototype would still apply.  */
8189 char XawScrollbarSetThumb();
8190
8191 int main() {
8192 XawScrollbarSetThumb()
8193 ; return 0; }
8194 EOF
8195 if { (eval echo configure:8196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8196   rm -rf conftest*
8197   eval "ac_cv_lib_$ac_lib_var=yes"
8198 else
8199   echo "configure: failed program was:" >&5
8200   cat conftest.$ac_ext >&5
8201   rm -rf conftest*
8202   eval "ac_cv_lib_$ac_lib_var=no"
8203 fi
8204 rm -f conftest*
8205 xe_check_libs=""
8206
8207 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8208   echo "$ac_t""yes" 1>&6
8209           
8210 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8211 echo "configure:8212: checking for threeDClassRec in -l$athena_variant" >&5
8212 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8213
8214 xe_check_libs=" -l$athena_variant "
8215 cat > conftest.$ac_ext <<EOF
8216 #line 8217 "configure"
8217 #include "confdefs.h"
8218 /* Override any gcc2 internal prototype to avoid an error.  */
8219 /* We use char because int might match the return type of a gcc2
8220     builtin and then its argument prototype would still apply.  */
8221 char threeDClassRec();
8222
8223 int main() {
8224 threeDClassRec()
8225 ; return 0; }
8226 EOF
8227 if { (eval echo configure:8228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8228   rm -rf conftest*
8229   eval "ac_cv_lib_$ac_lib_var=yes"
8230 else
8231   echo "configure: failed program was:" >&5
8232   cat conftest.$ac_ext >&5
8233   rm -rf conftest*
8234   eval "ac_cv_lib_$ac_lib_var=no"
8235 fi
8236 rm -f conftest*
8237 xe_check_libs=""
8238
8239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8240   echo "$ac_t""yes" 1>&6
8241   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8242 else
8243   echo "$ac_t""no" 1>&6
8244 athena_lib=$athena_variant
8245 fi
8246
8247
8248       
8249 else
8250   echo "$ac_t""no" 1>&6
8251 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8252 fi
8253
8254
8255   else
8256         
8257 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8258 echo "configure:8259: checking for threeDClassRec in -l$athena_variant" >&5
8259 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8260
8261 xe_check_libs=" -l$athena_variant "
8262 cat > conftest.$ac_ext <<EOF
8263 #line 8264 "configure"
8264 #include "confdefs.h"
8265 /* Override any gcc2 internal prototype to avoid an error.  */
8266 /* We use char because int might match the return type of a gcc2
8267     builtin and then its argument prototype would still apply.  */
8268 char threeDClassRec();
8269
8270 int main() {
8271 threeDClassRec()
8272 ; return 0; }
8273 EOF
8274 if { (eval echo configure:8275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8275   rm -rf conftest*
8276   eval "ac_cv_lib_$ac_lib_var=yes"
8277 else
8278   echo "configure: failed program was:" >&5
8279   cat conftest.$ac_ext >&5
8280   rm -rf conftest*
8281   eval "ac_cv_lib_$ac_lib_var=no"
8282 fi
8283 rm -f conftest*
8284 xe_check_libs=""
8285
8286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8287   echo "$ac_t""yes" 1>&6
8288   athena_lib=$athena_variant
8289 else
8290   echo "$ac_t""no" 1>&6
8291 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8292 echo "configure:8293: checking for threeDClassRec in -lXaw" >&5
8293 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8294
8295 xe_check_libs=" -lXaw "
8296 cat > conftest.$ac_ext <<EOF
8297 #line 8298 "configure"
8298 #include "confdefs.h"
8299 /* Override any gcc2 internal prototype to avoid an error.  */
8300 /* We use char because int might match the return type of a gcc2
8301     builtin and then its argument prototype would still apply.  */
8302 char threeDClassRec();
8303
8304 int main() {
8305 threeDClassRec()
8306 ; return 0; }
8307 EOF
8308 if { (eval echo configure:8309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8309   rm -rf conftest*
8310   eval "ac_cv_lib_$ac_lib_var=yes"
8311 else
8312   echo "configure: failed program was:" >&5
8313   cat conftest.$ac_ext >&5
8314   rm -rf conftest*
8315   eval "ac_cv_lib_$ac_lib_var=no"
8316 fi
8317 rm -f conftest*
8318 xe_check_libs=""
8319
8320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8321   echo "$ac_t""yes" 1>&6
8322   athena_lib=Xaw;
8323           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8324         
8325 else
8326   echo "$ac_t""no" 1>&6
8327 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8328 fi
8329
8330
8331 fi
8332
8333
8334   fi
8335
8336     if test "$athena_3d" = "no"; then
8337     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8338 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8339 echo "configure:8340: checking for X11/Xaw/ThreeD.h" >&5
8340
8341 cat > conftest.$ac_ext <<EOF
8342 #line 8343 "configure"
8343 #include "confdefs.h"
8344 #include <X11/Xaw/ThreeD.h>
8345 EOF
8346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8347 { (eval echo configure:8348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8349 if test -z "$ac_err"; then
8350   rm -rf conftest*
8351   eval "ac_cv_header_$ac_safe=yes"
8352 else
8353   echo "$ac_err" >&5
8354   echo "configure: failed program was:" >&5
8355   cat conftest.$ac_ext >&5
8356   rm -rf conftest*
8357   eval "ac_cv_header_$ac_safe=no"
8358 fi
8359 rm -f conftest*
8360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8361   echo "$ac_t""yes" 1>&6
8362   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8363 else
8364   echo "$ac_t""no" 1>&6
8365 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8366 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8367 echo "configure:8368: checking for X11/Xaw/XawInit.h" >&5
8368
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 #include <X11/Xaw/XawInit.h>
8373 EOF
8374 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8375 { (eval echo configure:8376: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8376 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8377 if test -z "$ac_err"; then
8378   rm -rf conftest*
8379   eval "ac_cv_header_$ac_safe=yes"
8380 else
8381   echo "$ac_err" >&5
8382   echo "configure: failed program was:" >&5
8383   cat conftest.$ac_ext >&5
8384   rm -rf conftest*
8385   eval "ac_cv_header_$ac_safe=no"
8386 fi
8387 rm -f conftest*
8388 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   athena_h_path=X11/Xaw
8391 else
8392   echo "$ac_t""no" 1>&6
8393 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8394 fi
8395
8396 fi
8397
8398   else
8399             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8400 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8401 echo "configure:8402: checking for X11/$athena_variant/XawInit.h" >&5
8402
8403 cat > conftest.$ac_ext <<EOF
8404 #line 8405 "configure"
8405 #include "confdefs.h"
8406 #include <X11/$athena_variant/XawInit.h>
8407 EOF
8408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8409 { (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8411 if test -z "$ac_err"; then
8412   rm -rf conftest*
8413   eval "ac_cv_header_$ac_safe=yes"
8414 else
8415   echo "$ac_err" >&5
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   eval "ac_cv_header_$ac_safe=no"
8420 fi
8421 rm -f conftest*
8422 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8423   echo "$ac_t""yes" 1>&6
8424   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8425 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8426 echo "configure:8427: checking for X11/$athena_variant/ThreeD.h" >&5
8427
8428 cat > conftest.$ac_ext <<EOF
8429 #line 8430 "configure"
8430 #include "confdefs.h"
8431 #include <X11/$athena_variant/ThreeD.h>
8432 EOF
8433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8434 { (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8436 if test -z "$ac_err"; then
8437   rm -rf conftest*
8438   eval "ac_cv_header_$ac_safe=yes"
8439 else
8440   echo "$ac_err" >&5
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_header_$ac_safe=no"
8445 fi
8446 rm -f conftest*
8447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8448   echo "$ac_t""yes" 1>&6
8449   athena_h_path=X11/$athena_variant
8450 else
8451   echo "$ac_t""no" 1>&6
8452 fi
8453
8454 else
8455   echo "$ac_t""no" 1>&6
8456 fi
8457
8458
8459         if test -z "$athena_h_path"; then
8460       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8461 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8462 echo "configure:8463: checking for $athena_variant/XawInit.h" >&5
8463
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 #include <$athena_variant/XawInit.h>
8468 EOF
8469 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8470 { (eval echo configure:8471: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8471 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8472 if test -z "$ac_err"; then
8473   rm -rf conftest*
8474   eval "ac_cv_header_$ac_safe=yes"
8475 else
8476   echo "$ac_err" >&5
8477   echo "configure: failed program was:" >&5
8478   cat conftest.$ac_ext >&5
8479   rm -rf conftest*
8480   eval "ac_cv_header_$ac_safe=no"
8481 fi
8482 rm -f conftest*
8483 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8484   echo "$ac_t""yes" 1>&6
8485   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8486 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8487 echo "configure:8488: checking for $athena_variant/ThreeD.h" >&5
8488
8489 cat > conftest.$ac_ext <<EOF
8490 #line 8491 "configure"
8491 #include "confdefs.h"
8492 #include <$athena_variant/ThreeD.h>
8493 EOF
8494 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8495 { (eval echo configure:8496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8496 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8497 if test -z "$ac_err"; then
8498   rm -rf conftest*
8499   eval "ac_cv_header_$ac_safe=yes"
8500 else
8501   echo "$ac_err" >&5
8502   echo "configure: failed program was:" >&5
8503   cat conftest.$ac_ext >&5
8504   rm -rf conftest*
8505   eval "ac_cv_header_$ac_safe=no"
8506 fi
8507 rm -f conftest*
8508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8509   echo "$ac_t""yes" 1>&6
8510   athena_h_path=$athena_variant
8511 else
8512   echo "$ac_t""no" 1>&6
8513 fi
8514
8515 else
8516   echo "$ac_t""no" 1>&6
8517 fi
8518
8519     fi
8520
8521         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8522       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8523 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8524 echo "configure:8525: checking for X11/Xaw3d/XawInit.h" >&5
8525
8526 cat > conftest.$ac_ext <<EOF
8527 #line 8528 "configure"
8528 #include "confdefs.h"
8529 #include <X11/Xaw3d/XawInit.h>
8530 EOF
8531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8532 { (eval echo configure:8533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8534 if test -z "$ac_err"; then
8535   rm -rf conftest*
8536   eval "ac_cv_header_$ac_safe=yes"
8537 else
8538   echo "$ac_err" >&5
8539   echo "configure: failed program was:" >&5
8540   cat conftest.$ac_ext >&5
8541   rm -rf conftest*
8542   eval "ac_cv_header_$ac_safe=no"
8543 fi
8544 rm -f conftest*
8545 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8546   echo "$ac_t""yes" 1>&6
8547   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8548 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8549 echo "configure:8550: checking for X11/Xaw3d/ThreeD.h" >&5
8550
8551 cat > conftest.$ac_ext <<EOF
8552 #line 8553 "configure"
8553 #include "confdefs.h"
8554 #include <X11/Xaw3d/ThreeD.h>
8555 EOF
8556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8557 { (eval echo configure:8558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8559 if test -z "$ac_err"; then
8560   rm -rf conftest*
8561   eval "ac_cv_header_$ac_safe=yes"
8562 else
8563   echo "$ac_err" >&5
8564   echo "configure: failed program was:" >&5
8565   cat conftest.$ac_ext >&5
8566   rm -rf conftest*
8567   eval "ac_cv_header_$ac_safe=no"
8568 fi
8569 rm -f conftest*
8570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8571   echo "$ac_t""yes" 1>&6
8572   
8573             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8574             athena_h_path=X11/Xaw3d
8575           
8576 else
8577   echo "$ac_t""no" 1>&6
8578 fi
8579
8580 else
8581   echo "$ac_t""no" 1>&6
8582 fi
8583
8584     fi
8585
8586         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8587       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8588 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8589 echo "configure:8590: checking for Xaw3d/XawInit.h" >&5
8590
8591 cat > conftest.$ac_ext <<EOF
8592 #line 8593 "configure"
8593 #include "confdefs.h"
8594 #include <Xaw3d/XawInit.h>
8595 EOF
8596 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8597 { (eval echo configure:8598: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8598 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8599 if test -z "$ac_err"; then
8600   rm -rf conftest*
8601   eval "ac_cv_header_$ac_safe=yes"
8602 else
8603   echo "$ac_err" >&5
8604   echo "configure: failed program was:" >&5
8605   cat conftest.$ac_ext >&5
8606   rm -rf conftest*
8607   eval "ac_cv_header_$ac_safe=no"
8608 fi
8609 rm -f conftest*
8610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8611   echo "$ac_t""yes" 1>&6
8612   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8613 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8614 echo "configure:8615: checking for Xaw3d/ThreeD.h" >&5
8615
8616 cat > conftest.$ac_ext <<EOF
8617 #line 8618 "configure"
8618 #include "confdefs.h"
8619 #include <Xaw3d/ThreeD.h>
8620 EOF
8621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8622 { (eval echo configure:8623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8624 if test -z "$ac_err"; then
8625   rm -rf conftest*
8626   eval "ac_cv_header_$ac_safe=yes"
8627 else
8628   echo "$ac_err" >&5
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   eval "ac_cv_header_$ac_safe=no"
8633 fi
8634 rm -f conftest*
8635 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8636   echo "$ac_t""yes" 1>&6
8637   
8638             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8639             athena_h_path=Xaw3d
8640           
8641 else
8642   echo "$ac_t""no" 1>&6
8643 fi
8644
8645 else
8646   echo "$ac_t""no" 1>&6
8647 fi
8648
8649     fi
8650
8651             if test -z "$athena_h_path"; then
8652       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8653 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8654 echo "configure:8655: checking for X11/Xaw/ThreeD.h" >&5
8655
8656 cat > conftest.$ac_ext <<EOF
8657 #line 8658 "configure"
8658 #include "confdefs.h"
8659 #include <X11/Xaw/ThreeD.h>
8660 EOF
8661 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8662 { (eval echo configure:8663: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8663 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8664 if test -z "$ac_err"; then
8665   rm -rf conftest*
8666   eval "ac_cv_header_$ac_safe=yes"
8667 else
8668   echo "$ac_err" >&5
8669   echo "configure: failed program was:" >&5
8670   cat conftest.$ac_ext >&5
8671   rm -rf conftest*
8672   eval "ac_cv_header_$ac_safe=no"
8673 fi
8674 rm -f conftest*
8675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8676   echo "$ac_t""yes" 1>&6
8677   
8678           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8679           athena_h_path=X11/Xaw
8680         
8681 else
8682   echo "$ac_t""no" 1>&6
8683 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8684 fi
8685
8686     fi
8687   fi
8688
8689     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8690     have_xaw=yes
8691   else
8692     have_xaw=no
8693   fi
8694
8695     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8696 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8697 echo "configure:8698: checking for Xm/Xm.h" >&5
8698
8699 cat > conftest.$ac_ext <<EOF
8700 #line 8701 "configure"
8701 #include "confdefs.h"
8702 #include <Xm/Xm.h>
8703 EOF
8704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8705 { (eval echo configure:8706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8707 if test -z "$ac_err"; then
8708   rm -rf conftest*
8709   eval "ac_cv_header_$ac_safe=yes"
8710 else
8711   echo "$ac_err" >&5
8712   echo "configure: failed program was:" >&5
8713   cat conftest.$ac_ext >&5
8714   rm -rf conftest*
8715   eval "ac_cv_header_$ac_safe=no"
8716 fi
8717 rm -f conftest*
8718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8719   echo "$ac_t""yes" 1>&6
8720   
8721 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8722 echo "configure:8723: checking for XmStringFree in -lXm" >&5
8723 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8724
8725 xe_check_libs=" -lXm "
8726 cat > conftest.$ac_ext <<EOF
8727 #line 8728 "configure"
8728 #include "confdefs.h"
8729 /* Override any gcc2 internal prototype to avoid an error.  */
8730 /* We use char because int might match the return type of a gcc2
8731     builtin and then its argument prototype would still apply.  */
8732 char XmStringFree();
8733
8734 int main() {
8735 XmStringFree()
8736 ; return 0; }
8737 EOF
8738 if { (eval echo configure:8739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8739   rm -rf conftest*
8740   eval "ac_cv_lib_$ac_lib_var=yes"
8741 else
8742   echo "configure: failed program was:" >&5
8743   cat conftest.$ac_ext >&5
8744   rm -rf conftest*
8745   eval "ac_cv_lib_$ac_lib_var=no"
8746 fi
8747 rm -f conftest*
8748 xe_check_libs=""
8749
8750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8751   echo "$ac_t""yes" 1>&6
8752   have_motif=yes
8753 else
8754   echo "$ac_t""no" 1>&6
8755 have_motif=no
8756 fi
8757
8758
8759 else
8760   echo "$ac_t""no" 1>&6
8761 have_motif=no
8762 fi
8763
8764
8765   if test "$have_motif" = "yes"; then
8766         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8767 echo "configure:8768: checking for Lesstif" >&5
8768     cat > conftest.$ac_ext <<EOF
8769 #line 8770 "configure"
8770 #include "confdefs.h"
8771 #include <Xm/Xm.h>
8772 #ifdef LESSTIF_VERSION
8773 yes
8774 #endif
8775
8776 EOF
8777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8778   egrep "yes" >/dev/null 2>&1; then
8779   rm -rf conftest*
8780   have_lesstif=yes
8781 else
8782   rm -rf conftest*
8783   have_lesstif=no
8784 fi
8785 rm -f conftest*
8786
8787   echo "$ac_t""$have_lesstif" 1>&6
8788   fi
8789
8790 fi 
8791
8792 case "$with_menubars" in "" | "yes" | "athena" )
8793   with_menubars="lucid" ;;
8794 esac
8795 case "$with_dialogs" in "" | "yes" | "lucid" )
8796   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8797   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8798   else with_dialogs=no
8799   fi ;;
8800 esac
8801 case "$with_scrollbars" in "" | "yes" )
8802   with_scrollbars="lucid" ;;
8803 esac
8804 case "$with_widgets" in "" | "yes" | "lucid")
8805   if   test "$have_motif" = "yes"; then with_widgets="motif"
8806   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8807   else with_widgets=no
8808   fi ;;
8809 esac
8810
8811 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8812
8813 case "$all_widgets" in
8814   *athena* )
8815     if test "$have_xaw" != "yes"; then
8816       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8817     fi
8818
8819         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8820
8821         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8822
8823             { test "$extra_verbose" = "yes" && cat << EOF
8824     Defining ATHENA_H_PATH = $athena_h_path
8825 EOF
8826 cat >> confdefs.h <<EOF
8827 #define ATHENA_H_PATH $athena_h_path
8828 EOF
8829 }
8830
8831
8832     { test "$extra_verbose" = "yes" && cat << \EOF
8833     Defining LWLIB_USES_ATHENA
8834 EOF
8835 cat >> confdefs.h <<\EOF
8836 #define LWLIB_USES_ATHENA 1
8837 EOF
8838 }
8839
8840     { test "$extra_verbose" = "yes" && cat << \EOF
8841     Defining NEED_ATHENA
8842 EOF
8843 cat >> confdefs.h <<\EOF
8844 #define NEED_ATHENA 1
8845 EOF
8846 }
8847
8848
8849     if test "$athena_3d" = "yes"; then
8850       { test "$extra_verbose" = "yes" && cat << \EOF
8851     Defining HAVE_ATHENA_3D
8852 EOF
8853 cat >> confdefs.h <<\EOF
8854 #define HAVE_ATHENA_3D 1
8855 EOF
8856 }
8857
8858     fi
8859   ;;
8860 esac
8861
8862 case "$all_widgets" in *motif* )
8863   { test "$extra_verbose" = "yes" && cat << \EOF
8864     Defining LWLIB_USES_MOTIF
8865 EOF
8866 cat >> confdefs.h <<\EOF
8867 #define LWLIB_USES_MOTIF 1
8868 EOF
8869 }
8870
8871   { test "$extra_verbose" = "yes" && cat << \EOF
8872     Defining NEED_MOTIF
8873 EOF
8874 cat >> confdefs.h <<\EOF
8875 #define NEED_MOTIF 1
8876 EOF
8877 }
8878
8879   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8880   need_motif=yes ;;
8881 esac
8882
8883 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8884 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8885 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8886 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8887         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8888 case "$with_widgets" in athena* )
8889         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;;
8890 esac
8891 case "$all_widgets" in *lucid* )
8892   { test "$extra_verbose" = "yes" && cat << \EOF
8893     Defining NEED_LUCID
8894 EOF
8895 cat >> confdefs.h <<\EOF
8896 #define NEED_LUCID 1
8897 EOF
8898 }
8899
8900   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8901 esac
8902
8903
8904
8905 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8906     Defining LWLIB_SCROLLBARS_ATHENA
8907 EOF
8908 cat >> confdefs.h <<\EOF
8909 #define LWLIB_SCROLLBARS_ATHENA 1
8910 EOF
8911 }
8912
8913 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8914     Defining LWLIB_DIALOGS_ATHENA
8915 EOF
8916 cat >> confdefs.h <<\EOF
8917 #define LWLIB_DIALOGS_ATHENA 1
8918 EOF
8919 }
8920
8921
8922 if test "$athena_3d" = "yes"; then
8923   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8924     Defining LWLIB_SCROLLBARS_ATHENA3D
8925 EOF
8926 cat >> confdefs.h <<\EOF
8927 #define LWLIB_SCROLLBARS_ATHENA3D 1
8928 EOF
8929 }
8930
8931   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8932     Defining LWLIB_DIALOGS_ATHENA3D
8933 EOF
8934 cat >> confdefs.h <<\EOF
8935 #define LWLIB_DIALOGS_ATHENA3D 1
8936 EOF
8937 }
8938
8939 fi
8940
8941 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8942     Defining LWLIB_WIDGETS_ATHENA
8943 EOF
8944 cat >> confdefs.h <<\EOF
8945 #define LWLIB_WIDGETS_ATHENA 1
8946 EOF
8947 }
8948 ;; esac
8949 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8950         { test "$extra_verbose" = "yes" && cat << \EOF
8951     Defining LWLIB_TABS_LUCID
8952 EOF
8953 cat >> confdefs.h <<\EOF
8954 #define LWLIB_TABS_LUCID 1
8955 EOF
8956 }
8957
8958
8959 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8960     Defining HAVE_MENUBARS
8961 EOF
8962 cat >> confdefs.h <<\EOF
8963 #define HAVE_MENUBARS 1
8964 EOF
8965 }
8966
8967 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8968     Defining HAVE_SCROLLBARS
8969 EOF
8970 cat >> confdefs.h <<\EOF
8971 #define HAVE_SCROLLBARS 1
8972 EOF
8973 }
8974
8975 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8976     Defining HAVE_DIALOGS
8977 EOF
8978 cat >> confdefs.h <<\EOF
8979 #define HAVE_DIALOGS 1
8980 EOF
8981 }
8982
8983 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8984     Defining HAVE_TOOLBARS
8985 EOF
8986 cat >> confdefs.h <<\EOF
8987 #define HAVE_TOOLBARS 1
8988 EOF
8989 }
8990
8991 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8992     Defining HAVE_WIDGETS
8993 EOF
8994 cat >> confdefs.h <<\EOF
8995 #define HAVE_WIDGETS 1
8996 EOF
8997 }
8998
8999
9000 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9001     Defining LWLIB_MENUBARS_LUCID
9002 EOF
9003 cat >> confdefs.h <<\EOF
9004 #define LWLIB_MENUBARS_LUCID 1
9005 EOF
9006 }
9007
9008 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
9009     Defining LWLIB_SCROLLBARS_LUCID
9010 EOF
9011 cat >> confdefs.h <<\EOF
9012 #define LWLIB_SCROLLBARS_LUCID 1
9013 EOF
9014 }
9015
9016
9017 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9018     Defining LWLIB_MENUBARS_MOTIF
9019 EOF
9020 cat >> confdefs.h <<\EOF
9021 #define LWLIB_MENUBARS_MOTIF 1
9022 EOF
9023 }
9024
9025 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9026     Defining LWLIB_SCROLLBARS_MOTIF
9027 EOF
9028 cat >> confdefs.h <<\EOF
9029 #define LWLIB_SCROLLBARS_MOTIF 1
9030 EOF
9031 }
9032
9033 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9034     Defining LWLIB_DIALOGS_MOTIF
9035 EOF
9036 cat >> confdefs.h <<\EOF
9037 #define LWLIB_DIALOGS_MOTIF 1
9038 EOF
9039 }
9040
9041 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
9042     Defining LWLIB_WIDGETS_MOTIF
9043 EOF
9044 cat >> confdefs.h <<\EOF
9045 #define LWLIB_WIDGETS_MOTIF 1
9046 EOF
9047 }
9048
9049
9050 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
9051    echo "    xemacs will be linked with \"menubar.o\""
9052  fi
9053 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
9054    echo "    xemacs will be linked with \"scrollbar.o\""
9055  fi
9056 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
9057    echo "    xemacs will be linked with \"dialog.o\""
9058  fi
9059 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
9060    echo "    xemacs will be linked with \"toolbar.o\""
9061  fi
9062
9063 if test "$with_x11" = "yes"; then
9064   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
9065    echo "    xemacs will be linked with \"menubar-x.o\""
9066  fi
9067   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9068    echo "    xemacs will be linked with \"scrollbar-x.o\""
9069  fi
9070   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
9071    echo "    xemacs will be linked with \"dialog-x.o\""
9072  fi
9073   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
9074    echo "    xemacs will be linked with \"toolbar-x.o\""
9075  fi
9076   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
9077    echo "    xemacs will be linked with \"gui-x.o\""
9078  fi
9079 fi
9080
9081
9082 test -z "$with_mule" && with_mule=no
9083 test -z "$with_file_coding" && with_file_coding=no
9084
9085
9086 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
9087   { test "$extra_verbose" = "yes" && cat << \EOF
9088     Defining FILE_CODING
9089 EOF
9090 cat >> confdefs.h <<\EOF
9091 #define FILE_CODING 1
9092 EOF
9093 }
9094
9095   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9096    echo "    xemacs will be linked with \"file-coding.o\""
9097  fi
9098 fi
9099
9100 if test "$with_mule" = "yes" ; then
9101   echo "checking for Mule-related features" 1>&6
9102 echo "configure:9103: checking for Mule-related features" >&5
9103   { test "$extra_verbose" = "yes" && cat << \EOF
9104     Defining MULE
9105 EOF
9106 cat >> confdefs.h <<\EOF
9107 #define MULE 1
9108 EOF
9109 }
9110
9111   { test "$extra_verbose" = "yes" && cat << \EOF
9112     Defining FILE_CODING
9113 EOF
9114 cat >> confdefs.h <<\EOF
9115 #define FILE_CODING 1
9116 EOF
9117 }
9118
9119   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o" &&  if test "$extra_verbose" = "yes"; then
9120    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o\""
9121  fi
9122   if test "$with_utf_2000" = "yes" && test "$with_text_coding" = "yes"; then
9123     { test "$extra_verbose" = "yes" && cat << \EOF
9124     Defining TEXT_CODING
9125 EOF
9126 cat >> confdefs.h <<\EOF
9127 #define TEXT_CODING 1
9128 EOF
9129 }
9130
9131     extra_objs="$extra_objs text-coding.o" &&  if test "$extra_verbose" = "yes"; then
9132    echo "    xemacs will be linked with \"text-coding.o\""
9133  fi
9134   else
9135     extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
9136    echo "    xemacs will be linked with \"file-coding.o\""
9137  fi
9138   fi
9139     for ac_hdr in libintl.h
9140 do
9141 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9142 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9143 echo "configure:9144: checking for $ac_hdr" >&5
9144
9145 cat > conftest.$ac_ext <<EOF
9146 #line 9147 "configure"
9147 #include "confdefs.h"
9148 #include <$ac_hdr>
9149 EOF
9150 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9151 { (eval echo configure:9152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9152 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9153 if test -z "$ac_err"; then
9154   rm -rf conftest*
9155   eval "ac_cv_header_$ac_safe=yes"
9156 else
9157   echo "$ac_err" >&5
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_header_$ac_safe=no"
9162 fi
9163 rm -f conftest*
9164 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9165   echo "$ac_t""yes" 1>&6
9166     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9167   { test "$extra_verbose" = "yes" && cat << EOF
9168     Defining $ac_tr_hdr
9169 EOF
9170 cat >> confdefs.h <<EOF
9171 #define $ac_tr_hdr 1
9172 EOF
9173 }
9174  
9175 else
9176   echo "$ac_t""no" 1>&6
9177 fi
9178 done
9179
9180   
9181 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
9182 echo "configure:9183: checking for strerror in -lintl" >&5
9183 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
9184
9185 xe_check_libs=" -lintl "
9186 cat > conftest.$ac_ext <<EOF
9187 #line 9188 "configure"
9188 #include "confdefs.h"
9189 /* Override any gcc2 internal prototype to avoid an error.  */
9190 /* We use char because int might match the return type of a gcc2
9191     builtin and then its argument prototype would still apply.  */
9192 char strerror();
9193
9194 int main() {
9195 strerror()
9196 ; return 0; }
9197 EOF
9198 if { (eval echo configure:9199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9199   rm -rf conftest*
9200   eval "ac_cv_lib_$ac_lib_var=yes"
9201 else
9202   echo "configure: failed program was:" >&5
9203   cat conftest.$ac_ext >&5
9204   rm -rf conftest*
9205   eval "ac_cv_lib_$ac_lib_var=no"
9206 fi
9207 rm -f conftest*
9208 xe_check_libs=""
9209
9210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9211   echo "$ac_t""yes" 1>&6
9212     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9214   { test "$extra_verbose" = "yes" && cat << EOF
9215     Defining $ac_tr_lib
9216 EOF
9217 cat >> confdefs.h <<EOF
9218 #define $ac_tr_lib 1
9219 EOF
9220 }
9221
9222   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228
9229
9230   if test "$with_utf_2000" = "yes" ; then
9231     { test "$extra_verbose" = "yes" && cat << \EOF
9232     Defining CHAR_IS_UCS4
9233 EOF
9234 cat >> confdefs.h <<\EOF
9235 #define CHAR_IS_UCS4 1
9236 EOF
9237 }
9238
9239     { test "$extra_verbose" = "yes" && cat << \EOF
9240     Defining UTF2000
9241 EOF
9242 cat >> confdefs.h <<\EOF
9243 #define UTF2000 1
9244 EOF
9245 }
9246
9247   fi
9248
9249   echo "checking for Mule input methods" 1>&6
9250 echo "configure:9251: checking for Mule input methods" >&5
9251         case "$with_xim" in "" | "yes" )
9252     echo "checking for XIM" 1>&6
9253 echo "configure:9254: checking for XIM" >&5
9254     
9255 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9256 echo "configure:9257: checking for XOpenIM in -lX11" >&5
9257 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9258
9259 xe_check_libs=" -lX11 "
9260 cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 /* Override any gcc2 internal prototype to avoid an error.  */
9264 /* We use char because int might match the return type of a gcc2
9265     builtin and then its argument prototype would still apply.  */
9266 char XOpenIM();
9267
9268 int main() {
9269 XOpenIM()
9270 ; return 0; }
9271 EOF
9272 if { (eval echo configure:9273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9273   rm -rf conftest*
9274   eval "ac_cv_lib_$ac_lib_var=yes"
9275 else
9276   echo "configure: failed program was:" >&5
9277   cat conftest.$ac_ext >&5
9278   rm -rf conftest*
9279   eval "ac_cv_lib_$ac_lib_var=no"
9280 fi
9281 rm -f conftest*
9282 xe_check_libs=""
9283
9284 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9285   echo "$ac_t""yes" 1>&6
9286   with_xim=xlib
9287 else
9288   echo "$ac_t""no" 1>&6
9289 with_xim=no
9290 fi
9291
9292
9293         if test "$have_motif $have_lesstif" = "yes no"; then
9294       
9295 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9296 echo "configure:9297: checking for XmImMbLookupString in -lXm" >&5
9297 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9298
9299 xe_check_libs=" -lXm "
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 /* Override any gcc2 internal prototype to avoid an error.  */
9304 /* We use char because int might match the return type of a gcc2
9305     builtin and then its argument prototype would still apply.  */
9306 char XmImMbLookupString();
9307
9308 int main() {
9309 XmImMbLookupString()
9310 ; return 0; }
9311 EOF
9312 if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9313   rm -rf conftest*
9314   eval "ac_cv_lib_$ac_lib_var=yes"
9315 else
9316   echo "configure: failed program was:" >&5
9317   cat conftest.$ac_ext >&5
9318   rm -rf conftest*
9319   eval "ac_cv_lib_$ac_lib_var=no"
9320 fi
9321 rm -f conftest*
9322 xe_check_libs=""
9323
9324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9325   echo "$ac_t""yes" 1>&6
9326   with_xim=motif
9327 else
9328   echo "$ac_t""no" 1>&6
9329 fi
9330
9331
9332     fi ;;
9333   esac
9334   if test "$with_xim" != "no"; then
9335     { test "$extra_verbose" = "yes" && cat << \EOF
9336     Defining HAVE_XIM
9337 EOF
9338 cat >> confdefs.h <<\EOF
9339 #define HAVE_XIM 1
9340 EOF
9341 }
9342
9343     if test "$with_xim" = "xlib"; then
9344       { test "$extra_verbose" = "yes" && cat << \EOF
9345     Defining XIM_XLIB
9346 EOF
9347 cat >> confdefs.h <<\EOF
9348 #define XIM_XLIB 1
9349 EOF
9350 }
9351
9352       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9353    echo "    xemacs will be linked with \"input-method-xlib.o\""
9354  fi
9355     fi
9356     if test "$with_xim" = "motif"; then
9357       { test "$extra_verbose" = "yes" && cat << \EOF
9358     Defining XIM_MOTIF
9359 EOF
9360 cat >> confdefs.h <<\EOF
9361 #define XIM_MOTIF 1
9362 EOF
9363 }
9364
9365       need_motif=yes
9366       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9367    echo "    xemacs will be linked with \"input-method-motif.o\""
9368  fi
9369     fi
9370     if test "$with_xim" = "motif"; then
9371       with_xfs=no
9372     fi
9373   fi
9374
9375     if test "$with_xfs" = "yes" ; then
9376     echo "checking for XFontSet" 1>&6
9377 echo "configure:9378: checking for XFontSet" >&5
9378     
9379 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9380 echo "configure:9381: checking for XmbDrawString in -lX11" >&5
9381 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9382
9383 xe_check_libs=" -lX11 "
9384 cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387 /* Override any gcc2 internal prototype to avoid an error.  */
9388 /* We use char because int might match the return type of a gcc2
9389     builtin and then its argument prototype would still apply.  */
9390 char XmbDrawString();
9391
9392 int main() {
9393 XmbDrawString()
9394 ; return 0; }
9395 EOF
9396 if { (eval echo configure:9397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9397   rm -rf conftest*
9398   eval "ac_cv_lib_$ac_lib_var=yes"
9399 else
9400   echo "configure: failed program was:" >&5
9401   cat conftest.$ac_ext >&5
9402   rm -rf conftest*
9403   eval "ac_cv_lib_$ac_lib_var=no"
9404 fi
9405 rm -f conftest*
9406 xe_check_libs=""
9407
9408 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9409   echo "$ac_t""yes" 1>&6
9410   :
9411 else
9412   echo "$ac_t""no" 1>&6
9413 with_xfs=no
9414 fi
9415
9416
9417     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9418       { test "$extra_verbose" = "yes" && cat << \EOF
9419     Defining USE_XFONTSET
9420 EOF
9421 cat >> confdefs.h <<\EOF
9422 #define USE_XFONTSET 1
9423 EOF
9424 }
9425
9426       if test "$with_xim" = "no" ; then
9427         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9428    echo "    xemacs will be linked with \"input-method-xfs.o\""
9429  fi
9430       fi
9431     fi
9432   fi 
9433     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9434   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9435 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9436 echo "configure:9437: checking for wnn/jllib.h" >&5
9437
9438 cat > conftest.$ac_ext <<EOF
9439 #line 9440 "configure"
9440 #include "confdefs.h"
9441 #include <wnn/jllib.h>
9442 EOF
9443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9444 { (eval echo configure:9445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9446 if test -z "$ac_err"; then
9447   rm -rf conftest*
9448   eval "ac_cv_header_$ac_safe=yes"
9449 else
9450   echo "$ac_err" >&5
9451   echo "configure: failed program was:" >&5
9452   cat conftest.$ac_ext >&5
9453   rm -rf conftest*
9454   eval "ac_cv_header_$ac_safe=no"
9455 fi
9456 rm -f conftest*
9457 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9458   echo "$ac_t""yes" 1>&6
9459   :
9460 else
9461   echo "$ac_t""no" 1>&6
9462 with_wnn=no
9463 fi
9464  }
9465     if test "$with_wnn" != "no"; then
9466     for ac_func in crypt
9467 do
9468 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9469 echo "configure:9470: checking for $ac_func" >&5
9470
9471 cat > conftest.$ac_ext <<EOF
9472 #line 9473 "configure"
9473 #include "confdefs.h"
9474 /* System header to define __stub macros and hopefully few prototypes,
9475     which can conflict with char $ac_func(); below.  */
9476 #include <assert.h>
9477 /* Override any gcc2 internal prototype to avoid an error.  */
9478 /* We use char because int might match the return type of a gcc2
9479     builtin and then its argument prototype would still apply.  */
9480 char $ac_func();
9481
9482 int main() {
9483
9484 /* The GNU C library defines this for functions which it implements
9485     to always fail with ENOSYS.  Some functions are actually named
9486     something starting with __ and the normal name is an alias.  */
9487 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9488 choke me
9489 #else
9490 $ac_func();
9491 #endif
9492
9493 ; return 0; }
9494 EOF
9495 if { (eval echo configure:9496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9496   rm -rf conftest*
9497   eval "ac_cv_func_$ac_func=yes"
9498 else
9499   echo "configure: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   rm -rf conftest*
9502   eval "ac_cv_func_$ac_func=no"
9503 fi
9504 rm -f conftest*
9505
9506 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9507   echo "$ac_t""yes" 1>&6
9508     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9509   { test "$extra_verbose" = "yes" && cat << EOF
9510     Defining $ac_tr_func
9511 EOF
9512 cat >> confdefs.h <<EOF
9513 #define $ac_tr_func 1
9514 EOF
9515 }
9516  
9517 else
9518   echo "$ac_t""no" 1>&6
9519 fi
9520 done
9521
9522     test "$ac_cv_func_crypt" != "yes" && { 
9523 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9524 echo "configure:9525: checking for crypt in -lcrypt" >&5
9525 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9526
9527 xe_check_libs=" -lcrypt "
9528 cat > conftest.$ac_ext <<EOF
9529 #line 9530 "configure"
9530 #include "confdefs.h"
9531 /* Override any gcc2 internal prototype to avoid an error.  */
9532 /* We use char because int might match the return type of a gcc2
9533     builtin and then its argument prototype would still apply.  */
9534 char crypt();
9535
9536 int main() {
9537 crypt()
9538 ; return 0; }
9539 EOF
9540 if { (eval echo configure:9541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9541   rm -rf conftest*
9542   eval "ac_cv_lib_$ac_lib_var=yes"
9543 else
9544   echo "configure: failed program was:" >&5
9545   cat conftest.$ac_ext >&5
9546   rm -rf conftest*
9547   eval "ac_cv_lib_$ac_lib_var=no"
9548 fi
9549 rm -f conftest*
9550 xe_check_libs=""
9551
9552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9553   echo "$ac_t""yes" 1>&6
9554     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9555     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9556   { test "$extra_verbose" = "yes" && cat << EOF
9557     Defining $ac_tr_lib
9558 EOF
9559 cat >> confdefs.h <<EOF
9560 #define $ac_tr_lib 1
9561 EOF
9562 }
9563
9564   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9565
9566 else
9567   echo "$ac_t""no" 1>&6
9568 fi
9569
9570  }
9571   fi
9572     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9573     
9574 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9575 echo "configure:9576: checking for jl_dic_list_e in -lwnn" >&5
9576 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9577
9578 xe_check_libs=" -lwnn "
9579 cat > conftest.$ac_ext <<EOF
9580 #line 9581 "configure"
9581 #include "confdefs.h"
9582 /* Override any gcc2 internal prototype to avoid an error.  */
9583 /* We use char because int might match the return type of a gcc2
9584     builtin and then its argument prototype would still apply.  */
9585 char jl_dic_list_e();
9586
9587 int main() {
9588 jl_dic_list_e()
9589 ; return 0; }
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9592   rm -rf conftest*
9593   eval "ac_cv_lib_$ac_lib_var=yes"
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   eval "ac_cv_lib_$ac_lib_var=no"
9599 fi
9600 rm -f conftest*
9601 xe_check_libs=""
9602
9603 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9604   echo "$ac_t""yes" 1>&6
9605   libwnn=wnn
9606 else
9607   echo "$ac_t""no" 1>&6
9608 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9609 echo "configure:9610: checking for jl_dic_list_e in -lwnn4" >&5
9610 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9611
9612 xe_check_libs=" -lwnn4 "
9613 cat > conftest.$ac_ext <<EOF
9614 #line 9615 "configure"
9615 #include "confdefs.h"
9616 /* Override any gcc2 internal prototype to avoid an error.  */
9617 /* We use char because int might match the return type of a gcc2
9618     builtin and then its argument prototype would still apply.  */
9619 char jl_dic_list_e();
9620
9621 int main() {
9622 jl_dic_list_e()
9623 ; return 0; }
9624 EOF
9625 if { (eval echo configure:9626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9626   rm -rf conftest*
9627   eval "ac_cv_lib_$ac_lib_var=yes"
9628 else
9629   echo "configure: failed program was:" >&5
9630   cat conftest.$ac_ext >&5
9631   rm -rf conftest*
9632   eval "ac_cv_lib_$ac_lib_var=no"
9633 fi
9634 rm -f conftest*
9635 xe_check_libs=""
9636
9637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9638   echo "$ac_t""yes" 1>&6
9639   libwnn=wnn4
9640 else
9641   echo "$ac_t""no" 1>&6
9642 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9643 echo "configure:9644: checking for jl_dic_list_e in -lwnn6" >&5
9644 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9645
9646 xe_check_libs=" -lwnn6 "
9647 cat > conftest.$ac_ext <<EOF
9648 #line 9649 "configure"
9649 #include "confdefs.h"
9650 /* Override any gcc2 internal prototype to avoid an error.  */
9651 /* We use char because int might match the return type of a gcc2
9652     builtin and then its argument prototype would still apply.  */
9653 char jl_dic_list_e();
9654
9655 int main() {
9656 jl_dic_list_e()
9657 ; return 0; }
9658 EOF
9659 if { (eval echo configure:9660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9660   rm -rf conftest*
9661   eval "ac_cv_lib_$ac_lib_var=yes"
9662 else
9663   echo "configure: failed program was:" >&5
9664   cat conftest.$ac_ext >&5
9665   rm -rf conftest*
9666   eval "ac_cv_lib_$ac_lib_var=no"
9667 fi
9668 rm -f conftest*
9669 xe_check_libs=""
9670
9671 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9672   echo "$ac_t""yes" 1>&6
9673   libwnn=wnn6
9674 else
9675   echo "$ac_t""no" 1>&6
9676 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9677 echo "configure:9678: checking for dic_list_e in -lwnn6_fromsrc" >&5
9678 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9679
9680 xe_check_libs=" -lwnn6_fromsrc "
9681 cat > conftest.$ac_ext <<EOF
9682 #line 9683 "configure"
9683 #include "confdefs.h"
9684 /* Override any gcc2 internal prototype to avoid an error.  */
9685 /* We use char because int might match the return type of a gcc2
9686     builtin and then its argument prototype would still apply.  */
9687 char dic_list_e();
9688
9689 int main() {
9690 dic_list_e()
9691 ; return 0; }
9692 EOF
9693 if { (eval echo configure:9694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9694   rm -rf conftest*
9695   eval "ac_cv_lib_$ac_lib_var=yes"
9696 else
9697   echo "configure: failed program was:" >&5
9698   cat conftest.$ac_ext >&5
9699   rm -rf conftest*
9700   eval "ac_cv_lib_$ac_lib_var=no"
9701 fi
9702 rm -f conftest*
9703 xe_check_libs=""
9704
9705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9706   echo "$ac_t""yes" 1>&6
9707   libwnn=wnn6_fromsrc
9708 else
9709   echo "$ac_t""no" 1>&6
9710 with_wnn=no
9711 fi
9712
9713
9714 fi
9715
9716
9717 fi
9718
9719
9720 fi
9721
9722
9723   fi
9724   test -z "$with_wnn" && with_wnn=yes
9725   if test "$with_wnn" = "yes"; then
9726     { test "$extra_verbose" = "yes" && cat << \EOF
9727     Defining HAVE_WNN
9728 EOF
9729 cat >> confdefs.h <<\EOF
9730 #define HAVE_WNN 1
9731 EOF
9732 }
9733
9734     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9735     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9736    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9737  fi
9738     if test "$with_wnn6" != "no"; then
9739       
9740 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9741 echo "configure:9742: checking for jl_fi_dic_list in -l$libwnn" >&5
9742 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9743
9744 xe_check_libs=" -l$libwnn "
9745 cat > conftest.$ac_ext <<EOF
9746 #line 9747 "configure"
9747 #include "confdefs.h"
9748 /* Override any gcc2 internal prototype to avoid an error.  */
9749 /* We use char because int might match the return type of a gcc2
9750     builtin and then its argument prototype would still apply.  */
9751 char jl_fi_dic_list();
9752
9753 int main() {
9754 jl_fi_dic_list()
9755 ; return 0; }
9756 EOF
9757 if { (eval echo configure:9758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9758   rm -rf conftest*
9759   eval "ac_cv_lib_$ac_lib_var=yes"
9760 else
9761   echo "configure: failed program was:" >&5
9762   cat conftest.$ac_ext >&5
9763   rm -rf conftest*
9764   eval "ac_cv_lib_$ac_lib_var=no"
9765 fi
9766 rm -f conftest*
9767 xe_check_libs=""
9768
9769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9770   echo "$ac_t""yes" 1>&6
9771   with_wnn6=yes
9772 else
9773   echo "$ac_t""no" 1>&6
9774 fi
9775
9776
9777       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9778     Defining WNN6
9779 EOF
9780 cat >> confdefs.h <<\EOF
9781 #define WNN6 1
9782 EOF
9783 }
9784
9785     fi
9786   fi
9787
9788     canna_includes_found=no
9789   if test "$with_canna" != "no"; then
9790     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9791 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9792 echo "configure:9793: checking for canna/jrkanji.h" >&5
9793
9794 cat > conftest.$ac_ext <<EOF
9795 #line 9796 "configure"
9796 #include "confdefs.h"
9797 #include <canna/jrkanji.h>
9798 EOF
9799 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9800 { (eval echo configure:9801: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9801 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9802 if test -z "$ac_err"; then
9803   rm -rf conftest*
9804   eval "ac_cv_header_$ac_safe=yes"
9805 else
9806   echo "$ac_err" >&5
9807   echo "configure: failed program was:" >&5
9808   cat conftest.$ac_ext >&5
9809   rm -rf conftest*
9810   eval "ac_cv_header_$ac_safe=no"
9811 fi
9812 rm -f conftest*
9813 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9814   echo "$ac_t""yes" 1>&6
9815   canna_includes_found=yes
9816 else
9817   echo "$ac_t""no" 1>&6
9818 fi
9819
9820   fi
9821   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9822       -d "/usr/local/canna/include"; then
9823     save_c_switch_site="$c_switch_site"
9824     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9825     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9826 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9827 echo "configure:9828: checking for canna/jrkanji.h" >&5
9828
9829 cat > conftest.$ac_ext <<EOF
9830 #line 9831 "configure"
9831 #include "confdefs.h"
9832 #include <canna/jrkanji.h>
9833 EOF
9834 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9835 { (eval echo configure:9836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9836 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9837 if test -z "$ac_err"; then
9838   rm -rf conftest*
9839   eval "ac_cv_header_$ac_safe=yes"
9840 else
9841   echo "$ac_err" >&5
9842   echo "configure: failed program was:" >&5
9843   cat conftest.$ac_ext >&5
9844   rm -rf conftest*
9845   eval "ac_cv_header_$ac_safe=no"
9846 fi
9847 rm -f conftest*
9848 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9849   echo "$ac_t""yes" 1>&6
9850   canna_includes_found=yes
9851 else
9852   echo "$ac_t""no" 1>&6
9853 fi
9854
9855     if test "$canna_includes_found" != "yes"; then
9856       c_switch_site="$save_c_switch_site"
9857       with_canna="no"
9858     fi
9859   fi
9860
9861   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9862 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9863 echo "configure:9864: checking for canna/RK.h" >&5
9864
9865 cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868 #include <canna/RK.h>
9869 EOF
9870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9871 { (eval echo configure:9872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9873 if test -z "$ac_err"; then
9874   rm -rf conftest*
9875   eval "ac_cv_header_$ac_safe=yes"
9876 else
9877   echo "$ac_err" >&5
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880   rm -rf conftest*
9881   eval "ac_cv_header_$ac_safe=no"
9882 fi
9883 rm -f conftest*
9884 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9885   echo "$ac_t""yes" 1>&6
9886   :
9887 else
9888   echo "$ac_t""no" 1>&6
9889 with_canna=no
9890 fi
9891  }
9892   test -z "$with_canna" && { 
9893 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9894 echo "configure:9895: checking for RkBgnBun in -lRKC" >&5
9895 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9896
9897 xe_check_libs=" -lRKC "
9898 cat > conftest.$ac_ext <<EOF
9899 #line 9900 "configure"
9900 #include "confdefs.h"
9901 /* Override any gcc2 internal prototype to avoid an error.  */
9902 /* We use char because int might match the return type of a gcc2
9903     builtin and then its argument prototype would still apply.  */
9904 char RkBgnBun();
9905
9906 int main() {
9907 RkBgnBun()
9908 ; return 0; }
9909 EOF
9910 if { (eval echo configure:9911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9911   rm -rf conftest*
9912   eval "ac_cv_lib_$ac_lib_var=yes"
9913 else
9914   echo "configure: failed program was:" >&5
9915   cat conftest.$ac_ext >&5
9916   rm -rf conftest*
9917   eval "ac_cv_lib_$ac_lib_var=no"
9918 fi
9919 rm -f conftest*
9920 xe_check_libs=""
9921
9922 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9923   echo "$ac_t""yes" 1>&6
9924   :
9925 else
9926   echo "$ac_t""no" 1>&6
9927 with_canna=no
9928 fi
9929
9930  }
9931   test -z "$with_canna" && { 
9932 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9933 echo "configure:9934: checking for jrKanjiControl in -lcanna" >&5
9934 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9935
9936 xe_check_libs=" -lcanna "
9937 cat > conftest.$ac_ext <<EOF
9938 #line 9939 "configure"
9939 #include "confdefs.h"
9940 /* Override any gcc2 internal prototype to avoid an error.  */
9941 /* We use char because int might match the return type of a gcc2
9942     builtin and then its argument prototype would still apply.  */
9943 char jrKanjiControl();
9944
9945 int main() {
9946 jrKanjiControl()
9947 ; return 0; }
9948 EOF
9949 if { (eval echo configure:9950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9950   rm -rf conftest*
9951   eval "ac_cv_lib_$ac_lib_var=yes"
9952 else
9953   echo "configure: failed program was:" >&5
9954   cat conftest.$ac_ext >&5
9955   rm -rf conftest*
9956   eval "ac_cv_lib_$ac_lib_var=no"
9957 fi
9958 rm -f conftest*
9959 xe_check_libs=""
9960
9961 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9962   echo "$ac_t""yes" 1>&6
9963   :
9964 else
9965   echo "$ac_t""no" 1>&6
9966 with_canna=no
9967 fi
9968
9969  }
9970   test -z "$with_canna" && with_canna=yes
9971   if test "$with_canna" = "yes"; then
9972     { test "$extra_verbose" = "yes" && cat << \EOF
9973     Defining HAVE_CANNA
9974 EOF
9975 cat >> confdefs.h <<\EOF
9976 #define HAVE_CANNA 1
9977 EOF
9978 }
9979
9980     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9981     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9982    echo "    xemacs will be linked with \"mule-canna.o\""
9983  fi
9984   fi
9985
9986 else   for feature in xim canna wnn; do
9987     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9988       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9989     fi
9990     eval "with_${feature}=no"
9991   done
9992 fi 
9993
9994 if test "$need_motif" = "yes" ; then
9995   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9996     
9997 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9998 echo "configure:9999: checking for layout_object_getvalue in -li18n" >&5
9999 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
10000
10001 xe_check_libs=" -li18n "
10002 cat > conftest.$ac_ext <<EOF
10003 #line 10004 "configure"
10004 #include "confdefs.h"
10005 /* Override any gcc2 internal prototype to avoid an error.  */
10006 /* We use char because int might match the return type of a gcc2
10007     builtin and then its argument prototype would still apply.  */
10008 char layout_object_getvalue();
10009
10010 int main() {
10011 layout_object_getvalue()
10012 ; return 0; }
10013 EOF
10014 if { (eval echo configure:10015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10015   rm -rf conftest*
10016   eval "ac_cv_lib_$ac_lib_var=yes"
10017 else
10018   echo "configure: failed program was:" >&5
10019   cat conftest.$ac_ext >&5
10020   rm -rf conftest*
10021   eval "ac_cv_lib_$ac_lib_var=no"
10022 fi
10023 rm -f conftest*
10024 xe_check_libs=""
10025
10026 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10027   echo "$ac_t""yes" 1>&6
10028   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
10029 else
10030   echo "$ac_t""no" 1>&6
10031 fi
10032
10033
10034   
10035 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
10036     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10037   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
10038   
10039         runpath="" runpath_dirs=""
10040   if test -n "$LD_RUN_PATH"; then
10041     runpath="$LD_RUN_PATH"
10042   elif test "$GCC" = "yes"; then
10043         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
10044     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
10045     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
10046     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
10047       case "$arg" in P,* | -L* | -R* )
10048         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
10049           {
10050 xe_runpath_dir="$dir"
10051   test "$xe_runpath_dir" != "/lib"     -a \
10052         "$xe_runpath_dir" != "/usr/lib" -a \
10053         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10054   eval "$xe_add_unique_runpath_dir"
10055 }
10056         done ;;
10057       esac
10058     done
10059     ld_switch_run="$ld_switch_run_save"
10060     rm -f conftest*
10061   else
10062         for arg in $ld_switch_site $ld_switch_x_site; do
10063       case "$arg" in -L*) {
10064 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
10065   test "$xe_runpath_dir" != "/lib"     -a \
10066         "$xe_runpath_dir" != "/usr/lib" -a \
10067         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
10068   eval "$xe_add_unique_runpath_dir"
10069 };; esac
10070     done
10071         if test "$opsys $need_motif" = "sol2 yes"; then
10072       xe_runpath_dir="/opt/SUNWdt/lib";
10073       eval "$xe_add_unique_runpath_dir";
10074     fi
10075   fi 
10076   if test -n "$runpath"; then
10077     ld_switch_run="${dash_r}${runpath}"
10078     
10079 if test "$GCC" = "yes"; then
10080   set x $ld_switch_run; shift; ld_switch_run=""
10081   while test -n "$1"; do
10082     case $1 in
10083       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
10084       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
10085       -Xlinker* ) ;;
10086       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
10087     esac
10088     shift
10089   done
10090 fi
10091     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
10092   fi
10093 fi
10094
10095 fi
10096
10097 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
10098 do
10099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10100 echo "configure:10101: checking for $ac_func" >&5
10101
10102 cat > conftest.$ac_ext <<EOF
10103 #line 10104 "configure"
10104 #include "confdefs.h"
10105 /* System header to define __stub macros and hopefully few prototypes,
10106     which can conflict with char $ac_func(); below.  */
10107 #include <assert.h>
10108 /* Override any gcc2 internal prototype to avoid an error.  */
10109 /* We use char because int might match the return type of a gcc2
10110     builtin and then its argument prototype would still apply.  */
10111 char $ac_func();
10112
10113 int main() {
10114
10115 /* The GNU C library defines this for functions which it implements
10116     to always fail with ENOSYS.  Some functions are actually named
10117     something starting with __ and the normal name is an alias.  */
10118 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10119 choke me
10120 #else
10121 $ac_func();
10122 #endif
10123
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10127   rm -rf conftest*
10128   eval "ac_cv_func_$ac_func=yes"
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   eval "ac_cv_func_$ac_func=no"
10134 fi
10135 rm -f conftest*
10136
10137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10138   echo "$ac_t""yes" 1>&6
10139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10140   { test "$extra_verbose" = "yes" && cat << EOF
10141     Defining $ac_tr_func
10142 EOF
10143 cat >> confdefs.h <<EOF
10144 #define $ac_tr_func 1
10145 EOF
10146 }
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153
10154 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
10155    echo "    xemacs will be linked with \"realpath.o\""
10156  fi
10157
10158 for ac_func in getloadavg
10159 do
10160 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10161 echo "configure:10162: checking for $ac_func" >&5
10162
10163 cat > conftest.$ac_ext <<EOF
10164 #line 10165 "configure"
10165 #include "confdefs.h"
10166 /* System header to define __stub macros and hopefully few prototypes,
10167     which can conflict with char $ac_func(); below.  */
10168 #include <assert.h>
10169 /* Override any gcc2 internal prototype to avoid an error.  */
10170 /* We use char because int might match the return type of a gcc2
10171     builtin and then its argument prototype would still apply.  */
10172 char $ac_func();
10173
10174 int main() {
10175
10176 /* The GNU C library defines this for functions which it implements
10177     to always fail with ENOSYS.  Some functions are actually named
10178     something starting with __ and the normal name is an alias.  */
10179 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10180 choke me
10181 #else
10182 $ac_func();
10183 #endif
10184
10185 ; return 0; }
10186 EOF
10187 if { (eval echo configure:10188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10188   rm -rf conftest*
10189   eval "ac_cv_func_$ac_func=yes"
10190 else
10191   echo "configure: failed program was:" >&5
10192   cat conftest.$ac_ext >&5
10193   rm -rf conftest*
10194   eval "ac_cv_func_$ac_func=no"
10195 fi
10196 rm -f conftest*
10197
10198 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10199   echo "$ac_t""yes" 1>&6
10200     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10201   { test "$extra_verbose" = "yes" && cat << EOF
10202     Defining $ac_tr_func
10203 EOF
10204 cat >> confdefs.h <<EOF
10205 #define $ac_tr_func 1
10206 EOF
10207 }
10208  
10209 else
10210   echo "$ac_t""no" 1>&6
10211 fi
10212 done
10213
10214
10215 if test "$ac_cv_func_getloadavg" != "yes"
10216 then
10217   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10218    echo "    xemacs will be linked with \"getloadavg.o\""
10219  fi
10220
10221     
10222 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10223 echo "configure:10224: checking for kstat_open in -lkstat" >&5
10224 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10225
10226 xe_check_libs=" -lkstat "
10227 cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 /* Override any gcc2 internal prototype to avoid an error.  */
10231 /* We use char because int might match the return type of a gcc2
10232     builtin and then its argument prototype would still apply.  */
10233 char kstat_open();
10234
10235 int main() {
10236 kstat_open()
10237 ; return 0; }
10238 EOF
10239 if { (eval echo configure:10240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10240   rm -rf conftest*
10241   eval "ac_cv_lib_$ac_lib_var=yes"
10242 else
10243   echo "configure: failed program was:" >&5
10244   cat conftest.$ac_ext >&5
10245   rm -rf conftest*
10246   eval "ac_cv_lib_$ac_lib_var=no"
10247 fi
10248 rm -f conftest*
10249 xe_check_libs=""
10250
10251 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10252   echo "$ac_t""yes" 1>&6
10253     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10254     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10255   { test "$extra_verbose" = "yes" && cat << EOF
10256     Defining $ac_tr_lib
10257 EOF
10258 cat >> confdefs.h <<EOF
10259 #define $ac_tr_lib 1
10260 EOF
10261 }
10262
10263   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10264
10265 else
10266   echo "$ac_t""no" 1>&6
10267 fi
10268
10269
10270
10271     
10272 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10273 echo "configure:10274: checking for kvm_read in -lkvm" >&5
10274 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10275
10276 xe_check_libs=" -lkvm "
10277 cat > conftest.$ac_ext <<EOF
10278 #line 10279 "configure"
10279 #include "confdefs.h"
10280 /* Override any gcc2 internal prototype to avoid an error.  */
10281 /* We use char because int might match the return type of a gcc2
10282     builtin and then its argument prototype would still apply.  */
10283 char kvm_read();
10284
10285 int main() {
10286 kvm_read()
10287 ; return 0; }
10288 EOF
10289 if { (eval echo configure:10290: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10290   rm -rf conftest*
10291   eval "ac_cv_lib_$ac_lib_var=yes"
10292 else
10293   echo "configure: failed program was:" >&5
10294   cat conftest.$ac_ext >&5
10295   rm -rf conftest*
10296   eval "ac_cv_lib_$ac_lib_var=no"
10297 fi
10298 rm -f conftest*
10299 xe_check_libs=""
10300
10301 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10302   echo "$ac_t""yes" 1>&6
10303     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10304     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10305   { test "$extra_verbose" = "yes" && cat << EOF
10306     Defining $ac_tr_lib
10307 EOF
10308 cat >> confdefs.h <<EOF
10309 #define $ac_tr_lib 1
10310 EOF
10311 }
10312
10313   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10314
10315 else
10316   echo "$ac_t""no" 1>&6
10317 fi
10318
10319
10320 fi
10321
10322 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10323 echo "configure:10324: checking whether netdb declares h_errno" >&5
10324 cat > conftest.$ac_ext <<EOF
10325 #line 10326 "configure"
10326 #include "confdefs.h"
10327 #include <netdb.h>
10328 int main() {
10329 return h_errno;
10330 ; return 0; }
10331 EOF
10332 if { (eval echo configure:10333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10333   rm -rf conftest*
10334   echo "$ac_t""yes" 1>&6
10335    { test "$extra_verbose" = "yes" && cat << \EOF
10336     Defining HAVE_H_ERRNO
10337 EOF
10338 cat >> confdefs.h <<\EOF
10339 #define HAVE_H_ERRNO 1
10340 EOF
10341 }
10342
10343 else
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   echo "$ac_t""no" 1>&6
10348 fi
10349 rm -f conftest*
10350
10351 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10352 echo "configure:10353: checking for sigsetjmp" >&5
10353 cat > conftest.$ac_ext <<EOF
10354 #line 10355 "configure"
10355 #include "confdefs.h"
10356 #include <setjmp.h>
10357 int main() {
10358 sigjmp_buf bar; sigsetjmp (bar, 0);
10359 ; return 0; }
10360 EOF
10361 if { (eval echo configure:10362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10362   rm -rf conftest*
10363   echo "$ac_t""yes" 1>&6
10364    { test "$extra_verbose" = "yes" && cat << \EOF
10365     Defining HAVE_SIGSETJMP
10366 EOF
10367 cat >> confdefs.h <<\EOF
10368 #define HAVE_SIGSETJMP 1
10369 EOF
10370 }
10371
10372 else
10373   echo "configure: failed program was:" >&5
10374   cat conftest.$ac_ext >&5
10375   rm -rf conftest*
10376   echo "$ac_t""no" 1>&6
10377 fi
10378 rm -f conftest*
10379
10380 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10381 echo "configure:10382: checking whether localtime caches TZ" >&5
10382
10383 if test "$ac_cv_func_tzset" = "yes"; then
10384 cat > conftest.$ac_ext <<EOF
10385 #line 10386 "configure"
10386 #include "confdefs.h"
10387 #include <time.h>
10388 #if STDC_HEADERS
10389 # include <stdlib.h>
10390 #endif
10391 extern char **environ;
10392 unset_TZ ()
10393 {
10394   char **from, **to;
10395   for (to = from = environ; (*to = *from); from++)
10396     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10397       to++;
10398 }
10399 char TZ_GMT0[] = "TZ=GMT0";
10400 char TZ_PST8[] = "TZ=PST8";
10401 main()
10402 {
10403   time_t now = time ((time_t *) 0);
10404   int hour_GMT0, hour_unset;
10405   if (putenv (TZ_GMT0) != 0)
10406     exit (1);
10407   hour_GMT0 = localtime (&now)->tm_hour;
10408   unset_TZ ();
10409   hour_unset = localtime (&now)->tm_hour;
10410   if (putenv (TZ_PST8) != 0)
10411     exit (1);
10412   if (localtime (&now)->tm_hour == hour_GMT0)
10413     exit (1);
10414   unset_TZ ();
10415   if (localtime (&now)->tm_hour != hour_unset)
10416     exit (1);
10417   exit (0);
10418 }
10419 EOF
10420 if { (eval echo configure:10421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10421 then
10422   emacs_cv_localtime_cache=no
10423 else
10424   conftest_rc="$?"
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -fr conftest*
10428   emacs_cv_localtime_cache=yes
10429 fi
10430 rm -fr conftest*
10431 else
10432         # If we lack tzset, report that localtime does not cache TZ,
10433         # since we can't invalidate the cache if we don't have tzset.
10434         emacs_cv_localtime_cache=no
10435 fi
10436 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10437 if test $emacs_cv_localtime_cache = yes; then
10438   { test "$extra_verbose" = "yes" && cat << \EOF
10439     Defining LOCALTIME_CACHE
10440 EOF
10441 cat >> confdefs.h <<\EOF
10442 #define LOCALTIME_CACHE 1
10443 EOF
10444 }
10445
10446 fi
10447
10448 if test "$HAVE_TIMEVAL" = "yes"; then
10449 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10450 echo "configure:10451: checking whether gettimeofday accepts one or two arguments" >&5
10451 cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454
10455 #ifdef TIME_WITH_SYS_TIME
10456 #include <sys/time.h>
10457 #include <time.h>
10458 #else
10459 #ifdef HAVE_SYS_TIME_H
10460 #include <sys/time.h>
10461 #else
10462 #include <time.h>
10463 #endif
10464 #endif
10465   
10466 int main() {
10467
10468   struct timeval time;
10469   gettimeofday (&time, 0);
10470
10471 ; return 0; }
10472 EOF
10473 if { (eval echo configure:10474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10474   rm -rf conftest*
10475   echo "$ac_t""two" 1>&6
10476 else
10477   echo "configure: failed program was:" >&5
10478   cat conftest.$ac_ext >&5
10479   rm -rf conftest*
10480   echo "$ac_t""one" 1>&6
10481    { test "$extra_verbose" = "yes" && cat << \EOF
10482     Defining GETTIMEOFDAY_ONE_ARGUMENT
10483 EOF
10484 cat >> confdefs.h <<\EOF
10485 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10486 EOF
10487 }
10488
10489 fi
10490 rm -f conftest*
10491 fi
10492
10493
10494 echo $ac_n "checking for inline""... $ac_c" 1>&6
10495 echo "configure:10496: checking for inline" >&5
10496
10497 ac_cv_c_inline=no
10498 for ac_kw in inline __inline__ __inline; do
10499   cat > conftest.$ac_ext <<EOF
10500 #line 10501 "configure"
10501 #include "confdefs.h"
10502
10503 int main() {
10504 } int $ac_kw foo() {
10505 ; return 0; }
10506 EOF
10507 if { (eval echo configure:10508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10508   rm -rf conftest*
10509   ac_cv_c_inline=$ac_kw; break
10510 else
10511   echo "configure: failed program was:" >&5
10512   cat conftest.$ac_ext >&5
10513 fi
10514 rm -f conftest*
10515 done
10516
10517
10518 echo "$ac_t""$ac_cv_c_inline" 1>&6
10519 case "$ac_cv_c_inline" in
10520   inline | yes) ;;
10521   no) { test "$extra_verbose" = "yes" && cat << \EOF
10522     Defining inline = 
10523 EOF
10524 cat >> confdefs.h <<\EOF
10525 #define inline 
10526 EOF
10527 }
10528  ;;
10529   *)  { test "$extra_verbose" = "yes" && cat << EOF
10530     Defining inline = $ac_cv_c_inline
10531 EOF
10532 cat >> confdefs.h <<EOF
10533 #define inline $ac_cv_c_inline
10534 EOF
10535 }
10536  ;;
10537 esac
10538
10539 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10540    echo "    xemacs will be linked with \"inline.o\""
10541  fi
10542
10543
10544 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10545 # for constant arguments.  Useless!
10546 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10547 echo "configure:10548: checking for working alloca.h" >&5
10548
10549 cat > conftest.$ac_ext <<EOF
10550 #line 10551 "configure"
10551 #include "confdefs.h"
10552 #include <alloca.h>
10553 int main() {
10554 void *p = alloca(2 * sizeof(int));
10555 ; return 0; }
10556 EOF
10557 if { (eval echo configure:10558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10558   rm -rf conftest*
10559   ac_cv_header_alloca_h=yes
10560 else
10561   echo "configure: failed program was:" >&5
10562   cat conftest.$ac_ext >&5
10563   rm -rf conftest*
10564   ac_cv_header_alloca_h=no
10565 fi
10566 rm -f conftest*
10567
10568 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10569 if test $ac_cv_header_alloca_h = yes; then
10570   { test "$extra_verbose" = "yes" && cat << \EOF
10571     Defining HAVE_ALLOCA_H
10572 EOF
10573 cat >> confdefs.h <<\EOF
10574 #define HAVE_ALLOCA_H 1
10575 EOF
10576 }
10577
10578 fi
10579
10580 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10581 echo "configure:10582: checking for alloca" >&5
10582
10583 cat > conftest.$ac_ext <<EOF
10584 #line 10585 "configure"
10585 #include "confdefs.h"
10586
10587 #ifdef __GNUC__
10588 # define alloca __builtin_alloca
10589 #else
10590 # ifdef _MSC_VER
10591 #  include <malloc.h>
10592 #  define alloca _alloca
10593 # else
10594 #  if HAVE_ALLOCA_H
10595 #   include <alloca.h>
10596 #  else
10597 #   ifdef _AIX
10598  #pragma alloca
10599 #   else
10600 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10601 char *alloca ();
10602 #    endif
10603 #   endif
10604 #  endif
10605 # endif
10606 #endif
10607
10608 int main() {
10609 char *p = (char *) alloca(1);
10610 ; return 0; }
10611 EOF
10612 if { (eval echo configure:10613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10613   rm -rf conftest*
10614   ac_cv_func_alloca_works=yes
10615 else
10616   echo "configure: failed program was:" >&5
10617   cat conftest.$ac_ext >&5
10618   rm -rf conftest*
10619   ac_cv_func_alloca_works=no
10620 fi
10621 rm -f conftest*
10622
10623 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10624 if test $ac_cv_func_alloca_works = yes; then
10625   { test "$extra_verbose" = "yes" && cat << \EOF
10626     Defining HAVE_ALLOCA
10627 EOF
10628 cat >> confdefs.h <<\EOF
10629 #define HAVE_ALLOCA 1
10630 EOF
10631 }
10632
10633 fi
10634
10635 if test $ac_cv_func_alloca_works = no; then
10636   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10637   # that cause trouble.  Some versions do not even contain alloca or
10638   # contain a buggy version.  If you still want to use their alloca,
10639   # use ar to extract alloca.o from them instead of compiling alloca.c.
10640   ALLOCA=alloca.${ac_objext}
10641   { test "$extra_verbose" = "yes" && cat << \EOF
10642     Defining C_ALLOCA
10643 EOF
10644 cat >> confdefs.h <<\EOF
10645 #define C_ALLOCA 1
10646 EOF
10647 }
10648
10649
10650 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10651 echo "configure:10652: checking whether alloca needs Cray hooks" >&5
10652
10653 cat > conftest.$ac_ext <<EOF
10654 #line 10655 "configure"
10655 #include "confdefs.h"
10656 #if defined(CRAY) && ! defined(CRAY2)
10657 webecray
10658 #else
10659 wenotbecray
10660 #endif
10661
10662 EOF
10663 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10664   egrep "webecray" >/dev/null 2>&1; then
10665   rm -rf conftest*
10666   ac_cv_os_cray=yes
10667 else
10668   rm -rf conftest*
10669   ac_cv_os_cray=no
10670 fi
10671 rm -f conftest*
10672
10673
10674 echo "$ac_t""$ac_cv_os_cray" 1>&6
10675 if test $ac_cv_os_cray = yes; then
10676 for ac_func in _getb67 GETB67 getb67; do
10677   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10678 echo "configure:10679: checking for $ac_func" >&5
10679
10680 cat > conftest.$ac_ext <<EOF
10681 #line 10682 "configure"
10682 #include "confdefs.h"
10683 /* System header to define __stub macros and hopefully few prototypes,
10684     which can conflict with char $ac_func(); below.  */
10685 #include <assert.h>
10686 /* Override any gcc2 internal prototype to avoid an error.  */
10687 /* We use char because int might match the return type of a gcc2
10688     builtin and then its argument prototype would still apply.  */
10689 char $ac_func();
10690
10691 int main() {
10692
10693 /* The GNU C library defines this for functions which it implements
10694     to always fail with ENOSYS.  Some functions are actually named
10695     something starting with __ and the normal name is an alias.  */
10696 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10697 choke me
10698 #else
10699 $ac_func();
10700 #endif
10701
10702 ; return 0; }
10703 EOF
10704 if { (eval echo configure:10705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10705   rm -rf conftest*
10706   eval "ac_cv_func_$ac_func=yes"
10707 else
10708   echo "configure: failed program was:" >&5
10709   cat conftest.$ac_ext >&5
10710   rm -rf conftest*
10711   eval "ac_cv_func_$ac_func=no"
10712 fi
10713 rm -f conftest*
10714
10715 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10716   echo "$ac_t""yes" 1>&6
10717   { test "$extra_verbose" = "yes" && cat << EOF
10718     Defining CRAY_STACKSEG_END = $ac_func
10719 EOF
10720 cat >> confdefs.h <<EOF
10721 #define CRAY_STACKSEG_END $ac_func
10722 EOF
10723 }
10724
10725   break
10726 else
10727   echo "$ac_t""no" 1>&6
10728 fi
10729
10730 done
10731 fi
10732
10733 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10734 echo "configure:10735: checking stack direction for C alloca" >&5
10735
10736 cat > conftest.$ac_ext <<EOF
10737 #line 10738 "configure"
10738 #include "confdefs.h"
10739 find_stack_direction ()
10740 {
10741   static char *addr = 0;
10742   auto char dummy;
10743   if (addr == 0)
10744     {
10745       addr = &dummy;
10746       return find_stack_direction ();
10747     }
10748   else
10749     return (&dummy > addr) ? 1 : -1;
10750 }
10751 main ()
10752 {
10753   exit (find_stack_direction() < 0);
10754 }
10755 EOF
10756 if { (eval echo configure:10757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10757 then
10758   ac_cv_c_stack_direction=1
10759 else
10760   conftest_rc="$?"
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -fr conftest*
10764   ac_cv_c_stack_direction=-1
10765 fi
10766 rm -fr conftest*
10767
10768 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10769 { test "$extra_verbose" = "yes" && cat << EOF
10770     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10771 EOF
10772 cat >> confdefs.h <<EOF
10773 #define STACK_DIRECTION $ac_cv_c_stack_direction
10774 EOF
10775 }
10776
10777 fi
10778
10779 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10780    echo "    xemacs will be linked with \"$ALLOCA\""
10781  fi
10782
10783 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10784 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10785 echo "configure:10786: checking for vfork.h" >&5
10786
10787 cat > conftest.$ac_ext <<EOF
10788 #line 10789 "configure"
10789 #include "confdefs.h"
10790 #include <vfork.h>
10791 EOF
10792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10793 { (eval echo configure:10794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10795 if test -z "$ac_err"; then
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=yes"
10798 else
10799   echo "$ac_err" >&5
10800   echo "configure: failed program was:" >&5
10801   cat conftest.$ac_ext >&5
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=no"
10804 fi
10805 rm -f conftest*
10806 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10807   echo "$ac_t""yes" 1>&6
10808   { test "$extra_verbose" = "yes" && cat << \EOF
10809     Defining HAVE_VFORK_H
10810 EOF
10811 cat >> confdefs.h <<\EOF
10812 #define HAVE_VFORK_H 1
10813 EOF
10814 }
10815
10816 else
10817   echo "$ac_t""no" 1>&6
10818 fi
10819
10820 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10821 echo "configure:10822: checking for working vfork" >&5
10822
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 /* Thanks to Paul Eggert for this test.  */
10827 #include <stdio.h>
10828 #include <sys/types.h>
10829 #include <sys/stat.h>
10830 #ifdef HAVE_UNISTD_H
10831 #include <unistd.h>
10832 #endif
10833 #ifdef HAVE_VFORK_H
10834 #include <vfork.h>
10835 #endif
10836 /* On some sparc systems, changes by the child to local and incoming
10837    argument registers are propagated back to the parent.
10838    The compiler is told about this with #include <vfork.h>,
10839    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10840    Test for this by using a static variable whose address
10841    is put into a register that is clobbered by the vfork.  */
10842 static
10843 #ifdef __cplusplus
10844 sparc_address_test (int arg)
10845 #else
10846 sparc_address_test (arg) int arg;
10847 #endif
10848 {
10849   static pid_t child;
10850   if (!child) {
10851     child = vfork ();
10852     if (child < 0) {
10853       perror ("vfork");
10854       _exit(2);
10855     }
10856     if (!child) {
10857       arg = getpid();
10858       write(-1, "", 0);
10859       _exit (arg);
10860     }
10861   }
10862 }
10863 main() {
10864   pid_t parent = getpid ();
10865   pid_t child;
10866
10867   sparc_address_test ();
10868
10869   child = vfork ();
10870
10871   if (child == 0) {
10872     /* Here is another test for sparc vfork register problems.
10873        This test uses lots of local variables, at least
10874        as many local variables as main has allocated so far
10875        including compiler temporaries.  4 locals are enough for
10876        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10877        A buggy compiler should reuse the register of parent
10878        for one of the local variables, since it will think that
10879        parent can't possibly be used any more in this routine.
10880        Assigning to the local variable will thus munge parent
10881        in the parent process.  */
10882     pid_t
10883       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10884       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10885     /* Convince the compiler that p..p7 are live; otherwise, it might
10886        use the same hardware register for all 8 local variables.  */
10887     if (p != p1 || p != p2 || p != p3 || p != p4
10888         || p != p5 || p != p6 || p != p7)
10889       _exit(1);
10890
10891     /* On some systems (e.g. IRIX 3.3),
10892        vfork doesn't separate parent from child file descriptors.
10893        If the child closes a descriptor before it execs or exits,
10894        this munges the parent's descriptor as well.
10895        Test for this by closing stdout in the child.  */
10896     _exit(close(fileno(stdout)) != 0);
10897   } else {
10898     int status;
10899     struct stat st;
10900
10901     while (wait(&status) != child)
10902       ;
10903     exit(
10904          /* Was there some problem with vforking?  */
10905          child < 0
10906
10907          /* Did the child fail?  (This shouldn't happen.)  */
10908          || status
10909
10910          /* Did the vfork/compiler bug occur?  */
10911          || parent != getpid()
10912
10913          /* Did the file descriptor bug occur?  */
10914          || fstat(fileno(stdout), &st) != 0
10915          );
10916   }
10917 }
10918 EOF
10919 if { (eval echo configure:10920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10920 then
10921   ac_cv_func_vfork_works=yes
10922 else
10923   conftest_rc="$?"
10924   echo "configure: failed program was:" >&5
10925   cat conftest.$ac_ext >&5
10926   rm -fr conftest*
10927   ac_cv_func_vfork_works=no
10928 fi
10929 rm -fr conftest*
10930
10931 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10932 if test $ac_cv_func_vfork_works = no; then
10933   { test "$extra_verbose" = "yes" && cat << \EOF
10934     Defining vfork = fork
10935 EOF
10936 cat >> confdefs.h <<\EOF
10937 #define vfork fork
10938 EOF
10939 }
10940
10941 fi
10942
10943
10944 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10945 echo "configure:10946: checking for working strcoll" >&5
10946
10947 cat > conftest.$ac_ext <<EOF
10948 #line 10949 "configure"
10949 #include "confdefs.h"
10950 #include <string.h>
10951 main ()
10952 {
10953   exit (strcoll ("abc", "def") >= 0 ||
10954         strcoll ("ABC", "DEF") >= 0 ||
10955         strcoll ("123", "456") >= 0);
10956 }
10957 EOF
10958 if { (eval echo configure:10959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10959 then
10960   ac_cv_func_strcoll_works=yes
10961 else
10962   conftest_rc="$?"
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -fr conftest*
10966   ac_cv_func_strcoll_works=no
10967 fi
10968 rm -fr conftest*
10969
10970 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10971 if test $ac_cv_func_strcoll_works = yes; then
10972   { test "$extra_verbose" = "yes" && cat << \EOF
10973     Defining HAVE_STRCOLL
10974 EOF
10975 cat >> confdefs.h <<\EOF
10976 #define HAVE_STRCOLL 1
10977 EOF
10978 }
10979
10980 fi
10981
10982
10983 for ac_func in getpgrp
10984 do
10985 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10986 echo "configure:10987: checking for $ac_func" >&5
10987
10988 cat > conftest.$ac_ext <<EOF
10989 #line 10990 "configure"
10990 #include "confdefs.h"
10991 /* System header to define __stub macros and hopefully few prototypes,
10992     which can conflict with char $ac_func(); below.  */
10993 #include <assert.h>
10994 /* Override any gcc2 internal prototype to avoid an error.  */
10995 /* We use char because int might match the return type of a gcc2
10996     builtin and then its argument prototype would still apply.  */
10997 char $ac_func();
10998
10999 int main() {
11000
11001 /* The GNU C library defines this for functions which it implements
11002     to always fail with ENOSYS.  Some functions are actually named
11003     something starting with __ and the normal name is an alias.  */
11004 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11005 choke me
11006 #else
11007 $ac_func();
11008 #endif
11009
11010 ; return 0; }
11011 EOF
11012 if { (eval echo configure:11013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11013   rm -rf conftest*
11014   eval "ac_cv_func_$ac_func=yes"
11015 else
11016   echo "configure: failed program was:" >&5
11017   cat conftest.$ac_ext >&5
11018   rm -rf conftest*
11019   eval "ac_cv_func_$ac_func=no"
11020 fi
11021 rm -f conftest*
11022
11023 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11024   echo "$ac_t""yes" 1>&6
11025     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11026   { test "$extra_verbose" = "yes" && cat << EOF
11027     Defining $ac_tr_func
11028 EOF
11029 cat >> confdefs.h <<EOF
11030 #define $ac_tr_func 1
11031 EOF
11032 }
11033  
11034 else
11035   echo "$ac_t""no" 1>&6
11036 fi
11037 done
11038
11039 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
11040 echo "configure:11041: checking whether getpgrp takes no argument" >&5
11041
11042 cat > conftest.$ac_ext <<EOF
11043 #line 11044 "configure"
11044 #include "confdefs.h"
11045
11046 /*
11047  * If this system has a BSD-style getpgrp(),
11048  * which takes a pid argument, exit unsuccessfully.
11049  *
11050  * Snarfed from Chet Ramey's bash pgrp.c test program
11051  */
11052 #include <stdio.h>
11053 #include <sys/types.h>
11054
11055 int     pid;
11056 int     pg1, pg2, pg3, pg4;
11057 int     ng, np, s, child;
11058
11059 main()
11060 {
11061         pid = getpid();
11062         pg1 = getpgrp(0);
11063         pg2 = getpgrp();
11064         pg3 = getpgrp(pid);
11065         pg4 = getpgrp(1);
11066
11067         /*
11068          * If all of these values are the same, it's pretty sure that
11069          * we're on a system that ignores getpgrp's first argument.
11070          */
11071         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
11072                 exit(0);
11073
11074         child = fork();
11075         if (child < 0)
11076                 exit(1);
11077         else if (child == 0) {
11078                 np = getpid();
11079                 /*
11080                  * If this is Sys V, this will not work; pgrp will be
11081                  * set to np because setpgrp just changes a pgrp to be
11082                  * the same as the pid.
11083                  */
11084                 setpgrp(np, pg1);
11085                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
11086                 if (ng == pg1) {
11087                         exit(1);
11088                 } else {
11089                         exit(0);
11090                 }
11091         } else {
11092                 wait(&s);
11093                 exit(s>>8);
11094         }
11095 }
11096
11097 EOF
11098 if { (eval echo configure:11099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11099 then
11100   ac_cv_func_getpgrp_void=yes
11101 else
11102   conftest_rc="$?"
11103   echo "configure: failed program was:" >&5
11104   cat conftest.$ac_ext >&5
11105   rm -fr conftest*
11106   ac_cv_func_getpgrp_void=no
11107 fi
11108 rm -fr conftest*
11109
11110
11111 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
11112 if test $ac_cv_func_getpgrp_void = yes; then
11113   { test "$extra_verbose" = "yes" && cat << \EOF
11114     Defining GETPGRP_VOID
11115 EOF
11116 cat >> confdefs.h <<\EOF
11117 #define GETPGRP_VOID 1
11118 EOF
11119 }
11120
11121 fi
11122
11123
11124 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
11125 echo "configure:11126: checking for working mmap" >&5
11126 case "$opsys" in ultrix* ) have_mmap=no ;; *)
11127 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 #include <stdio.h>
11131 #include <unistd.h>
11132 #include <fcntl.h>
11133 #include <sys/mman.h>
11134
11135 #ifndef MAP_VARIABLE
11136 #define MAP_VARIABLE 0
11137 #endif
11138
11139 #ifndef MAP_FAILED
11140 #define MAP_FAILED -1
11141 #endif
11142
11143 int main (int argc, char *argv[])
11144 {
11145   int fd = -1;
11146   caddr_t p;
11147 #ifndef MAP_ANONYMOUS
11148   fd = open ("/dev/zero", O_RDWR);
11149   if (fd < 0)
11150     return 1;
11151 #define MAP_ANONYMOUS 0
11152 #endif
11153   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
11154            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
11155            fd, 0) != (void *) MAP_FAILED)
11156     return 0;
11157   perror ("conftest: mmap failed");
11158   return 1;
11159 }
11160 EOF
11161 if { (eval echo configure:11162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11162 then
11163   have_mmap=yes
11164 else
11165   conftest_rc="$?"
11166   echo "configure: failed program was:" >&5
11167   cat conftest.$ac_ext >&5
11168   rm -fr conftest*
11169   have_mmap=no
11170 fi
11171 rm -fr conftest* ;;
11172 esac
11173 echo "$ac_t""$have_mmap" 1>&6
11174 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11175     Defining HAVE_MMAP
11176 EOF
11177 cat >> confdefs.h <<\EOF
11178 #define HAVE_MMAP 1
11179 EOF
11180 }
11181
11182
11183 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
11184 if test "$rel_alloc $have_mmap" = "default yes"; then
11185   if test "$doug_lea_malloc" = "yes"; then
11186         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
11187 echo "configure:11188: checking for M_MMAP_THRESHOLD" >&5
11188     cat > conftest.$ac_ext <<EOF
11189 #line 11190 "configure"
11190 #include "confdefs.h"
11191 #include <malloc.h>
11192 int main() {
11193
11194 #ifndef M_MMAP_THRESHOLD
11195 #error No M_MMAP_THRESHOLD :-(
11196 !@+$%^&*_)(_ - unlikely to compile...
11197 #endif
11198
11199 ; return 0; }
11200 EOF
11201 if { (eval echo configure:11202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11202   rm -rf conftest*
11203   rel_alloc=no; echo "$ac_t""yes" 1>&6;
11204 else
11205   echo "configure: failed program was:" >&5
11206   cat conftest.$ac_ext >&5
11207   rm -rf conftest*
11208   rel_alloc=yes; echo "$ac_t""no" 1>&6;
11209 fi
11210 rm -f conftest*
11211   else
11212     rel_alloc=yes
11213   fi
11214 fi
11215 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11216     Defining REL_ALLOC
11217 EOF
11218 cat >> confdefs.h <<\EOF
11219 #define REL_ALLOC 1
11220 EOF
11221 }
11222
11223
11224 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11225 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11226 echo "configure:11227: checking for termios.h" >&5
11227
11228 cat > conftest.$ac_ext <<EOF
11229 #line 11230 "configure"
11230 #include "confdefs.h"
11231 #include <termios.h>
11232 EOF
11233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11234 { (eval echo configure:11235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11236 if test -z "$ac_err"; then
11237   rm -rf conftest*
11238   eval "ac_cv_header_$ac_safe=yes"
11239 else
11240   echo "$ac_err" >&5
11241   echo "configure: failed program was:" >&5
11242   cat conftest.$ac_ext >&5
11243   rm -rf conftest*
11244   eval "ac_cv_header_$ac_safe=no"
11245 fi
11246 rm -f conftest*
11247 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11248   echo "$ac_t""yes" 1>&6
11249   { test "$extra_verbose" = "yes" && cat << \EOF
11250     Defining HAVE_TERMIOS
11251 EOF
11252 cat >> confdefs.h <<\EOF
11253 #define HAVE_TERMIOS 1
11254 EOF
11255 }
11256
11257   { test "$extra_verbose" = "yes" && cat << \EOF
11258     Defining SIGNALS_VIA_CHARACTERS
11259 EOF
11260 cat >> confdefs.h <<\EOF
11261 #define SIGNALS_VIA_CHARACTERS 1
11262 EOF
11263 }
11264
11265   { test "$extra_verbose" = "yes" && cat << \EOF
11266     Defining NO_TERMIO
11267 EOF
11268 cat >> confdefs.h <<\EOF
11269 #define NO_TERMIO 1
11270 EOF
11271 }
11272
11273 else
11274   echo "$ac_t""no" 1>&6
11275 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11276 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11277 echo "configure:11278: checking for termio.h" >&5
11278
11279 cat > conftest.$ac_ext <<EOF
11280 #line 11281 "configure"
11281 #include "confdefs.h"
11282 #include <termio.h>
11283 EOF
11284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11285 { (eval echo configure:11286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11287 if test -z "$ac_err"; then
11288   rm -rf conftest*
11289   eval "ac_cv_header_$ac_safe=yes"
11290 else
11291   echo "$ac_err" >&5
11292   echo "configure: failed program was:" >&5
11293   cat conftest.$ac_ext >&5
11294   rm -rf conftest*
11295   eval "ac_cv_header_$ac_safe=no"
11296 fi
11297 rm -f conftest*
11298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11299   echo "$ac_t""yes" 1>&6
11300   { test "$extra_verbose" = "yes" && cat << \EOF
11301     Defining HAVE_TERMIO
11302 EOF
11303 cat >> confdefs.h <<\EOF
11304 #define HAVE_TERMIO 1
11305 EOF
11306 }
11307
11308 else
11309   echo "$ac_t""no" 1>&6
11310 fi
11311
11312 fi
11313
11314
11315
11316 echo $ac_n "checking for socket""... $ac_c" 1>&6
11317 echo "configure:11318: checking for socket" >&5
11318
11319 cat > conftest.$ac_ext <<EOF
11320 #line 11321 "configure"
11321 #include "confdefs.h"
11322 /* System header to define __stub macros and hopefully few prototypes,
11323     which can conflict with char socket(); below.  */
11324 #include <assert.h>
11325 /* Override any gcc2 internal prototype to avoid an error.  */
11326 /* We use char because int might match the return type of a gcc2
11327     builtin and then its argument prototype would still apply.  */
11328 char socket();
11329
11330 int main() {
11331
11332 /* The GNU C library defines this for functions which it implements
11333     to always fail with ENOSYS.  Some functions are actually named
11334     something starting with __ and the normal name is an alias.  */
11335 #if defined (__stub_socket) || defined (__stub___socket)
11336 choke me
11337 #else
11338 socket();
11339 #endif
11340
11341 ; return 0; }
11342 EOF
11343 if { (eval echo configure:11344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11344   rm -rf conftest*
11345   eval "ac_cv_func_socket=yes"
11346 else
11347   echo "configure: failed program was:" >&5
11348   cat conftest.$ac_ext >&5
11349   rm -rf conftest*
11350   eval "ac_cv_func_socket=no"
11351 fi
11352 rm -f conftest*
11353
11354 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11355   echo "$ac_t""yes" 1>&6
11356   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11357 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11358 echo "configure:11359: checking for netinet/in.h" >&5
11359
11360 cat > conftest.$ac_ext <<EOF
11361 #line 11362 "configure"
11362 #include "confdefs.h"
11363 #include <netinet/in.h>
11364 EOF
11365 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11366 { (eval echo configure:11367: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11367 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11368 if test -z "$ac_err"; then
11369   rm -rf conftest*
11370   eval "ac_cv_header_$ac_safe=yes"
11371 else
11372   echo "$ac_err" >&5
11373   echo "configure: failed program was:" >&5
11374   cat conftest.$ac_ext >&5
11375   rm -rf conftest*
11376   eval "ac_cv_header_$ac_safe=no"
11377 fi
11378 rm -f conftest*
11379 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11380   echo "$ac_t""yes" 1>&6
11381   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11382 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11383 echo "configure:11384: checking for arpa/inet.h" >&5
11384
11385 cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388 #include <arpa/inet.h>
11389 EOF
11390 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11391 { (eval echo configure:11392: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11392 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11393 if test -z "$ac_err"; then
11394   rm -rf conftest*
11395   eval "ac_cv_header_$ac_safe=yes"
11396 else
11397   echo "$ac_err" >&5
11398   echo "configure: failed program was:" >&5
11399   cat conftest.$ac_ext >&5
11400   rm -rf conftest*
11401   eval "ac_cv_header_$ac_safe=no"
11402 fi
11403 rm -f conftest*
11404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11405   echo "$ac_t""yes" 1>&6
11406   
11407   { test "$extra_verbose" = "yes" && cat << \EOF
11408     Defining HAVE_SOCKETS
11409 EOF
11410 cat >> confdefs.h <<\EOF
11411 #define HAVE_SOCKETS 1
11412 EOF
11413 }
11414
11415       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11416 echo "configure:11417: checking "for sun_len member in struct sockaddr_un"" >&5
11417       cat > conftest.$ac_ext <<EOF
11418 #line 11419 "configure"
11419 #include "confdefs.h"
11420
11421 #include <sys/types.h>
11422 #include <sys/socket.h>
11423 #include <sys/un.h>
11424       
11425 int main() {
11426 static struct sockaddr_un x; x.sun_len = 1;
11427 ; return 0; }
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11430   rm -rf conftest*
11431   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11432     Defining HAVE_SOCKADDR_SUN_LEN
11433 EOF
11434 cat >> confdefs.h <<\EOF
11435 #define HAVE_SOCKADDR_SUN_LEN 1
11436 EOF
11437 }
11438
11439 else
11440   echo "configure: failed program was:" >&5
11441   cat conftest.$ac_ext >&5
11442   rm -rf conftest*
11443   echo "$ac_t""no" 1>&6
11444 fi
11445 rm -f conftest*
11446       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11447 echo "configure:11448: checking "for ip_mreq struct in netinet/in.h"" >&5
11448       cat > conftest.$ac_ext <<EOF
11449 #line 11450 "configure"
11450 #include "confdefs.h"
11451
11452 #include <sys/types.h>
11453 #include <netinet/in.h>
11454       
11455 int main() {
11456 static struct ip_mreq x;
11457 ; return 0; }
11458 EOF
11459 if { (eval echo configure:11460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11460   rm -rf conftest*
11461   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11462     Defining HAVE_MULTICAST
11463 EOF
11464 cat >> confdefs.h <<\EOF
11465 #define HAVE_MULTICAST 1
11466 EOF
11467 }
11468
11469 else
11470   echo "configure: failed program was:" >&5
11471   cat conftest.$ac_ext >&5
11472   rm -rf conftest*
11473   echo "$ac_t""no" 1>&6
11474 fi
11475 rm -f conftest*
11476 else
11477   echo "$ac_t""no" 1>&6
11478 fi
11479
11480 else
11481   echo "$ac_t""no" 1>&6
11482 fi
11483
11484 else
11485   echo "$ac_t""no" 1>&6
11486 fi
11487
11488
11489 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11490 echo "configure:11491: checking for msgget" >&5
11491
11492 cat > conftest.$ac_ext <<EOF
11493 #line 11494 "configure"
11494 #include "confdefs.h"
11495 /* System header to define __stub macros and hopefully few prototypes,
11496     which can conflict with char msgget(); below.  */
11497 #include <assert.h>
11498 /* Override any gcc2 internal prototype to avoid an error.  */
11499 /* We use char because int might match the return type of a gcc2
11500     builtin and then its argument prototype would still apply.  */
11501 char msgget();
11502
11503 int main() {
11504
11505 /* The GNU C library defines this for functions which it implements
11506     to always fail with ENOSYS.  Some functions are actually named
11507     something starting with __ and the normal name is an alias.  */
11508 #if defined (__stub_msgget) || defined (__stub___msgget)
11509 choke me
11510 #else
11511 msgget();
11512 #endif
11513
11514 ; return 0; }
11515 EOF
11516 if { (eval echo configure:11517: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11517   rm -rf conftest*
11518   eval "ac_cv_func_msgget=yes"
11519 else
11520   echo "configure: failed program was:" >&5
11521   cat conftest.$ac_ext >&5
11522   rm -rf conftest*
11523   eval "ac_cv_func_msgget=no"
11524 fi
11525 rm -f conftest*
11526
11527 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11528   echo "$ac_t""yes" 1>&6
11529   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11530 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11531 echo "configure:11532: checking for sys/ipc.h" >&5
11532
11533 cat > conftest.$ac_ext <<EOF
11534 #line 11535 "configure"
11535 #include "confdefs.h"
11536 #include <sys/ipc.h>
11537 EOF
11538 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11539 { (eval echo configure:11540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11540 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11541 if test -z "$ac_err"; then
11542   rm -rf conftest*
11543   eval "ac_cv_header_$ac_safe=yes"
11544 else
11545   echo "$ac_err" >&5
11546   echo "configure: failed program was:" >&5
11547   cat conftest.$ac_ext >&5
11548   rm -rf conftest*
11549   eval "ac_cv_header_$ac_safe=no"
11550 fi
11551 rm -f conftest*
11552 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11553   echo "$ac_t""yes" 1>&6
11554   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11555 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11556 echo "configure:11557: checking for sys/msg.h" >&5
11557
11558 cat > conftest.$ac_ext <<EOF
11559 #line 11560 "configure"
11560 #include "confdefs.h"
11561 #include <sys/msg.h>
11562 EOF
11563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11564 { (eval echo configure:11565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11566 if test -z "$ac_err"; then
11567   rm -rf conftest*
11568   eval "ac_cv_header_$ac_safe=yes"
11569 else
11570   echo "$ac_err" >&5
11571   echo "configure: failed program was:" >&5
11572   cat conftest.$ac_ext >&5
11573   rm -rf conftest*
11574   eval "ac_cv_header_$ac_safe=no"
11575 fi
11576 rm -f conftest*
11577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11578   echo "$ac_t""yes" 1>&6
11579   { test "$extra_verbose" = "yes" && cat << \EOF
11580     Defining HAVE_SYSVIPC
11581 EOF
11582 cat >> confdefs.h <<\EOF
11583 #define HAVE_SYSVIPC 1
11584 EOF
11585 }
11586
11587 else
11588   echo "$ac_t""no" 1>&6
11589 fi
11590
11591 else
11592   echo "$ac_t""no" 1>&6
11593 fi
11594
11595 else
11596   echo "$ac_t""no" 1>&6
11597 fi
11598
11599
11600 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11601 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11602 echo "configure:11603: checking for dirent.h" >&5
11603
11604 cat > conftest.$ac_ext <<EOF
11605 #line 11606 "configure"
11606 #include "confdefs.h"
11607 #include <dirent.h>
11608 EOF
11609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11610 { (eval echo configure:11611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11612 if test -z "$ac_err"; then
11613   rm -rf conftest*
11614   eval "ac_cv_header_$ac_safe=yes"
11615 else
11616   echo "$ac_err" >&5
11617   echo "configure: failed program was:" >&5
11618   cat conftest.$ac_ext >&5
11619   rm -rf conftest*
11620   eval "ac_cv_header_$ac_safe=no"
11621 fi
11622 rm -f conftest*
11623 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11624   echo "$ac_t""yes" 1>&6
11625   { test "$extra_verbose" = "yes" && cat << \EOF
11626     Defining SYSV_SYSTEM_DIR
11627 EOF
11628 cat >> confdefs.h <<\EOF
11629 #define SYSV_SYSTEM_DIR 1
11630 EOF
11631 }
11632
11633 else
11634   echo "$ac_t""no" 1>&6
11635 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11636 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11637 echo "configure:11638: checking for sys/dir.h" >&5
11638
11639 cat > conftest.$ac_ext <<EOF
11640 #line 11641 "configure"
11641 #include "confdefs.h"
11642 #include <sys/dir.h>
11643 EOF
11644 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11645 { (eval echo configure:11646: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11646 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11647 if test -z "$ac_err"; then
11648   rm -rf conftest*
11649   eval "ac_cv_header_$ac_safe=yes"
11650 else
11651   echo "$ac_err" >&5
11652   echo "configure: failed program was:" >&5
11653   cat conftest.$ac_ext >&5
11654   rm -rf conftest*
11655   eval "ac_cv_header_$ac_safe=no"
11656 fi
11657 rm -f conftest*
11658 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11659   echo "$ac_t""yes" 1>&6
11660   :
11661 else
11662   echo "$ac_t""no" 1>&6
11663 { test "$extra_verbose" = "yes" && cat << \EOF
11664     Defining NONSYSTEM_DIR_LIBRARY
11665 EOF
11666 cat >> confdefs.h <<\EOF
11667 #define NONSYSTEM_DIR_LIBRARY 1
11668 EOF
11669 }
11670
11671 fi
11672
11673 fi
11674
11675
11676 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11677 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11678 echo "configure:11679: checking for nlist.h" >&5
11679
11680 cat > conftest.$ac_ext <<EOF
11681 #line 11682 "configure"
11682 #include "confdefs.h"
11683 #include <nlist.h>
11684 EOF
11685 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11686 { (eval echo configure:11687: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11687 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11688 if test -z "$ac_err"; then
11689   rm -rf conftest*
11690   eval "ac_cv_header_$ac_safe=yes"
11691 else
11692   echo "$ac_err" >&5
11693   echo "configure: failed program was:" >&5
11694   cat conftest.$ac_ext >&5
11695   rm -rf conftest*
11696   eval "ac_cv_header_$ac_safe=no"
11697 fi
11698 rm -f conftest*
11699 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11700   echo "$ac_t""yes" 1>&6
11701   { test "$extra_verbose" = "yes" && cat << \EOF
11702     Defining NLIST_STRUCT
11703 EOF
11704 cat >> confdefs.h <<\EOF
11705 #define NLIST_STRUCT 1
11706 EOF
11707 }
11708
11709 else
11710   echo "$ac_t""no" 1>&6
11711 fi
11712
11713
11714
11715 echo "checking "for sound support"" 1>&6
11716 echo "configure:11717: checking "for sound support"" >&5
11717 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11718
11719 if test "$with_native_sound" != "no"; then
11720     if test -n "$native_sound_lib"; then
11721     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11722 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11723 echo "configure:11724: checking for multimedia/audio_device.h" >&5
11724
11725 cat > conftest.$ac_ext <<EOF
11726 #line 11727 "configure"
11727 #include "confdefs.h"
11728 #include <multimedia/audio_device.h>
11729 EOF
11730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11731 { (eval echo configure:11732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11733 if test -z "$ac_err"; then
11734   rm -rf conftest*
11735   eval "ac_cv_header_$ac_safe=yes"
11736 else
11737   echo "$ac_err" >&5
11738   echo "configure: failed program was:" >&5
11739   cat conftest.$ac_ext >&5
11740   rm -rf conftest*
11741   eval "ac_cv_header_$ac_safe=no"
11742 fi
11743 rm -f conftest*
11744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11745   echo "$ac_t""yes" 1>&6
11746   sound_found=yes sound_cflags=""
11747       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11748    echo "    xemacs will be linked with \"sunplay.o\""
11749  fi
11750 else
11751   echo "$ac_t""no" 1>&6
11752 fi
11753
11754   fi
11755
11756     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11757     sound_found=yes
11758     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11759    echo "    xemacs will be linked with \"sunplay.o\""
11760  fi
11761     if test -d "/usr/demo/SOUND/include"
11762       then sound_cflags="-I/usr/demo/SOUND/include"
11763       else sound_cflags="-I/usr/demo/SOUND"
11764     fi
11765     if test -z "$native_sound_lib" ; then
11766       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11767         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11768         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11769       fi
11770     fi
11771   fi
11772
11773     if test -z "$sound_found"; then
11774     case "$canonical" in
11775     *-sgi-* )
11776       if test -z "$native_sound_lib"; then
11777         
11778 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11779 echo "configure:11780: checking for ALopenport in -laudio" >&5
11780 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11781
11782 xe_check_libs=" -laudio "
11783 cat > conftest.$ac_ext <<EOF
11784 #line 11785 "configure"
11785 #include "confdefs.h"
11786 /* Override any gcc2 internal prototype to avoid an error.  */
11787 /* We use char because int might match the return type of a gcc2
11788     builtin and then its argument prototype would still apply.  */
11789 char ALopenport();
11790
11791 int main() {
11792 ALopenport()
11793 ; return 0; }
11794 EOF
11795 if { (eval echo configure:11796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11796   rm -rf conftest*
11797   eval "ac_cv_lib_$ac_lib_var=yes"
11798 else
11799   echo "configure: failed program was:" >&5
11800   cat conftest.$ac_ext >&5
11801   rm -rf conftest*
11802   eval "ac_cv_lib_$ac_lib_var=no"
11803 fi
11804 rm -f conftest*
11805 xe_check_libs=""
11806
11807 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11808   echo "$ac_t""yes" 1>&6
11809   native_sound_lib="-laudio"
11810 else
11811   echo "$ac_t""no" 1>&6
11812 fi
11813
11814
11815       fi
11816       if test -n "$native_sound_lib"; then
11817         sound_found=yes sound_cflags=""
11818         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11819    echo "    xemacs will be linked with \"sgiplay.o\""
11820  fi
11821       fi ;;
11822     hppa*-hp-hpux* )
11823       if test -z "$native_sound_lib"; then
11824         
11825 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11826 echo "configure:11827: checking for AOpenAudio in -lAlib" >&5
11827 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11828
11829 xe_check_libs=" -lAlib "
11830 cat > conftest.$ac_ext <<EOF
11831 #line 11832 "configure"
11832 #include "confdefs.h"
11833 /* Override any gcc2 internal prototype to avoid an error.  */
11834 /* We use char because int might match the return type of a gcc2
11835     builtin and then its argument prototype would still apply.  */
11836 char AOpenAudio();
11837
11838 int main() {
11839 AOpenAudio()
11840 ; return 0; }
11841 EOF
11842 if { (eval echo configure:11843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11843   rm -rf conftest*
11844   eval "ac_cv_lib_$ac_lib_var=yes"
11845 else
11846   echo "configure: failed program was:" >&5
11847   cat conftest.$ac_ext >&5
11848   rm -rf conftest*
11849   eval "ac_cv_lib_$ac_lib_var=no"
11850 fi
11851 rm -f conftest*
11852 xe_check_libs=""
11853
11854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11855   echo "$ac_t""yes" 1>&6
11856   native_sound_lib="-lAlib"
11857 else
11858   echo "$ac_t""no" 1>&6
11859 fi
11860
11861
11862       fi
11863       if test -n "$native_sound_lib"; then
11864         sound_found=yes
11865         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11866    echo "    xemacs will be linked with \"hpplay.o\""
11867  fi
11868         if test "$GCC" = "yes" # Kludge city
11869           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11870           else sound_cflags="+e -I/usr/audio/examples"
11871         fi
11872       fi ;;
11873     esac
11874   fi
11875
11876     if test -z "$sound_found"; then
11877     for dir in "machine" "sys" "linux"; do
11878       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11879 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11880 echo "configure:11881: checking for ${dir}/soundcard.h" >&5
11881
11882 cat > conftest.$ac_ext <<EOF
11883 #line 11884 "configure"
11884 #include "confdefs.h"
11885 #include <${dir}/soundcard.h>
11886 EOF
11887 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11888 { (eval echo configure:11889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11889 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11890 if test -z "$ac_err"; then
11891   rm -rf conftest*
11892   eval "ac_cv_header_$ac_safe=yes"
11893 else
11894   echo "$ac_err" >&5
11895   echo "configure: failed program was:" >&5
11896   cat conftest.$ac_ext >&5
11897   rm -rf conftest*
11898   eval "ac_cv_header_$ac_safe=no"
11899 fi
11900 rm -f conftest*
11901 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11902   echo "$ac_t""yes" 1>&6
11903   sound_found=yes
11904        need_miscplay=yes
11905         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11906    echo "    xemacs will be linked with \"linuxplay.o\""
11907  fi
11908         { test "$extra_verbose" = "yes" && cat << EOF
11909     Defining SOUNDCARD_H_FILE = "${dir}/soundcard.h"
11910 EOF
11911 cat >> confdefs.h <<EOF
11912 #define SOUNDCARD_H_FILE "${dir}/soundcard.h"
11913 EOF
11914 }
11915
11916         break
11917 else
11918   echo "$ac_t""no" 1>&6
11919 fi
11920
11921     done
11922   fi
11923
11924   test "$sound_found" = "yes" && with_native_sound=yes
11925 fi
11926
11927 if test "$with_native_sound" = "yes"; then
11928   { test "$extra_verbose" = "yes" && cat << \EOF
11929     Defining HAVE_NATIVE_SOUND
11930 EOF
11931 cat >> confdefs.h <<\EOF
11932 #define HAVE_NATIVE_SOUND 1
11933 EOF
11934 }
11935
11936   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11937 fi
11938
11939 if test "$with_nas_sound" != "no"; then
11940   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11941 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11942 echo "configure:11943: checking for audio/audiolib.h" >&5
11943
11944 cat > conftest.$ac_ext <<EOF
11945 #line 11946 "configure"
11946 #include "confdefs.h"
11947 #include <audio/audiolib.h>
11948 EOF
11949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11950 { (eval echo configure:11951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11952 if test -z "$ac_err"; then
11953   rm -rf conftest*
11954   eval "ac_cv_header_$ac_safe=yes"
11955 else
11956   echo "$ac_err" >&5
11957   echo "configure: failed program was:" >&5
11958   cat conftest.$ac_ext >&5
11959   rm -rf conftest*
11960   eval "ac_cv_header_$ac_safe=no"
11961 fi
11962 rm -f conftest*
11963 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11964   echo "$ac_t""yes" 1>&6
11965   
11966     
11967 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11968 echo "configure:11969: checking for AuOpenServer in -laudio" >&5
11969 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11970
11971 xe_check_libs=" -laudio "
11972 cat > conftest.$ac_ext <<EOF
11973 #line 11974 "configure"
11974 #include "confdefs.h"
11975 /* Override any gcc2 internal prototype to avoid an error.  */
11976 /* We use char because int might match the return type of a gcc2
11977     builtin and then its argument prototype would still apply.  */
11978 char AuOpenServer();
11979
11980 int main() {
11981 AuOpenServer()
11982 ; return 0; }
11983 EOF
11984 if { (eval echo configure:11985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11985   rm -rf conftest*
11986   eval "ac_cv_lib_$ac_lib_var=yes"
11987 else
11988   echo "configure: failed program was:" >&5
11989   cat conftest.$ac_ext >&5
11990   rm -rf conftest*
11991   eval "ac_cv_lib_$ac_lib_var=no"
11992 fi
11993 rm -f conftest*
11994 xe_check_libs=""
11995
11996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11997   echo "$ac_t""yes" 1>&6
11998   have_nas_sound=yes
11999 else
12000   echo "$ac_t""no" 1>&6
12001 fi
12002
12003
12004 else
12005   echo "$ac_t""no" 1>&6
12006 fi
12007
12008   if test "$have_nas_sound" = "yes"; then
12009     with_nas_sound=yes
12010     { test "$extra_verbose" = "yes" && cat << \EOF
12011     Defining HAVE_NAS_SOUND
12012 EOF
12013 cat >> confdefs.h <<\EOF
12014 #define HAVE_NAS_SOUND 1
12015 EOF
12016 }
12017
12018     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
12019    echo "    xemacs will be linked with \"nas.o\""
12020  fi
12021     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
12022             cat > conftest.$ac_ext <<EOF
12023 #line 12024 "configure"
12024 #include "confdefs.h"
12025 #include <audio/Xtutil.h>
12026 EOF
12027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12028   egrep "AuXtErrorJump" >/dev/null 2>&1; then
12029   :
12030 else
12031   rm -rf conftest*
12032   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
12033     Defining NAS_NO_ERROR_JUMP
12034 EOF
12035 cat >> confdefs.h <<\EOF
12036 #define NAS_NO_ERROR_JUMP 1
12037 EOF
12038 }
12039
12040 fi
12041 rm -f conftest*
12042
12043   else
12044     test "$with_nas_sound" = "yes" && \
12045       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
12046     with_nas_sound=no
12047   fi
12048 fi
12049
12050 if test "$with_esd_sound" != "no"; then
12051   # Extract the first word of "esd-config", so it can be a program name with args.
12052 set dummy esd-config; ac_word=$2
12053 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
12054 echo "configure:12055: checking for $ac_word" >&5
12055
12056 if test -n "$have_esd_config"; then
12057   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
12058 else
12059   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
12060   ac_dummy="$PATH"
12061   for ac_dir in $ac_dummy; do
12062     test -z "$ac_dir" && ac_dir=.
12063     if test -f $ac_dir/$ac_word; then
12064       ac_cv_prog_have_esd_config="yes"
12065       break
12066     fi
12067   done
12068   IFS="$ac_save_ifs"
12069   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
12070 fi
12071 have_esd_config="$ac_cv_prog_have_esd_config"
12072 if test -n "$have_esd_config"; then
12073   echo "$ac_t""$have_esd_config" 1>&6
12074 else
12075   echo "$ac_t""no" 1>&6
12076 fi
12077
12078   if test "$have_esd_config" = "yes"; then
12079     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
12080     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
12081     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
12082     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
12083 echo "configure:12084: checking for esd_play_stream" >&5
12084
12085 cat > conftest.$ac_ext <<EOF
12086 #line 12087 "configure"
12087 #include "confdefs.h"
12088 /* System header to define __stub macros and hopefully few prototypes,
12089     which can conflict with char esd_play_stream(); below.  */
12090 #include <assert.h>
12091 /* Override any gcc2 internal prototype to avoid an error.  */
12092 /* We use char because int might match the return type of a gcc2
12093     builtin and then its argument prototype would still apply.  */
12094 char esd_play_stream();
12095
12096 int main() {
12097
12098 /* The GNU C library defines this for functions which it implements
12099     to always fail with ENOSYS.  Some functions are actually named
12100     something starting with __ and the normal name is an alias.  */
12101 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
12102 choke me
12103 #else
12104 esd_play_stream();
12105 #endif
12106
12107 ; return 0; }
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12110   rm -rf conftest*
12111   eval "ac_cv_func_esd_play_stream=yes"
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -rf conftest*
12116   eval "ac_cv_func_esd_play_stream=no"
12117 fi
12118 rm -f conftest*
12119
12120 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
12121   echo "$ac_t""yes" 1>&6
12122   have_esd_sound=yes
12123 else
12124   echo "$ac_t""no" 1>&6
12125 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
12126 fi
12127
12128   fi
12129
12130   if test "$have_esd_sound" = "yes"; then
12131     with_esd_sound=yes
12132     need_miscplay=yes
12133     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
12134    echo "    xemacs will be linked with \"esd.o\""
12135  fi
12136     { test "$extra_verbose" = "yes" && cat << \EOF
12137     Defining HAVE_ESD_SOUND
12138 EOF
12139 cat >> confdefs.h <<\EOF
12140 #define HAVE_ESD_SOUND 1
12141 EOF
12142 }
12143
12144   else
12145     test "$with_esd_sound" = "yes" && \
12146       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
12147     with_esd_sound=no
12148   fi
12149 fi
12150
12151 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
12152    echo "    xemacs will be linked with \"miscplay.o\""
12153  fi
12154
12155
12156 test -z "$with_tty" && with_tty=yes
12157
12158 if test "$with_tty" = "yes"  ; then
12159   echo "checking for TTY-related features" 1>&6
12160 echo "configure:12161: checking for TTY-related features" >&5
12161   { test "$extra_verbose" = "yes" && cat << \EOF
12162     Defining HAVE_TTY
12163 EOF
12164 cat >> confdefs.h <<\EOF
12165 #define HAVE_TTY 1
12166 EOF
12167 }
12168
12169   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
12170    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\""
12171  fi
12172
12173     if test -z "$with_ncurses"; then
12174     
12175 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
12176 echo "configure:12177: checking for tgetent in -lncurses" >&5
12177 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
12178
12179 xe_check_libs=" -lncurses "
12180 cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* Override any gcc2 internal prototype to avoid an error.  */
12184 /* We use char because int might match the return type of a gcc2
12185     builtin and then its argument prototype would still apply.  */
12186 char tgetent();
12187
12188 int main() {
12189 tgetent()
12190 ; return 0; }
12191 EOF
12192 if { (eval echo configure:12193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12193   rm -rf conftest*
12194   eval "ac_cv_lib_$ac_lib_var=yes"
12195 else
12196   echo "configure: failed program was:" >&5
12197   cat conftest.$ac_ext >&5
12198   rm -rf conftest*
12199   eval "ac_cv_lib_$ac_lib_var=no"
12200 fi
12201 rm -f conftest*
12202 xe_check_libs=""
12203
12204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12205   echo "$ac_t""yes" 1>&6
12206   with_ncurses=yes
12207 else
12208   echo "$ac_t""no" 1>&6
12209 with_ncurses=no
12210 fi
12211
12212
12213   fi
12214   if test "$with_ncurses" = "yes"; then
12215     { test "$extra_verbose" = "yes" && cat << \EOF
12216     Defining HAVE_NCURSES
12217 EOF
12218 cat >> confdefs.h <<\EOF
12219 #define HAVE_NCURSES 1
12220 EOF
12221 }
12222
12223     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12224 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12225 echo "configure:12226: checking for ncurses/curses.h" >&5
12226
12227 cat > conftest.$ac_ext <<EOF
12228 #line 12229 "configure"
12229 #include "confdefs.h"
12230 #include <ncurses/curses.h>
12231 EOF
12232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12233 { (eval echo configure:12234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12235 if test -z "$ac_err"; then
12236   rm -rf conftest*
12237   eval "ac_cv_header_$ac_safe=yes"
12238 else
12239   echo "$ac_err" >&5
12240   echo "configure: failed program was:" >&5
12241   cat conftest.$ac_ext >&5
12242   rm -rf conftest*
12243   eval "ac_cv_header_$ac_safe=no"
12244 fi
12245 rm -f conftest*
12246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12247   echo "$ac_t""yes" 1>&6
12248   curses_h_file=ncurses/curses.h
12249 else
12250   echo "$ac_t""no" 1>&6
12251 fi
12252
12253     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12254 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12255 echo "configure:12256: checking for ncurses/term.h" >&5
12256
12257 cat > conftest.$ac_ext <<EOF
12258 #line 12259 "configure"
12259 #include "confdefs.h"
12260 #include <ncurses/term.h>
12261 EOF
12262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12263 { (eval echo configure:12264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12265 if test -z "$ac_err"; then
12266   rm -rf conftest*
12267   eval "ac_cv_header_$ac_safe=yes"
12268 else
12269   echo "$ac_err" >&5
12270   echo "configure: failed program was:" >&5
12271   cat conftest.$ac_ext >&5
12272   rm -rf conftest*
12273   eval "ac_cv_header_$ac_safe=no"
12274 fi
12275 rm -f conftest*
12276 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12277   echo "$ac_t""yes" 1>&6
12278   term_h_file=ncurses/term.h
12279 else
12280   echo "$ac_t""no" 1>&6
12281 fi
12282
12283     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12284    echo "    xemacs will be linked with \"terminfo.o\""
12285  fi
12286     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12287
12288     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12289                         save_c_switch_site="$c_switch_site"
12290       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12291       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12292 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12293 echo "configure:12294: checking for ncurses/curses.h" >&5
12294
12295 cat > conftest.$ac_ext <<EOF
12296 #line 12297 "configure"
12297 #include "confdefs.h"
12298 #include <ncurses/curses.h>
12299 EOF
12300 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12301 { (eval echo configure:12302: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12302 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12303 if test -z "$ac_err"; then
12304   rm -rf conftest*
12305   eval "ac_cv_header_$ac_safe=yes"
12306 else
12307   echo "$ac_err" >&5
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -rf conftest*
12311   eval "ac_cv_header_$ac_safe=no"
12312 fi
12313 rm -f conftest*
12314 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12315   echo "$ac_t""yes" 1>&6
12316   curses_h_file=ncurses/curses.h
12317 else
12318   echo "$ac_t""no" 1>&6
12319 fi
12320
12321       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12322         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12323         else c_switch_site="$save_c_switch_site"
12324       fi
12325     fi
12326   else         if test "$have_terminfo" = "yes"; then
12327       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12328    echo "    xemacs will be linked with \"terminfo.o\""
12329  fi
12330       if test -n "$libs_termcap"; then
12331         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12332       else
12333         for lib in curses termlib termcap; do
12334           
12335 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12336 echo "configure:12337: checking for tgetent in -l$lib" >&5
12337 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12338
12339 xe_check_libs=" -l$lib "
12340 cat > conftest.$ac_ext <<EOF
12341 #line 12342 "configure"
12342 #include "confdefs.h"
12343 /* Override any gcc2 internal prototype to avoid an error.  */
12344 /* We use char because int might match the return type of a gcc2
12345     builtin and then its argument prototype would still apply.  */
12346 char tgetent();
12347
12348 int main() {
12349 tgetent()
12350 ; return 0; }
12351 EOF
12352 if { (eval echo configure:12353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12353   rm -rf conftest*
12354   eval "ac_cv_lib_$ac_lib_var=yes"
12355 else
12356   echo "configure: failed program was:" >&5
12357   cat conftest.$ac_ext >&5
12358   rm -rf conftest*
12359   eval "ac_cv_lib_$ac_lib_var=no"
12360 fi
12361 rm -f conftest*
12362 xe_check_libs=""
12363
12364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12365   echo "$ac_t""yes" 1>&6
12366   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12367 else
12368   echo "$ac_t""no" 1>&6
12369 fi
12370
12371
12372         done
12373       fi
12374     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12375    echo "    xemacs will be linked with \"tparam.o\""
12376  fi
12377                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12378       if test -n "$libs_termcap"; then
12379         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12380       else
12381         
12382 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12383 echo "configure:12384: checking for tgetent in -lcurses" >&5
12384 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12385
12386 xe_check_libs=" -lcurses "
12387 cat > conftest.$ac_ext <<EOF
12388 #line 12389 "configure"
12389 #include "confdefs.h"
12390 /* Override any gcc2 internal prototype to avoid an error.  */
12391 /* We use char because int might match the return type of a gcc2
12392     builtin and then its argument prototype would still apply.  */
12393 char tgetent();
12394
12395 int main() {
12396 tgetent()
12397 ; return 0; }
12398 EOF
12399 if { (eval echo configure:12400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12400   rm -rf conftest*
12401   eval "ac_cv_lib_$ac_lib_var=yes"
12402 else
12403   echo "configure: failed program was:" >&5
12404   cat conftest.$ac_ext >&5
12405   rm -rf conftest*
12406   eval "ac_cv_lib_$ac_lib_var=no"
12407 fi
12408 rm -f conftest*
12409 xe_check_libs=""
12410
12411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12412   echo "$ac_t""yes" 1>&6
12413   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12414 else
12415   echo "$ac_t""no" 1>&6
12416 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12417 echo "configure:12418: checking for tgetent in -ltermcap" >&5
12418 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12419
12420 xe_check_libs=" -ltermcap "
12421 cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 /* Override any gcc2 internal prototype to avoid an error.  */
12425 /* We use char because int might match the return type of a gcc2
12426     builtin and then its argument prototype would still apply.  */
12427 char tgetent();
12428
12429 int main() {
12430 tgetent()
12431 ; return 0; }
12432 EOF
12433 if { (eval echo configure:12434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12434   rm -rf conftest*
12435   eval "ac_cv_lib_$ac_lib_var=yes"
12436 else
12437   echo "configure: failed program was:" >&5
12438   cat conftest.$ac_ext >&5
12439   rm -rf conftest*
12440   eval "ac_cv_lib_$ac_lib_var=no"
12441 fi
12442 rm -f conftest*
12443 xe_check_libs=""
12444
12445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12446   echo "$ac_t""yes" 1>&6
12447   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12448 else
12449   echo "$ac_t""no" 1>&6
12450 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12451    echo "    xemacs will be linked with \"termcap.o\""
12452  fi
12453 fi
12454
12455
12456 fi
12457
12458
12459       fi
12460     fi
12461   fi
12462   { test "$extra_verbose" = "yes" && cat << EOF
12463     Defining CURSES_H_FILE = "${curses_h_file-curses.h}"
12464 EOF
12465 cat >> confdefs.h <<EOF
12466 #define CURSES_H_FILE "${curses_h_file-curses.h}"
12467 EOF
12468 }
12469
12470   { test "$extra_verbose" = "yes" && cat << EOF
12471     Defining TERM_H_FILE = "${term_h_file-term.h}"
12472 EOF
12473 cat >> confdefs.h <<EOF
12474 #define TERM_H_FILE "${term_h_file-term.h}"
12475 EOF
12476 }
12477
12478
12479     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12480 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12481 echo "configure:12482: checking for gpm.h" >&5
12482
12483 cat > conftest.$ac_ext <<EOF
12484 #line 12485 "configure"
12485 #include "confdefs.h"
12486 #include <gpm.h>
12487 EOF
12488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12489 { (eval echo configure:12490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12491 if test -z "$ac_err"; then
12492   rm -rf conftest*
12493   eval "ac_cv_header_$ac_safe=yes"
12494 else
12495   echo "$ac_err" >&5
12496   echo "configure: failed program was:" >&5
12497   cat conftest.$ac_ext >&5
12498   rm -rf conftest*
12499   eval "ac_cv_header_$ac_safe=no"
12500 fi
12501 rm -f conftest*
12502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12503   echo "$ac_t""yes" 1>&6
12504   :
12505 else
12506   echo "$ac_t""no" 1>&6
12507 with_gpm=no
12508 fi
12509  }
12510   test -z "$with_gpm" && { 
12511 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12512 echo "configure:12513: checking for Gpm_Open in -lgpm" >&5
12513 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12514
12515 xe_check_libs=" -lgpm "
12516 cat > conftest.$ac_ext <<EOF
12517 #line 12518 "configure"
12518 #include "confdefs.h"
12519 /* Override any gcc2 internal prototype to avoid an error.  */
12520 /* We use char because int might match the return type of a gcc2
12521     builtin and then its argument prototype would still apply.  */
12522 char Gpm_Open();
12523
12524 int main() {
12525 Gpm_Open()
12526 ; return 0; }
12527 EOF
12528 if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12529   rm -rf conftest*
12530   eval "ac_cv_lib_$ac_lib_var=yes"
12531 else
12532   echo "configure: failed program was:" >&5
12533   cat conftest.$ac_ext >&5
12534   rm -rf conftest*
12535   eval "ac_cv_lib_$ac_lib_var=no"
12536 fi
12537 rm -f conftest*
12538 xe_check_libs=""
12539
12540 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12541   echo "$ac_t""yes" 1>&6
12542   with_gpm=yes
12543 else
12544   echo "$ac_t""no" 1>&6
12545 with_gpm=no
12546 fi
12547
12548  }
12549   if test "$with_gpm" = "yes"; then
12550     { test "$extra_verbose" = "yes" && cat << \EOF
12551     Defining HAVE_GPM
12552 EOF
12553 cat >> confdefs.h <<\EOF
12554 #define HAVE_GPM 1
12555 EOF
12556 }
12557
12558     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12559    echo "    xemacs will be linked with \"gpmevent.o\""
12560  fi
12561     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12562   fi
12563
12564 else   for feature in ncurses gpm; do
12565     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12566       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12567     fi
12568     eval "with_${feature}=no"
12569   done
12570 fi 
12571 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12572    echo "    xemacs will be linked with \"event-unixoid.o\""
12573  fi
12574
12575
12576 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12577   != "no no no" && echo "checking for database support" 1>&6
12578 echo "configure:12579: checking for database support" >&5
12579
12580 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12581   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12582 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12583 echo "configure:12584: checking for ndbm.h" >&5
12584
12585 cat > conftest.$ac_ext <<EOF
12586 #line 12587 "configure"
12587 #include "confdefs.h"
12588 #include <ndbm.h>
12589 EOF
12590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12591 { (eval echo configure:12592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12593 if test -z "$ac_err"; then
12594   rm -rf conftest*
12595   eval "ac_cv_header_$ac_safe=yes"
12596 else
12597   echo "$ac_err" >&5
12598   echo "configure: failed program was:" >&5
12599   cat conftest.$ac_ext >&5
12600   rm -rf conftest*
12601   eval "ac_cv_header_$ac_safe=no"
12602 fi
12603 rm -f conftest*
12604 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12605   echo "$ac_t""yes" 1>&6
12606   :
12607 else
12608   echo "$ac_t""no" 1>&6
12609
12610     test "$with_database_gdbm" = "yes" -o \
12611          "$with_database_dbm"  = "yes" && \
12612       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12613     with_database_gdbm=no with_database_dbm=no
12614 fi
12615
12616 fi
12617
12618 if test "$with_database_gdbm" != "no"; then
12619   
12620 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12621 echo "configure:12622: checking for dbm_open in -lgdbm" >&5
12622 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12623
12624 xe_check_libs=" -lgdbm "
12625 cat > conftest.$ac_ext <<EOF
12626 #line 12627 "configure"
12627 #include "confdefs.h"
12628 /* Override any gcc2 internal prototype to avoid an error.  */
12629 /* We use char because int might match the return type of a gcc2
12630     builtin and then its argument prototype would still apply.  */
12631 char dbm_open();
12632
12633 int main() {
12634 dbm_open()
12635 ; return 0; }
12636 EOF
12637 if { (eval echo configure:12638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12638   rm -rf conftest*
12639   eval "ac_cv_lib_$ac_lib_var=yes"
12640 else
12641   echo "configure: failed program was:" >&5
12642   cat conftest.$ac_ext >&5
12643   rm -rf conftest*
12644   eval "ac_cv_lib_$ac_lib_var=no"
12645 fi
12646 rm -f conftest*
12647 xe_check_libs=""
12648
12649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12650   echo "$ac_t""yes" 1>&6
12651   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12652 else
12653   echo "$ac_t""no" 1>&6
12654 if test "$with_database_gdbm" = "yes"; then
12655      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12656    fi
12657    with_database_gdbm=no
12658 fi
12659
12660
12661 fi
12662
12663 if test "$with_database_dbm" != "no"; then
12664   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12665 echo "configure:12666: checking for dbm_open" >&5
12666
12667 cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* System header to define __stub macros and hopefully few prototypes,
12671     which can conflict with char dbm_open(); below.  */
12672 #include <assert.h>
12673 /* Override any gcc2 internal prototype to avoid an error.  */
12674 /* We use char because int might match the return type of a gcc2
12675     builtin and then its argument prototype would still apply.  */
12676 char dbm_open();
12677
12678 int main() {
12679
12680 /* The GNU C library defines this for functions which it implements
12681     to always fail with ENOSYS.  Some functions are actually named
12682     something starting with __ and the normal name is an alias.  */
12683 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12684 choke me
12685 #else
12686 dbm_open();
12687 #endif
12688
12689 ; return 0; }
12690 EOF
12691 if { (eval echo configure:12692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12692   rm -rf conftest*
12693   eval "ac_cv_func_dbm_open=yes"
12694 else
12695   echo "configure: failed program was:" >&5
12696   cat conftest.$ac_ext >&5
12697   rm -rf conftest*
12698   eval "ac_cv_func_dbm_open=no"
12699 fi
12700 rm -f conftest*
12701
12702 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12703   echo "$ac_t""yes" 1>&6
12704   with_database_dbm=yes libdbm=
12705 else
12706   echo "$ac_t""no" 1>&6
12707
12708     
12709 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12710 echo "configure:12711: checking for dbm_open in -ldbm" >&5
12711 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12712
12713 xe_check_libs=" -ldbm "
12714 cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 /* Override any gcc2 internal prototype to avoid an error.  */
12718 /* We use char because int might match the return type of a gcc2
12719     builtin and then its argument prototype would still apply.  */
12720 char dbm_open();
12721
12722 int main() {
12723 dbm_open()
12724 ; return 0; }
12725 EOF
12726 if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12727   rm -rf conftest*
12728   eval "ac_cv_lib_$ac_lib_var=yes"
12729 else
12730   echo "configure: failed program was:" >&5
12731   cat conftest.$ac_ext >&5
12732   rm -rf conftest*
12733   eval "ac_cv_lib_$ac_lib_var=no"
12734 fi
12735 rm -f conftest*
12736 xe_check_libs=""
12737
12738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12739   echo "$ac_t""yes" 1>&6
12740   with_database_dbm=yes libdbm=-ldbm
12741 else
12742   echo "$ac_t""no" 1>&6
12743 test "$with_database_dbm" = "yes" && \
12744         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12745       with_database_dbm=no
12746 fi
12747
12748
12749 fi
12750
12751 fi
12752
12753 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12754 test "$with_database_gdbm" = "yes" -o \
12755      "$with_database_dbm"  = "yes" && \
12756   { test "$extra_verbose" = "yes" && cat << \EOF
12757     Defining HAVE_DBM
12758 EOF
12759 cat >> confdefs.h <<\EOF
12760 #define HAVE_DBM 1
12761 EOF
12762 }
12763
12764
12765 if test "$with_database_berkdb" != "no"; then
12766   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12767 echo "configure:12768: checking for Berkeley db.h" >&5
12768   for header in "db/db.h" "db.h"; do
12769     cat > conftest.$ac_ext <<EOF
12770 #line 12771 "configure"
12771 #include "confdefs.h"
12772
12773 #include <stdlib.h>
12774 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12775 #ifdef HAVE_INTTYPES_H
12776 #define __BIT_TYPES_DEFINED__
12777 #include <inttypes.h>
12778 typedef uint8_t  u_int8_t;
12779 typedef uint16_t u_int16_t;
12780 typedef uint32_t u_int32_t;
12781 #ifdef WE_DONT_NEED_QUADS
12782 typedef uint64_t u_int64_t;
12783 #endif
12784 #endif
12785 #endif
12786 #include <$header>
12787
12788 int main() {
12789
12790 ; return 0; }
12791 EOF
12792 if { (eval echo configure:12793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12793   rm -rf conftest*
12794   db_h_file="$header"; break
12795 else
12796   echo "configure: failed program was:" >&5
12797   cat conftest.$ac_ext >&5
12798 fi
12799 rm -f conftest*
12800   done
12801   if test -z "$db_h_file"
12802   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12803   else echo "$ac_t""$db_h_file" 1>&6
12804   fi
12805
12806   if test "$with_database_berkdb" != "no"; then
12807     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12808 echo "configure:12809: checking for Berkeley DB version" >&5
12809     cat > conftest.$ac_ext <<EOF
12810 #line 12811 "configure"
12811 #include "confdefs.h"
12812 #include <$db_h_file>
12813 #if DB_VERSION_MAJOR > 1
12814 yes
12815 #endif
12816
12817 EOF
12818 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12819   egrep "yes" >/dev/null 2>&1; then
12820   rm -rf conftest*
12821   echo "$ac_t""2" 1>&6; dbfunc=db_open
12822 else
12823   rm -rf conftest*
12824   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12825 fi
12826 rm -f conftest*
12827
12828     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12829 echo "configure:12830: checking for $dbfunc" >&5
12830
12831 cat > conftest.$ac_ext <<EOF
12832 #line 12833 "configure"
12833 #include "confdefs.h"
12834 /* System header to define __stub macros and hopefully few prototypes,
12835     which can conflict with char $dbfunc(); below.  */
12836 #include <assert.h>
12837 /* Override any gcc2 internal prototype to avoid an error.  */
12838 /* We use char because int might match the return type of a gcc2
12839     builtin and then its argument prototype would still apply.  */
12840 char $dbfunc();
12841
12842 int main() {
12843
12844 /* The GNU C library defines this for functions which it implements
12845     to always fail with ENOSYS.  Some functions are actually named
12846     something starting with __ and the normal name is an alias.  */
12847 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12848 choke me
12849 #else
12850 $dbfunc();
12851 #endif
12852
12853 ; return 0; }
12854 EOF
12855 if { (eval echo configure:12856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12856   rm -rf conftest*
12857   eval "ac_cv_func_$dbfunc=yes"
12858 else
12859   echo "configure: failed program was:" >&5
12860   cat conftest.$ac_ext >&5
12861   rm -rf conftest*
12862   eval "ac_cv_func_$dbfunc=no"
12863 fi
12864 rm -f conftest*
12865
12866 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12867   echo "$ac_t""yes" 1>&6
12868   with_database_berkdb=yes need_libdb=no
12869 else
12870   echo "$ac_t""no" 1>&6
12871
12872     
12873 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12874 echo "configure:12875: checking for $dbfunc in -ldb" >&5
12875 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12876
12877 xe_check_libs=" -ldb "
12878 cat > conftest.$ac_ext <<EOF
12879 #line 12880 "configure"
12880 #include "confdefs.h"
12881 /* Override any gcc2 internal prototype to avoid an error.  */
12882 /* We use char because int might match the return type of a gcc2
12883     builtin and then its argument prototype would still apply.  */
12884 char $dbfunc();
12885
12886 int main() {
12887 $dbfunc()
12888 ; return 0; }
12889 EOF
12890 if { (eval echo configure:12891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12891   rm -rf conftest*
12892   eval "ac_cv_lib_$ac_lib_var=yes"
12893 else
12894   echo "configure: failed program was:" >&5
12895   cat conftest.$ac_ext >&5
12896   rm -rf conftest*
12897   eval "ac_cv_lib_$ac_lib_var=no"
12898 fi
12899 rm -f conftest*
12900 xe_check_libs=""
12901
12902 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12903   echo "$ac_t""yes" 1>&6
12904   with_database_berkdb=yes need_libdb=yes
12905 else
12906   echo "$ac_t""no" 1>&6
12907 fi
12908
12909
12910 fi
12911
12912   fi
12913
12914   if test "$with_database_berkdb" = "yes"; then
12915     { test "$extra_verbose" = "yes" && cat << EOF
12916     Defining DB_H_FILE = "$db_h_file"
12917 EOF
12918 cat >> confdefs.h <<EOF
12919 #define DB_H_FILE "$db_h_file"
12920 EOF
12921 }
12922
12923     { test "$extra_verbose" = "yes" && cat << \EOF
12924     Defining HAVE_BERKELEY_DB
12925 EOF
12926 cat >> confdefs.h <<\EOF
12927 #define HAVE_BERKELEY_DB 1
12928 EOF
12929 }
12930
12931     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12932   else with_database_berkdb=no
12933   fi
12934 fi
12935
12936 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12937      != "no no no"; then
12938   { test "$extra_verbose" = "yes" && cat << \EOF
12939     Defining HAVE_DATABASE
12940 EOF
12941 cat >> confdefs.h <<\EOF
12942 #define HAVE_DATABASE 1
12943 EOF
12944 }
12945
12946   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12947    echo "    xemacs will be linked with \"database.o\""
12948  fi
12949 fi
12950
12951 if test "$with_socks" = "yes"; then
12952   
12953 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12954 echo "configure:12955: checking for SOCKSinit in -lsocks" >&5
12955 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12956
12957 xe_check_libs=" -lsocks "
12958 cat > conftest.$ac_ext <<EOF
12959 #line 12960 "configure"
12960 #include "confdefs.h"
12961 /* Override any gcc2 internal prototype to avoid an error.  */
12962 /* We use char because int might match the return type of a gcc2
12963     builtin and then its argument prototype would still apply.  */
12964 char SOCKSinit();
12965
12966 int main() {
12967 SOCKSinit()
12968 ; return 0; }
12969 EOF
12970 if { (eval echo configure:12971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12971   rm -rf conftest*
12972   eval "ac_cv_lib_$ac_lib_var=yes"
12973 else
12974   echo "configure: failed program was:" >&5
12975   cat conftest.$ac_ext >&5
12976   rm -rf conftest*
12977   eval "ac_cv_lib_$ac_lib_var=no"
12978 fi
12979 rm -f conftest*
12980 xe_check_libs=""
12981
12982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12983   echo "$ac_t""yes" 1>&6
12984     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12985     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12986   { test "$extra_verbose" = "yes" && cat << EOF
12987     Defining $ac_tr_lib
12988 EOF
12989 cat >> confdefs.h <<EOF
12990 #define $ac_tr_lib 1
12991 EOF
12992 }
12993
12994   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12995
12996 else
12997   echo "$ac_t""no" 1>&6
12998 fi
12999
13000
13001   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
13002     Defining HAVE_SOCKS
13003 EOF
13004 cat >> confdefs.h <<\EOF
13005 #define HAVE_SOCKS 1
13006 EOF
13007 }
13008
13009 fi
13010
13011 if test "$usage_tracking" = "yes"; then
13012   { test "$extra_verbose" = "yes" && cat << \EOF
13013     Defining USAGE_TRACKING
13014 EOF
13015 cat >> confdefs.h <<\EOF
13016 #define USAGE_TRACKING 1
13017 EOF
13018 }
13019
13020   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
13021 fi
13022
13023 if test "$with_modules" != "no"; then
13024   echo "checking for module support" 1>&6
13025 echo "configure:13026: checking for module support" >&5
13026
13027     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
13028 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
13029 echo "configure:13030: checking for dlfcn.h" >&5
13030
13031 cat > conftest.$ac_ext <<EOF
13032 #line 13033 "configure"
13033 #include "confdefs.h"
13034 #include <dlfcn.h>
13035 EOF
13036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
13037 { (eval echo configure:13038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
13038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
13039 if test -z "$ac_err"; then
13040   rm -rf conftest*
13041   eval "ac_cv_header_$ac_safe=yes"
13042 else
13043   echo "$ac_err" >&5
13044   echo "configure: failed program was:" >&5
13045   cat conftest.$ac_ext >&5
13046   rm -rf conftest*
13047   eval "ac_cv_header_$ac_safe=no"
13048 fi
13049 rm -f conftest*
13050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
13051   echo "$ac_t""yes" 1>&6
13052   
13053     
13054 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
13055 echo "configure:13056: checking for dlopen in -ldl" >&5
13056 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
13057
13058 xe_check_libs=" -ldl "
13059 cat > conftest.$ac_ext <<EOF
13060 #line 13061 "configure"
13061 #include "confdefs.h"
13062 /* Override any gcc2 internal prototype to avoid an error.  */
13063 /* We use char because int might match the return type of a gcc2
13064     builtin and then its argument prototype would still apply.  */
13065 char dlopen();
13066
13067 int main() {
13068 dlopen()
13069 ; return 0; }
13070 EOF
13071 if { (eval echo configure:13072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13072   rm -rf conftest*
13073   eval "ac_cv_lib_$ac_lib_var=yes"
13074 else
13075   echo "configure: failed program was:" >&5
13076   cat conftest.$ac_ext >&5
13077   rm -rf conftest*
13078   eval "ac_cv_lib_$ac_lib_var=no"
13079 fi
13080 rm -f conftest*
13081 xe_check_libs=""
13082
13083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13084   echo "$ac_t""yes" 1>&6
13085   have_dl=yes libdl=dl
13086 else
13087   echo "$ac_t""no" 1>&6
13088
13089 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
13090 echo "configure:13091: checking for dlopen in -lc" >&5
13091 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
13092
13093 xe_check_libs=" -lc "
13094 cat > conftest.$ac_ext <<EOF
13095 #line 13096 "configure"
13096 #include "confdefs.h"
13097 /* Override any gcc2 internal prototype to avoid an error.  */
13098 /* We use char because int might match the return type of a gcc2
13099     builtin and then its argument prototype would still apply.  */
13100 char dlopen();
13101
13102 int main() {
13103 dlopen()
13104 ; return 0; }
13105 EOF
13106 if { (eval echo configure:13107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13107   rm -rf conftest*
13108   eval "ac_cv_lib_$ac_lib_var=yes"
13109 else
13110   echo "configure: failed program was:" >&5
13111   cat conftest.$ac_ext >&5
13112   rm -rf conftest*
13113   eval "ac_cv_lib_$ac_lib_var=no"
13114 fi
13115 rm -f conftest*
13116 xe_check_libs=""
13117
13118 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13119   echo "$ac_t""yes" 1>&6
13120   have_dl=yes 
13121 else
13122   echo "$ac_t""no" 1>&6
13123 fi
13124
13125
13126 fi
13127
13128
13129 else
13130   echo "$ac_t""no" 1>&6
13131 fi
13132
13133   if test -n "$have_dl"; then
13134     { test "$extra_verbose" = "yes" && cat << \EOF
13135     Defining HAVE_DLOPEN
13136 EOF
13137 cat >> confdefs.h <<\EOF
13138 #define HAVE_DLOPEN 1
13139 EOF
13140 }
13141
13142   else
13143     
13144 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
13145 echo "configure:13146: checking for shl_load in -ldld" >&5
13146 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
13147
13148 xe_check_libs=" -ldld "
13149 cat > conftest.$ac_ext <<EOF
13150 #line 13151 "configure"
13151 #include "confdefs.h"
13152 /* Override any gcc2 internal prototype to avoid an error.  */
13153 /* We use char because int might match the return type of a gcc2
13154     builtin and then its argument prototype would still apply.  */
13155 char shl_load();
13156
13157 int main() {
13158 shl_load()
13159 ; return 0; }
13160 EOF
13161 if { (eval echo configure:13162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13162   rm -rf conftest*
13163   eval "ac_cv_lib_$ac_lib_var=yes"
13164 else
13165   echo "configure: failed program was:" >&5
13166   cat conftest.$ac_ext >&5
13167   rm -rf conftest*
13168   eval "ac_cv_lib_$ac_lib_var=no"
13169 fi
13170 rm -f conftest*
13171 xe_check_libs=""
13172
13173 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13174   echo "$ac_t""yes" 1>&6
13175   libdl=dld have_dl=yes;
13176       { test "$extra_verbose" = "yes" && cat << \EOF
13177     Defining HAVE_SHL_LOAD
13178 EOF
13179 cat >> confdefs.h <<\EOF
13180 #define HAVE_SHL_LOAD 1
13181 EOF
13182 }
13183
13184 else
13185   echo "$ac_t""no" 1>&6
13186
13187 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
13188 echo "configure:13189: checking for dld_init in -ldld" >&5
13189 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
13190
13191 xe_check_libs=" -ldld "
13192 cat > conftest.$ac_ext <<EOF
13193 #line 13194 "configure"
13194 #include "confdefs.h"
13195 /* Override any gcc2 internal prototype to avoid an error.  */
13196 /* We use char because int might match the return type of a gcc2
13197     builtin and then its argument prototype would still apply.  */
13198 char dld_init();
13199
13200 int main() {
13201 dld_init()
13202 ; return 0; }
13203 EOF
13204 if { (eval echo configure:13205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13205   rm -rf conftest*
13206   eval "ac_cv_lib_$ac_lib_var=yes"
13207 else
13208   echo "configure: failed program was:" >&5
13209   cat conftest.$ac_ext >&5
13210   rm -rf conftest*
13211   eval "ac_cv_lib_$ac_lib_var=no"
13212 fi
13213 rm -f conftest*
13214 xe_check_libs=""
13215
13216 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13217   echo "$ac_t""yes" 1>&6
13218   libdl=dld have_dl=yes;
13219       { test "$extra_verbose" = "yes" && cat << \EOF
13220     Defining HAVE_DLD_INIT
13221 EOF
13222 cat >> confdefs.h <<\EOF
13223 #define HAVE_DLD_INIT 1
13224 EOF
13225 }
13226
13227 else
13228   echo "$ac_t""no" 1>&6
13229 fi
13230
13231
13232 fi
13233
13234
13235   fi
13236
13237   if test -n "$have_dl"; then
13238         
13239 dll_ld=
13240 dll_ldflags=
13241 dll_cflags=
13242 dll_post=
13243 dll_ldo="-o"
13244 ld_dynamic_link_flags=
13245 xehost=$canonical
13246 xealias=$internal_configuration
13247
13248 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13249 echo "configure:13250: checking how to build dynamic libraries for ${xehost}" >&5
13250 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13251 case "$xehost" in
13252 *-*-linux-gnu*) ;;
13253 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13254 esac
13255
13256 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13257 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13258 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13259
13260 case "$xehost_os" in
13261 aix3*)
13262   # AIX sometimes has problems with the GCC collect2 program.  For some
13263   # reason, if we set the COLLECT_NAMES environment variable, the problems
13264   # vanish in a puff of smoke.
13265   if test "${COLLECT_NAMES+set}" != set; then
13266     COLLECT_NAMES=
13267     export COLLECT_NAMES
13268   fi
13269   ;;
13270 esac
13271
13272 # Now see if the compiler is really GCC.
13273 if test "$GCC" = "yes"; then
13274   XEGCC=yes
13275 else
13276   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13277 echo "configure:13278: checking checking whether we are using GNU C" >&5
13278   cat > conftest.$ac_ext <<EOF
13279 #line 13280 "configure"
13280 #include "confdefs.h"
13281
13282 #ifdef __GNUC__
13283   yes;
13284 #endif
13285
13286 EOF
13287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13288   egrep "yes" >/dev/null 2>&1; then
13289   rm -rf conftest*
13290   XEGCC=yes
13291 else
13292   rm -rf conftest*
13293   XEGCC=no
13294 fi
13295 rm -f conftest*
13296
13297   echo "$ac_t""${XEGCC}" 1>&6
13298 fi
13299
13300 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13301 echo "configure:13302: checking how to produce PIC code" >&5
13302 wl=
13303
13304 can_build_shared=yes
13305 if test "$XEGCC" = yes; then
13306   wl='-Wl,'
13307
13308   case "$xehost_os" in
13309   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13310     # PIC is the default for these OSes.
13311     ;;
13312
13313   aix3* | aix4* | os2*)
13314     # We can build DLLs from non-PIC.
13315     ;;
13316   amigaos*)
13317     # FIXME: we need at least 68020 code to build shared libraries, but
13318     # adding the `-m68020' flag to GCC prevents building anything better,
13319     # like `-m68040'.
13320     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13321     ;;
13322   *)
13323     dll_cflags='-fPIC'
13324     ;;
13325   esac
13326 else
13327   # PORTME Check for PIC flags for the system compiler.
13328   case "$xehost_os" in
13329   hpux9* | hpux1[0-9]*)
13330     # Is there a better link_static_flag that works with the bundled CC?
13331     wl='-Wl,'
13332     dll_cflags='+Z'
13333     ;;
13334
13335   irix5* | irix6*)
13336     wl='-Wl,'
13337     # PIC (with -KPIC) is the default.
13338     ;;
13339
13340   os2*)
13341     # We can build DLLs from non-PIC.
13342     ;;
13343
13344   osf3* | osf4*)
13345     # All OSF/1 code is PIC.
13346     wl='-Wl,'
13347     ;;
13348
13349   sco3.2v5*)
13350     dll_cflags='-belf -Kpic'
13351     wl='-Wl,'
13352     ;;
13353
13354   unixware*)
13355     dll_cflags="-KPIC"
13356     wl="-Wl,"
13357     ;;
13358
13359   sysv4*)
13360     dll_cflags="-KPIC"
13361     wl="-Wl,"
13362     ;;
13363
13364   sysv5*)
13365     dll_cflags="-KPIC"
13366     wl="-Wl,"
13367     ;;
13368
13369   solaris2*)
13370     dll_cflags='-KPIC'
13371     wl='-Wl,'
13372     ;;
13373
13374   sunos4*)
13375     dll_cflags='-PIC'
13376     wl='-Qoption ld '
13377     ;;
13378
13379   uts4*)
13380     dll_cflags='-pic'
13381     ;;
13382
13383   *)
13384     can_build_shared=no
13385     ;;
13386   esac
13387 fi
13388
13389 if test -n "$dll_cflags"; then
13390   echo "$ac_t""${dll_cflags}" 1>&6
13391   
13392   # Check to make sure the dll_cflags actually works.
13393   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13394 echo "configure:13395: checking if PIC flag ${dll_cflags} really works" >&5
13395   save_CFLAGS="$CFLAGS"
13396   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13397   cat > conftest.$ac_ext <<EOF
13398 #line 13399 "configure"
13399 #include "confdefs.h"
13400
13401 int main() {
13402 int x=0;
13403 ; return 0; }
13404 EOF
13405 if { (eval echo configure:13406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13406   rm -rf conftest*
13407   
13408     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13409     # reports no error.  So, we need to grep stderr for (Bundled).
13410     if grep '(Bundled)' config.log >/dev/null; then
13411       echo "$ac_t""no" 1>&6
13412       can_build_shared=no
13413       dll_cflags=
13414     else
13415       echo "$ac_t""yes" 1>&6
13416     fi
13417 else
13418   echo "configure: failed program was:" >&5
13419   cat conftest.$ac_ext >&5
13420   rm -rf conftest*
13421   echo "$ac_t""no" 1>&6
13422     can_build_shared=no
13423     dll_cflags=
13424 fi
13425 rm -f conftest*
13426   CFLAGS="$save_CFLAGS"
13427 else
13428   echo "$ac_t""none" 1>&6
13429 fi
13430
13431 if test "$can_build_shared" = "yes"; then
13432 cc_produces_so=no
13433 xldf=
13434 xcldf=
13435 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13436 echo "configure:13437: checking if C compiler can produce shared libraries" >&5
13437 if test "$XEGCC" = yes; then
13438   xcldf="-shared"
13439   xldf="-shared"
13440 else # Not using GCC
13441   case "$xehost_os" in
13442     aix3* | aix4*)
13443       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13444       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13445       ;;
13446
13447     freebsd2* | netbsd* | openbsd*)
13448       xldf="-Bshareable"
13449       xcldf="${wl}-Bshareable"
13450       ;;
13451
13452     freebsd3*)
13453       xcldf="-shared"
13454       ;;
13455
13456     hpux*)
13457       xldf="-b +s"
13458       xcldf="${wl}-b ${wl}+s"
13459       ;;
13460
13461     irix5* | irix6* | osf3* | osf4*)
13462       xcldf="${wl}-shared"
13463       xldf="-shared"
13464       ;;
13465
13466     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13467       xcldf="-G"
13468       xldf="-G"
13469       ;;
13470
13471     sunos4*)
13472       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13473       xldf="-assert pure-text -Bstatic"
13474       ;;
13475   esac
13476 fi # End if if we are using gcc
13477
13478 if test -n "$xcldf"; then
13479   save_LDFLAGS=$LDFLAGS
13480   save_LIBS=$LIBS
13481   save_xe_libs=$xe_libs
13482   LDFLAGS="$xcldf $LDFLAGS"
13483   LIBS=
13484   xe_libs=
13485   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13486   cat > conftest.$ac_ext <<EOF
13487 #line 13488 "configure"
13488 #include "confdefs.h"
13489
13490 int main() {
13491 int x=0;
13492 ; return 0; }
13493 EOF
13494 if { (eval echo configure:13495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13495   rm -rf conftest*
13496   cc_produces_so=yes
13497 else
13498   echo "configure: failed program was:" >&5
13499   cat conftest.$ac_ext >&5
13500   rm -rf conftest*
13501   cc_produces_so=no
13502 fi
13503 rm -f conftest*
13504   LDFLAGS=$save_LDFLAGS
13505   LIBS=$save_LIBS
13506   xe_libs=$save_xe_libs
13507   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13508 else
13509   cc_produces_so=no
13510 fi
13511 echo "$ac_t""${cc_produces_so}" 1>&6
13512
13513 LTLD=$LD
13514 if test -z "$LTLD"; then
13515   ac_prog=ld
13516   if test "$XEGCC" = yes; then
13517     # Check if gcc -print-prog-name=ld gives a path.
13518     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13519 echo "configure:13520: checking for ld used by GCC" >&5
13520     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13521     case "$ac_prog" in
13522     # Accept absolute paths.
13523     /*)
13524       if test -z "$LTLD"; then
13525         case "$ac_prog" in
13526           *gcc-lib*) LTLD="$CC"
13527                      ;;
13528           *)         LTLD="$ac_prog"
13529                      ;;
13530         esac
13531       fi
13532       ;;
13533     "")
13534       # If it fails, then pretend we aren't using GCC.
13535       ac_prog=ld
13536       ;;
13537     *)
13538       # If it is relative, then search for the first ld in PATH.
13539       with_gnu_ld=unknown
13540       ;;
13541     esac
13542   else
13543     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13544 echo "configure:13545: checking for GNU ld" >&5
13545   fi
13546
13547   if test -z "$LTLD"; then
13548     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13549     for ac_dir in $PATH; do
13550       test -z "$ac_dir" && ac_dir=.
13551       if test -f "$ac_dir/$ac_prog"; then
13552         LTLD="$ac_dir/$ac_prog"
13553         # Check to see if the program is GNU ld.  I'd rather use --version,
13554         # but apparently some GNU ld's only accept -v.
13555         # Break only if it was the GNU/non-GNU ld that we prefer.
13556         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13557           xe_gnu_ld=yes
13558         else
13559           xe_gnu_ld=no
13560         fi
13561       fi
13562     done
13563     IFS="$ac_save_ifs"
13564   fi
13565
13566   if test -n "$LTLD"; then
13567     echo "$ac_t""${LTLD}" 1>&6
13568   else
13569     echo "$ac_t""no" 1>&6
13570   fi
13571
13572   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13573     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13574     exit 1
13575   fi
13576 fi
13577
13578 ld_dynamic_link_flags=
13579
13580 # Check to see if it really is or isn't GNU ld.
13581 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13582 echo "configure:13583: checking if the linker is GNU ld" >&5
13583 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13584 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13585   xe_gnu_ld=yes
13586 else
13587   xe_gnu_ld=no
13588 fi
13589 echo "$ac_t""${xe_gnu_ld}" 1>&6
13590
13591 case "$xehost_os" in
13592   amigaos* | sunos4*)
13593     # On these operating systems, we should treat GNU ld like the system ld.
13594     gnu_ld_acts_native=yes
13595     ;;
13596   *)
13597     gnu_ld_acts_native=no
13598     ;;
13599 esac
13600
13601 if test "$cc_produces_so" = "yes"; then
13602   dll_ld=$CC
13603   dll_ldflags=$xcldf
13604   can_build_shared=yes
13605   ld_shlibs=yes
13606 else
13607   # OK - only NOW do we futz about with ld.
13608   # See if the linker supports building shared libraries.
13609   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13610 echo "configure:13611: checking whether the linker supports shared libraries" >&5
13611   dll_ld=$CC
13612   dll_ldflags=$LDFLAGS
13613   ld_shlibs=yes
13614   can_build_shared=yes
13615   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13616     # See if GNU ld supports shared libraries.
13617     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13618       dll_ld=$CC
13619       dll_ldflags="-shared"
13620       ld_shlibs=yes
13621     else
13622       ld_shlibs=no
13623     fi
13624   else
13625     # PORTME fill in a description of your system's linker (not GNU ld)
13626     case "$xehost_os" in
13627     aix3*)
13628       dll_ld=$LTLD
13629       dll_ldflags=$xldf
13630       ;;
13631
13632     aix4*)
13633       dll_ldflags=$xcldf
13634       ;;
13635
13636     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13637     # support.  Future versions do this automatically, but an explicit c++rt0.o
13638     # doesn't break anything, and helps significantly (at the cost of a little
13639     # extra space).
13640     freebsd2.2*)
13641       dll_ld=$LTLD
13642       dll_ldflags=$xldf
13643       dll_post="/usr/lib/c++rt0.o"
13644       ;;
13645
13646     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13647     freebsd2*)
13648       dll_ld=$LTLD
13649       dll_ldflags="-Bshareable"
13650       ;;
13651
13652     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13653     freebsd3*)
13654       dll_ldflags="-shared"
13655       ;;
13656
13657     hpux*)
13658       dll_ld=$LTLD
13659       dll_ldflags=$xldf
13660       ;;
13661
13662     irix5* | irix6*)
13663       dll_ld=$LTLD
13664       dll_ldflags=$xldf
13665       ;;
13666
13667     netbsd*)
13668       # Tested with NetBSD 1.2 ld
13669       dll_ld=$LTLD
13670       dll_ldflags=$xldf
13671       ;;
13672
13673     openbsd*)
13674       dll_ld=$LTLD
13675       dll_ldflags=$xldf
13676       ;;
13677
13678     osf3* | osf4*)
13679       dll_ld=$LTLD
13680       dll_ldflags=$xldf
13681       ;;
13682
13683     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13684     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13685       dll_ld=$LTLD
13686       case "$dll_ld" in
13687         *gcc*) dll_ldflags="-shared"
13688                dll_ld=$CC
13689                ;;
13690         *)     dll_ldflags="-G"
13691                ;;
13692       esac
13693       ;;
13694
13695     sunos4*)
13696       if test "$XEGCC" = yes; then
13697         dll_ld=$CC
13698       else
13699         dll_ld=$LTLD
13700       fi
13701       dll_ldflags=$xldf
13702       ;;
13703
13704     uts4*)
13705       dll_ld=$LTLD
13706       dll_ldflags="-G"
13707       ;;
13708
13709     bsdi*)
13710       dll_ldflags="-r"
13711       dll_ld="shlicc2"
13712       ;;
13713
13714     *)
13715       ld_shlibs=no
13716       can_build_shared=no
13717       ;;
13718     esac
13719   fi
13720   echo "$ac_t""${ld_shlibs}" 1>&6
13721   if test "$ld_shlibs" = "no"; then
13722     can_build_shared=no
13723   fi
13724 fi # End of if cc_produces_so = no
13725
13726
13727 if test "$xe_gnu_ld" = yes; then
13728   if test "$ld_shlibs" = yes; then
13729     ld_dynamic_link_flags="${wl}-export-dynamic"
13730   fi
13731 fi
13732
13733 if test -z "$ld_dynamic_link_flags"; then
13734   case "$xehost_os" in
13735   aix3*)
13736     ld_dynamic_link_flags=
13737     ;;
13738
13739   aix4*)
13740     ld_dynamic_link_flags=
13741     ;;
13742
13743   freebsd2.2*)
13744     ld_dynamic_link_flags=
13745     ;;
13746
13747   freebsd2*)
13748     ld_dynamic_link_flags=
13749     ;;
13750
13751   freebsd3*)
13752     ld_dynamic_link_flags=
13753     ;;
13754
13755   hpux*)
13756     ld_dynamic_link_flags="${wl}-E"
13757     ;;
13758
13759   irix5* | irix6*)
13760     ld_dynamic_link_flags=
13761     ;;
13762
13763   netbsd*)
13764     ld_dynamic_link_flags=
13765     ;;
13766
13767   openbsd*)
13768     ld_dynamic_link_flags=
13769     ;;
13770
13771   osf3* | osf4*)
13772     ld_dynamic_link_flags=
13773     ;;
13774
13775   solaris2* | solaris7*)
13776     ld_dynamic_link_flags=
13777     ;;
13778
13779   sco3.2v5* | unixware* | sysv5* | sysv4*)
13780     ld_dynamic_link_flags="${wl}-Bexport"
13781     ;;
13782
13783   sunos4*)
13784     ld_dynamic_link_flags=
13785     ;;
13786
13787   uts4*)
13788     ld_dynamic_link_flags=
13789     ;;
13790
13791   bsdi*)
13792     ld_dynamic_link_flags=
13793     ;;
13794
13795   esac
13796 fi # End of if -z ld_dynamic_link_flags
13797 fi # End of if test "$can_build_shared" = "yes"
13798
13799
13800
13801
13802
13803
13804
13805
13806   fi
13807
13808   if test "$can_build_shared" = "yes"; then
13809     { test "$extra_verbose" = "yes" && cat << \EOF
13810     Defining HAVE_SHLIB
13811 EOF
13812 cat >> confdefs.h <<\EOF
13813 #define HAVE_SHLIB 1
13814 EOF
13815 }
13816
13817     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13818    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13819  fi
13820     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13821     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13822     for ac_func in dlerror _dlerror
13823 do
13824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13825 echo "configure:13826: checking for $ac_func" >&5
13826
13827 cat > conftest.$ac_ext <<EOF
13828 #line 13829 "configure"
13829 #include "confdefs.h"
13830 /* System header to define __stub macros and hopefully few prototypes,
13831     which can conflict with char $ac_func(); below.  */
13832 #include <assert.h>
13833 /* Override any gcc2 internal prototype to avoid an error.  */
13834 /* We use char because int might match the return type of a gcc2
13835     builtin and then its argument prototype would still apply.  */
13836 char $ac_func();
13837
13838 int main() {
13839
13840 /* The GNU C library defines this for functions which it implements
13841     to always fail with ENOSYS.  Some functions are actually named
13842     something starting with __ and the normal name is an alias.  */
13843 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13844 choke me
13845 #else
13846 $ac_func();
13847 #endif
13848
13849 ; return 0; }
13850 EOF
13851 if { (eval echo configure:13852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13852   rm -rf conftest*
13853   eval "ac_cv_func_$ac_func=yes"
13854 else
13855   echo "configure: failed program was:" >&5
13856   cat conftest.$ac_ext >&5
13857   rm -rf conftest*
13858   eval "ac_cv_func_$ac_func=no"
13859 fi
13860 rm -f conftest*
13861
13862 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13863   echo "$ac_t""yes" 1>&6
13864     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13865   { test "$extra_verbose" = "yes" && cat << EOF
13866     Defining $ac_tr_func
13867 EOF
13868 cat >> confdefs.h <<EOF
13869 #define $ac_tr_func 1
13870 EOF
13871 }
13872  
13873 else
13874   echo "$ac_t""no" 1>&6
13875 fi
13876 done
13877
13878     with_modules=yes
13879   else
13880     if test "$with_modules" = "yes"; then
13881       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13882     else
13883       echo "configure: warning: "Module support cannot be provided."" 1>&2
13884     fi
13885     with_modules=no
13886   fi
13887 fi
13888
13889 cat > conftest.$ac_ext <<EOF
13890 #line 13891 "configure"
13891 #include "confdefs.h"
13892 int main(int c,char *v[]){return 0;}
13893 EOF
13894 if { (eval echo configure:13895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13895 then
13896   :
13897 else
13898   conftest_rc="$?"
13899   echo "configure: failed program was:" >&5
13900   cat conftest.$ac_ext >&5
13901   rm -fr conftest*
13902   
13903   echo ""
13904   echo "*** PANIC *** The C compiler can no longer build working executables."
13905   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13906   echo "*** PANIC *** The most likely reason for this problem is that configure"
13907   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13908   echo "*** PANIC *** found at run time."
13909   echo "*** PANIC ***"
13910   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13911   echo "*** PANIC *** On other systems, try telling configure where to find the"
13912   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13913   echo "*** PANIC ***"
13914   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13915   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13916   echo "*** PANIC *** on your system.  Don't do that."
13917   exit 1
13918 fi
13919 rm -fr conftest*
13920
13921 if test "$win32_processes" = "yes"; then
13922   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13923    echo "    xemacs will be linked with \"process-nt.o\""
13924  fi
13925 else
13926   { test "$extra_verbose" = "yes" && cat << \EOF
13927     Defining HAVE_UNIX_PROCESSES
13928 EOF
13929 cat >> confdefs.h <<\EOF
13930 #define HAVE_UNIX_PROCESSES 1
13931 EOF
13932 }
13933
13934   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13935    echo "    xemacs will be linked with \"process-unix.o\""
13936  fi
13937 fi
13938
13939
13940
13941 T=""
13942 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13943 CFLAGS="$T"
13944
13945
13946 T=""
13947 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13948 extra_objs="$T"
13949
13950
13951 T=""
13952 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
13953 c_switch_general="$T"
13954
13955
13956 T=""
13957 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13958 c_switch_window_system="$T"
13959
13960
13961 T=""
13962 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13963 c_switch_all="$T"
13964
13965
13966 T=""
13967 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
13968 ld_switch_general="$T"
13969
13970
13971 T=""
13972 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13973 ld_switch_window_system="$T"
13974
13975
13976 T=""
13977 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13978 ld_switch_all="$T"
13979
13980
13981 T=""
13982 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13983 ld_libs_general="$T"
13984
13985
13986 T=""
13987 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
13988 ld_libs_window_system="$T"
13989
13990
13991 T=""
13992 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13993 ld_libs_all="$T"
13994
13995
13996
13997 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13998 internal_makefile_list="Makefile.in"
13999 SUBDIR_MAKEFILES=''
14000 test -d lock || mkdir lock
14001 for dir in $MAKE_SUBDIR; do
14002   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
14003         test -d "$d" || mkdir "$d"; cd "$d"
14004       done ) ;;
14005    * ) test -d "$dir" || mkdir "$dir" ;;
14006   esac
14007   
14008 T=""
14009 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14010 SUBDIR_MAKEFILES="$T"
14011
14012   
14013 T=""
14014 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14015 internal_makefile_list="$T"
14016
14017 done
14018
14019
14020
14021
14022 for dir in src/s src/m; do
14023   if test ! -d "$dir" ; then
14024     echo Making symbolic link to "$srcdir/$dir"
14025     ${LN_S} "$srcdir/$dir" "$dir"
14026   fi
14027 done
14028
14029 if test "$extra_verbose" = "yes"; then
14030   echo ""
14031   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
14032   echo ""
14033 fi
14034
14035
14036 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
14037   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
14038   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
14039 fi
14040
14041 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
14042   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
14043   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
14044 fi
14045
14046 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
14047   test "$extra_verbose" = "yes" && echo "creating TAGS"
14048   echo "\f
14049 $srcdir/TAGS,include" > "TAGS"
14050 fi
14051
14052 if test "$__SUNPRO_C" = "yes"; then
14053   test "$extra_verbose" = "yes" && echo "creating .sbinit"
14054   ( echo "# For use with Sun WorkShop's Source browser."
14055     echo "# See sbquery(1) and sbinit(4) for more information"
14056     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
14057   ) > .sbinit
14058 fi
14059
14060 rm -f core
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080 PREFIX=$prefix
14081 while true; do
14082   case "$PREFIX" in
14083     *\$* ) eval "PREFIX=$PREFIX" ;;
14084     *) break ;;
14085   esac
14086 done
14087
14088
14089
14090
14091 EXEC_PREFIX=$exec_prefix
14092 while true; do
14093   case "$EXEC_PREFIX" in
14094     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
14095     *) break ;;
14096   esac
14097 done
14098
14099
14100
14101
14102 INFODIR=$infodir
14103 while true; do
14104   case "$INFODIR" in
14105     *\$* ) eval "INFODIR=$INFODIR" ;;
14106     *) break ;;
14107   esac
14108 done
14109
14110
14111
14112
14113 INFOPATH=$infopath
14114 while true; do
14115   case "$INFOPATH" in
14116     *\$* ) eval "INFOPATH=$INFOPATH" ;;
14117     *) break ;;
14118   esac
14119 done
14120
14121
14122
14123
14124 PACKAGE_PATH=$package_path
14125 while true; do
14126   case "$PACKAGE_PATH" in
14127     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
14128     *) break ;;
14129   esac
14130 done
14131
14132
14133
14134
14135 LISPDIR=$lispdir
14136 while true; do
14137   case "$LISPDIR" in
14138     *\$* ) eval "LISPDIR=$LISPDIR" ;;
14139     *) break ;;
14140   esac
14141 done
14142
14143
14144
14145
14146 MODULEDIR=$moduledir
14147 while true; do
14148   case "$MODULEDIR" in
14149     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
14150     *) break ;;
14151   esac
14152 done
14153
14154
14155
14156
14157 SITELISPDIR=$sitelispdir
14158 while true; do
14159   case "$SITELISPDIR" in
14160     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
14161     *) break ;;
14162   esac
14163 done
14164
14165
14166
14167
14168 SITEMODULEDIR=$sitemoduledir
14169 while true; do
14170   case "$SITEMODULEDIR" in
14171     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
14172     *) break ;;
14173   esac
14174 done
14175
14176
14177
14178
14179 ETCDIR=$etcdir
14180 while true; do
14181   case "$ETCDIR" in
14182     *\$* ) eval "ETCDIR=$ETCDIR" ;;
14183     *) break ;;
14184   esac
14185 done
14186
14187
14188
14189
14190 LOCKDIR=$lockdir
14191 while true; do
14192   case "$LOCKDIR" in
14193     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
14194     *) break ;;
14195   esac
14196 done
14197
14198
14199
14200
14201 DOCDIR=$docdir
14202 while true; do
14203   case "$DOCDIR" in
14204     *\$* ) eval "DOCDIR=$DOCDIR" ;;
14205     *) break ;;
14206   esac
14207 done
14208
14209
14210
14211
14212 ARCHLIBDIR=$archlibdir
14213 while true; do
14214   case "$ARCHLIBDIR" in
14215     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14216     *) break ;;
14217   esac
14218 done
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14240
14241
14242
14243
14244
14245
14246
14247 : ${XEMACS_CC:=$CC}
14248
14249
14250 if test "$with_prefix" = "yes"; then
14251   { test "$extra_verbose" = "yes" && cat << \EOF
14252     Defining PREFIX_USER_DEFINED
14253 EOF
14254 cat >> confdefs.h <<\EOF
14255 #define PREFIX_USER_DEFINED 1
14256 EOF
14257 }
14258
14259 fi
14260
14261 if test "$with_site_lisp" = "no"; then
14262   { test "$extra_verbose" = "yes" && cat << \EOF
14263     Defining INHIBIT_SITE_LISP
14264 EOF
14265 cat >> confdefs.h <<\EOF
14266 #define INHIBIT_SITE_LISP 1
14267 EOF
14268 }
14269
14270 fi
14271 if test "$with_site_modules" = "no"; then
14272   { test "$extra_verbose" = "yes" && cat << \EOF
14273     Defining INHIBIT_SITE_MODULES
14274 EOF
14275 cat >> confdefs.h <<\EOF
14276 #define INHIBIT_SITE_MODULES 1
14277 EOF
14278 }
14279
14280 fi
14281
14282
14283 T=""
14284 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14285 ac_configure_args="$T"
14286
14287 { test "$extra_verbose" = "yes" && cat << EOF
14288     Defining EMACS_CONFIGURATION = "$configuration"
14289 EOF
14290 cat >> confdefs.h <<EOF
14291 #define EMACS_CONFIGURATION "$configuration"
14292 EOF
14293 }
14294
14295 { test "$extra_verbose" = "yes" && cat << EOF
14296     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14297 EOF
14298 cat >> confdefs.h <<EOF
14299 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14300 EOF
14301 }
14302
14303 { test "$extra_verbose" = "yes" && cat << EOF
14304     Defining config_machfile = "$machfile"
14305 EOF
14306 cat >> confdefs.h <<EOF
14307 #define config_machfile "$machfile"
14308 EOF
14309 }
14310
14311 { test "$extra_verbose" = "yes" && cat << EOF
14312     Defining config_opsysfile = "$opsysfile"
14313 EOF
14314 cat >> confdefs.h <<EOF
14315 #define config_opsysfile "$opsysfile"
14316 EOF
14317 }
14318
14319
14320
14321 null_string=""
14322 { test "$extra_verbose" = "yes" && cat << EOF
14323     Defining LD_SWITCH_X_SITE = $null_string
14324 EOF
14325 cat >> confdefs.h <<EOF
14326 #define LD_SWITCH_X_SITE $null_string
14327 EOF
14328 }
14329
14330 { test "$extra_verbose" = "yes" && cat << EOF
14331     Defining LD_SWITCH_X_SITE_AUX = $null_string
14332 EOF
14333 cat >> confdefs.h <<EOF
14334 #define LD_SWITCH_X_SITE_AUX $null_string
14335 EOF
14336 }
14337
14338 { test "$extra_verbose" = "yes" && cat << EOF
14339     Defining C_SWITCH_X_SITE = $null_string
14340 EOF
14341 cat >> confdefs.h <<EOF
14342 #define C_SWITCH_X_SITE $null_string
14343 EOF
14344 }
14345
14346 { test "$extra_verbose" = "yes" && cat << EOF
14347     Defining LD_SWITCH_SITE = $null_string
14348 EOF
14349 cat >> confdefs.h <<EOF
14350 #define LD_SWITCH_SITE $null_string
14351 EOF
14352 }
14353
14354 { test "$extra_verbose" = "yes" && cat << EOF
14355     Defining C_SWITCH_SITE = $null_string
14356 EOF
14357 cat >> confdefs.h <<EOF
14358 #define C_SWITCH_SITE $null_string
14359 EOF
14360 }
14361
14362
14363
14364 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14365     Defining GNU_MALLOC
14366 EOF
14367 cat >> confdefs.h <<\EOF
14368 #define GNU_MALLOC 1
14369 EOF
14370 }
14371
14372 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14373     Defining USE_SYSTEM_MALLOC
14374 EOF
14375 cat >> confdefs.h <<\EOF
14376 #define USE_SYSTEM_MALLOC 1
14377 EOF
14378 }
14379
14380 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14381     Defining USE_DEBUG_MALLOC
14382 EOF
14383 cat >> confdefs.h <<\EOF
14384 #define USE_DEBUG_MALLOC 1
14385 EOF
14386 }
14387
14388                                               { test "$extra_verbose" = "yes" && cat << \EOF
14389     Defining USE_SYSTEM_MALLOC
14390 EOF
14391 cat >> confdefs.h <<\EOF
14392 #define USE_SYSTEM_MALLOC 1
14393 EOF
14394 }
14395
14396 fi
14397 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14398     Defining I18N3
14399 EOF
14400 cat >> confdefs.h <<\EOF
14401 #define I18N3 1
14402 EOF
14403 }
14404
14405 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14406     Defining USE_GCC
14407 EOF
14408 cat >> confdefs.h <<\EOF
14409 #define USE_GCC 1
14410 EOF
14411 }
14412
14413 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14414     Defining EXTERNAL_WIDGET
14415 EOF
14416 cat >> confdefs.h <<\EOF
14417 #define EXTERNAL_WIDGET 1
14418 EOF
14419 }
14420
14421 test "$quick_build"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14422     Defining QUICK_BUILD
14423 EOF
14424 cat >> confdefs.h <<\EOF
14425 #define QUICK_BUILD 1
14426 EOF
14427 }
14428
14429 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14430     Defining PURIFY
14431 EOF
14432 cat >> confdefs.h <<\EOF
14433 #define PURIFY 1
14434 EOF
14435 }
14436
14437 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14438     Defining QUANTIFY
14439 EOF
14440 cat >> confdefs.h <<\EOF
14441 #define QUANTIFY 1
14442 EOF
14443 }
14444
14445 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14446     Defining MAIL_USE_POP
14447 EOF
14448 cat >> confdefs.h <<\EOF
14449 #define MAIL_USE_POP 1
14450 EOF
14451 }
14452
14453 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14454     Defining KERBEROS
14455 EOF
14456 cat >> confdefs.h <<\EOF
14457 #define KERBEROS 1
14458 EOF
14459 }
14460
14461 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14462     Defining HESIOD
14463 EOF
14464 cat >> confdefs.h <<\EOF
14465 #define HESIOD 1
14466 EOF
14467 }
14468
14469 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14470     Defining USE_UNION_TYPE
14471 EOF
14472 cat >> confdefs.h <<\EOF
14473 #define USE_UNION_TYPE 1
14474 EOF
14475 }
14476
14477 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14478     Defining PDUMP
14479 EOF
14480 cat >> confdefs.h <<\EOF
14481 #define PDUMP 1
14482 EOF
14483 }
14484
14485
14486
14487 (
14488 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14489 else
14490   echo "uname -a: `uname -a`"
14491 fi
14492 echo ""
14493 echo "$0 $quoted_arguments"
14494 ) > Installation
14495
14496 if test ! -z ${emacs_beta_version} ; then
14497   if test -z "${emacs_is_beta}" ; then
14498         xemacs_betaname=".${emacs_beta_version}"
14499   else
14500         xemacs_betaname="-b${emacs_beta_version}"
14501   fi
14502 else
14503   xemacs_betaname=""
14504 fi
14505
14506 (
14507 echo "
14508
14509 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14510 "
14511 echo "
14512 Compilation / Installation:"
14513 echo "  Source code location:              $srcdir"
14514 echo "  Installation prefix:               $prefix"
14515 if test -n "$site_includes"; then
14516   echo "  Additional header files:           $site_includes"
14517 fi
14518 if test -n "$site_libraries"; then
14519   echo "  Additional libraries:              $site_libraries"
14520 fi
14521 if test -n "$site_prefixes"; then
14522   echo "  Additional prefixes:               $site_prefixes"
14523 fi
14524 if test -n "$runpath"; then
14525   echo "  Runtime library search path:       $runpath"
14526 fi
14527 echo "  Operating system description file: \`$opsysfile'"
14528 echo "  Machine description file:          \`$machfile'"
14529 echo "  Compiler:                          $CC $CFLAGS"
14530 echo "  Relocating allocator for buffers:  $rel_alloc"
14531 echo "  GNU version of malloc:             ${GNU_MALLOC}${GNU_MALLOC_reason}"
14532
14533 echo "
14534 Window System:"
14535 if test "$with_msw" = "yes"; then
14536   echo "  Compiling in support for the Microsoft window system."
14537 fi
14538 if test "$with_x11" = "yes"; then
14539   echo "  Compiling in support for the X window system:"
14540   echo "    - X Windows headers location:                 $x_includes"
14541   echo "    - X Windows libraries location:               $x_libraries"
14542   if test "$with_xauth" != yes; then
14543     echo "    - Xau (X authority) not available."
14544   fi
14545   if test "$with_xmu" != yes; then
14546     echo "    - Xmu library not available; substituting equivalent routines."
14547   fi
14548   if test "$with_wmcommand" != no; then
14549     echo "    - Handling WM_COMMAND properly."
14550   fi
14551 fi
14552 if test "$have_xaw" = "yes"; then
14553   echo "  Compiling in support for the Athena widget set:"
14554   echo "    - Athena headers location:                    $athena_h_path"
14555   echo "    - Athena library to link:                     $athena_lib"
14556 fi
14557 case "$with_menubars" in
14558   lucid ) echo "  Using Lucid menubars." ;;
14559   motif ) echo "  Using Motif menubars."
14560           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14561           echo "             We recommend using the Lucid menubar instead."
14562           echo "             Re-run configure with --with-menubars='lucid'." ;;
14563     msw ) echo "  Using MS-Windows menubars." ;;
14564 esac
14565 case "$with_scrollbars" in
14566   lucid  ) echo "  Using Lucid scrollbars."      ;;
14567   motif  ) echo "  Using Motif scrollbars."      ;;
14568   athena ) echo "  Using Athena scrollbars."     ;;
14569      msw ) echo "  Using MS-Windows scrollbars." ;;
14570 esac
14571 case "$with_dialogs" in
14572   motif  ) echo "  Using Motif dialog boxes."
14573            if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14574              echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14575              echo "             We recommend using the Athena dialog boxes instead."
14576              echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14577              echo "             Read the PROBLEMS file for more information."
14578            fi; fi ;;
14579   athena ) echo "  Using Athena dialog boxes."     ;;
14580      msw ) echo "  Using MS-Windows dialog boxes." ;;
14581 esac
14582 case "$with_widgets" in
14583   motif  ) echo "  Using Motif native widgets."      ;;
14584   athena ) echo "  Using Athena native widgets."     ;;
14585      msw ) echo "  Using MS-Windows native widgets." ;;
14586 esac
14587 if test "$with_dragndrop" = yes; then
14588   echo "  Compiling in support for Drag'n'Drop (EXPERIMENTAL)."
14589   echo "    -  Drag'n'Drop prototype:                             $dragndrop_proto."
14590 fi
14591
14592 echo "
14593 TTY:"
14594 test "$with_ncurses" = yes && echo "  Compiling in support for ncurses."
14595 test "$with_gpm" = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14596
14597 echo "
14598 Images:"
14599 test "$with_gif" = yes && echo "  Compiling in support for GIF  images (builtin)."
14600 if test "$with_xpm" = yes; then
14601   echo "  Compiling in support for XPM  images."
14602 elif test "$with_x11" = yes; then
14603   echo "  WARNING: -----------------------------------------------------------"
14604   echo "  WARNING: Compiling without XPM image support."
14605   if test "$xpm_problem" != ""; then
14606     echo "  Reason: $xpm_problem"
14607   fi
14608   echo "  WARNING: You should strongly consider installing XPM."
14609   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14610   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14611   echo "  WARNING: -----------------------------------------------------------"
14612 fi
14613 if test "$with_png" = yes; then
14614   echo "  Compiling in support for PNG  images."
14615 elif test "$window_system" != "none"; then
14616   echo "  WARNING: -----------------------------------------------------------"
14617   echo "  WARNING: Compiling without PNG image support."
14618   if test "$png_problem" != ""; then
14619     echo "  Reason: $png_problem"
14620   fi
14621   echo "  WARNING: You should strongly consider installing the PNG libraries."
14622   echo "  WARNING: Otherwise certain images and glyphs may not display."
14623   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14624   echo "  WARNING: -----------------------------------------------------------"
14625 fi
14626 test "$with_jpeg" = yes && echo "  Compiling in support for JPEG images."
14627 test "$with_tiff" = yes && echo "  Compiling in support for TIFF images."
14628 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14629
14630 echo "
14631 Sound:"
14632 test "$with_native_sound" = yes && echo "  Compiling in support for sound (native)."
14633 test "$with_nas_sound" = yes && echo "  Compiling in support for NAS (network audio system)."
14634 test "$old_nas" = yes && echo "    - NAS library lacks error trapping; will play synchronously."
14635 test "$with_esd_sound" = yes && echo "  Compiling in support for ESD (Enlightened Sound Daemon)."
14636
14637 echo "
14638 Databases:"
14639 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley database."
14640 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14641 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14642 test "$with_ldap" = yes && echo "  Compiling in support for LDAP."
14643 if test "$with_postgresql" = yes; then
14644   echo "  Compiling in support for PostgreSQL."
14645   if test "$with_postgresqlv7" = yes; then
14646     echo "    - Using PostgreSQL V7 bindings."
14647   fi
14648   if test -n "$postgres_h_path"; then
14649     echo "    - PostgreSQL headers location:  $postgres_h_path"
14650   fi
14651 fi
14652
14653 echo "
14654 Internationalization:"
14655 test "$with_mule" = yes && echo "  Compiling in support for Mule (multi-lingual Emacs)."
14656 test "$with_utf_2000" = yes && echo "  Using UTF-2000 (UTF-8) buffer/string representation."
14657 test "$with_text_coding" = yes && echo "  Compiling in support for text coding."
14658 test "$with_file_coding" = yes && echo "  Compiling in support for file coding."
14659 test "$with_xim" != no && echo "  Compiling in support for XIM (X11R5+ I18N input method)."
14660 test "$with_xim" = motif && echo "    - Using Motif to provide XIM support."
14661 test "$with_xim" = xlib && echo "    - Using raw Xlib to provide XIM support."
14662 test "$with_xfs" = yes && echo "    - Using XFontSet to provide bilingual menubar."
14663 test "$with_canna" = yes && echo "  Compiling in support for Canna on Mule."
14664 if test "$with_wnn" = yes; then
14665   echo "  Compiling in support for the WNN input method on Mule."
14666   test "$with_wnn6" = yes && echo "    - Using WNN version 6."
14667 fi
14668 test "$with_i18n3" = yes && echo "  Compiling in support for I18N level 3 (doesn't currently work)."
14669
14670 echo "
14671 Mail:"
14672 test "$with_pop" = yes && echo "  Compiling in support for POP mail retrieval."
14673 test "$with_kerberos" = yes && echo "  Compiling in support for Kerberos POP authentication."
14674 test "$with_hesiod" = yes && echo "  Compiling in support for Hesiod POP server access."
14675 echo "  Compiling in support for \"$mail_locking\" mail spool file locking method."
14676
14677 echo "
14678 Other Features:"
14679 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14680 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14681 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14682 test "$with_dnet" = yes && echo "  Compiling in support for DNET."
14683 test "$with_modules" = "yes" && echo "  Compiling in support for dynamic shared object modules."
14684 test "$with_clash_detection" != "no" && \
14685   echo "  Clash detection will use \"$lockdir\" for locking files."
14686 test "$use_union_type" = yes && echo "  Using the union type for Lisp_Objects."
14687 test "$pdump" = yes && echo "  Using the new portable dumper."
14688 test "$debug" = yes && echo "  Compiling in support for extra debugging code."
14689 test "$usage_tracking" = yes && echo "  Compiling in support for active usage tracking (Sun internal)."
14690 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc $error_check_glyphs" \
14691   != "no no no no no no"; then
14692   echo "  WARNING: ---------------------------------------------------------"
14693   echo "  WARNING: Compiling in support for runtime error checking."
14694   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14695   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14696   echo "  WARNING: ---------------------------------------------------------"
14697 fi
14698 echo ""
14699 ) | tee -a Installation
14700 echo ""
14701
14702
14703 # Remove any trailing slashes in these variables.
14704 test -n "$prefix" &&
14705   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14706 test -n "$exec_prefix" &&
14707   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14708
14709
14710 for file in $internal_makefile_list; do
14711   test "$file" = src/Makefile.in && \
14712     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14713   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14714 done
14715 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14716 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
14717
14718 trap '' 1 2 15
14719
14720 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14721
14722 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14723 # Let make expand exec_prefix.
14724 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14725
14726 # Any assignment to VPATH causes Sun make to only execute
14727 # the first set of double-colon rules, so remove it if not needed.
14728 # If there is a colon in the path, we need to keep it.
14729 if test "x$srcdir" = x.; then
14730   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14731 fi
14732
14733 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14734
14735 DEFS=-DHAVE_CONFIG_H
14736
14737 # Without the "./", some shells look in PATH for config.status.
14738 : ${CONFIG_STATUS=./config.status}
14739
14740 echo creating $CONFIG_STATUS
14741 rm -f $CONFIG_STATUS
14742 cat > $CONFIG_STATUS <<EOF
14743 #! /bin/sh
14744 # Generated automatically by configure.
14745 # Run this file to recreate the current configuration.
14746 # This directory was configured as follows,
14747 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14748 #
14749 # $0 $ac_configure_args
14750 #
14751 # Compiler output produced by configure, useful for debugging
14752 # configure, is in ./config.log if it exists.
14753
14754 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14755 for ac_option
14756 do
14757   case "\$ac_option" in
14758   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14759     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14760     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14761   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14762     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14763     exit 0 ;;
14764   -help | --help | --hel | --he | --h)
14765     echo "\$ac_cs_usage"; exit 0 ;;
14766   *) echo "\$ac_cs_usage"; exit 1 ;;
14767   esac
14768 done
14769
14770 ac_given_srcdir=$srcdir
14771 ac_given_INSTALL="$INSTALL"
14772
14773 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14774 EOF
14775 cat >> $CONFIG_STATUS <<EOF
14776
14777 # Protect against being on the right side of a sed subst in config.status.
14778 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14779  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14780 $ac_vpsub
14781 $extrasub
14782 s%@SHELL@%$SHELL%g
14783 s%@CFLAGS@%$CFLAGS%g
14784 s%@CPPFLAGS@%$CPPFLAGS%g
14785 s%@CXXFLAGS@%$CXXFLAGS%g
14786 s%@FFLAGS@%$FFLAGS%g
14787 s%@DEFS@%$DEFS%g
14788 s%@LDFLAGS@%$LDFLAGS%g
14789 s%@LIBS@%$LIBS%g
14790 s%@exec_prefix@%$exec_prefix%g
14791 s%@prefix@%$prefix%g
14792 s%@program_transform_name@%$program_transform_name%g
14793 s%@bindir@%$bindir%g
14794 s%@sbindir@%$sbindir%g
14795 s%@libexecdir@%$libexecdir%g
14796 s%@datadir@%$datadir%g
14797 s%@sysconfdir@%$sysconfdir%g
14798 s%@sharedstatedir@%$sharedstatedir%g
14799 s%@localstatedir@%$localstatedir%g
14800 s%@libdir@%$libdir%g
14801 s%@includedir@%$includedir%g
14802 s%@oldincludedir@%$oldincludedir%g
14803 s%@infodir@%$infodir%g
14804 s%@mandir@%$mandir%g
14805 s%@LN_S@%$LN_S%g
14806 s%@blddir@%$blddir%g
14807 s%@CC@%$CC%g
14808 s%@CPP@%$CPP%g
14809 s%@start_flags@%$start_flags%g
14810 s%@ld_switch_shared@%$ld_switch_shared%g
14811 s%@start_files@%$start_files%g
14812 s%@ld@%$ld%g
14813 s%@lib_gcc@%$lib_gcc%g
14814 s%@RANLIB@%$RANLIB%g
14815 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14816 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14817 s%@INSTALL_DATA@%$INSTALL_DATA%g
14818 s%@YACC@%$YACC%g
14819 s%@SET_MAKE@%$SET_MAKE%g
14820 s%@X_CFLAGS@%$X_CFLAGS%g
14821 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14822 s%@X_LIBS@%$X_LIBS%g
14823 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14824 s%@install_pp@%$install_pp%g
14825 s%@libs_xauth@%$libs_xauth%g
14826 s%@dnd_objs@%$dnd_objs%g
14827 s%@lwlib_objs@%$lwlib_objs%g
14828 s%@ALLOCA@%$ALLOCA%g
14829 s%@have_esd_config@%$have_esd_config%g
14830 s%@dll_ld@%$dll_ld%g
14831 s%@dll_cflags@%$dll_cflags%g
14832 s%@dll_ldflags@%$dll_ldflags%g
14833 s%@dll_post@%$dll_post%g
14834 s%@dll_ldo@%$dll_ldo%g
14835 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14836 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14837 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14838 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14839 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14840 s%@PROGNAME@%$PROGNAME%g
14841 s%@version@%$version%g
14842 s%@configuration@%$configuration%g
14843 s%@canonical@%$canonical%g
14844 s%@inststaticdir@%$inststaticdir%g
14845 s%@instvardir@%$instvardir%g
14846 s%@srcdir@%$srcdir%g
14847 s%@pkgdir@%$pkgdir%g
14848 s%@statedir@%$statedir%g
14849 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14850 s%@PREFIX@%$PREFIX%g
14851 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14852 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14853 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14854 s%@INFODIR@%$INFODIR%g
14855 s%@infopath@%$infopath%g
14856 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14857 s%@INFOPATH@%$INFOPATH%g
14858 s%@package_path@%$package_path%g
14859 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14860 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14861 s%@lispdir@%$lispdir%g
14862 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14863 s%@LISPDIR@%$LISPDIR%g
14864 s%@moduledir@%$moduledir%g
14865 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14866 s%@MODULEDIR@%$MODULEDIR%g
14867 s%@sitelispdir@%$sitelispdir%g
14868 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14869 s%@SITELISPDIR@%$SITELISPDIR%g
14870 s%@sitemoduledir@%$sitemoduledir%g
14871 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14872 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14873 s%@etcdir@%$etcdir%g
14874 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14875 s%@ETCDIR@%$ETCDIR%g
14876 s%@lockdir@%$lockdir%g
14877 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14878 s%@LOCKDIR@%$LOCKDIR%g
14879 s%@docdir@%$docdir%g
14880 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14881 s%@DOCDIR@%$DOCDIR%g
14882 s%@archlibdir@%$archlibdir%g
14883 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14884 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14885 s%@bitmapdir@%$bitmapdir%g
14886 s%@extra_objs@%$extra_objs%g
14887 s%@machfile@%$machfile%g
14888 s%@opsysfile@%$opsysfile%g
14889 s%@c_switch_general@%$c_switch_general%g
14890 s%@c_switch_window_system@%$c_switch_window_system%g
14891 s%@c_switch_all@%$c_switch_all%g
14892 s%@ld_switch_general@%$ld_switch_general%g
14893 s%@ld_switch_window_system@%$ld_switch_window_system%g
14894 s%@ld_switch_all@%$ld_switch_all%g
14895 s%@ld_libs_general@%$ld_libs_general%g
14896 s%@ld_libs_window_system@%$ld_libs_window_system%g
14897 s%@ld_libs_all@%$ld_libs_all%g
14898 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14899 s%@native_sound_lib@%$native_sound_lib%g
14900 s%@sound_cflags@%$sound_cflags%g
14901 s%@dynodump_arch@%$dynodump_arch%g
14902 s%@XEMACS_CC@%$XEMACS_CC%g
14903 s%@internal_makefile_list@%$internal_makefile_list%g
14904
14905 CEOF
14906 EOF
14907
14908 cat >> $CONFIG_STATUS <<\EOF
14909
14910 # Split the substitutions into bite-sized pieces for seds with
14911 # small command number limits, like on Digital OSF/1 and HP-UX.
14912 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14913 ac_file=1 # Number of current file.
14914 ac_beg=1 # First line for current file.
14915 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14916 ac_more_lines=:
14917 ac_sed_cmds=""
14918 while $ac_more_lines; do
14919   if test $ac_beg -gt 1; then
14920     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14921   else
14922     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14923   fi
14924   if test ! -s conftest.s$ac_file; then
14925     ac_more_lines=false
14926     rm -f conftest.s$ac_file
14927   else
14928     if test -z "$ac_sed_cmds"; then
14929       ac_sed_cmds="sed -f conftest.s$ac_file"
14930     else
14931       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14932     fi
14933     ac_file=`expr $ac_file + 1`
14934     ac_beg=$ac_end
14935     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14936   fi
14937 done
14938 if test -z "$ac_sed_cmds"; then
14939   ac_sed_cmds=cat
14940 fi
14941 EOF
14942
14943 cat >> $CONFIG_STATUS <<EOF
14944
14945 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14946 EOF
14947 cat >> $CONFIG_STATUS <<\EOF
14948 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14949   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14950   case "$ac_file" in
14951   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14952        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14953   *) ac_file_in="${ac_file}.in" ;;
14954   esac
14955
14956   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14957
14958   # Remove last slash and all that follows it.  Not all systems have dirname.
14959   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14960   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14961     # The file is in a subdirectory.
14962     test ! -d "$ac_dir" && mkdir "$ac_dir"
14963     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14964     # A "../" for each directory in $ac_dir_suffix.
14965     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14966   else
14967     ac_dir_suffix= ac_dots=
14968   fi
14969
14970   case "$ac_given_srcdir" in
14971   .)  srcdir=.
14972       if test -z "$ac_dots"; then top_srcdir=.
14973       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14974   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14975   *) # Relative path.
14976     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14977     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14978   esac
14979
14980   case "$ac_given_INSTALL" in
14981   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14982   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14983   esac
14984
14985   echo creating "$ac_file"
14986   rm -f "$ac_file"
14987   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14988   case "$ac_file" in
14989   *Makefile*) ac_comsub="1i\\
14990 # $configure_input" ;;
14991   *) ac_comsub= ;;
14992   esac
14993
14994   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14995   sed -e "$ac_comsub
14996 s%@configure_input@%$configure_input%g
14997 s%@srcdir@%$srcdir%g
14998 s%@top_srcdir@%$top_srcdir%g
14999 s%@INSTALL@%$INSTALL%g
15000 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
15001 fi; done
15002 rm -f conftest.s*
15003
15004 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
15005 # NAME is the cpp macro being defined and VALUE is the value it is being given.
15006 #
15007 # ac_d sets the value in "#define NAME VALUE" lines.
15008 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
15009 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
15010 ac_dC='\3'
15011 ac_dD='%g'
15012 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
15013 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15014 ac_uB='\([      ]\)%\1#\2define\3'
15015 ac_uC=' '
15016 ac_uD='\4%g'
15017 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
15018 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
15019 ac_eB='$%\1#\2define\3'
15020 ac_eC=' '
15021 ac_eD='%g'
15022
15023 if test "${CONFIG_HEADERS+set}" != set; then
15024 EOF
15025 cat >> $CONFIG_STATUS <<EOF
15026   CONFIG_HEADERS="src/config.h lwlib/config.h"
15027 EOF
15028 cat >> $CONFIG_STATUS <<\EOF
15029 fi
15030 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
15031   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
15032   case "$ac_file" in
15033   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
15034        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
15035   *) ac_file_in="${ac_file}.in" ;;
15036   esac
15037
15038   echo creating $ac_file
15039
15040   rm -f conftest.frag conftest.in conftest.out
15041   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
15042   cat $ac_file_inputs > conftest.in
15043
15044 EOF
15045
15046 # Transform confdefs.h into a sed script conftest.vals that substitutes
15047 # the proper values into config.h.in to produce config.h.  And first:
15048 # Protect against being on the right side of a sed subst in config.status.
15049 # Protect against being in an unquoted here document in config.status.
15050 rm -f conftest.vals
15051 cat > conftest.hdr <<\EOF
15052 s/[\\&%]/\\&/g
15053 s%[\\$`]%\\&%g
15054 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
15055 s%ac_d%ac_u%gp
15056 s%ac_u%ac_e%gp
15057 EOF
15058 sed -n -f conftest.hdr confdefs.h > conftest.vals
15059 rm -f conftest.hdr
15060
15061 # This sed command replaces #undef with comments.  This is necessary, for
15062 # example, in the case of _POSIX_SOURCE, which is predefined and required
15063 # on some systems where configure will not decide to define it.
15064 cat >> conftest.vals <<\EOF
15065 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
15066 EOF
15067
15068 # Break up conftest.vals because some shells have a limit on
15069 # the size of here documents, and old seds have small limits too.
15070
15071 rm -f conftest.tail
15072 while :
15073 do
15074   ac_lines=`grep -c . conftest.vals`
15075   # grep -c gives empty output for an empty file on some AIX systems.
15076   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
15077   # Write a limited-size here document to conftest.frag.
15078   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
15079   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
15080   echo 'CEOF
15081   sed -f conftest.frag conftest.in > conftest.out
15082   rm -f conftest.in
15083   mv conftest.out conftest.in
15084 ' >> $CONFIG_STATUS
15085   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
15086   rm -f conftest.vals
15087   mv conftest.tail conftest.vals
15088 done
15089 rm -f conftest.vals
15090
15091 cat >> $CONFIG_STATUS <<\EOF
15092   rm -f conftest.frag conftest.h
15093   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
15094   cat conftest.in >> conftest.h
15095   rm -f conftest.in
15096   if cmp -s $ac_file conftest.h 2>/dev/null; then
15097     echo "$ac_file is unchanged"
15098     rm -f conftest.h
15099   else
15100     # Remove last slash and all that follows it.  Not all systems have dirname.
15101       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
15102       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
15103       # The file is in a subdirectory.
15104       test ! -d "$ac_dir" && mkdir "$ac_dir"
15105     fi
15106     rm -f $ac_file
15107     mv conftest.h $ac_file
15108   fi
15109 fi; done
15110
15111 EOF
15112 cat >> $CONFIG_STATUS <<EOF
15113 CPP="$CPP"
15114  top_srcdir="$srcdir"
15115  MAKE_SUBDIR="$MAKE_SUBDIR"
15116
15117 EOF
15118 cat >> $CONFIG_STATUS <<\EOF
15119 for dir in . $MAKE_SUBDIR; do
15120   (
15121     cd $dir
15122     rm -f junk.c
15123     < Makefile.in \
15124       sed -e '/^# Generated/d' \
15125           -e 's%/\*\*/#.*%%' \
15126           -e 's/^ *# */#/' \
15127           -e '/^##/d' \
15128           -e '/^#/ {
15129 p
15130 d
15131 }'        \
15132           -e '/./ {
15133 s/\([\"]\)/\\\1/g
15134 s/^/"/
15135 s/$/"/
15136 }'  > junk.c;
15137
15138
15139
15140     echo creating $dir/Makefile
15141 $CPP -I. -I${top_srcdir}/src  junk.c \
15142   | sed -e 's/^\#.*//'          \
15143         -e 's/^[        ][      ]*$//'\
15144         -e 's/^ /       /'              \
15145   | sed -n -e '/^..*$/p'        \
15146   | sed '/^\"/ {
15147         s/\\\([\"]\)/\1/g
15148         s/^[    ]*\"//
15149         s/\"[   ]*$//
15150 }' > Makefile.new
15151     chmod 444 Makefile.new
15152     mv -f Makefile.new Makefile
15153
15154     echo creating $dir/GNUmakefile
15155 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
15156   | sed -e 's/^\#.*//'          \
15157         -e 's/^[        ][      ]*$//'\
15158         -e 's/^ /       /'              \
15159   | sed -n -e '/^..*$/p'        \
15160   | sed '/^\"/ {
15161         s/\\\([\"]\)/\1/g
15162         s/^[    ]*\"//
15163         s/\"[   ]*$//
15164 }' > Makefile.new
15165     chmod 444 Makefile.new
15166     mv -f Makefile.new GNUmakefile
15167
15168     rm -f junk.c
15169   )
15170 done
15171
15172 sed < config.status >> lib-src/config.values \
15173   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
15174   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
15175   -e 's/^\([^ ]*\) $/\1 ""/' \
15176   -e 's/ 1$/ t/'
15177
15178
15179 exit 0
15180 EOF
15181 chmod +x $CONFIG_STATUS
15182 rm -fr confdefs* $ac_clean_files
15183 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1