XEmacs 21.2.32 "Kastor & Polydeukes".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 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_file_coding| \
347         with_canna      | \
348         with_wnn        | \
349         with_wnn6       | \
350         with_workshop   | \
351         with_sparcworks | \
352         with_tooltalk   | \
353         with_ldap       | \
354         with_postgresql | \
355         with_pop        | \
356         with_kerberos   | \
357         with_hesiod     | \
358         with_dnet       | \
359         with_infodock   | \
360         external_widget | \
361         verbose         | \
362         extra_verbose   | \
363         usage_tracking  | \
364         use_union_type  | \
365         pdump           | \
366         debug           | \
367         use_assertions  | \
368         memory_usage_stats | \
369         with_clash_detection | \
370         with_modules | \
371         no_doc_file )
372                   case "$val" in
373             y | ye | yes )      val=yes ;;
374             n | no )            val=no  ;;
375             * ) (echo "$progname: Usage error:"
376 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
378           esac
379           eval "$opt=\"$val\"" ;;
380
381
382                         srcdir          | \
383         compiler        | \
384         cflags          | \
385         cpp             | \
386         cppflags        | \
387         libs            | \
388         ldflags         | \
389         cache_file      | \
390         native_sound_lib| \
391         site_lisp       | \
392         x_includes      | \
393         x_libraries     | \
394         site_includes   | \
395         site_libraries  | \
396         site_prefixes   | \
397         site_runtime_libraries )
398                   if test "$valomitted" = "yes" ; then
399                     if test "$#" = 0 ; then
400               (echo "$progname: Usage error:"
401 echo " " "The \`--$optname' option requires a value."
402 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
403             fi
404             val="$1"; shift
405           fi
406           eval "$opt=\"$val\""
407         ;;
408
409                 rel_alloc | \
410         with_dlmalloc | \
411         with_debug_malloc  | use_debug_malloc | \
412         with_system_malloc | use_system_malloc )
413           case "$val" in
414             y | ye | yes )      val=yes ;;
415             n | no )            val=no  ;;
416             d | de | def | defa | defau | defaul | default ) val=default ;;
417             * ) (echo "$progname: Usage error:"
418 echo " " "The \`--$optname' option requires one of these values:
419   \`yes', \`no', or \`default'."
420 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
421           esac
422           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
423           eval "$opt=\"$val\""
424         ;;
425
426                 "with_database" )
427           with_database_berkdb=no
428           with_database_dbm=no
429           with_database_gdbm=no
430           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
431             case "$x" in
432               no ) ;;
433               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
434               d | db | dbm )                               with_database_dbm=yes    ;;
435               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
436               * ) (echo "$progname: Usage error:"
437 echo " " "The \`--$optname' option value
438   must be either \`no' or a comma-separated list
439   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
440 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
441             esac
442           done
443           if test "$with_database_dbm"  = "yes" -a \
444                   "$with_database_gdbm" = "yes"; then
445           (echo "$progname: Usage error:"
446 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
447   with the \`--$optname' option."
448 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
449           fi
450         ;;
451
452                 "with_sound" )
453                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
454             case "$x" in
455                       n | no | non | none ) new_sdefault=no ;;
456               a | al | all | both ) new_sdefault=yes ;;
457
458               native )       with_native_sound=yes ;;
459               nonative )     with_native_sound=no ;;
460
461               nas )          with_nas_sound=yes ;;
462               nonas )        with_nas_sound=no ;;
463
464               esd )          with_esd_sound=yes ;;
465               noesd )        with_esd_sound=no ;;
466
467               * ) bogus_sound=yes ;;
468             esac
469             if test "$bogus_sound" -o \
470                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
471                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
472                 (echo "$progname: Usage error:"
473 echo " " "Valid types for the \`--$optname' option are:
474   $types.
475 The default is to autodetect all sound support."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
477             elif test -n "$new_sdefault" ; then
478                 with_native_sound=$new_sdefault
479                 with_nas_sound=$new_sdefault
480                 with_esd_sound=$new_sdefault
481                 new_sdefault=   # reset this
482             fi
483             sound_notfirst=true
484           done
485         ;;
486
487                         "with_athena" )
488           case "$val" in
489             xa | xaw )                    val=xaw    ;;
490             3 | 3d | xaw3d )              val=3d     ;;
491                         ne | nex | next | naxtaw)     val=next   ;;
492                         9 | 95 | xaw95 )              val=95     ;;
493             xp | xpm | xawxpm )           val=xpm    ;;
494             * ) (echo "$progname: Usage error:"
495 echo " " "The \`--$optname' option must have one of these values:
496   \`xaw', \`3d', \`next', \`95', or \`xpm'."
497 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
498           esac
499           eval "$opt=\"$val\""
500         ;;
501
502                 "with_xim" )
503           case "$val" in
504             y | ye | yes )                val=yes   ;;
505             n | no | non | none )         val=no    ;;
506             x | xl | xli | xlib )         val=xlib  ;;
507             m | mo | mot | moti | motif ) val=motif ;;
508             * ) (echo "$progname: Usage error:"
509 echo " " "The \`--$optname' option must have one of these values:
510   \`motif', \`xlib', \`yes', or \`no'."
511 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
512           esac
513           eval "$opt=\"$val\""
514         ;;
515
516                 "mail_locking" )
517           case "$val" in
518             lockf )     val=lockf ;;
519             flock )     val=flock ;;
520             file | dot ) val=file  ;;
521             locking )   val=locking  ;;
522             * ) (echo "$progname: Usage error:"
523 echo " " "The \`--$optname' option must have one of these values:
524   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
525 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
526           esac
527           eval "$opt=\"$val\""
528         ;;
529
530                 "error_checking" )
531                           
532           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
533             case "$x" in
534                       n | no | non | none ) new_default=no ;;
535               a | al | all )        new_default=yes ;;
536
537               extents )       error_check_extents=yes ;;
538               noextents )     error_check_extents=no ;;
539
540               typecheck )     error_check_typecheck=yes ;;
541               notypecheck )   error_check_typecheck=no ;;
542
543               bufpos )        error_check_bufpos=yes ;;
544               nobufpos )      error_check_bufpos=no ;;
545
546               gc )            error_check_gc=yes ;;
547               nogc )          error_check_gc=no ;;
548
549               malloc )        error_check_malloc=yes ;;
550               nomalloc )      error_check_malloc=no ;;
551
552               byte_code )     error_check_byte_code=yes ;;
553               nobyte_code )   error_check_byte_code=no ;;
554
555               * ) bogus_error_check=yes ;;
556             esac
557             if test "$bogus_error_check" -o \
558                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
559                 if test "$error_check_default" = yes ; then
560                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
561                 else
562                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
563                 fi
564                 (echo "$progname: Usage error:"
565 echo " " "Valid types for the \`--$optname' option are:
566   $types."
567 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
568             elif test -n "$new_default" ; then
569                 error_check_extents=$new_default
570                 error_check_typecheck=$new_default
571                 error_check_bufpos=$new_default
572                 error_check_gc=$new_default
573                 error_check_malloc=$new_default
574                 error_check_byte_code=$new_default
575                 new_default=    # reset this
576             fi
577             echeck_notfirst=true
578           done
579         ;;
580
581                                 
582                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
583         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
584         archlibdir | docdir | package_path )
585                    if test "$valomitted" = "yes"; then
586              if test "$#" = 0; then
587                  (echo "$progname: Usage error:"
588 echo " " "The \`--$optname' option requires a value."
589 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
590              fi
591              val="$1"; shift
592            fi
593            eval "$opt=\"$val\""
594
595                            case "$opt" in
596                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
597     Defining EXEC_PREFIX_USER_DEFINED
598 EOF
599 cat >> confdefs.h <<\EOF
600 #define EXEC_PREFIX_USER_DEFINED 1
601 EOF
602 }
603  ;;
604              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
605     Defining LISPDIR_USER_DEFINED
606 EOF
607 cat >> confdefs.h <<\EOF
608 #define LISPDIR_USER_DEFINED 1
609 EOF
610 }
611  ;;
612              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
613     Defining SITELISPDIR_USER_DEFINED
614 EOF
615 cat >> confdefs.h <<\EOF
616 #define SITELISPDIR_USER_DEFINED 1
617 EOF
618 }
619  ;;
620              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
621     Defining MODULEDIR_USER_DEFINED
622 EOF
623 cat >> confdefs.h <<\EOF
624 #define MODULEDIR_USER_DEFINED 1
625 EOF
626 }
627  ;;
628              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
629     Defining ETCDIR_USER_DEFINED
630 EOF
631 cat >> confdefs.h <<\EOF
632 #define ETCDIR_USER_DEFINED 1
633 EOF
634 }
635  ;;
636              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
637     Defining INFODIR_USER_DEFINED
638 EOF
639 cat >> confdefs.h <<\EOF
640 #define INFODIR_USER_DEFINED 1
641 EOF
642 }
643  ;;
644              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
645     Defining INFOPATH_USER_DEFINED
646 EOF
647 cat >> confdefs.h <<\EOF
648 #define INFOPATH_USER_DEFINED 1
649 EOF
650 }
651  ;;
652              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
653     Defining PACKAGE_PATH_USER_DEFINED
654 EOF
655 cat >> confdefs.h <<\EOF
656 #define PACKAGE_PATH_USER_DEFINED 1
657 EOF
658 }
659  ;;
660              datadir )
661                 { test "$extra_verbose" = "yes" && cat << \EOF
662     Defining INFODIR_USER_DEFINED
663 EOF
664 cat >> confdefs.h <<\EOF
665 #define INFODIR_USER_DEFINED 1
666 EOF
667 }
668
669                 { test "$extra_verbose" = "yes" && cat << \EOF
670     Defining LISPDIR_USER_DEFINED
671 EOF
672 cat >> confdefs.h <<\EOF
673 #define LISPDIR_USER_DEFINED 1
674 EOF
675 }
676
677             { test "$extra_verbose" = "yes" && cat << \EOF
678     Defining MODULEDIR_USER_DEFINED
679 EOF
680 cat >> confdefs.h <<\EOF
681 #define MODULEDIR_USER_DEFINED 1
682 EOF
683 }
684
685                 { test "$extra_verbose" = "yes" && cat << \EOF
686     Defining ETCDIR_USER_DEFINED
687 EOF
688 cat >> confdefs.h <<\EOF
689 #define ETCDIR_USER_DEFINED 1
690 EOF
691 }
692  ;;
693              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
694     Defining LOCKDIR_USER_DEFINED
695 EOF
696 cat >> confdefs.h <<\EOF
697 #define LOCKDIR_USER_DEFINED 1
698 EOF
699 }
700  ;;
701              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
702     Defining DOCDIR_USER_DEFINED
703 EOF
704 cat >> confdefs.h <<\EOF
705 #define DOCDIR_USER_DEFINED 1
706 EOF
707 }
708  ;;
709              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
710     Defining ARCHLIBDIR_USER_DEFINED
711 EOF
712 cat >> confdefs.h <<\EOF
713 #define ARCHLIBDIR_USER_DEFINED 1
714 EOF
715 }
716  ;;
717            esac
718         ;;
719
720                 "no_create" ) ;;
721
722                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
723
724                 "with_menubars"   | \
725         "with_scrollbars" | \
726         "with_dialogs" | \
727         "with_widgets" )
728           case "$val" in
729             l | lu | luc | luci | lucid )               val=lucid  ;;
730             m | mo | mot | moti | motif )               val=motif  ;;
731             a | at | ath | athe | athen | athena )      val=athena ;;
732             n | no | non | none )                       val=no ;;
733             * ) (echo "$progname: Usage error:"
734 echo " " "The \`--$optname' option must have one of these values:
735   \`lucid', \`motif', \`athena', or \`no'."
736 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
737           esac
738           eval "$opt=\"$val\""
739         ;;
740
741                 "use_minimal_tagbits" | \
742         "use_indexed_lrecord_implementation" | \
743         "run_in_place"  | \
744         "const_is_losing" | \
745         "with_gnu_make" )
746           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
747         ;;
748
749                 * ) (echo "$progname: Usage error:"
750 echo " " "Unrecognized option: $arg"
751 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
752
753       esac
754     ;;
755
756         *-*-*) configuration="$arg" ;;
757
758         *) (echo "$progname: Usage error:"
759 echo " " "Unrecognized argument: $arg"
760 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
761
762   esac
763 done
764
765
766 test -n "$cpp"      && CPP="$cpp"
767 test -n "$cppflags" && CPPFLAGS="$cppflags"
768 test -n "$libs"     && LIBS="$libs"
769 test -n "$ldflags"  && LDFLAGS="$ldflags"
770
771 eval set x "$quoted_arguments"; shift
772
773 test "$extra_verbose" = "yes" && verbose=yes
774
775 test -n "$with_x" && with_x11="$with_x"
776
777 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
778   test "$with_system_malloc" = "default" && with_system_malloc=yes
779 fi
780
781
782
783 if test "$with_cde $with_tooltalk" = "yes no"; then
784   (echo "$progname: Usage error:"
785 echo " " "--with-cde requires --with-tooltalk"
786 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
787 elif test "$with_tooltalk" = "no" ; then with_cde=no
788 elif test "$with_cde" = "yes"; then with_tooltalk=yes
789 fi
790
791
792 case "$srcdir" in
793
794     "" )
795     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
796       if test -f "$dir/src/lisp.h" -a \
797               -f "$dir/lisp/version.el" ; then
798         srcdir="$dir"
799         break
800       fi
801     done
802     if test -z "$srcdir" ; then
803       (echo "$progname: Usage error:"
804 echo " " "Neither the current directory nor its parent seem to
805   contain the XEmacs sources.  If you do not want to build XEmacs in its
806   source tree, you should run \`$progname' in the directory in which
807   you wish to build XEmacs, using the \`--srcdir' option to say where the
808   sources may be found."
809 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
810     fi
811   ;;
812
813     * )
814     if test ! -f "$srcdir/src/lisp.h" -o \
815             ! -f "$srcdir/lisp/version.el" ; then
816       (echo "$progname: Usage error:"
817 echo " " "The directory specified with the \`--srcdir' option,
818   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
819   either run the \`$progname' script at the top of the XEmacs source
820   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
821 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
822     fi
823   ;;
824 esac
825
826 if test -z "$configuration"; then
827     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
828   if test -z "$configuration"; then
829     (echo "$progname: Usage error:"
830 echo " " "XEmacs has not been ported to this host type.
831 Try explicitly specifying the CONFIGURATION when rerunning configure."
832 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
833   fi
834 fi
835
836 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
837 echo "configure:838: checking whether ln -s works" >&5
838
839 rm -f conftestdata
840 if ln -s X conftestdata 2>/dev/null
841 then
842   rm -f conftestdata
843   ac_cv_prog_LN_S="ln -s"
844 else
845   ac_cv_prog_LN_S=ln
846 fi
847 LN_S="$ac_cv_prog_LN_S"
848 if test "$ac_cv_prog_LN_S" = "ln -s"; then
849   echo "$ac_t""yes" 1>&6
850 else
851   echo "$ac_t""no" 1>&6
852 fi
853
854
855 for dir in lisp etc man info tests; do
856   if test ! -d "$dir" ; then
857     echo Making symbolic link to "$srcdir/$dir"
858     ${LN_S} "$srcdir/$dir" "$dir"
859   fi
860 done
861
862
863 absolute_pwd="`pwd`";
864 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
865 then blddir="$PWD"
866 else blddir="$absolute_pwd"; if test -d "/net"; then
867   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
868   blddir=`echo "$blddir" | \
869    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
870 fi
871 fi
872
873
874 case "$srcdir" in
875   /* ) ;;
876   .  ) srcdir="$blddir" ;;
877   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
878   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
879   srcdir=`echo "$srcdir" | \
880    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
881 fi ;;
882 esac
883
884 if test `pwd` != `sh -c cd $srcdir && pwd`  \
885    && test -f "$srcdir/src/config.h"; then
886   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
887    echo "   as a build directory right now; it has been configured in its own"
888    echo "   right.  To configure in another directory as well, you MUST"
889    echo "   use GNU make.  If you do not have GNU make, then you must"
890    echo "   now do \`make distclean' in $srcdir,"
891    echo "   and then run $progname again.") >&2
892   extrasub='/^VPATH[     ]*=/c\
893 vpath %.c $(srcdir)\
894 vpath %.h $(srcdir)\
895 vpath %.y $(srcdir)\
896 vpath %.l $(srcdir)\
897 vpath %.s $(srcdir)\
898 vpath %.in $(srcdir)'
899 fi
900
901 . "$srcdir/version.sh" || exit 1;
902 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
903 : "${extra_verbose=$beta}"
904 version="${emacs_major_version}.${emacs_minor_version}"
905 { test "$extra_verbose" = "yes" && cat << EOF
906     Defining EMACS_MAJOR_VERSION = $emacs_major_version
907 EOF
908 cat >> confdefs.h <<EOF
909 #define EMACS_MAJOR_VERSION $emacs_major_version
910 EOF
911 }
912
913 { test "$extra_verbose" = "yes" && cat << EOF
914     Defining EMACS_MINOR_VERSION = $emacs_minor_version
915 EOF
916 cat >> confdefs.h <<EOF
917 #define EMACS_MINOR_VERSION $emacs_minor_version
918 EOF
919 }
920
921 if test -n "$emacs_beta_version" ; then
922   if test "$beta" = "yes"; then
923         version="${version}-b${emacs_beta_version}"
924         { test "$extra_verbose" = "yes" && cat << EOF
925     Defining EMACS_BETA_VERSION = $emacs_beta_version
926 EOF
927 cat >> confdefs.h <<EOF
928 #define EMACS_BETA_VERSION $emacs_beta_version
929 EOF
930 }
931
932   else
933         version="${version}.${emacs_beta_version}"
934         { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_PATCH_LEVEL $emacs_beta_version
939 EOF
940 }
941
942   fi
943 fi
944 { test "$extra_verbose" = "yes" && cat << EOF
945     Defining XEMACS_CODENAME = "$xemacs_codename"
946 EOF
947 cat >> confdefs.h <<EOF
948 #define XEMACS_CODENAME "$xemacs_codename"
949 EOF
950 }
951
952 { test "$extra_verbose" = "yes" && cat << EOF
953     Defining EMACS_VERSION = "$version"
954 EOF
955 cat >> confdefs.h <<EOF
956 #define EMACS_VERSION "$version"
957 EOF
958 }
959
960
961 if test "$with_infodock" = "yes"; then
962   if test ! -f ../../ID-INSTALL; then
963     echo "Cannot build InfoDock without InfoDock sources"
964     with_infodock=no
965   fi
966 fi
967
968 if test "$with_infodock" = "yes"; then
969       { test "$extra_verbose" = "yes" && cat << EOF
970     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
971 EOF
972 cat >> confdefs.h <<EOF
973 #define INFODOCK_MAJOR_VERSION $infodock_major_version
974 EOF
975 }
976
977   { test "$extra_verbose" = "yes" && cat << EOF
978     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
979 EOF
980 cat >> confdefs.h <<EOF
981 #define INFODOCK_MINOR_VERSION $infodock_minor_version
982 EOF
983 }
984
985   { test "$extra_verbose" = "yes" && cat << EOF
986     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
987 EOF
988 cat >> confdefs.h <<EOF
989 #define INFODOCK_BUILD_VERSION $infodock_build_version
990 EOF
991 }
992
993   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
994   PROGNAME=infodock
995   CPPFLAGS="$CPPFLAGS -DINFODOCK"
996 else
997   PROGNAME=xemacs
998 fi
999
1000 { test "$extra_verbose" = "yes" && cat << EOF
1001     Defining EMACS_PROGNAME = "$PROGNAME"
1002 EOF
1003 cat >> confdefs.h <<EOF
1004 #define EMACS_PROGNAME "$PROGNAME"
1005 EOF
1006 }
1007
1008
1009 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
1010 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1011     Defining ERROR_CHECK_EXTENTS
1012 EOF
1013 cat >> confdefs.h <<\EOF
1014 #define ERROR_CHECK_EXTENTS 1
1015 EOF
1016 }
1017
1018 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1019     Defining ERROR_CHECK_TYPECHECK
1020 EOF
1021 cat >> confdefs.h <<\EOF
1022 #define ERROR_CHECK_TYPECHECK 1
1023 EOF
1024 }
1025
1026 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1027     Defining ERROR_CHECK_BUFPOS
1028 EOF
1029 cat >> confdefs.h <<\EOF
1030 #define ERROR_CHECK_BUFPOS 1
1031 EOF
1032 }
1033
1034 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1035     Defining ERROR_CHECK_GC
1036 EOF
1037 cat >> confdefs.h <<\EOF
1038 #define ERROR_CHECK_GC 1
1039 EOF
1040 }
1041
1042 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1043     Defining ERROR_CHECK_MALLOC
1044 EOF
1045 cat >> confdefs.h <<\EOF
1046 #define ERROR_CHECK_MALLOC 1
1047 EOF
1048 }
1049
1050 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1051     Defining ERROR_CHECK_BYTE_CODE
1052 EOF
1053 cat >> confdefs.h <<\EOF
1054 #define ERROR_CHECK_BYTE_CODE 1
1055 EOF
1056 }
1057
1058 if test "${debug:=$beta}" = "yes"; then
1059   use_assertions=yes memory_usage_stats=yes
1060   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1061    echo "    xemacs will be linked with \"debug.o\""
1062  fi
1063   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1064    echo "    xemacs will be linked with \"tests.o\""
1065  fi
1066   { test "$extra_verbose" = "yes" && cat << \EOF
1067     Defining DEBUG_XEMACS
1068 EOF
1069 cat >> confdefs.h <<\EOF
1070 #define DEBUG_XEMACS 1
1071 EOF
1072 }
1073
1074 fi
1075 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1076     Defining USE_ASSERTIONS
1077 EOF
1078 cat >> confdefs.h <<\EOF
1079 #define USE_ASSERTIONS 1
1080 EOF
1081 }
1082
1083 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1084     Defining MEMORY_USAGE_STATS
1085 EOF
1086 cat >> confdefs.h <<\EOF
1087 #define MEMORY_USAGE_STATS 1
1088 EOF
1089 }
1090
1091
1092
1093 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1094 echo "configure:1095: checking "host system type"" >&5
1095 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1096 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1097 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1098 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1099 echo "$ac_t""$configuration" 1>&6
1100
1101
1102
1103
1104
1105 machine='' opsys=''
1106
1107 case "$canonical" in
1108   sparc-*-*        ) machine=sparc ;;
1109   alpha*-*-*       ) machine=alpha ;;
1110   vax-*-*          ) machine=vax ;;
1111   mips-dec-*       ) machine=pmax ;;
1112   mips-sgi-irix6*  ) machine=iris6d ;;
1113   mips-sgi-*       ) machine=iris4d ;;
1114   mips*-linux      ) machine=mips ;;
1115   romp-ibm-*       ) machine=ibmrt ;;
1116   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1117   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1118   powerpc*-*       ) machine=powerpc ;;
1119   hppa-*-*         ) machine=hp800 ;;
1120   m88k-dg-*        ) machine=aviion ;;
1121   m68*-sony-*      ) machine=news ;;
1122   mips-sony-*      ) machine=news-risc ;;
1123   clipper-*        ) machine=clipper ;;
1124   arm*             ) machine=arm ;;
1125   ns32k-*          ) machine=ns32000 ;;
1126 esac
1127
1128 case "$canonical" in
1129   *-*-linux*    ) opsys=linux ;;
1130   *-*-netbsd*   ) opsys=netbsd ;;
1131   *-*-openbsd*  ) opsys=openbsd ;;
1132   *-*-nextstep* ) opsys=nextstep ;;
1133   *-*-vms       ) opsys=vms ;;
1134
1135     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1136   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1137   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1138   *-dec-osf3*                ) opsys=decosf3-1 ;;
1139   *-dec-osf4*                ) opsys=decosf4-0 ;;
1140
1141     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1142   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1143   *-*-ultrix* )         opsys=ultrix4-3 ;;
1144
1145     *-*-aix3.1*  ) opsys=aix3-1 ;;
1146   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1147   *-*-aix3*    ) opsys=aix3-2   ;;
1148   *-*-aix4.0*  ) opsys=aix4     ;;
1149   *-*-aix4.1*  ) opsys=aix4-1   ;;
1150   *-*-aix4*    ) opsys=aix4-2   ;;
1151
1152     *-gnu* )                    opsys=gnu    ;;
1153   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1154   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1155   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1156   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1157   *-*-aos*   )                  opsys=bsd4-3 ;;
1158   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1159   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1160   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1161   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1162   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1163   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1164         if test -z "$NON_GNU_CPP" ; then
1165           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1166             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1167           done
1168         fi
1169         opsys=usg5-4-2 ;;
1170     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1171     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1172 esac
1173
1174 case "$canonical" in
1175
1176     *-*-netbsd* )
1177     case "$canonical" in
1178       i[3-9]86-*-netbsd*) machine=intel386 ;;
1179       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1180                                             machine=hp9000s300 ;;
1181       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1182       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1183     esac
1184   ;;
1185
1186     *-*-openbsd* )
1187     case "${canonical}" in
1188       i386-*-openbsd*)          machine=intel386 ;;
1189       m68k-*-openbsd*)          machine=hp9000s300 ;;
1190       mipsel-*-openbsd*)        machine=pmax ;;
1191      esac
1192    ;;
1193
1194     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1195   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1196
1197     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1198   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1199
1200     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1201
1202     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1203
1204     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1205
1206     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1207
1208     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1209
1210     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1211   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1212   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1213
1214   
1215     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1216
1217     *-convex-bsd* | *-convex-convexos* )
1218     machine=convex opsys=bsd4-3
1219     NON_GNU_CPP="cc -E -P"
1220   ;;
1221
1222     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1223
1224     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1225   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1226   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1227   m88k-dg-dgux*                           ) opsys=dgux     ;;
1228
1229     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1230   m88k-motorola-sysv4* )
1231                     machine=delta88k opsys=usg5-4-2
1232   ;;
1233   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1234
1235     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1236   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1237
1238     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1239
1240     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1241   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1242   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1243
1244       m88k-harris-cxux* )
1245         case "`uname -r`" in
1246        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1247        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1248     esac
1249     NON_GNU_CPP="/lib/cpp"
1250   ;;
1251     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1252     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1253
1254     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1255
1256     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1257
1258     *-hp-hpux* )
1259         case "$canonical" in
1260       m68*  ) machine=hp9000s300 ;;
1261       hppa* ) machine=hp800      ;;
1262     esac
1263
1264     case "$canonical" in
1265       *-hp-hpux7*  )  opsys=hpux   ;;
1266       *-hp-hpux8*  )  opsys=hpux8  ;;
1267       *-hp-hpux9*  )  opsys=hpux9  ;;
1268       *-hp-hpux10* )  opsys=hpux10 ;;
1269       *-hp-hpux11* )  opsys=hpux11 ;;
1270       *            )  opsys=hpux   ;;
1271     esac
1272
1273         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1274    echo "    xemacs will be linked with \"strcat.o\""
1275  fi ;; esac
1276
1277     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1278         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1279     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1280
1281     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1282   ;;
1283
1284     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1285   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1286
1287     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1288   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1289   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1290   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1291   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1292   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1293
1294     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1295   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1296
1297     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1298
1299     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1300
1301     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1302
1303     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1304
1305       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1306
1307     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1308
1309     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1310
1311     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1312
1313     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1314
1315         mips-mips-usg* ) machine=mips4 ;;
1316   mips-mips-riscos4 )
1317     machine=mips4
1318     NON_GNU_CC="cc -systype bsd43"
1319     NON_GNU_CPP="cc -systype bsd43 -E"
1320     case "$canonical" in
1321       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1322       mips-mips-riscos5* ) opsys=riscos5 ;;
1323     esac
1324   ;;
1325   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1326   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1327
1328     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1329
1330     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1331
1332     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1333   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1334
1335     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1336
1337     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1338
1339     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1340
1341     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1342
1343     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1344   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1345
1346     mips-siemens-sysv* | mips-sni-sysv*)
1347     machine=mips-siemens opsys=usg5-4
1348     NON_GNU_CC=/usr/ccs/bin/cc
1349     NON_GNU_CPP=/usr/ccs/lib/cpp
1350   ;;
1351
1352     mips-nec-sysv*)
1353     machine=mips-nec
1354     NON_GNU_CC=/usr/ccs/bin/cc
1355     NON_GNU_CPP=/usr/ccs/lib/cpp
1356   ;;
1357
1358       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1359   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1360     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1361   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1362   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1363   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1364   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1365   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1366   mips-sgi-irix*      ) opsys=irix5-0 ;;
1367
1368     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1369   *-sony-news* ) opsys=newsos5 ;;
1370
1371     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1372
1373     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1374         case "$canonical" in
1375       m68*-sunos1* )             machine=sun1     ;;
1376       m68*-sunos2* )             machine=sun2     ;;
1377       m68* )                     machine=sun3     ;;
1378       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1379       i*86-*-* )                 machine=intel386 ;;
1380       rs6000* )                  machine=rs6000   ;;
1381     esac
1382
1383         case "$canonical" in *-sunos5*)
1384       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1385     esac
1386
1387                     case "$canonical" in
1388       *-sunos4* )
1389         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1390         : ;;
1391       *-solaris2* )
1392         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1393         RANLIB=':' ;;
1394     esac
1395
1396     case "$canonical" in
1397       *-solaris*          )
1398         opsys=sol2
1399         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1400         { test "$extra_verbose" = "yes" && cat << EOF
1401     Defining OS_RELEASE = $os_release
1402 EOF
1403 cat >> confdefs.h <<EOF
1404 #define OS_RELEASE $os_release
1405 EOF
1406 }
1407  ;;
1408
1409             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1410       *-sunos4.0*         ) opsys=sunos4-0      ;;
1411       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1412       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1413       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1414       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1415       *-mach*             ) opsys=mach-bsd4-3   ;;
1416       *                   ) opsys=bsd4-2        ;;
1417     esac
1418
1419     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1420
1421         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1422   ;;
1423
1424     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1425
1426     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1427   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1428
1429     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1430
1431     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1432
1433     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1434       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1435
1436     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1437
1438     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1439
1440     vax-dec-* )
1441     case "$canonical" in
1442       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1443       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1444       *-mach* )                         opsys=mach-bsd4-3 ;;
1445     esac
1446   ;;
1447
1448     ns16k-whitechapel-* ) machine=mg1 ;;
1449
1450     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1451
1452     i[3-9]86-*-* )
1453     machine=intel386
1454     case "$canonical" in
1455       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1456       *-isc2.2* )               opsys=isc2-2 ;;
1457       *-isc4.0* )               opsys=isc4-0 ;;
1458       *-isc4.* )                opsys=isc4-1
1459                                 GCC_TEST_OPTIONS=-posix
1460                                 NON_GCC_TEST_OPTIONS=-Xp
1461                                 ;;
1462       *-isc* )                  opsys=isc3-0 ;;
1463       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1464       *-esix* )                 opsys=esix ;;
1465       *-mach* )                 opsys=mach-bsd4-3 ;;
1466       *-xenix* )                opsys=xenix ;;
1467       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1468       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1469       *-bsdi4* )                opsys=bsdos4 ;;
1470       *-bsdi3* )                opsys=bsdos3 ;;
1471       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1472       *-bsdi2* )                opsys=bsdos2 ;;
1473       *-sco3.2v5* )             opsys=sco5 ;
1474                                                         if test "$dynamic" = "yes" ; then
1475                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1476         else
1477                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1478         fi ;;
1479       *-sysv5* )                opsys=sco7 ;;
1480       *-386bsd* )               opsys=386bsd ;;
1481       *-freebsd* )              opsys=freebsd ;;
1482       *-nextstep* )             opsys=nextstep ;;
1483       *-pc-cygwin* )            opsys=cygwin32 ;;
1484       *-pc-mingw* )             opsys=mingw32 ;
1485                                 test -z "$with_tty" && with_tty="no";;
1486           esac
1487   ;;
1488
1489     m68k-*-linux* ) machine=m68k opsys=linux ;;
1490
1491 esac
1492
1493 if test -z "$machine" -o -z "$opsys"; then
1494   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1495    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1496   ) >&2
1497   exit 1
1498 fi
1499
1500 if test -z "$dynamic"; then
1501   case "$opsys" in
1502     hpux* | sunos4* ) dynamic=no ;;
1503     *) dynamic=yes ;;
1504   esac
1505 fi
1506 if test "$dynamic" = "yes"; then
1507   case "$opsys" in
1508     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1509     decosf* ) ld_call_shared="-call_shared" ;;
1510   esac
1511 else   case "$opsys" in
1512     sol2 )
1513       echo "Static linking is not supported on Solaris 2."
1514       echo "Rerun configure without specifying --dynamic=no."
1515       exit 1 ;;
1516     linux   ) ld_call_shared="-Bstatic" ;;
1517     decosf* ) ld_call_shared="-non_shared" ;;
1518   esac
1519 fi
1520
1521 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1522
1523 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1524 { test "$extra_verbose" = "yes" && cat << EOF
1525     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1526 EOF
1527 cat >> confdefs.h <<EOF
1528 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1529 EOF
1530 }
1531
1532
1533 machfile="m/${machine}.h"
1534 opsysfile="s/${opsys}.h"
1535
1536
1537 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1538 if test "$with_workshop $with_tooltalk" = "yes no"; then
1539   (echo "$progname: Usage error:"
1540 echo " " "--with-workshop requires --with-tooltalk"
1541 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1542 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1543 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1544 fi
1545
1546 if test "$with_workshop" = "yes"; then
1547   { test "$extra_verbose" = "yes" && cat << \EOF
1548     Defining SUNPRO
1549 EOF
1550 cat >> confdefs.h <<\EOF
1551 #define SUNPRO 1
1552 EOF
1553 }
1554
1555   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1556    echo "    xemacs will be linked with \"sunpro.o\""
1557  fi
1558 fi
1559
1560 if test "$with_clash_detection" = "yes"; then
1561   { test "$extra_verbose" = "yes" && cat << \EOF
1562     Defining CLASH_DETECTION
1563 EOF
1564 cat >> confdefs.h <<\EOF
1565 #define CLASH_DETECTION 1
1566 EOF
1567 }
1568
1569   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1570    echo "    xemacs will be linked with \"filelock.o\""
1571  fi
1572 fi
1573
1574 test -n "$compiler" && CC="$compiler"
1575 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1576 fi
1577
1578 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1579 if test "${CFLAGS-unset}" != unset
1580   then cflags_specified=yes;
1581   else cflags_specified=no;
1582 fi
1583
1584 xe_save_CFLAGS="$CFLAGS"
1585
1586 # Extract the first word of "gcc", so it can be a program name with args.
1587 set dummy gcc; ac_word=$2
1588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1589 echo "configure:1590: checking for $ac_word" >&5
1590
1591 if test -n "$CC"; then
1592   ac_cv_prog_CC="$CC" # Let the user override the test.
1593 else
1594   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1595   ac_dummy="$PATH"
1596   for ac_dir in $ac_dummy; do
1597     test -z "$ac_dir" && ac_dir=.
1598     if test -f $ac_dir/$ac_word; then
1599       ac_cv_prog_CC="gcc"
1600       break
1601     fi
1602   done
1603   IFS="$ac_save_ifs"
1604 fi
1605 CC="$ac_cv_prog_CC"
1606 if test -n "$CC"; then
1607   echo "$ac_t""$CC" 1>&6
1608 else
1609   echo "$ac_t""no" 1>&6
1610 fi
1611
1612 if test -z "$CC"; then
1613   # Extract the first word of "cc", so it can be a program name with args.
1614 set dummy cc; ac_word=$2
1615 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1616 echo "configure:1617: checking for $ac_word" >&5
1617
1618 if test -n "$CC"; then
1619   ac_cv_prog_CC="$CC" # Let the user override the test.
1620 else
1621   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1622   ac_prog_rejected=no
1623   ac_dummy="$PATH"
1624   for ac_dir in $ac_dummy; do
1625     test -z "$ac_dir" && ac_dir=.
1626     if test -f $ac_dir/$ac_word; then
1627       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1628         ac_prog_rejected=yes
1629         continue
1630       fi
1631       ac_cv_prog_CC="cc"
1632       break
1633     fi
1634   done
1635   IFS="$ac_save_ifs"
1636 if test $ac_prog_rejected = yes; then
1637   # We found a bogon in the path, so make sure we never use it.
1638   set dummy $ac_cv_prog_CC
1639   shift
1640   if test $# -gt 0; then
1641     # We chose a different compiler from the bogus one.
1642     # However, it has the same basename, so the bogon will be chosen
1643     # first if we set CC to just the basename; use the full file name.
1644     shift
1645     set dummy "$ac_dir/$ac_word" "$@"
1646     shift
1647     ac_cv_prog_CC="$@"
1648   fi
1649 fi
1650 fi
1651 CC="$ac_cv_prog_CC"
1652 if test -n "$CC"; then
1653   echo "$ac_t""$CC" 1>&6
1654 else
1655   echo "$ac_t""no" 1>&6
1656 fi
1657
1658   if test -z "$CC"; then
1659     case "`uname -s`" in
1660     *win32* | *WIN32*)
1661       # Extract the first word of "cl", so it can be a program name with args.
1662 set dummy cl; ac_word=$2
1663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1664 echo "configure:1665: checking for $ac_word" >&5
1665
1666 if test -n "$CC"; then
1667   ac_cv_prog_CC="$CC" # Let the user override the test.
1668 else
1669   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1670   ac_dummy="$PATH"
1671   for ac_dir in $ac_dummy; do
1672     test -z "$ac_dir" && ac_dir=.
1673     if test -f $ac_dir/$ac_word; then
1674       ac_cv_prog_CC="cl"
1675       break
1676     fi
1677   done
1678   IFS="$ac_save_ifs"
1679 fi
1680 CC="$ac_cv_prog_CC"
1681 if test -n "$CC"; then
1682   echo "$ac_t""$CC" 1>&6
1683 else
1684   echo "$ac_t""no" 1>&6
1685 fi
1686  ;;
1687     esac
1688   fi
1689   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1690 fi
1691
1692 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1693 echo "configure:1694: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1694
1695 ac_ext=c
1696 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1697 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1698 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1699 ac_cpp='$CPP '"$xe_cppflags"
1700 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1701 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1702 cross_compiling=no
1703
1704 cat > conftest.$ac_ext << EOF
1705
1706 #line 1707 "configure"
1707 #include "confdefs.h"
1708
1709 main(){return(0);}
1710 EOF
1711 if { (eval echo configure:1712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1712   ac_cv_prog_cc_works=yes
1713   # If we can't run a trivial program, we are probably using a cross compiler.
1714   if (./conftest; exit) 2>/dev/null; then
1715     ac_cv_prog_cc_cross=no
1716   else
1717     ac_cv_prog_cc_cross=yes
1718   fi
1719 else
1720   echo "configure: failed program was:" >&5
1721   cat conftest.$ac_ext >&5
1722   ac_cv_prog_cc_works=no
1723 fi
1724 rm -fr conftest*
1725 ac_ext=c
1726 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1727 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1728 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1729 ac_cpp='$CPP '"$xe_cppflags"
1730 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1731 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1732 cross_compiling=no
1733
1734 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1735 if test $ac_cv_prog_cc_works = no; then
1736   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1737 fi
1738 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1739 echo "configure:1740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1740 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1741 cross_compiling=$ac_cv_prog_cc_cross
1742
1743 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1744 echo "configure:1745: checking whether we are using GNU C" >&5
1745
1746 cat > conftest.c <<EOF
1747 #ifdef __GNUC__
1748   yes;
1749 #endif
1750 EOF
1751 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1752   ac_cv_prog_gcc=yes
1753 else
1754   ac_cv_prog_gcc=no
1755 fi
1756
1757 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1758
1759 if test $ac_cv_prog_gcc = yes; then
1760   GCC=yes
1761 else
1762   GCC=
1763 fi
1764
1765 ac_test_CFLAGS="${CFLAGS+set}"
1766 ac_save_CFLAGS="$CFLAGS"
1767 CFLAGS=
1768 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1769 echo "configure:1770: checking whether ${CC-cc} accepts -g" >&5
1770
1771 echo 'void f(){}' > conftest.c
1772 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1773   ac_cv_prog_cc_g=yes
1774 else
1775   ac_cv_prog_cc_g=no
1776 fi
1777 rm -f conftest*
1778
1779
1780 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1781 if test "$ac_test_CFLAGS" = set; then
1782   CFLAGS="$ac_save_CFLAGS"
1783 elif test $ac_cv_prog_cc_g = yes; then
1784   if test "$GCC" = yes; then
1785     CFLAGS="-g -O2"
1786   else
1787     CFLAGS="-g"
1788   fi
1789 else
1790   if test "$GCC" = yes; then
1791     CFLAGS="-O2"
1792   else
1793     CFLAGS=
1794   fi
1795 fi
1796  
1797 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1798   CC=${NON_GNU_CC-cc}
1799   # Extract the first word of "gcc", so it can be a program name with args.
1800 set dummy gcc; ac_word=$2
1801 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1802 echo "configure:1803: checking for $ac_word" >&5
1803
1804 if test -n "$CC"; then
1805   ac_cv_prog_CC="$CC" # Let the user override the test.
1806 else
1807   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1808   ac_dummy="$PATH"
1809   for ac_dir in $ac_dummy; do
1810     test -z "$ac_dir" && ac_dir=.
1811     if test -f $ac_dir/$ac_word; then
1812       ac_cv_prog_CC="gcc"
1813       break
1814     fi
1815   done
1816   IFS="$ac_save_ifs"
1817 fi
1818 CC="$ac_cv_prog_CC"
1819 if test -n "$CC"; then
1820   echo "$ac_t""$CC" 1>&6
1821 else
1822   echo "$ac_t""no" 1>&6
1823 fi
1824
1825 if test -z "$CC"; then
1826   # Extract the first word of "cc", so it can be a program name with args.
1827 set dummy cc; ac_word=$2
1828 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1829 echo "configure:1830: checking for $ac_word" >&5
1830
1831 if test -n "$CC"; then
1832   ac_cv_prog_CC="$CC" # Let the user override the test.
1833 else
1834   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1835   ac_prog_rejected=no
1836   ac_dummy="$PATH"
1837   for ac_dir in $ac_dummy; do
1838     test -z "$ac_dir" && ac_dir=.
1839     if test -f $ac_dir/$ac_word; then
1840       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1841         ac_prog_rejected=yes
1842         continue
1843       fi
1844       ac_cv_prog_CC="cc"
1845       break
1846     fi
1847   done
1848   IFS="$ac_save_ifs"
1849 if test $ac_prog_rejected = yes; then
1850   # We found a bogon in the path, so make sure we never use it.
1851   set dummy $ac_cv_prog_CC
1852   shift
1853   if test $# -gt 0; then
1854     # We chose a different compiler from the bogus one.
1855     # However, it has the same basename, so the bogon will be chosen
1856     # first if we set CC to just the basename; use the full file name.
1857     shift
1858     set dummy "$ac_dir/$ac_word" "$@"
1859     shift
1860     ac_cv_prog_CC="$@"
1861   fi
1862 fi
1863 fi
1864 CC="$ac_cv_prog_CC"
1865 if test -n "$CC"; then
1866   echo "$ac_t""$CC" 1>&6
1867 else
1868   echo "$ac_t""no" 1>&6
1869 fi
1870
1871   if test -z "$CC"; then
1872     case "`uname -s`" in
1873     *win32* | *WIN32*)
1874       # Extract the first word of "cl", so it can be a program name with args.
1875 set dummy cl; ac_word=$2
1876 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1877 echo "configure:1878: checking for $ac_word" >&5
1878
1879 if test -n "$CC"; then
1880   ac_cv_prog_CC="$CC" # Let the user override the test.
1881 else
1882   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1883   ac_dummy="$PATH"
1884   for ac_dir in $ac_dummy; do
1885     test -z "$ac_dir" && ac_dir=.
1886     if test -f $ac_dir/$ac_word; then
1887       ac_cv_prog_CC="cl"
1888       break
1889     fi
1890   done
1891   IFS="$ac_save_ifs"
1892 fi
1893 CC="$ac_cv_prog_CC"
1894 if test -n "$CC"; then
1895   echo "$ac_t""$CC" 1>&6
1896 else
1897   echo "$ac_t""no" 1>&6
1898 fi
1899  ;;
1900     esac
1901   fi
1902   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1903 fi
1904
1905 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1906 echo "configure:1907: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1907
1908 ac_ext=c
1909 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1910 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1911 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1912 ac_cpp='$CPP '"$xe_cppflags"
1913 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1914 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1915 cross_compiling=no
1916
1917 cat > conftest.$ac_ext << EOF
1918
1919 #line 1920 "configure"
1920 #include "confdefs.h"
1921
1922 main(){return(0);}
1923 EOF
1924 if { (eval echo configure:1925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1925   ac_cv_prog_cc_works=yes
1926   # If we can't run a trivial program, we are probably using a cross compiler.
1927   if (./conftest; exit) 2>/dev/null; then
1928     ac_cv_prog_cc_cross=no
1929   else
1930     ac_cv_prog_cc_cross=yes
1931   fi
1932 else
1933   echo "configure: failed program was:" >&5
1934   cat conftest.$ac_ext >&5
1935   ac_cv_prog_cc_works=no
1936 fi
1937 rm -fr conftest*
1938 ac_ext=c
1939 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1940 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1941 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1942 ac_cpp='$CPP '"$xe_cppflags"
1943 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1944 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1945 cross_compiling=no
1946
1947 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1948 if test $ac_cv_prog_cc_works = no; then
1949   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1950 fi
1951 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1952 echo "configure:1953: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1953 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1954 cross_compiling=$ac_cv_prog_cc_cross
1955
1956 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1957 echo "configure:1958: checking whether we are using GNU C" >&5
1958
1959 cat > conftest.c <<EOF
1960 #ifdef __GNUC__
1961   yes;
1962 #endif
1963 EOF
1964 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1965: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1965   ac_cv_prog_gcc=yes
1966 else
1967   ac_cv_prog_gcc=no
1968 fi
1969
1970 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1971
1972 if test $ac_cv_prog_gcc = yes; then
1973   GCC=yes
1974 else
1975   GCC=
1976 fi
1977
1978 ac_test_CFLAGS="${CFLAGS+set}"
1979 ac_save_CFLAGS="$CFLAGS"
1980 CFLAGS=
1981 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1982 echo "configure:1983: checking whether ${CC-cc} accepts -g" >&5
1983
1984 echo 'void f(){}' > conftest.c
1985 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1986   ac_cv_prog_cc_g=yes
1987 else
1988   ac_cv_prog_cc_g=no
1989 fi
1990 rm -f conftest*
1991
1992
1993 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1994 if test "$ac_test_CFLAGS" = set; then
1995   CFLAGS="$ac_save_CFLAGS"
1996 elif test $ac_cv_prog_cc_g = yes; then
1997   if test "$GCC" = yes; then
1998     CFLAGS="-g -O2"
1999   else
2000     CFLAGS="-g"
2001   fi
2002 else
2003   if test "$GCC" = yes; then
2004     CFLAGS="-O2"
2005   else
2006     CFLAGS=
2007   fi
2008 fi
2009
2010 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2011   CC=gcc
2012   # Extract the first word of "gcc", so it can be a program name with args.
2013 set dummy gcc; ac_word=$2
2014 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2015 echo "configure:2016: checking for $ac_word" >&5
2016
2017 if test -n "$CC"; then
2018   ac_cv_prog_CC="$CC" # Let the user override the test.
2019 else
2020   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2021   ac_dummy="$PATH"
2022   for ac_dir in $ac_dummy; do
2023     test -z "$ac_dir" && ac_dir=.
2024     if test -f $ac_dir/$ac_word; then
2025       ac_cv_prog_CC="gcc"
2026       break
2027     fi
2028   done
2029   IFS="$ac_save_ifs"
2030 fi
2031 CC="$ac_cv_prog_CC"
2032 if test -n "$CC"; then
2033   echo "$ac_t""$CC" 1>&6
2034 else
2035   echo "$ac_t""no" 1>&6
2036 fi
2037
2038 if test -z "$CC"; then
2039   # Extract the first word of "cc", so it can be a program name with args.
2040 set dummy cc; ac_word=$2
2041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2042 echo "configure:2043: checking for $ac_word" >&5
2043
2044 if test -n "$CC"; then
2045   ac_cv_prog_CC="$CC" # Let the user override the test.
2046 else
2047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2048   ac_prog_rejected=no
2049   ac_dummy="$PATH"
2050   for ac_dir in $ac_dummy; do
2051     test -z "$ac_dir" && ac_dir=.
2052     if test -f $ac_dir/$ac_word; then
2053       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2054         ac_prog_rejected=yes
2055         continue
2056       fi
2057       ac_cv_prog_CC="cc"
2058       break
2059     fi
2060   done
2061   IFS="$ac_save_ifs"
2062 if test $ac_prog_rejected = yes; then
2063   # We found a bogon in the path, so make sure we never use it.
2064   set dummy $ac_cv_prog_CC
2065   shift
2066   if test $# -gt 0; then
2067     # We chose a different compiler from the bogus one.
2068     # However, it has the same basename, so the bogon will be chosen
2069     # first if we set CC to just the basename; use the full file name.
2070     shift
2071     set dummy "$ac_dir/$ac_word" "$@"
2072     shift
2073     ac_cv_prog_CC="$@"
2074   fi
2075 fi
2076 fi
2077 CC="$ac_cv_prog_CC"
2078 if test -n "$CC"; then
2079   echo "$ac_t""$CC" 1>&6
2080 else
2081   echo "$ac_t""no" 1>&6
2082 fi
2083
2084   if test -z "$CC"; then
2085     case "`uname -s`" in
2086     *win32* | *WIN32*)
2087       # Extract the first word of "cl", so it can be a program name with args.
2088 set dummy cl; ac_word=$2
2089 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2090 echo "configure:2091: checking for $ac_word" >&5
2091
2092 if test -n "$CC"; then
2093   ac_cv_prog_CC="$CC" # Let the user override the test.
2094 else
2095   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2096   ac_dummy="$PATH"
2097   for ac_dir in $ac_dummy; do
2098     test -z "$ac_dir" && ac_dir=.
2099     if test -f $ac_dir/$ac_word; then
2100       ac_cv_prog_CC="cl"
2101       break
2102     fi
2103   done
2104   IFS="$ac_save_ifs"
2105 fi
2106 CC="$ac_cv_prog_CC"
2107 if test -n "$CC"; then
2108   echo "$ac_t""$CC" 1>&6
2109 else
2110   echo "$ac_t""no" 1>&6
2111 fi
2112  ;;
2113     esac
2114   fi
2115   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2116 fi
2117
2118 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2119 echo "configure:2120: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2120
2121 ac_ext=c
2122 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2123 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2124 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2125 ac_cpp='$CPP '"$xe_cppflags"
2126 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2127 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2128 cross_compiling=no
2129
2130 cat > conftest.$ac_ext << EOF
2131
2132 #line 2133 "configure"
2133 #include "confdefs.h"
2134
2135 main(){return(0);}
2136 EOF
2137 if { (eval echo configure:2138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2138   ac_cv_prog_cc_works=yes
2139   # If we can't run a trivial program, we are probably using a cross compiler.
2140   if (./conftest; exit) 2>/dev/null; then
2141     ac_cv_prog_cc_cross=no
2142   else
2143     ac_cv_prog_cc_cross=yes
2144   fi
2145 else
2146   echo "configure: failed program was:" >&5
2147   cat conftest.$ac_ext >&5
2148   ac_cv_prog_cc_works=no
2149 fi
2150 rm -fr conftest*
2151 ac_ext=c
2152 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2153 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2154 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2155 ac_cpp='$CPP '"$xe_cppflags"
2156 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2157 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2158 cross_compiling=no
2159
2160 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2161 if test $ac_cv_prog_cc_works = no; then
2162   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2163 fi
2164 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2165 echo "configure:2166: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2166 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2167 cross_compiling=$ac_cv_prog_cc_cross
2168
2169 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2170 echo "configure:2171: checking whether we are using GNU C" >&5
2171
2172 cat > conftest.c <<EOF
2173 #ifdef __GNUC__
2174   yes;
2175 #endif
2176 EOF
2177 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2178   ac_cv_prog_gcc=yes
2179 else
2180   ac_cv_prog_gcc=no
2181 fi
2182
2183 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2184
2185 if test $ac_cv_prog_gcc = yes; then
2186   GCC=yes
2187 else
2188   GCC=
2189 fi
2190
2191 ac_test_CFLAGS="${CFLAGS+set}"
2192 ac_save_CFLAGS="$CFLAGS"
2193 CFLAGS=
2194 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2195 echo "configure:2196: checking whether ${CC-cc} accepts -g" >&5
2196
2197 echo 'void f(){}' > conftest.c
2198 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2199   ac_cv_prog_cc_g=yes
2200 else
2201   ac_cv_prog_cc_g=no
2202 fi
2203 rm -f conftest*
2204
2205
2206 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2207 if test "$ac_test_CFLAGS" = set; then
2208   CFLAGS="$ac_save_CFLAGS"
2209 elif test $ac_cv_prog_cc_g = yes; then
2210   if test "$GCC" = yes; then
2211     CFLAGS="-g -O2"
2212   else
2213     CFLAGS="-g"
2214   fi
2215 else
2216   if test "$GCC" = yes; then
2217     CFLAGS="-O2"
2218   else
2219     CFLAGS=
2220   fi
2221 fi
2222
2223 fi
2224 CFLAGS="$xe_save_CFLAGS"
2225
2226
2227 test -n "$CPP" -a -d "$CPP" && CPP=
2228
2229 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2230
2231 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2232 echo "configure:2233: checking how to run the C preprocessor" >&5
2233 # On Suns, sometimes $CPP names a directory.
2234 if test -n "$CPP" && test -d "$CPP"; then
2235   CPP=
2236 fi
2237 if test -z "$CPP"; then
2238
2239   # This must be in double quotes, not single quotes, because CPP may get
2240   # substituted into the Makefile and "${CC-cc}" will confuse make.
2241   CPP="${CC-cc} -E"
2242   # On the NeXT, cc -E runs the code through the compiler's parser,
2243   # not just through cpp.
2244   cat > conftest.$ac_ext <<EOF
2245 #line 2246 "configure"
2246 #include "confdefs.h"
2247 #include <assert.h>
2248 Syntax Error
2249 EOF
2250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2251 { (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2253 if test -z "$ac_err"; then
2254   :
2255 else
2256   echo "$ac_err" >&5
2257   echo "configure: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   rm -rf conftest*
2260   CPP="${CC-cc} -E -traditional-cpp"
2261   cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 #include <assert.h>
2265 Syntax Error
2266 EOF
2267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2268 { (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2270 if test -z "$ac_err"; then
2271   :
2272 else
2273   echo "$ac_err" >&5
2274   echo "configure: failed program was:" >&5
2275   cat conftest.$ac_ext >&5
2276   rm -rf conftest*
2277   CPP="${CC-cc} -nologo -E"
2278   cat > conftest.$ac_ext <<EOF
2279 #line 2280 "configure"
2280 #include "confdefs.h"
2281 #include <assert.h>
2282 Syntax Error
2283 EOF
2284 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2285 { (eval echo configure:2286: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2286 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2287 if test -z "$ac_err"; then
2288   :
2289 else
2290   echo "$ac_err" >&5
2291   echo "configure: failed program was:" >&5
2292   cat conftest.$ac_ext >&5
2293   rm -rf conftest*
2294   CPP=/lib/cpp
2295 fi
2296 rm -f conftest*
2297 fi
2298 rm -f conftest*
2299 fi
2300 rm -f conftest*
2301   ac_cv_prog_CPP="$CPP"
2302   CPP="$ac_cv_prog_CPP"
2303 else
2304   ac_cv_prog_CPP="$CPP"
2305 fi
2306 echo "$ac_t""$CPP" 1>&6
2307
2308
2309
2310
2311 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2312 echo "configure:2313: checking for AIX" >&5
2313 cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 #ifdef _AIX
2317   yes
2318 #endif
2319
2320 EOF
2321 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2322   egrep "yes" >/dev/null 2>&1; then
2323   rm -rf conftest*
2324   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2325     Defining _ALL_SOURCE
2326 EOF
2327 cat >> confdefs.h <<\EOF
2328 #define _ALL_SOURCE 1
2329 EOF
2330 }
2331
2332 else
2333   rm -rf conftest*
2334   echo "$ac_t""no" 1>&6
2335 fi
2336 rm -f conftest*
2337
2338  
2339 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2340 echo "configure:2341: checking for GNU libc" >&5
2341 cat > conftest.$ac_ext <<EOF
2342 #line 2343 "configure"
2343 #include "confdefs.h"
2344 #include <features.h>
2345 int main() {
2346
2347 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2348 #error Not a GNU libc system :-(
2349 ******* ======= ******** &&&&&&&&
2350 #endif
2351
2352 ; return 0; }
2353 EOF
2354 if { (eval echo configure:2355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2355   rm -rf conftest*
2356   have_glibc=yes
2357 else
2358   echo "configure: failed program was:" >&5
2359   cat conftest.$ac_ext >&5
2360   rm -rf conftest*
2361   have_glibc=no
2362 fi
2363 rm -f conftest*
2364 echo "$ac_t""$have_glibc" 1>&6
2365 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2366     Defining _GNU_SOURCE
2367 EOF
2368 cat >> confdefs.h <<\EOF
2369 #define _GNU_SOURCE 1
2370 EOF
2371 }
2372
2373
2374 case "$opsys" in
2375   sol2) 
2376    { test "$extra_verbose" = "yes" && cat << \EOF
2377     Defining __EXTENSIONS__
2378 EOF
2379 cat >> confdefs.h <<\EOF
2380 #define __EXTENSIONS__ 1
2381 EOF
2382 }
2383
2384       if test "$os_release" -ge 55; then
2385      { test "$extra_verbose" = "yes" && cat << \EOF
2386     Defining _XOPEN_SOURCE = 500
2387 EOF
2388 cat >> confdefs.h <<\EOF
2389 #define _XOPEN_SOURCE 500
2390 EOF
2391 }
2392
2393      { test "$extra_verbose" = "yes" && cat << \EOF
2394     Defining _XOPEN_SOURCE_EXTENDED
2395 EOF
2396 cat >> confdefs.h <<\EOF
2397 #define _XOPEN_SOURCE_EXTENDED 1
2398 EOF
2399 }
2400
2401    fi ;;
2402   linux)
2403     { test "$extra_verbose" = "yes" && cat << \EOF
2404     Defining _POSIX_C_SOURCE = 199506L
2405 EOF
2406 cat >> confdefs.h <<\EOF
2407 #define _POSIX_C_SOURCE 199506L
2408 EOF
2409 }
2410
2411     { test "$extra_verbose" = "yes" && cat << \EOF
2412     Defining _XOPEN_SOURCE = 500
2413 EOF
2414 cat >> confdefs.h <<\EOF
2415 #define _XOPEN_SOURCE 500
2416 EOF
2417 }
2418
2419     { test "$extra_verbose" = "yes" && cat << \EOF
2420     Defining _XOPEN_SOURCE_EXTENDED
2421 EOF
2422 cat >> confdefs.h <<\EOF
2423 #define _XOPEN_SOURCE_EXTENDED 1
2424 EOF
2425 }
2426
2427     ;;
2428 esac
2429
2430 cat > conftest.$ac_ext <<EOF
2431 #line 2432 "configure"
2432 #include "confdefs.h"
2433 int main () {
2434 #if defined __SUNPRO_C
2435 return 11;
2436 #elif defined __DECC
2437 return 12;
2438 #else
2439 return 0;
2440 #endif
2441 }
2442 EOF
2443 if { (eval echo configure:2444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2444 then
2445   :
2446 else
2447   conftest_rc="$?"
2448   echo "configure: failed program was:" >&5
2449   cat conftest.$ac_ext >&5
2450   rm -fr conftest*
2451   case "$conftest_rc" in
2452   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2453   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2454 esac
2455 fi
2456 rm -fr conftest*
2457
2458
2459
2460
2461 echo "Extracting information from the machine- and system-dependent headers..."
2462
2463 tempcname="conftest.c"
2464
2465
2466
2467 cat > $tempcname <<EOF
2468 #define NOT_C_CODE
2469 #define C_SWITCH_SITE
2470 #define C_SWITCH_X_SITE
2471 #define LD_SWITCH_SITE
2472 #define LD_SWITCH_X_SITE
2473 #define LD_SWITCH_X_SITE_AUX
2474 #define OS_RELEASE $os_release
2475 #include "$srcdir/src/$opsysfile"
2476 #include "$srcdir/src/$machfile"
2477
2478 #ifndef LIBS_MACHINE
2479 #define LIBS_MACHINE
2480 #endif
2481 configure___ libs_machine=LIBS_MACHINE
2482
2483 #ifndef LIBS_SYSTEM
2484 #define LIBS_SYSTEM
2485 #endif
2486 configure___ libs_system=LIBS_SYSTEM
2487
2488 #ifndef LIBS_TERMCAP
2489 #define LIBS_TERMCAP
2490 #endif
2491 configure___ libs_termcap=LIBS_TERMCAP
2492
2493 #ifndef LIB_STANDARD
2494 #define LIB_STANDARD
2495 #endif
2496 configure___ libs_standard=LIB_STANDARD
2497
2498
2499 #ifndef OBJECTS_MACHINE
2500 #define OBJECTS_MACHINE
2501 #endif
2502 configure___ objects_machine=OBJECTS_MACHINE
2503
2504 #ifndef OBJECTS_SYSTEM
2505 #define OBJECTS_SYSTEM
2506 #endif
2507 configure___ objects_system=OBJECTS_SYSTEM
2508
2509
2510 #ifndef C_SWITCH_MACHINE
2511 #define C_SWITCH_MACHINE
2512 #endif
2513 configure___ c_switch_machine=C_SWITCH_MACHINE
2514
2515 #ifndef C_SWITCH_SYSTEM
2516 #define C_SWITCH_SYSTEM
2517 #endif
2518 configure___ c_switch_system=C_SWITCH_SYSTEM
2519
2520
2521 #ifndef LD_SWITCH_MACHINE
2522 #define LD_SWITCH_MACHINE
2523 #endif
2524 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2525
2526 #ifndef LD_SWITCH_SYSTEM
2527 #define LD_SWITCH_SYSTEM
2528 #endif
2529 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2530
2531
2532 #ifndef UNEXEC
2533 #define UNEXEC "unexec.o"
2534 #endif
2535 configure___ unexec=UNEXEC
2536
2537
2538 #ifndef LD_SWITCH_SHARED
2539 #define LD_SWITCH_SHARED "-c"
2540 #endif
2541 configure___ ld_switch_shared=LD_SWITCH_SHARED
2542
2543
2544 #ifdef ORDINARY_LINK
2545 #define LD "\$(CC) \$(CFLAGS)"
2546 #else /* no ORDINARY LINK */
2547 #ifdef COFF_ENCAPSULATE
2548 #define LD "\$(CC) -nostdlib"
2549 #else /* not COFF_ENCAPSULATE */
2550 #ifdef LINKER
2551 #define LD LINKER
2552 #else /* ! defined (LINKER) */
2553 #define LD "ld"
2554 #endif /* ! defined (LINKER) */
2555 #endif /* ! defined (COFF_ENCAPSULATE) */
2556 #endif /* not ORDINARY_LINK */
2557 configure___ ld=LD
2558
2559 #ifndef LIB_GCC
2560 #define LIB_GCC
2561 #endif
2562 configure___ lib_gcc=LIB_GCC
2563
2564 #ifndef LD_TEXT_START_ADDR
2565 #define LD_TEXT_START_ADDR
2566 #endif
2567 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2568
2569
2570 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2571 #ifdef NO_REMAP
2572 #ifdef COFF_ENCAPSULATE
2573 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2574 #else /* ! defined (COFF_ENCAPSULATE) */
2575 #define START_FILES "pre-crt0.o /lib/crt0.o"
2576 #endif /* ! defined (COFF_ENCAPSULATE) */
2577 #else /* ! defined (NO_REMAP) */
2578 #define START_FILES "ecrt0.o"
2579 #endif /* ! defined (NO_REMAP) */
2580 #endif /* no ORDINARY_LINK */
2581 #ifndef START_FILES
2582 #define START_FILES
2583 #endif
2584 configure___ start_files=START_FILES
2585
2586 #ifdef ORDINARY_LINK
2587 configure___ ordinary_link=yes
2588 #else
2589 configure___ ordinary_link=no
2590 #endif
2591
2592 #ifdef SYSTEM_MALLOC
2593 configure___ system_malloc=yes
2594 #else
2595 configure___ system_malloc=no
2596 #endif
2597
2598 #ifdef TERMINFO
2599 configure___ have_terminfo=yes
2600 #else
2601 configure___ have_terminfo=no
2602 #endif
2603
2604 #ifdef MAIL_USE_FLOCK
2605 configure___ mail_use_flock=yes
2606 #else
2607 configure___ mail_use_flock=no
2608 #endif
2609
2610 #ifdef MAIL_USE_LOCKF
2611 configure___ mail_use_lockf=yes
2612 #else
2613 configure___ mail_use_lockf=no
2614 #endif
2615
2616 #ifdef MAIL_USE_LOCKING
2617 configure___ mail_use_locking=yes
2618 #else
2619 configure___ mail_use_locking=no
2620 #endif
2621
2622 #ifdef HAVE_WIN32_PROCESSES
2623 configure___ win32_processes=yes
2624 #else
2625 configure___ win32_processes=no
2626 #endif
2627
2628 EOF
2629
2630 CPP=`eval "echo $CPP $CPPFLAGS"`
2631 eval `$CPP -Isrc $tempcname \
2632         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2633
2634 rm $tempcname
2635
2636 test "$extra_verbose" = "yes" && \
2637   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 ""
2638
2639 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2640         mingw_include=`eval "dirname $mingw_include"` ;
2641         mingw_include="-I$mingw_include/../include/mingw32" ;
2642         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2643 esac
2644
2645 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2646
2647 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2648
2649 if test "$cflags_specified" = "no"; then
2650       if   test "$GCC" = "yes"; then
2651     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2652               elif test "$__SUNPRO_C" = "yes"; then
2653     case "$opsys" in
2654       sol2    ) CFLAGS="-v -xO4" ;;
2655       sunos4* ) CFLAGS="-xO2";;
2656     esac
2657   elif test "$__DECC" = "yes"; then
2658     CFLAGS="-O3"
2659   elif test "$CC" = "xlc"; then
2660     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2661     else
2662     CFLAGS="-O" ;  fi
2663 fi
2664
2665 if test "$GCC" = "yes"; then
2666 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2667 echo "configure:2668: checking for buggy gcc versions" >&5
2668 GCC_VERSION=`$CC --version`
2669 case `uname -s`:`uname -m`:$GCC_VERSION in
2670                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2671                         case "$CFLAGS" in
2672             *-O2*|*-O3*)
2673                 case "$CFLAGS" in
2674                     *-fno-schedule-insns*) ;;
2675                     *)
2676                         echo "$ac_t""Yes" 1>&6
2677                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2678                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2679                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2680                         ;;
2681                 esac
2682                 ;;
2683         esac
2684         ;;
2685                     Linux:alpha:egcs-2.91.*)
2686         echo "$ac_t""Yes" 1>&6
2687         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2688         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2689         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2690         ;;
2691     *:i*86*:2.7.2*)
2692         case "$GCC_VERSION" in
2693             2.7.2)
2694                 case "$CFLAGS" in
2695                     *-O2*|*-O3*)
2696                         case "$CFLAGS" in
2697                             *-fno-strength-reduce*) ;;
2698                             *)
2699                                 echo "$ac_t""Yes" 1>&6
2700                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2701                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2702                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2703                                 ;;
2704                         esac
2705                         ;;
2706                 esac
2707                 ;;
2708         esac
2709         case "$CFLAGS" in
2710          *-fno-caller-saves*) ;;
2711          *)
2712             echo "$ac_t""Yes" 1>&6
2713             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2714             echo "configure: warning: -fno-caller-saves." 1>&2
2715             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2716             ;;
2717         esac
2718         ;;
2719 esac
2720 fi
2721 echo "$ac_t""No" 1>&6
2722
2723
2724 if test "$GCC" = "yes"; then
2725   set x $ld_switch_system; shift; ld_switch_system=""
2726   while test -n "$1"; do
2727     case $1 in
2728       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2729       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2730       -Xlinker* ) ;;
2731       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2732     esac
2733     shift
2734   done
2735 fi
2736
2737 if test "$GCC" = "yes"; then
2738   set x $ld_switch_machine; shift; ld_switch_machine=""
2739   while test -n "$1"; do
2740     case $1 in
2741       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2742       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2743       -Xlinker* ) ;;
2744       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2745     esac
2746     shift
2747   done
2748 fi
2749
2750 if test "$GCC" = "yes"; then
2751   set x $LDFLAGS; shift; LDFLAGS=""
2752   while test -n "$1"; do
2753     case $1 in
2754       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2755       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2756       -Xlinker* ) ;;
2757       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2758     esac
2759     shift
2760   done
2761 fi
2762
2763 if test "$GCC" = "yes"; then
2764   set x $ld_call_shared; shift; ld_call_shared=""
2765   while test -n "$1"; do
2766     case $1 in
2767       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2768       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2769       -Xlinker* ) ;;
2770       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2771     esac
2772     shift
2773   done
2774 fi
2775
2776 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2777    echo "    xemacs will be linked with \"$objects_machine\""
2778  fi
2779 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2780    echo "    xemacs will be linked with \"$objects_system\""
2781  fi
2782 test -n "$unexec"          && test ! "$pdump" = "yes" && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2783    echo "    xemacs will be linked with \"$unexec\""
2784  fi
2785 test "$pdump" = "yes" && extra_objs="$extra_objs dumper.o" &&  if test "$extra_verbose" = "yes"; then
2786    echo "    xemacs will be linked with \"dumper.o\""
2787  fi
2788
2789 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2790 echo "configure:2791: checking for dynodump" >&5
2791 if test "$unexec" != "unexsol2.o"; then
2792   echo "$ac_t""no" 1>&6
2793 else
2794   echo "$ac_t""yes" 1>&6
2795   { test "$extra_verbose" = "yes" && cat << \EOF
2796     Defining DYNODUMP
2797 EOF
2798 cat >> confdefs.h <<\EOF
2799 #define DYNODUMP 1
2800 EOF
2801 }
2802
2803   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2804   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2805   case "$machine" in
2806     sparc   ) dynodump_arch=sparc ;;
2807     *86*    ) dynodump_arch=i386  ;;
2808     powerpc ) dynodump_arch=ppc   ;;
2809   esac
2810     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
2811 fi
2812
2813
2814 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2815
2816 if test "$unexec" = "unexaix.o"; then
2817   if   test "$dynamic" = "no"; then
2818   start_flags="-Wl,-bnso,-bnodelcsect"
2819   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2820   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2821     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2822   done
2823   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2824     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2825   done
2826   
2827 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2828 echo "configure:2829: checking for terminateAndUnload in -lC" >&5
2829 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2830
2831 xe_check_libs=" -lC "
2832 cat > conftest.$ac_ext <<EOF
2833 #line 2834 "configure"
2834 #include "confdefs.h"
2835 /* Override any gcc2 internal prototype to avoid an error.  */
2836 /* We use char because int might match the return type of a gcc2
2837     builtin and then its argument prototype would still apply.  */
2838 char terminateAndUnload();
2839
2840 int main() {
2841 terminateAndUnload()
2842 ; return 0; }
2843 EOF
2844 if { (eval echo configure:2845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2845   rm -rf conftest*
2846   eval "ac_cv_lib_$ac_lib_var=yes"
2847 else
2848   echo "configure: failed program was:" >&5
2849   cat conftest.$ac_ext >&5
2850   rm -rf conftest*
2851   eval "ac_cv_lib_$ac_lib_var=no"
2852 fi
2853 rm -f conftest*
2854 xe_check_libs=""
2855
2856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2857   echo "$ac_t""yes" 1>&6
2858   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2859 else
2860   echo "$ac_t""no" 1>&6
2861 fi
2862
2863
2864   fi
2865 elif test -n "$ld_text_start_addr"; then
2866   start_flags="-T $ld_text_start_addr -e __start"
2867 fi
2868
2869
2870
2871
2872 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2873  test -z "$linker" &&  linker='$(CC) -nostdlib'
2874  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2875 fi
2876 test "$GCC" != "yes" && lib_gcc=
2877
2878
2879
2880
2881
2882 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2883 if test -n "$site_libraries"; then
2884   for arg in $site_libraries; do
2885     case "$arg" in
2886      -* ) ;;
2887      * ) test -d "$arg" || \
2888            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2889        arg="-L${arg}" ;;
2890     esac
2891     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2892   done
2893 fi
2894
2895 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2896 if test -n "$site_includes"; then
2897   for arg in $site_includes; do
2898     case "$arg" in
2899       -* ) ;;
2900       * ) test -d "$arg" || \
2901            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2902       arg="-I${arg}" ;;
2903     esac
2904     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2905   done
2906 fi
2907
2908 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2909 if test -n "$site_prefixes"; then
2910   for dir in $site_prefixes; do
2911     lib_dir="${dir}/lib"
2912     inc_dir="${dir}/include"
2913     if test ! -d "$dir"; then
2914       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2915     elif test ! -d "$lib_dir"; then
2916       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2917     else
2918       if test -d "$inc_dir"; then
2919         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
2920       fi
2921       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
2922     fi
2923   done
2924 fi
2925
2926
2927 for dir in "/usr/ccs/lib"; do
2928   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
2929 done
2930
2931 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2932 if test -n "$site_runtime_libraries"; then
2933   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2934   export LD_RUN_PATH
2935 fi
2936
2937
2938
2939
2940
2941 if test -n "$add_runtime_path"; then :;
2942 elif test "$dynamic" = "no"; then add_runtime_path=no
2943 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2944 else case "$opsys" in
2945        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2946        * ) add_runtime_path=no ;;
2947      esac
2948 fi
2949
2950 if test "$add_runtime_path" = "yes"; then
2951       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2952 echo "configure:2953: checking "for runtime libraries flag"" >&5
2953   case "$opsys" in
2954     sol2 ) dash_r="-R" ;;
2955     decosf* | linux* | irix*) dash_r="-rpath " ;;
2956     *)
2957       dash_r=""
2958       for try_dash_r in "-R" "-R " "-rpath "; do
2959         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2960         
2961 if test "$GCC" = "yes"; then
2962   set x $xe_check_libs; shift; xe_check_libs=""
2963   while test -n "$1"; do
2964     case $1 in
2965       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2966       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2967       -Xlinker* ) ;;
2968       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2969     esac
2970     shift
2971   done
2972 fi
2973         cat > conftest.$ac_ext <<EOF
2974 #line 2975 "configure"
2975 #include "confdefs.h"
2976
2977 int main() {
2978
2979 ; return 0; }
2980 EOF
2981 if { (eval echo configure:2982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982   rm -rf conftest*
2983   dash_r="$try_dash_r"
2984 else
2985   echo "configure: failed program was:" >&5
2986   cat conftest.$ac_ext >&5
2987 fi
2988 rm -f conftest*
2989         xe_check_libs=""
2990         test -n "$dash_r" && break
2991       done ;;
2992   esac
2993   if test -n "$dash_r";
2994     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2995     else echo "$ac_t""NONE" 1>&6
2996   fi
2997 fi
2998
2999 xe_add_unique_runpath_dir='
3000   xe_add_p=yes
3001   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
3002   done
3003   if test "$xe_add_p" = "yes"; then
3004     test -n "$runpath" && runpath="${runpath}:"
3005     runpath="${runpath}${xe_runpath_dir}"
3006     runpath_dirs="$runpath_dirs $xe_runpath_dir"
3007   fi'
3008
3009
3010
3011
3012 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
3013     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3014   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3015   
3016         runpath="" runpath_dirs=""
3017   if test -n "$LD_RUN_PATH"; then
3018     runpath="$LD_RUN_PATH"
3019   elif test "$GCC" = "yes"; then
3020         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3021     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3022     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3023     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3024       case "$arg" in P,* | -L* | -R* )
3025         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3026           {
3027 xe_runpath_dir="$dir"
3028   test "$xe_runpath_dir" != "/lib"     -a \
3029         "$xe_runpath_dir" != "/usr/lib" -a \
3030         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3031   eval "$xe_add_unique_runpath_dir"
3032 }
3033         done ;;
3034       esac
3035     done
3036     ld_switch_run="$ld_switch_run_save"
3037     rm -f conftest*
3038   else
3039         for arg in $ld_switch_site $ld_switch_x_site; do
3040       case "$arg" in -L*) {
3041 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3042   test "$xe_runpath_dir" != "/lib"     -a \
3043         "$xe_runpath_dir" != "/usr/lib" -a \
3044         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3045   eval "$xe_add_unique_runpath_dir"
3046 };; esac
3047     done
3048         if test "$opsys $need_motif" = "sol2 yes"; then
3049       xe_runpath_dir="/opt/SUNWdt/lib";
3050       eval "$xe_add_unique_runpath_dir";
3051     fi
3052   fi 
3053   if test -n "$runpath"; then
3054     ld_switch_run="${dash_r}${runpath}"
3055     
3056 if test "$GCC" = "yes"; then
3057   set x $ld_switch_run; shift; ld_switch_run=""
3058   while test -n "$1"; do
3059     case $1 in
3060       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3061       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3062       -Xlinker* ) ;;
3063       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3064     esac
3065     shift
3066   done
3067 fi
3068     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3069   fi
3070 fi
3071
3072
3073
3074
3075 GNU_MALLOC=yes
3076 if test "$with_dlmalloc" != "no"; then
3077         doug_lea_malloc=yes
3078 else
3079         doug_lea_malloc=no
3080 fi
3081 after_morecore_hook_exists=yes
3082 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3083 echo "configure:3084: checking for malloc_get_state" >&5
3084
3085 cat > conftest.$ac_ext <<EOF
3086 #line 3087 "configure"
3087 #include "confdefs.h"
3088 /* System header to define __stub macros and hopefully few prototypes,
3089     which can conflict with char malloc_get_state(); below.  */
3090 #include <assert.h>
3091 /* Override any gcc2 internal prototype to avoid an error.  */
3092 /* We use char because int might match the return type of a gcc2
3093     builtin and then its argument prototype would still apply.  */
3094 char malloc_get_state();
3095
3096 int main() {
3097
3098 /* The GNU C library defines this for functions which it implements
3099     to always fail with ENOSYS.  Some functions are actually named
3100     something starting with __ and the normal name is an alias.  */
3101 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3102 choke me
3103 #else
3104 malloc_get_state();
3105 #endif
3106
3107 ; return 0; }
3108 EOF
3109 if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3110   rm -rf conftest*
3111   eval "ac_cv_func_malloc_get_state=yes"
3112 else
3113   echo "configure: failed program was:" >&5
3114   cat conftest.$ac_ext >&5
3115   rm -rf conftest*
3116   eval "ac_cv_func_malloc_get_state=no"
3117 fi
3118 rm -f conftest*
3119
3120 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3121   echo "$ac_t""yes" 1>&6
3122   :
3123 else
3124   echo "$ac_t""no" 1>&6
3125 doug_lea_malloc=no
3126 fi
3127
3128 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3129 echo "configure:3130: checking for malloc_set_state" >&5
3130
3131 cat > conftest.$ac_ext <<EOF
3132 #line 3133 "configure"
3133 #include "confdefs.h"
3134 /* System header to define __stub macros and hopefully few prototypes,
3135     which can conflict with char malloc_set_state(); below.  */
3136 #include <assert.h>
3137 /* Override any gcc2 internal prototype to avoid an error.  */
3138 /* We use char because int might match the return type of a gcc2
3139     builtin and then its argument prototype would still apply.  */
3140 char malloc_set_state();
3141
3142 int main() {
3143
3144 /* The GNU C library defines this for functions which it implements
3145     to always fail with ENOSYS.  Some functions are actually named
3146     something starting with __ and the normal name is an alias.  */
3147 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3148 choke me
3149 #else
3150 malloc_set_state();
3151 #endif
3152
3153 ; return 0; }
3154 EOF
3155 if { (eval echo configure:3156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3156   rm -rf conftest*
3157   eval "ac_cv_func_malloc_set_state=yes"
3158 else
3159   echo "configure: failed program was:" >&5
3160   cat conftest.$ac_ext >&5
3161   rm -rf conftest*
3162   eval "ac_cv_func_malloc_set_state=no"
3163 fi
3164 rm -f conftest*
3165
3166 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3167   echo "$ac_t""yes" 1>&6
3168   :
3169 else
3170   echo "$ac_t""no" 1>&6
3171 doug_lea_malloc=no
3172 fi
3173
3174 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3175 echo "configure:3176: checking whether __after_morecore_hook exists" >&5
3176 cat > conftest.$ac_ext <<EOF
3177 #line 3178 "configure"
3178 #include "confdefs.h"
3179 extern void (* __after_morecore_hook)();
3180 int main() {
3181 __after_morecore_hook = 0
3182 ; return 0; }
3183 EOF
3184 if { (eval echo configure:3185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3185   rm -rf conftest*
3186   echo "$ac_t""yes" 1>&6
3187 else
3188   echo "configure: failed program was:" >&5
3189   cat conftest.$ac_ext >&5
3190   rm -rf conftest*
3191   echo "$ac_t""no" 1>&6
3192    after_morecore_hook_exists=no
3193 fi
3194 rm -f conftest*
3195 if test "$system_malloc" = "yes" ; then
3196   GNU_MALLOC=no
3197   GNU_MALLOC_reason="
3198   (The GNU allocators don't work with this system configuration)."
3199 elif test "$with_system_malloc" = "yes" ; then
3200   GNU_MALLOC=no
3201   GNU_MALLOC_reason="
3202   (User chose not to use GNU allocators)."
3203 elif test "$with_debug_malloc" = "yes" ; then
3204   GNU_MALLOC=no
3205   GNU_MALLOC_reason="
3206   (User chose to use Debugging Malloc)."
3207 fi
3208
3209 if test "$doug_lea_malloc" = "yes" ; then
3210   if test "$GNU_MALLOC" = yes ; then
3211     GNU_MALLOC_reason="
3212   (Using Doug Lea's new malloc from the GNU C Library.)"
3213   fi
3214   { test "$extra_verbose" = "yes" && cat << \EOF
3215     Defining DOUG_LEA_MALLOC
3216 EOF
3217 cat >> confdefs.h <<\EOF
3218 #define DOUG_LEA_MALLOC 1
3219 EOF
3220 }
3221
3222   if test "$after_morecore_hook_exists" = "no" ; then
3223     GNU_MALLOC_reason="
3224   (Using Doug Lea's new malloc from the Linux C Library.)"
3225     { test "$extra_verbose" = "yes" && cat << \EOF
3226     Defining _NO_MALLOC_WARNING_
3227 EOF
3228 cat >> confdefs.h <<\EOF
3229 #define _NO_MALLOC_WARNING_ 1
3230 EOF
3231 }
3232
3233   fi
3234   use_minimal_tagbits=yes
3235 fi
3236
3237
3238
3239
3240 # Extract the first word of "ranlib", so it can be a program name with args.
3241 set dummy ranlib; ac_word=$2
3242 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3243 echo "configure:3244: checking for $ac_word" >&5
3244
3245 if test -n "$RANLIB"; then
3246   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3247 else
3248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3249   ac_dummy="$PATH"
3250   for ac_dir in $ac_dummy; do
3251     test -z "$ac_dir" && ac_dir=.
3252     if test -f $ac_dir/$ac_word; then
3253       ac_cv_prog_RANLIB="ranlib"
3254       break
3255     fi
3256   done
3257   IFS="$ac_save_ifs"
3258   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3259 fi
3260 RANLIB="$ac_cv_prog_RANLIB"
3261 if test -n "$RANLIB"; then
3262   echo "$ac_t""$RANLIB" 1>&6
3263 else
3264   echo "$ac_t""no" 1>&6
3265 fi
3266
3267 ac_aux_dir=
3268 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3269   if test -f $ac_dir/install-sh; then
3270     ac_aux_dir=$ac_dir
3271     ac_install_sh="$ac_aux_dir/install-sh -c"
3272     break
3273   elif test -f $ac_dir/install.sh; then
3274     ac_aux_dir=$ac_dir
3275     ac_install_sh="$ac_aux_dir/install.sh -c"
3276     break
3277   fi
3278 done
3279 if test -z "$ac_aux_dir"; then
3280   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3281 fi
3282 ac_config_guess=$ac_aux_dir/config.guess
3283 ac_config_sub=$ac_aux_dir/config.sub
3284 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3285
3286 # Find a good install program.  We prefer a C program (faster),
3287 # so one script is as good as another.  But avoid the broken or
3288 # incompatible versions:
3289 # SysV /etc/install, /usr/sbin/install
3290 # SunOS /usr/etc/install
3291 # IRIX /sbin/install
3292 # AIX /bin/install
3293 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3294 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3295 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3296 # ./install, which can be erroneously created by make from ./install.sh.
3297 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3298 echo "configure:3299: checking for a BSD compatible install" >&5
3299 if test -z "$INSTALL"; then
3300
3301   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3302   for ac_dir in $PATH; do
3303     # Account for people who put trailing slashes in PATH elements.
3304     case "$ac_dir/" in
3305     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3306     *)
3307       # OSF1 and SCO ODT 3.0 have their own names for install.
3308       # Don't use installbsd from OSF since it installs stuff as root
3309       # by default.
3310       for ac_prog in ginstall scoinst install; do
3311         if test -f $ac_dir/$ac_prog; then
3312           if test $ac_prog = install &&
3313             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3314             # AIX install.  It has an incompatible calling convention.
3315             :
3316           else
3317             ac_cv_path_install="$ac_dir/$ac_prog -c"
3318             break 2
3319           fi
3320         fi
3321       done
3322       ;;
3323     esac
3324   done
3325   IFS="$ac_save_IFS"
3326
3327   if test "${ac_cv_path_install+set}" = set; then
3328     INSTALL="$ac_cv_path_install"
3329   else
3330     # As a last resort, use the slow shell script.  We don't cache a
3331     # path for INSTALL within a source directory, because that will
3332     # break other packages using the cache if that directory is
3333     # removed, or if the path is relative.
3334     INSTALL="$ac_install_sh"
3335   fi
3336 fi
3337 echo "$ac_t""$INSTALL" 1>&6
3338
3339 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3340 # It thinks the first close brace ends the variable substitution.
3341 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3342
3343 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3344
3345 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3346
3347 for ac_prog in 'bison -y' byacc
3348 do
3349 # Extract the first word of "$ac_prog", so it can be a program name with args.
3350 set dummy $ac_prog; ac_word=$2
3351 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3352 echo "configure:3353: checking for $ac_word" >&5
3353
3354 if test -n "$YACC"; then
3355   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3356 else
3357   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3358   ac_dummy="$PATH"
3359   for ac_dir in $ac_dummy; do
3360     test -z "$ac_dir" && ac_dir=.
3361     if test -f $ac_dir/$ac_word; then
3362       ac_cv_prog_YACC="$ac_prog"
3363       break
3364     fi
3365   done
3366   IFS="$ac_save_ifs"
3367 fi
3368 YACC="$ac_cv_prog_YACC"
3369 if test -n "$YACC"; then
3370   echo "$ac_t""$YACC" 1>&6
3371 else
3372   echo "$ac_t""no" 1>&6
3373 fi
3374
3375 test -n "$YACC" && break
3376 done
3377 test -n "$YACC" || YACC="yacc"
3378
3379
3380 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 
3381 do
3382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3384 echo "configure:3385: checking for $ac_hdr" >&5
3385
3386 cat > conftest.$ac_ext <<EOF
3387 #line 3388 "configure"
3388 #include "confdefs.h"
3389 #include <$ac_hdr>
3390 EOF
3391 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3392 { (eval echo configure:3393: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3393 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3394 if test -z "$ac_err"; then
3395   rm -rf conftest*
3396   eval "ac_cv_header_$ac_safe=yes"
3397 else
3398   echo "$ac_err" >&5
3399   echo "configure: failed program was:" >&5
3400   cat conftest.$ac_ext >&5
3401   rm -rf conftest*
3402   eval "ac_cv_header_$ac_safe=no"
3403 fi
3404 rm -f conftest*
3405 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3406   echo "$ac_t""yes" 1>&6
3407     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3408   { test "$extra_verbose" = "yes" && cat << EOF
3409     Defining $ac_tr_hdr
3410 EOF
3411 cat >> confdefs.h <<EOF
3412 #define $ac_tr_hdr 1
3413 EOF
3414 }
3415  
3416 else
3417   echo "$ac_t""no" 1>&6
3418 fi
3419 done
3420
3421 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3422 echo "configure:3423: checking for sys/wait.h that is POSIX.1 compatible" >&5
3423
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <sys/types.h>
3428 #include <sys/wait.h>
3429 #ifndef WEXITSTATUS
3430 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3431 #endif
3432 #ifndef WIFEXITED
3433 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3434 #endif
3435 int main() {
3436 int s;
3437 wait (&s);
3438 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3439 ; return 0; }
3440 EOF
3441 if { (eval echo configure:3442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3442   rm -rf conftest*
3443   ac_cv_header_sys_wait_h=yes
3444 else
3445   echo "configure: failed program was:" >&5
3446   cat conftest.$ac_ext >&5
3447   rm -rf conftest*
3448   ac_cv_header_sys_wait_h=no
3449 fi
3450 rm -f conftest*
3451
3452 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3453 if test $ac_cv_header_sys_wait_h = yes; then
3454   { test "$extra_verbose" = "yes" && cat << \EOF
3455     Defining HAVE_SYS_WAIT_H
3456 EOF
3457 cat >> confdefs.h <<\EOF
3458 #define HAVE_SYS_WAIT_H 1
3459 EOF
3460 }
3461
3462 fi
3463
3464 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3465 echo "configure:3466: checking for ANSI C header files" >&5
3466
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 #include <stdlib.h>
3471 #include <stdarg.h>
3472 #include <string.h>
3473 #include <float.h>
3474 EOF
3475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3476 { (eval echo configure:3477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3478 if test -z "$ac_err"; then
3479   rm -rf conftest*
3480   ac_cv_header_stdc=yes
3481 else
3482   echo "$ac_err" >&5
3483   echo "configure: failed program was:" >&5
3484   cat conftest.$ac_ext >&5
3485   rm -rf conftest*
3486   ac_cv_header_stdc=no
3487 fi
3488 rm -f conftest*
3489
3490 if test $ac_cv_header_stdc = yes; then
3491   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3492 cat > conftest.$ac_ext <<EOF
3493 #line 3494 "configure"
3494 #include "confdefs.h"
3495 #include <string.h>
3496 EOF
3497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3498   egrep "memchr" >/dev/null 2>&1; then
3499   :
3500 else
3501   rm -rf conftest*
3502   ac_cv_header_stdc=no
3503 fi
3504 rm -f conftest*
3505
3506 fi
3507
3508 if test $ac_cv_header_stdc = yes; then
3509   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3513 #include <stdlib.h>
3514 EOF
3515 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3516   egrep "free" >/dev/null 2>&1; then
3517   :
3518 else
3519   rm -rf conftest*
3520   ac_cv_header_stdc=no
3521 fi
3522 rm -f conftest*
3523
3524 fi
3525
3526 if test $ac_cv_header_stdc = yes; then
3527   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3528 cat > conftest.$ac_ext <<EOF
3529 #line 3530 "configure"
3530 #include "confdefs.h"
3531 #include <ctype.h>
3532 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3533 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3534 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3535 int main () { int i; for (i = 0; i < 256; i++)
3536 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3537 exit (0); }
3538
3539 EOF
3540 if { (eval echo configure:3541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3541 then
3542   :
3543 else
3544   conftest_rc="$?"
3545   echo "configure: failed program was:" >&5
3546   cat conftest.$ac_ext >&5
3547   rm -fr conftest*
3548   ac_cv_header_stdc=no
3549 fi
3550 rm -fr conftest*
3551 fi
3552
3553 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3554 if test $ac_cv_header_stdc = yes; then
3555   { test "$extra_verbose" = "yes" && cat << \EOF
3556     Defining STDC_HEADERS
3557 EOF
3558 cat >> confdefs.h <<\EOF
3559 #define STDC_HEADERS 1
3560 EOF
3561 }
3562
3563 fi
3564
3565 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3566 echo "configure:3567: checking whether time.h and sys/time.h may both be included" >&5
3567
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 #include <sys/types.h>
3572 #include <sys/time.h>
3573 #include <time.h>
3574 int main() {
3575 struct tm *tp;
3576 ; return 0; }
3577 EOF
3578 if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3579   rm -rf conftest*
3580   ac_cv_header_time=yes
3581 else
3582   echo "configure: failed program was:" >&5
3583   cat conftest.$ac_ext >&5
3584   rm -rf conftest*
3585   ac_cv_header_time=no
3586 fi
3587 rm -f conftest*
3588
3589 echo "$ac_t""$ac_cv_header_time" 1>&6
3590 if test $ac_cv_header_time = yes; then
3591   { test "$extra_verbose" = "yes" && cat << \EOF
3592     Defining TIME_WITH_SYS_TIME
3593 EOF
3594 cat >> confdefs.h <<\EOF
3595 #define TIME_WITH_SYS_TIME 1
3596 EOF
3597 }
3598
3599 fi
3600
3601 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3602 echo "configure:3603: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3603
3604 cat > conftest.$ac_ext <<EOF
3605 #line 3606 "configure"
3606 #include "confdefs.h"
3607 #include <sys/types.h>
3608 #include <signal.h>
3609 /* NetBSD declares sys_siglist in unistd.h.  */
3610 #ifdef HAVE_UNISTD_H
3611 #include <unistd.h>
3612 #endif
3613 int main() {
3614 char *msg = *(sys_siglist + 1);
3615 ; return 0; }
3616 EOF
3617 if { (eval echo configure:3618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3618   rm -rf conftest*
3619   ac_cv_decl_sys_siglist=yes
3620 else
3621   echo "configure: failed program was:" >&5
3622   cat conftest.$ac_ext >&5
3623   rm -rf conftest*
3624   ac_cv_decl_sys_siglist=no
3625 fi
3626 rm -f conftest*
3627
3628 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3629 if test $ac_cv_decl_sys_siglist = yes; then
3630   { test "$extra_verbose" = "yes" && cat << \EOF
3631     Defining SYS_SIGLIST_DECLARED
3632 EOF
3633 cat >> confdefs.h <<\EOF
3634 #define SYS_SIGLIST_DECLARED 1
3635 EOF
3636 }
3637
3638 fi
3639
3640
3641 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3642 echo "configure:3643: checking for struct utimbuf" >&5
3643 cat > conftest.$ac_ext <<EOF
3644 #line 3645 "configure"
3645 #include "confdefs.h"
3646 #ifdef TIME_WITH_SYS_TIME
3647 #include <sys/time.h>
3648 #include <time.h>
3649 #else
3650 #ifdef HAVE_SYS_TIME_H
3651 #include <sys/time.h>
3652 #else
3653 #include <time.h>
3654 #endif
3655 #endif
3656 #ifdef HAVE_UTIME_H
3657 #include <utime.h>
3658 #endif
3659 int main() {
3660 static struct utimbuf x; x.actime = x.modtime;
3661 ; return 0; }
3662 EOF
3663 if { (eval echo configure:3664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3664   rm -rf conftest*
3665   echo "$ac_t""yes" 1>&6
3666    { test "$extra_verbose" = "yes" && cat << \EOF
3667     Defining HAVE_STRUCT_UTIMBUF
3668 EOF
3669 cat >> confdefs.h <<\EOF
3670 #define HAVE_STRUCT_UTIMBUF 1
3671 EOF
3672 }
3673
3674 else
3675   echo "configure: failed program was:" >&5
3676   cat conftest.$ac_ext >&5
3677   rm -rf conftest*
3678   echo "$ac_t""no" 1>&6
3679 fi
3680 rm -f conftest*
3681
3682 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3683 echo "configure:3684: checking return type of signal handlers" >&5
3684
3685 cat > conftest.$ac_ext <<EOF
3686 #line 3687 "configure"
3687 #include "confdefs.h"
3688 #include <sys/types.h>
3689 #include <signal.h>
3690 #ifdef signal
3691 #undef signal
3692 #endif
3693 #ifdef __cplusplus
3694 extern "C" void (*signal (int, void (*)(int)))(int);
3695 #else
3696 void (*signal ()) ();
3697 #endif
3698
3699 int main() {
3700 int i;
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_type_signal=void
3706 else
3707   echo "configure: failed program was:" >&5
3708   cat conftest.$ac_ext >&5
3709   rm -rf conftest*
3710   ac_cv_type_signal=int
3711 fi
3712 rm -f conftest*
3713
3714 echo "$ac_t""$ac_cv_type_signal" 1>&6
3715 { test "$extra_verbose" = "yes" && cat << EOF
3716     Defining RETSIGTYPE = $ac_cv_type_signal
3717 EOF
3718 cat >> confdefs.h <<EOF
3719 #define RETSIGTYPE $ac_cv_type_signal
3720 EOF
3721 }
3722
3723
3724 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3725 echo "configure:3726: checking for size_t" >&5
3726
3727 cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 #if STDC_HEADERS
3732 #include <stdlib.h>
3733 #include <stddef.h>
3734 #endif
3735 EOF
3736 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3737   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3738   rm -rf conftest*
3739   ac_cv_type_size_t=yes
3740 else
3741   rm -rf conftest*
3742   ac_cv_type_size_t=no
3743 fi
3744 rm -f conftest*
3745
3746 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3747 if test $ac_cv_type_size_t = no; then
3748   { test "$extra_verbose" = "yes" && cat << \EOF
3749     Defining size_t = unsigned
3750 EOF
3751 cat >> confdefs.h <<\EOF
3752 #define size_t unsigned
3753 EOF
3754 }
3755
3756 fi
3757
3758 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3759 echo "configure:3760: checking for pid_t" >&5
3760
3761 cat > conftest.$ac_ext <<EOF
3762 #line 3763 "configure"
3763 #include "confdefs.h"
3764 #include <sys/types.h>
3765 #if STDC_HEADERS
3766 #include <stdlib.h>
3767 #include <stddef.h>
3768 #endif
3769 EOF
3770 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3771   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3772   rm -rf conftest*
3773   ac_cv_type_pid_t=yes
3774 else
3775   rm -rf conftest*
3776   ac_cv_type_pid_t=no
3777 fi
3778 rm -f conftest*
3779
3780 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3781 if test $ac_cv_type_pid_t = no; then
3782   { test "$extra_verbose" = "yes" && cat << \EOF
3783     Defining pid_t = int
3784 EOF
3785 cat >> confdefs.h <<\EOF
3786 #define pid_t int
3787 EOF
3788 }
3789
3790 fi
3791
3792 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3793 echo "configure:3794: checking for uid_t in sys/types.h" >&5
3794
3795 cat > conftest.$ac_ext <<EOF
3796 #line 3797 "configure"
3797 #include "confdefs.h"
3798 #include <sys/types.h>
3799 EOF
3800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3801   egrep "uid_t" >/dev/null 2>&1; then
3802   rm -rf conftest*
3803   ac_cv_type_uid_t=yes
3804 else
3805   rm -rf conftest*
3806   ac_cv_type_uid_t=no
3807 fi
3808 rm -f conftest*
3809
3810
3811 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3812 if test $ac_cv_type_uid_t = no; then
3813   { test "$extra_verbose" = "yes" && cat << \EOF
3814     Defining uid_t = int
3815 EOF
3816 cat >> confdefs.h <<\EOF
3817 #define uid_t int
3818 EOF
3819 }
3820
3821   { test "$extra_verbose" = "yes" && cat << \EOF
3822     Defining gid_t = int
3823 EOF
3824 cat >> confdefs.h <<\EOF
3825 #define gid_t int
3826 EOF
3827 }
3828
3829 fi
3830
3831 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3832 echo "configure:3833: checking for mode_t" >&5
3833
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 #include <sys/types.h>
3838 #if STDC_HEADERS
3839 #include <stdlib.h>
3840 #include <stddef.h>
3841 #endif
3842 EOF
3843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3844   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3845   rm -rf conftest*
3846   ac_cv_type_mode_t=yes
3847 else
3848   rm -rf conftest*
3849   ac_cv_type_mode_t=no
3850 fi
3851 rm -f conftest*
3852
3853 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3854 if test $ac_cv_type_mode_t = no; then
3855   { test "$extra_verbose" = "yes" && cat << \EOF
3856     Defining mode_t = int
3857 EOF
3858 cat >> confdefs.h <<\EOF
3859 #define mode_t int
3860 EOF
3861 }
3862
3863 fi
3864
3865 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3866 echo "configure:3867: checking for off_t" >&5
3867
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <sys/types.h>
3872 #if STDC_HEADERS
3873 #include <stdlib.h>
3874 #include <stddef.h>
3875 #endif
3876 EOF
3877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3878   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3879   rm -rf conftest*
3880   ac_cv_type_off_t=yes
3881 else
3882   rm -rf conftest*
3883   ac_cv_type_off_t=no
3884 fi
3885 rm -f conftest*
3886
3887 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3888 if test $ac_cv_type_off_t = no; then
3889   { test "$extra_verbose" = "yes" && cat << \EOF
3890     Defining off_t = long
3891 EOF
3892 cat >> confdefs.h <<\EOF
3893 #define off_t long
3894 EOF
3895 }
3896
3897 fi
3898
3899 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3900 echo "configure:3901: checking for ssize_t" >&5
3901
3902 cat > conftest.$ac_ext <<EOF
3903 #line 3904 "configure"
3904 #include "confdefs.h"
3905 #include <sys/types.h>
3906 #if STDC_HEADERS
3907 #include <stdlib.h>
3908 #include <stddef.h>
3909 #endif
3910 EOF
3911 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3912   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3913   rm -rf conftest*
3914   ac_cv_type_ssize_t=yes
3915 else
3916   rm -rf conftest*
3917   ac_cv_type_ssize_t=no
3918 fi
3919 rm -f conftest*
3920
3921 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3922 if test $ac_cv_type_ssize_t = no; then
3923   { test "$extra_verbose" = "yes" && cat << \EOF
3924     Defining ssize_t = int
3925 EOF
3926 cat >> confdefs.h <<\EOF
3927 #define ssize_t int
3928 EOF
3929 }
3930
3931 fi
3932
3933
3934 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3935 echo "configure:3936: checking for struct timeval" >&5
3936 cat > conftest.$ac_ext <<EOF
3937 #line 3938 "configure"
3938 #include "confdefs.h"
3939 #ifdef TIME_WITH_SYS_TIME
3940 #include <sys/time.h>
3941 #include <time.h>
3942 #else
3943 #ifdef HAVE_SYS_TIME_H
3944 #include <sys/time.h>
3945 #else
3946 #include <time.h>
3947 #endif
3948 #endif
3949 int main() {
3950 static struct timeval x; x.tv_sec = x.tv_usec;
3951 ; return 0; }
3952 EOF
3953 if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3954   rm -rf conftest*
3955   echo "$ac_t""yes" 1>&6
3956   HAVE_TIMEVAL=yes
3957   { test "$extra_verbose" = "yes" && cat << \EOF
3958     Defining HAVE_TIMEVAL
3959 EOF
3960 cat >> confdefs.h <<\EOF
3961 #define HAVE_TIMEVAL 1
3962 EOF
3963 }
3964
3965 else
3966   echo "configure: failed program was:" >&5
3967   cat conftest.$ac_ext >&5
3968   rm -rf conftest*
3969   echo "$ac_t""no" 1>&6
3970    HAVE_TIMEVAL=no
3971 fi
3972 rm -f conftest*
3973
3974 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3975 echo "configure:3976: checking whether struct tm is in sys/time.h or time.h" >&5
3976
3977 cat > conftest.$ac_ext <<EOF
3978 #line 3979 "configure"
3979 #include "confdefs.h"
3980 #include <sys/types.h>
3981 #include <time.h>
3982 int main() {
3983 struct tm *tp; tp->tm_sec;
3984 ; return 0; }
3985 EOF
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3987   rm -rf conftest*
3988   ac_cv_struct_tm=time.h
3989 else
3990   echo "configure: failed program was:" >&5
3991   cat conftest.$ac_ext >&5
3992   rm -rf conftest*
3993   ac_cv_struct_tm=sys/time.h
3994 fi
3995 rm -f conftest*
3996
3997 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3998 if test $ac_cv_struct_tm = sys/time.h; then
3999   { test "$extra_verbose" = "yes" && cat << \EOF
4000     Defining TM_IN_SYS_TIME
4001 EOF
4002 cat >> confdefs.h <<\EOF
4003 #define TM_IN_SYS_TIME 1
4004 EOF
4005 }
4006
4007 fi
4008
4009 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
4010 echo "configure:4011: checking for tm_zone in struct tm" >&5
4011
4012 cat > conftest.$ac_ext <<EOF
4013 #line 4014 "configure"
4014 #include "confdefs.h"
4015 #include <sys/types.h>
4016 #include <$ac_cv_struct_tm>
4017 int main() {
4018 struct tm tm; tm.tm_zone;
4019 ; return 0; }
4020 EOF
4021 if { (eval echo configure:4022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4022   rm -rf conftest*
4023   ac_cv_struct_tm_zone=yes
4024 else
4025   echo "configure: failed program was:" >&5
4026   cat conftest.$ac_ext >&5
4027   rm -rf conftest*
4028   ac_cv_struct_tm_zone=no
4029 fi
4030 rm -f conftest*
4031
4032 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4033 if test "$ac_cv_struct_tm_zone" = yes; then
4034   { test "$extra_verbose" = "yes" && cat << \EOF
4035     Defining HAVE_TM_ZONE
4036 EOF
4037 cat >> confdefs.h <<\EOF
4038 #define HAVE_TM_ZONE 1
4039 EOF
4040 }
4041
4042 else
4043   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4044 echo "configure:4045: checking for tzname" >&5
4045
4046 cat > conftest.$ac_ext <<EOF
4047 #line 4048 "configure"
4048 #include "confdefs.h"
4049 #include <time.h>
4050 #ifndef tzname /* For SGI.  */
4051 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4052 #endif
4053 int main() {
4054 atoi(*tzname);
4055 ; return 0; }
4056 EOF
4057 if { (eval echo configure:4058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4058   rm -rf conftest*
4059   ac_cv_var_tzname=yes
4060 else
4061   echo "configure: failed program was:" >&5
4062   cat conftest.$ac_ext >&5
4063   rm -rf conftest*
4064   ac_cv_var_tzname=no
4065 fi
4066 rm -f conftest*
4067
4068 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4069   if test $ac_cv_var_tzname = yes; then
4070     { test "$extra_verbose" = "yes" && cat << \EOF
4071     Defining HAVE_TZNAME
4072 EOF
4073 cat >> confdefs.h <<\EOF
4074 #define HAVE_TZNAME 1
4075 EOF
4076 }
4077
4078   fi
4079 fi
4080
4081
4082 echo $ac_n "checking for working const""... $ac_c" 1>&6
4083 echo "configure:4084: checking for working const" >&5
4084
4085 cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 #include "confdefs.h"
4088
4089 int main() {
4090
4091 /* Ultrix mips cc rejects this.  */
4092 typedef int charset[2]; const charset x;
4093 /* SunOS 4.1.1 cc rejects this.  */
4094 char const *const *ccp;
4095 char **p;
4096 /* NEC SVR4.0.2 mips cc rejects this.  */
4097 struct point {int x, y;};
4098 static struct point const zero = {0,0};
4099 /* AIX XL C 1.02.0.0 rejects this.
4100    It does not let you subtract one const X* pointer from another in an arm
4101    of an if-expression whose if-part is not a constant expression */
4102 const char *g = "string";
4103 ccp = &g + (g ? g-g : 0);
4104 /* HPUX 7.0 cc rejects these. */
4105 ++ccp;
4106 p = (char**) ccp;
4107 ccp = (char const *const *) p;
4108 { /* SCO 3.2v4 cc rejects this.  */
4109   char *t;
4110   char const *s = 0 ? (char *) 0 : (char const *) 0;
4111
4112   *t++ = 0;
4113 }
4114 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4115   int x[] = {25, 17};
4116   const int *foo = &x[0];
4117   ++foo;
4118 }
4119 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4120   typedef const int *iptr;
4121   iptr p = 0;
4122   ++p;
4123 }
4124 { /* AIX XL C 1.02.0.0 rejects this saying
4125      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4126   struct s { int j; const int *ap[3]; };
4127   struct s *b; b->j = 5;
4128 }
4129 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4130   const int foo = 10;
4131 }
4132
4133 ; return 0; }
4134 EOF
4135 if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136   rm -rf conftest*
4137   ac_cv_c_const=yes
4138 else
4139   echo "configure: failed program was:" >&5
4140   cat conftest.$ac_ext >&5
4141   rm -rf conftest*
4142   ac_cv_c_const=no
4143 fi
4144 rm -f conftest*
4145
4146 echo "$ac_t""$ac_cv_c_const" 1>&6
4147 if test $ac_cv_c_const = no; then
4148   { test "$extra_verbose" = "yes" && cat << \EOF
4149     Defining const = 
4150 EOF
4151 cat >> confdefs.h <<\EOF
4152 #define const 
4153 EOF
4154 }
4155
4156 fi
4157
4158
4159 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4160 echo "configure:4161: checking whether ${MAKE-make} sets \${MAKE}" >&5
4161 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4162
4163 cat > conftestmake <<\EOF
4164 all:
4165         @echo 'ac_maketemp="${MAKE}"'
4166 EOF
4167 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4168 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4169 if test -n "$ac_maketemp"; then
4170   eval ac_cv_prog_make_${ac_make}_set=yes
4171 else
4172   eval ac_cv_prog_make_${ac_make}_set=no
4173 fi
4174 rm -f conftestmake
4175 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4176   echo "$ac_t""yes" 1>&6
4177   SET_MAKE=
4178 else
4179   echo "$ac_t""no" 1>&6
4180   SET_MAKE="MAKE=${MAKE-make}"
4181 fi
4182
4183
4184 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4185 echo "configure:4186: checking whether byte ordering is bigendian" >&5
4186
4187 ac_cv_c_bigendian=unknown
4188 # See if sys/param.h defines the BYTE_ORDER macro.
4189 cat > conftest.$ac_ext <<EOF
4190 #line 4191 "configure"
4191 #include "confdefs.h"
4192 #include <sys/types.h>
4193 #include <sys/param.h>
4194 int main() {
4195
4196 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4197  bogus endian macros
4198 #endif
4199 ; return 0; }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202   rm -rf conftest*
4203   # It does; now see whether it defined to BIG_ENDIAN or not.
4204 cat > conftest.$ac_ext <<EOF
4205 #line 4206 "configure"
4206 #include "confdefs.h"
4207 #include <sys/types.h>
4208 #include <sys/param.h>
4209 int main() {
4210
4211 #if BYTE_ORDER != BIG_ENDIAN
4212  not big endian
4213 #endif
4214 ; return 0; }
4215 EOF
4216 if { (eval echo configure:4217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4217   rm -rf conftest*
4218   ac_cv_c_bigendian=yes
4219 else
4220   echo "configure: failed program was:" >&5
4221   cat conftest.$ac_ext >&5
4222   rm -rf conftest*
4223   ac_cv_c_bigendian=no
4224 fi
4225 rm -f conftest*
4226 else
4227   echo "configure: failed program was:" >&5
4228   cat conftest.$ac_ext >&5
4229 fi
4230 rm -f conftest*
4231 if test $ac_cv_c_bigendian = unknown; then
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4235 main () {
4236   /* Are we little or big endian?  From Harbison&Steele.  */
4237   union
4238   {
4239     long l;
4240     char c[sizeof (long)];
4241   } u;
4242   u.l = 1;
4243   exit (u.c[sizeof (long) - 1] == 1);
4244 }
4245 EOF
4246 if { (eval echo configure:4247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4247 then
4248   ac_cv_c_bigendian=no
4249 else
4250   conftest_rc="$?"
4251   echo "configure: failed program was:" >&5
4252   cat conftest.$ac_ext >&5
4253   rm -fr conftest*
4254   ac_cv_c_bigendian=yes
4255 fi
4256 rm -fr conftest*
4257 fi
4258
4259 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4260 if test $ac_cv_c_bigendian = yes; then
4261   { test "$extra_verbose" = "yes" && cat << \EOF
4262     Defining WORDS_BIGENDIAN
4263 EOF
4264 cat >> confdefs.h <<\EOF
4265 #define WORDS_BIGENDIAN 1
4266 EOF
4267 }
4268
4269 fi
4270
4271
4272 echo $ac_n "checking size of short""... $ac_c" 1>&6
4273 echo "configure:4274: checking size of short" >&5
4274
4275 cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4278 #include <stdio.h>
4279 main()
4280 {
4281   FILE *f=fopen("conftestval", "w");
4282   if (!f) exit(1);
4283   fprintf(f, "%d\n", sizeof(short));
4284   exit(0);
4285 }
4286 EOF
4287 if { (eval echo configure:4288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4288 then
4289   ac_cv_sizeof_short=`cat conftestval`
4290 else
4291   conftest_rc="$?"
4292   echo "configure: failed program was:" >&5
4293   cat conftest.$ac_ext >&5
4294   rm -fr conftest*
4295   ac_cv_sizeof_short=0
4296 fi
4297 rm -fr conftest*
4298 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4299 { test "$extra_verbose" = "yes" && cat << EOF
4300     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4301 EOF
4302 cat >> confdefs.h <<EOF
4303 #define SIZEOF_SHORT $ac_cv_sizeof_short
4304 EOF
4305 }
4306
4307
4308 if test "$ac_cv_sizeof_short" = 0; then
4309   echo ""
4310   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4311   echo "*** PANIC *** Please examine config.log for compilation errors."
4312   exit 1
4313 fi
4314 echo $ac_n "checking size of int""... $ac_c" 1>&6
4315 echo "configure:4316: checking size of int" >&5
4316
4317 cat > conftest.$ac_ext <<EOF
4318 #line 4319 "configure"
4319 #include "confdefs.h"
4320 #include <stdio.h>
4321 main()
4322 {
4323   FILE *f=fopen("conftestval", "w");
4324   if (!f) exit(1);
4325   fprintf(f, "%d\n", sizeof(int));
4326   exit(0);
4327 }
4328 EOF
4329 if { (eval echo configure:4330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4330 then
4331   ac_cv_sizeof_int=`cat conftestval`
4332 else
4333   conftest_rc="$?"
4334   echo "configure: failed program was:" >&5
4335   cat conftest.$ac_ext >&5
4336   rm -fr conftest*
4337   ac_cv_sizeof_int=0
4338 fi
4339 rm -fr conftest*
4340 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4341 { test "$extra_verbose" = "yes" && cat << EOF
4342     Defining SIZEOF_INT = $ac_cv_sizeof_int
4343 EOF
4344 cat >> confdefs.h <<EOF
4345 #define SIZEOF_INT $ac_cv_sizeof_int
4346 EOF
4347 }
4348
4349
4350 echo $ac_n "checking size of long""... $ac_c" 1>&6
4351 echo "configure:4352: checking size of long" >&5
4352
4353 cat > conftest.$ac_ext <<EOF
4354 #line 4355 "configure"
4355 #include "confdefs.h"
4356 #include <stdio.h>
4357 main()
4358 {
4359   FILE *f=fopen("conftestval", "w");
4360   if (!f) exit(1);
4361   fprintf(f, "%d\n", sizeof(long));
4362   exit(0);
4363 }
4364 EOF
4365 if { (eval echo configure:4366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4366 then
4367   ac_cv_sizeof_long=`cat conftestval`
4368 else
4369   conftest_rc="$?"
4370   echo "configure: failed program was:" >&5
4371   cat conftest.$ac_ext >&5
4372   rm -fr conftest*
4373   ac_cv_sizeof_long=0
4374 fi
4375 rm -fr conftest*
4376 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4377 { test "$extra_verbose" = "yes" && cat << EOF
4378     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4379 EOF
4380 cat >> confdefs.h <<EOF
4381 #define SIZEOF_LONG $ac_cv_sizeof_long
4382 EOF
4383 }
4384
4385
4386 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4387 echo "configure:4388: checking size of long long" >&5
4388
4389 cat > conftest.$ac_ext <<EOF
4390 #line 4391 "configure"
4391 #include "confdefs.h"
4392 #include <stdio.h>
4393 main()
4394 {
4395   FILE *f=fopen("conftestval", "w");
4396   if (!f) exit(1);
4397   fprintf(f, "%d\n", sizeof(long long));
4398   exit(0);
4399 }
4400 EOF
4401 if { (eval echo configure:4402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4402 then
4403   ac_cv_sizeof_long_long=`cat conftestval`
4404 else
4405   conftest_rc="$?"
4406   echo "configure: failed program was:" >&5
4407   cat conftest.$ac_ext >&5
4408   rm -fr conftest*
4409   ac_cv_sizeof_long_long=0
4410 fi
4411 rm -fr conftest*
4412 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4413 { test "$extra_verbose" = "yes" && cat << EOF
4414     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4415 EOF
4416 cat >> confdefs.h <<EOF
4417 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4418 EOF
4419 }
4420
4421
4422 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4423 echo "configure:4424: checking size of void *" >&5
4424
4425 cat > conftest.$ac_ext <<EOF
4426 #line 4427 "configure"
4427 #include "confdefs.h"
4428 #include <stdio.h>
4429 main()
4430 {
4431   FILE *f=fopen("conftestval", "w");
4432   if (!f) exit(1);
4433   fprintf(f, "%d\n", sizeof(void *));
4434   exit(0);
4435 }
4436 EOF
4437 if { (eval echo configure:4438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4438 then
4439   ac_cv_sizeof_void_p=`cat conftestval`
4440 else
4441   conftest_rc="$?"
4442   echo "configure: failed program was:" >&5
4443   cat conftest.$ac_ext >&5
4444   rm -fr conftest*
4445   ac_cv_sizeof_void_p=0
4446 fi
4447 rm -fr conftest*
4448 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4449 { test "$extra_verbose" = "yes" && cat << EOF
4450     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4451 EOF
4452 cat >> confdefs.h <<EOF
4453 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4454 EOF
4455 }
4456
4457
4458
4459 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4460 echo "configure:4461: checking for long file names" >&5
4461
4462 ac_cv_sys_long_file_names=yes
4463 # Test for long file names in all the places we know might matter:
4464 #      .                the current directory, where building will happen
4465 #      $prefix/lib      where we will be installing things
4466 #      $exec_prefix/lib likewise
4467 # eval it to expand exec_prefix.
4468 #      $TMPDIR          if set, where it might want to write temporary files
4469 # if $TMPDIR is not set:
4470 #      /tmp             where it might want to write temporary files
4471 #      /var/tmp         likewise
4472 #      /usr/tmp         likewise
4473 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4474   ac_tmpdirs="$TMPDIR"
4475 else
4476   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4477 fi
4478 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4479   test -d $ac_dir || continue
4480   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4481   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4482   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4483   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4484   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4485     ac_cv_sys_long_file_names=no
4486     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4487     break
4488   fi
4489   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4490 done
4491
4492 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4493 if test $ac_cv_sys_long_file_names = yes; then
4494   { test "$extra_verbose" = "yes" && cat << \EOF
4495     Defining HAVE_LONG_FILE_NAMES
4496 EOF
4497 cat >> confdefs.h <<\EOF
4498 #define HAVE_LONG_FILE_NAMES 1
4499 EOF
4500 }
4501
4502 fi
4503
4504
4505 echo $ac_n "checking for sin""... $ac_c" 1>&6
4506 echo "configure:4507: checking for sin" >&5
4507
4508 cat > conftest.$ac_ext <<EOF
4509 #line 4510 "configure"
4510 #include "confdefs.h"
4511 /* System header to define __stub macros and hopefully few prototypes,
4512     which can conflict with char sin(); below.  */
4513 #include <assert.h>
4514 /* Override any gcc2 internal prototype to avoid an error.  */
4515 /* We use char because int might match the return type of a gcc2
4516     builtin and then its argument prototype would still apply.  */
4517 char sin();
4518
4519 int main() {
4520
4521 /* The GNU C library defines this for functions which it implements
4522     to always fail with ENOSYS.  Some functions are actually named
4523     something starting with __ and the normal name is an alias.  */
4524 #if defined (__stub_sin) || defined (__stub___sin)
4525 choke me
4526 #else
4527 sin();
4528 #endif
4529
4530 ; return 0; }
4531 EOF
4532 if { (eval echo configure:4533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533   rm -rf conftest*
4534   eval "ac_cv_func_sin=yes"
4535 else
4536   echo "configure: failed program was:" >&5
4537   cat conftest.$ac_ext >&5
4538   rm -rf conftest*
4539   eval "ac_cv_func_sin=no"
4540 fi
4541 rm -f conftest*
4542
4543 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4544   echo "$ac_t""yes" 1>&6
4545   :
4546 else
4547   echo "$ac_t""no" 1>&6
4548
4549 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4550 echo "configure:4551: checking for sin in -lm" >&5
4551 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4552
4553 xe_check_libs=" -lm "
4554 cat > conftest.$ac_ext <<EOF
4555 #line 4556 "configure"
4556 #include "confdefs.h"
4557 /* Override any gcc2 internal prototype to avoid an error.  */
4558 /* We use char because int might match the return type of a gcc2
4559     builtin and then its argument prototype would still apply.  */
4560 char sin();
4561
4562 int main() {
4563 sin()
4564 ; return 0; }
4565 EOF
4566 if { (eval echo configure:4567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4567   rm -rf conftest*
4568   eval "ac_cv_lib_$ac_lib_var=yes"
4569 else
4570   echo "configure: failed program was:" >&5
4571   cat conftest.$ac_ext >&5
4572   rm -rf conftest*
4573   eval "ac_cv_lib_$ac_lib_var=no"
4574 fi
4575 rm -f conftest*
4576 xe_check_libs=""
4577
4578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4579   echo "$ac_t""yes" 1>&6
4580     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4581     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4582   { test "$extra_verbose" = "yes" && cat << EOF
4583     Defining $ac_tr_lib
4584 EOF
4585 cat >> confdefs.h <<EOF
4586 #define $ac_tr_lib 1
4587 EOF
4588 }
4589
4590   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4591
4592 else
4593   echo "$ac_t""no" 1>&6
4594 fi
4595
4596
4597 fi
4598
4599
4600 { test "$extra_verbose" = "yes" && cat << \EOF
4601     Defining LISP_FLOAT_TYPE
4602 EOF
4603 cat >> confdefs.h <<\EOF
4604 #define LISP_FLOAT_TYPE 1
4605 EOF
4606 }
4607
4608
4609 cat > conftest.$ac_ext <<EOF
4610 #line 4611 "configure"
4611 #include "confdefs.h"
4612 #include <math.h>
4613 int main() {
4614 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4615 ; return 0; }
4616 EOF
4617 if { (eval echo configure:4618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4618   rm -rf conftest*
4619   { test "$extra_verbose" = "yes" && cat << \EOF
4620     Defining HAVE_INVERSE_HYPERBOLIC
4621 EOF
4622 cat >> confdefs.h <<\EOF
4623 #define HAVE_INVERSE_HYPERBOLIC 1
4624 EOF
4625 }
4626
4627 else
4628   echo "configure: failed program was:" >&5
4629   cat conftest.$ac_ext >&5
4630 fi
4631 rm -f conftest*
4632
4633 echo "checking type of mail spool file locking" 1>&6
4634 echo "configure:4635: checking type of mail spool file locking" >&5
4635 for ac_func in lockf flock
4636 do
4637 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4638 echo "configure:4639: checking for $ac_func" >&5
4639
4640 cat > conftest.$ac_ext <<EOF
4641 #line 4642 "configure"
4642 #include "confdefs.h"
4643 /* System header to define __stub macros and hopefully few prototypes,
4644     which can conflict with char $ac_func(); below.  */
4645 #include <assert.h>
4646 /* Override any gcc2 internal prototype to avoid an error.  */
4647 /* We use char because int might match the return type of a gcc2
4648     builtin and then its argument prototype would still apply.  */
4649 char $ac_func();
4650
4651 int main() {
4652
4653 /* The GNU C library defines this for functions which it implements
4654     to always fail with ENOSYS.  Some functions are actually named
4655     something starting with __ and the normal name is an alias.  */
4656 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4657 choke me
4658 #else
4659 $ac_func();
4660 #endif
4661
4662 ; return 0; }
4663 EOF
4664 if { (eval echo configure:4665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4665   rm -rf conftest*
4666   eval "ac_cv_func_$ac_func=yes"
4667 else
4668   echo "configure: failed program was:" >&5
4669   cat conftest.$ac_ext >&5
4670   rm -rf conftest*
4671   eval "ac_cv_func_$ac_func=no"
4672 fi
4673 rm -f conftest*
4674
4675 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4676   echo "$ac_t""yes" 1>&6
4677     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4678   { test "$extra_verbose" = "yes" && cat << EOF
4679     Defining $ac_tr_func
4680 EOF
4681 cat >> confdefs.h <<EOF
4682 #define $ac_tr_func 1
4683 EOF
4684 }
4685  
4686 else
4687   echo "$ac_t""no" 1>&6
4688 fi
4689 done
4690
4691 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4692 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4693 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4694 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4695     Defining MAIL_LOCK_LOCKF
4696 EOF
4697 cat >> confdefs.h <<\EOF
4698 #define MAIL_LOCK_LOCKF 1
4699 EOF
4700 }
4701
4702 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4703     Defining MAIL_LOCK_FLOCK
4704 EOF
4705 cat >> confdefs.h <<\EOF
4706 #define MAIL_LOCK_FLOCK 1
4707 EOF
4708 }
4709
4710 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4711     Defining MAIL_LOCK_LOCKING
4712 EOF
4713 cat >> confdefs.h <<\EOF
4714 #define MAIL_LOCK_LOCKING 1
4715 EOF
4716 }
4717
4718 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4719     Defining MAIL_LOCK_DOT
4720 EOF
4721 cat >> confdefs.h <<\EOF
4722 #define MAIL_LOCK_DOT 1
4723 EOF
4724 }
4725
4726 fi
4727 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4728   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4729 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4730   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4731 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4732   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4733
4734 case "$opsys" in decosf*)
4735   
4736 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4737 echo "configure:4738: checking for cma_open in -lpthreads" >&5
4738 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4739
4740 xe_check_libs=" -lpthreads "
4741 cat > conftest.$ac_ext <<EOF
4742 #line 4743 "configure"
4743 #include "confdefs.h"
4744 /* Override any gcc2 internal prototype to avoid an error.  */
4745 /* We use char because int might match the return type of a gcc2
4746     builtin and then its argument prototype would still apply.  */
4747 char cma_open();
4748
4749 int main() {
4750 cma_open()
4751 ; return 0; }
4752 EOF
4753 if { (eval echo configure:4754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754   rm -rf conftest*
4755   eval "ac_cv_lib_$ac_lib_var=yes"
4756 else
4757   echo "configure: failed program was:" >&5
4758   cat conftest.$ac_ext >&5
4759   rm -rf conftest*
4760   eval "ac_cv_lib_$ac_lib_var=no"
4761 fi
4762 rm -f conftest*
4763 xe_check_libs=""
4764
4765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4766   echo "$ac_t""yes" 1>&6
4767     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4768     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4769   { test "$extra_verbose" = "yes" && cat << EOF
4770     Defining $ac_tr_lib
4771 EOF
4772 cat >> confdefs.h <<EOF
4773 #define $ac_tr_lib 1
4774 EOF
4775 }
4776
4777   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4778
4779 else
4780   echo "$ac_t""no" 1>&6
4781 fi
4782
4783
4784   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4785     c_switch_site="$c_switch_site -threads" ;;
4786 esac
4787
4788 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4789 echo "configure:4790: checking whether the -xildoff compiler flag is required" >&5
4790 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4791   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4792     then echo "$ac_t""no" 1>&6;
4793     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
4794   fi
4795   else echo "$ac_t""no" 1>&6
4796 fi
4797
4798 if test "$opsys" = "sol2"; then
4799   if test "$os_release" -ge 56; then
4800     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4801 echo "configure:4802: checking for \"-z ignore\" linker flag" >&5
4802     case "`ld -h 2>&1`" in
4803       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4804         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4805       *) echo "$ac_t""no" 1>&6 ;;
4806     esac
4807   fi
4808 fi
4809
4810
4811 echo "checking "for specified window system"" 1>&6
4812 echo "configure:4813: checking "for specified window system"" >&5
4813
4814 if test "$with_x11" != "no"; then
4815     test "$x_includes $x_libraries" != "NONE NONE" && \
4816    window_system=x11 with_x11=yes
4817
4818         
4819       if test "$x_includes $x_libraries" = "NONE NONE" \
4820     -a -n "$OPENWINHOME" \
4821     -a "$OPENWINHOME" != "/usr/openwin" \
4822     -a -d "$OPENWINHOME"; then
4823       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4824       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4825       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4826   fi
4827
4828   if test "$x_includes" = "NONE"; then
4829                     for dir in "/usr/X11" "/usr/X11R6"; do
4830       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4831     done
4832   fi
4833
4834   if test "$x_libraries" = "NONE"; then
4835     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4836       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4837     done
4838   fi
4839
4840   # If we find X, set shell vars x_includes and x_libraries to the
4841 # paths, otherwise set no_x=yes.
4842 # Uses ac_ vars as temps to allow command line to override cache and checks.
4843 # --without-x overrides everything else, but does not touch the cache.
4844 echo $ac_n "checking for X""... $ac_c" 1>&6
4845 echo "configure:4846: checking for X" >&5
4846
4847 # Check whether --with-x or --without-x was given.
4848 if test "${with_x+set}" = set; then
4849   withval="$with_x"
4850   :
4851 fi
4852
4853 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4854 if test "x$with_x" = xno; then
4855   # The user explicitly disabled X.
4856   have_x=disabled
4857 else
4858   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4859     # Both variables are already set.
4860     have_x=yes
4861   else
4862
4863 # One or both of the vars are not set, and there is no cached value.
4864 ac_x_includes=NO ac_x_libraries=NO
4865 rm -fr conftestdir
4866 if mkdir conftestdir; then
4867   cd conftestdir
4868   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4869   cat > Imakefile <<'EOF'
4870 acfindx:
4871         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4872 EOF
4873   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4874     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4875     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4876     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4877     for ac_extension in a so sl; do
4878       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4879         test -f $ac_im_libdir/libX11.$ac_extension; then
4880         ac_im_usrlibdir=$ac_im_libdir; break
4881       fi
4882     done
4883     # Screen out bogus values from the imake configuration.  They are
4884     # bogus both because they are the default anyway, and because
4885     # using them would break gcc on systems where it needs fixed includes.
4886     case "$ac_im_incroot" in
4887         /usr/include) ;;
4888         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4889     esac
4890     case "$ac_im_usrlibdir" in
4891         /usr/lib | /lib) ;;
4892         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4893     esac
4894   fi
4895   cd ..
4896   rm -fr conftestdir
4897 fi
4898
4899 if test "$ac_x_includes" = NO; then
4900   # Guess where to find include files, by looking for this one X11 .h file.
4901   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4902
4903   # First, try using that file with no special directory specified.
4904 cat > conftest.$ac_ext <<EOF
4905 #line 4906 "configure"
4906 #include "confdefs.h"
4907 #include <$x_direct_test_include>
4908 EOF
4909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4910 { (eval echo configure:4911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4912 if test -z "$ac_err"; then
4913   rm -rf conftest*
4914   # We can compile using X headers with no special include directory.
4915 ac_x_includes=
4916 else
4917   echo "$ac_err" >&5
4918   echo "configure: failed program was:" >&5
4919   cat conftest.$ac_ext >&5
4920   rm -rf conftest*
4921   # Look for the header file in a standard set of common directories.
4922 # Check X11 before X11Rn because it is often a symlink to the current release.
4923   for ac_dir in               \
4924     /usr/X11/include          \
4925     /usr/X11R6/include        \
4926     /usr/X11R5/include        \
4927     /usr/X11R4/include        \
4928                               \
4929     /usr/include/X11          \
4930     /usr/include/X11R6        \
4931     /usr/include/X11R5        \
4932     /usr/include/X11R4        \
4933                               \
4934     /usr/local/X11/include    \
4935     /usr/local/X11R6/include  \
4936     /usr/local/X11R5/include  \
4937     /usr/local/X11R4/include  \
4938                               \
4939     /usr/local/include/X11    \
4940     /usr/local/include/X11R6  \
4941     /usr/local/include/X11R5  \
4942     /usr/local/include/X11R4  \
4943                               \
4944     /usr/X386/include         \
4945     /usr/x386/include         \
4946     /usr/XFree86/include/X11  \
4947                               \
4948     /usr/include              \
4949     /usr/local/include        \
4950     /usr/unsupported/include  \
4951     /usr/athena/include       \
4952     /usr/local/x11r5/include  \
4953     /usr/lpp/Xamples/include  \
4954                               \
4955     /usr/openwin/include      \
4956     /usr/openwin/share/include \
4957     ; \
4958   do
4959     if test -r "$ac_dir/$x_direct_test_include"; then
4960       ac_x_includes=$ac_dir
4961       break
4962     fi
4963   done
4964 fi
4965 rm -f conftest*
4966 fi # $ac_x_includes = NO
4967
4968 if test "$ac_x_libraries" = NO; then
4969   # Check for the libraries.
4970
4971   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4972   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4973
4974   # See if we find them without any special options.
4975   # Don't add to $LIBS permanently.
4976   ac_save_LIBS="$LIBS"
4977   LIBS="-l$x_direct_test_library $LIBS"
4978 cat > conftest.$ac_ext <<EOF
4979 #line 4980 "configure"
4980 #include "confdefs.h"
4981
4982 int main() {
4983 ${x_direct_test_function}()
4984 ; return 0; }
4985 EOF
4986 if { (eval echo configure:4987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4987   rm -rf conftest*
4988   LIBS="$ac_save_LIBS"
4989 # We can link X programs with no special library path.
4990 ac_x_libraries=
4991 else
4992   echo "configure: failed program was:" >&5
4993   cat conftest.$ac_ext >&5
4994   rm -rf conftest*
4995   LIBS="$ac_save_LIBS"
4996 # First see if replacing the include by lib works.
4997 # Check X11 before X11Rn because it is often a symlink to the current release.
4998 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4999     /usr/X11/lib          \
5000     /usr/X11R6/lib        \
5001     /usr/X11R5/lib        \
5002     /usr/X11R4/lib        \
5003                           \
5004     /usr/lib/X11          \
5005     /usr/lib/X11R6        \
5006     /usr/lib/X11R5        \
5007     /usr/lib/X11R4        \
5008                           \
5009     /usr/local/X11/lib    \
5010     /usr/local/X11R6/lib  \
5011     /usr/local/X11R5/lib  \
5012     /usr/local/X11R4/lib  \
5013                           \
5014     /usr/local/lib/X11    \
5015     /usr/local/lib/X11R6  \
5016     /usr/local/lib/X11R5  \
5017     /usr/local/lib/X11R4  \
5018                           \
5019     /usr/X386/lib         \
5020     /usr/x386/lib         \
5021     /usr/XFree86/lib/X11  \
5022                           \
5023     /usr/lib              \
5024     /usr/local/lib        \
5025     /usr/unsupported/lib  \
5026     /usr/athena/lib       \
5027     /usr/local/x11r5/lib  \
5028     /usr/lpp/Xamples/lib  \
5029     /lib/usr/lib/X11      \
5030                           \
5031     /usr/openwin/lib      \
5032     /usr/openwin/share/lib \
5033     ; \
5034 do
5035   for ac_extension in a so sl; do
5036     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5037       ac_x_libraries=$ac_dir
5038       break 2
5039     fi
5040   done
5041 done
5042 fi
5043 rm -f conftest*
5044 fi # $ac_x_libraries = NO
5045
5046 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5047   # Didn't find X anywhere.  Cache the known absence of X.
5048   ac_cv_have_x="have_x=no"
5049 else
5050   # Record where we found X for the cache.
5051   ac_cv_have_x="have_x=yes \
5052                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5053 fi
5054   fi
5055   eval "$ac_cv_have_x"
5056 fi # $with_x != no
5057
5058 if test "$have_x" != yes; then
5059   echo "$ac_t""$have_x" 1>&6
5060   no_x=yes
5061 else
5062   # If each of the values was on the command line, it overrides each guess.
5063   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5064   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5065   # Update the cache value to reflect the command line values.
5066   ac_cv_have_x="have_x=yes \
5067                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5068   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5069 fi
5070
5071 if test "$no_x" = yes; then
5072   # Not all programs may use this symbol, but it does not hurt to define it.
5073   { test "$extra_verbose" = "yes" && cat << \EOF
5074     Defining X_DISPLAY_MISSING
5075 EOF
5076 cat >> confdefs.h <<\EOF
5077 #define X_DISPLAY_MISSING 1
5078 EOF
5079 }
5080
5081   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5082 else
5083   if test -n "$x_includes"; then
5084     X_CFLAGS="$X_CFLAGS -I$x_includes"
5085   fi
5086
5087   # It would also be nice to do this for all -L options, not just this one.
5088   if test -n "$x_libraries"; then
5089     X_LIBS="$X_LIBS -L$x_libraries"
5090     # For Solaris; some versions of Sun CC require a space after -R and
5091     # others require no space.  Words are not sufficient . . . .
5092     case "`(uname -sr) 2>/dev/null`" in
5093     "SunOS 5"*)
5094       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5095 echo "configure:5096: checking whether -R must be followed by a space" >&5
5096       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5097       cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100
5101 int main() {
5102
5103 ; return 0; }
5104 EOF
5105 if { (eval echo configure:5106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5106   rm -rf conftest*
5107   ac_R_nospace=yes
5108 else
5109   echo "configure: failed program was:" >&5
5110   cat conftest.$ac_ext >&5
5111   rm -rf conftest*
5112   ac_R_nospace=no
5113 fi
5114 rm -f conftest*
5115       if test $ac_R_nospace = yes; then
5116         echo "$ac_t""no" 1>&6
5117         X_LIBS="$X_LIBS -R$x_libraries"
5118       else
5119         LIBS="$ac_xsave_LIBS -R $x_libraries"
5120         cat > conftest.$ac_ext <<EOF
5121 #line 5122 "configure"
5122 #include "confdefs.h"
5123
5124 int main() {
5125
5126 ; return 0; }
5127 EOF
5128 if { (eval echo configure:5129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5129   rm -rf conftest*
5130   ac_R_space=yes
5131 else
5132   echo "configure: failed program was:" >&5
5133   cat conftest.$ac_ext >&5
5134   rm -rf conftest*
5135   ac_R_space=no
5136 fi
5137 rm -f conftest*
5138         if test $ac_R_space = yes; then
5139           echo "$ac_t""yes" 1>&6
5140           X_LIBS="$X_LIBS -R $x_libraries"
5141         else
5142           echo "$ac_t""neither works" 1>&6
5143         fi
5144       fi
5145       LIBS="$ac_xsave_LIBS"
5146     esac
5147   fi
5148
5149   # Check for system-dependent libraries X programs must link with.
5150   # Do this before checking for the system-independent R6 libraries
5151   # (-lICE), since we may need -lsocket or whatever for X linking.
5152
5153   if test "$ISC" = yes; then
5154     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5155   else
5156     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5157     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5158     # the Alpha needs dnet_stub (dnet does not exist).
5159     if test "$with_dnet" = "no" ; then
5160 ac_cv_lib_dnet_dnet_ntoa=no
5161 else
5162
5163 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5164 echo "configure:5165: checking for dnet_ntoa in -ldnet" >&5
5165 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5166
5167 xe_check_libs=" -ldnet "
5168 cat > conftest.$ac_ext <<EOF
5169 #line 5170 "configure"
5170 #include "confdefs.h"
5171 /* Override any gcc2 internal prototype to avoid an error.  */
5172 /* We use char because int might match the return type of a gcc2
5173     builtin and then its argument prototype would still apply.  */
5174 char dnet_ntoa();
5175
5176 int main() {
5177 dnet_ntoa()
5178 ; return 0; }
5179 EOF
5180 if { (eval echo configure:5181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5181   rm -rf conftest*
5182   eval "ac_cv_lib_$ac_lib_var=yes"
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186   rm -rf conftest*
5187   eval "ac_cv_lib_$ac_lib_var=no"
5188 fi
5189 rm -f conftest*
5190 xe_check_libs=""
5191
5192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5193   echo "$ac_t""yes" 1>&6
5194   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5195 else
5196   echo "$ac_t""no" 1>&6
5197 fi
5198
5199 fi
5200
5201     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5202       
5203 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5204 echo "configure:5205: checking for dnet_ntoa in -ldnet_stub" >&5
5205 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5206
5207 xe_check_libs=" -ldnet_stub "
5208 cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211 /* Override any gcc2 internal prototype to avoid an error.  */
5212 /* We use char because int might match the return type of a gcc2
5213     builtin and then its argument prototype would still apply.  */
5214 char dnet_ntoa();
5215
5216 int main() {
5217 dnet_ntoa()
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_lib_$ac_lib_var=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_lib_$ac_lib_var=no"
5228 fi
5229 rm -f conftest*
5230 xe_check_libs=""
5231
5232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5233   echo "$ac_t""yes" 1>&6
5234   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5235 else
5236   echo "$ac_t""no" 1>&6
5237 fi
5238
5239
5240     fi
5241
5242     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5243     # to get the SysV transport functions.
5244     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5245     # needs -lnsl.
5246     # The nsl library prevents programs from opening the X display
5247     # on Irix 5.2, according to dickey@clark.net.
5248     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5249 echo "configure:5250: checking for gethostbyname" >&5
5250
5251 cat > conftest.$ac_ext <<EOF
5252 #line 5253 "configure"
5253 #include "confdefs.h"
5254 /* System header to define __stub macros and hopefully few prototypes,
5255     which can conflict with char gethostbyname(); below.  */
5256 #include <assert.h>
5257 /* Override any gcc2 internal prototype to avoid an error.  */
5258 /* We use char because int might match the return type of a gcc2
5259     builtin and then its argument prototype would still apply.  */
5260 char gethostbyname();
5261
5262 int main() {
5263
5264 /* The GNU C library defines this for functions which it implements
5265     to always fail with ENOSYS.  Some functions are actually named
5266     something starting with __ and the normal name is an alias.  */
5267 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5268 choke me
5269 #else
5270 gethostbyname();
5271 #endif
5272
5273 ; return 0; }
5274 EOF
5275 if { (eval echo configure:5276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5276   rm -rf conftest*
5277   eval "ac_cv_func_gethostbyname=yes"
5278 else
5279   echo "configure: failed program was:" >&5
5280   cat conftest.$ac_ext >&5
5281   rm -rf conftest*
5282   eval "ac_cv_func_gethostbyname=no"
5283 fi
5284 rm -f conftest*
5285
5286 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5287   echo "$ac_t""yes" 1>&6
5288   :
5289 else
5290   echo "$ac_t""no" 1>&6
5291 fi
5292
5293     if test $ac_cv_func_gethostbyname = no; then
5294       
5295 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5296 echo "configure:5297: checking for gethostbyname in -lnsl" >&5
5297 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5298
5299 xe_check_libs=" -lnsl "
5300 cat > conftest.$ac_ext <<EOF
5301 #line 5302 "configure"
5302 #include "confdefs.h"
5303 /* Override any gcc2 internal prototype to avoid an error.  */
5304 /* We use char because int might match the return type of a gcc2
5305     builtin and then its argument prototype would still apply.  */
5306 char gethostbyname();
5307
5308 int main() {
5309 gethostbyname()
5310 ; return 0; }
5311 EOF
5312 if { (eval echo configure:5313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5313   rm -rf conftest*
5314   eval "ac_cv_lib_$ac_lib_var=yes"
5315 else
5316   echo "configure: failed program was:" >&5
5317   cat conftest.$ac_ext >&5
5318   rm -rf conftest*
5319   eval "ac_cv_lib_$ac_lib_var=no"
5320 fi
5321 rm -f conftest*
5322 xe_check_libs=""
5323
5324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5325   echo "$ac_t""yes" 1>&6
5326   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5327 else
5328   echo "$ac_t""no" 1>&6
5329 fi
5330
5331
5332     fi
5333
5334     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5335     # socket/setsockopt and other routines are undefined under SCO ODT
5336     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5337     # on later versions), says simon@lia.di.epfl.ch: it contains
5338     # gethostby* variants that don't use the nameserver (or something).
5339     # -lsocket must be given before -lnsl if both are needed.
5340     # We assume that if connect needs -lnsl, so does gethostbyname.
5341     echo $ac_n "checking for connect""... $ac_c" 1>&6
5342 echo "configure:5343: checking for connect" >&5
5343
5344 cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5347 /* System header to define __stub macros and hopefully few prototypes,
5348     which can conflict with char connect(); below.  */
5349 #include <assert.h>
5350 /* Override any gcc2 internal prototype to avoid an error.  */
5351 /* We use char because int might match the return type of a gcc2
5352     builtin and then its argument prototype would still apply.  */
5353 char connect();
5354
5355 int main() {
5356
5357 /* The GNU C library defines this for functions which it implements
5358     to always fail with ENOSYS.  Some functions are actually named
5359     something starting with __ and the normal name is an alias.  */
5360 #if defined (__stub_connect) || defined (__stub___connect)
5361 choke me
5362 #else
5363 connect();
5364 #endif
5365
5366 ; return 0; }
5367 EOF
5368 if { (eval echo configure:5369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5369   rm -rf conftest*
5370   eval "ac_cv_func_connect=yes"
5371 else
5372   echo "configure: failed program was:" >&5
5373   cat conftest.$ac_ext >&5
5374   rm -rf conftest*
5375   eval "ac_cv_func_connect=no"
5376 fi
5377 rm -f conftest*
5378
5379 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5380   echo "$ac_t""yes" 1>&6
5381   :
5382 else
5383   echo "$ac_t""no" 1>&6
5384 fi
5385
5386     if test $ac_cv_func_connect = no; then
5387       
5388 xe_msg_checking="for connect in -lsocket"
5389 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5390 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5391 echo "configure:5392: checking "$xe_msg_checking"" >&5
5392 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5393
5394 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5395 cat > conftest.$ac_ext <<EOF
5396 #line 5397 "configure"
5397 #include "confdefs.h"
5398 /* Override any gcc2 internal prototype to avoid an error.  */
5399 /* We use char because int might match the return type of a gcc2
5400     builtin and then its argument prototype would still apply.  */
5401 char connect();
5402
5403 int main() {
5404 connect()
5405 ; return 0; }
5406 EOF
5407 if { (eval echo configure:5408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5408   rm -rf conftest*
5409   eval "ac_cv_lib_$ac_lib_var=yes"
5410 else
5411   echo "configure: failed program was:" >&5
5412   cat conftest.$ac_ext >&5
5413   rm -rf conftest*
5414   eval "ac_cv_lib_$ac_lib_var=no"
5415 fi
5416 rm -f conftest*
5417 xe_check_libs=""
5418
5419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5420   echo "$ac_t""yes" 1>&6
5421   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5422 else
5423   echo "$ac_t""no" 1>&6
5424 fi
5425
5426
5427     fi
5428
5429     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5430     echo $ac_n "checking for remove""... $ac_c" 1>&6
5431 echo "configure:5432: checking for remove" >&5
5432
5433 cat > conftest.$ac_ext <<EOF
5434 #line 5435 "configure"
5435 #include "confdefs.h"
5436 /* System header to define __stub macros and hopefully few prototypes,
5437     which can conflict with char remove(); below.  */
5438 #include <assert.h>
5439 /* Override any gcc2 internal prototype to avoid an error.  */
5440 /* We use char because int might match the return type of a gcc2
5441     builtin and then its argument prototype would still apply.  */
5442 char remove();
5443
5444 int main() {
5445
5446 /* The GNU C library defines this for functions which it implements
5447     to always fail with ENOSYS.  Some functions are actually named
5448     something starting with __ and the normal name is an alias.  */
5449 #if defined (__stub_remove) || defined (__stub___remove)
5450 choke me
5451 #else
5452 remove();
5453 #endif
5454
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5458   rm -rf conftest*
5459   eval "ac_cv_func_remove=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_func_remove=no"
5465 fi
5466 rm -f conftest*
5467
5468 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5469   echo "$ac_t""yes" 1>&6
5470   :
5471 else
5472   echo "$ac_t""no" 1>&6
5473 fi
5474
5475     if test $ac_cv_func_remove = no; then
5476       
5477 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5478 echo "configure:5479: checking for remove in -lposix" >&5
5479 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5480
5481 xe_check_libs=" -lposix "
5482 cat > conftest.$ac_ext <<EOF
5483 #line 5484 "configure"
5484 #include "confdefs.h"
5485 /* Override any gcc2 internal prototype to avoid an error.  */
5486 /* We use char because int might match the return type of a gcc2
5487     builtin and then its argument prototype would still apply.  */
5488 char remove();
5489
5490 int main() {
5491 remove()
5492 ; return 0; }
5493 EOF
5494 if { (eval echo configure:5495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5495   rm -rf conftest*
5496   eval "ac_cv_lib_$ac_lib_var=yes"
5497 else
5498   echo "configure: failed program was:" >&5
5499   cat conftest.$ac_ext >&5
5500   rm -rf conftest*
5501   eval "ac_cv_lib_$ac_lib_var=no"
5502 fi
5503 rm -f conftest*
5504 xe_check_libs=""
5505
5506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5507   echo "$ac_t""yes" 1>&6
5508   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5509 else
5510   echo "$ac_t""no" 1>&6
5511 fi
5512
5513
5514     fi
5515
5516     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5517     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5518 echo "configure:5519: checking for shmat" >&5
5519
5520 cat > conftest.$ac_ext <<EOF
5521 #line 5522 "configure"
5522 #include "confdefs.h"
5523 /* System header to define __stub macros and hopefully few prototypes,
5524     which can conflict with char shmat(); below.  */
5525 #include <assert.h>
5526 /* Override any gcc2 internal prototype to avoid an error.  */
5527 /* We use char because int might match the return type of a gcc2
5528     builtin and then its argument prototype would still apply.  */
5529 char shmat();
5530
5531 int main() {
5532
5533 /* The GNU C library defines this for functions which it implements
5534     to always fail with ENOSYS.  Some functions are actually named
5535     something starting with __ and the normal name is an alias.  */
5536 #if defined (__stub_shmat) || defined (__stub___shmat)
5537 choke me
5538 #else
5539 shmat();
5540 #endif
5541
5542 ; return 0; }
5543 EOF
5544 if { (eval echo configure:5545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5545   rm -rf conftest*
5546   eval "ac_cv_func_shmat=yes"
5547 else
5548   echo "configure: failed program was:" >&5
5549   cat conftest.$ac_ext >&5
5550   rm -rf conftest*
5551   eval "ac_cv_func_shmat=no"
5552 fi
5553 rm -f conftest*
5554
5555 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5556   echo "$ac_t""yes" 1>&6
5557   :
5558 else
5559   echo "$ac_t""no" 1>&6
5560 fi
5561
5562     if test $ac_cv_func_shmat = no; then
5563       
5564 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5565 echo "configure:5566: checking for shmat in -lipc" >&5
5566 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5567
5568 xe_check_libs=" -lipc "
5569 cat > conftest.$ac_ext <<EOF
5570 #line 5571 "configure"
5571 #include "confdefs.h"
5572 /* Override any gcc2 internal prototype to avoid an error.  */
5573 /* We use char because int might match the return type of a gcc2
5574     builtin and then its argument prototype would still apply.  */
5575 char shmat();
5576
5577 int main() {
5578 shmat()
5579 ; return 0; }
5580 EOF
5581 if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5582   rm -rf conftest*
5583   eval "ac_cv_lib_$ac_lib_var=yes"
5584 else
5585   echo "configure: failed program was:" >&5
5586   cat conftest.$ac_ext >&5
5587   rm -rf conftest*
5588   eval "ac_cv_lib_$ac_lib_var=no"
5589 fi
5590 rm -f conftest*
5591 xe_check_libs=""
5592
5593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5594   echo "$ac_t""yes" 1>&6
5595   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5596 else
5597   echo "$ac_t""no" 1>&6
5598 fi
5599
5600
5601     fi
5602   fi
5603
5604   # Check for libraries that X11R6 Xt/Xaw programs need.
5605   ac_save_LDFLAGS="$LDFLAGS"
5606   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5607   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5608   # check for ICE first), but we must link in the order -lSM -lICE or
5609   # we get undefined symbols.  So assume we have SM if we have ICE.
5610   # These have to be linked with before -lX11, unlike the other
5611   # libraries we check for below, so use a different variable.
5612   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5613   
5614 xe_msg_checking="for IceConnectionNumber in -lICE"
5615 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5616 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5617 echo "configure:5618: checking "$xe_msg_checking"" >&5
5618 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5619
5620 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5621 cat > conftest.$ac_ext <<EOF
5622 #line 5623 "configure"
5623 #include "confdefs.h"
5624 /* Override any gcc2 internal prototype to avoid an error.  */
5625 /* We use char because int might match the return type of a gcc2
5626     builtin and then its argument prototype would still apply.  */
5627 char IceConnectionNumber();
5628
5629 int main() {
5630 IceConnectionNumber()
5631 ; return 0; }
5632 EOF
5633 if { (eval echo configure:5634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5634   rm -rf conftest*
5635   eval "ac_cv_lib_$ac_lib_var=yes"
5636 else
5637   echo "configure: failed program was:" >&5
5638   cat conftest.$ac_ext >&5
5639   rm -rf conftest*
5640   eval "ac_cv_lib_$ac_lib_var=no"
5641 fi
5642 rm -f conftest*
5643 xe_check_libs=""
5644
5645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5646   echo "$ac_t""yes" 1>&6
5647   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5648 else
5649   echo "$ac_t""no" 1>&6
5650 fi
5651
5652
5653   LDFLAGS="$ac_save_LDFLAGS"
5654
5655 fi
5656  # Autoconf claims to find X library and include dirs for us.
5657   if test "$no_x" = "yes"
5658   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5659   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5660   fi
5661 fi
5662
5663 case "$with_x11" in
5664   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5665   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5666 esac
5667
5668 if test "$with_x11" = "yes"; then
5669   { test "$extra_verbose" = "yes" && cat << \EOF
5670     Defining HAVE_X_WINDOWS
5671 EOF
5672 cat >> confdefs.h <<\EOF
5673 #define HAVE_X_WINDOWS 1
5674 EOF
5675 }
5676
5677   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5678   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5679
5680       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5681     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5682     if test -d "$lib_dir" -a -d "$inc_dir"; then
5683       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5684         x_libraries="$lib_dir $x_libraries"
5685         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5686       esac
5687       case "$x_includes" in "$inc_dir"* ) ;; *)
5688         x_includes="$inc_dir $x_includes"
5689         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5690       esac
5691       break;       fi
5692   done
5693
5694     for rel in "X11R6" "X11R5" "X11R4"; do
5695     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5696     if test -d "$lib_dir" -a -d "$inc_dir"; then
5697       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5698         x_libraries="$x_libraries $lib_dir"
5699         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5700       esac
5701       case "$x_includes" in "$inc_dir"* ) ;; *)
5702         x_includes="$x_includes $inc_dir"
5703         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5704       esac
5705       break;     fi
5706   done
5707
5708     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
5709
5710   ld_switch_x_site="$X_LIBS"
5711
5712   
5713 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5714     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5715   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5716   
5717         runpath="" runpath_dirs=""
5718   if test -n "$LD_RUN_PATH"; then
5719     runpath="$LD_RUN_PATH"
5720   elif test "$GCC" = "yes"; then
5721         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5722     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5723     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5724     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5725       case "$arg" in P,* | -L* | -R* )
5726         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5727           {
5728 xe_runpath_dir="$dir"
5729   test "$xe_runpath_dir" != "/lib"     -a \
5730         "$xe_runpath_dir" != "/usr/lib" -a \
5731         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5732   eval "$xe_add_unique_runpath_dir"
5733 }
5734         done ;;
5735       esac
5736     done
5737     ld_switch_run="$ld_switch_run_save"
5738     rm -f conftest*
5739   else
5740         for arg in $ld_switch_site $ld_switch_x_site; do
5741       case "$arg" in -L*) {
5742 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5743   test "$xe_runpath_dir" != "/lib"     -a \
5744         "$xe_runpath_dir" != "/usr/lib" -a \
5745         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5746   eval "$xe_add_unique_runpath_dir"
5747 };; esac
5748     done
5749         if test "$opsys $need_motif" = "sol2 yes"; then
5750       xe_runpath_dir="/opt/SUNWdt/lib";
5751       eval "$xe_add_unique_runpath_dir";
5752     fi
5753   fi 
5754   if test -n "$runpath"; then
5755     ld_switch_run="${dash_r}${runpath}"
5756     
5757 if test "$GCC" = "yes"; then
5758   set x $ld_switch_run; shift; ld_switch_run=""
5759   while test -n "$1"; do
5760     case $1 in
5761       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5762       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5763       -Xlinker* ) ;;
5764       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5765     esac
5766     shift
5767   done
5768 fi
5769     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5770   fi
5771 fi
5772
5773
5774   if test "$extra_verbose" = "yes"; then
5775     echo; echo "X11 compilation variables:"
5776     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5777     echo
5778   fi
5779
5780             bitmapdirs=
5781   if test "$x_includes" != NONE; then
5782     for i in $x_includes; do
5783       if test -d "$i/bitmaps"; then
5784         bitmapdirs="$i/bitmaps:$bitmapdirs"
5785       fi
5786       if test -d "$i/X11/bitmaps"; then
5787         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5788       fi
5789     done
5790     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5791   fi
5792   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5793     Defining BITMAPDIR = "$bitmapdirs"
5794 EOF
5795 cat >> confdefs.h <<EOF
5796 #define BITMAPDIR "$bitmapdirs"
5797 EOF
5798 }
5799
5800
5801     echo "checking for X defines extracted by xmkmf" 1>&6
5802 echo "configure:5803: checking for X defines extracted by xmkmf" >&5
5803   rm -fr conftestdir
5804   if mkdir conftestdir; then
5805     cd conftestdir
5806     cat > Imakefile <<'EOF'
5807 xetest:
5808         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5809 EOF
5810     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5811       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5812       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5813     fi
5814     cd ..
5815     rm -fr conftestdir
5816     for word in $xmkmf_defines; do
5817       case "$word" in
5818         -D*=* ) ;;
5819         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5820               { test "$extra_verbose" = "yes" && cat << EOF
5821     Defining $word
5822 EOF
5823 cat >> confdefs.h <<EOF
5824 #define $word 1
5825 EOF
5826 }
5827  ;;
5828       esac
5829     done
5830   fi
5831
5832     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5833 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5834 echo "configure:5835: checking for X11/Intrinsic.h" >&5
5835
5836 cat > conftest.$ac_ext <<EOF
5837 #line 5838 "configure"
5838 #include "confdefs.h"
5839 #include <X11/Intrinsic.h>
5840 EOF
5841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5842 { (eval echo configure:5843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5844 if test -z "$ac_err"; then
5845   rm -rf conftest*
5846   eval "ac_cv_header_$ac_safe=yes"
5847 else
5848   echo "$ac_err" >&5
5849   echo "configure: failed program was:" >&5
5850   cat conftest.$ac_ext >&5
5851   rm -rf conftest*
5852   eval "ac_cv_header_$ac_safe=no"
5853 fi
5854 rm -f conftest*
5855 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5856   echo "$ac_t""yes" 1>&6
5857   :
5858 else
5859   echo "$ac_t""no" 1>&6
5860 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5861 fi
5862
5863
5864       
5865 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5866 echo "configure:5867: checking for XOpenDisplay in -lX11" >&5
5867 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5868
5869 xe_check_libs=" -lX11 "
5870 cat > conftest.$ac_ext <<EOF
5871 #line 5872 "configure"
5872 #include "confdefs.h"
5873 /* Override any gcc2 internal prototype to avoid an error.  */
5874 /* We use char because int might match the return type of a gcc2
5875     builtin and then its argument prototype would still apply.  */
5876 char XOpenDisplay();
5877
5878 int main() {
5879 XOpenDisplay()
5880 ; return 0; }
5881 EOF
5882 if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5883   rm -rf conftest*
5884   eval "ac_cv_lib_$ac_lib_var=yes"
5885 else
5886   echo "configure: failed program was:" >&5
5887   cat conftest.$ac_ext >&5
5888   rm -rf conftest*
5889   eval "ac_cv_lib_$ac_lib_var=no"
5890 fi
5891 rm -f conftest*
5892 xe_check_libs=""
5893
5894 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5895   echo "$ac_t""yes" 1>&6
5896   have_lib_x11=yes
5897 else
5898   echo "$ac_t""no" 1>&6
5899 fi
5900
5901
5902   if test "$have_lib_x11" != "yes"; then
5903     
5904 xe_msg_checking="for XGetFontProperty in -lX11"
5905 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5906 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5907 echo "configure:5908: checking "$xe_msg_checking"" >&5
5908 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5909
5910 xe_check_libs=" -lX11 -b i486-linuxaout"
5911 cat > conftest.$ac_ext <<EOF
5912 #line 5913 "configure"
5913 #include "confdefs.h"
5914 /* Override any gcc2 internal prototype to avoid an error.  */
5915 /* We use char because int might match the return type of a gcc2
5916     builtin and then its argument prototype would still apply.  */
5917 char XGetFontProperty();
5918
5919 int main() {
5920 XGetFontProperty()
5921 ; return 0; }
5922 EOF
5923 if { (eval echo configure:5924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5924   rm -rf conftest*
5925   eval "ac_cv_lib_$ac_lib_var=yes"
5926 else
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_lib_$ac_lib_var=no"
5931 fi
5932 rm -f conftest*
5933 xe_check_libs=""
5934
5935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5936   echo "$ac_t""yes" 1>&6
5937   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5938 else
5939   echo "$ac_t""no" 1>&6
5940 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5941 fi
5942
5943
5944   fi
5945   libs_x="-lX11"
5946   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5947
5948     
5949 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5950 echo "configure:5951: checking for XShapeSelectInput in -lXext" >&5
5951 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5952
5953 xe_check_libs=" -lXext "
5954 cat > conftest.$ac_ext <<EOF
5955 #line 5956 "configure"
5956 #include "confdefs.h"
5957 /* Override any gcc2 internal prototype to avoid an error.  */
5958 /* We use char because int might match the return type of a gcc2
5959     builtin and then its argument prototype would still apply.  */
5960 char XShapeSelectInput();
5961
5962 int main() {
5963 XShapeSelectInput()
5964 ; return 0; }
5965 EOF
5966 if { (eval echo configure:5967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5967   rm -rf conftest*
5968   eval "ac_cv_lib_$ac_lib_var=yes"
5969 else
5970   echo "configure: failed program was:" >&5
5971   cat conftest.$ac_ext >&5
5972   rm -rf conftest*
5973   eval "ac_cv_lib_$ac_lib_var=no"
5974 fi
5975 rm -f conftest*
5976 xe_check_libs=""
5977
5978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5979   echo "$ac_t""yes" 1>&6
5980   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5981 else
5982   echo "$ac_t""no" 1>&6
5983 fi
5984
5985
5986
5987     
5988 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5989 echo "configure:5990: checking for XtOpenDisplay in -lXt" >&5
5990 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5991
5992 xe_check_libs=" -lXt "
5993 cat > conftest.$ac_ext <<EOF
5994 #line 5995 "configure"
5995 #include "confdefs.h"
5996 /* Override any gcc2 internal prototype to avoid an error.  */
5997 /* We use char because int might match the return type of a gcc2
5998     builtin and then its argument prototype would still apply.  */
5999 char XtOpenDisplay();
6000
6001 int main() {
6002 XtOpenDisplay()
6003 ; return 0; }
6004 EOF
6005 if { (eval echo configure:6006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6006   rm -rf conftest*
6007   eval "ac_cv_lib_$ac_lib_var=yes"
6008 else
6009   echo "configure: failed program was:" >&5
6010   cat conftest.$ac_ext >&5
6011   rm -rf conftest*
6012   eval "ac_cv_lib_$ac_lib_var=no"
6013 fi
6014 rm -f conftest*
6015 xe_check_libs=""
6016
6017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6018   echo "$ac_t""yes" 1>&6
6019   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6020 else
6021   echo "$ac_t""no" 1>&6
6022 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6023 fi
6024
6025
6026
6027   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6028 echo "configure:6029: checking the version of X11 being used" >&5
6029   cat > conftest.$ac_ext <<EOF
6030 #line 6031 "configure"
6031 #include "confdefs.h"
6032 #include <X11/Intrinsic.h>
6033     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6034 EOF
6035 if { (eval echo configure:6036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6036 then
6037   ./conftest foobar; x11_release=$?
6038 else
6039   conftest_rc="$?"
6040   echo "configure: failed program was:" >&5
6041   cat conftest.$ac_ext >&5
6042   rm -fr conftest*
6043   x11_release=4
6044 fi
6045 rm -fr conftest*
6046   echo "$ac_t""R${x11_release}" 1>&6
6047   { test "$extra_verbose" = "yes" && cat << EOF
6048     Defining THIS_IS_X11R${x11_release}
6049 EOF
6050 cat >> confdefs.h <<EOF
6051 #define THIS_IS_X11R${x11_release} 1
6052 EOF
6053 }
6054
6055
6056   for ac_func in XConvertCase
6057 do
6058 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6059 echo "configure:6060: checking for $ac_func" >&5
6060
6061 cat > conftest.$ac_ext <<EOF
6062 #line 6063 "configure"
6063 #include "confdefs.h"
6064 /* System header to define __stub macros and hopefully few prototypes,
6065     which can conflict with char $ac_func(); below.  */
6066 #include <assert.h>
6067 /* Override any gcc2 internal prototype to avoid an error.  */
6068 /* We use char because int might match the return type of a gcc2
6069     builtin and then its argument prototype would still apply.  */
6070 char $ac_func();
6071
6072 int main() {
6073
6074 /* The GNU C library defines this for functions which it implements
6075     to always fail with ENOSYS.  Some functions are actually named
6076     something starting with __ and the normal name is an alias.  */
6077 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6078 choke me
6079 #else
6080 $ac_func();
6081 #endif
6082
6083 ; return 0; }
6084 EOF
6085 if { (eval echo configure:6086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6086   rm -rf conftest*
6087   eval "ac_cv_func_$ac_func=yes"
6088 else
6089   echo "configure: failed program was:" >&5
6090   cat conftest.$ac_ext >&5
6091   rm -rf conftest*
6092   eval "ac_cv_func_$ac_func=no"
6093 fi
6094 rm -f conftest*
6095
6096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6097   echo "$ac_t""yes" 1>&6
6098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6099   { test "$extra_verbose" = "yes" && cat << EOF
6100     Defining $ac_tr_func
6101 EOF
6102 cat >> confdefs.h <<EOF
6103 #define $ac_tr_func 1
6104 EOF
6105 }
6106  
6107 else
6108   echo "$ac_t""no" 1>&6
6109 fi
6110 done
6111
6112
6113   for ac_hdr in X11/Xlocale.h
6114 do
6115 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6116 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6117 echo "configure:6118: checking for $ac_hdr" >&5
6118
6119 cat > conftest.$ac_ext <<EOF
6120 #line 6121 "configure"
6121 #include "confdefs.h"
6122 #include <$ac_hdr>
6123 EOF
6124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6125 { (eval echo configure:6126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6127 if test -z "$ac_err"; then
6128   rm -rf conftest*
6129   eval "ac_cv_header_$ac_safe=yes"
6130 else
6131   echo "$ac_err" >&5
6132   echo "configure: failed program was:" >&5
6133   cat conftest.$ac_ext >&5
6134   rm -rf conftest*
6135   eval "ac_cv_header_$ac_safe=no"
6136 fi
6137 rm -f conftest*
6138 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6139   echo "$ac_t""yes" 1>&6
6140     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6141   { test "$extra_verbose" = "yes" && cat << EOF
6142     Defining $ac_tr_hdr
6143 EOF
6144 cat >> confdefs.h <<EOF
6145 #define $ac_tr_hdr 1
6146 EOF
6147 }
6148  
6149 else
6150   echo "$ac_t""no" 1>&6
6151 fi
6152 done
6153
6154
6155     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6156 echo "configure:6157: checking for XFree86" >&5
6157   if test -d "/usr/X386/include" -o \
6158           -f "/etc/XF86Config"    -o \
6159           -f "/etc/X11/XF86Config" -o \
6160           -f "/usr/X11R6/lib/X11/XF86Config"; then
6161     echo "$ac_t""yes" 1>&6
6162     { test "$extra_verbose" = "yes" && cat << \EOF
6163     Defining HAVE_XFREE386
6164 EOF
6165 cat >> confdefs.h <<\EOF
6166 #define HAVE_XFREE386 1
6167 EOF
6168 }
6169
6170   else
6171     echo "$ac_t""no" 1>&6
6172   fi
6173
6174     test -z "$with_xmu" && { 
6175 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6176 echo "configure:6177: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6177 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6178
6179 xe_check_libs=" -lXmu "
6180 cat > conftest.$ac_ext <<EOF
6181 #line 6182 "configure"
6182 #include "confdefs.h"
6183 /* Override any gcc2 internal prototype to avoid an error.  */
6184 /* We use char because int might match the return type of a gcc2
6185     builtin and then its argument prototype would still apply.  */
6186 char XmuReadBitmapDataFromFile();
6187
6188 int main() {
6189 XmuReadBitmapDataFromFile()
6190 ; return 0; }
6191 EOF
6192 if { (eval echo configure:6193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6193   rm -rf conftest*
6194   eval "ac_cv_lib_$ac_lib_var=yes"
6195 else
6196   echo "configure: failed program was:" >&5
6197   cat conftest.$ac_ext >&5
6198   rm -rf conftest*
6199   eval "ac_cv_lib_$ac_lib_var=no"
6200 fi
6201 rm -f conftest*
6202 xe_check_libs=""
6203
6204 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6205   echo "$ac_t""yes" 1>&6
6206   with_xmu=yes
6207 else
6208   echo "$ac_t""no" 1>&6
6209 with_xmu=no
6210 fi
6211
6212  }
6213   if test "$with_xmu" = "no"; then
6214     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6215    echo "    xemacs will be linked with \"xmu.o\""
6216  fi
6217   else
6218     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6219     { test "$extra_verbose" = "yes" && cat << \EOF
6220     Defining HAVE_XMU
6221 EOF
6222 cat >> confdefs.h <<\EOF
6223 #define HAVE_XMU 1
6224 EOF
6225 }
6226
6227   fi
6228
6229       
6230 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6231 echo "configure:6232: checking for main in -lXbsd" >&5
6232 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6233
6234 xe_check_libs=" -lXbsd "
6235 cat > conftest.$ac_ext <<EOF
6236 #line 6237 "configure"
6237 #include "confdefs.h"
6238
6239 int main() {
6240 main()
6241 ; return 0; }
6242 EOF
6243 if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6244   rm -rf conftest*
6245   eval "ac_cv_lib_$ac_lib_var=yes"
6246 else
6247   echo "configure: failed program was:" >&5
6248   cat conftest.$ac_ext >&5
6249   rm -rf conftest*
6250   eval "ac_cv_lib_$ac_lib_var=no"
6251 fi
6252 rm -f conftest*
6253 xe_check_libs=""
6254
6255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6256   echo "$ac_t""yes" 1>&6
6257   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6258 else
6259   echo "$ac_t""no" 1>&6
6260 fi
6261
6262
6263
6264     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6265         if test "$GCC" = "yes"; then
6266       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6267       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6268     else
6269       case "$CC" in
6270         "xlc" ) CC="xlc_r" ;;
6271         "xlC" ) CC="xlC_r" ;;
6272         "cc"  ) CC="cc_r" ;;
6273       esac
6274     fi
6275   fi
6276
6277 fi 
6278 if test "$with_msw" != "no"; then
6279   echo "checking for MS-Windows" 1>&6
6280 echo "configure:6281: checking for MS-Windows" >&5
6281   
6282 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6283 echo "configure:6284: checking for main in -lgdi32" >&5
6284 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6285
6286 xe_check_libs=" -lgdi32 "
6287 cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290
6291 int main() {
6292 main()
6293 ; return 0; }
6294 EOF
6295 if { (eval echo configure:6296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6296   rm -rf conftest*
6297   eval "ac_cv_lib_$ac_lib_var=yes"
6298 else
6299   echo "configure: failed program was:" >&5
6300   cat conftest.$ac_ext >&5
6301   rm -rf conftest*
6302   eval "ac_cv_lib_$ac_lib_var=no"
6303 fi
6304 rm -f conftest*
6305 xe_check_libs=""
6306
6307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6308   echo "$ac_t""yes" 1>&6
6309   with_msw=yes
6310 else
6311   echo "$ac_t""no" 1>&6
6312 fi
6313
6314
6315   if test "$with_msw" = "yes"; then
6316     { test "$extra_verbose" = "yes" && cat << \EOF
6317     Defining HAVE_MS_WINDOWS
6318 EOF
6319 cat >> confdefs.h <<\EOF
6320 #define HAVE_MS_WINDOWS 1
6321 EOF
6322 }
6323
6324     install_pp="$blddir/lib-src/installexe.sh"
6325     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
6326     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6327     if test "$window_system" != x11; then
6328         window_system=msw
6329         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6330             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6331    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6332  fi
6333         test "$with_menubars"   != "no" && with_menubars=msw \
6334             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6335    echo "    xemacs will be linked with \"menubar-msw.o\""
6336  fi
6337         test "$with_toolbars"   != "no" && with_toolbars=msw \
6338             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6339    echo "    xemacs will be linked with \"toolbar-msw.o\""
6340  fi
6341         test "$with_dialogs"   != "no" && with_dialogs=msw \
6342             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6343    echo "    xemacs will be linked with \"dialog-msw.o\""
6344  fi
6345         test "$with_widgets"   != "no" && with_widgets=msw
6346     else
6347         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6348    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6349  fi
6350         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6351    echo "    xemacs will be linked with \"menubar-msw.o\""
6352  fi
6353         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6354    echo "    xemacs will be linked with \"toolbar-msw.o\""
6355  fi
6356         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6357    echo "    xemacs will be linked with \"dialog-msw.o\""
6358  fi
6359     fi
6360         cat > conftest.$ac_ext <<EOF
6361 #line 6362 "configure"
6362 #include "confdefs.h"
6363 #include <fcntl.h>
6364     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6365 EOF
6366 if { (eval echo configure:6367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6367 then
6368   { test "$extra_verbose" = "yes" && cat << \EOF
6369     Defining HAVE_MSG_SELECT
6370 EOF
6371 cat >> confdefs.h <<\EOF
6372 #define HAVE_MSG_SELECT 1
6373 EOF
6374 }
6375
6376 else
6377   conftest_rc="$?"
6378   echo "configure: failed program was:" >&5
6379   cat conftest.$ac_ext >&5
6380 fi
6381 rm -fr conftest*
6382     with_file_coding=yes
6383     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
6384    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\""
6385  fi
6386   fi
6387 fi
6388
6389
6390
6391 test -z "$window_system" && window_system="none"
6392
6393 if test "$window_system" = "none"; then
6394   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6395   do
6396     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6397        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6398     fi
6399     eval "with_${feature}=no"
6400   done
6401 else
6402   test -z "$with_toolbars" && with_toolbars=yes
6403 fi
6404
6405 if test "$with_msw" != "yes"; then
6406   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6407   do
6408     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6409        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6410     fi
6411     eval "with_${feature}=no"
6412   done
6413 else
6414   :
6415 fi
6416
6417 if test "$with_x11" != "yes"; then
6418             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6419   do
6420     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6421        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6422     fi
6423     eval "with_${feature}=no"
6424   done
6425 fi
6426
6427 bitmapdir=
6428
6429 case "$window_system" in
6430   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6431   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6432   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6433 esac
6434
6435 case "$x_libraries" in *X11R4* )
6436   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6437   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6438 esac
6439
6440 echo "checking for WM_COMMAND option" 1>&6
6441 echo "configure:6442: checking for WM_COMMAND option" >&5;
6442 if test "$with_wmcommand" != "no"; then
6443   { test "$extra_verbose" = "yes" && cat << \EOF
6444     Defining HAVE_WMCOMMAND
6445 EOF
6446 cat >> confdefs.h <<\EOF
6447 #define HAVE_WMCOMMAND 1
6448 EOF
6449 }
6450
6451 fi
6452
6453 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6454 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6455 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6456 echo "configure:6457: checking for X11/Xauth.h" >&5
6457
6458 cat > conftest.$ac_ext <<EOF
6459 #line 6460 "configure"
6460 #include "confdefs.h"
6461 #include <X11/Xauth.h>
6462 EOF
6463 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6464 { (eval echo configure:6465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6465 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6466 if test -z "$ac_err"; then
6467   rm -rf conftest*
6468   eval "ac_cv_header_$ac_safe=yes"
6469 else
6470   echo "$ac_err" >&5
6471   echo "configure: failed program was:" >&5
6472   cat conftest.$ac_ext >&5
6473   rm -rf conftest*
6474   eval "ac_cv_header_$ac_safe=no"
6475 fi
6476 rm -f conftest*
6477 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6478   echo "$ac_t""yes" 1>&6
6479   :
6480 else
6481   echo "$ac_t""no" 1>&6
6482 with_xauth=no
6483 fi
6484  }
6485 test -z "$with_xauth" && { 
6486 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6487 echo "configure:6488: checking for XauGetAuthByAddr in -lXau" >&5
6488 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6489
6490 xe_check_libs=" -lXau "
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char XauGetAuthByAddr();
6498
6499 int main() {
6500 XauGetAuthByAddr()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 xe_check_libs=""
6514
6515 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6516   echo "$ac_t""yes" 1>&6
6517   :
6518 else
6519   echo "$ac_t""no" 1>&6
6520 with_xauth=no
6521 fi
6522
6523  }
6524 test -z "$with_xauth" && with_xauth=yes
6525 if test "$with_xauth" = "yes"; then
6526   { test "$extra_verbose" = "yes" && cat << \EOF
6527     Defining HAVE_XAUTH
6528 EOF
6529 cat >> confdefs.h <<\EOF
6530 #define HAVE_XAUTH 1
6531 EOF
6532 }
6533
6534   
6535 T=""
6536 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
6537 libs_xauth="$T"
6538
6539 fi
6540
6541
6542
6543
6544 if test "$with_tooltalk" != "no" ; then
6545       for dir in "" "Tt/" "desktop/" ; do
6546     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6547 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6548 echo "configure:6549: checking for ${dir}tt_c.h" >&5
6549
6550 cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 #include <${dir}tt_c.h>
6554 EOF
6555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6556 { (eval echo configure:6557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6558 if test -z "$ac_err"; then
6559   rm -rf conftest*
6560   eval "ac_cv_header_$ac_safe=yes"
6561 else
6562   echo "$ac_err" >&5
6563   echo "configure: failed program was:" >&5
6564   cat conftest.$ac_ext >&5
6565   rm -rf conftest*
6566   eval "ac_cv_header_$ac_safe=no"
6567 fi
6568 rm -f conftest*
6569 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6570   echo "$ac_t""yes" 1>&6
6571   tt_c_h_path="${dir}tt_c.h"; break
6572 else
6573   echo "$ac_t""no" 1>&6
6574 fi
6575
6576   done
6577   if test -z "$tt_c_h_path"; then
6578     if test "$with_tooltalk" = "yes"; then
6579       (echo "$progname: Usage error:"
6580 echo " " "Unable to find required tooltalk header files."
6581 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6582     fi
6583     with_tooltalk=no
6584   fi
6585 fi
6586 if test "$with_tooltalk" != "no" ; then
6587   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6588     
6589 xe_msg_checking="for tt_message_create in -ltt"
6590 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6591 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6592 echo "configure:6593: checking "$xe_msg_checking"" >&5
6593 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6594
6595 xe_check_libs=" -ltt $extra_libs"
6596 cat > conftest.$ac_ext <<EOF
6597 #line 6598 "configure"
6598 #include "confdefs.h"
6599 /* Override any gcc2 internal prototype to avoid an error.  */
6600 /* We use char because int might match the return type of a gcc2
6601     builtin and then its argument prototype would still apply.  */
6602 char tt_message_create();
6603
6604 int main() {
6605 tt_message_create()
6606 ; return 0; }
6607 EOF
6608 if { (eval echo configure:6609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6609   rm -rf conftest*
6610   eval "ac_cv_lib_$ac_lib_var=yes"
6611 else
6612   echo "configure: failed program was:" >&5
6613   cat conftest.$ac_ext >&5
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=no"
6616 fi
6617 rm -f conftest*
6618 xe_check_libs=""
6619
6620 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6621   echo "$ac_t""yes" 1>&6
6622   tt_libs="-ltt $extra_libs"; break
6623 else
6624   echo "$ac_t""no" 1>&6
6625 :
6626 fi
6627
6628
6629   done
6630   if test -z "$tt_libs"; then
6631     if test "$with_tooltalk" = "yes"; then
6632       (echo "$progname: Usage error:"
6633 echo " " "Unable to find required tooltalk libraries."
6634 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6635     fi
6636     with_tooltalk=no
6637   fi
6638 fi
6639 test -z "$with_tooltalk" && with_tooltalk=yes
6640 if test "$with_tooltalk" = "yes"; then
6641   { test "$extra_verbose" = "yes" && cat << \EOF
6642     Defining TOOLTALK
6643 EOF
6644 cat >> confdefs.h <<\EOF
6645 #define TOOLTALK 1
6646 EOF
6647 }
6648
6649   { test "$extra_verbose" = "yes" && cat << EOF
6650     Defining TT_C_H_PATH = "$tt_c_h_path"
6651 EOF
6652 cat >> confdefs.h <<EOF
6653 #define TT_C_H_PATH "$tt_c_h_path"
6654 EOF
6655 }
6656
6657   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6658   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6659    echo "    xemacs will be linked with \"tooltalk.o\""
6660  fi
6661 fi
6662
6663 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6664 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6665 echo "configure:6666: checking for Dt/Dt.h" >&5
6666
6667 cat > conftest.$ac_ext <<EOF
6668 #line 6669 "configure"
6669 #include "confdefs.h"
6670 #include <Dt/Dt.h>
6671 EOF
6672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6673 { (eval echo configure:6674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6675 if test -z "$ac_err"; then
6676   rm -rf conftest*
6677   eval "ac_cv_header_$ac_safe=yes"
6678 else
6679   echo "$ac_err" >&5
6680   echo "configure: failed program was:" >&5
6681   cat conftest.$ac_ext >&5
6682   rm -rf conftest*
6683   eval "ac_cv_header_$ac_safe=no"
6684 fi
6685 rm -f conftest*
6686 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688   :
6689 else
6690   echo "$ac_t""no" 1>&6
6691 with_cde=no
6692 fi
6693  }
6694 test -z "$with_cde" && { 
6695 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6696 echo "configure:6697: checking for DtDndDragStart in -lDtSvc" >&5
6697 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6698
6699 xe_check_libs=" -lDtSvc "
6700 cat > conftest.$ac_ext <<EOF
6701 #line 6702 "configure"
6702 #include "confdefs.h"
6703 /* Override any gcc2 internal prototype to avoid an error.  */
6704 /* We use char because int might match the return type of a gcc2
6705     builtin and then its argument prototype would still apply.  */
6706 char DtDndDragStart();
6707
6708 int main() {
6709 DtDndDragStart()
6710 ; return 0; }
6711 EOF
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=yes"
6715 else
6716   echo "configure: failed program was:" >&5
6717   cat conftest.$ac_ext >&5
6718   rm -rf conftest*
6719   eval "ac_cv_lib_$ac_lib_var=no"
6720 fi
6721 rm -f conftest*
6722 xe_check_libs=""
6723
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6725   echo "$ac_t""yes" 1>&6
6726   :
6727 else
6728   echo "$ac_t""no" 1>&6
6729 with_cde=no
6730 fi
6731
6732  }
6733 test -z "$with_cde" && with_cde=yes
6734 if test "$with_dragndrop" = no; then
6735   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6736   with_cde=no
6737 fi
6738 if test "$with_cde" = "yes" ; then
6739   { test "$extra_verbose" = "yes" && cat << \EOF
6740     Defining HAVE_CDE
6741 EOF
6742 cat >> confdefs.h <<\EOF
6743 #define HAVE_CDE 1
6744 EOF
6745 }
6746
6747   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6748   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6749   with_tooltalk=yes # CDE requires Tooltalk
6750   need_motif=yes    # CDE requires Motif
6751 fi
6752
6753 test "$window_system" != "x11" && with_offix=no
6754 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6755   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6756   with_offix=no
6757 fi
6758 if test "$with_dragndrop" = no; then
6759   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6760   with_offix=no
6761 fi
6762 if test "$with_cde" = yes; then
6763   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6764   with_offix=no
6765 fi
6766 test -z "$with_offix" && with_offix=no
6767 if test "$with_offix" = "yes"; then
6768   { test "$extra_verbose" = "yes" && cat << \EOF
6769     Defining HAVE_OFFIX_DND
6770 EOF
6771 cat >> confdefs.h <<\EOF
6772 #define HAVE_OFFIX_DND 1
6773 EOF
6774 }
6775
6776   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6777   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6778 fi
6779
6780 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6781 echo "configure:6782: checking if drag and drop API is needed" >&5
6782 if test "$with_dragndrop" != "no" ; then
6783   if test -n "$dragndrop_proto" ; then
6784     with_dragndrop=yes
6785     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6786     { test "$extra_verbose" = "yes" && cat << \EOF
6787     Defining HAVE_DRAGNDROP
6788 EOF
6789 cat >> confdefs.h <<\EOF
6790 #define HAVE_DRAGNDROP 1
6791 EOF
6792 }
6793
6794     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6795   else
6796     with_dragndrop=no
6797     echo "$ac_t""no" 1>&6
6798   fi
6799 fi
6800
6801 echo "checking for LDAP" 1>&6
6802 echo "configure:6803: checking for LDAP" >&5
6803 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6804 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6805 echo "configure:6806: checking for ldap.h" >&5
6806
6807 cat > conftest.$ac_ext <<EOF
6808 #line 6809 "configure"
6809 #include "confdefs.h"
6810 #include <ldap.h>
6811 EOF
6812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6813 { (eval echo configure:6814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6815 if test -z "$ac_err"; then
6816   rm -rf conftest*
6817   eval "ac_cv_header_$ac_safe=yes"
6818 else
6819   echo "$ac_err" >&5
6820   echo "configure: failed program was:" >&5
6821   cat conftest.$ac_ext >&5
6822   rm -rf conftest*
6823   eval "ac_cv_header_$ac_safe=no"
6824 fi
6825 rm -f conftest*
6826 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6827   echo "$ac_t""yes" 1>&6
6828   :
6829 else
6830   echo "$ac_t""no" 1>&6
6831 with_ldap=no
6832 fi
6833  }
6834 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6835 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6836 echo "configure:6837: checking for lber.h" >&5
6837
6838 cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6841 #include <lber.h>
6842 EOF
6843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6844 { (eval echo configure:6845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6846 if test -z "$ac_err"; then
6847   rm -rf conftest*
6848   eval "ac_cv_header_$ac_safe=yes"
6849 else
6850   echo "$ac_err" >&5
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_header_$ac_safe=no"
6855 fi
6856 rm -f conftest*
6857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6858   echo "$ac_t""yes" 1>&6
6859   :
6860 else
6861   echo "$ac_t""no" 1>&6
6862 with_ldap=no
6863 fi
6864  }
6865 if test "$with_ldap" != "no"; then
6866   
6867 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6868 echo "configure:6869: checking for ldap_search in -lldap" >&5
6869 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6870
6871 xe_check_libs=" -lldap "
6872 cat > conftest.$ac_ext <<EOF
6873 #line 6874 "configure"
6874 #include "confdefs.h"
6875 /* Override any gcc2 internal prototype to avoid an error.  */
6876 /* We use char because int might match the return type of a gcc2
6877     builtin and then its argument prototype would still apply.  */
6878 char ldap_search();
6879
6880 int main() {
6881 ldap_search()
6882 ; return 0; }
6883 EOF
6884 if { (eval echo configure:6885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6885   rm -rf conftest*
6886   eval "ac_cv_lib_$ac_lib_var=yes"
6887 else
6888   echo "configure: failed program was:" >&5
6889   cat conftest.$ac_ext >&5
6890   rm -rf conftest*
6891   eval "ac_cv_lib_$ac_lib_var=no"
6892 fi
6893 rm -f conftest*
6894 xe_check_libs=""
6895
6896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6897   echo "$ac_t""yes" 1>&6
6898   with_ldap_nolber=yes
6899 else
6900   echo "$ac_t""no" 1>&6
6901 with_ldap_nolber=no
6902 fi
6903
6904
6905   test "$with_ldap_nolber" = "no" && { 
6906 xe_msg_checking="for ldap_open in -lldap"
6907 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6908 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6909 echo "configure:6910: checking "$xe_msg_checking"" >&5
6910 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6911
6912 xe_check_libs=" -lldap -llber"
6913 cat > conftest.$ac_ext <<EOF
6914 #line 6915 "configure"
6915 #include "confdefs.h"
6916 /* Override any gcc2 internal prototype to avoid an error.  */
6917 /* We use char because int might match the return type of a gcc2
6918     builtin and then its argument prototype would still apply.  */
6919 char ldap_open();
6920
6921 int main() {
6922 ldap_open()
6923 ; return 0; }
6924 EOF
6925 if { (eval echo configure:6926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6926   rm -rf conftest*
6927   eval "ac_cv_lib_$ac_lib_var=yes"
6928 else
6929   echo "configure: failed program was:" >&5
6930   cat conftest.$ac_ext >&5
6931   rm -rf conftest*
6932   eval "ac_cv_lib_$ac_lib_var=no"
6933 fi
6934 rm -f conftest*
6935 xe_check_libs=""
6936
6937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6938   echo "$ac_t""yes" 1>&6
6939   with_ldap_lber=yes
6940 else
6941   echo "$ac_t""no" 1>&6
6942 with_ldap_lber=no
6943 fi
6944
6945  }
6946   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6947 xe_msg_checking="for ldap_open in -lldap"
6948 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6949 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6950 echo "configure:6951: checking "$xe_msg_checking"" >&5
6951 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6952
6953 xe_check_libs=" -lldap -llber -lkrb"
6954 cat > conftest.$ac_ext <<EOF
6955 #line 6956 "configure"
6956 #include "confdefs.h"
6957 /* Override any gcc2 internal prototype to avoid an error.  */
6958 /* We use char because int might match the return type of a gcc2
6959     builtin and then its argument prototype would still apply.  */
6960 char ldap_open();
6961
6962 int main() {
6963 ldap_open()
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967   rm -rf conftest*
6968   eval "ac_cv_lib_$ac_lib_var=yes"
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   eval "ac_cv_lib_$ac_lib_var=no"
6974 fi
6975 rm -f conftest*
6976 xe_check_libs=""
6977
6978 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6979   echo "$ac_t""yes" 1>&6
6980   with_ldap_krb=yes
6981 else
6982   echo "$ac_t""no" 1>&6
6983 with_ldap_krb=no
6984 fi
6985
6986  }
6987   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6988 xe_msg_checking="for ldap_open in -lldap"
6989 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6990 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6991 echo "configure:6992: checking "$xe_msg_checking"" >&5
6992 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6993
6994 xe_check_libs=" -lldap -llber -lkrb -ldes"
6995 cat > conftest.$ac_ext <<EOF
6996 #line 6997 "configure"
6997 #include "confdefs.h"
6998 /* Override any gcc2 internal prototype to avoid an error.  */
6999 /* We use char because int might match the return type of a gcc2
7000     builtin and then its argument prototype would still apply.  */
7001 char ldap_open();
7002
7003 int main() {
7004 ldap_open()
7005 ; return 0; }
7006 EOF
7007 if { (eval echo configure:7008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7008   rm -rf conftest*
7009   eval "ac_cv_lib_$ac_lib_var=yes"
7010 else
7011   echo "configure: failed program was:" >&5
7012   cat conftest.$ac_ext >&5
7013   rm -rf conftest*
7014   eval "ac_cv_lib_$ac_lib_var=no"
7015 fi
7016 rm -f conftest*
7017 xe_check_libs=""
7018
7019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7020   echo "$ac_t""yes" 1>&6
7021   with_ldap_krbdes=yes
7022 else
7023   echo "$ac_t""no" 1>&6
7024 with_ldap_krbdes=no
7025 fi
7026
7027  }
7028   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
7029 fi
7030 if test "$with_ldap" = "yes"; then
7031   { test "$extra_verbose" = "yes" && cat << \EOF
7032     Defining HAVE_LDAP
7033 EOF
7034 cat >> confdefs.h <<\EOF
7035 #define HAVE_LDAP 1
7036 EOF
7037 }
7038
7039   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7040    echo "    xemacs will be linked with \"eldap.o\""
7041  fi
7042   if test "$with_ldap_nolber" = "yes" ; then
7043     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7044   else
7045     if test "$with_ldap_krb" = "yes" ; then
7046       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7047     fi
7048     if test "$with_ldap_krbdes" = "yes" ; then
7049       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7050       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7051     fi
7052     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7053     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7054   fi
7055   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7056 do
7057 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7058 echo "configure:7059: checking for $ac_func" >&5
7059
7060 cat > conftest.$ac_ext <<EOF
7061 #line 7062 "configure"
7062 #include "confdefs.h"
7063 /* System header to define __stub macros and hopefully few prototypes,
7064     which can conflict with char $ac_func(); below.  */
7065 #include <assert.h>
7066 /* Override any gcc2 internal prototype to avoid an error.  */
7067 /* We use char because int might match the return type of a gcc2
7068     builtin and then its argument prototype would still apply.  */
7069 char $ac_func();
7070
7071 int main() {
7072
7073 /* The GNU C library defines this for functions which it implements
7074     to always fail with ENOSYS.  Some functions are actually named
7075     something starting with __ and the normal name is an alias.  */
7076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7077 choke me
7078 #else
7079 $ac_func();
7080 #endif
7081
7082 ; return 0; }
7083 EOF
7084 if { (eval echo configure:7085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7085   rm -rf conftest*
7086   eval "ac_cv_func_$ac_func=yes"
7087 else
7088   echo "configure: failed program was:" >&5
7089   cat conftest.$ac_ext >&5
7090   rm -rf conftest*
7091   eval "ac_cv_func_$ac_func=no"
7092 fi
7093 rm -f conftest*
7094
7095 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7096   echo "$ac_t""yes" 1>&6
7097     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7098   { test "$extra_verbose" = "yes" && cat << EOF
7099     Defining $ac_tr_func
7100 EOF
7101 cat >> confdefs.h <<EOF
7102 #define $ac_tr_func 1
7103 EOF
7104 }
7105  
7106 else
7107   echo "$ac_t""no" 1>&6
7108 fi
7109 done
7110
7111 fi
7112
7113 echo "checking for PostgreSQL" 1>&6
7114 echo "configure:7115: checking for PostgreSQL" >&5
7115 postgres_includes_found=no
7116 save_c_switch_site="$c_switch_site"
7117 if test "$with_postgresql" != "no"; then
7118         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7119 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7120 echo "configure:7121: checking for libpq-fe.h" >&5
7121
7122 cat > conftest.$ac_ext <<EOF
7123 #line 7124 "configure"
7124 #include "confdefs.h"
7125 #include <libpq-fe.h>
7126 EOF
7127 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7128 { (eval echo configure:7129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7129 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7130 if test -z "$ac_err"; then
7131   rm -rf conftest*
7132   eval "ac_cv_header_$ac_safe=yes"
7133 else
7134   echo "$ac_err" >&5
7135   echo "configure: failed program was:" >&5
7136   cat conftest.$ac_ext >&5
7137   rm -rf conftest*
7138   eval "ac_cv_header_$ac_safe=no"
7139 fi
7140 rm -f conftest*
7141 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7142   echo "$ac_t""yes" 1>&6
7143   postgres_includes_found=yes
7144 else
7145   echo "$ac_t""no" 1>&6
7146 fi
7147
7148 fi
7149 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7150         -d "/usr/include/pgsql"; then
7151         c_switch_site="$c_switch_site -I/usr/include/pgsql"
7152         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7153 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7154 echo "configure:7155: checking for libpq-fe.h" >&5
7155
7156 cat > conftest.$ac_ext <<EOF
7157 #line 7158 "configure"
7158 #include "confdefs.h"
7159 #include <libpq-fe.h>
7160 EOF
7161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7162 { (eval echo configure:7163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7164 if test -z "$ac_err"; then
7165   rm -rf conftest*
7166   eval "ac_cv_header_$ac_safe=yes"
7167 else
7168   echo "$ac_err" >&5
7169   echo "configure: failed program was:" >&5
7170   cat conftest.$ac_ext >&5
7171   rm -rf conftest*
7172   eval "ac_cv_header_$ac_safe=no"
7173 fi
7174 rm -f conftest*
7175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7176   echo "$ac_t""yes" 1>&6
7177   postgres_includes_found=yes
7178 else
7179   echo "$ac_t""no" 1>&6
7180 fi
7181
7182         if test "$postgres_includes_found" != "yes"; then
7183                 c_switch_site="$save_c_switch_site"
7184         fi
7185 fi
7186 if test "$postgres_includes_found" = "no" -a "$with_postgresql" != "no" -a \
7187         -d "/usr/local/pgsql/include"; then
7188         c_switch_site="$c_switch_site -I/usr/local/pgsql/include"
7189         ac_safe=`echo "libpq-fe.h" | sed 'y%./+-%__p_%'`
7190 echo $ac_n "checking for libpq-fe.h""... $ac_c" 1>&6
7191 echo "configure:7192: checking for libpq-fe.h" >&5
7192
7193 cat > conftest.$ac_ext <<EOF
7194 #line 7195 "configure"
7195 #include "confdefs.h"
7196 #include <libpq-fe.h>
7197 EOF
7198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7199 { (eval echo configure:7200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7201 if test -z "$ac_err"; then
7202   rm -rf conftest*
7203   eval "ac_cv_header_$ac_safe=yes"
7204 else
7205   echo "$ac_err" >&5
7206   echo "configure: failed program was:" >&5
7207   cat conftest.$ac_ext >&5
7208   rm -rf conftest*
7209   eval "ac_cv_header_$ac_safe=no"
7210 fi
7211 rm -f conftest*
7212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7213   echo "$ac_t""yes" 1>&6
7214   postgres_includes_found=yes
7215 else
7216   echo "$ac_t""no" 1>&6
7217 fi
7218
7219         if test "$postgres_includes_found" != "yes"; then
7220                 c_switch_site="$save_c_switch_site"
7221         fi
7222 fi
7223
7224 if test "$postgres_includes_found" = "yes"; then
7225         
7226 echo $ac_n "checking for PQconnectdb in -lpq""... $ac_c" 1>&6
7227 echo "configure:7228: checking for PQconnectdb in -lpq" >&5
7228 ac_lib_var=`echo pq'_'PQconnectdb | sed 'y%./+-%__p_%'`
7229
7230 xe_check_libs=" -lpq "
7231 cat > conftest.$ac_ext <<EOF
7232 #line 7233 "configure"
7233 #include "confdefs.h"
7234 /* Override any gcc2 internal prototype to avoid an error.  */
7235 /* We use char because int might match the return type of a gcc2
7236     builtin and then its argument prototype would still apply.  */
7237 char PQconnectdb();
7238
7239 int main() {
7240 PQconnectdb()
7241 ; return 0; }
7242 EOF
7243 if { (eval echo configure:7244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7244   rm -rf conftest*
7245   eval "ac_cv_lib_$ac_lib_var=yes"
7246 else
7247   echo "configure: failed program was:" >&5
7248   cat conftest.$ac_ext >&5
7249   rm -rf conftest*
7250   eval "ac_cv_lib_$ac_lib_var=no"
7251 fi
7252 rm -f conftest*
7253 xe_check_libs=""
7254
7255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7256   echo "$ac_t""yes" 1>&6
7257   with_postgresql=yes
7258 else
7259   echo "$ac_t""no" 1>&6
7260 with_postgresql=no
7261 fi
7262
7263
7264 fi
7265 if test "$with_postgresql" = "yes"; then
7266         
7267 echo $ac_n "checking for PQconnectStart in -lpq""... $ac_c" 1>&6
7268 echo "configure:7269: checking for PQconnectStart in -lpq" >&5
7269 ac_lib_var=`echo pq'_'PQconnectStart | sed 'y%./+-%__p_%'`
7270
7271 xe_check_libs=" -lpq "
7272 cat > conftest.$ac_ext <<EOF
7273 #line 7274 "configure"
7274 #include "confdefs.h"
7275 /* Override any gcc2 internal prototype to avoid an error.  */
7276 /* We use char because int might match the return type of a gcc2
7277     builtin and then its argument prototype would still apply.  */
7278 char PQconnectStart();
7279
7280 int main() {
7281 PQconnectStart()
7282 ; return 0; }
7283 EOF
7284 if { (eval echo configure:7285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7285   rm -rf conftest*
7286   eval "ac_cv_lib_$ac_lib_var=yes"
7287 else
7288   echo "configure: failed program was:" >&5
7289   cat conftest.$ac_ext >&5
7290   rm -rf conftest*
7291   eval "ac_cv_lib_$ac_lib_var=no"
7292 fi
7293 rm -f conftest*
7294 xe_check_libs=""
7295
7296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7297   echo "$ac_t""yes" 1>&6
7298   with_postgresqlv7=yes
7299 else
7300   echo "$ac_t""no" 1>&6
7301 with_postgresqlv7=no
7302 fi
7303
7304
7305 fi
7306 if test "$with_postgresql" = "yes"; then
7307         { test "$extra_verbose" = "yes" && cat << \EOF
7308     Defining HAVE_POSTGRESQL
7309 EOF
7310 cat >> confdefs.h <<\EOF
7311 #define HAVE_POSTGRESQL 1
7312 EOF
7313 }
7314
7315         if test "$with_postgresqlv7" = "yes"; then
7316                 { test "$extra_verbose" = "yes" && cat << \EOF
7317     Defining HAVE_POSTGRESQLV7
7318 EOF
7319 cat >> confdefs.h <<\EOF
7320 #define HAVE_POSTGRESQLV7 1
7321 EOF
7322 }
7323
7324         fi
7325         LIBS="-lpq $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpq\" to \$LIBS"; fi
7326         extra_objs="$extra_objs postgresql.o" &&  if test "$extra_verbose" = "yes"; then
7327    echo "    xemacs will be linked with \"postgresql.o\""
7328  fi
7329 else
7330         c_switch_site=$save_c_switch_site
7331 fi
7332
7333
7334 if test "$window_system" != "none"; then
7335   echo "checking for graphics libraries" 1>&6
7336 echo "configure:7337: checking for graphics libraries" >&5
7337
7338     xpm_problem=""
7339   if test -z "$with_xpm"; then
7340     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7341 echo "configure:7342: checking for Xpm - no older than 3.4f" >&5
7342     xe_check_libs=-lXpm
7343     cat > conftest.$ac_ext <<EOF
7344 #line 7345 "configure"
7345 #include "confdefs.h"
7346 #define XPM_NUMBERS
7347 #include <X11/xpm.h>
7348     int main(int c, char **v) {
7349     return c == 1 ? 0 :
7350       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7351       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7352 EOF
7353 if { (eval echo configure:7354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7354 then
7355   ./conftest dummy_arg; xpm_status=$?;
7356       if test "$xpm_status" = "0"; then
7357         with_xpm=yes;
7358       else
7359         with_xpm=no;
7360         if test "$xpm_status" = "1"; then
7361           xpm_problem="Xpm library version and header file version don't match!"
7362         elif test "$xpm_status" = "2"; then
7363           xpm_problem="Xpm library version is too old!"
7364         else
7365           xpm_problem="Internal xpm detection logic error!"
7366         fi
7367         echo "
7368 *** WARNING *** $xpm_problem
7369   I'm not touching that with a 10-foot pole!
7370   If you really want to use the installed version of Xpm, rerun
7371   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7372     fi
7373 else
7374   conftest_rc="$?"
7375   echo "configure: failed program was:" >&5
7376   cat conftest.$ac_ext >&5
7377   rm -fr conftest*
7378   with_xpm=no
7379 fi
7380 rm -fr conftest*
7381     xe_check_libs=
7382     echo "$ac_t""$with_xpm" 1>&6
7383   fi
7384   if test "$with_xpm" = "yes"; then
7385     { test "$extra_verbose" = "yes" && cat << \EOF
7386     Defining HAVE_XPM
7387 EOF
7388 cat >> confdefs.h <<\EOF
7389 #define HAVE_XPM 1
7390 EOF
7391 }
7392
7393     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7394     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7395 echo "configure:7396: checking for \"FOR_MSW\" xpm" >&5
7396     xe_check_libs=-lXpm
7397     cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400
7401 int main() {
7402 XpmCreatePixmapFromData()
7403 ; return 0; }
7404 EOF
7405 if { (eval echo configure:7406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7406   rm -rf conftest*
7407   xpm_for_msw=no
7408 else
7409   echo "configure: failed program was:" >&5
7410   cat conftest.$ac_ext >&5
7411   rm -rf conftest*
7412   xpm_for_msw=yes
7413 fi
7414 rm -f conftest*
7415     xe_check_libs=
7416     echo "$ac_t""$xpm_for_msw" 1>&6
7417     if test "$xpm_for_msw" = "yes"; then
7418       { test "$extra_verbose" = "yes" && cat << \EOF
7419     Defining FOR_MSW
7420 EOF
7421 cat >> confdefs.h <<\EOF
7422 #define FOR_MSW 1
7423 EOF
7424 }
7425
7426     fi
7427   fi
7428
7429     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7430 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7431 echo "configure:7432: checking for compface.h" >&5
7432
7433 cat > conftest.$ac_ext <<EOF
7434 #line 7435 "configure"
7435 #include "confdefs.h"
7436 #include <compface.h>
7437 EOF
7438 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7439 { (eval echo configure:7440: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7440 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7441 if test -z "$ac_err"; then
7442   rm -rf conftest*
7443   eval "ac_cv_header_$ac_safe=yes"
7444 else
7445   echo "$ac_err" >&5
7446   echo "configure: failed program was:" >&5
7447   cat conftest.$ac_ext >&5
7448   rm -rf conftest*
7449   eval "ac_cv_header_$ac_safe=no"
7450 fi
7451 rm -f conftest*
7452 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7453   echo "$ac_t""yes" 1>&6
7454   :
7455 else
7456   echo "$ac_t""no" 1>&6
7457 with_xface=no
7458 fi
7459  }
7460   test -z "$with_xface" && { 
7461 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7462 echo "configure:7463: checking for UnGenFace in -lcompface" >&5
7463 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7464
7465 xe_check_libs=" -lcompface "
7466 cat > conftest.$ac_ext <<EOF
7467 #line 7468 "configure"
7468 #include "confdefs.h"
7469 /* Override any gcc2 internal prototype to avoid an error.  */
7470 /* We use char because int might match the return type of a gcc2
7471     builtin and then its argument prototype would still apply.  */
7472 char UnGenFace();
7473
7474 int main() {
7475 UnGenFace()
7476 ; return 0; }
7477 EOF
7478 if { (eval echo configure:7479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7479   rm -rf conftest*
7480   eval "ac_cv_lib_$ac_lib_var=yes"
7481 else
7482   echo "configure: failed program was:" >&5
7483   cat conftest.$ac_ext >&5
7484   rm -rf conftest*
7485   eval "ac_cv_lib_$ac_lib_var=no"
7486 fi
7487 rm -f conftest*
7488 xe_check_libs=""
7489
7490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7491   echo "$ac_t""yes" 1>&6
7492   : 
7493 else
7494   echo "$ac_t""no" 1>&6
7495 with_xface=no
7496 fi
7497
7498  }
7499   test -z "$with_xface" && with_xface=yes
7500   if test "$with_xface" = "yes"; then
7501     { test "$extra_verbose" = "yes" && cat << \EOF
7502     Defining HAVE_XFACE
7503 EOF
7504 cat >> confdefs.h <<\EOF
7505 #define HAVE_XFACE 1
7506 EOF
7507 }
7508
7509     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7510   fi
7511
7512         if test "$with_gif" != "no"; then
7513     with_gif="yes"
7514     { test "$extra_verbose" = "yes" && cat << \EOF
7515     Defining HAVE_GIF
7516 EOF
7517 cat >> confdefs.h <<\EOF
7518 #define HAVE_GIF 1
7519 EOF
7520 }
7521
7522     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7523    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7524  fi
7525   fi
7526
7527       if test "$with_png $with_tiff" != "no no"; then
7528     
7529 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7530 echo "configure:7531: checking for inflate in -lc" >&5
7531 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7532
7533 xe_check_libs=" -lc "
7534 cat > conftest.$ac_ext <<EOF
7535 #line 7536 "configure"
7536 #include "confdefs.h"
7537 /* Override any gcc2 internal prototype to avoid an error.  */
7538 /* We use char because int might match the return type of a gcc2
7539     builtin and then its argument prototype would still apply.  */
7540 char inflate();
7541
7542 int main() {
7543 inflate()
7544 ; return 0; }
7545 EOF
7546 if { (eval echo configure:7547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7547   rm -rf conftest*
7548   eval "ac_cv_lib_$ac_lib_var=yes"
7549 else
7550   echo "configure: failed program was:" >&5
7551   cat conftest.$ac_ext >&5
7552   rm -rf conftest*
7553   eval "ac_cv_lib_$ac_lib_var=no"
7554 fi
7555 rm -f conftest*
7556 xe_check_libs=""
7557
7558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7559   echo "$ac_t""yes" 1>&6
7560   :
7561 else
7562   echo "$ac_t""no" 1>&6
7563
7564 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7565 echo "configure:7566: checking for inflate in -lz" >&5
7566 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7567
7568 xe_check_libs=" -lz "
7569 cat > conftest.$ac_ext <<EOF
7570 #line 7571 "configure"
7571 #include "confdefs.h"
7572 /* Override any gcc2 internal prototype to avoid an error.  */
7573 /* We use char because int might match the return type of a gcc2
7574     builtin and then its argument prototype would still apply.  */
7575 char inflate();
7576
7577 int main() {
7578 inflate()
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   eval "ac_cv_lib_$ac_lib_var=yes"
7584 else
7585   echo "configure: failed program was:" >&5
7586   cat conftest.$ac_ext >&5
7587   rm -rf conftest*
7588   eval "ac_cv_lib_$ac_lib_var=no"
7589 fi
7590 rm -f conftest*
7591 xe_check_libs=""
7592
7593 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7594   echo "$ac_t""yes" 1>&6
7595   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7596 else
7597   echo "$ac_t""no" 1>&6
7598
7599 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7600 echo "configure:7601: checking for inflate in -lgz" >&5
7601 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7602
7603 xe_check_libs=" -lgz "
7604 cat > conftest.$ac_ext <<EOF
7605 #line 7606 "configure"
7606 #include "confdefs.h"
7607 /* Override any gcc2 internal prototype to avoid an error.  */
7608 /* We use char because int might match the return type of a gcc2
7609     builtin and then its argument prototype would still apply.  */
7610 char inflate();
7611
7612 int main() {
7613 inflate()
7614 ; return 0; }
7615 EOF
7616 if { (eval echo configure:7617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7617   rm -rf conftest*
7618   eval "ac_cv_lib_$ac_lib_var=yes"
7619 else
7620   echo "configure: failed program was:" >&5
7621   cat conftest.$ac_ext >&5
7622   rm -rf conftest*
7623   eval "ac_cv_lib_$ac_lib_var=no"
7624 fi
7625 rm -f conftest*
7626 xe_check_libs=""
7627
7628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7629   echo "$ac_t""yes" 1>&6
7630   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7631 else
7632   echo "$ac_t""no" 1>&6
7633 fi
7634
7635
7636 fi
7637
7638
7639 fi
7640
7641
7642   fi
7643
7644     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7645 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7646 echo "configure:7647: checking for jpeglib.h" >&5
7647
7648 cat > conftest.$ac_ext <<EOF
7649 #line 7650 "configure"
7650 #include "confdefs.h"
7651 #include <jpeglib.h>
7652 EOF
7653 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7654 { (eval echo configure:7655: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7655 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7656 if test -z "$ac_err"; then
7657   rm -rf conftest*
7658   eval "ac_cv_header_$ac_safe=yes"
7659 else
7660   echo "$ac_err" >&5
7661   echo "configure: failed program was:" >&5
7662   cat conftest.$ac_ext >&5
7663   rm -rf conftest*
7664   eval "ac_cv_header_$ac_safe=no"
7665 fi
7666 rm -f conftest*
7667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7668   echo "$ac_t""yes" 1>&6
7669   :
7670 else
7671   echo "$ac_t""no" 1>&6
7672 with_jpeg=no
7673 fi
7674  }
7675   test -z "$with_jpeg" && { 
7676 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7677 echo "configure:7678: checking for jpeg_destroy_decompress in -ljpeg" >&5
7678 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7679
7680 xe_check_libs=" -ljpeg "
7681 cat > conftest.$ac_ext <<EOF
7682 #line 7683 "configure"
7683 #include "confdefs.h"
7684 /* Override any gcc2 internal prototype to avoid an error.  */
7685 /* We use char because int might match the return type of a gcc2
7686     builtin and then its argument prototype would still apply.  */
7687 char jpeg_destroy_decompress();
7688
7689 int main() {
7690 jpeg_destroy_decompress()
7691 ; return 0; }
7692 EOF
7693 if { (eval echo configure:7694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7694   rm -rf conftest*
7695   eval "ac_cv_lib_$ac_lib_var=yes"
7696 else
7697   echo "configure: failed program was:" >&5
7698   cat conftest.$ac_ext >&5
7699   rm -rf conftest*
7700   eval "ac_cv_lib_$ac_lib_var=no"
7701 fi
7702 rm -f conftest*
7703 xe_check_libs=""
7704
7705 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7706   echo "$ac_t""yes" 1>&6
7707   :
7708 else
7709   echo "$ac_t""no" 1>&6
7710 with_jpeg=no
7711 fi
7712
7713  }
7714   test -z "$with_jpeg" && with_jpeg=yes
7715   if test "$with_jpeg" = "yes"; then
7716     { test "$extra_verbose" = "yes" && cat << \EOF
7717     Defining HAVE_JPEG
7718 EOF
7719 cat >> confdefs.h <<\EOF
7720 #define HAVE_JPEG 1
7721 EOF
7722 }
7723
7724     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7725   fi
7726
7727     png_problem=""
7728   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7729 echo "configure:7730: checking for pow" >&5
7730
7731 cat > conftest.$ac_ext <<EOF
7732 #line 7733 "configure"
7733 #include "confdefs.h"
7734 /* System header to define __stub macros and hopefully few prototypes,
7735     which can conflict with char pow(); below.  */
7736 #include <assert.h>
7737 /* Override any gcc2 internal prototype to avoid an error.  */
7738 /* We use char because int might match the return type of a gcc2
7739     builtin and then its argument prototype would still apply.  */
7740 char pow();
7741
7742 int main() {
7743
7744 /* The GNU C library defines this for functions which it implements
7745     to always fail with ENOSYS.  Some functions are actually named
7746     something starting with __ and the normal name is an alias.  */
7747 #if defined (__stub_pow) || defined (__stub___pow)
7748 choke me
7749 #else
7750 pow();
7751 #endif
7752
7753 ; return 0; }
7754 EOF
7755 if { (eval echo configure:7756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7756   rm -rf conftest*
7757   eval "ac_cv_func_pow=yes"
7758 else
7759   echo "configure: failed program was:" >&5
7760   cat conftest.$ac_ext >&5
7761   rm -rf conftest*
7762   eval "ac_cv_func_pow=no"
7763 fi
7764 rm -f conftest*
7765
7766 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7767   echo "$ac_t""yes" 1>&6
7768   :
7769 else
7770   echo "$ac_t""no" 1>&6
7771 with_png=no
7772 fi
7773  }
7774   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7775 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7776 echo "configure:7777: checking for png.h" >&5
7777
7778 cat > conftest.$ac_ext <<EOF
7779 #line 7780 "configure"
7780 #include "confdefs.h"
7781 #include <png.h>
7782 EOF
7783 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7784 { (eval echo configure:7785: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7785 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7786 if test -z "$ac_err"; then
7787   rm -rf conftest*
7788   eval "ac_cv_header_$ac_safe=yes"
7789 else
7790   echo "$ac_err" >&5
7791   echo "configure: failed program was:" >&5
7792   cat conftest.$ac_ext >&5
7793   rm -rf conftest*
7794   eval "ac_cv_header_$ac_safe=no"
7795 fi
7796 rm -f conftest*
7797 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7798   echo "$ac_t""yes" 1>&6
7799   :
7800 else
7801   echo "$ac_t""no" 1>&6
7802 with_png=no
7803 fi
7804  }
7805   test -z "$with_png" && { 
7806 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7807 echo "configure:7808: checking for png_read_image in -lpng" >&5
7808 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7809
7810 xe_check_libs=" -lpng "
7811 cat > conftest.$ac_ext <<EOF
7812 #line 7813 "configure"
7813 #include "confdefs.h"
7814 /* Override any gcc2 internal prototype to avoid an error.  */
7815 /* We use char because int might match the return type of a gcc2
7816     builtin and then its argument prototype would still apply.  */
7817 char png_read_image();
7818
7819 int main() {
7820 png_read_image()
7821 ; return 0; }
7822 EOF
7823 if { (eval echo configure:7824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7824   rm -rf conftest*
7825   eval "ac_cv_lib_$ac_lib_var=yes"
7826 else
7827   echo "configure: failed program was:" >&5
7828   cat conftest.$ac_ext >&5
7829   rm -rf conftest*
7830   eval "ac_cv_lib_$ac_lib_var=no"
7831 fi
7832 rm -f conftest*
7833 xe_check_libs=""
7834
7835 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7836   echo "$ac_t""yes" 1>&6
7837   :
7838 else
7839   echo "$ac_t""no" 1>&6
7840 with_png=no
7841 fi
7842
7843  }
7844   if test -z "$with_png"; then
7845     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7846 echo "configure:7847: checking for workable png version information" >&5
7847     xe_check_libs="-lpng -lz"
7848     cat > conftest.$ac_ext <<EOF
7849 #line 7850 "configure"
7850 #include "confdefs.h"
7851 #include <png.h>
7852     int main(int c, char **v) {
7853     if (c == 1) return 0;
7854     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7855     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7856 EOF
7857 if { (eval echo configure:7858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7858 then
7859   ./conftest dummy_arg; png_status=$?;
7860       if test "$png_status" = "0"; then
7861         with_png=yes;
7862       else
7863         with_png=no;
7864         if test "$png_status" = "1"; then
7865           png_problem="PNG library version and header file don't match!"
7866         elif test "$png_status" = "2"; then
7867           png_problem="PNG library version too old (pre 1.0.2)!"
7868         fi
7869         echo "
7870 *** WARNING *** $png_problem
7871   I'm not touching that with a 10-foot pole!
7872   If you really want to use the installed version of libPNG, rerun
7873   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7874     fi
7875 else
7876   conftest_rc="$?"
7877   echo "configure: failed program was:" >&5
7878   cat conftest.$ac_ext >&5
7879   rm -fr conftest*
7880   with_png=no
7881 fi
7882 rm -fr conftest*
7883     xe_check_libs=
7884     echo "$ac_t""$with_png" 1>&6
7885   fi
7886   if test "$with_png" = "yes"; then
7887     { test "$extra_verbose" = "yes" && cat << \EOF
7888     Defining HAVE_PNG
7889 EOF
7890 cat >> confdefs.h <<\EOF
7891 #define HAVE_PNG 1
7892 EOF
7893 }
7894
7895     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7896   fi
7897
7898     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7899 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7900 echo "configure:7901: checking for tiffio.h" >&5
7901
7902 cat > conftest.$ac_ext <<EOF
7903 #line 7904 "configure"
7904 #include "confdefs.h"
7905 #include <tiffio.h>
7906 EOF
7907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7908 { (eval echo configure:7909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7910 if test -z "$ac_err"; then
7911   rm -rf conftest*
7912   eval "ac_cv_header_$ac_safe=yes"
7913 else
7914   echo "$ac_err" >&5
7915   echo "configure: failed program was:" >&5
7916   cat conftest.$ac_ext >&5
7917   rm -rf conftest*
7918   eval "ac_cv_header_$ac_safe=no"
7919 fi
7920 rm -f conftest*
7921 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7922   echo "$ac_t""yes" 1>&6
7923   :
7924 else
7925   echo "$ac_t""no" 1>&6
7926 with_tiff=no
7927 fi
7928  }
7929   test -z "$with_tiff" && { 
7930 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7931 echo "configure:7932: checking for TIFFClientOpen in -ltiff" >&5
7932 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7933
7934 xe_check_libs=" -ltiff "
7935 cat > conftest.$ac_ext <<EOF
7936 #line 7937 "configure"
7937 #include "confdefs.h"
7938 /* Override any gcc2 internal prototype to avoid an error.  */
7939 /* We use char because int might match the return type of a gcc2
7940     builtin and then its argument prototype would still apply.  */
7941 char TIFFClientOpen();
7942
7943 int main() {
7944 TIFFClientOpen()
7945 ; return 0; }
7946 EOF
7947 if { (eval echo configure:7948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7948   rm -rf conftest*
7949   eval "ac_cv_lib_$ac_lib_var=yes"
7950 else
7951   echo "configure: failed program was:" >&5
7952   cat conftest.$ac_ext >&5
7953   rm -rf conftest*
7954   eval "ac_cv_lib_$ac_lib_var=no"
7955 fi
7956 rm -f conftest*
7957 xe_check_libs=""
7958
7959 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7960   echo "$ac_t""yes" 1>&6
7961   :
7962 else
7963   echo "$ac_t""no" 1>&6
7964 with_tiff=no
7965 fi
7966
7967  }
7968   test -z "$with_tiff" && with_tiff=yes
7969   if test "$with_tiff" = "yes"; then
7970     { test "$extra_verbose" = "yes" && cat << \EOF
7971     Defining HAVE_TIFF
7972 EOF
7973 cat >> confdefs.h <<\EOF
7974 #define HAVE_TIFF 1
7975 EOF
7976 }
7977
7978     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7979   fi
7980 fi
7981
7982
7983 if test "$with_x11" = "yes"; then
7984
7985   echo "checking for X11 graphics libraries" 1>&6
7986 echo "configure:7987: checking for X11 graphics libraries" >&5
7987
7988   echo "checking for the Athena widgets" 1>&6
7989 echo "configure:7990: checking for the Athena widgets" >&5
7990
7991     case "$with_athena" in
7992         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7993     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7994     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7995     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7996     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7997     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7998   esac
7999
8000     if test "$athena_3d" = "no"; then
8001     
8002 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
8003 echo "configure:8004: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
8004 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
8005
8006 xe_check_libs=" -l$athena_variant "
8007 cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8010 /* Override any gcc2 internal prototype to avoid an error.  */
8011 /* We use char because int might match the return type of a gcc2
8012     builtin and then its argument prototype would still apply.  */
8013 char XawScrollbarSetThumb();
8014
8015 int main() {
8016 XawScrollbarSetThumb()
8017 ; return 0; }
8018 EOF
8019 if { (eval echo configure:8020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8020   rm -rf conftest*
8021   eval "ac_cv_lib_$ac_lib_var=yes"
8022 else
8023   echo "configure: failed program was:" >&5
8024   cat conftest.$ac_ext >&5
8025   rm -rf conftest*
8026   eval "ac_cv_lib_$ac_lib_var=no"
8027 fi
8028 rm -f conftest*
8029 xe_check_libs=""
8030
8031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8032   echo "$ac_t""yes" 1>&6
8033           
8034 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8035 echo "configure:8036: checking for threeDClassRec in -l$athena_variant" >&5
8036 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8037
8038 xe_check_libs=" -l$athena_variant "
8039 cat > conftest.$ac_ext <<EOF
8040 #line 8041 "configure"
8041 #include "confdefs.h"
8042 /* Override any gcc2 internal prototype to avoid an error.  */
8043 /* We use char because int might match the return type of a gcc2
8044     builtin and then its argument prototype would still apply.  */
8045 char threeDClassRec();
8046
8047 int main() {
8048 threeDClassRec()
8049 ; return 0; }
8050 EOF
8051 if { (eval echo configure:8052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8052   rm -rf conftest*
8053   eval "ac_cv_lib_$ac_lib_var=yes"
8054 else
8055   echo "configure: failed program was:" >&5
8056   cat conftest.$ac_ext >&5
8057   rm -rf conftest*
8058   eval "ac_cv_lib_$ac_lib_var=no"
8059 fi
8060 rm -f conftest*
8061 xe_check_libs=""
8062
8063 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8064   echo "$ac_t""yes" 1>&6
8065   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
8066 else
8067   echo "$ac_t""no" 1>&6
8068 athena_lib=$athena_variant
8069 fi
8070
8071
8072       
8073 else
8074   echo "$ac_t""no" 1>&6
8075 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
8076 fi
8077
8078
8079   else
8080         
8081 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
8082 echo "configure:8083: checking for threeDClassRec in -l$athena_variant" >&5
8083 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
8084
8085 xe_check_libs=" -l$athena_variant "
8086 cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8089 /* Override any gcc2 internal prototype to avoid an error.  */
8090 /* We use char because int might match the return type of a gcc2
8091     builtin and then its argument prototype would still apply.  */
8092 char threeDClassRec();
8093
8094 int main() {
8095 threeDClassRec()
8096 ; return 0; }
8097 EOF
8098 if { (eval echo configure:8099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8099   rm -rf conftest*
8100   eval "ac_cv_lib_$ac_lib_var=yes"
8101 else
8102   echo "configure: failed program was:" >&5
8103   cat conftest.$ac_ext >&5
8104   rm -rf conftest*
8105   eval "ac_cv_lib_$ac_lib_var=no"
8106 fi
8107 rm -f conftest*
8108 xe_check_libs=""
8109
8110 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8111   echo "$ac_t""yes" 1>&6
8112   athena_lib=$athena_variant
8113 else
8114   echo "$ac_t""no" 1>&6
8115 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
8116 echo "configure:8117: checking for threeDClassRec in -lXaw" >&5
8117 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
8118
8119 xe_check_libs=" -lXaw "
8120 cat > conftest.$ac_ext <<EOF
8121 #line 8122 "configure"
8122 #include "confdefs.h"
8123 /* Override any gcc2 internal prototype to avoid an error.  */
8124 /* We use char because int might match the return type of a gcc2
8125     builtin and then its argument prototype would still apply.  */
8126 char threeDClassRec();
8127
8128 int main() {
8129 threeDClassRec()
8130 ; return 0; }
8131 EOF
8132 if { (eval echo configure:8133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8133   rm -rf conftest*
8134   eval "ac_cv_lib_$ac_lib_var=yes"
8135 else
8136   echo "configure: failed program was:" >&5
8137   cat conftest.$ac_ext >&5
8138   rm -rf conftest*
8139   eval "ac_cv_lib_$ac_lib_var=no"
8140 fi
8141 rm -f conftest*
8142 xe_check_libs=""
8143
8144 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8145   echo "$ac_t""yes" 1>&6
8146   athena_lib=Xaw;
8147           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
8148         
8149 else
8150   echo "$ac_t""no" 1>&6
8151 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
8152 fi
8153
8154
8155 fi
8156
8157
8158   fi
8159
8160     if test "$athena_3d" = "no"; then
8161     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8162 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8163 echo "configure:8164: checking for X11/Xaw/ThreeD.h" >&5
8164
8165 cat > conftest.$ac_ext <<EOF
8166 #line 8167 "configure"
8167 #include "confdefs.h"
8168 #include <X11/Xaw/ThreeD.h>
8169 EOF
8170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8171 { (eval echo configure:8172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8172 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8173 if test -z "$ac_err"; then
8174   rm -rf conftest*
8175   eval "ac_cv_header_$ac_safe=yes"
8176 else
8177   echo "$ac_err" >&5
8178   echo "configure: failed program was:" >&5
8179   cat conftest.$ac_ext >&5
8180   rm -rf conftest*
8181   eval "ac_cv_header_$ac_safe=no"
8182 fi
8183 rm -f conftest*
8184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8185   echo "$ac_t""yes" 1>&6
8186   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8187 else
8188   echo "$ac_t""no" 1>&6
8189 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
8190 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
8191 echo "configure:8192: checking for X11/Xaw/XawInit.h" >&5
8192
8193 cat > conftest.$ac_ext <<EOF
8194 #line 8195 "configure"
8195 #include "confdefs.h"
8196 #include <X11/Xaw/XawInit.h>
8197 EOF
8198 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8199 { (eval echo configure:8200: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8200 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8201 if test -z "$ac_err"; then
8202   rm -rf conftest*
8203   eval "ac_cv_header_$ac_safe=yes"
8204 else
8205   echo "$ac_err" >&5
8206   echo "configure: failed program was:" >&5
8207   cat conftest.$ac_ext >&5
8208   rm -rf conftest*
8209   eval "ac_cv_header_$ac_safe=no"
8210 fi
8211 rm -f conftest*
8212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8213   echo "$ac_t""yes" 1>&6
8214   athena_h_path=X11/Xaw
8215 else
8216   echo "$ac_t""no" 1>&6
8217 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
8218 fi
8219
8220 fi
8221
8222   else
8223             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8224 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
8225 echo "configure:8226: checking for X11/$athena_variant/XawInit.h" >&5
8226
8227 cat > conftest.$ac_ext <<EOF
8228 #line 8229 "configure"
8229 #include "confdefs.h"
8230 #include <X11/$athena_variant/XawInit.h>
8231 EOF
8232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8233 { (eval echo configure:8234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8235 if test -z "$ac_err"; then
8236   rm -rf conftest*
8237   eval "ac_cv_header_$ac_safe=yes"
8238 else
8239   echo "$ac_err" >&5
8240   echo "configure: failed program was:" >&5
8241   cat conftest.$ac_ext >&5
8242   rm -rf conftest*
8243   eval "ac_cv_header_$ac_safe=no"
8244 fi
8245 rm -f conftest*
8246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8247   echo "$ac_t""yes" 1>&6
8248   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8249 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8250 echo "configure:8251: checking for X11/$athena_variant/ThreeD.h" >&5
8251
8252 cat > conftest.$ac_ext <<EOF
8253 #line 8254 "configure"
8254 #include "confdefs.h"
8255 #include <X11/$athena_variant/ThreeD.h>
8256 EOF
8257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8258 { (eval echo configure:8259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8260 if test -z "$ac_err"; then
8261   rm -rf conftest*
8262   eval "ac_cv_header_$ac_safe=yes"
8263 else
8264   echo "$ac_err" >&5
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_header_$ac_safe=no"
8269 fi
8270 rm -f conftest*
8271 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8272   echo "$ac_t""yes" 1>&6
8273   athena_h_path=X11/$athena_variant
8274 else
8275   echo "$ac_t""no" 1>&6
8276 fi
8277
8278 else
8279   echo "$ac_t""no" 1>&6
8280 fi
8281
8282
8283         if test -z "$athena_h_path"; then
8284       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8285 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8286 echo "configure:8287: checking for $athena_variant/XawInit.h" >&5
8287
8288 cat > conftest.$ac_ext <<EOF
8289 #line 8290 "configure"
8290 #include "confdefs.h"
8291 #include <$athena_variant/XawInit.h>
8292 EOF
8293 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8294 { (eval echo configure:8295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8295 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8296 if test -z "$ac_err"; then
8297   rm -rf conftest*
8298   eval "ac_cv_header_$ac_safe=yes"
8299 else
8300   echo "$ac_err" >&5
8301   echo "configure: failed program was:" >&5
8302   cat conftest.$ac_ext >&5
8303   rm -rf conftest*
8304   eval "ac_cv_header_$ac_safe=no"
8305 fi
8306 rm -f conftest*
8307 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8308   echo "$ac_t""yes" 1>&6
8309   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8310 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8311 echo "configure:8312: checking for $athena_variant/ThreeD.h" >&5
8312
8313 cat > conftest.$ac_ext <<EOF
8314 #line 8315 "configure"
8315 #include "confdefs.h"
8316 #include <$athena_variant/ThreeD.h>
8317 EOF
8318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8319 { (eval echo configure:8320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8321 if test -z "$ac_err"; then
8322   rm -rf conftest*
8323   eval "ac_cv_header_$ac_safe=yes"
8324 else
8325   echo "$ac_err" >&5
8326   echo "configure: failed program was:" >&5
8327   cat conftest.$ac_ext >&5
8328   rm -rf conftest*
8329   eval "ac_cv_header_$ac_safe=no"
8330 fi
8331 rm -f conftest*
8332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8333   echo "$ac_t""yes" 1>&6
8334   athena_h_path=$athena_variant
8335 else
8336   echo "$ac_t""no" 1>&6
8337 fi
8338
8339 else
8340   echo "$ac_t""no" 1>&6
8341 fi
8342
8343     fi
8344
8345         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8346       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8347 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8348 echo "configure:8349: checking for X11/Xaw3d/XawInit.h" >&5
8349
8350 cat > conftest.$ac_ext <<EOF
8351 #line 8352 "configure"
8352 #include "confdefs.h"
8353 #include <X11/Xaw3d/XawInit.h>
8354 EOF
8355 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8356 { (eval echo configure:8357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8357 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8358 if test -z "$ac_err"; then
8359   rm -rf conftest*
8360   eval "ac_cv_header_$ac_safe=yes"
8361 else
8362   echo "$ac_err" >&5
8363   echo "configure: failed program was:" >&5
8364   cat conftest.$ac_ext >&5
8365   rm -rf conftest*
8366   eval "ac_cv_header_$ac_safe=no"
8367 fi
8368 rm -f conftest*
8369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8370   echo "$ac_t""yes" 1>&6
8371   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8372 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8373 echo "configure:8374: checking for X11/Xaw3d/ThreeD.h" >&5
8374
8375 cat > conftest.$ac_ext <<EOF
8376 #line 8377 "configure"
8377 #include "confdefs.h"
8378 #include <X11/Xaw3d/ThreeD.h>
8379 EOF
8380 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8381 { (eval echo configure:8382: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8382 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8383 if test -z "$ac_err"; then
8384   rm -rf conftest*
8385   eval "ac_cv_header_$ac_safe=yes"
8386 else
8387   echo "$ac_err" >&5
8388   echo "configure: failed program was:" >&5
8389   cat conftest.$ac_ext >&5
8390   rm -rf conftest*
8391   eval "ac_cv_header_$ac_safe=no"
8392 fi
8393 rm -f conftest*
8394 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396   
8397             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8398             athena_h_path=X11/Xaw3d
8399           
8400 else
8401   echo "$ac_t""no" 1>&6
8402 fi
8403
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407
8408     fi
8409
8410         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8411       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8412 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8413 echo "configure:8414: checking for Xaw3d/XawInit.h" >&5
8414
8415 cat > conftest.$ac_ext <<EOF
8416 #line 8417 "configure"
8417 #include "confdefs.h"
8418 #include <Xaw3d/XawInit.h>
8419 EOF
8420 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8421 { (eval echo configure:8422: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8422 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8423 if test -z "$ac_err"; then
8424   rm -rf conftest*
8425   eval "ac_cv_header_$ac_safe=yes"
8426 else
8427   echo "$ac_err" >&5
8428   echo "configure: failed program was:" >&5
8429   cat conftest.$ac_ext >&5
8430   rm -rf conftest*
8431   eval "ac_cv_header_$ac_safe=no"
8432 fi
8433 rm -f conftest*
8434 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8435   echo "$ac_t""yes" 1>&6
8436   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8437 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8438 echo "configure:8439: checking for Xaw3d/ThreeD.h" >&5
8439
8440 cat > conftest.$ac_ext <<EOF
8441 #line 8442 "configure"
8442 #include "confdefs.h"
8443 #include <Xaw3d/ThreeD.h>
8444 EOF
8445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8446 { (eval echo configure:8447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8448 if test -z "$ac_err"; then
8449   rm -rf conftest*
8450   eval "ac_cv_header_$ac_safe=yes"
8451 else
8452   echo "$ac_err" >&5
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   eval "ac_cv_header_$ac_safe=no"
8457 fi
8458 rm -f conftest*
8459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8460   echo "$ac_t""yes" 1>&6
8461   
8462             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8463             athena_h_path=Xaw3d
8464           
8465 else
8466   echo "$ac_t""no" 1>&6
8467 fi
8468
8469 else
8470   echo "$ac_t""no" 1>&6
8471 fi
8472
8473     fi
8474
8475             if test -z "$athena_h_path"; then
8476       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8477 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8478 echo "configure:8479: checking for X11/Xaw/ThreeD.h" >&5
8479
8480 cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 #include <X11/Xaw/ThreeD.h>
8484 EOF
8485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8486 { (eval echo configure:8487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8488 if test -z "$ac_err"; then
8489   rm -rf conftest*
8490   eval "ac_cv_header_$ac_safe=yes"
8491 else
8492   echo "$ac_err" >&5
8493   echo "configure: failed program was:" >&5
8494   cat conftest.$ac_ext >&5
8495   rm -rf conftest*
8496   eval "ac_cv_header_$ac_safe=no"
8497 fi
8498 rm -f conftest*
8499 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8500   echo "$ac_t""yes" 1>&6
8501   
8502           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8503           athena_h_path=X11/Xaw
8504         
8505 else
8506   echo "$ac_t""no" 1>&6
8507 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8508 fi
8509
8510     fi
8511   fi
8512
8513     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8514     have_xaw=yes
8515   else
8516     have_xaw=no
8517   fi
8518
8519     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8520 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8521 echo "configure:8522: checking for Xm/Xm.h" >&5
8522
8523 cat > conftest.$ac_ext <<EOF
8524 #line 8525 "configure"
8525 #include "confdefs.h"
8526 #include <Xm/Xm.h>
8527 EOF
8528 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8529 { (eval echo configure:8530: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8530 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8531 if test -z "$ac_err"; then
8532   rm -rf conftest*
8533   eval "ac_cv_header_$ac_safe=yes"
8534 else
8535   echo "$ac_err" >&5
8536   echo "configure: failed program was:" >&5
8537   cat conftest.$ac_ext >&5
8538   rm -rf conftest*
8539   eval "ac_cv_header_$ac_safe=no"
8540 fi
8541 rm -f conftest*
8542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8543   echo "$ac_t""yes" 1>&6
8544   
8545 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8546 echo "configure:8547: checking for XmStringFree in -lXm" >&5
8547 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8548
8549 xe_check_libs=" -lXm "
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 /* Override any gcc2 internal prototype to avoid an error.  */
8554 /* We use char because int might match the return type of a gcc2
8555     builtin and then its argument prototype would still apply.  */
8556 char XmStringFree();
8557
8558 int main() {
8559 XmStringFree()
8560 ; return 0; }
8561 EOF
8562 if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8563   rm -rf conftest*
8564   eval "ac_cv_lib_$ac_lib_var=yes"
8565 else
8566   echo "configure: failed program was:" >&5
8567   cat conftest.$ac_ext >&5
8568   rm -rf conftest*
8569   eval "ac_cv_lib_$ac_lib_var=no"
8570 fi
8571 rm -f conftest*
8572 xe_check_libs=""
8573
8574 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8575   echo "$ac_t""yes" 1>&6
8576   have_motif=yes
8577 else
8578   echo "$ac_t""no" 1>&6
8579 have_motif=no
8580 fi
8581
8582
8583 else
8584   echo "$ac_t""no" 1>&6
8585 have_motif=no
8586 fi
8587
8588
8589   if test "$have_motif" = "yes"; then
8590         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8591 echo "configure:8592: checking for Lesstif" >&5
8592     cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <Xm/Xm.h>
8596 #ifdef LESSTIF_VERSION
8597 yes
8598 #endif
8599
8600 EOF
8601 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8602   egrep "yes" >/dev/null 2>&1; then
8603   rm -rf conftest*
8604   have_lesstif=yes
8605 else
8606   rm -rf conftest*
8607   have_lesstif=no
8608 fi
8609 rm -f conftest*
8610
8611   echo "$ac_t""$have_lesstif" 1>&6
8612   fi
8613
8614 fi 
8615
8616 case "$with_menubars" in "" | "yes" | "athena" )
8617   with_menubars="lucid" ;;
8618 esac
8619 case "$with_dialogs" in "" | "yes" | "lucid" )
8620   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8621   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8622   else with_dialogs=no
8623   fi ;;
8624 esac
8625 case "$with_scrollbars" in "" | "yes" )
8626   with_scrollbars="lucid" ;;
8627 esac
8628 case "$with_widgets" in "" | "yes" | "lucid")
8629   if   test "$have_motif" = "yes"; then with_widgets="motif"
8630   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8631   else with_widgets=no
8632   fi ;;
8633 esac
8634
8635 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8636
8637 case "$all_widgets" in
8638   *athena* )
8639     if test "$have_xaw" != "yes"; then
8640       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8641     fi
8642
8643         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8644
8645         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8646
8647             { test "$extra_verbose" = "yes" && cat << EOF
8648     Defining ATHENA_H_PATH = $athena_h_path
8649 EOF
8650 cat >> confdefs.h <<EOF
8651 #define ATHENA_H_PATH $athena_h_path
8652 EOF
8653 }
8654
8655
8656     { test "$extra_verbose" = "yes" && cat << \EOF
8657     Defining LWLIB_USES_ATHENA
8658 EOF
8659 cat >> confdefs.h <<\EOF
8660 #define LWLIB_USES_ATHENA 1
8661 EOF
8662 }
8663
8664     { test "$extra_verbose" = "yes" && cat << \EOF
8665     Defining NEED_ATHENA
8666 EOF
8667 cat >> confdefs.h <<\EOF
8668 #define NEED_ATHENA 1
8669 EOF
8670 }
8671
8672
8673     if test "$athena_3d" = "yes"; then
8674       { test "$extra_verbose" = "yes" && cat << \EOF
8675     Defining HAVE_ATHENA_3D
8676 EOF
8677 cat >> confdefs.h <<\EOF
8678 #define HAVE_ATHENA_3D 1
8679 EOF
8680 }
8681
8682     fi
8683   ;;
8684 esac
8685
8686 case "$all_widgets" in *motif* )
8687   { test "$extra_verbose" = "yes" && cat << \EOF
8688     Defining LWLIB_USES_MOTIF
8689 EOF
8690 cat >> confdefs.h <<\EOF
8691 #define LWLIB_USES_MOTIF 1
8692 EOF
8693 }
8694
8695   { test "$extra_verbose" = "yes" && cat << \EOF
8696     Defining NEED_MOTIF
8697 EOF
8698 cat >> confdefs.h <<\EOF
8699 #define NEED_MOTIF 1
8700 EOF
8701 }
8702
8703   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8704   need_motif=yes ;;
8705 esac
8706
8707 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8708 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8709 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8710 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8711         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8712 case "$with_widgets" in athena* )
8713         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;;
8714 esac
8715 case "$all_widgets" in *lucid* )
8716   { test "$extra_verbose" = "yes" && cat << \EOF
8717     Defining NEED_LUCID
8718 EOF
8719 cat >> confdefs.h <<\EOF
8720 #define NEED_LUCID 1
8721 EOF
8722 }
8723
8724   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8725 esac
8726
8727
8728
8729 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8730     Defining LWLIB_SCROLLBARS_ATHENA
8731 EOF
8732 cat >> confdefs.h <<\EOF
8733 #define LWLIB_SCROLLBARS_ATHENA 1
8734 EOF
8735 }
8736
8737 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8738     Defining LWLIB_DIALOGS_ATHENA
8739 EOF
8740 cat >> confdefs.h <<\EOF
8741 #define LWLIB_DIALOGS_ATHENA 1
8742 EOF
8743 }
8744
8745
8746 if test "$athena_3d" = "yes"; then
8747   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8748     Defining LWLIB_SCROLLBARS_ATHENA3D
8749 EOF
8750 cat >> confdefs.h <<\EOF
8751 #define LWLIB_SCROLLBARS_ATHENA3D 1
8752 EOF
8753 }
8754
8755   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8756     Defining LWLIB_DIALOGS_ATHENA3D
8757 EOF
8758 cat >> confdefs.h <<\EOF
8759 #define LWLIB_DIALOGS_ATHENA3D 1
8760 EOF
8761 }
8762
8763 fi
8764
8765 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8766     Defining LWLIB_WIDGETS_ATHENA
8767 EOF
8768 cat >> confdefs.h <<\EOF
8769 #define LWLIB_WIDGETS_ATHENA 1
8770 EOF
8771 }
8772 ;; esac
8773 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8774         { test "$extra_verbose" = "yes" && cat << \EOF
8775     Defining LWLIB_TABS_LUCID
8776 EOF
8777 cat >> confdefs.h <<\EOF
8778 #define LWLIB_TABS_LUCID 1
8779 EOF
8780 }
8781
8782
8783 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8784     Defining HAVE_MENUBARS
8785 EOF
8786 cat >> confdefs.h <<\EOF
8787 #define HAVE_MENUBARS 1
8788 EOF
8789 }
8790
8791 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8792     Defining HAVE_SCROLLBARS
8793 EOF
8794 cat >> confdefs.h <<\EOF
8795 #define HAVE_SCROLLBARS 1
8796 EOF
8797 }
8798
8799 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8800     Defining HAVE_DIALOGS
8801 EOF
8802 cat >> confdefs.h <<\EOF
8803 #define HAVE_DIALOGS 1
8804 EOF
8805 }
8806
8807 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8808     Defining HAVE_TOOLBARS
8809 EOF
8810 cat >> confdefs.h <<\EOF
8811 #define HAVE_TOOLBARS 1
8812 EOF
8813 }
8814
8815 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8816     Defining HAVE_WIDGETS
8817 EOF
8818 cat >> confdefs.h <<\EOF
8819 #define HAVE_WIDGETS 1
8820 EOF
8821 }
8822
8823
8824 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8825     Defining LWLIB_MENUBARS_LUCID
8826 EOF
8827 cat >> confdefs.h <<\EOF
8828 #define LWLIB_MENUBARS_LUCID 1
8829 EOF
8830 }
8831
8832 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8833     Defining LWLIB_SCROLLBARS_LUCID
8834 EOF
8835 cat >> confdefs.h <<\EOF
8836 #define LWLIB_SCROLLBARS_LUCID 1
8837 EOF
8838 }
8839
8840
8841 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8842     Defining LWLIB_MENUBARS_MOTIF
8843 EOF
8844 cat >> confdefs.h <<\EOF
8845 #define LWLIB_MENUBARS_MOTIF 1
8846 EOF
8847 }
8848
8849 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8850     Defining LWLIB_SCROLLBARS_MOTIF
8851 EOF
8852 cat >> confdefs.h <<\EOF
8853 #define LWLIB_SCROLLBARS_MOTIF 1
8854 EOF
8855 }
8856
8857 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8858     Defining LWLIB_DIALOGS_MOTIF
8859 EOF
8860 cat >> confdefs.h <<\EOF
8861 #define LWLIB_DIALOGS_MOTIF 1
8862 EOF
8863 }
8864
8865 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8866     Defining LWLIB_WIDGETS_MOTIF
8867 EOF
8868 cat >> confdefs.h <<\EOF
8869 #define LWLIB_WIDGETS_MOTIF 1
8870 EOF
8871 }
8872
8873
8874 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8875    echo "    xemacs will be linked with \"menubar.o\""
8876  fi
8877 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8878    echo "    xemacs will be linked with \"scrollbar.o\""
8879  fi
8880 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8881    echo "    xemacs will be linked with \"dialog.o\""
8882  fi
8883 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8884    echo "    xemacs will be linked with \"toolbar.o\""
8885  fi
8886
8887 if test "$with_x11" = "yes"; then
8888   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8889    echo "    xemacs will be linked with \"menubar-x.o\""
8890  fi
8891   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8892    echo "    xemacs will be linked with \"scrollbar-x.o\""
8893  fi
8894   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8895    echo "    xemacs will be linked with \"dialog-x.o\""
8896  fi
8897   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8898    echo "    xemacs will be linked with \"toolbar-x.o\""
8899  fi
8900   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8901    echo "    xemacs will be linked with \"gui-x.o\""
8902  fi
8903 fi
8904
8905
8906 test -z "$with_mule" && with_mule=no
8907 test -z "$with_file_coding" && with_file_coding=no
8908
8909
8910 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8911   { test "$extra_verbose" = "yes" && cat << \EOF
8912     Defining FILE_CODING
8913 EOF
8914 cat >> confdefs.h <<\EOF
8915 #define FILE_CODING 1
8916 EOF
8917 }
8918
8919   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8920    echo "    xemacs will be linked with \"file-coding.o\""
8921  fi
8922 fi
8923
8924 if test "$with_mule" = "yes" ; then
8925   echo "checking for Mule-related features" 1>&6
8926 echo "configure:8927: checking for Mule-related features" >&5
8927   { test "$extra_verbose" = "yes" && cat << \EOF
8928     Defining MULE
8929 EOF
8930 cat >> confdefs.h <<\EOF
8931 #define MULE 1
8932 EOF
8933 }
8934
8935   { test "$extra_verbose" = "yes" && cat << \EOF
8936     Defining FILE_CODING
8937 EOF
8938 cat >> confdefs.h <<\EOF
8939 #define FILE_CODING 1
8940 EOF
8941 }
8942
8943   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8944    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8945  fi
8946
8947     for ac_hdr in libintl.h
8948 do
8949 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8950 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8951 echo "configure:8952: checking for $ac_hdr" >&5
8952
8953 cat > conftest.$ac_ext <<EOF
8954 #line 8955 "configure"
8955 #include "confdefs.h"
8956 #include <$ac_hdr>
8957 EOF
8958 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8959 { (eval echo configure:8960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8960 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8961 if test -z "$ac_err"; then
8962   rm -rf conftest*
8963   eval "ac_cv_header_$ac_safe=yes"
8964 else
8965   echo "$ac_err" >&5
8966   echo "configure: failed program was:" >&5
8967   cat conftest.$ac_ext >&5
8968   rm -rf conftest*
8969   eval "ac_cv_header_$ac_safe=no"
8970 fi
8971 rm -f conftest*
8972 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8973   echo "$ac_t""yes" 1>&6
8974     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8975   { test "$extra_verbose" = "yes" && cat << EOF
8976     Defining $ac_tr_hdr
8977 EOF
8978 cat >> confdefs.h <<EOF
8979 #define $ac_tr_hdr 1
8980 EOF
8981 }
8982  
8983 else
8984   echo "$ac_t""no" 1>&6
8985 fi
8986 done
8987
8988   
8989 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8990 echo "configure:8991: checking for strerror in -lintl" >&5
8991 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8992
8993 xe_check_libs=" -lintl "
8994 cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* Override any gcc2 internal prototype to avoid an error.  */
8998 /* We use char because int might match the return type of a gcc2
8999     builtin and then its argument prototype would still apply.  */
9000 char strerror();
9001
9002 int main() {
9003 strerror()
9004 ; return 0; }
9005 EOF
9006 if { (eval echo configure:9007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9007   rm -rf conftest*
9008   eval "ac_cv_lib_$ac_lib_var=yes"
9009 else
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_lib_$ac_lib_var=no"
9014 fi
9015 rm -f conftest*
9016 xe_check_libs=""
9017
9018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9019   echo "$ac_t""yes" 1>&6
9020     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9021     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9022   { test "$extra_verbose" = "yes" && cat << EOF
9023     Defining $ac_tr_lib
9024 EOF
9025 cat >> confdefs.h <<EOF
9026 #define $ac_tr_lib 1
9027 EOF
9028 }
9029
9030   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
9031
9032 else
9033   echo "$ac_t""no" 1>&6
9034 fi
9035
9036
9037
9038   echo "checking for Mule input methods" 1>&6
9039 echo "configure:9040: checking for Mule input methods" >&5
9040         case "$with_xim" in "" | "yes" )
9041     echo "checking for XIM" 1>&6
9042 echo "configure:9043: checking for XIM" >&5
9043     
9044 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
9045 echo "configure:9046: checking for XOpenIM in -lX11" >&5
9046 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
9047
9048 xe_check_libs=" -lX11 "
9049 cat > conftest.$ac_ext <<EOF
9050 #line 9051 "configure"
9051 #include "confdefs.h"
9052 /* Override any gcc2 internal prototype to avoid an error.  */
9053 /* We use char because int might match the return type of a gcc2
9054     builtin and then its argument prototype would still apply.  */
9055 char XOpenIM();
9056
9057 int main() {
9058 XOpenIM()
9059 ; return 0; }
9060 EOF
9061 if { (eval echo configure:9062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=yes"
9064 else
9065   echo "configure: failed program was:" >&5
9066   cat conftest.$ac_ext >&5
9067   rm -rf conftest*
9068   eval "ac_cv_lib_$ac_lib_var=no"
9069 fi
9070 rm -f conftest*
9071 xe_check_libs=""
9072
9073 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9074   echo "$ac_t""yes" 1>&6
9075   with_xim=xlib
9076 else
9077   echo "$ac_t""no" 1>&6
9078 with_xim=no
9079 fi
9080
9081
9082         if test "$have_motif $have_lesstif" = "yes no"; then
9083       
9084 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
9085 echo "configure:9086: checking for XmImMbLookupString in -lXm" >&5
9086 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
9087
9088 xe_check_libs=" -lXm "
9089 cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092 /* Override any gcc2 internal prototype to avoid an error.  */
9093 /* We use char because int might match the return type of a gcc2
9094     builtin and then its argument prototype would still apply.  */
9095 char XmImMbLookupString();
9096
9097 int main() {
9098 XmImMbLookupString()
9099 ; return 0; }
9100 EOF
9101 if { (eval echo configure:9102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9102   rm -rf conftest*
9103   eval "ac_cv_lib_$ac_lib_var=yes"
9104 else
9105   echo "configure: failed program was:" >&5
9106   cat conftest.$ac_ext >&5
9107   rm -rf conftest*
9108   eval "ac_cv_lib_$ac_lib_var=no"
9109 fi
9110 rm -f conftest*
9111 xe_check_libs=""
9112
9113 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9114   echo "$ac_t""yes" 1>&6
9115   with_xim=motif
9116 else
9117   echo "$ac_t""no" 1>&6
9118 fi
9119
9120
9121     fi ;;
9122   esac
9123   if test "$with_xim" != "no"; then
9124     { test "$extra_verbose" = "yes" && cat << \EOF
9125     Defining HAVE_XIM
9126 EOF
9127 cat >> confdefs.h <<\EOF
9128 #define HAVE_XIM 1
9129 EOF
9130 }
9131
9132     if test "$with_xim" = "xlib"; then
9133       { test "$extra_verbose" = "yes" && cat << \EOF
9134     Defining XIM_XLIB
9135 EOF
9136 cat >> confdefs.h <<\EOF
9137 #define XIM_XLIB 1
9138 EOF
9139 }
9140
9141       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
9142    echo "    xemacs will be linked with \"input-method-xlib.o\""
9143  fi
9144     fi
9145     if test "$with_xim" = "motif"; then
9146       { test "$extra_verbose" = "yes" && cat << \EOF
9147     Defining XIM_MOTIF
9148 EOF
9149 cat >> confdefs.h <<\EOF
9150 #define XIM_MOTIF 1
9151 EOF
9152 }
9153
9154       need_motif=yes
9155       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
9156    echo "    xemacs will be linked with \"input-method-motif.o\""
9157  fi
9158     fi
9159     if test "$with_xim" = "motif"; then
9160       with_xfs=no
9161     fi
9162   fi
9163
9164     if test "$with_xfs" = "yes" ; then
9165     echo "checking for XFontSet" 1>&6
9166 echo "configure:9167: checking for XFontSet" >&5
9167     
9168 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
9169 echo "configure:9170: checking for XmbDrawString in -lX11" >&5
9170 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
9171
9172 xe_check_libs=" -lX11 "
9173 cat > conftest.$ac_ext <<EOF
9174 #line 9175 "configure"
9175 #include "confdefs.h"
9176 /* Override any gcc2 internal prototype to avoid an error.  */
9177 /* We use char because int might match the return type of a gcc2
9178     builtin and then its argument prototype would still apply.  */
9179 char XmbDrawString();
9180
9181 int main() {
9182 XmbDrawString()
9183 ; return 0; }
9184 EOF
9185 if { (eval echo configure:9186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9186   rm -rf conftest*
9187   eval "ac_cv_lib_$ac_lib_var=yes"
9188 else
9189   echo "configure: failed program was:" >&5
9190   cat conftest.$ac_ext >&5
9191   rm -rf conftest*
9192   eval "ac_cv_lib_$ac_lib_var=no"
9193 fi
9194 rm -f conftest*
9195 xe_check_libs=""
9196
9197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9198   echo "$ac_t""yes" 1>&6
9199   :
9200 else
9201   echo "$ac_t""no" 1>&6
9202 with_xfs=no
9203 fi
9204
9205
9206     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
9207       { test "$extra_verbose" = "yes" && cat << \EOF
9208     Defining USE_XFONTSET
9209 EOF
9210 cat >> confdefs.h <<\EOF
9211 #define USE_XFONTSET 1
9212 EOF
9213 }
9214
9215       if test "$with_xim" = "no" ; then
9216         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
9217    echo "    xemacs will be linked with \"input-method-xfs.o\""
9218  fi
9219       fi
9220     fi
9221   fi 
9222     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
9223   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
9224 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
9225 echo "configure:9226: checking for wnn/jllib.h" >&5
9226
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 #include <wnn/jllib.h>
9231 EOF
9232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9233 { (eval echo configure:9234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9235 if test -z "$ac_err"; then
9236   rm -rf conftest*
9237   eval "ac_cv_header_$ac_safe=yes"
9238 else
9239   echo "$ac_err" >&5
9240   echo "configure: failed program was:" >&5
9241   cat conftest.$ac_ext >&5
9242   rm -rf conftest*
9243   eval "ac_cv_header_$ac_safe=no"
9244 fi
9245 rm -f conftest*
9246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9247   echo "$ac_t""yes" 1>&6
9248   :
9249 else
9250   echo "$ac_t""no" 1>&6
9251 with_wnn=no
9252 fi
9253  }
9254     if test "$with_wnn" != "no"; then
9255     for ac_func in crypt
9256 do
9257 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9258 echo "configure:9259: checking for $ac_func" >&5
9259
9260 cat > conftest.$ac_ext <<EOF
9261 #line 9262 "configure"
9262 #include "confdefs.h"
9263 /* System header to define __stub macros and hopefully few prototypes,
9264     which can conflict with char $ac_func(); below.  */
9265 #include <assert.h>
9266 /* Override any gcc2 internal prototype to avoid an error.  */
9267 /* We use char because int might match the return type of a gcc2
9268     builtin and then its argument prototype would still apply.  */
9269 char $ac_func();
9270
9271 int main() {
9272
9273 /* The GNU C library defines this for functions which it implements
9274     to always fail with ENOSYS.  Some functions are actually named
9275     something starting with __ and the normal name is an alias.  */
9276 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9277 choke me
9278 #else
9279 $ac_func();
9280 #endif
9281
9282 ; return 0; }
9283 EOF
9284 if { (eval echo configure:9285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9285   rm -rf conftest*
9286   eval "ac_cv_func_$ac_func=yes"
9287 else
9288   echo "configure: failed program was:" >&5
9289   cat conftest.$ac_ext >&5
9290   rm -rf conftest*
9291   eval "ac_cv_func_$ac_func=no"
9292 fi
9293 rm -f conftest*
9294
9295 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9296   echo "$ac_t""yes" 1>&6
9297     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9298   { test "$extra_verbose" = "yes" && cat << EOF
9299     Defining $ac_tr_func
9300 EOF
9301 cat >> confdefs.h <<EOF
9302 #define $ac_tr_func 1
9303 EOF
9304 }
9305  
9306 else
9307   echo "$ac_t""no" 1>&6
9308 fi
9309 done
9310
9311     test "$ac_cv_func_crypt" != "yes" && { 
9312 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9313 echo "configure:9314: checking for crypt in -lcrypt" >&5
9314 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9315
9316 xe_check_libs=" -lcrypt "
9317 cat > conftest.$ac_ext <<EOF
9318 #line 9319 "configure"
9319 #include "confdefs.h"
9320 /* Override any gcc2 internal prototype to avoid an error.  */
9321 /* We use char because int might match the return type of a gcc2
9322     builtin and then its argument prototype would still apply.  */
9323 char crypt();
9324
9325 int main() {
9326 crypt()
9327 ; return 0; }
9328 EOF
9329 if { (eval echo configure:9330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9330   rm -rf conftest*
9331   eval "ac_cv_lib_$ac_lib_var=yes"
9332 else
9333   echo "configure: failed program was:" >&5
9334   cat conftest.$ac_ext >&5
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=no"
9337 fi
9338 rm -f conftest*
9339 xe_check_libs=""
9340
9341 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9342   echo "$ac_t""yes" 1>&6
9343     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9344     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9345   { test "$extra_verbose" = "yes" && cat << EOF
9346     Defining $ac_tr_lib
9347 EOF
9348 cat >> confdefs.h <<EOF
9349 #define $ac_tr_lib 1
9350 EOF
9351 }
9352
9353   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359  }
9360   fi
9361     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9362     
9363 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9364 echo "configure:9365: checking for jl_dic_list_e in -lwnn" >&5
9365 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9366
9367 xe_check_libs=" -lwnn "
9368 cat > conftest.$ac_ext <<EOF
9369 #line 9370 "configure"
9370 #include "confdefs.h"
9371 /* Override any gcc2 internal prototype to avoid an error.  */
9372 /* We use char because int might match the return type of a gcc2
9373     builtin and then its argument prototype would still apply.  */
9374 char jl_dic_list_e();
9375
9376 int main() {
9377 jl_dic_list_e()
9378 ; return 0; }
9379 EOF
9380 if { (eval echo configure:9381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=yes"
9383 else
9384   echo "configure: failed program was:" >&5
9385   cat conftest.$ac_ext >&5
9386   rm -rf conftest*
9387   eval "ac_cv_lib_$ac_lib_var=no"
9388 fi
9389 rm -f conftest*
9390 xe_check_libs=""
9391
9392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9393   echo "$ac_t""yes" 1>&6
9394   libwnn=wnn
9395 else
9396   echo "$ac_t""no" 1>&6
9397 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9398 echo "configure:9399: checking for jl_dic_list_e in -lwnn4" >&5
9399 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9400
9401 xe_check_libs=" -lwnn4 "
9402 cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9405 /* Override any gcc2 internal prototype to avoid an error.  */
9406 /* We use char because int might match the return type of a gcc2
9407     builtin and then its argument prototype would still apply.  */
9408 char jl_dic_list_e();
9409
9410 int main() {
9411 jl_dic_list_e()
9412 ; return 0; }
9413 EOF
9414 if { (eval echo configure:9415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9415   rm -rf conftest*
9416   eval "ac_cv_lib_$ac_lib_var=yes"
9417 else
9418   echo "configure: failed program was:" >&5
9419   cat conftest.$ac_ext >&5
9420   rm -rf conftest*
9421   eval "ac_cv_lib_$ac_lib_var=no"
9422 fi
9423 rm -f conftest*
9424 xe_check_libs=""
9425
9426 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9427   echo "$ac_t""yes" 1>&6
9428   libwnn=wnn4
9429 else
9430   echo "$ac_t""no" 1>&6
9431 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9432 echo "configure:9433: checking for jl_dic_list_e in -lwnn6" >&5
9433 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9434
9435 xe_check_libs=" -lwnn6 "
9436 cat > conftest.$ac_ext <<EOF
9437 #line 9438 "configure"
9438 #include "confdefs.h"
9439 /* Override any gcc2 internal prototype to avoid an error.  */
9440 /* We use char because int might match the return type of a gcc2
9441     builtin and then its argument prototype would still apply.  */
9442 char jl_dic_list_e();
9443
9444 int main() {
9445 jl_dic_list_e()
9446 ; return 0; }
9447 EOF
9448 if { (eval echo configure:9449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9449   rm -rf conftest*
9450   eval "ac_cv_lib_$ac_lib_var=yes"
9451 else
9452   echo "configure: failed program was:" >&5
9453   cat conftest.$ac_ext >&5
9454   rm -rf conftest*
9455   eval "ac_cv_lib_$ac_lib_var=no"
9456 fi
9457 rm -f conftest*
9458 xe_check_libs=""
9459
9460 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9461   echo "$ac_t""yes" 1>&6
9462   libwnn=wnn6
9463 else
9464   echo "$ac_t""no" 1>&6
9465 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9466 echo "configure:9467: checking for dic_list_e in -lwnn6_fromsrc" >&5
9467 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9468
9469 xe_check_libs=" -lwnn6_fromsrc "
9470 cat > conftest.$ac_ext <<EOF
9471 #line 9472 "configure"
9472 #include "confdefs.h"
9473 /* Override any gcc2 internal prototype to avoid an error.  */
9474 /* We use char because int might match the return type of a gcc2
9475     builtin and then its argument prototype would still apply.  */
9476 char dic_list_e();
9477
9478 int main() {
9479 dic_list_e()
9480 ; return 0; }
9481 EOF
9482 if { (eval echo configure:9483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9483   rm -rf conftest*
9484   eval "ac_cv_lib_$ac_lib_var=yes"
9485 else
9486   echo "configure: failed program was:" >&5
9487   cat conftest.$ac_ext >&5
9488   rm -rf conftest*
9489   eval "ac_cv_lib_$ac_lib_var=no"
9490 fi
9491 rm -f conftest*
9492 xe_check_libs=""
9493
9494 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9495   echo "$ac_t""yes" 1>&6
9496   libwnn=wnn6_fromsrc
9497 else
9498   echo "$ac_t""no" 1>&6
9499 with_wnn=no
9500 fi
9501
9502
9503 fi
9504
9505
9506 fi
9507
9508
9509 fi
9510
9511
9512   fi
9513   test -z "$with_wnn" && with_wnn=yes
9514   if test "$with_wnn" = "yes"; then
9515     { test "$extra_verbose" = "yes" && cat << \EOF
9516     Defining HAVE_WNN
9517 EOF
9518 cat >> confdefs.h <<\EOF
9519 #define HAVE_WNN 1
9520 EOF
9521 }
9522
9523     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9524     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9525    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9526  fi
9527     if test "$with_wnn6" != "no"; then
9528       
9529 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9530 echo "configure:9531: checking for jl_fi_dic_list in -l$libwnn" >&5
9531 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9532
9533 xe_check_libs=" -l$libwnn "
9534 cat > conftest.$ac_ext <<EOF
9535 #line 9536 "configure"
9536 #include "confdefs.h"
9537 /* Override any gcc2 internal prototype to avoid an error.  */
9538 /* We use char because int might match the return type of a gcc2
9539     builtin and then its argument prototype would still apply.  */
9540 char jl_fi_dic_list();
9541
9542 int main() {
9543 jl_fi_dic_list()
9544 ; return 0; }
9545 EOF
9546 if { (eval echo configure:9547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9547   rm -rf conftest*
9548   eval "ac_cv_lib_$ac_lib_var=yes"
9549 else
9550   echo "configure: failed program was:" >&5
9551   cat conftest.$ac_ext >&5
9552   rm -rf conftest*
9553   eval "ac_cv_lib_$ac_lib_var=no"
9554 fi
9555 rm -f conftest*
9556 xe_check_libs=""
9557
9558 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9559   echo "$ac_t""yes" 1>&6
9560   with_wnn6=yes
9561 else
9562   echo "$ac_t""no" 1>&6
9563 fi
9564
9565
9566       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9567     Defining WNN6
9568 EOF
9569 cat >> confdefs.h <<\EOF
9570 #define WNN6 1
9571 EOF
9572 }
9573
9574     fi
9575   fi
9576
9577     canna_includes_found=no
9578   if test "$with_canna" != "no"; then
9579     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9580 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9581 echo "configure:9582: checking for canna/jrkanji.h" >&5
9582
9583 cat > conftest.$ac_ext <<EOF
9584 #line 9585 "configure"
9585 #include "confdefs.h"
9586 #include <canna/jrkanji.h>
9587 EOF
9588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9589 { (eval echo configure:9590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9590 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9591 if test -z "$ac_err"; then
9592   rm -rf conftest*
9593   eval "ac_cv_header_$ac_safe=yes"
9594 else
9595   echo "$ac_err" >&5
9596   echo "configure: failed program was:" >&5
9597   cat conftest.$ac_ext >&5
9598   rm -rf conftest*
9599   eval "ac_cv_header_$ac_safe=no"
9600 fi
9601 rm -f conftest*
9602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9603   echo "$ac_t""yes" 1>&6
9604   canna_includes_found=yes
9605 else
9606   echo "$ac_t""no" 1>&6
9607 fi
9608
9609   fi
9610   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9611       -d "/usr/local/canna/include"; then
9612     save_c_switch_site="$c_switch_site"
9613     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9614     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9615 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9616 echo "configure:9617: checking for canna/jrkanji.h" >&5
9617
9618 cat > conftest.$ac_ext <<EOF
9619 #line 9620 "configure"
9620 #include "confdefs.h"
9621 #include <canna/jrkanji.h>
9622 EOF
9623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9624 { (eval echo configure:9625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9626 if test -z "$ac_err"; then
9627   rm -rf conftest*
9628   eval "ac_cv_header_$ac_safe=yes"
9629 else
9630   echo "$ac_err" >&5
9631   echo "configure: failed program was:" >&5
9632   cat conftest.$ac_ext >&5
9633   rm -rf conftest*
9634   eval "ac_cv_header_$ac_safe=no"
9635 fi
9636 rm -f conftest*
9637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9638   echo "$ac_t""yes" 1>&6
9639   canna_includes_found=yes
9640 else
9641   echo "$ac_t""no" 1>&6
9642 fi
9643
9644     if test "$canna_includes_found" != "yes"; then
9645       c_switch_site="$save_c_switch_site"
9646       with_canna="no"
9647     fi
9648   fi
9649
9650   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9651 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9652 echo "configure:9653: checking for canna/RK.h" >&5
9653
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657 #include <canna/RK.h>
9658 EOF
9659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9660 { (eval echo configure:9661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9662 if test -z "$ac_err"; then
9663   rm -rf conftest*
9664   eval "ac_cv_header_$ac_safe=yes"
9665 else
9666   echo "$ac_err" >&5
9667   echo "configure: failed program was:" >&5
9668   cat conftest.$ac_ext >&5
9669   rm -rf conftest*
9670   eval "ac_cv_header_$ac_safe=no"
9671 fi
9672 rm -f conftest*
9673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9674   echo "$ac_t""yes" 1>&6
9675   :
9676 else
9677   echo "$ac_t""no" 1>&6
9678 with_canna=no
9679 fi
9680  }
9681   test -z "$with_canna" && { 
9682 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9683 echo "configure:9684: checking for RkBgnBun in -lRKC" >&5
9684 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9685
9686 xe_check_libs=" -lRKC "
9687 cat > conftest.$ac_ext <<EOF
9688 #line 9689 "configure"
9689 #include "confdefs.h"
9690 /* Override any gcc2 internal prototype to avoid an error.  */
9691 /* We use char because int might match the return type of a gcc2
9692     builtin and then its argument prototype would still apply.  */
9693 char RkBgnBun();
9694
9695 int main() {
9696 RkBgnBun()
9697 ; return 0; }
9698 EOF
9699 if { (eval echo configure:9700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9700   rm -rf conftest*
9701   eval "ac_cv_lib_$ac_lib_var=yes"
9702 else
9703   echo "configure: failed program was:" >&5
9704   cat conftest.$ac_ext >&5
9705   rm -rf conftest*
9706   eval "ac_cv_lib_$ac_lib_var=no"
9707 fi
9708 rm -f conftest*
9709 xe_check_libs=""
9710
9711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9712   echo "$ac_t""yes" 1>&6
9713   :
9714 else
9715   echo "$ac_t""no" 1>&6
9716 with_canna=no
9717 fi
9718
9719  }
9720   test -z "$with_canna" && { 
9721 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9722 echo "configure:9723: checking for jrKanjiControl in -lcanna" >&5
9723 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9724
9725 xe_check_libs=" -lcanna "
9726 cat > conftest.$ac_ext <<EOF
9727 #line 9728 "configure"
9728 #include "confdefs.h"
9729 /* Override any gcc2 internal prototype to avoid an error.  */
9730 /* We use char because int might match the return type of a gcc2
9731     builtin and then its argument prototype would still apply.  */
9732 char jrKanjiControl();
9733
9734 int main() {
9735 jrKanjiControl()
9736 ; return 0; }
9737 EOF
9738 if { (eval echo configure:9739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9739   rm -rf conftest*
9740   eval "ac_cv_lib_$ac_lib_var=yes"
9741 else
9742   echo "configure: failed program was:" >&5
9743   cat conftest.$ac_ext >&5
9744   rm -rf conftest*
9745   eval "ac_cv_lib_$ac_lib_var=no"
9746 fi
9747 rm -f conftest*
9748 xe_check_libs=""
9749
9750 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9751   echo "$ac_t""yes" 1>&6
9752   :
9753 else
9754   echo "$ac_t""no" 1>&6
9755 with_canna=no
9756 fi
9757
9758  }
9759   test -z "$with_canna" && with_canna=yes
9760   if test "$with_canna" = "yes"; then
9761     { test "$extra_verbose" = "yes" && cat << \EOF
9762     Defining HAVE_CANNA
9763 EOF
9764 cat >> confdefs.h <<\EOF
9765 #define HAVE_CANNA 1
9766 EOF
9767 }
9768
9769     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9770     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9771    echo "    xemacs will be linked with \"mule-canna.o\""
9772  fi
9773   fi
9774
9775 else   for feature in xim canna wnn; do
9776     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9777       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9778     fi
9779     eval "with_${feature}=no"
9780   done
9781 fi 
9782
9783 if test "$need_motif" = "yes" ; then
9784   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9785     
9786 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9787 echo "configure:9788: checking for layout_object_getvalue in -li18n" >&5
9788 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9789
9790 xe_check_libs=" -li18n "
9791 cat > conftest.$ac_ext <<EOF
9792 #line 9793 "configure"
9793 #include "confdefs.h"
9794 /* Override any gcc2 internal prototype to avoid an error.  */
9795 /* We use char because int might match the return type of a gcc2
9796     builtin and then its argument prototype would still apply.  */
9797 char layout_object_getvalue();
9798
9799 int main() {
9800 layout_object_getvalue()
9801 ; return 0; }
9802 EOF
9803 if { (eval echo configure:9804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9804   rm -rf conftest*
9805   eval "ac_cv_lib_$ac_lib_var=yes"
9806 else
9807   echo "configure: failed program was:" >&5
9808   cat conftest.$ac_ext >&5
9809   rm -rf conftest*
9810   eval "ac_cv_lib_$ac_lib_var=no"
9811 fi
9812 rm -f conftest*
9813 xe_check_libs=""
9814
9815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9816   echo "$ac_t""yes" 1>&6
9817   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9818 else
9819   echo "$ac_t""no" 1>&6
9820 fi
9821
9822
9823   
9824 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9825     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9826   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9827   
9828         runpath="" runpath_dirs=""
9829   if test -n "$LD_RUN_PATH"; then
9830     runpath="$LD_RUN_PATH"
9831   elif test "$GCC" = "yes"; then
9832         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9833     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9834     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9835     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9836       case "$arg" in P,* | -L* | -R* )
9837         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9838           {
9839 xe_runpath_dir="$dir"
9840   test "$xe_runpath_dir" != "/lib"     -a \
9841         "$xe_runpath_dir" != "/usr/lib" -a \
9842         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9843   eval "$xe_add_unique_runpath_dir"
9844 }
9845         done ;;
9846       esac
9847     done
9848     ld_switch_run="$ld_switch_run_save"
9849     rm -f conftest*
9850   else
9851         for arg in $ld_switch_site $ld_switch_x_site; do
9852       case "$arg" in -L*) {
9853 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9854   test "$xe_runpath_dir" != "/lib"     -a \
9855         "$xe_runpath_dir" != "/usr/lib" -a \
9856         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9857   eval "$xe_add_unique_runpath_dir"
9858 };; esac
9859     done
9860         if test "$opsys $need_motif" = "sol2 yes"; then
9861       xe_runpath_dir="/opt/SUNWdt/lib";
9862       eval "$xe_add_unique_runpath_dir";
9863     fi
9864   fi 
9865   if test -n "$runpath"; then
9866     ld_switch_run="${dash_r}${runpath}"
9867     
9868 if test "$GCC" = "yes"; then
9869   set x $ld_switch_run; shift; ld_switch_run=""
9870   while test -n "$1"; do
9871     case $1 in
9872       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9873       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9874       -Xlinker* ) ;;
9875       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9876     esac
9877     shift
9878   done
9879 fi
9880     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9881   fi
9882 fi
9883
9884 fi
9885
9886 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
9887 do
9888 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9889 echo "configure:9890: checking for $ac_func" >&5
9890
9891 cat > conftest.$ac_ext <<EOF
9892 #line 9893 "configure"
9893 #include "confdefs.h"
9894 /* System header to define __stub macros and hopefully few prototypes,
9895     which can conflict with char $ac_func(); below.  */
9896 #include <assert.h>
9897 /* Override any gcc2 internal prototype to avoid an error.  */
9898 /* We use char because int might match the return type of a gcc2
9899     builtin and then its argument prototype would still apply.  */
9900 char $ac_func();
9901
9902 int main() {
9903
9904 /* The GNU C library defines this for functions which it implements
9905     to always fail with ENOSYS.  Some functions are actually named
9906     something starting with __ and the normal name is an alias.  */
9907 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9908 choke me
9909 #else
9910 $ac_func();
9911 #endif
9912
9913 ; return 0; }
9914 EOF
9915 if { (eval echo configure:9916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9916   rm -rf conftest*
9917   eval "ac_cv_func_$ac_func=yes"
9918 else
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   eval "ac_cv_func_$ac_func=no"
9923 fi
9924 rm -f conftest*
9925
9926 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9927   echo "$ac_t""yes" 1>&6
9928     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9929   { test "$extra_verbose" = "yes" && cat << EOF
9930     Defining $ac_tr_func
9931 EOF
9932 cat >> confdefs.h <<EOF
9933 #define $ac_tr_func 1
9934 EOF
9935 }
9936  
9937 else
9938   echo "$ac_t""no" 1>&6
9939 fi
9940 done
9941
9942
9943 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9944    echo "    xemacs will be linked with \"realpath.o\""
9945  fi
9946
9947 for ac_func in getloadavg
9948 do
9949 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9950 echo "configure:9951: checking for $ac_func" >&5
9951
9952 cat > conftest.$ac_ext <<EOF
9953 #line 9954 "configure"
9954 #include "confdefs.h"
9955 /* System header to define __stub macros and hopefully few prototypes,
9956     which can conflict with char $ac_func(); below.  */
9957 #include <assert.h>
9958 /* Override any gcc2 internal prototype to avoid an error.  */
9959 /* We use char because int might match the return type of a gcc2
9960     builtin and then its argument prototype would still apply.  */
9961 char $ac_func();
9962
9963 int main() {
9964
9965 /* The GNU C library defines this for functions which it implements
9966     to always fail with ENOSYS.  Some functions are actually named
9967     something starting with __ and the normal name is an alias.  */
9968 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9969 choke me
9970 #else
9971 $ac_func();
9972 #endif
9973
9974 ; return 0; }
9975 EOF
9976 if { (eval echo configure:9977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9977   rm -rf conftest*
9978   eval "ac_cv_func_$ac_func=yes"
9979 else
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -rf conftest*
9983   eval "ac_cv_func_$ac_func=no"
9984 fi
9985 rm -f conftest*
9986
9987 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9988   echo "$ac_t""yes" 1>&6
9989     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9990   { test "$extra_verbose" = "yes" && cat << EOF
9991     Defining $ac_tr_func
9992 EOF
9993 cat >> confdefs.h <<EOF
9994 #define $ac_tr_func 1
9995 EOF
9996 }
9997  
9998 else
9999   echo "$ac_t""no" 1>&6
10000 fi
10001 done
10002
10003
10004 if test "$ac_cv_func_getloadavg" != "yes"
10005 then
10006   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
10007    echo "    xemacs will be linked with \"getloadavg.o\""
10008  fi
10009
10010     
10011 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
10012 echo "configure:10013: checking for kstat_open in -lkstat" >&5
10013 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
10014
10015 xe_check_libs=" -lkstat "
10016 cat > conftest.$ac_ext <<EOF
10017 #line 10018 "configure"
10018 #include "confdefs.h"
10019 /* Override any gcc2 internal prototype to avoid an error.  */
10020 /* We use char because int might match the return type of a gcc2
10021     builtin and then its argument prototype would still apply.  */
10022 char kstat_open();
10023
10024 int main() {
10025 kstat_open()
10026 ; return 0; }
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10029   rm -rf conftest*
10030   eval "ac_cv_lib_$ac_lib_var=yes"
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -rf conftest*
10035   eval "ac_cv_lib_$ac_lib_var=no"
10036 fi
10037 rm -f conftest*
10038 xe_check_libs=""
10039
10040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10041   echo "$ac_t""yes" 1>&6
10042     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10043     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10044   { test "$extra_verbose" = "yes" && cat << EOF
10045     Defining $ac_tr_lib
10046 EOF
10047 cat >> confdefs.h <<EOF
10048 #define $ac_tr_lib 1
10049 EOF
10050 }
10051
10052   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
10053
10054 else
10055   echo "$ac_t""no" 1>&6
10056 fi
10057
10058
10059
10060     
10061 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
10062 echo "configure:10063: checking for kvm_read in -lkvm" >&5
10063 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
10064
10065 xe_check_libs=" -lkvm "
10066 cat > conftest.$ac_ext <<EOF
10067 #line 10068 "configure"
10068 #include "confdefs.h"
10069 /* Override any gcc2 internal prototype to avoid an error.  */
10070 /* We use char because int might match the return type of a gcc2
10071     builtin and then its argument prototype would still apply.  */
10072 char kvm_read();
10073
10074 int main() {
10075 kvm_read()
10076 ; return 0; }
10077 EOF
10078 if { (eval echo configure:10079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10079   rm -rf conftest*
10080   eval "ac_cv_lib_$ac_lib_var=yes"
10081 else
10082   echo "configure: failed program was:" >&5
10083   cat conftest.$ac_ext >&5
10084   rm -rf conftest*
10085   eval "ac_cv_lib_$ac_lib_var=no"
10086 fi
10087 rm -f conftest*
10088 xe_check_libs=""
10089
10090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10091   echo "$ac_t""yes" 1>&6
10092     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10094   { test "$extra_verbose" = "yes" && cat << EOF
10095     Defining $ac_tr_lib
10096 EOF
10097 cat >> confdefs.h <<EOF
10098 #define $ac_tr_lib 1
10099 EOF
10100 }
10101
10102   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
10103
10104 else
10105   echo "$ac_t""no" 1>&6
10106 fi
10107
10108
10109 fi
10110
10111 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
10112 echo "configure:10113: checking whether netdb declares h_errno" >&5
10113 cat > conftest.$ac_ext <<EOF
10114 #line 10115 "configure"
10115 #include "confdefs.h"
10116 #include <netdb.h>
10117 int main() {
10118 return h_errno;
10119 ; return 0; }
10120 EOF
10121 if { (eval echo configure:10122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10122   rm -rf conftest*
10123   echo "$ac_t""yes" 1>&6
10124    { test "$extra_verbose" = "yes" && cat << \EOF
10125     Defining HAVE_H_ERRNO
10126 EOF
10127 cat >> confdefs.h <<\EOF
10128 #define HAVE_H_ERRNO 1
10129 EOF
10130 }
10131
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -rf conftest*
10136   echo "$ac_t""no" 1>&6
10137 fi
10138 rm -f conftest*
10139
10140 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
10141 echo "configure:10142: checking for sigsetjmp" >&5
10142 cat > conftest.$ac_ext <<EOF
10143 #line 10144 "configure"
10144 #include "confdefs.h"
10145 #include <setjmp.h>
10146 int main() {
10147 sigjmp_buf bar; sigsetjmp (bar, 0);
10148 ; return 0; }
10149 EOF
10150 if { (eval echo configure:10151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10151   rm -rf conftest*
10152   echo "$ac_t""yes" 1>&6
10153    { test "$extra_verbose" = "yes" && cat << \EOF
10154     Defining HAVE_SIGSETJMP
10155 EOF
10156 cat >> confdefs.h <<\EOF
10157 #define HAVE_SIGSETJMP 1
10158 EOF
10159 }
10160
10161 else
10162   echo "configure: failed program was:" >&5
10163   cat conftest.$ac_ext >&5
10164   rm -rf conftest*
10165   echo "$ac_t""no" 1>&6
10166 fi
10167 rm -f conftest*
10168
10169 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
10170 echo "configure:10171: checking whether localtime caches TZ" >&5
10171
10172 if test "$ac_cv_func_tzset" = "yes"; then
10173 cat > conftest.$ac_ext <<EOF
10174 #line 10175 "configure"
10175 #include "confdefs.h"
10176 #include <time.h>
10177 #if STDC_HEADERS
10178 # include <stdlib.h>
10179 #endif
10180 extern char **environ;
10181 unset_TZ ()
10182 {
10183   char **from, **to;
10184   for (to = from = environ; (*to = *from); from++)
10185     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
10186       to++;
10187 }
10188 char TZ_GMT0[] = "TZ=GMT0";
10189 char TZ_PST8[] = "TZ=PST8";
10190 main()
10191 {
10192   time_t now = time ((time_t *) 0);
10193   int hour_GMT0, hour_unset;
10194   if (putenv (TZ_GMT0) != 0)
10195     exit (1);
10196   hour_GMT0 = localtime (&now)->tm_hour;
10197   unset_TZ ();
10198   hour_unset = localtime (&now)->tm_hour;
10199   if (putenv (TZ_PST8) != 0)
10200     exit (1);
10201   if (localtime (&now)->tm_hour == hour_GMT0)
10202     exit (1);
10203   unset_TZ ();
10204   if (localtime (&now)->tm_hour != hour_unset)
10205     exit (1);
10206   exit (0);
10207 }
10208 EOF
10209 if { (eval echo configure:10210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10210 then
10211   emacs_cv_localtime_cache=no
10212 else
10213   conftest_rc="$?"
10214   echo "configure: failed program was:" >&5
10215   cat conftest.$ac_ext >&5
10216   rm -fr conftest*
10217   emacs_cv_localtime_cache=yes
10218 fi
10219 rm -fr conftest*
10220 else
10221         # If we lack tzset, report that localtime does not cache TZ,
10222         # since we can't invalidate the cache if we don't have tzset.
10223         emacs_cv_localtime_cache=no
10224 fi
10225 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
10226 if test $emacs_cv_localtime_cache = yes; then
10227   { test "$extra_verbose" = "yes" && cat << \EOF
10228     Defining LOCALTIME_CACHE
10229 EOF
10230 cat >> confdefs.h <<\EOF
10231 #define LOCALTIME_CACHE 1
10232 EOF
10233 }
10234
10235 fi
10236
10237 if test "$HAVE_TIMEVAL" = "yes"; then
10238 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10239 echo "configure:10240: checking whether gettimeofday accepts one or two arguments" >&5
10240 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243
10244 #ifdef TIME_WITH_SYS_TIME
10245 #include <sys/time.h>
10246 #include <time.h>
10247 #else
10248 #ifdef HAVE_SYS_TIME_H
10249 #include <sys/time.h>
10250 #else
10251 #include <time.h>
10252 #endif
10253 #endif
10254   
10255 int main() {
10256
10257   struct timeval time;
10258   gettimeofday (&time, 0);
10259
10260 ; return 0; }
10261 EOF
10262 if { (eval echo configure:10263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10263   rm -rf conftest*
10264   echo "$ac_t""two" 1>&6
10265 else
10266   echo "configure: failed program was:" >&5
10267   cat conftest.$ac_ext >&5
10268   rm -rf conftest*
10269   echo "$ac_t""one" 1>&6
10270    { test "$extra_verbose" = "yes" && cat << \EOF
10271     Defining GETTIMEOFDAY_ONE_ARGUMENT
10272 EOF
10273 cat >> confdefs.h <<\EOF
10274 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10275 EOF
10276 }
10277
10278 fi
10279 rm -f conftest*
10280 fi
10281
10282
10283 echo $ac_n "checking for inline""... $ac_c" 1>&6
10284 echo "configure:10285: checking for inline" >&5
10285
10286 ac_cv_c_inline=no
10287 for ac_kw in inline __inline__ __inline; do
10288   cat > conftest.$ac_ext <<EOF
10289 #line 10290 "configure"
10290 #include "confdefs.h"
10291
10292 int main() {
10293 } $ac_kw foo() {
10294 ; return 0; }
10295 EOF
10296 if { (eval echo configure:10297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10297   rm -rf conftest*
10298   ac_cv_c_inline=$ac_kw; break
10299 else
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302 fi
10303 rm -f conftest*
10304 done
10305
10306
10307 echo "$ac_t""$ac_cv_c_inline" 1>&6
10308 case "$ac_cv_c_inline" in
10309   inline | yes) ;;
10310   no) { test "$extra_verbose" = "yes" && cat << \EOF
10311     Defining inline = 
10312 EOF
10313 cat >> confdefs.h <<\EOF
10314 #define inline 
10315 EOF
10316 }
10317  ;;
10318   *)  { test "$extra_verbose" = "yes" && cat << EOF
10319     Defining inline = $ac_cv_c_inline
10320 EOF
10321 cat >> confdefs.h <<EOF
10322 #define inline $ac_cv_c_inline
10323 EOF
10324 }
10325  ;;
10326 esac
10327
10328 test "$ac_cv_c_inline" != "no" -a "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10329    echo "    xemacs will be linked with \"inline.o\""
10330  fi
10331
10332
10333 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10334 # for constant arguments.  Useless!
10335 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10336 echo "configure:10337: checking for working alloca.h" >&5
10337
10338 cat > conftest.$ac_ext <<EOF
10339 #line 10340 "configure"
10340 #include "confdefs.h"
10341 #include <alloca.h>
10342 int main() {
10343 char *p = alloca(2 * sizeof(int));
10344 ; return 0; }
10345 EOF
10346 if { (eval echo configure:10347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10347   rm -rf conftest*
10348   ac_cv_header_alloca_h=yes
10349 else
10350   echo "configure: failed program was:" >&5
10351   cat conftest.$ac_ext >&5
10352   rm -rf conftest*
10353   ac_cv_header_alloca_h=no
10354 fi
10355 rm -f conftest*
10356
10357 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10358 if test $ac_cv_header_alloca_h = yes; then
10359   { test "$extra_verbose" = "yes" && cat << \EOF
10360     Defining HAVE_ALLOCA_H
10361 EOF
10362 cat >> confdefs.h <<\EOF
10363 #define HAVE_ALLOCA_H 1
10364 EOF
10365 }
10366
10367 fi
10368
10369 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10370 echo "configure:10371: checking for alloca" >&5
10371
10372 cat > conftest.$ac_ext <<EOF
10373 #line 10374 "configure"
10374 #include "confdefs.h"
10375
10376 #ifdef __GNUC__
10377 # define alloca __builtin_alloca
10378 #else
10379 # ifdef _MSC_VER
10380 #  include <malloc.h>
10381 #  define alloca _alloca
10382 # else
10383 #  if HAVE_ALLOCA_H
10384 #   include <alloca.h>
10385 #  else
10386 #   ifdef _AIX
10387  #pragma alloca
10388 #   else
10389 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10390 char *alloca ();
10391 #    endif
10392 #   endif
10393 #  endif
10394 # endif
10395 #endif
10396
10397 int main() {
10398 char *p = (char *) alloca(1);
10399 ; return 0; }
10400 EOF
10401 if { (eval echo configure:10402: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10402   rm -rf conftest*
10403   ac_cv_func_alloca_works=yes
10404 else
10405   echo "configure: failed program was:" >&5
10406   cat conftest.$ac_ext >&5
10407   rm -rf conftest*
10408   ac_cv_func_alloca_works=no
10409 fi
10410 rm -f conftest*
10411
10412 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10413 if test $ac_cv_func_alloca_works = yes; then
10414   { test "$extra_verbose" = "yes" && cat << \EOF
10415     Defining HAVE_ALLOCA
10416 EOF
10417 cat >> confdefs.h <<\EOF
10418 #define HAVE_ALLOCA 1
10419 EOF
10420 }
10421
10422 fi
10423
10424 if test $ac_cv_func_alloca_works = no; then
10425   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10426   # that cause trouble.  Some versions do not even contain alloca or
10427   # contain a buggy version.  If you still want to use their alloca,
10428   # use ar to extract alloca.o from them instead of compiling alloca.c.
10429   ALLOCA=alloca.${ac_objext}
10430   { test "$extra_verbose" = "yes" && cat << \EOF
10431     Defining C_ALLOCA
10432 EOF
10433 cat >> confdefs.h <<\EOF
10434 #define C_ALLOCA 1
10435 EOF
10436 }
10437
10438
10439 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10440 echo "configure:10441: checking whether alloca needs Cray hooks" >&5
10441
10442 cat > conftest.$ac_ext <<EOF
10443 #line 10444 "configure"
10444 #include "confdefs.h"
10445 #if defined(CRAY) && ! defined(CRAY2)
10446 webecray
10447 #else
10448 wenotbecray
10449 #endif
10450
10451 EOF
10452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10453   egrep "webecray" >/dev/null 2>&1; then
10454   rm -rf conftest*
10455   ac_cv_os_cray=yes
10456 else
10457   rm -rf conftest*
10458   ac_cv_os_cray=no
10459 fi
10460 rm -f conftest*
10461
10462
10463 echo "$ac_t""$ac_cv_os_cray" 1>&6
10464 if test $ac_cv_os_cray = yes; then
10465 for ac_func in _getb67 GETB67 getb67; do
10466   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10467 echo "configure:10468: checking for $ac_func" >&5
10468
10469 cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 /* System header to define __stub macros and hopefully few prototypes,
10473     which can conflict with char $ac_func(); below.  */
10474 #include <assert.h>
10475 /* Override any gcc2 internal prototype to avoid an error.  */
10476 /* We use char because int might match the return type of a gcc2
10477     builtin and then its argument prototype would still apply.  */
10478 char $ac_func();
10479
10480 int main() {
10481
10482 /* The GNU C library defines this for functions which it implements
10483     to always fail with ENOSYS.  Some functions are actually named
10484     something starting with __ and the normal name is an alias.  */
10485 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10486 choke me
10487 #else
10488 $ac_func();
10489 #endif
10490
10491 ; return 0; }
10492 EOF
10493 if { (eval echo configure:10494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10494   rm -rf conftest*
10495   eval "ac_cv_func_$ac_func=yes"
10496 else
10497   echo "configure: failed program was:" >&5
10498   cat conftest.$ac_ext >&5
10499   rm -rf conftest*
10500   eval "ac_cv_func_$ac_func=no"
10501 fi
10502 rm -f conftest*
10503
10504 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10505   echo "$ac_t""yes" 1>&6
10506   { test "$extra_verbose" = "yes" && cat << EOF
10507     Defining CRAY_STACKSEG_END = $ac_func
10508 EOF
10509 cat >> confdefs.h <<EOF
10510 #define CRAY_STACKSEG_END $ac_func
10511 EOF
10512 }
10513
10514   break
10515 else
10516   echo "$ac_t""no" 1>&6
10517 fi
10518
10519 done
10520 fi
10521
10522 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10523 echo "configure:10524: checking stack direction for C alloca" >&5
10524
10525 cat > conftest.$ac_ext <<EOF
10526 #line 10527 "configure"
10527 #include "confdefs.h"
10528 find_stack_direction ()
10529 {
10530   static char *addr = 0;
10531   auto char dummy;
10532   if (addr == 0)
10533     {
10534       addr = &dummy;
10535       return find_stack_direction ();
10536     }
10537   else
10538     return (&dummy > addr) ? 1 : -1;
10539 }
10540 main ()
10541 {
10542   exit (find_stack_direction() < 0);
10543 }
10544 EOF
10545 if { (eval echo configure:10546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10546 then
10547   ac_cv_c_stack_direction=1
10548 else
10549   conftest_rc="$?"
10550   echo "configure: failed program was:" >&5
10551   cat conftest.$ac_ext >&5
10552   rm -fr conftest*
10553   ac_cv_c_stack_direction=-1
10554 fi
10555 rm -fr conftest*
10556
10557 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10558 { test "$extra_verbose" = "yes" && cat << EOF
10559     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10560 EOF
10561 cat >> confdefs.h <<EOF
10562 #define STACK_DIRECTION $ac_cv_c_stack_direction
10563 EOF
10564 }
10565
10566 fi
10567
10568 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10569    echo "    xemacs will be linked with \"$ALLOCA\""
10570  fi
10571
10572 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10573 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10574 echo "configure:10575: checking for vfork.h" >&5
10575
10576 cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 #include <vfork.h>
10580 EOF
10581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10582 { (eval echo configure:10583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10584 if test -z "$ac_err"; then
10585   rm -rf conftest*
10586   eval "ac_cv_header_$ac_safe=yes"
10587 else
10588   echo "$ac_err" >&5
10589   echo "configure: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   rm -rf conftest*
10592   eval "ac_cv_header_$ac_safe=no"
10593 fi
10594 rm -f conftest*
10595 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10596   echo "$ac_t""yes" 1>&6
10597   { test "$extra_verbose" = "yes" && cat << \EOF
10598     Defining HAVE_VFORK_H
10599 EOF
10600 cat >> confdefs.h <<\EOF
10601 #define HAVE_VFORK_H 1
10602 EOF
10603 }
10604
10605 else
10606   echo "$ac_t""no" 1>&6
10607 fi
10608
10609 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10610 echo "configure:10611: checking for working vfork" >&5
10611
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 /* Thanks to Paul Eggert for this test.  */
10616 #include <stdio.h>
10617 #include <sys/types.h>
10618 #include <sys/stat.h>
10619 #ifdef HAVE_UNISTD_H
10620 #include <unistd.h>
10621 #endif
10622 #ifdef HAVE_VFORK_H
10623 #include <vfork.h>
10624 #endif
10625 /* On some sparc systems, changes by the child to local and incoming
10626    argument registers are propagated back to the parent.
10627    The compiler is told about this with #include <vfork.h>,
10628    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10629    Test for this by using a static variable whose address
10630    is put into a register that is clobbered by the vfork.  */
10631 static
10632 #ifdef __cplusplus
10633 sparc_address_test (int arg)
10634 #else
10635 sparc_address_test (arg) int arg;
10636 #endif
10637 {
10638   static pid_t child;
10639   if (!child) {
10640     child = vfork ();
10641     if (child < 0) {
10642       perror ("vfork");
10643       _exit(2);
10644     }
10645     if (!child) {
10646       arg = getpid();
10647       write(-1, "", 0);
10648       _exit (arg);
10649     }
10650   }
10651 }
10652 main() {
10653   pid_t parent = getpid ();
10654   pid_t child;
10655
10656   sparc_address_test ();
10657
10658   child = vfork ();
10659
10660   if (child == 0) {
10661     /* Here is another test for sparc vfork register problems.
10662        This test uses lots of local variables, at least
10663        as many local variables as main has allocated so far
10664        including compiler temporaries.  4 locals are enough for
10665        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10666        A buggy compiler should reuse the register of parent
10667        for one of the local variables, since it will think that
10668        parent can't possibly be used any more in this routine.
10669        Assigning to the local variable will thus munge parent
10670        in the parent process.  */
10671     pid_t
10672       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10673       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10674     /* Convince the compiler that p..p7 are live; otherwise, it might
10675        use the same hardware register for all 8 local variables.  */
10676     if (p != p1 || p != p2 || p != p3 || p != p4
10677         || p != p5 || p != p6 || p != p7)
10678       _exit(1);
10679
10680     /* On some systems (e.g. IRIX 3.3),
10681        vfork doesn't separate parent from child file descriptors.
10682        If the child closes a descriptor before it execs or exits,
10683        this munges the parent's descriptor as well.
10684        Test for this by closing stdout in the child.  */
10685     _exit(close(fileno(stdout)) != 0);
10686   } else {
10687     int status;
10688     struct stat st;
10689
10690     while (wait(&status) != child)
10691       ;
10692     exit(
10693          /* Was there some problem with vforking?  */
10694          child < 0
10695
10696          /* Did the child fail?  (This shouldn't happen.)  */
10697          || status
10698
10699          /* Did the vfork/compiler bug occur?  */
10700          || parent != getpid()
10701
10702          /* Did the file descriptor bug occur?  */
10703          || fstat(fileno(stdout), &st) != 0
10704          );
10705   }
10706 }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10709 then
10710   ac_cv_func_vfork_works=yes
10711 else
10712   conftest_rc="$?"
10713   echo "configure: failed program was:" >&5
10714   cat conftest.$ac_ext >&5
10715   rm -fr conftest*
10716   ac_cv_func_vfork_works=no
10717 fi
10718 rm -fr conftest*
10719
10720 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10721 if test $ac_cv_func_vfork_works = no; then
10722   { test "$extra_verbose" = "yes" && cat << \EOF
10723     Defining vfork = fork
10724 EOF
10725 cat >> confdefs.h <<\EOF
10726 #define vfork fork
10727 EOF
10728 }
10729
10730 fi
10731
10732
10733 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10734 echo "configure:10735: checking for working strcoll" >&5
10735
10736 cat > conftest.$ac_ext <<EOF
10737 #line 10738 "configure"
10738 #include "confdefs.h"
10739 #include <string.h>
10740 main ()
10741 {
10742   exit (strcoll ("abc", "def") >= 0 ||
10743         strcoll ("ABC", "DEF") >= 0 ||
10744         strcoll ("123", "456") >= 0);
10745 }
10746 EOF
10747 if { (eval echo configure:10748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10748 then
10749   ac_cv_func_strcoll_works=yes
10750 else
10751   conftest_rc="$?"
10752   echo "configure: failed program was:" >&5
10753   cat conftest.$ac_ext >&5
10754   rm -fr conftest*
10755   ac_cv_func_strcoll_works=no
10756 fi
10757 rm -fr conftest*
10758
10759 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10760 if test $ac_cv_func_strcoll_works = yes; then
10761   { test "$extra_verbose" = "yes" && cat << \EOF
10762     Defining HAVE_STRCOLL
10763 EOF
10764 cat >> confdefs.h <<\EOF
10765 #define HAVE_STRCOLL 1
10766 EOF
10767 }
10768
10769 fi
10770
10771
10772 for ac_func in getpgrp
10773 do
10774 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10775 echo "configure:10776: checking for $ac_func" >&5
10776
10777 cat > conftest.$ac_ext <<EOF
10778 #line 10779 "configure"
10779 #include "confdefs.h"
10780 /* System header to define __stub macros and hopefully few prototypes,
10781     which can conflict with char $ac_func(); below.  */
10782 #include <assert.h>
10783 /* Override any gcc2 internal prototype to avoid an error.  */
10784 /* We use char because int might match the return type of a gcc2
10785     builtin and then its argument prototype would still apply.  */
10786 char $ac_func();
10787
10788 int main() {
10789
10790 /* The GNU C library defines this for functions which it implements
10791     to always fail with ENOSYS.  Some functions are actually named
10792     something starting with __ and the normal name is an alias.  */
10793 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10794 choke me
10795 #else
10796 $ac_func();
10797 #endif
10798
10799 ; return 0; }
10800 EOF
10801 if { (eval echo configure:10802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10802   rm -rf conftest*
10803   eval "ac_cv_func_$ac_func=yes"
10804 else
10805   echo "configure: failed program was:" >&5
10806   cat conftest.$ac_ext >&5
10807   rm -rf conftest*
10808   eval "ac_cv_func_$ac_func=no"
10809 fi
10810 rm -f conftest*
10811
10812 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10813   echo "$ac_t""yes" 1>&6
10814     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10815   { test "$extra_verbose" = "yes" && cat << EOF
10816     Defining $ac_tr_func
10817 EOF
10818 cat >> confdefs.h <<EOF
10819 #define $ac_tr_func 1
10820 EOF
10821 }
10822  
10823 else
10824   echo "$ac_t""no" 1>&6
10825 fi
10826 done
10827
10828 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10829 echo "configure:10830: checking whether getpgrp takes no argument" >&5
10830
10831 cat > conftest.$ac_ext <<EOF
10832 #line 10833 "configure"
10833 #include "confdefs.h"
10834
10835 /*
10836  * If this system has a BSD-style getpgrp(),
10837  * which takes a pid argument, exit unsuccessfully.
10838  *
10839  * Snarfed from Chet Ramey's bash pgrp.c test program
10840  */
10841 #include <stdio.h>
10842 #include <sys/types.h>
10843
10844 int     pid;
10845 int     pg1, pg2, pg3, pg4;
10846 int     ng, np, s, child;
10847
10848 main()
10849 {
10850         pid = getpid();
10851         pg1 = getpgrp(0);
10852         pg2 = getpgrp();
10853         pg3 = getpgrp(pid);
10854         pg4 = getpgrp(1);
10855
10856         /*
10857          * If all of these values are the same, it's pretty sure that
10858          * we're on a system that ignores getpgrp's first argument.
10859          */
10860         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10861                 exit(0);
10862
10863         child = fork();
10864         if (child < 0)
10865                 exit(1);
10866         else if (child == 0) {
10867                 np = getpid();
10868                 /*
10869                  * If this is Sys V, this will not work; pgrp will be
10870                  * set to np because setpgrp just changes a pgrp to be
10871                  * the same as the pid.
10872                  */
10873                 setpgrp(np, pg1);
10874                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10875                 if (ng == pg1) {
10876                         exit(1);
10877                 } else {
10878                         exit(0);
10879                 }
10880         } else {
10881                 wait(&s);
10882                 exit(s>>8);
10883         }
10884 }
10885
10886 EOF
10887 if { (eval echo configure:10888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10888 then
10889   ac_cv_func_getpgrp_void=yes
10890 else
10891   conftest_rc="$?"
10892   echo "configure: failed program was:" >&5
10893   cat conftest.$ac_ext >&5
10894   rm -fr conftest*
10895   ac_cv_func_getpgrp_void=no
10896 fi
10897 rm -fr conftest*
10898
10899
10900 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10901 if test $ac_cv_func_getpgrp_void = yes; then
10902   { test "$extra_verbose" = "yes" && cat << \EOF
10903     Defining GETPGRP_VOID
10904 EOF
10905 cat >> confdefs.h <<\EOF
10906 #define GETPGRP_VOID 1
10907 EOF
10908 }
10909
10910 fi
10911
10912
10913 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10914 echo "configure:10915: checking for working mmap" >&5
10915 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10916 cat > conftest.$ac_ext <<EOF
10917 #line 10918 "configure"
10918 #include "confdefs.h"
10919 #include <stdio.h>
10920 #include <unistd.h>
10921 #include <fcntl.h>
10922 #include <sys/mman.h>
10923
10924 #ifndef MAP_VARIABLE
10925 #define MAP_VARIABLE 0
10926 #endif
10927
10928 #ifndef MAP_FAILED
10929 #define MAP_FAILED -1
10930 #endif
10931
10932 int main (int argc, char *argv[])
10933 {
10934   int fd = -1;
10935   caddr_t p;
10936 #ifndef MAP_ANONYMOUS
10937   fd = open ("/dev/zero", O_RDWR);
10938   if (fd < 0)
10939     return 1;
10940 #define MAP_ANONYMOUS 0
10941 #endif
10942   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10943            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10944            fd, 0) != (void *) MAP_FAILED)
10945     return 0;
10946   perror ("conftest: mmap failed");
10947   return 1;
10948 }
10949 EOF
10950 if { (eval echo configure:10951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10951 then
10952   have_mmap=yes
10953 else
10954   conftest_rc="$?"
10955   echo "configure: failed program was:" >&5
10956   cat conftest.$ac_ext >&5
10957   rm -fr conftest*
10958   have_mmap=no
10959 fi
10960 rm -fr conftest* ;;
10961 esac
10962 echo "$ac_t""$have_mmap" 1>&6
10963 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10964     Defining HAVE_MMAP
10965 EOF
10966 cat >> confdefs.h <<\EOF
10967 #define HAVE_MMAP 1
10968 EOF
10969 }
10970
10971
10972 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
10973 if test "$rel_alloc $have_mmap" = "default yes"; then
10974   if test "$doug_lea_malloc" = "yes"; then
10975         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
10976 echo "configure:10977: checking for M_MMAP_THRESHOLD" >&5
10977     cat > conftest.$ac_ext <<EOF
10978 #line 10979 "configure"
10979 #include "confdefs.h"
10980 #include <malloc.h>
10981 int main() {
10982
10983 #ifndef M_MMAP_THRESHOLD
10984 #error No M_MMAP_THRESHOLD :-(
10985 !@+$%^&*_)(_ - unlikely to compile...
10986 #endif
10987
10988 ; return 0; }
10989 EOF
10990 if { (eval echo configure:10991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10991   rm -rf conftest*
10992   rel_alloc=no; echo "$ac_t""yes" 1>&6;
10993 else
10994   echo "configure: failed program was:" >&5
10995   cat conftest.$ac_ext >&5
10996   rm -rf conftest*
10997   rel_alloc=yes; echo "$ac_t""no" 1>&6;
10998 fi
10999 rm -f conftest*
11000   else
11001     rel_alloc=yes
11002   fi
11003 fi
11004 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
11005     Defining REL_ALLOC
11006 EOF
11007 cat >> confdefs.h <<\EOF
11008 #define REL_ALLOC 1
11009 EOF
11010 }
11011
11012
11013 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
11014 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
11015 echo "configure:11016: checking for termios.h" >&5
11016
11017 cat > conftest.$ac_ext <<EOF
11018 #line 11019 "configure"
11019 #include "confdefs.h"
11020 #include <termios.h>
11021 EOF
11022 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11023 { (eval echo configure:11024: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11024 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11025 if test -z "$ac_err"; then
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=yes"
11028 else
11029   echo "$ac_err" >&5
11030   echo "configure: failed program was:" >&5
11031   cat conftest.$ac_ext >&5
11032   rm -rf conftest*
11033   eval "ac_cv_header_$ac_safe=no"
11034 fi
11035 rm -f conftest*
11036 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11037   echo "$ac_t""yes" 1>&6
11038   { test "$extra_verbose" = "yes" && cat << \EOF
11039     Defining HAVE_TERMIOS
11040 EOF
11041 cat >> confdefs.h <<\EOF
11042 #define HAVE_TERMIOS 1
11043 EOF
11044 }
11045
11046   { test "$extra_verbose" = "yes" && cat << \EOF
11047     Defining SIGNALS_VIA_CHARACTERS
11048 EOF
11049 cat >> confdefs.h <<\EOF
11050 #define SIGNALS_VIA_CHARACTERS 1
11051 EOF
11052 }
11053
11054   { test "$extra_verbose" = "yes" && cat << \EOF
11055     Defining NO_TERMIO
11056 EOF
11057 cat >> confdefs.h <<\EOF
11058 #define NO_TERMIO 1
11059 EOF
11060 }
11061
11062 else
11063   echo "$ac_t""no" 1>&6
11064 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
11065 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
11066 echo "configure:11067: checking for termio.h" >&5
11067
11068 cat > conftest.$ac_ext <<EOF
11069 #line 11070 "configure"
11070 #include "confdefs.h"
11071 #include <termio.h>
11072 EOF
11073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11074 { (eval echo configure:11075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11076 if test -z "$ac_err"; then
11077   rm -rf conftest*
11078   eval "ac_cv_header_$ac_safe=yes"
11079 else
11080   echo "$ac_err" >&5
11081   echo "configure: failed program was:" >&5
11082   cat conftest.$ac_ext >&5
11083   rm -rf conftest*
11084   eval "ac_cv_header_$ac_safe=no"
11085 fi
11086 rm -f conftest*
11087 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11088   echo "$ac_t""yes" 1>&6
11089   { test "$extra_verbose" = "yes" && cat << \EOF
11090     Defining HAVE_TERMIO
11091 EOF
11092 cat >> confdefs.h <<\EOF
11093 #define HAVE_TERMIO 1
11094 EOF
11095 }
11096
11097 else
11098   echo "$ac_t""no" 1>&6
11099 fi
11100
11101 fi
11102
11103
11104
11105 echo $ac_n "checking for socket""... $ac_c" 1>&6
11106 echo "configure:11107: checking for socket" >&5
11107
11108 cat > conftest.$ac_ext <<EOF
11109 #line 11110 "configure"
11110 #include "confdefs.h"
11111 /* System header to define __stub macros and hopefully few prototypes,
11112     which can conflict with char socket(); below.  */
11113 #include <assert.h>
11114 /* Override any gcc2 internal prototype to avoid an error.  */
11115 /* We use char because int might match the return type of a gcc2
11116     builtin and then its argument prototype would still apply.  */
11117 char socket();
11118
11119 int main() {
11120
11121 /* The GNU C library defines this for functions which it implements
11122     to always fail with ENOSYS.  Some functions are actually named
11123     something starting with __ and the normal name is an alias.  */
11124 #if defined (__stub_socket) || defined (__stub___socket)
11125 choke me
11126 #else
11127 socket();
11128 #endif
11129
11130 ; return 0; }
11131 EOF
11132 if { (eval echo configure:11133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11133   rm -rf conftest*
11134   eval "ac_cv_func_socket=yes"
11135 else
11136   echo "configure: failed program was:" >&5
11137   cat conftest.$ac_ext >&5
11138   rm -rf conftest*
11139   eval "ac_cv_func_socket=no"
11140 fi
11141 rm -f conftest*
11142
11143 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
11144   echo "$ac_t""yes" 1>&6
11145   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
11146 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
11147 echo "configure:11148: checking for netinet/in.h" >&5
11148
11149 cat > conftest.$ac_ext <<EOF
11150 #line 11151 "configure"
11151 #include "confdefs.h"
11152 #include <netinet/in.h>
11153 EOF
11154 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11155 { (eval echo configure:11156: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11156 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11157 if test -z "$ac_err"; then
11158   rm -rf conftest*
11159   eval "ac_cv_header_$ac_safe=yes"
11160 else
11161   echo "$ac_err" >&5
11162   echo "configure: failed program was:" >&5
11163   cat conftest.$ac_ext >&5
11164   rm -rf conftest*
11165   eval "ac_cv_header_$ac_safe=no"
11166 fi
11167 rm -f conftest*
11168 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11169   echo "$ac_t""yes" 1>&6
11170   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
11171 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
11172 echo "configure:11173: checking for arpa/inet.h" >&5
11173
11174 cat > conftest.$ac_ext <<EOF
11175 #line 11176 "configure"
11176 #include "confdefs.h"
11177 #include <arpa/inet.h>
11178 EOF
11179 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11180 { (eval echo configure:11181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11181 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11182 if test -z "$ac_err"; then
11183   rm -rf conftest*
11184   eval "ac_cv_header_$ac_safe=yes"
11185 else
11186   echo "$ac_err" >&5
11187   echo "configure: failed program was:" >&5
11188   cat conftest.$ac_ext >&5
11189   rm -rf conftest*
11190   eval "ac_cv_header_$ac_safe=no"
11191 fi
11192 rm -f conftest*
11193 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11194   echo "$ac_t""yes" 1>&6
11195   
11196   { test "$extra_verbose" = "yes" && cat << \EOF
11197     Defining HAVE_SOCKETS
11198 EOF
11199 cat >> confdefs.h <<\EOF
11200 #define HAVE_SOCKETS 1
11201 EOF
11202 }
11203
11204       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
11205 echo "configure:11206: checking "for sun_len member in struct sockaddr_un"" >&5
11206       cat > conftest.$ac_ext <<EOF
11207 #line 11208 "configure"
11208 #include "confdefs.h"
11209
11210 #include <sys/types.h>
11211 #include <sys/socket.h>
11212 #include <sys/un.h>
11213       
11214 int main() {
11215 static struct sockaddr_un x; x.sun_len = 1;
11216 ; return 0; }
11217 EOF
11218 if { (eval echo configure:11219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11219   rm -rf conftest*
11220   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11221     Defining HAVE_SOCKADDR_SUN_LEN
11222 EOF
11223 cat >> confdefs.h <<\EOF
11224 #define HAVE_SOCKADDR_SUN_LEN 1
11225 EOF
11226 }
11227
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   echo "$ac_t""no" 1>&6
11233 fi
11234 rm -f conftest*
11235       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11236 echo "configure:11237: checking "for ip_mreq struct in netinet/in.h"" >&5
11237       cat > conftest.$ac_ext <<EOF
11238 #line 11239 "configure"
11239 #include "confdefs.h"
11240
11241 #include <sys/types.h>
11242 #include <netinet/in.h>
11243       
11244 int main() {
11245 static struct ip_mreq x;
11246 ; return 0; }
11247 EOF
11248 if { (eval echo configure:11249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11249   rm -rf conftest*
11250   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11251     Defining HAVE_MULTICAST
11252 EOF
11253 cat >> confdefs.h <<\EOF
11254 #define HAVE_MULTICAST 1
11255 EOF
11256 }
11257
11258 else
11259   echo "configure: failed program was:" >&5
11260   cat conftest.$ac_ext >&5
11261   rm -rf conftest*
11262   echo "$ac_t""no" 1>&6
11263 fi
11264 rm -f conftest*
11265 else
11266   echo "$ac_t""no" 1>&6
11267 fi
11268
11269 else
11270   echo "$ac_t""no" 1>&6
11271 fi
11272
11273 else
11274   echo "$ac_t""no" 1>&6
11275 fi
11276
11277
11278 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11279 echo "configure:11280: checking for msgget" >&5
11280
11281 cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 /* System header to define __stub macros and hopefully few prototypes,
11285     which can conflict with char msgget(); below.  */
11286 #include <assert.h>
11287 /* Override any gcc2 internal prototype to avoid an error.  */
11288 /* We use char because int might match the return type of a gcc2
11289     builtin and then its argument prototype would still apply.  */
11290 char msgget();
11291
11292 int main() {
11293
11294 /* The GNU C library defines this for functions which it implements
11295     to always fail with ENOSYS.  Some functions are actually named
11296     something starting with __ and the normal name is an alias.  */
11297 #if defined (__stub_msgget) || defined (__stub___msgget)
11298 choke me
11299 #else
11300 msgget();
11301 #endif
11302
11303 ; return 0; }
11304 EOF
11305 if { (eval echo configure:11306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11306   rm -rf conftest*
11307   eval "ac_cv_func_msgget=yes"
11308 else
11309   echo "configure: failed program was:" >&5
11310   cat conftest.$ac_ext >&5
11311   rm -rf conftest*
11312   eval "ac_cv_func_msgget=no"
11313 fi
11314 rm -f conftest*
11315
11316 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11317   echo "$ac_t""yes" 1>&6
11318   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11319 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11320 echo "configure:11321: checking for sys/ipc.h" >&5
11321
11322 cat > conftest.$ac_ext <<EOF
11323 #line 11324 "configure"
11324 #include "confdefs.h"
11325 #include <sys/ipc.h>
11326 EOF
11327 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11328 { (eval echo configure:11329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11329 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11330 if test -z "$ac_err"; then
11331   rm -rf conftest*
11332   eval "ac_cv_header_$ac_safe=yes"
11333 else
11334   echo "$ac_err" >&5
11335   echo "configure: failed program was:" >&5
11336   cat conftest.$ac_ext >&5
11337   rm -rf conftest*
11338   eval "ac_cv_header_$ac_safe=no"
11339 fi
11340 rm -f conftest*
11341 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11342   echo "$ac_t""yes" 1>&6
11343   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11344 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11345 echo "configure:11346: checking for sys/msg.h" >&5
11346
11347 cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 #include <sys/msg.h>
11351 EOF
11352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11353 { (eval echo configure:11354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11355 if test -z "$ac_err"; then
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=yes"
11358 else
11359   echo "$ac_err" >&5
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   eval "ac_cv_header_$ac_safe=no"
11364 fi
11365 rm -f conftest*
11366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11367   echo "$ac_t""yes" 1>&6
11368   { test "$extra_verbose" = "yes" && cat << \EOF
11369     Defining HAVE_SYSVIPC
11370 EOF
11371 cat >> confdefs.h <<\EOF
11372 #define HAVE_SYSVIPC 1
11373 EOF
11374 }
11375
11376 else
11377   echo "$ac_t""no" 1>&6
11378 fi
11379
11380 else
11381   echo "$ac_t""no" 1>&6
11382 fi
11383
11384 else
11385   echo "$ac_t""no" 1>&6
11386 fi
11387
11388
11389 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11390 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11391 echo "configure:11392: checking for dirent.h" >&5
11392
11393 cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396 #include <dirent.h>
11397 EOF
11398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11399 { (eval echo configure:11400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11401 if test -z "$ac_err"; then
11402   rm -rf conftest*
11403   eval "ac_cv_header_$ac_safe=yes"
11404 else
11405   echo "$ac_err" >&5
11406   echo "configure: failed program was:" >&5
11407   cat conftest.$ac_ext >&5
11408   rm -rf conftest*
11409   eval "ac_cv_header_$ac_safe=no"
11410 fi
11411 rm -f conftest*
11412 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11413   echo "$ac_t""yes" 1>&6
11414   { test "$extra_verbose" = "yes" && cat << \EOF
11415     Defining SYSV_SYSTEM_DIR
11416 EOF
11417 cat >> confdefs.h <<\EOF
11418 #define SYSV_SYSTEM_DIR 1
11419 EOF
11420 }
11421
11422 else
11423   echo "$ac_t""no" 1>&6
11424 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11425 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11426 echo "configure:11427: checking for sys/dir.h" >&5
11427
11428 cat > conftest.$ac_ext <<EOF
11429 #line 11430 "configure"
11430 #include "confdefs.h"
11431 #include <sys/dir.h>
11432 EOF
11433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11434 { (eval echo configure:11435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11436 if test -z "$ac_err"; then
11437   rm -rf conftest*
11438   eval "ac_cv_header_$ac_safe=yes"
11439 else
11440   echo "$ac_err" >&5
11441   echo "configure: failed program was:" >&5
11442   cat conftest.$ac_ext >&5
11443   rm -rf conftest*
11444   eval "ac_cv_header_$ac_safe=no"
11445 fi
11446 rm -f conftest*
11447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11448   echo "$ac_t""yes" 1>&6
11449   :
11450 else
11451   echo "$ac_t""no" 1>&6
11452 { test "$extra_verbose" = "yes" && cat << \EOF
11453     Defining NONSYSTEM_DIR_LIBRARY
11454 EOF
11455 cat >> confdefs.h <<\EOF
11456 #define NONSYSTEM_DIR_LIBRARY 1
11457 EOF
11458 }
11459
11460 fi
11461
11462 fi
11463
11464
11465 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11466 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11467 echo "configure:11468: checking for nlist.h" >&5
11468
11469 cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472 #include <nlist.h>
11473 EOF
11474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11475 { (eval echo configure:11476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11477 if test -z "$ac_err"; then
11478   rm -rf conftest*
11479   eval "ac_cv_header_$ac_safe=yes"
11480 else
11481   echo "$ac_err" >&5
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   eval "ac_cv_header_$ac_safe=no"
11486 fi
11487 rm -f conftest*
11488 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11489   echo "$ac_t""yes" 1>&6
11490   { test "$extra_verbose" = "yes" && cat << \EOF
11491     Defining NLIST_STRUCT
11492 EOF
11493 cat >> confdefs.h <<\EOF
11494 #define NLIST_STRUCT 1
11495 EOF
11496 }
11497
11498 else
11499   echo "$ac_t""no" 1>&6
11500 fi
11501
11502
11503
11504 echo "checking "for sound support"" 1>&6
11505 echo "configure:11506: checking "for sound support"" >&5
11506 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11507
11508 if test "$with_native_sound" != "no"; then
11509     if test -n "$native_sound_lib"; then
11510     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11511 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11512 echo "configure:11513: checking for multimedia/audio_device.h" >&5
11513
11514 cat > conftest.$ac_ext <<EOF
11515 #line 11516 "configure"
11516 #include "confdefs.h"
11517 #include <multimedia/audio_device.h>
11518 EOF
11519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11520 { (eval echo configure:11521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11522 if test -z "$ac_err"; then
11523   rm -rf conftest*
11524   eval "ac_cv_header_$ac_safe=yes"
11525 else
11526   echo "$ac_err" >&5
11527   echo "configure: failed program was:" >&5
11528   cat conftest.$ac_ext >&5
11529   rm -rf conftest*
11530   eval "ac_cv_header_$ac_safe=no"
11531 fi
11532 rm -f conftest*
11533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535   sound_found=yes sound_cflags=""
11536       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11537    echo "    xemacs will be linked with \"sunplay.o\""
11538  fi
11539 else
11540   echo "$ac_t""no" 1>&6
11541 fi
11542
11543   fi
11544
11545     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11546     sound_found=yes
11547     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11548    echo "    xemacs will be linked with \"sunplay.o\""
11549  fi
11550     if test -d "/usr/demo/SOUND/include"
11551       then sound_cflags="-I/usr/demo/SOUND/include"
11552       else sound_cflags="-I/usr/demo/SOUND"
11553     fi
11554     if test -z "$native_sound_lib" ; then
11555       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11556         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11557         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11558       fi
11559     fi
11560   fi
11561
11562     if test -z "$sound_found"; then
11563     case "$canonical" in
11564     *-sgi-* )
11565       if test -z "$native_sound_lib"; then
11566         
11567 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11568 echo "configure:11569: checking for ALopenport in -laudio" >&5
11569 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11570
11571 xe_check_libs=" -laudio "
11572 cat > conftest.$ac_ext <<EOF
11573 #line 11574 "configure"
11574 #include "confdefs.h"
11575 /* Override any gcc2 internal prototype to avoid an error.  */
11576 /* We use char because int might match the return type of a gcc2
11577     builtin and then its argument prototype would still apply.  */
11578 char ALopenport();
11579
11580 int main() {
11581 ALopenport()
11582 ; return 0; }
11583 EOF
11584 if { (eval echo configure:11585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11585   rm -rf conftest*
11586   eval "ac_cv_lib_$ac_lib_var=yes"
11587 else
11588   echo "configure: failed program was:" >&5
11589   cat conftest.$ac_ext >&5
11590   rm -rf conftest*
11591   eval "ac_cv_lib_$ac_lib_var=no"
11592 fi
11593 rm -f conftest*
11594 xe_check_libs=""
11595
11596 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11597   echo "$ac_t""yes" 1>&6
11598   native_sound_lib="-laudio"
11599 else
11600   echo "$ac_t""no" 1>&6
11601 fi
11602
11603
11604       fi
11605       if test -n "$native_sound_lib"; then
11606         sound_found=yes sound_cflags=""
11607         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11608    echo "    xemacs will be linked with \"sgiplay.o\""
11609  fi
11610       fi ;;
11611     hppa*-hp-hpux* )
11612       if test -z "$native_sound_lib"; then
11613         
11614 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11615 echo "configure:11616: checking for AOpenAudio in -lAlib" >&5
11616 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11617
11618 xe_check_libs=" -lAlib "
11619 cat > conftest.$ac_ext <<EOF
11620 #line 11621 "configure"
11621 #include "confdefs.h"
11622 /* Override any gcc2 internal prototype to avoid an error.  */
11623 /* We use char because int might match the return type of a gcc2
11624     builtin and then its argument prototype would still apply.  */
11625 char AOpenAudio();
11626
11627 int main() {
11628 AOpenAudio()
11629 ; return 0; }
11630 EOF
11631 if { (eval echo configure:11632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11632   rm -rf conftest*
11633   eval "ac_cv_lib_$ac_lib_var=yes"
11634 else
11635   echo "configure: failed program was:" >&5
11636   cat conftest.$ac_ext >&5
11637   rm -rf conftest*
11638   eval "ac_cv_lib_$ac_lib_var=no"
11639 fi
11640 rm -f conftest*
11641 xe_check_libs=""
11642
11643 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11644   echo "$ac_t""yes" 1>&6
11645   native_sound_lib="-lAlib"
11646 else
11647   echo "$ac_t""no" 1>&6
11648 fi
11649
11650
11651       fi
11652       if test -n "$native_sound_lib"; then
11653         sound_found=yes
11654         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11655    echo "    xemacs will be linked with \"hpplay.o\""
11656  fi
11657         if test "$GCC" = "yes" # Kludge city
11658           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11659           else sound_cflags="+e -I/usr/audio/examples"
11660         fi
11661       fi ;;
11662     esac
11663   fi
11664
11665     if test -z "$sound_found"; then
11666     for dir in "machine" "sys" "linux"; do
11667       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11668 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11669 echo "configure:11670: checking for ${dir}/soundcard.h" >&5
11670
11671 cat > conftest.$ac_ext <<EOF
11672 #line 11673 "configure"
11673 #include "confdefs.h"
11674 #include <${dir}/soundcard.h>
11675 EOF
11676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11677 { (eval echo configure:11678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11679 if test -z "$ac_err"; then
11680   rm -rf conftest*
11681   eval "ac_cv_header_$ac_safe=yes"
11682 else
11683   echo "$ac_err" >&5
11684   echo "configure: failed program was:" >&5
11685   cat conftest.$ac_ext >&5
11686   rm -rf conftest*
11687   eval "ac_cv_header_$ac_safe=no"
11688 fi
11689 rm -f conftest*
11690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11691   echo "$ac_t""yes" 1>&6
11692   sound_found=yes
11693        need_miscplay=yes
11694         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11695    echo "    xemacs will be linked with \"linuxplay.o\""
11696  fi
11697         { test "$extra_verbose" = "yes" && cat << EOF
11698     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11699 EOF
11700 cat >> confdefs.h <<EOF
11701 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11702 EOF
11703 }
11704
11705         break
11706 else
11707   echo "$ac_t""no" 1>&6
11708 fi
11709
11710     done
11711   fi
11712
11713   test "$sound_found" = "yes" && with_native_sound=yes
11714 fi
11715
11716 if test "$with_native_sound" = "yes"; then
11717   { test "$extra_verbose" = "yes" && cat << \EOF
11718     Defining HAVE_NATIVE_SOUND
11719 EOF
11720 cat >> confdefs.h <<\EOF
11721 #define HAVE_NATIVE_SOUND 1
11722 EOF
11723 }
11724
11725   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11726 fi
11727
11728 if test "$with_nas_sound" != "no"; then
11729   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11730 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11731 echo "configure:11732: checking for audio/audiolib.h" >&5
11732
11733 cat > conftest.$ac_ext <<EOF
11734 #line 11735 "configure"
11735 #include "confdefs.h"
11736 #include <audio/audiolib.h>
11737 EOF
11738 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11739 { (eval echo configure:11740: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11740 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11741 if test -z "$ac_err"; then
11742   rm -rf conftest*
11743   eval "ac_cv_header_$ac_safe=yes"
11744 else
11745   echo "$ac_err" >&5
11746   echo "configure: failed program was:" >&5
11747   cat conftest.$ac_ext >&5
11748   rm -rf conftest*
11749   eval "ac_cv_header_$ac_safe=no"
11750 fi
11751 rm -f conftest*
11752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11753   echo "$ac_t""yes" 1>&6
11754   
11755     
11756 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11757 echo "configure:11758: checking for AuOpenServer in -laudio" >&5
11758 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11759
11760 xe_check_libs=" -laudio "
11761 cat > conftest.$ac_ext <<EOF
11762 #line 11763 "configure"
11763 #include "confdefs.h"
11764 /* Override any gcc2 internal prototype to avoid an error.  */
11765 /* We use char because int might match the return type of a gcc2
11766     builtin and then its argument prototype would still apply.  */
11767 char AuOpenServer();
11768
11769 int main() {
11770 AuOpenServer()
11771 ; return 0; }
11772 EOF
11773 if { (eval echo configure:11774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11774   rm -rf conftest*
11775   eval "ac_cv_lib_$ac_lib_var=yes"
11776 else
11777   echo "configure: failed program was:" >&5
11778   cat conftest.$ac_ext >&5
11779   rm -rf conftest*
11780   eval "ac_cv_lib_$ac_lib_var=no"
11781 fi
11782 rm -f conftest*
11783 xe_check_libs=""
11784
11785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11786   echo "$ac_t""yes" 1>&6
11787   have_nas_sound=yes
11788 else
11789   echo "$ac_t""no" 1>&6
11790 fi
11791
11792
11793 else
11794   echo "$ac_t""no" 1>&6
11795 fi
11796
11797   if test "$have_nas_sound" = "yes"; then
11798     with_nas_sound=yes
11799     { test "$extra_verbose" = "yes" && cat << \EOF
11800     Defining HAVE_NAS_SOUND
11801 EOF
11802 cat >> confdefs.h <<\EOF
11803 #define HAVE_NAS_SOUND 1
11804 EOF
11805 }
11806
11807     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11808    echo "    xemacs will be linked with \"nas.o\""
11809  fi
11810     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11811             cat > conftest.$ac_ext <<EOF
11812 #line 11813 "configure"
11813 #include "confdefs.h"
11814 #include <audio/Xtutil.h>
11815 EOF
11816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11817   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11818   :
11819 else
11820   rm -rf conftest*
11821   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11822     Defining NAS_NO_ERROR_JUMP
11823 EOF
11824 cat >> confdefs.h <<\EOF
11825 #define NAS_NO_ERROR_JUMP 1
11826 EOF
11827 }
11828
11829 fi
11830 rm -f conftest*
11831
11832   else
11833     test "$with_nas_sound" = "yes" && \
11834       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11835     with_nas_sound=no
11836   fi
11837 fi
11838
11839 if test "$with_esd_sound" != "no"; then
11840   # Extract the first word of "esd-config", so it can be a program name with args.
11841 set dummy esd-config; ac_word=$2
11842 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11843 echo "configure:11844: checking for $ac_word" >&5
11844
11845 if test -n "$have_esd_config"; then
11846   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11847 else
11848   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11849   ac_dummy="$PATH"
11850   for ac_dir in $ac_dummy; do
11851     test -z "$ac_dir" && ac_dir=.
11852     if test -f $ac_dir/$ac_word; then
11853       ac_cv_prog_have_esd_config="yes"
11854       break
11855     fi
11856   done
11857   IFS="$ac_save_ifs"
11858   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11859 fi
11860 have_esd_config="$ac_cv_prog_have_esd_config"
11861 if test -n "$have_esd_config"; then
11862   echo "$ac_t""$have_esd_config" 1>&6
11863 else
11864   echo "$ac_t""no" 1>&6
11865 fi
11866
11867   if test "$have_esd_config" = "yes"; then
11868     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11869     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
11870     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11871     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11872 echo "configure:11873: checking for esd_play_stream" >&5
11873
11874 cat > conftest.$ac_ext <<EOF
11875 #line 11876 "configure"
11876 #include "confdefs.h"
11877 /* System header to define __stub macros and hopefully few prototypes,
11878     which can conflict with char esd_play_stream(); below.  */
11879 #include <assert.h>
11880 /* Override any gcc2 internal prototype to avoid an error.  */
11881 /* We use char because int might match the return type of a gcc2
11882     builtin and then its argument prototype would still apply.  */
11883 char esd_play_stream();
11884
11885 int main() {
11886
11887 /* The GNU C library defines this for functions which it implements
11888     to always fail with ENOSYS.  Some functions are actually named
11889     something starting with __ and the normal name is an alias.  */
11890 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11891 choke me
11892 #else
11893 esd_play_stream();
11894 #endif
11895
11896 ; return 0; }
11897 EOF
11898 if { (eval echo configure:11899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11899   rm -rf conftest*
11900   eval "ac_cv_func_esd_play_stream=yes"
11901 else
11902   echo "configure: failed program was:" >&5
11903   cat conftest.$ac_ext >&5
11904   rm -rf conftest*
11905   eval "ac_cv_func_esd_play_stream=no"
11906 fi
11907 rm -f conftest*
11908
11909 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11910   echo "$ac_t""yes" 1>&6
11911   have_esd_sound=yes
11912 else
11913   echo "$ac_t""no" 1>&6
11914 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11915 fi
11916
11917   fi
11918
11919   if test "$have_esd_sound" = "yes"; then
11920     with_esd_sound=yes
11921     need_miscplay=yes
11922     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11923    echo "    xemacs will be linked with \"esd.o\""
11924  fi
11925     { test "$extra_verbose" = "yes" && cat << \EOF
11926     Defining HAVE_ESD_SOUND
11927 EOF
11928 cat >> confdefs.h <<\EOF
11929 #define HAVE_ESD_SOUND 1
11930 EOF
11931 }
11932
11933   else
11934     test "$with_esd_sound" = "yes" && \
11935       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11936     with_esd_sound=no
11937   fi
11938 fi
11939
11940 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11941    echo "    xemacs will be linked with \"miscplay.o\""
11942  fi
11943
11944
11945 test -z "$with_tty" && with_tty=yes
11946
11947 if test "$with_tty" = "yes"  ; then
11948   echo "checking for TTY-related features" 1>&6
11949 echo "configure:11950: checking for TTY-related features" >&5
11950   { test "$extra_verbose" = "yes" && cat << \EOF
11951     Defining HAVE_TTY
11952 EOF
11953 cat >> confdefs.h <<\EOF
11954 #define HAVE_TTY 1
11955 EOF
11956 }
11957
11958   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
11959    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\""
11960  fi
11961
11962     if test -z "$with_ncurses"; then
11963     
11964 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11965 echo "configure:11966: checking for tgetent in -lncurses" >&5
11966 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11967
11968 xe_check_libs=" -lncurses "
11969 cat > conftest.$ac_ext <<EOF
11970 #line 11971 "configure"
11971 #include "confdefs.h"
11972 /* Override any gcc2 internal prototype to avoid an error.  */
11973 /* We use char because int might match the return type of a gcc2
11974     builtin and then its argument prototype would still apply.  */
11975 char tgetent();
11976
11977 int main() {
11978 tgetent()
11979 ; return 0; }
11980 EOF
11981 if { (eval echo configure:11982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11982   rm -rf conftest*
11983   eval "ac_cv_lib_$ac_lib_var=yes"
11984 else
11985   echo "configure: failed program was:" >&5
11986   cat conftest.$ac_ext >&5
11987   rm -rf conftest*
11988   eval "ac_cv_lib_$ac_lib_var=no"
11989 fi
11990 rm -f conftest*
11991 xe_check_libs=""
11992
11993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11994   echo "$ac_t""yes" 1>&6
11995   with_ncurses=yes
11996 else
11997   echo "$ac_t""no" 1>&6
11998 with_ncurses=no
11999 fi
12000
12001
12002   fi
12003   if test "$with_ncurses" = "yes"; then
12004     { test "$extra_verbose" = "yes" && cat << \EOF
12005     Defining HAVE_NCURSES
12006 EOF
12007 cat >> confdefs.h <<\EOF
12008 #define HAVE_NCURSES 1
12009 EOF
12010 }
12011
12012     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12013 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12014 echo "configure:12015: checking for ncurses/curses.h" >&5
12015
12016 cat > conftest.$ac_ext <<EOF
12017 #line 12018 "configure"
12018 #include "confdefs.h"
12019 #include <ncurses/curses.h>
12020 EOF
12021 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12022 { (eval echo configure:12023: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12023 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12024 if test -z "$ac_err"; then
12025   rm -rf conftest*
12026   eval "ac_cv_header_$ac_safe=yes"
12027 else
12028   echo "$ac_err" >&5
12029   echo "configure: failed program was:" >&5
12030   cat conftest.$ac_ext >&5
12031   rm -rf conftest*
12032   eval "ac_cv_header_$ac_safe=no"
12033 fi
12034 rm -f conftest*
12035 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12036   echo "$ac_t""yes" 1>&6
12037   curses_h_path=ncurses/curses.h
12038 else
12039   echo "$ac_t""no" 1>&6
12040 fi
12041
12042     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
12043 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
12044 echo "configure:12045: checking for ncurses/term.h" >&5
12045
12046 cat > conftest.$ac_ext <<EOF
12047 #line 12048 "configure"
12048 #include "confdefs.h"
12049 #include <ncurses/term.h>
12050 EOF
12051 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12052 { (eval echo configure:12053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12053 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12054 if test -z "$ac_err"; then
12055   rm -rf conftest*
12056   eval "ac_cv_header_$ac_safe=yes"
12057 else
12058   echo "$ac_err" >&5
12059   echo "configure: failed program was:" >&5
12060   cat conftest.$ac_ext >&5
12061   rm -rf conftest*
12062   eval "ac_cv_header_$ac_safe=no"
12063 fi
12064 rm -f conftest*
12065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12066   echo "$ac_t""yes" 1>&6
12067   term_h_path=ncurses/term.h
12068 else
12069   echo "$ac_t""no" 1>&6
12070 fi
12071
12072     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12073    echo "    xemacs will be linked with \"terminfo.o\""
12074  fi
12075     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
12076
12077     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
12078                         save_c_switch_site="$c_switch_site"
12079       c_switch_site="$c_switch_site -I/usr/include/ncurses"
12080       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
12081 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
12082 echo "configure:12083: checking for ncurses/curses.h" >&5
12083
12084 cat > conftest.$ac_ext <<EOF
12085 #line 12086 "configure"
12086 #include "confdefs.h"
12087 #include <ncurses/curses.h>
12088 EOF
12089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12090 { (eval echo configure:12091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12092 if test -z "$ac_err"; then
12093   rm -rf conftest*
12094   eval "ac_cv_header_$ac_safe=yes"
12095 else
12096   echo "$ac_err" >&5
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   eval "ac_cv_header_$ac_safe=no"
12101 fi
12102 rm -f conftest*
12103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12104   echo "$ac_t""yes" 1>&6
12105   curses_h_path=ncurses/curses.h
12106 else
12107   echo "$ac_t""no" 1>&6
12108 fi
12109
12110       if test "$ac_cv_header_ncurses_curses_h" = "yes"
12111         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
12112         else c_switch_site="$save_c_switch_site"
12113       fi
12114     fi
12115   else         if test "$have_terminfo" = "yes"; then
12116       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
12117    echo "    xemacs will be linked with \"terminfo.o\""
12118  fi
12119       if test -n "$libs_termcap"; then
12120         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12121       else
12122         for lib in curses termlib termcap; do
12123           
12124 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
12125 echo "configure:12126: checking for tgetent in -l$lib" >&5
12126 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
12127
12128 xe_check_libs=" -l$lib "
12129 cat > conftest.$ac_ext <<EOF
12130 #line 12131 "configure"
12131 #include "confdefs.h"
12132 /* Override any gcc2 internal prototype to avoid an error.  */
12133 /* We use char because int might match the return type of a gcc2
12134     builtin and then its argument prototype would still apply.  */
12135 char tgetent();
12136
12137 int main() {
12138 tgetent()
12139 ; return 0; }
12140 EOF
12141 if { (eval echo configure:12142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12142   rm -rf conftest*
12143   eval "ac_cv_lib_$ac_lib_var=yes"
12144 else
12145   echo "configure: failed program was:" >&5
12146   cat conftest.$ac_ext >&5
12147   rm -rf conftest*
12148   eval "ac_cv_lib_$ac_lib_var=no"
12149 fi
12150 rm -f conftest*
12151 xe_check_libs=""
12152
12153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12154   echo "$ac_t""yes" 1>&6
12155   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
12156 else
12157   echo "$ac_t""no" 1>&6
12158 fi
12159
12160
12161         done
12162       fi
12163     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
12164    echo "    xemacs will be linked with \"tparam.o\""
12165  fi
12166                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
12167       if test -n "$libs_termcap"; then
12168         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
12169       else
12170         
12171 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
12172 echo "configure:12173: checking for tgetent in -lcurses" >&5
12173 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
12174
12175 xe_check_libs=" -lcurses "
12176 cat > conftest.$ac_ext <<EOF
12177 #line 12178 "configure"
12178 #include "confdefs.h"
12179 /* Override any gcc2 internal prototype to avoid an error.  */
12180 /* We use char because int might match the return type of a gcc2
12181     builtin and then its argument prototype would still apply.  */
12182 char tgetent();
12183
12184 int main() {
12185 tgetent()
12186 ; return 0; }
12187 EOF
12188 if { (eval echo configure:12189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12189   rm -rf conftest*
12190   eval "ac_cv_lib_$ac_lib_var=yes"
12191 else
12192   echo "configure: failed program was:" >&5
12193   cat conftest.$ac_ext >&5
12194   rm -rf conftest*
12195   eval "ac_cv_lib_$ac_lib_var=no"
12196 fi
12197 rm -f conftest*
12198 xe_check_libs=""
12199
12200 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12201   echo "$ac_t""yes" 1>&6
12202   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
12203 else
12204   echo "$ac_t""no" 1>&6
12205 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
12206 echo "configure:12207: checking for tgetent in -ltermcap" >&5
12207 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
12208
12209 xe_check_libs=" -ltermcap "
12210 cat > conftest.$ac_ext <<EOF
12211 #line 12212 "configure"
12212 #include "confdefs.h"
12213 /* Override any gcc2 internal prototype to avoid an error.  */
12214 /* We use char because int might match the return type of a gcc2
12215     builtin and then its argument prototype would still apply.  */
12216 char tgetent();
12217
12218 int main() {
12219 tgetent()
12220 ; return 0; }
12221 EOF
12222 if { (eval echo configure:12223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12223   rm -rf conftest*
12224   eval "ac_cv_lib_$ac_lib_var=yes"
12225 else
12226   echo "configure: failed program was:" >&5
12227   cat conftest.$ac_ext >&5
12228   rm -rf conftest*
12229   eval "ac_cv_lib_$ac_lib_var=no"
12230 fi
12231 rm -f conftest*
12232 xe_check_libs=""
12233
12234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12235   echo "$ac_t""yes" 1>&6
12236   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12237 else
12238   echo "$ac_t""no" 1>&6
12239 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12240    echo "    xemacs will be linked with \"termcap.o\""
12241  fi
12242 fi
12243
12244
12245 fi
12246
12247
12248       fi
12249     fi
12250   fi
12251   { test "$extra_verbose" = "yes" && cat << EOF
12252     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
12253 EOF
12254 cat >> confdefs.h <<EOF
12255 #define CURSES_H_PATH "${curses_h_path-curses.h}"
12256 EOF
12257 }
12258
12259   { test "$extra_verbose" = "yes" && cat << EOF
12260     Defining TERM_H_PATH = "${term_h_path-term.h}"
12261 EOF
12262 cat >> confdefs.h <<EOF
12263 #define TERM_H_PATH "${term_h_path-term.h}"
12264 EOF
12265 }
12266
12267
12268     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12269 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12270 echo "configure:12271: checking for gpm.h" >&5
12271
12272 cat > conftest.$ac_ext <<EOF
12273 #line 12274 "configure"
12274 #include "confdefs.h"
12275 #include <gpm.h>
12276 EOF
12277 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12278 { (eval echo configure:12279: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12279 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12280 if test -z "$ac_err"; then
12281   rm -rf conftest*
12282   eval "ac_cv_header_$ac_safe=yes"
12283 else
12284   echo "$ac_err" >&5
12285   echo "configure: failed program was:" >&5
12286   cat conftest.$ac_ext >&5
12287   rm -rf conftest*
12288   eval "ac_cv_header_$ac_safe=no"
12289 fi
12290 rm -f conftest*
12291 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12292   echo "$ac_t""yes" 1>&6
12293   :
12294 else
12295   echo "$ac_t""no" 1>&6
12296 with_gpm=no
12297 fi
12298  }
12299   test -z "$with_gpm" && { 
12300 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12301 echo "configure:12302: checking for Gpm_Open in -lgpm" >&5
12302 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12303
12304 xe_check_libs=" -lgpm "
12305 cat > conftest.$ac_ext <<EOF
12306 #line 12307 "configure"
12307 #include "confdefs.h"
12308 /* Override any gcc2 internal prototype to avoid an error.  */
12309 /* We use char because int might match the return type of a gcc2
12310     builtin and then its argument prototype would still apply.  */
12311 char Gpm_Open();
12312
12313 int main() {
12314 Gpm_Open()
12315 ; return 0; }
12316 EOF
12317 if { (eval echo configure:12318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12318   rm -rf conftest*
12319   eval "ac_cv_lib_$ac_lib_var=yes"
12320 else
12321   echo "configure: failed program was:" >&5
12322   cat conftest.$ac_ext >&5
12323   rm -rf conftest*
12324   eval "ac_cv_lib_$ac_lib_var=no"
12325 fi
12326 rm -f conftest*
12327 xe_check_libs=""
12328
12329 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12330   echo "$ac_t""yes" 1>&6
12331   with_gpm=yes
12332 else
12333   echo "$ac_t""no" 1>&6
12334 with_gpm=no
12335 fi
12336
12337  }
12338   if test "$with_gpm" = "yes"; then
12339     { test "$extra_verbose" = "yes" && cat << \EOF
12340     Defining HAVE_GPM
12341 EOF
12342 cat >> confdefs.h <<\EOF
12343 #define HAVE_GPM 1
12344 EOF
12345 }
12346
12347     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12348    echo "    xemacs will be linked with \"gpmevent.o\""
12349  fi
12350     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12351   fi
12352
12353 else   for feature in ncurses gpm; do
12354     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12355       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12356     fi
12357     eval "with_${feature}=no"
12358   done
12359 fi 
12360 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12361    echo "    xemacs will be linked with \"event-unixoid.o\""
12362  fi
12363
12364
12365 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12366   != "no no no" && echo "checking for database support" 1>&6
12367 echo "configure:12368: checking for database support" >&5
12368
12369 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12370   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12371 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12372 echo "configure:12373: checking for ndbm.h" >&5
12373
12374 cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377 #include <ndbm.h>
12378 EOF
12379 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12380 { (eval echo configure:12381: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12381 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12382 if test -z "$ac_err"; then
12383   rm -rf conftest*
12384   eval "ac_cv_header_$ac_safe=yes"
12385 else
12386   echo "$ac_err" >&5
12387   echo "configure: failed program was:" >&5
12388   cat conftest.$ac_ext >&5
12389   rm -rf conftest*
12390   eval "ac_cv_header_$ac_safe=no"
12391 fi
12392 rm -f conftest*
12393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12394   echo "$ac_t""yes" 1>&6
12395   :
12396 else
12397   echo "$ac_t""no" 1>&6
12398
12399     test "$with_database_gdbm" = "yes" -o \
12400          "$with_database_dbm"  = "yes" && \
12401       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12402     with_database_gdbm=no with_database_dbm=no
12403 fi
12404
12405 fi
12406
12407 if test "$with_database_gdbm" != "no"; then
12408   
12409 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12410 echo "configure:12411: checking for dbm_open in -lgdbm" >&5
12411 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12412
12413 xe_check_libs=" -lgdbm "
12414 cat > conftest.$ac_ext <<EOF
12415 #line 12416 "configure"
12416 #include "confdefs.h"
12417 /* Override any gcc2 internal prototype to avoid an error.  */
12418 /* We use char because int might match the return type of a gcc2
12419     builtin and then its argument prototype would still apply.  */
12420 char dbm_open();
12421
12422 int main() {
12423 dbm_open()
12424 ; return 0; }
12425 EOF
12426 if { (eval echo configure:12427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12427   rm -rf conftest*
12428   eval "ac_cv_lib_$ac_lib_var=yes"
12429 else
12430   echo "configure: failed program was:" >&5
12431   cat conftest.$ac_ext >&5
12432   rm -rf conftest*
12433   eval "ac_cv_lib_$ac_lib_var=no"
12434 fi
12435 rm -f conftest*
12436 xe_check_libs=""
12437
12438 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12439   echo "$ac_t""yes" 1>&6
12440   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12441 else
12442   echo "$ac_t""no" 1>&6
12443 if test "$with_database_gdbm" = "yes"; then
12444      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12445    fi
12446    with_database_gdbm=no
12447 fi
12448
12449
12450 fi
12451
12452 if test "$with_database_dbm" != "no"; then
12453   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12454 echo "configure:12455: checking for dbm_open" >&5
12455
12456 cat > conftest.$ac_ext <<EOF
12457 #line 12458 "configure"
12458 #include "confdefs.h"
12459 /* System header to define __stub macros and hopefully few prototypes,
12460     which can conflict with char dbm_open(); below.  */
12461 #include <assert.h>
12462 /* Override any gcc2 internal prototype to avoid an error.  */
12463 /* We use char because int might match the return type of a gcc2
12464     builtin and then its argument prototype would still apply.  */
12465 char dbm_open();
12466
12467 int main() {
12468
12469 /* The GNU C library defines this for functions which it implements
12470     to always fail with ENOSYS.  Some functions are actually named
12471     something starting with __ and the normal name is an alias.  */
12472 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12473 choke me
12474 #else
12475 dbm_open();
12476 #endif
12477
12478 ; return 0; }
12479 EOF
12480 if { (eval echo configure:12481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12481   rm -rf conftest*
12482   eval "ac_cv_func_dbm_open=yes"
12483 else
12484   echo "configure: failed program was:" >&5
12485   cat conftest.$ac_ext >&5
12486   rm -rf conftest*
12487   eval "ac_cv_func_dbm_open=no"
12488 fi
12489 rm -f conftest*
12490
12491 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12492   echo "$ac_t""yes" 1>&6
12493   with_database_dbm=yes libdbm=
12494 else
12495   echo "$ac_t""no" 1>&6
12496
12497     
12498 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12499 echo "configure:12500: checking for dbm_open in -ldbm" >&5
12500 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12501
12502 xe_check_libs=" -ldbm "
12503 cat > conftest.$ac_ext <<EOF
12504 #line 12505 "configure"
12505 #include "confdefs.h"
12506 /* Override any gcc2 internal prototype to avoid an error.  */
12507 /* We use char because int might match the return type of a gcc2
12508     builtin and then its argument prototype would still apply.  */
12509 char dbm_open();
12510
12511 int main() {
12512 dbm_open()
12513 ; return 0; }
12514 EOF
12515 if { (eval echo configure:12516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12516   rm -rf conftest*
12517   eval "ac_cv_lib_$ac_lib_var=yes"
12518 else
12519   echo "configure: failed program was:" >&5
12520   cat conftest.$ac_ext >&5
12521   rm -rf conftest*
12522   eval "ac_cv_lib_$ac_lib_var=no"
12523 fi
12524 rm -f conftest*
12525 xe_check_libs=""
12526
12527 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12528   echo "$ac_t""yes" 1>&6
12529   with_database_dbm=yes libdbm=-ldbm
12530 else
12531   echo "$ac_t""no" 1>&6
12532 test "$with_database_dbm" = "yes" && \
12533         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12534       with_database_dbm=no
12535 fi
12536
12537
12538 fi
12539
12540 fi
12541
12542 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12543 test "$with_database_gdbm" = "yes" -o \
12544      "$with_database_dbm"  = "yes" && \
12545   { test "$extra_verbose" = "yes" && cat << \EOF
12546     Defining HAVE_DBM
12547 EOF
12548 cat >> confdefs.h <<\EOF
12549 #define HAVE_DBM 1
12550 EOF
12551 }
12552
12553
12554 if test "$with_database_berkdb" != "no"; then
12555   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12556 echo "configure:12557: checking for Berkeley db.h" >&5
12557   for path in "db/db.h" "db.h"; do
12558     cat > conftest.$ac_ext <<EOF
12559 #line 12560 "configure"
12560 #include "confdefs.h"
12561
12562 #include <stdlib.h>
12563 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12564 #ifdef HAVE_INTTYPES_H
12565 #define __BIT_TYPES_DEFINED__
12566 #include <inttypes.h>
12567 typedef uint8_t  u_int8_t;
12568 typedef uint16_t u_int16_t;
12569 typedef uint32_t u_int32_t;
12570 #ifdef WE_DONT_NEED_QUADS
12571 typedef uint64_t u_int64_t;
12572 #endif
12573 #endif
12574 #endif
12575 #include <$path>
12576
12577 int main() {
12578
12579 ; return 0; }
12580 EOF
12581 if { (eval echo configure:12582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12582   rm -rf conftest*
12583   db_h_path="$path"; break
12584 else
12585   echo "configure: failed program was:" >&5
12586   cat conftest.$ac_ext >&5
12587 fi
12588 rm -f conftest*
12589   done
12590   if test -z "$db_h_path"
12591   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12592   else echo "$ac_t""$db_h_path" 1>&6
12593   fi
12594
12595   if test "$with_database_berkdb" != "no"; then
12596     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12597 echo "configure:12598: checking for Berkeley DB version" >&5
12598     cat > conftest.$ac_ext <<EOF
12599 #line 12600 "configure"
12600 #include "confdefs.h"
12601 #include <$db_h_path>
12602 #if DB_VERSION_MAJOR > 1
12603 yes
12604 #endif
12605
12606 EOF
12607 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12608   egrep "yes" >/dev/null 2>&1; then
12609   rm -rf conftest*
12610   echo "$ac_t""2" 1>&6; dbfunc=db_open
12611 else
12612   rm -rf conftest*
12613   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12614 fi
12615 rm -f conftest*
12616
12617     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12618 echo "configure:12619: checking for $dbfunc" >&5
12619
12620 cat > conftest.$ac_ext <<EOF
12621 #line 12622 "configure"
12622 #include "confdefs.h"
12623 /* System header to define __stub macros and hopefully few prototypes,
12624     which can conflict with char $dbfunc(); below.  */
12625 #include <assert.h>
12626 /* Override any gcc2 internal prototype to avoid an error.  */
12627 /* We use char because int might match the return type of a gcc2
12628     builtin and then its argument prototype would still apply.  */
12629 char $dbfunc();
12630
12631 int main() {
12632
12633 /* The GNU C library defines this for functions which it implements
12634     to always fail with ENOSYS.  Some functions are actually named
12635     something starting with __ and the normal name is an alias.  */
12636 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12637 choke me
12638 #else
12639 $dbfunc();
12640 #endif
12641
12642 ; return 0; }
12643 EOF
12644 if { (eval echo configure:12645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12645   rm -rf conftest*
12646   eval "ac_cv_func_$dbfunc=yes"
12647 else
12648   echo "configure: failed program was:" >&5
12649   cat conftest.$ac_ext >&5
12650   rm -rf conftest*
12651   eval "ac_cv_func_$dbfunc=no"
12652 fi
12653 rm -f conftest*
12654
12655 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12656   echo "$ac_t""yes" 1>&6
12657   with_database_berkdb=yes need_libdb=no
12658 else
12659   echo "$ac_t""no" 1>&6
12660
12661     
12662 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12663 echo "configure:12664: checking for $dbfunc in -ldb" >&5
12664 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12665
12666 xe_check_libs=" -ldb "
12667 cat > conftest.$ac_ext <<EOF
12668 #line 12669 "configure"
12669 #include "confdefs.h"
12670 /* Override any gcc2 internal prototype to avoid an error.  */
12671 /* We use char because int might match the return type of a gcc2
12672     builtin and then its argument prototype would still apply.  */
12673 char $dbfunc();
12674
12675 int main() {
12676 $dbfunc()
12677 ; return 0; }
12678 EOF
12679 if { (eval echo configure:12680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12680   rm -rf conftest*
12681   eval "ac_cv_lib_$ac_lib_var=yes"
12682 else
12683   echo "configure: failed program was:" >&5
12684   cat conftest.$ac_ext >&5
12685   rm -rf conftest*
12686   eval "ac_cv_lib_$ac_lib_var=no"
12687 fi
12688 rm -f conftest*
12689 xe_check_libs=""
12690
12691 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12692   echo "$ac_t""yes" 1>&6
12693   with_database_berkdb=yes need_libdb=yes
12694 else
12695   echo "$ac_t""no" 1>&6
12696 fi
12697
12698
12699 fi
12700
12701   fi
12702
12703   if test "$with_database_berkdb" = "yes"; then
12704     { test "$extra_verbose" = "yes" && cat << EOF
12705     Defining DB_H_PATH = "$db_h_path"
12706 EOF
12707 cat >> confdefs.h <<EOF
12708 #define DB_H_PATH "$db_h_path"
12709 EOF
12710 }
12711
12712     { test "$extra_verbose" = "yes" && cat << \EOF
12713     Defining HAVE_BERKELEY_DB
12714 EOF
12715 cat >> confdefs.h <<\EOF
12716 #define HAVE_BERKELEY_DB 1
12717 EOF
12718 }
12719
12720     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12721   else with_database_berkdb=no
12722   fi
12723 fi
12724
12725 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12726      != "no no no"; then
12727   { test "$extra_verbose" = "yes" && cat << \EOF
12728     Defining HAVE_DATABASE
12729 EOF
12730 cat >> confdefs.h <<\EOF
12731 #define HAVE_DATABASE 1
12732 EOF
12733 }
12734
12735   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12736    echo "    xemacs will be linked with \"database.o\""
12737  fi
12738 fi
12739
12740 if test "$with_socks" = "yes"; then
12741   
12742 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12743 echo "configure:12744: checking for SOCKSinit in -lsocks" >&5
12744 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12745
12746 xe_check_libs=" -lsocks "
12747 cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 /* Override any gcc2 internal prototype to avoid an error.  */
12751 /* We use char because int might match the return type of a gcc2
12752     builtin and then its argument prototype would still apply.  */
12753 char SOCKSinit();
12754
12755 int main() {
12756 SOCKSinit()
12757 ; return 0; }
12758 EOF
12759 if { (eval echo configure:12760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12760   rm -rf conftest*
12761   eval "ac_cv_lib_$ac_lib_var=yes"
12762 else
12763   echo "configure: failed program was:" >&5
12764   cat conftest.$ac_ext >&5
12765   rm -rf conftest*
12766   eval "ac_cv_lib_$ac_lib_var=no"
12767 fi
12768 rm -f conftest*
12769 xe_check_libs=""
12770
12771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12772   echo "$ac_t""yes" 1>&6
12773     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12774     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12775   { test "$extra_verbose" = "yes" && cat << EOF
12776     Defining $ac_tr_lib
12777 EOF
12778 cat >> confdefs.h <<EOF
12779 #define $ac_tr_lib 1
12780 EOF
12781 }
12782
12783   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12784
12785 else
12786   echo "$ac_t""no" 1>&6
12787 fi
12788
12789
12790   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12791     Defining HAVE_SOCKS
12792 EOF
12793 cat >> confdefs.h <<\EOF
12794 #define HAVE_SOCKS 1
12795 EOF
12796 }
12797
12798 fi
12799
12800 if test "$usage_tracking" = "yes"; then
12801   { test "$extra_verbose" = "yes" && cat << \EOF
12802     Defining USAGE_TRACKING
12803 EOF
12804 cat >> confdefs.h <<\EOF
12805 #define USAGE_TRACKING 1
12806 EOF
12807 }
12808
12809   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12810 fi
12811
12812 if test "$with_modules" != "no"; then
12813   echo "checking for module support" 1>&6
12814 echo "configure:12815: checking for module support" >&5
12815
12816     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12817 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12818 echo "configure:12819: checking for dlfcn.h" >&5
12819
12820 cat > conftest.$ac_ext <<EOF
12821 #line 12822 "configure"
12822 #include "confdefs.h"
12823 #include <dlfcn.h>
12824 EOF
12825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12826 { (eval echo configure:12827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12828 if test -z "$ac_err"; then
12829   rm -rf conftest*
12830   eval "ac_cv_header_$ac_safe=yes"
12831 else
12832   echo "$ac_err" >&5
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   eval "ac_cv_header_$ac_safe=no"
12837 fi
12838 rm -f conftest*
12839 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12840   echo "$ac_t""yes" 1>&6
12841   
12842     
12843 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12844 echo "configure:12845: checking for dlopen in -ldl" >&5
12845 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12846
12847 xe_check_libs=" -ldl "
12848 cat > conftest.$ac_ext <<EOF
12849 #line 12850 "configure"
12850 #include "confdefs.h"
12851 /* Override any gcc2 internal prototype to avoid an error.  */
12852 /* We use char because int might match the return type of a gcc2
12853     builtin and then its argument prototype would still apply.  */
12854 char dlopen();
12855
12856 int main() {
12857 dlopen()
12858 ; return 0; }
12859 EOF
12860 if { (eval echo configure:12861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12861   rm -rf conftest*
12862   eval "ac_cv_lib_$ac_lib_var=yes"
12863 else
12864   echo "configure: failed program was:" >&5
12865   cat conftest.$ac_ext >&5
12866   rm -rf conftest*
12867   eval "ac_cv_lib_$ac_lib_var=no"
12868 fi
12869 rm -f conftest*
12870 xe_check_libs=""
12871
12872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12873   echo "$ac_t""yes" 1>&6
12874   have_dl=yes libdl=dl
12875 else
12876   echo "$ac_t""no" 1>&6
12877
12878 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12879 echo "configure:12880: checking for dlopen in -lc" >&5
12880 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12881
12882 xe_check_libs=" -lc "
12883 cat > conftest.$ac_ext <<EOF
12884 #line 12885 "configure"
12885 #include "confdefs.h"
12886 /* Override any gcc2 internal prototype to avoid an error.  */
12887 /* We use char because int might match the return type of a gcc2
12888     builtin and then its argument prototype would still apply.  */
12889 char dlopen();
12890
12891 int main() {
12892 dlopen()
12893 ; return 0; }
12894 EOF
12895 if { (eval echo configure:12896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12896   rm -rf conftest*
12897   eval "ac_cv_lib_$ac_lib_var=yes"
12898 else
12899   echo "configure: failed program was:" >&5
12900   cat conftest.$ac_ext >&5
12901   rm -rf conftest*
12902   eval "ac_cv_lib_$ac_lib_var=no"
12903 fi
12904 rm -f conftest*
12905 xe_check_libs=""
12906
12907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12908   echo "$ac_t""yes" 1>&6
12909   have_dl=yes 
12910 else
12911   echo "$ac_t""no" 1>&6
12912 fi
12913
12914
12915 fi
12916
12917
12918 else
12919   echo "$ac_t""no" 1>&6
12920 fi
12921
12922   if test -n "$have_dl"; then
12923     { test "$extra_verbose" = "yes" && cat << \EOF
12924     Defining HAVE_DLOPEN
12925 EOF
12926 cat >> confdefs.h <<\EOF
12927 #define HAVE_DLOPEN 1
12928 EOF
12929 }
12930
12931   else
12932     
12933 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12934 echo "configure:12935: checking for shl_load in -ldld" >&5
12935 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12936
12937 xe_check_libs=" -ldld "
12938 cat > conftest.$ac_ext <<EOF
12939 #line 12940 "configure"
12940 #include "confdefs.h"
12941 /* Override any gcc2 internal prototype to avoid an error.  */
12942 /* We use char because int might match the return type of a gcc2
12943     builtin and then its argument prototype would still apply.  */
12944 char shl_load();
12945
12946 int main() {
12947 shl_load()
12948 ; return 0; }
12949 EOF
12950 if { (eval echo configure:12951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12951   rm -rf conftest*
12952   eval "ac_cv_lib_$ac_lib_var=yes"
12953 else
12954   echo "configure: failed program was:" >&5
12955   cat conftest.$ac_ext >&5
12956   rm -rf conftest*
12957   eval "ac_cv_lib_$ac_lib_var=no"
12958 fi
12959 rm -f conftest*
12960 xe_check_libs=""
12961
12962 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12963   echo "$ac_t""yes" 1>&6
12964   libdl=dld have_dl=yes;
12965       { test "$extra_verbose" = "yes" && cat << \EOF
12966     Defining HAVE_SHL_LOAD
12967 EOF
12968 cat >> confdefs.h <<\EOF
12969 #define HAVE_SHL_LOAD 1
12970 EOF
12971 }
12972
12973 else
12974   echo "$ac_t""no" 1>&6
12975
12976 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12977 echo "configure:12978: checking for dld_init in -ldld" >&5
12978 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12979
12980 xe_check_libs=" -ldld "
12981 cat > conftest.$ac_ext <<EOF
12982 #line 12983 "configure"
12983 #include "confdefs.h"
12984 /* Override any gcc2 internal prototype to avoid an error.  */
12985 /* We use char because int might match the return type of a gcc2
12986     builtin and then its argument prototype would still apply.  */
12987 char dld_init();
12988
12989 int main() {
12990 dld_init()
12991 ; return 0; }
12992 EOF
12993 if { (eval echo configure:12994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12994   rm -rf conftest*
12995   eval "ac_cv_lib_$ac_lib_var=yes"
12996 else
12997   echo "configure: failed program was:" >&5
12998   cat conftest.$ac_ext >&5
12999   rm -rf conftest*
13000   eval "ac_cv_lib_$ac_lib_var=no"
13001 fi
13002 rm -f conftest*
13003 xe_check_libs=""
13004
13005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
13006   echo "$ac_t""yes" 1>&6
13007   libdl=dld have_dl=yes;
13008       { test "$extra_verbose" = "yes" && cat << \EOF
13009     Defining HAVE_DLD_INIT
13010 EOF
13011 cat >> confdefs.h <<\EOF
13012 #define HAVE_DLD_INIT 1
13013 EOF
13014 }
13015
13016 else
13017   echo "$ac_t""no" 1>&6
13018 fi
13019
13020
13021 fi
13022
13023
13024   fi
13025
13026   if test -n "$have_dl"; then
13027         
13028 dll_ld=
13029 dll_ldflags=
13030 dll_cflags=
13031 dll_post=
13032 dll_ldo="-o"
13033 ld_dynamic_link_flags=
13034 xehost=$canonical
13035 xealias=$internal_configuration
13036
13037 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
13038 echo "configure:13039: checking how to build dynamic libraries for ${xehost}" >&5
13039 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
13040 case "$xehost" in
13041 *-*-linux-gnu*) ;;
13042 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
13043 esac
13044
13045 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
13046 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
13047 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
13048
13049 case "$xehost_os" in
13050 aix3*)
13051   # AIX sometimes has problems with the GCC collect2 program.  For some
13052   # reason, if we set the COLLECT_NAMES environment variable, the problems
13053   # vanish in a puff of smoke.
13054   if test "${COLLECT_NAMES+set}" != set; then
13055     COLLECT_NAMES=
13056     export COLLECT_NAMES
13057   fi
13058   ;;
13059 esac
13060
13061 # Now see if the compiler is really GCC.
13062 if test "$GCC" = "yes"; then
13063   XEGCC=yes
13064 else
13065   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
13066 echo "configure:13067: checking checking whether we are using GNU C" >&5
13067   cat > conftest.$ac_ext <<EOF
13068 #line 13069 "configure"
13069 #include "confdefs.h"
13070
13071 #ifdef __GNUC__
13072   yes;
13073 #endif
13074
13075 EOF
13076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13077   egrep "yes" >/dev/null 2>&1; then
13078   rm -rf conftest*
13079   XEGCC=yes
13080 else
13081   rm -rf conftest*
13082   XEGCC=no
13083 fi
13084 rm -f conftest*
13085
13086   echo "$ac_t""${XEGCC}" 1>&6
13087 fi
13088
13089 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
13090 echo "configure:13091: checking how to produce PIC code" >&5
13091 wl=
13092
13093 can_build_shared=yes
13094 if test "$XEGCC" = yes; then
13095   wl='-Wl,'
13096
13097   case "$xehost_os" in
13098   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
13099     # PIC is the default for these OSes.
13100     ;;
13101
13102   aix3* | aix4* | os2*)
13103     # We can build DLLs from non-PIC.
13104     ;;
13105   amigaos*)
13106     # FIXME: we need at least 68020 code to build shared libraries, but
13107     # adding the `-m68020' flag to GCC prevents building anything better,
13108     # like `-m68040'.
13109     dll_cflags='-m68020 -resident32 -malways-restore-a4'
13110     ;;
13111   *)
13112     dll_cflags='-fPIC'
13113     ;;
13114   esac
13115 else
13116   # PORTME Check for PIC flags for the system compiler.
13117   case "$xehost_os" in
13118   hpux9* | hpux1[0-9]*)
13119     # Is there a better link_static_flag that works with the bundled CC?
13120     wl='-Wl,'
13121     dll_cflags='+Z'
13122     ;;
13123
13124   irix5* | irix6*)
13125     wl='-Wl,'
13126     # PIC (with -KPIC) is the default.
13127     ;;
13128
13129   os2*)
13130     # We can build DLLs from non-PIC.
13131     ;;
13132
13133   osf3* | osf4*)
13134     # All OSF/1 code is PIC.
13135     wl='-Wl,'
13136     ;;
13137
13138   sco3.2v5*)
13139     dll_cflags='-belf -Kpic'
13140     wl='-Wl,'
13141     ;;
13142
13143   unixware*)
13144     dll_cflags="-KPIC"
13145     wl="-Wl,"
13146     ;;
13147
13148   sysv4*)
13149     dll_cflags="-KPIC"
13150     wl="-Wl,"
13151     ;;
13152
13153   sysv5*)
13154     dll_cflags="-KPIC"
13155     wl="-Wl,"
13156     ;;
13157
13158   solaris2*)
13159     dll_cflags='-KPIC'
13160     wl='-Wl,'
13161     ;;
13162
13163   sunos4*)
13164     dll_cflags='-PIC'
13165     wl='-Qoption ld '
13166     ;;
13167
13168   uts4*)
13169     dll_cflags='-pic'
13170     ;;
13171
13172   *)
13173     can_build_shared=no
13174     ;;
13175   esac
13176 fi
13177
13178 if test -n "$dll_cflags"; then
13179   echo "$ac_t""${dll_cflags}" 1>&6
13180   
13181   # Check to make sure the dll_cflags actually works.
13182   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
13183 echo "configure:13184: checking if PIC flag ${dll_cflags} really works" >&5
13184   save_CFLAGS="$CFLAGS"
13185   CFLAGS="$CFLAGS $dll_cflags -DPIC"
13186   cat > conftest.$ac_ext <<EOF
13187 #line 13188 "configure"
13188 #include "confdefs.h"
13189
13190 int main() {
13191 int x=0;
13192 ; return 0; }
13193 EOF
13194 if { (eval echo configure:13195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
13195   rm -rf conftest*
13196   
13197     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
13198     # reports no error.  So, we need to grep stderr for (Bundled).
13199     if grep '(Bundled)' config.log >/dev/null; then
13200       echo "$ac_t""no" 1>&6
13201       can_build_shared=no
13202       dll_cflags=
13203     else
13204       echo "$ac_t""yes" 1>&6
13205     fi
13206 else
13207   echo "configure: failed program was:" >&5
13208   cat conftest.$ac_ext >&5
13209   rm -rf conftest*
13210   echo "$ac_t""no" 1>&6
13211     can_build_shared=no
13212     dll_cflags=
13213 fi
13214 rm -f conftest*
13215   CFLAGS="$save_CFLAGS"
13216 else
13217   echo "$ac_t""none" 1>&6
13218 fi
13219
13220 if test "$can_build_shared" = "yes"; then
13221 cc_produces_so=no
13222 xldf=
13223 xcldf=
13224 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13225 echo "configure:13226: checking if C compiler can produce shared libraries" >&5
13226 if test "$XEGCC" = yes; then
13227   xcldf="-shared"
13228   xldf="-shared"
13229 else # Not using GCC
13230   case "$xehost_os" in
13231     aix3* | aix4*)
13232       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13233       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13234       ;;
13235
13236     freebsd2* | netbsd* | openbsd*)
13237       xldf="-Bshareable"
13238       xcldf="${wl}-Bshareable"
13239       ;;
13240
13241     freebsd3*)
13242       xcldf="-shared"
13243       ;;
13244
13245     hpux*)
13246       xldf="-b +s"
13247       xcldf="${wl}-b ${wl}+s"
13248       ;;
13249
13250     irix5* | irix6* | osf3* | osf4*)
13251       xcldf="${wl}-shared"
13252       xldf="-shared"
13253       ;;
13254
13255     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13256       xcldf="-G"
13257       xldf="-G"
13258       ;;
13259
13260     sunos4*)
13261       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13262       xldf="-assert pure-text -Bstatic"
13263       ;;
13264   esac
13265 fi # End if if we are using gcc
13266
13267 if test -n "$xcldf"; then
13268   save_LDFLAGS=$LDFLAGS
13269   save_LIBS=$LIBS
13270   save_xe_libs=$xe_libs
13271   LDFLAGS="$xcldf $LDFLAGS"
13272   LIBS=
13273   xe_libs=
13274   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13275   cat > conftest.$ac_ext <<EOF
13276 #line 13277 "configure"
13277 #include "confdefs.h"
13278
13279 int main() {
13280 int x=0;
13281 ; return 0; }
13282 EOF
13283 if { (eval echo configure:13284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13284   rm -rf conftest*
13285   cc_produces_so=yes
13286 else
13287   echo "configure: failed program was:" >&5
13288   cat conftest.$ac_ext >&5
13289   rm -rf conftest*
13290   cc_produces_so=no
13291 fi
13292 rm -f conftest*
13293   LDFLAGS=$save_LDFLAGS
13294   LIBS=$save_LIBS
13295   xe_libs=$save_xe_libs
13296   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13297 else
13298   cc_produces_so=no
13299 fi
13300 echo "$ac_t""${cc_produces_so}" 1>&6
13301
13302 LTLD=$LD
13303 if test -z "$LTLD"; then
13304   ac_prog=ld
13305   if test "$XEGCC" = yes; then
13306     # Check if gcc -print-prog-name=ld gives a path.
13307     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13308 echo "configure:13309: checking for ld used by GCC" >&5
13309     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13310     case "$ac_prog" in
13311     # Accept absolute paths.
13312     /*)
13313       if test -z "$LTLD"; then
13314         case "$ac_prog" in
13315           *gcc-lib*) LTLD="$CC"
13316                      ;;
13317           *)         LTLD="$ac_prog"
13318                      ;;
13319         esac
13320       fi
13321       ;;
13322     "")
13323       # If it fails, then pretend we aren't using GCC.
13324       ac_prog=ld
13325       ;;
13326     *)
13327       # If it is relative, then search for the first ld in PATH.
13328       with_gnu_ld=unknown
13329       ;;
13330     esac
13331   else
13332     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13333 echo "configure:13334: checking for GNU ld" >&5
13334   fi
13335
13336   if test -z "$LTLD"; then
13337     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13338     for ac_dir in $PATH; do
13339       test -z "$ac_dir" && ac_dir=.
13340       if test -f "$ac_dir/$ac_prog"; then
13341         LTLD="$ac_dir/$ac_prog"
13342         # Check to see if the program is GNU ld.  I'd rather use --version,
13343         # but apparently some GNU ld's only accept -v.
13344         # Break only if it was the GNU/non-GNU ld that we prefer.
13345         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13346           xe_gnu_ld=yes
13347         else
13348           xe_gnu_ld=no
13349         fi
13350       fi
13351     done
13352     IFS="$ac_save_ifs"
13353   fi
13354
13355   if test -n "$LTLD"; then
13356     echo "$ac_t""${LTLD}" 1>&6
13357   else
13358     echo "$ac_t""no" 1>&6
13359   fi
13360
13361   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13362     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13363     exit 1
13364   fi
13365 fi
13366
13367 ld_dynamic_link_flags=
13368
13369 # Check to see if it really is or isn't GNU ld.
13370 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13371 echo "configure:13372: checking if the linker is GNU ld" >&5
13372 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13373 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13374   xe_gnu_ld=yes
13375 else
13376   xe_gnu_ld=no
13377 fi
13378 echo "$ac_t""${xe_gnu_ld}" 1>&6
13379
13380 case "$xehost_os" in
13381   amigaos* | sunos4*)
13382     # On these operating systems, we should treat GNU ld like the system ld.
13383     gnu_ld_acts_native=yes
13384     ;;
13385   *)
13386     gnu_ld_acts_native=no
13387     ;;
13388 esac
13389
13390 if test "$cc_produces_so" = "yes"; then
13391   dll_ld=$CC
13392   dll_ldflags=$xcldf
13393   can_build_shared=yes
13394   ld_shlibs=yes
13395 else
13396   # OK - only NOW do we futz about with ld.
13397   # See if the linker supports building shared libraries.
13398   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13399 echo "configure:13400: checking whether the linker supports shared libraries" >&5
13400   dll_ld=$CC
13401   dll_ldflags=$LDFLAGS
13402   ld_shlibs=yes
13403   can_build_shared=yes
13404   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13405     # See if GNU ld supports shared libraries.
13406     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13407       dll_ld=$CC
13408       dll_ldflags="-shared"
13409       ld_shlibs=yes
13410     else
13411       ld_shlibs=no
13412     fi
13413   else
13414     # PORTME fill in a description of your system's linker (not GNU ld)
13415     case "$xehost_os" in
13416     aix3*)
13417       dll_ld=$LTLD
13418       dll_ldflags=$xldf
13419       ;;
13420
13421     aix4*)
13422       dll_ldflags=$xcldf
13423       ;;
13424
13425     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13426     # support.  Future versions do this automatically, but an explicit c++rt0.o
13427     # doesn't break anything, and helps significantly (at the cost of a little
13428     # extra space).
13429     freebsd2.2*)
13430       dll_ld=$LTLD
13431       dll_ldflags=$xldf
13432       dll_post="/usr/lib/c++rt0.o"
13433       ;;
13434
13435     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13436     freebsd2*)
13437       dll_ld=$LTLD
13438       dll_ldflags="-Bshareable"
13439       ;;
13440
13441     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13442     freebsd3*)
13443       dll_ldflags="-shared"
13444       ;;
13445
13446     hpux*)
13447       dll_ld=$LTLD
13448       dll_ldflags=$xldf
13449       ;;
13450
13451     irix5* | irix6*)
13452       dll_ld=$LTLD
13453       dll_ldflags=$xldf
13454       ;;
13455
13456     netbsd*)
13457       # Tested with NetBSD 1.2 ld
13458       dll_ld=$LTLD
13459       dll_ldflags=$xldf
13460       ;;
13461
13462     openbsd*)
13463       dll_ld=$LTLD
13464       dll_ldflags=$xldf
13465       ;;
13466
13467     osf3* | osf4*)
13468       dll_ld=$LTLD
13469       dll_ldflags=$xldf
13470       ;;
13471
13472     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13473     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13474       dll_ld=$LTLD
13475       case "$dll_ld" in
13476         *gcc*) dll_ldflags="-shared"
13477                dll_ld=$CC
13478                ;;
13479         *)     dll_ldflags="-G"
13480                ;;
13481       esac
13482       ;;
13483
13484     sunos4*)
13485       if test "$XEGCC" = yes; then
13486         dll_ld=$CC
13487       else
13488         dll_ld=$LTLD
13489       fi
13490       dll_ldflags=$xldf
13491       ;;
13492
13493     uts4*)
13494       dll_ld=$LTLD
13495       dll_ldflags="-G"
13496       ;;
13497
13498     bsdi*)
13499       dll_ldflags="-r"
13500       dll_ld="shlicc2"
13501       ;;
13502
13503     *)
13504       ld_shlibs=no
13505       can_build_shared=no
13506       ;;
13507     esac
13508   fi
13509   echo "$ac_t""${ld_shlibs}" 1>&6
13510   if test "$ld_shlibs" = "no"; then
13511     can_build_shared=no
13512   fi
13513 fi # End of if cc_produces_so = no
13514
13515
13516 if test "$xe_gnu_ld" = yes; then
13517   if test "$ld_shlibs" = yes; then
13518     ld_dynamic_link_flags="${wl}-export-dynamic"
13519   fi
13520 fi
13521
13522 if test -z "$ld_dynamic_link_flags"; then
13523   case "$xehost_os" in
13524   aix3*)
13525     ld_dynamic_link_flags=
13526     ;;
13527
13528   aix4*)
13529     ld_dynamic_link_flags=
13530     ;;
13531
13532   freebsd2.2*)
13533     ld_dynamic_link_flags=
13534     ;;
13535
13536   freebsd2*)
13537     ld_dynamic_link_flags=
13538     ;;
13539
13540   freebsd3*)
13541     ld_dynamic_link_flags=
13542     ;;
13543
13544   hpux*)
13545     ld_dynamic_link_flags="${wl}-E"
13546     ;;
13547
13548   irix5* | irix6*)
13549     ld_dynamic_link_flags=
13550     ;;
13551
13552   netbsd*)
13553     ld_dynamic_link_flags=
13554     ;;
13555
13556   openbsd*)
13557     ld_dynamic_link_flags=
13558     ;;
13559
13560   osf3* | osf4*)
13561     ld_dynamic_link_flags=
13562     ;;
13563
13564   solaris2* | solaris7*)
13565     ld_dynamic_link_flags=
13566     ;;
13567
13568   sco3.2v5* | unixware* | sysv5* | sysv4*)
13569     ld_dynamic_link_flags="${wl}-Bexport"
13570     ;;
13571
13572   sunos4*)
13573     ld_dynamic_link_flags=
13574     ;;
13575
13576   uts4*)
13577     ld_dynamic_link_flags=
13578     ;;
13579
13580   bsdi*)
13581     ld_dynamic_link_flags=
13582     ;;
13583
13584   esac
13585 fi # End of if -z ld_dynamic_link_flags
13586 fi # End of if test "$can_build_shared" = "yes"
13587
13588
13589
13590
13591
13592
13593
13594
13595   fi
13596
13597   if test "$can_build_shared" = "yes"; then
13598     { test "$extra_verbose" = "yes" && cat << \EOF
13599     Defining HAVE_SHLIB
13600 EOF
13601 cat >> confdefs.h <<\EOF
13602 #define HAVE_SHLIB 1
13603 EOF
13604 }
13605
13606     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13607    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13608  fi
13609     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13610     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13611     for ac_func in dlerror _dlerror
13612 do
13613 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13614 echo "configure:13615: checking for $ac_func" >&5
13615
13616 cat > conftest.$ac_ext <<EOF
13617 #line 13618 "configure"
13618 #include "confdefs.h"
13619 /* System header to define __stub macros and hopefully few prototypes,
13620     which can conflict with char $ac_func(); below.  */
13621 #include <assert.h>
13622 /* Override any gcc2 internal prototype to avoid an error.  */
13623 /* We use char because int might match the return type of a gcc2
13624     builtin and then its argument prototype would still apply.  */
13625 char $ac_func();
13626
13627 int main() {
13628
13629 /* The GNU C library defines this for functions which it implements
13630     to always fail with ENOSYS.  Some functions are actually named
13631     something starting with __ and the normal name is an alias.  */
13632 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13633 choke me
13634 #else
13635 $ac_func();
13636 #endif
13637
13638 ; return 0; }
13639 EOF
13640 if { (eval echo configure:13641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13641   rm -rf conftest*
13642   eval "ac_cv_func_$ac_func=yes"
13643 else
13644   echo "configure: failed program was:" >&5
13645   cat conftest.$ac_ext >&5
13646   rm -rf conftest*
13647   eval "ac_cv_func_$ac_func=no"
13648 fi
13649 rm -f conftest*
13650
13651 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13652   echo "$ac_t""yes" 1>&6
13653     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13654   { test "$extra_verbose" = "yes" && cat << EOF
13655     Defining $ac_tr_func
13656 EOF
13657 cat >> confdefs.h <<EOF
13658 #define $ac_tr_func 1
13659 EOF
13660 }
13661  
13662 else
13663   echo "$ac_t""no" 1>&6
13664 fi
13665 done
13666
13667     with_modules=yes
13668   else
13669     if test "$with_modules" = "yes"; then
13670       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13671     else
13672       echo "configure: warning: "Module support cannot be provided."" 1>&2
13673     fi
13674     with_modules=no
13675   fi
13676 fi
13677
13678 cat > conftest.$ac_ext <<EOF
13679 #line 13680 "configure"
13680 #include "confdefs.h"
13681 int main(int c,char *v[]){return 0;}
13682 EOF
13683 if { (eval echo configure:13684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13684 then
13685   :
13686 else
13687   conftest_rc="$?"
13688   echo "configure: failed program was:" >&5
13689   cat conftest.$ac_ext >&5
13690   rm -fr conftest*
13691   
13692   echo ""
13693   echo "*** PANIC *** The C compiler can no longer build working executables."
13694   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13695   echo "*** PANIC *** The most likely reason for this problem is that configure"
13696   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13697   echo "*** PANIC *** found at run time."
13698   echo "*** PANIC ***"
13699   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13700   echo "*** PANIC *** On other systems, try telling configure where to find the"
13701   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13702   echo "*** PANIC ***"
13703   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13704   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13705   echo "*** PANIC *** on your system.  Don't do that."
13706   exit 1
13707 fi
13708 rm -fr conftest*
13709
13710 if test "$win32_processes" = "yes"; then
13711   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13712    echo "    xemacs will be linked with \"process-nt.o\""
13713  fi
13714 else
13715   { test "$extra_verbose" = "yes" && cat << \EOF
13716     Defining HAVE_UNIX_PROCESSES
13717 EOF
13718 cat >> confdefs.h <<\EOF
13719 #define HAVE_UNIX_PROCESSES 1
13720 EOF
13721 }
13722
13723   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13724    echo "    xemacs will be linked with \"process-unix.o\""
13725  fi
13726 fi
13727
13728
13729
13730 T=""
13731 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13732 CFLAGS="$T"
13733
13734
13735 T=""
13736 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13737 extra_objs="$T"
13738
13739
13740 T=""
13741 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
13742 c_switch_general="$T"
13743
13744
13745 T=""
13746 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13747 c_switch_window_system="$T"
13748
13749
13750 T=""
13751 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13752 c_switch_all="$T"
13753
13754
13755 T=""
13756 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
13757 ld_switch_general="$T"
13758
13759
13760 T=""
13761 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13762 ld_switch_window_system="$T"
13763
13764
13765 T=""
13766 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13767 ld_switch_all="$T"
13768
13769
13770 T=""
13771 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13772 ld_libs_general="$T"
13773
13774
13775 T=""
13776 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
13777 ld_libs_window_system="$T"
13778
13779
13780 T=""
13781 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13782 ld_libs_all="$T"
13783
13784
13785
13786 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13787 internal_makefile_list="Makefile.in"
13788 SUBDIR_MAKEFILES=''
13789 test -d lock || mkdir lock
13790 for dir in $MAKE_SUBDIR; do
13791   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13792         test -d "$d" || mkdir "$d"; cd "$d"
13793       done ) ;;
13794    * ) test -d "$dir" || mkdir "$dir" ;;
13795   esac
13796   
13797 T=""
13798 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13799 SUBDIR_MAKEFILES="$T"
13800
13801   
13802 T=""
13803 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13804 internal_makefile_list="$T"
13805
13806 done
13807
13808
13809
13810
13811 for dir in src/s src/m; do
13812   if test ! -d "$dir" ; then
13813     echo Making symbolic link to "$srcdir/$dir"
13814     ${LN_S} "$srcdir/$dir" "$dir"
13815   fi
13816 done
13817
13818 if test "$extra_verbose" = "yes"; then
13819   echo ""
13820   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
13821   echo ""
13822 fi
13823
13824
13825 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13826   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13827   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13828 fi
13829
13830 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13831   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13832   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13833 fi
13834
13835 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13836   test "$extra_verbose" = "yes" && echo "creating TAGS"
13837   echo "\f
13838 $srcdir/TAGS,include" > "TAGS"
13839 fi
13840
13841 if test "$__SUNPRO_C" = "yes"; then
13842   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13843   ( echo "# For use with Sun WorkShop's Source browser."
13844     echo "# See sbquery(1) and sbinit(4) for more information"
13845     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13846   ) > .sbinit
13847 fi
13848
13849 rm -f core
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869 PREFIX=$prefix
13870 while true; do
13871   case "$PREFIX" in
13872     *\$* ) eval "PREFIX=$PREFIX" ;;
13873     *) break ;;
13874   esac
13875 done
13876
13877
13878
13879
13880 EXEC_PREFIX=$exec_prefix
13881 while true; do
13882   case "$EXEC_PREFIX" in
13883     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13884     *) break ;;
13885   esac
13886 done
13887
13888
13889
13890
13891 INFODIR=$infodir
13892 while true; do
13893   case "$INFODIR" in
13894     *\$* ) eval "INFODIR=$INFODIR" ;;
13895     *) break ;;
13896   esac
13897 done
13898
13899
13900
13901
13902 INFOPATH=$infopath
13903 while true; do
13904   case "$INFOPATH" in
13905     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13906     *) break ;;
13907   esac
13908 done
13909
13910
13911
13912
13913 PACKAGE_PATH=$package_path
13914 while true; do
13915   case "$PACKAGE_PATH" in
13916     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13917     *) break ;;
13918   esac
13919 done
13920
13921
13922
13923
13924 LISPDIR=$lispdir
13925 while true; do
13926   case "$LISPDIR" in
13927     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13928     *) break ;;
13929   esac
13930 done
13931
13932
13933
13934
13935 MODULEDIR=$moduledir
13936 while true; do
13937   case "$MODULEDIR" in
13938     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13939     *) break ;;
13940   esac
13941 done
13942
13943
13944
13945
13946 SITELISPDIR=$sitelispdir
13947 while true; do
13948   case "$SITELISPDIR" in
13949     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13950     *) break ;;
13951   esac
13952 done
13953
13954
13955
13956
13957 SITEMODULEDIR=$sitemoduledir
13958 while true; do
13959   case "$SITEMODULEDIR" in
13960     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13961     *) break ;;
13962   esac
13963 done
13964
13965
13966
13967
13968 ETCDIR=$etcdir
13969 while true; do
13970   case "$ETCDIR" in
13971     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13972     *) break ;;
13973   esac
13974 done
13975
13976
13977
13978
13979 LOCKDIR=$lockdir
13980 while true; do
13981   case "$LOCKDIR" in
13982     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13983     *) break ;;
13984   esac
13985 done
13986
13987
13988
13989
13990 DOCDIR=$docdir
13991 while true; do
13992   case "$DOCDIR" in
13993     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13994     *) break ;;
13995   esac
13996 done
13997
13998
13999
14000
14001 ARCHLIBDIR=$archlibdir
14002 while true; do
14003   case "$ARCHLIBDIR" in
14004     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
14005     *) break ;;
14006   esac
14007 done
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
14029
14030
14031
14032
14033
14034
14035
14036 : ${XEMACS_CC:=$CC}
14037
14038
14039 if test "$with_prefix" = "yes"; then
14040   { test "$extra_verbose" = "yes" && cat << \EOF
14041     Defining PREFIX_USER_DEFINED
14042 EOF
14043 cat >> confdefs.h <<\EOF
14044 #define PREFIX_USER_DEFINED 1
14045 EOF
14046 }
14047
14048 fi
14049
14050 if test "$with_site_lisp" = "no"; then
14051   { test "$extra_verbose" = "yes" && cat << \EOF
14052     Defining INHIBIT_SITE_LISP
14053 EOF
14054 cat >> confdefs.h <<\EOF
14055 #define INHIBIT_SITE_LISP 1
14056 EOF
14057 }
14058
14059 fi
14060 if test "$with_site_modules" = "no"; then
14061   { test "$extra_verbose" = "yes" && cat << \EOF
14062     Defining INHIBIT_SITE_MODULES
14063 EOF
14064 cat >> confdefs.h <<\EOF
14065 #define INHIBIT_SITE_MODULES 1
14066 EOF
14067 }
14068
14069 fi
14070
14071
14072 T=""
14073 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
14074 ac_configure_args="$T"
14075
14076 { test "$extra_verbose" = "yes" && cat << EOF
14077     Defining EMACS_CONFIGURATION = "$configuration"
14078 EOF
14079 cat >> confdefs.h <<EOF
14080 #define EMACS_CONFIGURATION "$configuration"
14081 EOF
14082 }
14083
14084 { test "$extra_verbose" = "yes" && cat << EOF
14085     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
14086 EOF
14087 cat >> confdefs.h <<EOF
14088 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
14089 EOF
14090 }
14091
14092 { test "$extra_verbose" = "yes" && cat << EOF
14093     Defining config_machfile = "$machfile"
14094 EOF
14095 cat >> confdefs.h <<EOF
14096 #define config_machfile "$machfile"
14097 EOF
14098 }
14099
14100 { test "$extra_verbose" = "yes" && cat << EOF
14101     Defining config_opsysfile = "$opsysfile"
14102 EOF
14103 cat >> confdefs.h <<EOF
14104 #define config_opsysfile "$opsysfile"
14105 EOF
14106 }
14107
14108
14109
14110 null_string=""
14111 { test "$extra_verbose" = "yes" && cat << EOF
14112     Defining LD_SWITCH_X_SITE = $null_string
14113 EOF
14114 cat >> confdefs.h <<EOF
14115 #define LD_SWITCH_X_SITE $null_string
14116 EOF
14117 }
14118
14119 { test "$extra_verbose" = "yes" && cat << EOF
14120     Defining LD_SWITCH_X_SITE_AUX = $null_string
14121 EOF
14122 cat >> confdefs.h <<EOF
14123 #define LD_SWITCH_X_SITE_AUX $null_string
14124 EOF
14125 }
14126
14127 { test "$extra_verbose" = "yes" && cat << EOF
14128     Defining C_SWITCH_X_SITE = $null_string
14129 EOF
14130 cat >> confdefs.h <<EOF
14131 #define C_SWITCH_X_SITE $null_string
14132 EOF
14133 }
14134
14135 { test "$extra_verbose" = "yes" && cat << EOF
14136     Defining LD_SWITCH_SITE = $null_string
14137 EOF
14138 cat >> confdefs.h <<EOF
14139 #define LD_SWITCH_SITE $null_string
14140 EOF
14141 }
14142
14143 { test "$extra_verbose" = "yes" && cat << EOF
14144     Defining C_SWITCH_SITE = $null_string
14145 EOF
14146 cat >> confdefs.h <<EOF
14147 #define C_SWITCH_SITE $null_string
14148 EOF
14149 }
14150
14151
14152
14153 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14154     Defining GNU_MALLOC
14155 EOF
14156 cat >> confdefs.h <<\EOF
14157 #define GNU_MALLOC 1
14158 EOF
14159 }
14160
14161 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14162     Defining USE_SYSTEM_MALLOC
14163 EOF
14164 cat >> confdefs.h <<\EOF
14165 #define USE_SYSTEM_MALLOC 1
14166 EOF
14167 }
14168
14169 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
14170     Defining USE_DEBUG_MALLOC
14171 EOF
14172 cat >> confdefs.h <<\EOF
14173 #define USE_DEBUG_MALLOC 1
14174 EOF
14175 }
14176
14177                                               { test "$extra_verbose" = "yes" && cat << \EOF
14178     Defining USE_SYSTEM_MALLOC
14179 EOF
14180 cat >> confdefs.h <<\EOF
14181 #define USE_SYSTEM_MALLOC 1
14182 EOF
14183 }
14184
14185 fi
14186 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14187     Defining I18N3
14188 EOF
14189 cat >> confdefs.h <<\EOF
14190 #define I18N3 1
14191 EOF
14192 }
14193
14194 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14195     Defining USE_GCC
14196 EOF
14197 cat >> confdefs.h <<\EOF
14198 #define USE_GCC 1
14199 EOF
14200 }
14201
14202 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14203     Defining EXTERNAL_WIDGET
14204 EOF
14205 cat >> confdefs.h <<\EOF
14206 #define EXTERNAL_WIDGET 1
14207 EOF
14208 }
14209
14210 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14211     Defining NO_DOC_FILE
14212 EOF
14213 cat >> confdefs.h <<\EOF
14214 #define NO_DOC_FILE 1
14215 EOF
14216 }
14217
14218 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14219     Defining PURIFY
14220 EOF
14221 cat >> confdefs.h <<\EOF
14222 #define PURIFY 1
14223 EOF
14224 }
14225
14226 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14227     Defining QUANTIFY
14228 EOF
14229 cat >> confdefs.h <<\EOF
14230 #define QUANTIFY 1
14231 EOF
14232 }
14233
14234 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14235     Defining MAIL_USE_POP
14236 EOF
14237 cat >> confdefs.h <<\EOF
14238 #define MAIL_USE_POP 1
14239 EOF
14240 }
14241
14242 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14243     Defining KERBEROS
14244 EOF
14245 cat >> confdefs.h <<\EOF
14246 #define KERBEROS 1
14247 EOF
14248 }
14249
14250 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14251     Defining HESIOD
14252 EOF
14253 cat >> confdefs.h <<\EOF
14254 #define HESIOD 1
14255 EOF
14256 }
14257
14258 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14259     Defining USE_UNION_TYPE
14260 EOF
14261 cat >> confdefs.h <<\EOF
14262 #define USE_UNION_TYPE 1
14263 EOF
14264 }
14265
14266 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14267     Defining PDUMP
14268 EOF
14269 cat >> confdefs.h <<\EOF
14270 #define PDUMP 1
14271 EOF
14272 }
14273
14274
14275
14276 (
14277 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14278 else
14279   echo "uname -a: `uname -a`"
14280 fi
14281 echo ""
14282 echo "$0 $quoted_arguments"
14283 ) > Installation
14284
14285 if test ! -z ${emacs_beta_version} ; then
14286   if test -z "${emacs_is_beta}" ; then
14287         xemacs_betaname=".${emacs_beta_version}"
14288   else
14289         xemacs_betaname="-b${emacs_beta_version}"
14290   fi
14291 else
14292   xemacs_betaname=""
14293 fi
14294
14295 (
14296 echo "
14297
14298 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14299
14300   Where should the build process find the source code?    $srcdir
14301   What installation prefix should install use?            $prefix
14302   What operating system and machine description files should XEmacs use?
14303         \`$opsysfile' and \`$machfile'
14304   What compiler should XEmacs be built with?              $CC $CFLAGS
14305   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
14306   Should XEmacs use the relocating allocator for buffers? $rel_alloc
14307   What window system should XEmacs use?                   ${window_system}"
14308 if test "$with_x11" = "yes"; then
14309   echo "  Where do we find X Windows header files?                $x_includes"
14310   echo "  Where do we find X Windows libraries?                   $x_libraries"
14311 fi
14312 if test -n "$site_includes"; then
14313   echo "  Additional header files:                                $site_includes"
14314 fi
14315 if test -n "$site_libraries"; then
14316   echo "  Additional libraries:                                   $site_libraries"
14317 fi
14318 if test -n "$site_prefixes"; then
14319   echo "  Additional prefixes:                                    $site_prefixes"
14320 fi
14321 if test -n "$runpath"; then
14322   echo "  Runtime library search path:                            $runpath"
14323 fi
14324 if test "$have_xaw" = "yes"; then
14325   echo "  Athena library to link:                                 $athena_lib"
14326   echo "  Athena header include path:                             $athena_h_path"
14327 fi
14328 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
14329 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14330 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
14331 if test "$with_xmu" != yes -a "$with_x11" = yes; then
14332   echo "  No Xmu; substituting equivalent routines."
14333 fi
14334
14335 if test "$with_xpm" = yes; then
14336   echo "  Compiling in support for XPM images."
14337 elif test "$with_x11" = yes; then
14338   echo "  --------------------------------------------------------------------"
14339   echo "  WARNING: Compiling without XPM support."
14340   if test "$xpm_problem" != ""; then
14341     echo "  Reason: $xpm_problem"
14342   fi
14343   echo "  WARNING: You should strongly consider installing XPM."
14344   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14345   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14346   echo "  --------------------------------------------------------------------"
14347 fi
14348 if test "$with_png" = yes; then
14349   echo "  Compiling in support for PNG image handling."
14350 elif test "$window_system" != "none"; then
14351   echo "  --------------------------------------------------------------------"
14352   echo "  WARNING: Compiling without PNG image support."
14353   if test "$png_problem" != ""; then
14354     echo "  Reason: $png_problem"
14355   fi
14356   echo "  WARNING: You should strongly consider installing the PNG libraries."
14357   echo "  WARNING: Otherwise certain images and glyphs may not display."
14358   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14359   echo "  --------------------------------------------------------------------"
14360 fi
14361 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
14362 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
14363 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
14364 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14365
14366 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
14367 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
14368 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
14369 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
14370
14371 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
14372 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14373 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14374
14375 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
14376
14377 if test "$with_postgresql" = yes; then
14378         echo "  Compiling in support for PostgreSQL."
14379         if test "$with_postgresqlv7" = yes; then
14380                 echo "    Using PostgreSQL V7 bindings."
14381         fi
14382 fi
14383 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
14384 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14385
14386 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14387 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14388 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14389 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14390 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14391 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14392 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14393 if test "$with_wnn" = yes; then
14394   echo "  Compiling in support for the WNN input method on Mule."
14395   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14396 fi
14397 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14398
14399 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14400 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14401 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14402 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14403 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14404 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14405 case "$with_menubars" in
14406   lucid ) echo "  Using Lucid menubars." ;;
14407   motif ) echo "  Using Motif menubars."
14408           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14409           echo "             We recommend using the Lucid menubar instead."
14410           echo "             Re-run configure with --with-menubars='lucid'." ;;
14411   msw ) echo "  Using MS-Windows menubars." ;;
14412 esac
14413 case "$with_scrollbars" in
14414   lucid    ) echo "  Using Lucid scrollbars."     ;;
14415   motif    ) echo "  Using Motif scrollbars."     ;;
14416   athena   ) echo "  Using Athena scrollbars."    ;;
14417   msw ) echo "  Using MS-Windows scrollbars." ;;
14418 esac
14419 case "$with_widgets" in
14420   motif    ) echo "  Using Motif native widgets."     ;;
14421   athena   ) echo "  Using Athena native widgets."    ;;
14422   msw ) echo "  Using MS-Windows native widgets." ;;
14423 esac
14424 case "$with_dialogs" in
14425   motif    )
14426     echo "  Using Motif dialog boxes."
14427     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14428       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14429       echo "             We recommend using the Athena dialog boxes instead."
14430       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14431       echo "             Read the PROBLEMS file for more information."
14432     fi; fi
14433     ;;
14434   athena   ) echo "  Using Athena dialog boxes."    ;;
14435   msw ) echo "  Using MS-Windows dialog boxes." ;;
14436 esac
14437 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14438 test "$with_clash_detection" = yes && \
14439   echo "  Clash detection will use \"$lockdir\" for locking files."
14440 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14441 test "$with_pop"        = yes && echo "  Using POP for mail access."
14442 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14443 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14444 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14445 test "$pdump"           = yes && echo "  Using the new portable dumper."
14446 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14447 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14448 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14449   != "no no no no no"; then
14450   echo "  WARNING: ---------------------------------------------------------"
14451   echo "  WARNING: Compiling in support for runtime error checking."
14452   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14453   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14454   echo "  WARNING: ---------------------------------------------------------"
14455 fi
14456 echo ""
14457 ) | tee -a Installation
14458 echo ""
14459
14460
14461 # Remove any trailing slashes in these variables.
14462 test -n "$prefix" &&
14463   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14464 test -n "$exec_prefix" &&
14465   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14466
14467
14468 for file in $internal_makefile_list; do
14469   test "$file" = src/Makefile.in && \
14470     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14471   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14472 done
14473 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14474 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
14475
14476 trap '' 1 2 15
14477
14478 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14479
14480 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14481 # Let make expand exec_prefix.
14482 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14483
14484 # Any assignment to VPATH causes Sun make to only execute
14485 # the first set of double-colon rules, so remove it if not needed.
14486 # If there is a colon in the path, we need to keep it.
14487 if test "x$srcdir" = x.; then
14488   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14489 fi
14490
14491 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14492
14493 DEFS=-DHAVE_CONFIG_H
14494
14495 # Without the "./", some shells look in PATH for config.status.
14496 : ${CONFIG_STATUS=./config.status}
14497
14498 echo creating $CONFIG_STATUS
14499 rm -f $CONFIG_STATUS
14500 cat > $CONFIG_STATUS <<EOF
14501 #! /bin/sh
14502 # Generated automatically by configure.
14503 # Run this file to recreate the current configuration.
14504 # This directory was configured as follows,
14505 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14506 #
14507 # $0 $ac_configure_args
14508 #
14509 # Compiler output produced by configure, useful for debugging
14510 # configure, is in ./config.log if it exists.
14511
14512 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14513 for ac_option
14514 do
14515   case "\$ac_option" in
14516   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14517     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14518     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14519   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14520     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14521     exit 0 ;;
14522   -help | --help | --hel | --he | --h)
14523     echo "\$ac_cs_usage"; exit 0 ;;
14524   *) echo "\$ac_cs_usage"; exit 1 ;;
14525   esac
14526 done
14527
14528 ac_given_srcdir=$srcdir
14529 ac_given_INSTALL="$INSTALL"
14530
14531 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14532 EOF
14533 cat >> $CONFIG_STATUS <<EOF
14534
14535 # Protect against being on the right side of a sed subst in config.status.
14536 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14537  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14538 $ac_vpsub
14539 $extrasub
14540 s%@SHELL@%$SHELL%g
14541 s%@CFLAGS@%$CFLAGS%g
14542 s%@CPPFLAGS@%$CPPFLAGS%g
14543 s%@CXXFLAGS@%$CXXFLAGS%g
14544 s%@FFLAGS@%$FFLAGS%g
14545 s%@DEFS@%$DEFS%g
14546 s%@LDFLAGS@%$LDFLAGS%g
14547 s%@LIBS@%$LIBS%g
14548 s%@exec_prefix@%$exec_prefix%g
14549 s%@prefix@%$prefix%g
14550 s%@program_transform_name@%$program_transform_name%g
14551 s%@bindir@%$bindir%g
14552 s%@sbindir@%$sbindir%g
14553 s%@libexecdir@%$libexecdir%g
14554 s%@datadir@%$datadir%g
14555 s%@sysconfdir@%$sysconfdir%g
14556 s%@sharedstatedir@%$sharedstatedir%g
14557 s%@localstatedir@%$localstatedir%g
14558 s%@libdir@%$libdir%g
14559 s%@includedir@%$includedir%g
14560 s%@oldincludedir@%$oldincludedir%g
14561 s%@infodir@%$infodir%g
14562 s%@mandir@%$mandir%g
14563 s%@LN_S@%$LN_S%g
14564 s%@blddir@%$blddir%g
14565 s%@CC@%$CC%g
14566 s%@CPP@%$CPP%g
14567 s%@start_flags@%$start_flags%g
14568 s%@ld_switch_shared@%$ld_switch_shared%g
14569 s%@start_files@%$start_files%g
14570 s%@ld@%$ld%g
14571 s%@lib_gcc@%$lib_gcc%g
14572 s%@RANLIB@%$RANLIB%g
14573 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14574 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14575 s%@INSTALL_DATA@%$INSTALL_DATA%g
14576 s%@YACC@%$YACC%g
14577 s%@SET_MAKE@%$SET_MAKE%g
14578 s%@X_CFLAGS@%$X_CFLAGS%g
14579 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14580 s%@X_LIBS@%$X_LIBS%g
14581 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14582 s%@install_pp@%$install_pp%g
14583 s%@libs_xauth@%$libs_xauth%g
14584 s%@dnd_objs@%$dnd_objs%g
14585 s%@lwlib_objs@%$lwlib_objs%g
14586 s%@ALLOCA@%$ALLOCA%g
14587 s%@have_esd_config@%$have_esd_config%g
14588 s%@dll_ld@%$dll_ld%g
14589 s%@dll_cflags@%$dll_cflags%g
14590 s%@dll_ldflags@%$dll_ldflags%g
14591 s%@dll_post@%$dll_post%g
14592 s%@dll_ldo@%$dll_ldo%g
14593 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14594 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14595 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14596 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14597 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14598 s%@PROGNAME@%$PROGNAME%g
14599 s%@version@%$version%g
14600 s%@configuration@%$configuration%g
14601 s%@canonical@%$canonical%g
14602 s%@inststaticdir@%$inststaticdir%g
14603 s%@instvardir@%$instvardir%g
14604 s%@srcdir@%$srcdir%g
14605 s%@pkgdir@%$pkgdir%g
14606 s%@statedir@%$statedir%g
14607 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14608 s%@PREFIX@%$PREFIX%g
14609 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14610 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14611 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14612 s%@INFODIR@%$INFODIR%g
14613 s%@infopath@%$infopath%g
14614 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14615 s%@INFOPATH@%$INFOPATH%g
14616 s%@package_path@%$package_path%g
14617 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14618 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14619 s%@lispdir@%$lispdir%g
14620 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14621 s%@LISPDIR@%$LISPDIR%g
14622 s%@moduledir@%$moduledir%g
14623 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14624 s%@MODULEDIR@%$MODULEDIR%g
14625 s%@sitelispdir@%$sitelispdir%g
14626 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14627 s%@SITELISPDIR@%$SITELISPDIR%g
14628 s%@sitemoduledir@%$sitemoduledir%g
14629 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14630 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14631 s%@etcdir@%$etcdir%g
14632 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14633 s%@ETCDIR@%$ETCDIR%g
14634 s%@lockdir@%$lockdir%g
14635 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14636 s%@LOCKDIR@%$LOCKDIR%g
14637 s%@docdir@%$docdir%g
14638 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14639 s%@DOCDIR@%$DOCDIR%g
14640 s%@archlibdir@%$archlibdir%g
14641 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14642 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14643 s%@bitmapdir@%$bitmapdir%g
14644 s%@extra_objs@%$extra_objs%g
14645 s%@machfile@%$machfile%g
14646 s%@opsysfile@%$opsysfile%g
14647 s%@c_switch_general@%$c_switch_general%g
14648 s%@c_switch_window_system@%$c_switch_window_system%g
14649 s%@c_switch_all@%$c_switch_all%g
14650 s%@ld_switch_general@%$ld_switch_general%g
14651 s%@ld_switch_window_system@%$ld_switch_window_system%g
14652 s%@ld_switch_all@%$ld_switch_all%g
14653 s%@ld_libs_general@%$ld_libs_general%g
14654 s%@ld_libs_window_system@%$ld_libs_window_system%g
14655 s%@ld_libs_all@%$ld_libs_all%g
14656 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14657 s%@native_sound_lib@%$native_sound_lib%g
14658 s%@sound_cflags@%$sound_cflags%g
14659 s%@dynodump_arch@%$dynodump_arch%g
14660 s%@XEMACS_CC@%$XEMACS_CC%g
14661 s%@internal_makefile_list@%$internal_makefile_list%g
14662
14663 CEOF
14664 EOF
14665
14666 cat >> $CONFIG_STATUS <<\EOF
14667
14668 # Split the substitutions into bite-sized pieces for seds with
14669 # small command number limits, like on Digital OSF/1 and HP-UX.
14670 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14671 ac_file=1 # Number of current file.
14672 ac_beg=1 # First line for current file.
14673 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14674 ac_more_lines=:
14675 ac_sed_cmds=""
14676 while $ac_more_lines; do
14677   if test $ac_beg -gt 1; then
14678     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14679   else
14680     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14681   fi
14682   if test ! -s conftest.s$ac_file; then
14683     ac_more_lines=false
14684     rm -f conftest.s$ac_file
14685   else
14686     if test -z "$ac_sed_cmds"; then
14687       ac_sed_cmds="sed -f conftest.s$ac_file"
14688     else
14689       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14690     fi
14691     ac_file=`expr $ac_file + 1`
14692     ac_beg=$ac_end
14693     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14694   fi
14695 done
14696 if test -z "$ac_sed_cmds"; then
14697   ac_sed_cmds=cat
14698 fi
14699 EOF
14700
14701 cat >> $CONFIG_STATUS <<EOF
14702
14703 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14704 EOF
14705 cat >> $CONFIG_STATUS <<\EOF
14706 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14707   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14708   case "$ac_file" in
14709   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14710        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14711   *) ac_file_in="${ac_file}.in" ;;
14712   esac
14713
14714   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14715
14716   # Remove last slash and all that follows it.  Not all systems have dirname.
14717   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14718   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14719     # The file is in a subdirectory.
14720     test ! -d "$ac_dir" && mkdir "$ac_dir"
14721     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14722     # A "../" for each directory in $ac_dir_suffix.
14723     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14724   else
14725     ac_dir_suffix= ac_dots=
14726   fi
14727
14728   case "$ac_given_srcdir" in
14729   .)  srcdir=.
14730       if test -z "$ac_dots"; then top_srcdir=.
14731       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14732   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14733   *) # Relative path.
14734     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14735     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14736   esac
14737
14738   case "$ac_given_INSTALL" in
14739   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14740   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14741   esac
14742
14743   echo creating "$ac_file"
14744   rm -f "$ac_file"
14745   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14746   case "$ac_file" in
14747   *Makefile*) ac_comsub="1i\\
14748 # $configure_input" ;;
14749   *) ac_comsub= ;;
14750   esac
14751
14752   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14753   sed -e "$ac_comsub
14754 s%@configure_input@%$configure_input%g
14755 s%@srcdir@%$srcdir%g
14756 s%@top_srcdir@%$top_srcdir%g
14757 s%@INSTALL@%$INSTALL%g
14758 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14759 fi; done
14760 rm -f conftest.s*
14761
14762 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14763 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14764 #
14765 # ac_d sets the value in "#define NAME VALUE" lines.
14766 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14767 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14768 ac_dC='\3'
14769 ac_dD='%g'
14770 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14771 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14772 ac_uB='\([      ]\)%\1#\2define\3'
14773 ac_uC=' '
14774 ac_uD='\4%g'
14775 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14776 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14777 ac_eB='$%\1#\2define\3'
14778 ac_eC=' '
14779 ac_eD='%g'
14780
14781 if test "${CONFIG_HEADERS+set}" != set; then
14782 EOF
14783 cat >> $CONFIG_STATUS <<EOF
14784   CONFIG_HEADERS="src/config.h lwlib/config.h"
14785 EOF
14786 cat >> $CONFIG_STATUS <<\EOF
14787 fi
14788 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14789   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14790   case "$ac_file" in
14791   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14792        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14793   *) ac_file_in="${ac_file}.in" ;;
14794   esac
14795
14796   echo creating $ac_file
14797
14798   rm -f conftest.frag conftest.in conftest.out
14799   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14800   cat $ac_file_inputs > conftest.in
14801
14802 EOF
14803
14804 # Transform confdefs.h into a sed script conftest.vals that substitutes
14805 # the proper values into config.h.in to produce config.h.  And first:
14806 # Protect against being on the right side of a sed subst in config.status.
14807 # Protect against being in an unquoted here document in config.status.
14808 rm -f conftest.vals
14809 cat > conftest.hdr <<\EOF
14810 s/[\\&%]/\\&/g
14811 s%[\\$`]%\\&%g
14812 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14813 s%ac_d%ac_u%gp
14814 s%ac_u%ac_e%gp
14815 EOF
14816 sed -n -f conftest.hdr confdefs.h > conftest.vals
14817 rm -f conftest.hdr
14818
14819 # This sed command replaces #undef with comments.  This is necessary, for
14820 # example, in the case of _POSIX_SOURCE, which is predefined and required
14821 # on some systems where configure will not decide to define it.
14822 cat >> conftest.vals <<\EOF
14823 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14824 EOF
14825
14826 # Break up conftest.vals because some shells have a limit on
14827 # the size of here documents, and old seds have small limits too.
14828
14829 rm -f conftest.tail
14830 while :
14831 do
14832   ac_lines=`grep -c . conftest.vals`
14833   # grep -c gives empty output for an empty file on some AIX systems.
14834   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14835   # Write a limited-size here document to conftest.frag.
14836   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14837   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14838   echo 'CEOF
14839   sed -f conftest.frag conftest.in > conftest.out
14840   rm -f conftest.in
14841   mv conftest.out conftest.in
14842 ' >> $CONFIG_STATUS
14843   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14844   rm -f conftest.vals
14845   mv conftest.tail conftest.vals
14846 done
14847 rm -f conftest.vals
14848
14849 cat >> $CONFIG_STATUS <<\EOF
14850   rm -f conftest.frag conftest.h
14851   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14852   cat conftest.in >> conftest.h
14853   rm -f conftest.in
14854   if cmp -s $ac_file conftest.h 2>/dev/null; then
14855     echo "$ac_file is unchanged"
14856     rm -f conftest.h
14857   else
14858     # Remove last slash and all that follows it.  Not all systems have dirname.
14859       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14860       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14861       # The file is in a subdirectory.
14862       test ! -d "$ac_dir" && mkdir "$ac_dir"
14863     fi
14864     rm -f $ac_file
14865     mv conftest.h $ac_file
14866   fi
14867 fi; done
14868
14869 EOF
14870 cat >> $CONFIG_STATUS <<EOF
14871 CPP="$CPP"
14872  top_srcdir="$srcdir"
14873  MAKE_SUBDIR="$MAKE_SUBDIR"
14874
14875 EOF
14876 cat >> $CONFIG_STATUS <<\EOF
14877 for dir in . $MAKE_SUBDIR; do
14878   (
14879     cd $dir
14880     rm -f junk.c
14881     < Makefile.in \
14882       sed -e '/^# Generated/d' \
14883           -e 's%/\*\*/#.*%%' \
14884           -e 's/^ *# */#/' \
14885           -e '/^##/d' \
14886           -e '/^#/ {
14887 p
14888 d
14889 }'        \
14890           -e '/./ {
14891 s/\([\"]\)/\\\1/g
14892 s/^/"/
14893 s/$/"/
14894 }'  > junk.c;
14895
14896
14897
14898     echo creating $dir/Makefile
14899 $CPP -I. -I${top_srcdir}/src  junk.c \
14900   | sed -e 's/^\#.*//'          \
14901         -e 's/^[        ][      ]*$//'\
14902         -e 's/^ /       /'              \
14903   | sed -n -e '/^..*$/p'        \
14904   | sed '/^\"/ {
14905         s/\\\([\"]\)/\1/g
14906         s/^[    ]*\"//
14907         s/\"[   ]*$//
14908 }' > Makefile.new
14909     chmod 444 Makefile.new
14910     mv -f Makefile.new Makefile
14911
14912     echo creating $dir/GNUmakefile
14913 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14914   | sed -e 's/^\#.*//'          \
14915         -e 's/^[        ][      ]*$//'\
14916         -e 's/^ /       /'              \
14917   | sed -n -e '/^..*$/p'        \
14918   | sed '/^\"/ {
14919         s/\\\([\"]\)/\1/g
14920         s/^[    ]*\"//
14921         s/\"[   ]*$//
14922 }' > Makefile.new
14923     chmod 444 Makefile.new
14924     mv -f Makefile.new GNUmakefile
14925
14926     rm -f junk.c
14927   )
14928 done
14929
14930 sed < config.status >> lib-src/config.values \
14931   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14932   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14933   -e 's/^\([^ ]*\) $/\1 ""/' \
14934   -e 's/ 1$/ t/'
14935
14936
14937 exit 0
14938 EOF
14939 chmod +x $CONFIG_STATUS
14940 rm -fr confdefs* $ac_clean_files
14941 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1