09b367ebbb995f8ea2307238576735d0856d32a8
[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.12 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 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 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
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         const_is_losing | \
362         usage_tracking  | \
363         use_union_type  | \
364         pdump           | \
365         debug           | \
366         use_assertions  | \
367         memory_usage_stats | \
368         with_clash_detection | \
369         with_modules | \
370         no_doc_file )
371                   case "$val" in
372             y | ye | yes )      val=yes ;;
373             n | no )            val=no  ;;
374             * ) (echo "$progname: Usage error:"
375 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
376 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
377           esac
378           eval "$opt=\"$val\"" ;;
379
380
381                         srcdir          | \
382         compiler        | \
383         cflags          | \
384         cpp             | \
385         cppflags        | \
386         libs            | \
387         ldflags         | \
388         cache_file      | \
389         native_sound_lib| \
390         site_lisp       | \
391         x_includes      | \
392         x_libraries     | \
393         site_includes   | \
394         site_libraries  | \
395         site_prefixes   | \
396         site_runtime_libraries )
397                   if test "$valomitted" = "yes" ; then
398                     if test "$#" = 0 ; then
399               (echo "$progname: Usage error:"
400 echo " " "The \`--$optname' option requires a value."
401 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
402             fi
403             val="$1"; shift
404           fi
405           eval "$opt=\"$val\""
406         ;;
407
408                 rel_alloc | \
409         with_dlmalloc | \
410         with_debug_malloc  | use_debug_malloc | \
411         with_system_malloc | use_system_malloc )
412           case "$val" in
413             y | ye | yes )      val=yes ;;
414             n | no )            val=no  ;;
415             d | de | def | defa | defau | defaul | default ) val=default ;;
416             * ) (echo "$progname: Usage error:"
417 echo " " "The \`--$optname' option requires one of these values:
418   \`yes', \`no', or \`default'."
419 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
420           esac
421           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
422           eval "$opt=\"$val\""
423         ;;
424
425                 "with_database" )
426           with_database_berkdb=no
427           with_database_dbm=no
428           with_database_gdbm=no
429           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
430             case "$x" in
431               no ) ;;
432               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
433               d | db | dbm )                               with_database_dbm=yes    ;;
434               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
435               * ) (echo "$progname: Usage error:"
436 echo " " "The \`--$optname' option value
437   must be either \`no' or a comma-separated list
438   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
439 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
440             esac
441           done
442           if test "$with_database_dbm"  = "yes" -a \
443                   "$with_database_gdbm" = "yes"; then
444           (echo "$progname: Usage error:"
445 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
446   with the \`--$optname' option."
447 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
448           fi
449         ;;
450
451                 "with_sound" )
452                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
453             case "$x" in
454                       n | no | non | none ) new_sdefault=no ;;
455               a | al | all | both ) new_sdefault=yes ;;
456
457               native )       with_native_sound=yes ;;
458               nonative )     with_native_sound=no ;;
459
460               nas )          with_nas_sound=yes ;;
461               nonas )        with_nas_sound=no ;;
462
463               esd )          with_esd_sound=yes ;;
464               noesd )        with_esd_sound=no ;;
465
466               * ) bogus_sound=yes ;;
467             esac
468             if test "$bogus_sound" -o \
469                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
470                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
471                 (echo "$progname: Usage error:"
472 echo " " "Valid types for the \`--$optname' option are:
473   $types.
474 The default is to autodetect all sound support."
475 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
476             elif test -n "$new_sdefault" ; then
477                 with_native_sound=$new_sdefault
478                 with_nas_sound=$new_sdefault
479                 with_esd_sound=$new_sdefault
480                 new_sdefault=   # reset this
481             fi
482             sound_notfirst=true
483           done
484         ;;
485
486                         "with_athena" )
487           case "$val" in
488             xa | xaw )                    val=xaw    ;;
489             3 | 3d | xaw3d )              val=3d     ;;
490                         ne | nex | next | naxtaw)     val=next   ;;
491                         9 | 95 | xaw95 )              val=95     ;;
492             xp | xpm | xawxpm )           val=xpm    ;;
493             * ) (echo "$progname: Usage error:"
494 echo " " "The \`--$optname' option must have one of these values:
495   \`xaw', \`3d', \`next', \`95', or \`xpm'."
496 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
497           esac
498           eval "$opt=\"$val\""
499         ;;
500
501                 "with_xim" )
502           case "$val" in
503             y | ye | yes )                val=yes   ;;
504             n | no | non | none )         val=no    ;;
505             x | xl | xli | xlib )         val=xlib  ;;
506             m | mo | mot | moti | motif ) val=motif ;;
507             * ) (echo "$progname: Usage error:"
508 echo " " "The \`--$optname' option must have one of these values:
509   \`motif', \`xlib', \`yes', or \`no'."
510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
511           esac
512           eval "$opt=\"$val\""
513         ;;
514
515                 "mail_locking" )
516           case "$val" in
517             lockf )     val=lockf ;;
518             flock )     val=flock ;;
519             file | dot ) val=file  ;;
520             locking )   val=locking  ;;
521             * ) (echo "$progname: Usage error:"
522 echo " " "The \`--$optname' option must have one of these values:
523   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
525           esac
526           eval "$opt=\"$val\""
527         ;;
528
529                 "error_checking" )
530                           
531           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
532             case "$x" in
533                       n | no | non | none ) new_default=no ;;
534               a | al | all )        new_default=yes ;;
535
536               extents )       error_check_extents=yes ;;
537               noextents )     error_check_extents=no ;;
538
539               typecheck )     error_check_typecheck=yes ;;
540               notypecheck )   error_check_typecheck=no ;;
541
542               bufpos )        error_check_bufpos=yes ;;
543               nobufpos )      error_check_bufpos=no ;;
544
545               gc )            error_check_gc=yes ;;
546               nogc )          error_check_gc=no ;;
547
548               malloc )        error_check_malloc=yes ;;
549               nomalloc )      error_check_malloc=no ;;
550
551               byte_code )     error_check_byte_code=yes ;;
552               nobyte_code )   error_check_byte_code=no ;;
553
554               * ) bogus_error_check=yes ;;
555             esac
556             if test "$bogus_error_check" -o \
557                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
558                 if test "$error_check_default" = yes ; then
559                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
560                 else
561                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
562                 fi
563                 (echo "$progname: Usage error:"
564 echo " " "Valid types for the \`--$optname' option are:
565   $types."
566 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
567             elif test -n "$new_default" ; then
568                 error_check_extents=$new_default
569                 error_check_typecheck=$new_default
570                 error_check_bufpos=$new_default
571                 error_check_gc=$new_default
572                 error_check_malloc=$new_default
573                 error_check_byte_code=$new_default
574                 new_default=    # reset this
575             fi
576             echeck_notfirst=true
577           done
578         ;;
579
580                                 
581                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
582         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
583         archlibdir | docdir | package_path )
584                    if test "$valomitted" = "yes"; then
585              if test "$#" = 0; then
586                  (echo "$progname: Usage error:"
587 echo " " "The \`--$optname' option requires a value."
588 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
589              fi
590              val="$1"; shift
591            fi
592            eval "$opt=\"$val\""
593
594                            case "$opt" in
595                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
596     Defining EXEC_PREFIX_USER_DEFINED
597 EOF
598 cat >> confdefs.h <<\EOF
599 #define EXEC_PREFIX_USER_DEFINED 1
600 EOF
601 }
602  ;;
603              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
604     Defining LISPDIR_USER_DEFINED
605 EOF
606 cat >> confdefs.h <<\EOF
607 #define LISPDIR_USER_DEFINED 1
608 EOF
609 }
610  ;;
611              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
612     Defining SITELISPDIR_USER_DEFINED
613 EOF
614 cat >> confdefs.h <<\EOF
615 #define SITELISPDIR_USER_DEFINED 1
616 EOF
617 }
618  ;;
619              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
620     Defining MODULEDIR_USER_DEFINED
621 EOF
622 cat >> confdefs.h <<\EOF
623 #define MODULEDIR_USER_DEFINED 1
624 EOF
625 }
626  ;;
627              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
628     Defining ETCDIR_USER_DEFINED
629 EOF
630 cat >> confdefs.h <<\EOF
631 #define ETCDIR_USER_DEFINED 1
632 EOF
633 }
634  ;;
635              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
636     Defining INFODIR_USER_DEFINED
637 EOF
638 cat >> confdefs.h <<\EOF
639 #define INFODIR_USER_DEFINED 1
640 EOF
641 }
642  ;;
643              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining INFOPATH_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define INFOPATH_USER_DEFINED 1
648 EOF
649 }
650  ;;
651              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
652     Defining PACKAGE_PATH_USER_DEFINED
653 EOF
654 cat >> confdefs.h <<\EOF
655 #define PACKAGE_PATH_USER_DEFINED 1
656 EOF
657 }
658  ;;
659              datadir )
660                 { test "$extra_verbose" = "yes" && cat << \EOF
661     Defining INFODIR_USER_DEFINED
662 EOF
663 cat >> confdefs.h <<\EOF
664 #define INFODIR_USER_DEFINED 1
665 EOF
666 }
667
668                 { test "$extra_verbose" = "yes" && cat << \EOF
669     Defining LISPDIR_USER_DEFINED
670 EOF
671 cat >> confdefs.h <<\EOF
672 #define LISPDIR_USER_DEFINED 1
673 EOF
674 }
675
676             { test "$extra_verbose" = "yes" && cat << \EOF
677     Defining MODULEDIR_USER_DEFINED
678 EOF
679 cat >> confdefs.h <<\EOF
680 #define MODULEDIR_USER_DEFINED 1
681 EOF
682 }
683
684                 { test "$extra_verbose" = "yes" && cat << \EOF
685     Defining ETCDIR_USER_DEFINED
686 EOF
687 cat >> confdefs.h <<\EOF
688 #define ETCDIR_USER_DEFINED 1
689 EOF
690 }
691  ;;
692              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
693     Defining LOCKDIR_USER_DEFINED
694 EOF
695 cat >> confdefs.h <<\EOF
696 #define LOCKDIR_USER_DEFINED 1
697 EOF
698 }
699  ;;
700              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
701     Defining DOCDIR_USER_DEFINED
702 EOF
703 cat >> confdefs.h <<\EOF
704 #define DOCDIR_USER_DEFINED 1
705 EOF
706 }
707  ;;
708              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
709     Defining ARCHLIBDIR_USER_DEFINED
710 EOF
711 cat >> confdefs.h <<\EOF
712 #define ARCHLIBDIR_USER_DEFINED 1
713 EOF
714 }
715  ;;
716            esac
717         ;;
718
719                 "no_create" ) ;;
720
721                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
722
723                 "with_menubars"   | \
724         "with_scrollbars" | \
725         "with_dialogs" | \
726         "with_widgets" )
727           case "$val" in
728             l | lu | luc | luci | lucid )               val=lucid  ;;
729             m | mo | mot | moti | motif )               val=motif  ;;
730             a | at | ath | athe | athen | athena )      val=athena ;;
731             n | no | non | none )                       val=no ;;
732             * ) (echo "$progname: Usage error:"
733 echo " " "The \`--$optname' option must have one of these values:
734   \`lucid', \`motif', \`athena', or \`no'."
735 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
736           esac
737           eval "$opt=\"$val\""
738         ;;
739
740                 "use_minimal_tagbits" | \
741         "use_indexed_lrecord_implementation" | \
742         "run_in_place"  | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info tests; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
999 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_EXTENTS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_EXTENTS 1
1004 EOF
1005 }
1006
1007 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_TYPECHECK
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_TYPECHECK 1
1012 EOF
1013 }
1014
1015 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_BUFPOS
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_BUFPOS 1
1020 EOF
1021 }
1022
1023 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_GC
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_GC 1
1028 EOF
1029 }
1030
1031 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_MALLOC
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_MALLOC 1
1036 EOF
1037 }
1038
1039 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_BYTE_CODE
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_BYTE_CODE 1
1044 EOF
1045 }
1046
1047 if test "${debug:=$beta}" = "yes"; then
1048   use_assertions=yes memory_usage_stats=yes
1049   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1050    echo "    xemacs will be linked with \"debug.o\""
1051  fi
1052   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1053    echo "    xemacs will be linked with \"tests.o\""
1054  fi
1055   { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining DEBUG_XEMACS
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define DEBUG_XEMACS 1
1060 EOF
1061 }
1062
1063 fi
1064 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining USE_ASSERTIONS
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define USE_ASSERTIONS 1
1069 EOF
1070 }
1071
1072 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining MEMORY_USAGE_STATS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define MEMORY_USAGE_STATS 1
1077 EOF
1078 }
1079
1080
1081
1082 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1083 echo "configure:1084: checking "host system type"" >&5
1084 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1085 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1086 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1087 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1088 echo "$ac_t""$configuration" 1>&6
1089
1090
1091
1092
1093
1094 machine='' opsys=''
1095
1096 case "$canonical" in
1097   sparc-*-*        ) machine=sparc ;;
1098   alpha*-*-*       ) machine=alpha ;;
1099   vax-*-*          ) machine=vax ;;
1100   mips-dec-*       ) machine=pmax ;;
1101   mips-sgi-irix6*  ) machine=iris6d ;;
1102   mips-sgi-*       ) machine=iris4d ;;
1103   mips*-linux      ) machine=mips ;;
1104   romp-ibm-*       ) machine=ibmrt ;;
1105   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1106   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1107   powerpc*-*       ) machine=powerpc ;;
1108   hppa-*-*         ) machine=hp800 ;;
1109   m88k-dg-*        ) machine=aviion ;;
1110   m68*-sony-*      ) machine=news ;;
1111   mips-sony-*      ) machine=news-risc ;;
1112   clipper-*        ) machine=clipper ;;
1113   arm-*            ) machine=arm ;;
1114   armv34lb-*   ) machine=arm ;;
1115   ns32k-*          ) machine=ns32000 ;;
1116 esac
1117
1118 case "$canonical" in
1119   *-*-linux*    ) opsys=linux ;;
1120   *-*-netbsd*   ) opsys=netbsd ;;
1121   *-*-openbsd*  ) opsys=openbsd ;;
1122   *-*-nextstep* ) opsys=nextstep ;;
1123   *-*-vms       ) opsys=vms ;;
1124
1125     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1126   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1127   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1128   *-dec-osf3*                ) opsys=decosf3-1 ;;
1129   *-dec-osf4*                ) opsys=decosf4-0 ;;
1130
1131     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1132   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1133   *-*-ultrix* )         opsys=ultrix4-3 ;;
1134
1135     *-*-aix3.1*  ) opsys=aix3-1 ;;
1136   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1137   *-*-aix3*    ) opsys=aix3-2   ;;
1138   *-*-aix4.0*  ) opsys=aix4     ;;
1139   *-*-aix4.1*  ) opsys=aix4-1   ;;
1140   *-*-aix4*    ) opsys=aix4-2   ;;
1141
1142     *-gnu* )                    opsys=gnu    ;;
1143   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1144   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1145   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1146   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1147   *-*-aos*   )                  opsys=bsd4-3 ;;
1148   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1149   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1150   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1151   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1152   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1153   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1154         if test -z "$NON_GNU_CPP" ; then
1155           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1156             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1157           done
1158         fi
1159         opsys=usg5-4-2 ;;
1160     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1161     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1162 esac
1163
1164 case "$canonical" in
1165
1166     *-*-netbsd* )
1167     case "$canonical" in
1168       i[3-9]86-*-netbsd*) machine=intel386 ;;
1169       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1170                                             machine=hp9000s300 ;;
1171       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1172       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1173     esac
1174   ;;
1175
1176     *-*-openbsd* )
1177     case "${canonical}" in
1178       i386-*-openbsd*)          machine=intel386 ;;
1179       m68k-*-openbsd*)          machine=hp9000s300 ;;
1180       mipsel-*-openbsd*)        machine=pmax ;;
1181      esac
1182    ;;
1183
1184     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1185   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1186
1187     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1188   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1189
1190     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1191
1192     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1193
1194     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1195
1196     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1197
1198     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1199
1200     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1201   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1202   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1203
1204   
1205     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1206
1207     *-convex-bsd* | *-convex-convexos* )
1208     machine=convex opsys=bsd4-3
1209     NON_GNU_CPP="cc -E -P"
1210   ;;
1211
1212     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1213
1214     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1215   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1216   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1217   m88k-dg-dgux*                           ) opsys=dgux     ;;
1218
1219     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1220   m88k-motorola-sysv4* )
1221                     machine=delta88k opsys=usg5-4-2
1222   ;;
1223   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1224
1225     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1226   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1227
1228     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1229
1230     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1231   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1232   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1233
1234       m88k-harris-cxux* )
1235         case "`uname -r`" in
1236        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1237        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1238     esac
1239     NON_GNU_CPP="/lib/cpp"
1240   ;;
1241     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1242     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1243
1244     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1245
1246     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1247
1248     *-hp-hpux* )
1249         case "$canonical" in
1250       m68*  ) machine=hp9000s300 ;;
1251       hppa* ) machine=hp800      ;;
1252     esac
1253
1254     case "$canonical" in
1255       *-hp-hpux7*  )  opsys=hpux   ;;
1256       *-hp-hpux8*  )  opsys=hpux8  ;;
1257       *-hp-hpux9*  )  opsys=hpux9  ;;
1258       *-hp-hpux10* )  opsys=hpux10 ;;
1259       *-hp-hpux11* )  opsys=hpux11 ;;
1260       *            )  opsys=hpux   ;;
1261     esac
1262
1263         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1264    echo "    xemacs will be linked with \"strcat.o\""
1265  fi ;; esac
1266
1267     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1268         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1269     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1270
1271     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1272   ;;
1273
1274     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1275   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1276
1277     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1278   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1279   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1280   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1281   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1282   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1283
1284     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1285   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1286
1287     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1288
1289     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1290
1291     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1292
1293     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1294
1295       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1296
1297     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1298
1299     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1300
1301     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1302
1303     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1304
1305         mips-mips-usg* ) machine=mips4 ;;
1306   mips-mips-riscos4 )
1307     machine=mips4
1308     NON_GNU_CC="cc -systype bsd43"
1309     NON_GNU_CPP="cc -systype bsd43 -E"
1310     case "$canonical" in
1311       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1312       mips-mips-riscos5* ) opsys=riscos5 ;;
1313     esac
1314   ;;
1315   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1316   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1317
1318     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1319
1320     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1321
1322     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1323   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1324
1325     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1326
1327     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1328
1329     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1330
1331     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1332
1333     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1334   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1335
1336     mips-siemens-sysv* | mips-sni-sysv*)
1337     machine=mips-siemens opsys=usg5-4
1338     NON_GNU_CC=/usr/ccs/bin/cc
1339     NON_GNU_CPP=/usr/ccs/lib/cpp
1340   ;;
1341
1342     mips-nec-sysv*)
1343     machine=mips-nec
1344     NON_GNU_CC=/usr/ccs/bin/cc
1345     NON_GNU_CPP=/usr/ccs/lib/cpp
1346   ;;
1347
1348       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1349   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1350     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1351   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1352   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1353   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1354   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1355   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1356   mips-sgi-irix*      ) opsys=irix5-0 ;;
1357
1358     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1359   *-sony-news* ) opsys=newsos5 ;;
1360
1361     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1362
1363     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1364         case "$canonical" in
1365       m68*-sunos1* )             machine=sun1     ;;
1366       m68*-sunos2* )             machine=sun2     ;;
1367       m68* )                     machine=sun3     ;;
1368       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1369       i*86-*-* )                 machine=intel386 ;;
1370       rs6000* )                  machine=rs6000   ;;
1371     esac
1372
1373         case "$canonical" in *-sunos5*)
1374       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1375     esac
1376
1377                     case "$canonical" in
1378       *-sunos4* )
1379         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1380         : ;;
1381       *-solaris2* )
1382         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1383         RANLIB=':' ;;
1384     esac
1385
1386     case "$canonical" in
1387       *-solaris*          )
1388         opsys=sol2
1389         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1390         { test "$extra_verbose" = "yes" && cat << EOF
1391     Defining OS_RELEASE = $os_release
1392 EOF
1393 cat >> confdefs.h <<EOF
1394 #define OS_RELEASE $os_release
1395 EOF
1396 }
1397  ;;
1398
1399             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1400       *-sunos4.0*         ) opsys=sunos4-0      ;;
1401       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1402       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1403       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1404       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1405       *-mach*             ) opsys=mach-bsd4-3   ;;
1406       *                   ) opsys=bsd4-2        ;;
1407     esac
1408
1409     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1410
1411         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1412   ;;
1413
1414     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1415
1416     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1417   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1418
1419     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1420
1421     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1422
1423     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1424       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1425
1426     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1427
1428     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1429
1430     vax-dec-* )
1431     case "$canonical" in
1432       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1433       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1434       *-mach* )                         opsys=mach-bsd4-3 ;;
1435     esac
1436   ;;
1437
1438     ns16k-whitechapel-* ) machine=mg1 ;;
1439
1440     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1441
1442     i[3-9]86-*-* )
1443     machine=intel386
1444     case "$canonical" in
1445       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1446       *-isc2.2* )               opsys=isc2-2 ;;
1447       *-isc4.0* )               opsys=isc4-0 ;;
1448       *-isc4.* )                opsys=isc4-1
1449                                 GCC_TEST_OPTIONS=-posix
1450                                 NON_GCC_TEST_OPTIONS=-Xp
1451                                 ;;
1452       *-isc* )                  opsys=isc3-0 ;;
1453       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1454       *-esix* )                 opsys=esix ;;
1455       *-mach* )                 opsys=mach-bsd4-3 ;;
1456       *-xenix* )                opsys=xenix ;;
1457       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1458       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1459       *-bsdi4* )                opsys=bsdos4 ;;
1460       *-bsdi3* )                opsys=bsdos3 ;;
1461       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1462       *-bsdi2* )                opsys=bsdos2 ;;
1463       *-sco3.2v5* )             opsys=sco5 ;
1464                                                         if test "$dynamic" = "yes" ; then
1465                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1466         else
1467                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1468         fi ;;
1469       *-sysv5* )                opsys=sco7 ;;
1470       *-386bsd* )               opsys=386bsd ;;
1471       *-freebsd* )              opsys=freebsd ;;
1472       *-nextstep* )             opsys=nextstep ;;
1473       *-pc-cygwin* )            opsys=cygwin32 ;;
1474       *-pc-mingw* )             opsys=mingw32 ;
1475                                 test -z "$with_tty" && with_tty="no";;
1476           esac
1477   ;;
1478
1479     m68k-*-linux* ) machine=m68k opsys=linux ;;
1480
1481 esac
1482
1483 if test -z "$machine" -o -z "$opsys"; then
1484   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1485    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1486   ) >&2
1487   exit 1
1488 fi
1489
1490 if test -z "$dynamic"; then
1491   case "$opsys" in
1492     hpux* | sunos4* ) dynamic=no ;;
1493     *) dynamic=yes ;;
1494   esac
1495 fi
1496 if test "$dynamic" = "yes"; then
1497   case "$opsys" in
1498     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1499     decosf* ) ld_call_shared="-call_shared" ;;
1500   esac
1501 else   case "$opsys" in
1502     sol2 )
1503       echo "Static linking is not supported on Solaris 2."
1504       echo "Rerun configure without specifying --dynamic=no."
1505       exit 1 ;;
1506     linux   ) ld_call_shared="-Bstatic" ;;
1507     decosf* ) ld_call_shared="-non_shared" ;;
1508   esac
1509 fi
1510
1511 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1512
1513 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1514 { test "$extra_verbose" = "yes" && cat << EOF
1515     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1516 EOF
1517 cat >> confdefs.h <<EOF
1518 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1519 EOF
1520 }
1521
1522
1523 machfile="m/${machine}.h"
1524 opsysfile="s/${opsys}.h"
1525
1526
1527 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1528 if test "$with_workshop $with_tooltalk" = "yes no"; then
1529   (echo "$progname: Usage error:"
1530 echo " " "--with-workshop requires --with-tooltalk"
1531 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1532 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1533 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1534 fi
1535
1536 if test "$with_workshop" = "yes"; then
1537   { test "$extra_verbose" = "yes" && cat << \EOF
1538     Defining SUNPRO
1539 EOF
1540 cat >> confdefs.h <<\EOF
1541 #define SUNPRO 1
1542 EOF
1543 }
1544
1545   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1546    echo "    xemacs will be linked with \"sunpro.o\""
1547  fi
1548 fi
1549
1550 if test "$with_clash_detection" = "yes"; then
1551   { test "$extra_verbose" = "yes" && cat << \EOF
1552     Defining CLASH_DETECTION
1553 EOF
1554 cat >> confdefs.h <<\EOF
1555 #define CLASH_DETECTION 1
1556 EOF
1557 }
1558
1559   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1560    echo "    xemacs will be linked with \"filelock.o\""
1561  fi
1562 fi
1563
1564 test -n "$compiler" && CC="$compiler"
1565 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1566 fi
1567
1568 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1569 if test "${CFLAGS-unset}" != unset
1570   then cflags_specified=yes;
1571   else cflags_specified=no;
1572 fi
1573
1574 xe_save_CFLAGS="$CFLAGS"
1575
1576 # Extract the first word of "gcc", so it can be a program name with args.
1577 set dummy gcc; ac_word=$2
1578 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1579 echo "configure:1580: checking for $ac_word" >&5
1580
1581 if test -n "$CC"; then
1582   ac_cv_prog_CC="$CC" # Let the user override the test.
1583 else
1584   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1585   ac_dummy="$PATH"
1586   for ac_dir in $ac_dummy; do
1587     test -z "$ac_dir" && ac_dir=.
1588     if test -f $ac_dir/$ac_word; then
1589       ac_cv_prog_CC="gcc"
1590       break
1591     fi
1592   done
1593   IFS="$ac_save_ifs"
1594 fi
1595 CC="$ac_cv_prog_CC"
1596 if test -n "$CC"; then
1597   echo "$ac_t""$CC" 1>&6
1598 else
1599   echo "$ac_t""no" 1>&6
1600 fi
1601
1602 if test -z "$CC"; then
1603   # Extract the first word of "cc", so it can be a program name with args.
1604 set dummy cc; ac_word=$2
1605 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1606 echo "configure:1607: checking for $ac_word" >&5
1607
1608 if test -n "$CC"; then
1609   ac_cv_prog_CC="$CC" # Let the user override the test.
1610 else
1611   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1612   ac_prog_rejected=no
1613   ac_dummy="$PATH"
1614   for ac_dir in $ac_dummy; do
1615     test -z "$ac_dir" && ac_dir=.
1616     if test -f $ac_dir/$ac_word; then
1617       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1618         ac_prog_rejected=yes
1619         continue
1620       fi
1621       ac_cv_prog_CC="cc"
1622       break
1623     fi
1624   done
1625   IFS="$ac_save_ifs"
1626 if test $ac_prog_rejected = yes; then
1627   # We found a bogon in the path, so make sure we never use it.
1628   set dummy $ac_cv_prog_CC
1629   shift
1630   if test $# -gt 0; then
1631     # We chose a different compiler from the bogus one.
1632     # However, it has the same basename, so the bogon will be chosen
1633     # first if we set CC to just the basename; use the full file name.
1634     shift
1635     set dummy "$ac_dir/$ac_word" "$@"
1636     shift
1637     ac_cv_prog_CC="$@"
1638   fi
1639 fi
1640 fi
1641 CC="$ac_cv_prog_CC"
1642 if test -n "$CC"; then
1643   echo "$ac_t""$CC" 1>&6
1644 else
1645   echo "$ac_t""no" 1>&6
1646 fi
1647
1648   if test -z "$CC"; then
1649     case "`uname -s`" in
1650     *win32* | *WIN32*)
1651       # Extract the first word of "cl", so it can be a program name with args.
1652 set dummy cl; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655
1656 if test -n "$CC"; then
1657   ac_cv_prog_CC="$CC" # Let the user override the test.
1658 else
1659   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1660   ac_dummy="$PATH"
1661   for ac_dir in $ac_dummy; do
1662     test -z "$ac_dir" && ac_dir=.
1663     if test -f $ac_dir/$ac_word; then
1664       ac_cv_prog_CC="cl"
1665       break
1666     fi
1667   done
1668   IFS="$ac_save_ifs"
1669 fi
1670 CC="$ac_cv_prog_CC"
1671 if test -n "$CC"; then
1672   echo "$ac_t""$CC" 1>&6
1673 else
1674   echo "$ac_t""no" 1>&6
1675 fi
1676  ;;
1677     esac
1678   fi
1679   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1680 fi
1681
1682 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1683 echo "configure:1684: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1684
1685 ac_ext=c
1686 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1687 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1688 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1689 ac_cpp='$CPP '"$xe_cppflags"
1690 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1691 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1692 cross_compiling=no
1693
1694 cat > conftest.$ac_ext << EOF
1695
1696 #line 1697 "configure"
1697 #include "confdefs.h"
1698
1699 main(){return(0);}
1700 EOF
1701 if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1702   ac_cv_prog_cc_works=yes
1703   # If we can't run a trivial program, we are probably using a cross compiler.
1704   if (./conftest; exit) 2>/dev/null; then
1705     ac_cv_prog_cc_cross=no
1706   else
1707     ac_cv_prog_cc_cross=yes
1708   fi
1709 else
1710   echo "configure: failed program was:" >&5
1711   cat conftest.$ac_ext >&5
1712   ac_cv_prog_cc_works=no
1713 fi
1714 rm -fr conftest*
1715 ac_ext=c
1716 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1717 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1718 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1719 ac_cpp='$CPP '"$xe_cppflags"
1720 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1721 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1722 cross_compiling=no
1723
1724 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1725 if test $ac_cv_prog_cc_works = no; then
1726   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1727 fi
1728 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1729 echo "configure:1730: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1730 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1731 cross_compiling=$ac_cv_prog_cc_cross
1732
1733 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1734 echo "configure:1735: checking whether we are using GNU C" >&5
1735
1736 cat > conftest.c <<EOF
1737 #ifdef __GNUC__
1738   yes;
1739 #endif
1740 EOF
1741 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1742   ac_cv_prog_gcc=yes
1743 else
1744   ac_cv_prog_gcc=no
1745 fi
1746
1747 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1748
1749 if test $ac_cv_prog_gcc = yes; then
1750   GCC=yes
1751 else
1752   GCC=
1753 fi
1754
1755 ac_test_CFLAGS="${CFLAGS+set}"
1756 ac_save_CFLAGS="$CFLAGS"
1757 CFLAGS=
1758 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1759 echo "configure:1760: checking whether ${CC-cc} accepts -g" >&5
1760
1761 echo 'void f(){}' > conftest.c
1762 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1763   ac_cv_prog_cc_g=yes
1764 else
1765   ac_cv_prog_cc_g=no
1766 fi
1767 rm -f conftest*
1768
1769
1770 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1771 if test "$ac_test_CFLAGS" = set; then
1772   CFLAGS="$ac_save_CFLAGS"
1773 elif test $ac_cv_prog_cc_g = yes; then
1774   if test "$GCC" = yes; then
1775     CFLAGS="-g -O2"
1776   else
1777     CFLAGS="-g"
1778   fi
1779 else
1780   if test "$GCC" = yes; then
1781     CFLAGS="-O2"
1782   else
1783     CFLAGS=
1784   fi
1785 fi
1786  
1787 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1788   CC=${NON_GNU_CC-cc}
1789   # Extract the first word of "gcc", so it can be a program name with args.
1790 set dummy gcc; ac_word=$2
1791 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1792 echo "configure:1793: checking for $ac_word" >&5
1793
1794 if test -n "$CC"; then
1795   ac_cv_prog_CC="$CC" # Let the user override the test.
1796 else
1797   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1798   ac_dummy="$PATH"
1799   for ac_dir in $ac_dummy; do
1800     test -z "$ac_dir" && ac_dir=.
1801     if test -f $ac_dir/$ac_word; then
1802       ac_cv_prog_CC="gcc"
1803       break
1804     fi
1805   done
1806   IFS="$ac_save_ifs"
1807 fi
1808 CC="$ac_cv_prog_CC"
1809 if test -n "$CC"; then
1810   echo "$ac_t""$CC" 1>&6
1811 else
1812   echo "$ac_t""no" 1>&6
1813 fi
1814
1815 if test -z "$CC"; then
1816   # Extract the first word of "cc", so it can be a program name with args.
1817 set dummy cc; ac_word=$2
1818 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1819 echo "configure:1820: checking for $ac_word" >&5
1820
1821 if test -n "$CC"; then
1822   ac_cv_prog_CC="$CC" # Let the user override the test.
1823 else
1824   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1825   ac_prog_rejected=no
1826   ac_dummy="$PATH"
1827   for ac_dir in $ac_dummy; do
1828     test -z "$ac_dir" && ac_dir=.
1829     if test -f $ac_dir/$ac_word; then
1830       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1831         ac_prog_rejected=yes
1832         continue
1833       fi
1834       ac_cv_prog_CC="cc"
1835       break
1836     fi
1837   done
1838   IFS="$ac_save_ifs"
1839 if test $ac_prog_rejected = yes; then
1840   # We found a bogon in the path, so make sure we never use it.
1841   set dummy $ac_cv_prog_CC
1842   shift
1843   if test $# -gt 0; then
1844     # We chose a different compiler from the bogus one.
1845     # However, it has the same basename, so the bogon will be chosen
1846     # first if we set CC to just the basename; use the full file name.
1847     shift
1848     set dummy "$ac_dir/$ac_word" "$@"
1849     shift
1850     ac_cv_prog_CC="$@"
1851   fi
1852 fi
1853 fi
1854 CC="$ac_cv_prog_CC"
1855 if test -n "$CC"; then
1856   echo "$ac_t""$CC" 1>&6
1857 else
1858   echo "$ac_t""no" 1>&6
1859 fi
1860
1861   if test -z "$CC"; then
1862     case "`uname -s`" in
1863     *win32* | *WIN32*)
1864       # Extract the first word of "cl", so it can be a program name with args.
1865 set dummy cl; ac_word=$2
1866 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1867 echo "configure:1868: checking for $ac_word" >&5
1868
1869 if test -n "$CC"; then
1870   ac_cv_prog_CC="$CC" # Let the user override the test.
1871 else
1872   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1873   ac_dummy="$PATH"
1874   for ac_dir in $ac_dummy; do
1875     test -z "$ac_dir" && ac_dir=.
1876     if test -f $ac_dir/$ac_word; then
1877       ac_cv_prog_CC="cl"
1878       break
1879     fi
1880   done
1881   IFS="$ac_save_ifs"
1882 fi
1883 CC="$ac_cv_prog_CC"
1884 if test -n "$CC"; then
1885   echo "$ac_t""$CC" 1>&6
1886 else
1887   echo "$ac_t""no" 1>&6
1888 fi
1889  ;;
1890     esac
1891   fi
1892   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1893 fi
1894
1895 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1896 echo "configure:1897: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1897
1898 ac_ext=c
1899 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1900 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1901 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1902 ac_cpp='$CPP '"$xe_cppflags"
1903 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1904 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1905 cross_compiling=no
1906
1907 cat > conftest.$ac_ext << EOF
1908
1909 #line 1910 "configure"
1910 #include "confdefs.h"
1911
1912 main(){return(0);}
1913 EOF
1914 if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1915   ac_cv_prog_cc_works=yes
1916   # If we can't run a trivial program, we are probably using a cross compiler.
1917   if (./conftest; exit) 2>/dev/null; then
1918     ac_cv_prog_cc_cross=no
1919   else
1920     ac_cv_prog_cc_cross=yes
1921   fi
1922 else
1923   echo "configure: failed program was:" >&5
1924   cat conftest.$ac_ext >&5
1925   ac_cv_prog_cc_works=no
1926 fi
1927 rm -fr conftest*
1928 ac_ext=c
1929 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1930 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1931 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1932 ac_cpp='$CPP '"$xe_cppflags"
1933 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1934 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1935 cross_compiling=no
1936
1937 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1938 if test $ac_cv_prog_cc_works = no; then
1939   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1940 fi
1941 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1942 echo "configure:1943: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1943 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1944 cross_compiling=$ac_cv_prog_cc_cross
1945
1946 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1947 echo "configure:1948: checking whether we are using GNU C" >&5
1948
1949 cat > conftest.c <<EOF
1950 #ifdef __GNUC__
1951   yes;
1952 #endif
1953 EOF
1954 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1955   ac_cv_prog_gcc=yes
1956 else
1957   ac_cv_prog_gcc=no
1958 fi
1959
1960 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1961
1962 if test $ac_cv_prog_gcc = yes; then
1963   GCC=yes
1964 else
1965   GCC=
1966 fi
1967
1968 ac_test_CFLAGS="${CFLAGS+set}"
1969 ac_save_CFLAGS="$CFLAGS"
1970 CFLAGS=
1971 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1972 echo "configure:1973: checking whether ${CC-cc} accepts -g" >&5
1973
1974 echo 'void f(){}' > conftest.c
1975 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1976   ac_cv_prog_cc_g=yes
1977 else
1978   ac_cv_prog_cc_g=no
1979 fi
1980 rm -f conftest*
1981
1982
1983 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1984 if test "$ac_test_CFLAGS" = set; then
1985   CFLAGS="$ac_save_CFLAGS"
1986 elif test $ac_cv_prog_cc_g = yes; then
1987   if test "$GCC" = yes; then
1988     CFLAGS="-g -O2"
1989   else
1990     CFLAGS="-g"
1991   fi
1992 else
1993   if test "$GCC" = yes; then
1994     CFLAGS="-O2"
1995   else
1996     CFLAGS=
1997   fi
1998 fi
1999
2000 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2001   CC=gcc
2002   # Extract the first word of "gcc", so it can be a program name with args.
2003 set dummy gcc; ac_word=$2
2004 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2005 echo "configure:2006: checking for $ac_word" >&5
2006
2007 if test -n "$CC"; then
2008   ac_cv_prog_CC="$CC" # Let the user override the test.
2009 else
2010   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2011   ac_dummy="$PATH"
2012   for ac_dir in $ac_dummy; do
2013     test -z "$ac_dir" && ac_dir=.
2014     if test -f $ac_dir/$ac_word; then
2015       ac_cv_prog_CC="gcc"
2016       break
2017     fi
2018   done
2019   IFS="$ac_save_ifs"
2020 fi
2021 CC="$ac_cv_prog_CC"
2022 if test -n "$CC"; then
2023   echo "$ac_t""$CC" 1>&6
2024 else
2025   echo "$ac_t""no" 1>&6
2026 fi
2027
2028 if test -z "$CC"; then
2029   # Extract the first word of "cc", so it can be a program name with args.
2030 set dummy cc; ac_word=$2
2031 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2032 echo "configure:2033: checking for $ac_word" >&5
2033
2034 if test -n "$CC"; then
2035   ac_cv_prog_CC="$CC" # Let the user override the test.
2036 else
2037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2038   ac_prog_rejected=no
2039   ac_dummy="$PATH"
2040   for ac_dir in $ac_dummy; do
2041     test -z "$ac_dir" && ac_dir=.
2042     if test -f $ac_dir/$ac_word; then
2043       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2044         ac_prog_rejected=yes
2045         continue
2046       fi
2047       ac_cv_prog_CC="cc"
2048       break
2049     fi
2050   done
2051   IFS="$ac_save_ifs"
2052 if test $ac_prog_rejected = yes; then
2053   # We found a bogon in the path, so make sure we never use it.
2054   set dummy $ac_cv_prog_CC
2055   shift
2056   if test $# -gt 0; then
2057     # We chose a different compiler from the bogus one.
2058     # However, it has the same basename, so the bogon will be chosen
2059     # first if we set CC to just the basename; use the full file name.
2060     shift
2061     set dummy "$ac_dir/$ac_word" "$@"
2062     shift
2063     ac_cv_prog_CC="$@"
2064   fi
2065 fi
2066 fi
2067 CC="$ac_cv_prog_CC"
2068 if test -n "$CC"; then
2069   echo "$ac_t""$CC" 1>&6
2070 else
2071   echo "$ac_t""no" 1>&6
2072 fi
2073
2074   if test -z "$CC"; then
2075     case "`uname -s`" in
2076     *win32* | *WIN32*)
2077       # Extract the first word of "cl", so it can be a program name with args.
2078 set dummy cl; ac_word=$2
2079 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2080 echo "configure:2081: checking for $ac_word" >&5
2081
2082 if test -n "$CC"; then
2083   ac_cv_prog_CC="$CC" # Let the user override the test.
2084 else
2085   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2086   ac_dummy="$PATH"
2087   for ac_dir in $ac_dummy; do
2088     test -z "$ac_dir" && ac_dir=.
2089     if test -f $ac_dir/$ac_word; then
2090       ac_cv_prog_CC="cl"
2091       break
2092     fi
2093   done
2094   IFS="$ac_save_ifs"
2095 fi
2096 CC="$ac_cv_prog_CC"
2097 if test -n "$CC"; then
2098   echo "$ac_t""$CC" 1>&6
2099 else
2100   echo "$ac_t""no" 1>&6
2101 fi
2102  ;;
2103     esac
2104   fi
2105   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2106 fi
2107
2108 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2109 echo "configure:2110: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2110
2111 ac_ext=c
2112 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2113 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2114 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2115 ac_cpp='$CPP '"$xe_cppflags"
2116 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2117 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2118 cross_compiling=no
2119
2120 cat > conftest.$ac_ext << EOF
2121
2122 #line 2123 "configure"
2123 #include "confdefs.h"
2124
2125 main(){return(0);}
2126 EOF
2127 if { (eval echo configure:2128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2128   ac_cv_prog_cc_works=yes
2129   # If we can't run a trivial program, we are probably using a cross compiler.
2130   if (./conftest; exit) 2>/dev/null; then
2131     ac_cv_prog_cc_cross=no
2132   else
2133     ac_cv_prog_cc_cross=yes
2134   fi
2135 else
2136   echo "configure: failed program was:" >&5
2137   cat conftest.$ac_ext >&5
2138   ac_cv_prog_cc_works=no
2139 fi
2140 rm -fr conftest*
2141 ac_ext=c
2142 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2143 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2144 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2145 ac_cpp='$CPP '"$xe_cppflags"
2146 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2147 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2148 cross_compiling=no
2149
2150 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2151 if test $ac_cv_prog_cc_works = no; then
2152   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2153 fi
2154 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2155 echo "configure:2156: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2156 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2157 cross_compiling=$ac_cv_prog_cc_cross
2158
2159 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2160 echo "configure:2161: checking whether we are using GNU C" >&5
2161
2162 cat > conftest.c <<EOF
2163 #ifdef __GNUC__
2164   yes;
2165 #endif
2166 EOF
2167 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2168   ac_cv_prog_gcc=yes
2169 else
2170   ac_cv_prog_gcc=no
2171 fi
2172
2173 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2174
2175 if test $ac_cv_prog_gcc = yes; then
2176   GCC=yes
2177 else
2178   GCC=
2179 fi
2180
2181 ac_test_CFLAGS="${CFLAGS+set}"
2182 ac_save_CFLAGS="$CFLAGS"
2183 CFLAGS=
2184 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2185 echo "configure:2186: checking whether ${CC-cc} accepts -g" >&5
2186
2187 echo 'void f(){}' > conftest.c
2188 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2189   ac_cv_prog_cc_g=yes
2190 else
2191   ac_cv_prog_cc_g=no
2192 fi
2193 rm -f conftest*
2194
2195
2196 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2197 if test "$ac_test_CFLAGS" = set; then
2198   CFLAGS="$ac_save_CFLAGS"
2199 elif test $ac_cv_prog_cc_g = yes; then
2200   if test "$GCC" = yes; then
2201     CFLAGS="-g -O2"
2202   else
2203     CFLAGS="-g"
2204   fi
2205 else
2206   if test "$GCC" = yes; then
2207     CFLAGS="-O2"
2208   else
2209     CFLAGS=
2210   fi
2211 fi
2212
2213 fi
2214 CFLAGS="$xe_save_CFLAGS"
2215
2216
2217 test -n "$CPP" -a -d "$CPP" && CPP=
2218
2219 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2220
2221 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2222 echo "configure:2223: checking how to run the C preprocessor" >&5
2223 # On Suns, sometimes $CPP names a directory.
2224 if test -n "$CPP" && test -d "$CPP"; then
2225   CPP=
2226 fi
2227 if test -z "$CPP"; then
2228
2229   # This must be in double quotes, not single quotes, because CPP may get
2230   # substituted into the Makefile and "${CC-cc}" will confuse make.
2231   CPP="${CC-cc} -E"
2232   # On the NeXT, cc -E runs the code through the compiler's parser,
2233   # not just through cpp.
2234   cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2237 #include <assert.h>
2238 Syntax Error
2239 EOF
2240 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2241 { (eval echo configure:2242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2242 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2243 if test -z "$ac_err"; then
2244   :
2245 else
2246   echo "$ac_err" >&5
2247   echo "configure: failed program was:" >&5
2248   cat conftest.$ac_ext >&5
2249   rm -rf conftest*
2250   CPP="${CC-cc} -E -traditional-cpp"
2251   cat > conftest.$ac_ext <<EOF
2252 #line 2253 "configure"
2253 #include "confdefs.h"
2254 #include <assert.h>
2255 Syntax Error
2256 EOF
2257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2258 { (eval echo configure:2259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2260 if test -z "$ac_err"; then
2261   :
2262 else
2263   echo "$ac_err" >&5
2264   echo "configure: failed program was:" >&5
2265   cat conftest.$ac_ext >&5
2266   rm -rf conftest*
2267   CPP="${CC-cc} -nologo -E"
2268   cat > conftest.$ac_ext <<EOF
2269 #line 2270 "configure"
2270 #include "confdefs.h"
2271 #include <assert.h>
2272 Syntax Error
2273 EOF
2274 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2275 { (eval echo configure:2276: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2276 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2277 if test -z "$ac_err"; then
2278   :
2279 else
2280   echo "$ac_err" >&5
2281   echo "configure: failed program was:" >&5
2282   cat conftest.$ac_ext >&5
2283   rm -rf conftest*
2284   CPP=/lib/cpp
2285 fi
2286 rm -f conftest*
2287 fi
2288 rm -f conftest*
2289 fi
2290 rm -f conftest*
2291   ac_cv_prog_CPP="$CPP"
2292   CPP="$ac_cv_prog_CPP"
2293 else
2294   ac_cv_prog_CPP="$CPP"
2295 fi
2296 echo "$ac_t""$CPP" 1>&6
2297
2298
2299 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2300 echo "configure:2301: checking for AIX" >&5
2301 cat > conftest.$ac_ext <<EOF
2302 #line 2303 "configure"
2303 #include "confdefs.h"
2304 #ifdef _AIX
2305   yes
2306 #endif
2307
2308 EOF
2309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2310   egrep "yes" >/dev/null 2>&1; then
2311   rm -rf conftest*
2312   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2313     Defining _ALL_SOURCE
2314 EOF
2315 cat >> confdefs.h <<\EOF
2316 #define _ALL_SOURCE 1
2317 EOF
2318 }
2319
2320 else
2321   rm -rf conftest*
2322   echo "$ac_t""no" 1>&6
2323 fi
2324 rm -f conftest*
2325
2326
2327
2328 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2329 echo "configure:2330: checking for GNU libc" >&5
2330 cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 #include <features.h>
2334 int main() {
2335
2336 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2337 #error Not a GNU libc system :-(
2338 ******* ======= ******** &&&&&&&&
2339 #endif
2340
2341 ; return 0; }
2342 EOF
2343 if { (eval echo configure:2344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2344   rm -rf conftest*
2345   have_glibc=yes
2346 else
2347   echo "configure: failed program was:" >&5
2348   cat conftest.$ac_ext >&5
2349   rm -rf conftest*
2350   have_glibc=no
2351 fi
2352 rm -f conftest*
2353 echo "$ac_t""$have_glibc" 1>&6
2354 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2355     Defining _GNU_SOURCE
2356 EOF
2357 cat >> confdefs.h <<\EOF
2358 #define _GNU_SOURCE 1
2359 EOF
2360 }
2361
2362
2363
2364 cat > conftest.$ac_ext <<EOF
2365 #line 2366 "configure"
2366 #include "confdefs.h"
2367 int main () {
2368 #if defined __SUNPRO_C
2369 return 11;
2370 #elif defined __DECC
2371 return 12;
2372 #else
2373 return 0;
2374 #endif
2375 }
2376 EOF
2377 if { (eval echo configure:2378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2378 then
2379   :
2380 else
2381   conftest_rc="$?"
2382   echo "configure: failed program was:" >&5
2383   cat conftest.$ac_ext >&5
2384   rm -fr conftest*
2385   case "$conftest_rc" in
2386   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2387   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2388 esac
2389 fi
2390 rm -fr conftest*
2391
2392
2393
2394
2395 echo "Extracting information from the machine- and system-dependent headers..."
2396
2397 tempcname="conftest.c"
2398
2399
2400
2401 cat > $tempcname <<EOF
2402 #define NOT_C_CODE
2403 #define C_SWITCH_SITE
2404 #define C_SWITCH_X_SITE
2405 #define LD_SWITCH_SITE
2406 #define LD_SWITCH_X_SITE
2407 #define LD_SWITCH_X_SITE_AUX
2408 #define OS_RELEASE $os_release
2409 #include "$srcdir/src/$opsysfile"
2410 #include "$srcdir/src/$machfile"
2411
2412 #ifndef LIBS_MACHINE
2413 #define LIBS_MACHINE
2414 #endif
2415 configure___ libs_machine=LIBS_MACHINE
2416
2417 #ifndef LIBS_SYSTEM
2418 #define LIBS_SYSTEM
2419 #endif
2420 configure___ libs_system=LIBS_SYSTEM
2421
2422 #ifndef LIBS_TERMCAP
2423 #define LIBS_TERMCAP
2424 #endif
2425 configure___ libs_termcap=LIBS_TERMCAP
2426
2427 #ifndef LIB_STANDARD
2428 #define LIB_STANDARD
2429 #endif
2430 configure___ libs_standard=LIB_STANDARD
2431
2432
2433 #ifndef OBJECTS_MACHINE
2434 #define OBJECTS_MACHINE
2435 #endif
2436 configure___ objects_machine=OBJECTS_MACHINE
2437
2438 #ifndef OBJECTS_SYSTEM
2439 #define OBJECTS_SYSTEM
2440 #endif
2441 configure___ objects_system=OBJECTS_SYSTEM
2442
2443
2444 #ifndef C_SWITCH_MACHINE
2445 #define C_SWITCH_MACHINE
2446 #endif
2447 configure___ c_switch_machine=C_SWITCH_MACHINE
2448
2449 #ifndef C_SWITCH_SYSTEM
2450 #define C_SWITCH_SYSTEM
2451 #endif
2452 configure___ c_switch_system=C_SWITCH_SYSTEM
2453
2454
2455 #ifndef LD_SWITCH_MACHINE
2456 #define LD_SWITCH_MACHINE
2457 #endif
2458 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2459
2460 #ifndef LD_SWITCH_SYSTEM
2461 #define LD_SWITCH_SYSTEM
2462 #endif
2463 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2464
2465
2466 #ifndef UNEXEC
2467 #define UNEXEC "unexec.o"
2468 #endif
2469 configure___ unexec=UNEXEC
2470
2471
2472 #ifndef LD_SWITCH_SHARED
2473 #define LD_SWITCH_SHARED "-c"
2474 #endif
2475 configure___ ld_switch_shared=LD_SWITCH_SHARED
2476
2477
2478 #ifdef ORDINARY_LINK
2479 #define LD "\$(CC) \$(CFLAGS)"
2480 #else /* no ORDINARY LINK */
2481 #ifdef COFF_ENCAPSULATE
2482 #define LD "\$(CC) -nostdlib"
2483 #else /* not COFF_ENCAPSULATE */
2484 #ifdef LINKER
2485 #define LD LINKER
2486 #else /* ! defined (LINKER) */
2487 #define LD "ld"
2488 #endif /* ! defined (LINKER) */
2489 #endif /* ! defined (COFF_ENCAPSULATE) */
2490 #endif /* not ORDINARY_LINK */
2491 configure___ ld=LD
2492
2493 #ifndef LIB_GCC
2494 #define LIB_GCC
2495 #endif
2496 configure___ lib_gcc=LIB_GCC
2497
2498 #ifndef LD_TEXT_START_ADDR
2499 #define LD_TEXT_START_ADDR
2500 #endif
2501 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2502
2503
2504 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2505 #ifdef NO_REMAP
2506 #ifdef COFF_ENCAPSULATE
2507 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2508 #else /* ! defined (COFF_ENCAPSULATE) */
2509 #define START_FILES "pre-crt0.o /lib/crt0.o"
2510 #endif /* ! defined (COFF_ENCAPSULATE) */
2511 #else /* ! defined (NO_REMAP) */
2512 #define START_FILES "ecrt0.o"
2513 #endif /* ! defined (NO_REMAP) */
2514 #endif /* no ORDINARY_LINK */
2515 #ifndef START_FILES
2516 #define START_FILES
2517 #endif
2518 configure___ start_files=START_FILES
2519
2520 #ifdef ORDINARY_LINK
2521 configure___ ordinary_link=yes
2522 #else
2523 configure___ ordinary_link=no
2524 #endif
2525
2526 #ifdef SYSTEM_MALLOC
2527 configure___ system_malloc=yes
2528 #else
2529 configure___ system_malloc=no
2530 #endif
2531
2532 #ifdef TERMINFO
2533 configure___ have_terminfo=yes
2534 #else
2535 configure___ have_terminfo=no
2536 #endif
2537
2538 #ifdef MAIL_USE_FLOCK
2539 configure___ mail_use_flock=yes
2540 #else
2541 configure___ mail_use_flock=no
2542 #endif
2543
2544 #ifdef MAIL_USE_LOCKF
2545 configure___ mail_use_lockf=yes
2546 #else
2547 configure___ mail_use_lockf=no
2548 #endif
2549
2550 #ifdef MAIL_USE_LOCKING
2551 configure___ mail_use_locking=yes
2552 #else
2553 configure___ mail_use_locking=no
2554 #endif
2555
2556 #ifdef HAVE_WIN32_PROCESSES
2557 configure___ win32_processes=yes
2558 #else
2559 configure___ win32_processes=no
2560 #endif
2561
2562 EOF
2563
2564 CPP=`eval "echo $CPP $CPPFLAGS"`
2565 eval `$CPP -Isrc $tempcname \
2566         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2567
2568 rm $tempcname
2569
2570 test "$extra_verbose" = "yes" && \
2571   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 ""
2572
2573 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2574         mingw_include=`eval "dirname $mingw_include"` ;
2575         mingw_include="-I$mingw_include/../include/mingw32" ;
2576         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2577 esac
2578
2579 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2580
2581 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2582
2583 if test "$cflags_specified" = "no"; then
2584       if   test "$GCC" = "yes"; then
2585     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2586               elif test "$__SUNPRO_C" = "yes"; then
2587     case "$opsys" in
2588       sol2    ) CFLAGS="-v -xO4" ;;
2589       sunos4* ) CFLAGS="-xO2";;
2590     esac
2591   elif test "$__DECC" = "yes"; then
2592     CFLAGS="-O3"
2593   elif test "$CC" = "xlc"; then
2594     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2595     else
2596     CFLAGS="-O" ;  fi
2597 fi
2598
2599
2600 if test "$GCC" = "yes"; then
2601   set x $ld_switch_system; shift; ld_switch_system=""
2602   while test -n "$1"; do
2603     case $1 in
2604       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2605       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2606       -Xlinker* ) ;;
2607       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2608     esac
2609     shift
2610   done
2611 fi
2612
2613 if test "$GCC" = "yes"; then
2614   set x $ld_switch_machine; shift; ld_switch_machine=""
2615   while test -n "$1"; do
2616     case $1 in
2617       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2618       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2619       -Xlinker* ) ;;
2620       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2621     esac
2622     shift
2623   done
2624 fi
2625
2626 if test "$GCC" = "yes"; then
2627   set x $LDFLAGS; shift; LDFLAGS=""
2628   while test -n "$1"; do
2629     case $1 in
2630       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2631       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2632       -Xlinker* ) ;;
2633       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2634     esac
2635     shift
2636   done
2637 fi
2638
2639 if test "$GCC" = "yes"; then
2640   set x $ld_call_shared; shift; ld_call_shared=""
2641   while test -n "$1"; do
2642     case $1 in
2643       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2644       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2645       -Xlinker* ) ;;
2646       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2647     esac
2648     shift
2649   done
2650 fi
2651
2652 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2653    echo "    xemacs will be linked with \"$objects_machine\""
2654  fi
2655 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2656    echo "    xemacs will be linked with \"$objects_system\""
2657  fi
2658 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2659    echo "    xemacs will be linked with \"$unexec\""
2660  fi
2661
2662 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2663 echo "configure:2664: checking for dynodump" >&5
2664 if test "$unexec" != "unexsol2.o"; then
2665   echo "$ac_t""no" 1>&6
2666 else
2667   echo "$ac_t""yes" 1>&6
2668   { test "$extra_verbose" = "yes" && cat << \EOF
2669     Defining DYNODUMP
2670 EOF
2671 cat >> confdefs.h <<\EOF
2672 #define DYNODUMP 1
2673 EOF
2674 }
2675
2676   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2677   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2678   case "$machine" in
2679     sparc   ) dynodump_arch=sparc ;;
2680     *86*    ) dynodump_arch=i386  ;;
2681     powerpc ) dynodump_arch=ppc   ;;
2682   esac
2683     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
2684 fi
2685
2686
2687 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2688
2689 if test "$unexec" = "unexaix.o"; then
2690   if   test "$dynamic" = "no"; then
2691   start_flags="-Wl,-bnso,-bnodelcsect"
2692   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2693   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2694     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2695   done
2696   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2697     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2698   done
2699   
2700 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2701 echo "configure:2702: checking for terminateAndUnload in -lC" >&5
2702 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2703
2704 xe_check_libs=" -lC "
2705 cat > conftest.$ac_ext <<EOF
2706 #line 2707 "configure"
2707 #include "confdefs.h"
2708 /* Override any gcc2 internal prototype to avoid an error.  */
2709 /* We use char because int might match the return type of a gcc2
2710     builtin and then its argument prototype would still apply.  */
2711 char terminateAndUnload();
2712
2713 int main() {
2714 terminateAndUnload()
2715 ; return 0; }
2716 EOF
2717 if { (eval echo configure:2718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2718   rm -rf conftest*
2719   eval "ac_cv_lib_$ac_lib_var=yes"
2720 else
2721   echo "configure: failed program was:" >&5
2722   cat conftest.$ac_ext >&5
2723   rm -rf conftest*
2724   eval "ac_cv_lib_$ac_lib_var=no"
2725 fi
2726 rm -f conftest*
2727 xe_check_libs=""
2728
2729 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2730   echo "$ac_t""yes" 1>&6
2731   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2732 else
2733   echo "$ac_t""no" 1>&6
2734 fi
2735
2736
2737   fi
2738 elif test -n "$ld_text_start_addr"; then
2739   start_flags="-T $ld_text_start_addr -e __start"
2740 fi
2741
2742
2743
2744
2745 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2746  test -z "$linker" &&  linker='$(CC) -nostdlib'
2747  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2748 fi
2749 test "$GCC" != "yes" && lib_gcc=
2750
2751
2752
2753
2754
2755 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2756 if test -n "$site_libraries"; then
2757   for arg in $site_libraries; do
2758     case "$arg" in
2759      -* ) ;;
2760      * ) test -d "$arg" || \
2761            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2762        arg="-L${arg}" ;;
2763     esac
2764     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2765   done
2766 fi
2767
2768 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2769 if test -n "$site_includes"; then
2770   for arg in $site_includes; do
2771     case "$arg" in
2772       -* ) ;;
2773       * ) test -d "$arg" || \
2774            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2775       arg="-I${arg}" ;;
2776     esac
2777     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2778   done
2779 fi
2780
2781 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2782 if test -n "$site_prefixes"; then
2783   for dir in $site_prefixes; do
2784     lib_dir="${dir}/lib"
2785     inc_dir="${dir}/include"
2786     if test ! -d "$dir"; then
2787       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2788     elif test ! -d "$lib_dir"; then
2789       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2790     else
2791       if test -d "$inc_dir"; then
2792         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
2793       fi
2794       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
2795     fi
2796   done
2797 fi
2798
2799
2800 for dir in "/usr/ccs/lib"; do
2801   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
2802 done
2803
2804 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2805 if test -n "$site_runtime_libraries"; then
2806   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2807   export LD_RUN_PATH
2808 fi
2809
2810
2811
2812
2813
2814 if test -n "$add_runtime_path"; then :;
2815 elif test "$dynamic" = "no"; then add_runtime_path=no
2816 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2817 else case "$opsys" in
2818        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2819        * ) add_runtime_path=no ;;
2820      esac
2821 fi
2822
2823 if test "$add_runtime_path" = "yes"; then
2824       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2825 echo "configure:2826: checking "for runtime libraries flag"" >&5
2826   case "$opsys" in
2827     sol2 ) dash_r="-R" ;;
2828     decosf* | linux* | irix*) dash_r="-rpath " ;;
2829     *)
2830       dash_r=""
2831       for try_dash_r in "-R" "-R " "-rpath "; do
2832         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2833         
2834 if test "$GCC" = "yes"; then
2835   set x $xe_check_libs; shift; xe_check_libs=""
2836   while test -n "$1"; do
2837     case $1 in
2838       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2839       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2840       -Xlinker* ) ;;
2841       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2842     esac
2843     shift
2844   done
2845 fi
2846         cat > conftest.$ac_ext <<EOF
2847 #line 2848 "configure"
2848 #include "confdefs.h"
2849
2850 int main() {
2851
2852 ; return 0; }
2853 EOF
2854 if { (eval echo configure:2855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2855   rm -rf conftest*
2856   dash_r="$try_dash_r"
2857 else
2858   echo "configure: failed program was:" >&5
2859   cat conftest.$ac_ext >&5
2860 fi
2861 rm -f conftest*
2862         xe_check_libs=""
2863         test -n "$dash_r" && break
2864       done ;;
2865   esac
2866   if test -n "$dash_r";
2867     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2868     else echo "$ac_t""NONE" 1>&6
2869   fi
2870 fi
2871
2872 xe_add_unique_runpath_dir='
2873   xe_add_p=yes
2874   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2875   done
2876   if test "$xe_add_p" = "yes"; then
2877     test -n "$runpath" && runpath="${runpath}:"
2878     runpath="${runpath}${xe_runpath_dir}"
2879     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2880   fi'
2881
2882
2883
2884
2885 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2886     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2887   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2888   
2889         runpath="" runpath_dirs=""
2890   if test -n "$LD_RUN_PATH"; then
2891     runpath="$LD_RUN_PATH"
2892   elif test "$GCC" = "yes"; then
2893         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2894     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2895     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2896     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2897       case "$arg" in P,* | -L* | -R* )
2898         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2899           {
2900 xe_runpath_dir="$dir"
2901   test "$xe_runpath_dir" != "/lib"     -a \
2902         "$xe_runpath_dir" != "/usr/lib" -a \
2903         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2904   eval "$xe_add_unique_runpath_dir"
2905 }
2906         done ;;
2907       esac
2908     done
2909     ld_switch_run="$ld_switch_run_save"
2910     rm -f conftest*
2911   else
2912         for arg in $ld_switch_site $ld_switch_x_site; do
2913       case "$arg" in -L*) {
2914 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2915   test "$xe_runpath_dir" != "/lib"     -a \
2916         "$xe_runpath_dir" != "/usr/lib" -a \
2917         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2918   eval "$xe_add_unique_runpath_dir"
2919 };; esac
2920     done
2921         if test "$opsys $need_motif" = "sol2 yes"; then
2922       xe_runpath_dir="/opt/SUNWdt/lib";
2923       eval "$xe_add_unique_runpath_dir";
2924     fi
2925   fi 
2926   if test -n "$runpath"; then
2927     ld_switch_run="${dash_r}${runpath}"
2928     
2929 if test "$GCC" = "yes"; then
2930   set x $ld_switch_run; shift; ld_switch_run=""
2931   while test -n "$1"; do
2932     case $1 in
2933       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2934       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2935       -Xlinker* ) ;;
2936       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2937     esac
2938     shift
2939   done
2940 fi
2941     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2942   fi
2943 fi
2944
2945
2946
2947
2948 GNU_MALLOC=yes
2949 if test "$with_dlmalloc" != "no"; then
2950         doug_lea_malloc=yes
2951 else
2952         doug_lea_malloc=no
2953 fi
2954 after_morecore_hook_exists=yes
2955 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2956 echo "configure:2957: checking for malloc_get_state" >&5
2957
2958 cat > conftest.$ac_ext <<EOF
2959 #line 2960 "configure"
2960 #include "confdefs.h"
2961 /* System header to define __stub macros and hopefully few prototypes,
2962     which can conflict with char malloc_get_state(); below.  */
2963 #include <assert.h>
2964 /* Override any gcc2 internal prototype to avoid an error.  */
2965 /* We use char because int might match the return type of a gcc2
2966     builtin and then its argument prototype would still apply.  */
2967 char malloc_get_state();
2968
2969 int main() {
2970
2971 /* The GNU C library defines this for functions which it implements
2972     to always fail with ENOSYS.  Some functions are actually named
2973     something starting with __ and the normal name is an alias.  */
2974 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2975 choke me
2976 #else
2977 malloc_get_state();
2978 #endif
2979
2980 ; return 0; }
2981 EOF
2982 if { (eval echo configure:2983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2983   rm -rf conftest*
2984   eval "ac_cv_func_malloc_get_state=yes"
2985 else
2986   echo "configure: failed program was:" >&5
2987   cat conftest.$ac_ext >&5
2988   rm -rf conftest*
2989   eval "ac_cv_func_malloc_get_state=no"
2990 fi
2991 rm -f conftest*
2992
2993 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2994   echo "$ac_t""yes" 1>&6
2995   :
2996 else
2997   echo "$ac_t""no" 1>&6
2998 doug_lea_malloc=no
2999 fi
3000
3001 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3002 echo "configure:3003: checking for malloc_set_state" >&5
3003
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007 /* System header to define __stub macros and hopefully few prototypes,
3008     which can conflict with char malloc_set_state(); below.  */
3009 #include <assert.h>
3010 /* Override any gcc2 internal prototype to avoid an error.  */
3011 /* We use char because int might match the return type of a gcc2
3012     builtin and then its argument prototype would still apply.  */
3013 char malloc_set_state();
3014
3015 int main() {
3016
3017 /* The GNU C library defines this for functions which it implements
3018     to always fail with ENOSYS.  Some functions are actually named
3019     something starting with __ and the normal name is an alias.  */
3020 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3021 choke me
3022 #else
3023 malloc_set_state();
3024 #endif
3025
3026 ; return 0; }
3027 EOF
3028 if { (eval echo configure:3029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3029   rm -rf conftest*
3030   eval "ac_cv_func_malloc_set_state=yes"
3031 else
3032   echo "configure: failed program was:" >&5
3033   cat conftest.$ac_ext >&5
3034   rm -rf conftest*
3035   eval "ac_cv_func_malloc_set_state=no"
3036 fi
3037 rm -f conftest*
3038
3039 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3040   echo "$ac_t""yes" 1>&6
3041   :
3042 else
3043   echo "$ac_t""no" 1>&6
3044 doug_lea_malloc=no
3045 fi
3046
3047 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3048 echo "configure:3049: checking whether __after_morecore_hook exists" >&5
3049 cat > conftest.$ac_ext <<EOF
3050 #line 3051 "configure"
3051 #include "confdefs.h"
3052 extern void (* __after_morecore_hook)();
3053 int main() {
3054 __after_morecore_hook = 0
3055 ; return 0; }
3056 EOF
3057 if { (eval echo configure:3058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3058   rm -rf conftest*
3059   echo "$ac_t""yes" 1>&6
3060 else
3061   echo "configure: failed program was:" >&5
3062   cat conftest.$ac_ext >&5
3063   rm -rf conftest*
3064   echo "$ac_t""no" 1>&6
3065    after_morecore_hook_exists=no
3066 fi
3067 rm -f conftest*
3068 if test "$system_malloc" = "yes" ; then
3069   GNU_MALLOC=no
3070   GNU_MALLOC_reason="
3071   (The GNU allocators don't work with this system configuration)."
3072 elif test "$with_system_malloc" = "yes" ; then
3073   GNU_MALLOC=no
3074   GNU_MALLOC_reason="
3075   (User chose not to use GNU allocators)."
3076 elif test "$with_debug_malloc" = "yes" ; then
3077   GNU_MALLOC=no
3078   GNU_MALLOC_reason="
3079   (User chose to use Debugging Malloc)."
3080 fi
3081
3082 if test "$doug_lea_malloc" = "yes" ; then
3083   if test "$GNU_MALLOC" = yes ; then
3084     GNU_MALLOC_reason="
3085   (Using Doug Lea's new malloc from the GNU C Library.)"
3086   fi
3087   { test "$extra_verbose" = "yes" && cat << \EOF
3088     Defining DOUG_LEA_MALLOC
3089 EOF
3090 cat >> confdefs.h <<\EOF
3091 #define DOUG_LEA_MALLOC 1
3092 EOF
3093 }
3094
3095   if test "$after_morecore_hook_exists" = "no" ; then
3096     GNU_MALLOC_reason="
3097   (Using Doug Lea's new malloc from the Linux C Library.)"
3098     { test "$extra_verbose" = "yes" && cat << \EOF
3099     Defining _NO_MALLOC_WARNING_
3100 EOF
3101 cat >> confdefs.h <<\EOF
3102 #define _NO_MALLOC_WARNING_ 1
3103 EOF
3104 }
3105
3106   fi
3107   use_minimal_tagbits=yes
3108 fi
3109
3110
3111
3112
3113 # Extract the first word of "ranlib", so it can be a program name with args.
3114 set dummy ranlib; ac_word=$2
3115 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3116 echo "configure:3117: checking for $ac_word" >&5
3117
3118 if test -n "$RANLIB"; then
3119   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3120 else
3121   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3122   ac_dummy="$PATH"
3123   for ac_dir in $ac_dummy; do
3124     test -z "$ac_dir" && ac_dir=.
3125     if test -f $ac_dir/$ac_word; then
3126       ac_cv_prog_RANLIB="ranlib"
3127       break
3128     fi
3129   done
3130   IFS="$ac_save_ifs"
3131   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3132 fi
3133 RANLIB="$ac_cv_prog_RANLIB"
3134 if test -n "$RANLIB"; then
3135   echo "$ac_t""$RANLIB" 1>&6
3136 else
3137   echo "$ac_t""no" 1>&6
3138 fi
3139
3140 ac_aux_dir=
3141 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3142   if test -f $ac_dir/install-sh; then
3143     ac_aux_dir=$ac_dir
3144     ac_install_sh="$ac_aux_dir/install-sh -c"
3145     break
3146   elif test -f $ac_dir/install.sh; then
3147     ac_aux_dir=$ac_dir
3148     ac_install_sh="$ac_aux_dir/install.sh -c"
3149     break
3150   fi
3151 done
3152 if test -z "$ac_aux_dir"; then
3153   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3154 fi
3155 ac_config_guess=$ac_aux_dir/config.guess
3156 ac_config_sub=$ac_aux_dir/config.sub
3157 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3158
3159 # Find a good install program.  We prefer a C program (faster),
3160 # so one script is as good as another.  But avoid the broken or
3161 # incompatible versions:
3162 # SysV /etc/install, /usr/sbin/install
3163 # SunOS /usr/etc/install
3164 # IRIX /sbin/install
3165 # AIX /bin/install
3166 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3167 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3168 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3169 # ./install, which can be erroneously created by make from ./install.sh.
3170 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3171 echo "configure:3172: checking for a BSD compatible install" >&5
3172 if test -z "$INSTALL"; then
3173
3174   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3175   for ac_dir in $PATH; do
3176     # Account for people who put trailing slashes in PATH elements.
3177     case "$ac_dir/" in
3178     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3179     *)
3180       # OSF1 and SCO ODT 3.0 have their own names for install.
3181       # Don't use installbsd from OSF since it installs stuff as root
3182       # by default.
3183       for ac_prog in ginstall scoinst install; do
3184         if test -f $ac_dir/$ac_prog; then
3185           if test $ac_prog = install &&
3186             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3187             # AIX install.  It has an incompatible calling convention.
3188             :
3189           else
3190             ac_cv_path_install="$ac_dir/$ac_prog -c"
3191             break 2
3192           fi
3193         fi
3194       done
3195       ;;
3196     esac
3197   done
3198   IFS="$ac_save_IFS"
3199
3200   if test "${ac_cv_path_install+set}" = set; then
3201     INSTALL="$ac_cv_path_install"
3202   else
3203     # As a last resort, use the slow shell script.  We don't cache a
3204     # path for INSTALL within a source directory, because that will
3205     # break other packages using the cache if that directory is
3206     # removed, or if the path is relative.
3207     INSTALL="$ac_install_sh"
3208   fi
3209 fi
3210 echo "$ac_t""$INSTALL" 1>&6
3211
3212 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3213 # It thinks the first close brace ends the variable substitution.
3214 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3215
3216 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3217
3218 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3219
3220 for ac_prog in 'bison -y' byacc
3221 do
3222 # Extract the first word of "$ac_prog", so it can be a program name with args.
3223 set dummy $ac_prog; ac_word=$2
3224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_word" >&5
3226
3227 if test -n "$YACC"; then
3228   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3229 else
3230   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3231   ac_dummy="$PATH"
3232   for ac_dir in $ac_dummy; do
3233     test -z "$ac_dir" && ac_dir=.
3234     if test -f $ac_dir/$ac_word; then
3235       ac_cv_prog_YACC="$ac_prog"
3236       break
3237     fi
3238   done
3239   IFS="$ac_save_ifs"
3240 fi
3241 YACC="$ac_cv_prog_YACC"
3242 if test -n "$YACC"; then
3243   echo "$ac_t""$YACC" 1>&6
3244 else
3245   echo "$ac_t""no" 1>&6
3246 fi
3247
3248 test -n "$YACC" && break
3249 done
3250 test -n "$YACC" || YACC="yacc"
3251
3252
3253 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3254 do
3255 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3256 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3257 echo "configure:3258: checking for $ac_hdr" >&5
3258
3259 cat > conftest.$ac_ext <<EOF
3260 #line 3261 "configure"
3261 #include "confdefs.h"
3262 #include <$ac_hdr>
3263 EOF
3264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3265 { (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3267 if test -z "$ac_err"; then
3268   rm -rf conftest*
3269   eval "ac_cv_header_$ac_safe=yes"
3270 else
3271   echo "$ac_err" >&5
3272   echo "configure: failed program was:" >&5
3273   cat conftest.$ac_ext >&5
3274   rm -rf conftest*
3275   eval "ac_cv_header_$ac_safe=no"
3276 fi
3277 rm -f conftest*
3278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3279   echo "$ac_t""yes" 1>&6
3280     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3281   { test "$extra_verbose" = "yes" && cat << EOF
3282     Defining $ac_tr_hdr
3283 EOF
3284 cat >> confdefs.h <<EOF
3285 #define $ac_tr_hdr 1
3286 EOF
3287 }
3288  
3289 else
3290   echo "$ac_t""no" 1>&6
3291 fi
3292 done
3293
3294 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3295 do
3296 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3297 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3298 echo "configure:3299: checking for $ac_hdr" >&5
3299
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 #include <$ac_hdr>
3304 EOF
3305 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3306 { (eval echo configure:3307: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3307 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3308 if test -z "$ac_err"; then
3309   rm -rf conftest*
3310   eval "ac_cv_header_$ac_safe=yes"
3311 else
3312   echo "$ac_err" >&5
3313   echo "configure: failed program was:" >&5
3314   cat conftest.$ac_ext >&5
3315   rm -rf conftest*
3316   eval "ac_cv_header_$ac_safe=no"
3317 fi
3318 rm -f conftest*
3319 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3320   echo "$ac_t""yes" 1>&6
3321     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3322   { test "$extra_verbose" = "yes" && cat << EOF
3323     Defining $ac_tr_hdr
3324 EOF
3325 cat >> confdefs.h <<EOF
3326 #define $ac_tr_hdr 1
3327 EOF
3328 }
3329  
3330 else
3331   echo "$ac_t""no" 1>&6
3332 fi
3333 done
3334
3335 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3336 do
3337 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3338 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_hdr" >&5
3340
3341 cat > conftest.$ac_ext <<EOF
3342 #line 3343 "configure"
3343 #include "confdefs.h"
3344 #include <$ac_hdr>
3345 EOF
3346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3347 { (eval echo configure:3348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3349 if test -z "$ac_err"; then
3350   rm -rf conftest*
3351   eval "ac_cv_header_$ac_safe=yes"
3352 else
3353   echo "$ac_err" >&5
3354   echo "configure: failed program was:" >&5
3355   cat conftest.$ac_ext >&5
3356   rm -rf conftest*
3357   eval "ac_cv_header_$ac_safe=no"
3358 fi
3359 rm -f conftest*
3360 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3361   echo "$ac_t""yes" 1>&6
3362     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3363   { test "$extra_verbose" = "yes" && cat << EOF
3364     Defining $ac_tr_hdr
3365 EOF
3366 cat >> confdefs.h <<EOF
3367 #define $ac_tr_hdr 1
3368 EOF
3369 }
3370  
3371 else
3372   echo "$ac_t""no" 1>&6
3373 fi
3374 done
3375
3376 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3377 echo "configure:3378: checking for sys/wait.h that is POSIX.1 compatible" >&5
3378
3379 cat > conftest.$ac_ext <<EOF
3380 #line 3381 "configure"
3381 #include "confdefs.h"
3382 #include <sys/types.h>
3383 #include <sys/wait.h>
3384 #ifndef WEXITSTATUS
3385 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3386 #endif
3387 #ifndef WIFEXITED
3388 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3389 #endif
3390 int main() {
3391 int s;
3392 wait (&s);
3393 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3394 ; return 0; }
3395 EOF
3396 if { (eval echo configure:3397: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3397   rm -rf conftest*
3398   ac_cv_header_sys_wait_h=yes
3399 else
3400   echo "configure: failed program was:" >&5
3401   cat conftest.$ac_ext >&5
3402   rm -rf conftest*
3403   ac_cv_header_sys_wait_h=no
3404 fi
3405 rm -f conftest*
3406
3407 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3408 if test $ac_cv_header_sys_wait_h = yes; then
3409   { test "$extra_verbose" = "yes" && cat << \EOF
3410     Defining HAVE_SYS_WAIT_H
3411 EOF
3412 cat >> confdefs.h <<\EOF
3413 #define HAVE_SYS_WAIT_H 1
3414 EOF
3415 }
3416
3417 fi
3418
3419 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3420 echo "configure:3421: checking for ANSI C header files" >&5
3421
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 #include <stdlib.h>
3426 #include <stdarg.h>
3427 #include <string.h>
3428 #include <float.h>
3429 EOF
3430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3431 { (eval echo configure:3432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3433 if test -z "$ac_err"; then
3434   rm -rf conftest*
3435   ac_cv_header_stdc=yes
3436 else
3437   echo "$ac_err" >&5
3438   echo "configure: failed program was:" >&5
3439   cat conftest.$ac_ext >&5
3440   rm -rf conftest*
3441   ac_cv_header_stdc=no
3442 fi
3443 rm -f conftest*
3444
3445 if test $ac_cv_header_stdc = yes; then
3446   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3447 cat > conftest.$ac_ext <<EOF
3448 #line 3449 "configure"
3449 #include "confdefs.h"
3450 #include <string.h>
3451 EOF
3452 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3453   egrep "memchr" >/dev/null 2>&1; then
3454   :
3455 else
3456   rm -rf conftest*
3457   ac_cv_header_stdc=no
3458 fi
3459 rm -f conftest*
3460
3461 fi
3462
3463 if test $ac_cv_header_stdc = yes; then
3464   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <stdlib.h>
3469 EOF
3470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3471   egrep "free" >/dev/null 2>&1; then
3472   :
3473 else
3474   rm -rf conftest*
3475   ac_cv_header_stdc=no
3476 fi
3477 rm -f conftest*
3478
3479 fi
3480
3481 if test $ac_cv_header_stdc = yes; then
3482   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3483 cat > conftest.$ac_ext <<EOF
3484 #line 3485 "configure"
3485 #include "confdefs.h"
3486 #include <ctype.h>
3487 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3488 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3489 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3490 int main () { int i; for (i = 0; i < 256; i++)
3491 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3492 exit (0); }
3493
3494 EOF
3495 if { (eval echo configure:3496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3496 then
3497   :
3498 else
3499   conftest_rc="$?"
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -fr conftest*
3503   ac_cv_header_stdc=no
3504 fi
3505 rm -fr conftest*
3506 fi
3507
3508 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3509 if test $ac_cv_header_stdc = yes; then
3510   { test "$extra_verbose" = "yes" && cat << \EOF
3511     Defining STDC_HEADERS
3512 EOF
3513 cat >> confdefs.h <<\EOF
3514 #define STDC_HEADERS 1
3515 EOF
3516 }
3517
3518 fi
3519
3520 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3521 echo "configure:3522: checking whether time.h and sys/time.h may both be included" >&5
3522
3523 cat > conftest.$ac_ext <<EOF
3524 #line 3525 "configure"
3525 #include "confdefs.h"
3526 #include <sys/types.h>
3527 #include <sys/time.h>
3528 #include <time.h>
3529 int main() {
3530 struct tm *tp;
3531 ; return 0; }
3532 EOF
3533 if { (eval echo configure:3534: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3534   rm -rf conftest*
3535   ac_cv_header_time=yes
3536 else
3537   echo "configure: failed program was:" >&5
3538   cat conftest.$ac_ext >&5
3539   rm -rf conftest*
3540   ac_cv_header_time=no
3541 fi
3542 rm -f conftest*
3543
3544 echo "$ac_t""$ac_cv_header_time" 1>&6
3545 if test $ac_cv_header_time = yes; then
3546   { test "$extra_verbose" = "yes" && cat << \EOF
3547     Defining TIME_WITH_SYS_TIME
3548 EOF
3549 cat >> confdefs.h <<\EOF
3550 #define TIME_WITH_SYS_TIME 1
3551 EOF
3552 }
3553
3554 fi
3555
3556 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3557 echo "configure:3558: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3558
3559 cat > conftest.$ac_ext <<EOF
3560 #line 3561 "configure"
3561 #include "confdefs.h"
3562 #include <sys/types.h>
3563 #include <signal.h>
3564 /* NetBSD declares sys_siglist in unistd.h.  */
3565 #ifdef HAVE_UNISTD_H
3566 #include <unistd.h>
3567 #endif
3568 int main() {
3569 char *msg = *(sys_siglist + 1);
3570 ; return 0; }
3571 EOF
3572 if { (eval echo configure:3573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3573   rm -rf conftest*
3574   ac_cv_decl_sys_siglist=yes
3575 else
3576   echo "configure: failed program was:" >&5
3577   cat conftest.$ac_ext >&5
3578   rm -rf conftest*
3579   ac_cv_decl_sys_siglist=no
3580 fi
3581 rm -f conftest*
3582
3583 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3584 if test $ac_cv_decl_sys_siglist = yes; then
3585   { test "$extra_verbose" = "yes" && cat << \EOF
3586     Defining SYS_SIGLIST_DECLARED
3587 EOF
3588 cat >> confdefs.h <<\EOF
3589 #define SYS_SIGLIST_DECLARED 1
3590 EOF
3591 }
3592
3593 fi
3594
3595
3596 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3597 echo "configure:3598: checking for struct utimbuf" >&5
3598 cat > conftest.$ac_ext <<EOF
3599 #line 3600 "configure"
3600 #include "confdefs.h"
3601 #ifdef TIME_WITH_SYS_TIME
3602 #include <sys/time.h>
3603 #include <time.h>
3604 #else
3605 #ifdef HAVE_SYS_TIME_H
3606 #include <sys/time.h>
3607 #else
3608 #include <time.h>
3609 #endif
3610 #endif
3611 #ifdef HAVE_UTIME_H
3612 #include <utime.h>
3613 #endif
3614 int main() {
3615 static struct utimbuf x; x.actime = x.modtime;
3616 ; return 0; }
3617 EOF
3618 if { (eval echo configure:3619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3619   rm -rf conftest*
3620   echo "$ac_t""yes" 1>&6
3621    { test "$extra_verbose" = "yes" && cat << \EOF
3622     Defining HAVE_STRUCT_UTIMBUF
3623 EOF
3624 cat >> confdefs.h <<\EOF
3625 #define HAVE_STRUCT_UTIMBUF 1
3626 EOF
3627 }
3628
3629 else
3630   echo "configure: failed program was:" >&5
3631   cat conftest.$ac_ext >&5
3632   rm -rf conftest*
3633   echo "$ac_t""no" 1>&6
3634 fi
3635 rm -f conftest*
3636
3637 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3638 echo "configure:3639: checking return type of signal handlers" >&5
3639
3640 cat > conftest.$ac_ext <<EOF
3641 #line 3642 "configure"
3642 #include "confdefs.h"
3643 #include <sys/types.h>
3644 #include <signal.h>
3645 #ifdef signal
3646 #undef signal
3647 #endif
3648 #ifdef __cplusplus
3649 extern "C" void (*signal (int, void (*)(int)))(int);
3650 #else
3651 void (*signal ()) ();
3652 #endif
3653
3654 int main() {
3655 int i;
3656 ; return 0; }
3657 EOF
3658 if { (eval echo configure:3659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3659   rm -rf conftest*
3660   ac_cv_type_signal=void
3661 else
3662   echo "configure: failed program was:" >&5
3663   cat conftest.$ac_ext >&5
3664   rm -rf conftest*
3665   ac_cv_type_signal=int
3666 fi
3667 rm -f conftest*
3668
3669 echo "$ac_t""$ac_cv_type_signal" 1>&6
3670 { test "$extra_verbose" = "yes" && cat << EOF
3671     Defining RETSIGTYPE = $ac_cv_type_signal
3672 EOF
3673 cat >> confdefs.h <<EOF
3674 #define RETSIGTYPE $ac_cv_type_signal
3675 EOF
3676 }
3677
3678
3679 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3680 echo "configure:3681: checking for size_t" >&5
3681
3682 cat > conftest.$ac_ext <<EOF
3683 #line 3684 "configure"
3684 #include "confdefs.h"
3685 #include <sys/types.h>
3686 #if STDC_HEADERS
3687 #include <stdlib.h>
3688 #include <stddef.h>
3689 #endif
3690 EOF
3691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3692   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3693   rm -rf conftest*
3694   ac_cv_type_size_t=yes
3695 else
3696   rm -rf conftest*
3697   ac_cv_type_size_t=no
3698 fi
3699 rm -f conftest*
3700
3701 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3702 if test $ac_cv_type_size_t = no; then
3703   { test "$extra_verbose" = "yes" && cat << \EOF
3704     Defining size_t = unsigned
3705 EOF
3706 cat >> confdefs.h <<\EOF
3707 #define size_t unsigned
3708 EOF
3709 }
3710
3711 fi
3712
3713 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3714 echo "configure:3715: checking for pid_t" >&5
3715
3716 cat > conftest.$ac_ext <<EOF
3717 #line 3718 "configure"
3718 #include "confdefs.h"
3719 #include <sys/types.h>
3720 #if STDC_HEADERS
3721 #include <stdlib.h>
3722 #include <stddef.h>
3723 #endif
3724 EOF
3725 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3726   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3727   rm -rf conftest*
3728   ac_cv_type_pid_t=yes
3729 else
3730   rm -rf conftest*
3731   ac_cv_type_pid_t=no
3732 fi
3733 rm -f conftest*
3734
3735 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3736 if test $ac_cv_type_pid_t = no; then
3737   { test "$extra_verbose" = "yes" && cat << \EOF
3738     Defining pid_t = int
3739 EOF
3740 cat >> confdefs.h <<\EOF
3741 #define pid_t int
3742 EOF
3743 }
3744
3745 fi
3746
3747 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3748 echo "configure:3749: checking for uid_t in sys/types.h" >&5
3749
3750 cat > conftest.$ac_ext <<EOF
3751 #line 3752 "configure"
3752 #include "confdefs.h"
3753 #include <sys/types.h>
3754 EOF
3755 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3756   egrep "uid_t" >/dev/null 2>&1; then
3757   rm -rf conftest*
3758   ac_cv_type_uid_t=yes
3759 else
3760   rm -rf conftest*
3761   ac_cv_type_uid_t=no
3762 fi
3763 rm -f conftest*
3764
3765
3766 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3767 if test $ac_cv_type_uid_t = no; then
3768   { test "$extra_verbose" = "yes" && cat << \EOF
3769     Defining uid_t = int
3770 EOF
3771 cat >> confdefs.h <<\EOF
3772 #define uid_t int
3773 EOF
3774 }
3775
3776   { test "$extra_verbose" = "yes" && cat << \EOF
3777     Defining gid_t = int
3778 EOF
3779 cat >> confdefs.h <<\EOF
3780 #define gid_t int
3781 EOF
3782 }
3783
3784 fi
3785
3786 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3787 echo "configure:3788: checking for mode_t" >&5
3788
3789 cat > conftest.$ac_ext <<EOF
3790 #line 3791 "configure"
3791 #include "confdefs.h"
3792 #include <sys/types.h>
3793 #if STDC_HEADERS
3794 #include <stdlib.h>
3795 #include <stddef.h>
3796 #endif
3797 EOF
3798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3799   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3800   rm -rf conftest*
3801   ac_cv_type_mode_t=yes
3802 else
3803   rm -rf conftest*
3804   ac_cv_type_mode_t=no
3805 fi
3806 rm -f conftest*
3807
3808 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3809 if test $ac_cv_type_mode_t = no; then
3810   { test "$extra_verbose" = "yes" && cat << \EOF
3811     Defining mode_t = int
3812 EOF
3813 cat >> confdefs.h <<\EOF
3814 #define mode_t int
3815 EOF
3816 }
3817
3818 fi
3819
3820 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3821 echo "configure:3822: checking for off_t" >&5
3822
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3826 #include <sys/types.h>
3827 #if STDC_HEADERS
3828 #include <stdlib.h>
3829 #include <stddef.h>
3830 #endif
3831 EOF
3832 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3833   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3834   rm -rf conftest*
3835   ac_cv_type_off_t=yes
3836 else
3837   rm -rf conftest*
3838   ac_cv_type_off_t=no
3839 fi
3840 rm -f conftest*
3841
3842 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3843 if test $ac_cv_type_off_t = no; then
3844   { test "$extra_verbose" = "yes" && cat << \EOF
3845     Defining off_t = long
3846 EOF
3847 cat >> confdefs.h <<\EOF
3848 #define off_t long
3849 EOF
3850 }
3851
3852 fi
3853
3854 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3855 echo "configure:3856: checking for ssize_t" >&5
3856
3857 cat > conftest.$ac_ext <<EOF
3858 #line 3859 "configure"
3859 #include "confdefs.h"
3860 #include <sys/types.h>
3861 #if STDC_HEADERS
3862 #include <stdlib.h>
3863 #include <stddef.h>
3864 #endif
3865 EOF
3866 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3867   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3868   rm -rf conftest*
3869   ac_cv_type_ssize_t=yes
3870 else
3871   rm -rf conftest*
3872   ac_cv_type_ssize_t=no
3873 fi
3874 rm -f conftest*
3875
3876 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3877 if test $ac_cv_type_ssize_t = no; then
3878   { test "$extra_verbose" = "yes" && cat << \EOF
3879     Defining ssize_t = int
3880 EOF
3881 cat >> confdefs.h <<\EOF
3882 #define ssize_t int
3883 EOF
3884 }
3885
3886 fi
3887
3888
3889 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3890 echo "configure:3891: checking for struct timeval" >&5
3891 cat > conftest.$ac_ext <<EOF
3892 #line 3893 "configure"
3893 #include "confdefs.h"
3894 #ifdef TIME_WITH_SYS_TIME
3895 #include <sys/time.h>
3896 #include <time.h>
3897 #else
3898 #ifdef HAVE_SYS_TIME_H
3899 #include <sys/time.h>
3900 #else
3901 #include <time.h>
3902 #endif
3903 #endif
3904 int main() {
3905 static struct timeval x; x.tv_sec = x.tv_usec;
3906 ; return 0; }
3907 EOF
3908 if { (eval echo configure:3909: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3909   rm -rf conftest*
3910   echo "$ac_t""yes" 1>&6
3911   HAVE_TIMEVAL=yes
3912   { test "$extra_verbose" = "yes" && cat << \EOF
3913     Defining HAVE_TIMEVAL
3914 EOF
3915 cat >> confdefs.h <<\EOF
3916 #define HAVE_TIMEVAL 1
3917 EOF
3918 }
3919
3920 else
3921   echo "configure: failed program was:" >&5
3922   cat conftest.$ac_ext >&5
3923   rm -rf conftest*
3924   echo "$ac_t""no" 1>&6
3925    HAVE_TIMEVAL=no
3926 fi
3927 rm -f conftest*
3928
3929 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3930 echo "configure:3931: checking whether struct tm is in sys/time.h or time.h" >&5
3931
3932 cat > conftest.$ac_ext <<EOF
3933 #line 3934 "configure"
3934 #include "confdefs.h"
3935 #include <sys/types.h>
3936 #include <time.h>
3937 int main() {
3938 struct tm *tp; tp->tm_sec;
3939 ; return 0; }
3940 EOF
3941 if { (eval echo configure:3942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3942   rm -rf conftest*
3943   ac_cv_struct_tm=time.h
3944 else
3945   echo "configure: failed program was:" >&5
3946   cat conftest.$ac_ext >&5
3947   rm -rf conftest*
3948   ac_cv_struct_tm=sys/time.h
3949 fi
3950 rm -f conftest*
3951
3952 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3953 if test $ac_cv_struct_tm = sys/time.h; then
3954   { test "$extra_verbose" = "yes" && cat << \EOF
3955     Defining TM_IN_SYS_TIME
3956 EOF
3957 cat >> confdefs.h <<\EOF
3958 #define TM_IN_SYS_TIME 1
3959 EOF
3960 }
3961
3962 fi
3963
3964 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3965 echo "configure:3966: checking for tm_zone in struct tm" >&5
3966
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3970 #include <sys/types.h>
3971 #include <$ac_cv_struct_tm>
3972 int main() {
3973 struct tm tm; tm.tm_zone;
3974 ; return 0; }
3975 EOF
3976 if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3977   rm -rf conftest*
3978   ac_cv_struct_tm_zone=yes
3979 else
3980   echo "configure: failed program was:" >&5
3981   cat conftest.$ac_ext >&5
3982   rm -rf conftest*
3983   ac_cv_struct_tm_zone=no
3984 fi
3985 rm -f conftest*
3986
3987 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3988 if test "$ac_cv_struct_tm_zone" = yes; then
3989   { test "$extra_verbose" = "yes" && cat << \EOF
3990     Defining HAVE_TM_ZONE
3991 EOF
3992 cat >> confdefs.h <<\EOF
3993 #define HAVE_TM_ZONE 1
3994 EOF
3995 }
3996
3997 else
3998   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3999 echo "configure:4000: checking for tzname" >&5
4000
4001 cat > conftest.$ac_ext <<EOF
4002 #line 4003 "configure"
4003 #include "confdefs.h"
4004 #include <time.h>
4005 #ifndef tzname /* For SGI.  */
4006 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4007 #endif
4008 int main() {
4009 atoi(*tzname);
4010 ; return 0; }
4011 EOF
4012 if { (eval echo configure:4013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4013   rm -rf conftest*
4014   ac_cv_var_tzname=yes
4015 else
4016   echo "configure: failed program was:" >&5
4017   cat conftest.$ac_ext >&5
4018   rm -rf conftest*
4019   ac_cv_var_tzname=no
4020 fi
4021 rm -f conftest*
4022
4023 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4024   if test $ac_cv_var_tzname = yes; then
4025     { test "$extra_verbose" = "yes" && cat << \EOF
4026     Defining HAVE_TZNAME
4027 EOF
4028 cat >> confdefs.h <<\EOF
4029 #define HAVE_TZNAME 1
4030 EOF
4031 }
4032
4033   fi
4034 fi
4035
4036
4037 echo $ac_n "checking for working const""... $ac_c" 1>&6
4038 echo "configure:4039: checking for working const" >&5
4039
4040 cat > conftest.$ac_ext <<EOF
4041 #line 4042 "configure"
4042 #include "confdefs.h"
4043
4044 int main() {
4045
4046 /* Ultrix mips cc rejects this.  */
4047 typedef int charset[2]; const charset x;
4048 /* SunOS 4.1.1 cc rejects this.  */
4049 char const *const *ccp;
4050 char **p;
4051 /* NEC SVR4.0.2 mips cc rejects this.  */
4052 struct point {int x, y;};
4053 static struct point const zero = {0,0};
4054 /* AIX XL C 1.02.0.0 rejects this.
4055    It does not let you subtract one const X* pointer from another in an arm
4056    of an if-expression whose if-part is not a constant expression */
4057 const char *g = "string";
4058 ccp = &g + (g ? g-g : 0);
4059 /* HPUX 7.0 cc rejects these. */
4060 ++ccp;
4061 p = (char**) ccp;
4062 ccp = (char const *const *) p;
4063 { /* SCO 3.2v4 cc rejects this.  */
4064   char *t;
4065   char const *s = 0 ? (char *) 0 : (char const *) 0;
4066
4067   *t++ = 0;
4068 }
4069 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4070   int x[] = {25, 17};
4071   const int *foo = &x[0];
4072   ++foo;
4073 }
4074 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4075   typedef const int *iptr;
4076   iptr p = 0;
4077   ++p;
4078 }
4079 { /* AIX XL C 1.02.0.0 rejects this saying
4080      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4081   struct s { int j; const int *ap[3]; };
4082   struct s *b; b->j = 5;
4083 }
4084 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4085   const int foo = 10;
4086 }
4087
4088 ; return 0; }
4089 EOF
4090 if { (eval echo configure:4091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4091   rm -rf conftest*
4092   ac_cv_c_const=yes
4093 else
4094   echo "configure: failed program was:" >&5
4095   cat conftest.$ac_ext >&5
4096   rm -rf conftest*
4097   ac_cv_c_const=no
4098 fi
4099 rm -f conftest*
4100
4101 echo "$ac_t""$ac_cv_c_const" 1>&6
4102 if test $ac_cv_c_const = no; then
4103   { test "$extra_verbose" = "yes" && cat << \EOF
4104     Defining const = 
4105 EOF
4106 cat >> confdefs.h <<\EOF
4107 #define const 
4108 EOF
4109 }
4110
4111 fi
4112
4113
4114 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4115 echo "configure:4116: checking whether ${MAKE-make} sets \${MAKE}" >&5
4116 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4117
4118 cat > conftestmake <<\EOF
4119 all:
4120         @echo 'ac_maketemp="${MAKE}"'
4121 EOF
4122 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4123 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4124 if test -n "$ac_maketemp"; then
4125   eval ac_cv_prog_make_${ac_make}_set=yes
4126 else
4127   eval ac_cv_prog_make_${ac_make}_set=no
4128 fi
4129 rm -f conftestmake
4130 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4131   echo "$ac_t""yes" 1>&6
4132   SET_MAKE=
4133 else
4134   echo "$ac_t""no" 1>&6
4135   SET_MAKE="MAKE=${MAKE-make}"
4136 fi
4137
4138
4139 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4140 echo "configure:4141: checking whether byte ordering is bigendian" >&5
4141
4142 ac_cv_c_bigendian=unknown
4143 # See if sys/param.h defines the BYTE_ORDER macro.
4144 cat > conftest.$ac_ext <<EOF
4145 #line 4146 "configure"
4146 #include "confdefs.h"
4147 #include <sys/types.h>
4148 #include <sys/param.h>
4149 int main() {
4150
4151 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4152  bogus endian macros
4153 #endif
4154 ; return 0; }
4155 EOF
4156 if { (eval echo configure:4157: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4157   rm -rf conftest*
4158   # It does; now see whether it defined to BIG_ENDIAN or not.
4159 cat > conftest.$ac_ext <<EOF
4160 #line 4161 "configure"
4161 #include "confdefs.h"
4162 #include <sys/types.h>
4163 #include <sys/param.h>
4164 int main() {
4165
4166 #if BYTE_ORDER != BIG_ENDIAN
4167  not big endian
4168 #endif
4169 ; return 0; }
4170 EOF
4171 if { (eval echo configure:4172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4172   rm -rf conftest*
4173   ac_cv_c_bigendian=yes
4174 else
4175   echo "configure: failed program was:" >&5
4176   cat conftest.$ac_ext >&5
4177   rm -rf conftest*
4178   ac_cv_c_bigendian=no
4179 fi
4180 rm -f conftest*
4181 else
4182   echo "configure: failed program was:" >&5
4183   cat conftest.$ac_ext >&5
4184 fi
4185 rm -f conftest*
4186 if test $ac_cv_c_bigendian = unknown; then
4187 cat > conftest.$ac_ext <<EOF
4188 #line 4189 "configure"
4189 #include "confdefs.h"
4190 main () {
4191   /* Are we little or big endian?  From Harbison&Steele.  */
4192   union
4193   {
4194     long l;
4195     char c[sizeof (long)];
4196   } u;
4197   u.l = 1;
4198   exit (u.c[sizeof (long) - 1] == 1);
4199 }
4200 EOF
4201 if { (eval echo configure:4202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4202 then
4203   ac_cv_c_bigendian=no
4204 else
4205   conftest_rc="$?"
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208   rm -fr conftest*
4209   ac_cv_c_bigendian=yes
4210 fi
4211 rm -fr conftest*
4212 fi
4213
4214 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4215 if test $ac_cv_c_bigendian = yes; then
4216   { test "$extra_verbose" = "yes" && cat << \EOF
4217     Defining WORDS_BIGENDIAN
4218 EOF
4219 cat >> confdefs.h <<\EOF
4220 #define WORDS_BIGENDIAN 1
4221 EOF
4222 }
4223
4224 fi
4225
4226
4227 echo $ac_n "checking size of short""... $ac_c" 1>&6
4228 echo "configure:4229: checking size of short" >&5
4229
4230 cat > conftest.$ac_ext <<EOF
4231 #line 4232 "configure"
4232 #include "confdefs.h"
4233 #include <stdio.h>
4234 main()
4235 {
4236   FILE *f=fopen("conftestval", "w");
4237   if (!f) exit(1);
4238   fprintf(f, "%d\n", sizeof(short));
4239   exit(0);
4240 }
4241 EOF
4242 if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4243 then
4244   ac_cv_sizeof_short=`cat conftestval`
4245 else
4246   conftest_rc="$?"
4247   echo "configure: failed program was:" >&5
4248   cat conftest.$ac_ext >&5
4249   rm -fr conftest*
4250   ac_cv_sizeof_short=0
4251 fi
4252 rm -fr conftest*
4253 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4254 { test "$extra_verbose" = "yes" && cat << EOF
4255     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4256 EOF
4257 cat >> confdefs.h <<EOF
4258 #define SIZEOF_SHORT $ac_cv_sizeof_short
4259 EOF
4260 }
4261
4262
4263 if test "$ac_cv_sizeof_short" = 0; then
4264   echo ""
4265   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4266   echo "*** PANIC *** Please examine config.log for compilation errors."
4267   exit 1
4268 fi
4269 echo $ac_n "checking size of int""... $ac_c" 1>&6
4270 echo "configure:4271: checking size of int" >&5
4271
4272 cat > conftest.$ac_ext <<EOF
4273 #line 4274 "configure"
4274 #include "confdefs.h"
4275 #include <stdio.h>
4276 main()
4277 {
4278   FILE *f=fopen("conftestval", "w");
4279   if (!f) exit(1);
4280   fprintf(f, "%d\n", sizeof(int));
4281   exit(0);
4282 }
4283 EOF
4284 if { (eval echo configure:4285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4285 then
4286   ac_cv_sizeof_int=`cat conftestval`
4287 else
4288   conftest_rc="$?"
4289   echo "configure: failed program was:" >&5
4290   cat conftest.$ac_ext >&5
4291   rm -fr conftest*
4292   ac_cv_sizeof_int=0
4293 fi
4294 rm -fr conftest*
4295 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4296 { test "$extra_verbose" = "yes" && cat << EOF
4297     Defining SIZEOF_INT = $ac_cv_sizeof_int
4298 EOF
4299 cat >> confdefs.h <<EOF
4300 #define SIZEOF_INT $ac_cv_sizeof_int
4301 EOF
4302 }
4303
4304
4305 echo $ac_n "checking size of long""... $ac_c" 1>&6
4306 echo "configure:4307: checking size of long" >&5
4307
4308 cat > conftest.$ac_ext <<EOF
4309 #line 4310 "configure"
4310 #include "confdefs.h"
4311 #include <stdio.h>
4312 main()
4313 {
4314   FILE *f=fopen("conftestval", "w");
4315   if (!f) exit(1);
4316   fprintf(f, "%d\n", sizeof(long));
4317   exit(0);
4318 }
4319 EOF
4320 if { (eval echo configure:4321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4321 then
4322   ac_cv_sizeof_long=`cat conftestval`
4323 else
4324   conftest_rc="$?"
4325   echo "configure: failed program was:" >&5
4326   cat conftest.$ac_ext >&5
4327   rm -fr conftest*
4328   ac_cv_sizeof_long=0
4329 fi
4330 rm -fr conftest*
4331 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4332 { test "$extra_verbose" = "yes" && cat << EOF
4333     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4334 EOF
4335 cat >> confdefs.h <<EOF
4336 #define SIZEOF_LONG $ac_cv_sizeof_long
4337 EOF
4338 }
4339
4340
4341 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4342 echo "configure:4343: checking size of long long" >&5
4343
4344 cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 #include <stdio.h>
4348 main()
4349 {
4350   FILE *f=fopen("conftestval", "w");
4351   if (!f) exit(1);
4352   fprintf(f, "%d\n", sizeof(long long));
4353   exit(0);
4354 }
4355 EOF
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4357 then
4358   ac_cv_sizeof_long_long=`cat conftestval`
4359 else
4360   conftest_rc="$?"
4361   echo "configure: failed program was:" >&5
4362   cat conftest.$ac_ext >&5
4363   rm -fr conftest*
4364   ac_cv_sizeof_long_long=0
4365 fi
4366 rm -fr conftest*
4367 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4368 { test "$extra_verbose" = "yes" && cat << EOF
4369     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4370 EOF
4371 cat >> confdefs.h <<EOF
4372 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4373 EOF
4374 }
4375
4376
4377 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4378 echo "configure:4379: checking size of void *" >&5
4379
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 #include <stdio.h>
4384 main()
4385 {
4386   FILE *f=fopen("conftestval", "w");
4387   if (!f) exit(1);
4388   fprintf(f, "%d\n", sizeof(void *));
4389   exit(0);
4390 }
4391 EOF
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4393 then
4394   ac_cv_sizeof_void_p=`cat conftestval`
4395 else
4396   conftest_rc="$?"
4397   echo "configure: failed program was:" >&5
4398   cat conftest.$ac_ext >&5
4399   rm -fr conftest*
4400   ac_cv_sizeof_void_p=0
4401 fi
4402 rm -fr conftest*
4403 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4404 { test "$extra_verbose" = "yes" && cat << EOF
4405     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4406 EOF
4407 cat >> confdefs.h <<EOF
4408 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4409 EOF
4410 }
4411
4412
4413
4414 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4415 echo "configure:4416: checking for long file names" >&5
4416
4417 ac_cv_sys_long_file_names=yes
4418 # Test for long file names in all the places we know might matter:
4419 #      .                the current directory, where building will happen
4420 #      $prefix/lib      where we will be installing things
4421 #      $exec_prefix/lib likewise
4422 # eval it to expand exec_prefix.
4423 #      $TMPDIR          if set, where it might want to write temporary files
4424 # if $TMPDIR is not set:
4425 #      /tmp             where it might want to write temporary files
4426 #      /var/tmp         likewise
4427 #      /usr/tmp         likewise
4428 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4429   ac_tmpdirs="$TMPDIR"
4430 else
4431   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4432 fi
4433 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4434   test -d $ac_dir || continue
4435   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4436   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4437   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4438   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4439   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4440     ac_cv_sys_long_file_names=no
4441     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4442     break
4443   fi
4444   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4445 done
4446
4447 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4448 if test $ac_cv_sys_long_file_names = yes; then
4449   { test "$extra_verbose" = "yes" && cat << \EOF
4450     Defining HAVE_LONG_FILE_NAMES
4451 EOF
4452 cat >> confdefs.h <<\EOF
4453 #define HAVE_LONG_FILE_NAMES 1
4454 EOF
4455 }
4456
4457 fi
4458
4459
4460 echo $ac_n "checking for sin""... $ac_c" 1>&6
4461 echo "configure:4462: checking for sin" >&5
4462
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4466 /* System header to define __stub macros and hopefully few prototypes,
4467     which can conflict with char sin(); below.  */
4468 #include <assert.h>
4469 /* Override any gcc2 internal prototype to avoid an error.  */
4470 /* We use char because int might match the return type of a gcc2
4471     builtin and then its argument prototype would still apply.  */
4472 char sin();
4473
4474 int main() {
4475
4476 /* The GNU C library defines this for functions which it implements
4477     to always fail with ENOSYS.  Some functions are actually named
4478     something starting with __ and the normal name is an alias.  */
4479 #if defined (__stub_sin) || defined (__stub___sin)
4480 choke me
4481 #else
4482 sin();
4483 #endif
4484
4485 ; return 0; }
4486 EOF
4487 if { (eval echo configure:4488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4488   rm -rf conftest*
4489   eval "ac_cv_func_sin=yes"
4490 else
4491   echo "configure: failed program was:" >&5
4492   cat conftest.$ac_ext >&5
4493   rm -rf conftest*
4494   eval "ac_cv_func_sin=no"
4495 fi
4496 rm -f conftest*
4497
4498 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4499   echo "$ac_t""yes" 1>&6
4500   :
4501 else
4502   echo "$ac_t""no" 1>&6
4503
4504 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4505 echo "configure:4506: checking for sin in -lm" >&5
4506 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4507
4508 xe_check_libs=" -lm "
4509 cat > conftest.$ac_ext <<EOF
4510 #line 4511 "configure"
4511 #include "confdefs.h"
4512 /* Override any gcc2 internal prototype to avoid an error.  */
4513 /* We use char because int might match the return type of a gcc2
4514     builtin and then its argument prototype would still apply.  */
4515 char sin();
4516
4517 int main() {
4518 sin()
4519 ; return 0; }
4520 EOF
4521 if { (eval echo configure:4522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4522   rm -rf conftest*
4523   eval "ac_cv_lib_$ac_lib_var=yes"
4524 else
4525   echo "configure: failed program was:" >&5
4526   cat conftest.$ac_ext >&5
4527   rm -rf conftest*
4528   eval "ac_cv_lib_$ac_lib_var=no"
4529 fi
4530 rm -f conftest*
4531 xe_check_libs=""
4532
4533 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4534   echo "$ac_t""yes" 1>&6
4535     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4536     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4537   { test "$extra_verbose" = "yes" && cat << EOF
4538     Defining $ac_tr_lib
4539 EOF
4540 cat >> confdefs.h <<EOF
4541 #define $ac_tr_lib 1
4542 EOF
4543 }
4544
4545   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4546
4547 else
4548   echo "$ac_t""no" 1>&6
4549 fi
4550
4551
4552 fi
4553
4554
4555 { test "$extra_verbose" = "yes" && cat << \EOF
4556     Defining LISP_FLOAT_TYPE
4557 EOF
4558 cat >> confdefs.h <<\EOF
4559 #define LISP_FLOAT_TYPE 1
4560 EOF
4561 }
4562
4563
4564 cat > conftest.$ac_ext <<EOF
4565 #line 4566 "configure"
4566 #include "confdefs.h"
4567 #include <math.h>
4568 int main() {
4569 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4570 ; return 0; }
4571 EOF
4572 if { (eval echo configure:4573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4573   rm -rf conftest*
4574   { test "$extra_verbose" = "yes" && cat << \EOF
4575     Defining HAVE_INVERSE_HYPERBOLIC
4576 EOF
4577 cat >> confdefs.h <<\EOF
4578 #define HAVE_INVERSE_HYPERBOLIC 1
4579 EOF
4580 }
4581
4582 else
4583   echo "configure: failed program was:" >&5
4584   cat conftest.$ac_ext >&5
4585 fi
4586 rm -f conftest*
4587
4588 echo "checking type of mail spool file locking" 1>&6
4589 echo "configure:4590: checking type of mail spool file locking" >&5
4590 for ac_func in lockf flock
4591 do
4592 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_func" >&5
4594
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 /* System header to define __stub macros and hopefully few prototypes,
4599     which can conflict with char $ac_func(); below.  */
4600 #include <assert.h>
4601 /* Override any gcc2 internal prototype to avoid an error.  */
4602 /* We use char because int might match the return type of a gcc2
4603     builtin and then its argument prototype would still apply.  */
4604 char $ac_func();
4605
4606 int main() {
4607
4608 /* The GNU C library defines this for functions which it implements
4609     to always fail with ENOSYS.  Some functions are actually named
4610     something starting with __ and the normal name is an alias.  */
4611 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4612 choke me
4613 #else
4614 $ac_func();
4615 #endif
4616
4617 ; return 0; }
4618 EOF
4619 if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4620   rm -rf conftest*
4621   eval "ac_cv_func_$ac_func=yes"
4622 else
4623   echo "configure: failed program was:" >&5
4624   cat conftest.$ac_ext >&5
4625   rm -rf conftest*
4626   eval "ac_cv_func_$ac_func=no"
4627 fi
4628 rm -f conftest*
4629
4630 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4631   echo "$ac_t""yes" 1>&6
4632     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4633   { test "$extra_verbose" = "yes" && cat << EOF
4634     Defining $ac_tr_func
4635 EOF
4636 cat >> confdefs.h <<EOF
4637 #define $ac_tr_func 1
4638 EOF
4639 }
4640  
4641 else
4642   echo "$ac_t""no" 1>&6
4643 fi
4644 done
4645
4646 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4647 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4648 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4649 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4650     Defining MAIL_LOCK_LOCKF
4651 EOF
4652 cat >> confdefs.h <<\EOF
4653 #define MAIL_LOCK_LOCKF 1
4654 EOF
4655 }
4656
4657 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4658     Defining MAIL_LOCK_FLOCK
4659 EOF
4660 cat >> confdefs.h <<\EOF
4661 #define MAIL_LOCK_FLOCK 1
4662 EOF
4663 }
4664
4665 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4666     Defining MAIL_LOCK_LOCKING
4667 EOF
4668 cat >> confdefs.h <<\EOF
4669 #define MAIL_LOCK_LOCKING 1
4670 EOF
4671 }
4672
4673 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4674     Defining MAIL_LOCK_DOT
4675 EOF
4676 cat >> confdefs.h <<\EOF
4677 #define MAIL_LOCK_DOT 1
4678 EOF
4679 }
4680
4681 fi
4682 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4683   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4684 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4685   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4686 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4687   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4688
4689 case "$opsys" in decosf*)
4690   
4691 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4692 echo "configure:4693: checking for cma_open in -lpthreads" >&5
4693 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4694
4695 xe_check_libs=" -lpthreads "
4696 cat > conftest.$ac_ext <<EOF
4697 #line 4698 "configure"
4698 #include "confdefs.h"
4699 /* Override any gcc2 internal prototype to avoid an error.  */
4700 /* We use char because int might match the return type of a gcc2
4701     builtin and then its argument prototype would still apply.  */
4702 char cma_open();
4703
4704 int main() {
4705 cma_open()
4706 ; return 0; }
4707 EOF
4708 if { (eval echo configure:4709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4709   rm -rf conftest*
4710   eval "ac_cv_lib_$ac_lib_var=yes"
4711 else
4712   echo "configure: failed program was:" >&5
4713   cat conftest.$ac_ext >&5
4714   rm -rf conftest*
4715   eval "ac_cv_lib_$ac_lib_var=no"
4716 fi
4717 rm -f conftest*
4718 xe_check_libs=""
4719
4720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4721   echo "$ac_t""yes" 1>&6
4722     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4723     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4724   { test "$extra_verbose" = "yes" && cat << EOF
4725     Defining $ac_tr_lib
4726 EOF
4727 cat >> confdefs.h <<EOF
4728 #define $ac_tr_lib 1
4729 EOF
4730 }
4731
4732   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4733
4734 else
4735   echo "$ac_t""no" 1>&6
4736 fi
4737
4738
4739   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4740     c_switch_site="$c_switch_site -threads" ;;
4741 esac
4742
4743 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4744 echo "configure:4745: checking whether the -xildoff compiler flag is required" >&5
4745 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4746   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4747     then echo "$ac_t""no" 1>&6;
4748     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
4749   fi
4750   else echo "$ac_t""no" 1>&6
4751 fi
4752
4753 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4754   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4755 echo "configure:4756: checking for \"-z ignore\" linker flag" >&5
4756   case "`ld -h 2>&1`" in
4757     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4758       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4759     *) echo "$ac_t""no" 1>&6 ;;
4760   esac
4761 fi
4762
4763
4764 echo "checking "for specified window system"" 1>&6
4765 echo "configure:4766: checking "for specified window system"" >&5
4766
4767 if test "$with_x11" != "no"; then
4768     test "$x_includes $x_libraries" != "NONE NONE" && \
4769    window_system=x11 with_x11=yes
4770
4771         
4772       if test "$x_includes $x_libraries" = "NONE NONE" \
4773     -a -n "$OPENWINHOME" \
4774     -a "$OPENWINHOME" != "/usr/openwin" \
4775     -a -d "$OPENWINHOME"; then
4776       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4777       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4778       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4779   fi
4780
4781   if test "$x_includes" = "NONE"; then
4782                     for dir in "/usr/X11" "/usr/X11R6"; do
4783       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4784     done
4785   fi
4786
4787   if test "$x_libraries" = "NONE"; then
4788     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4789       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4790     done
4791   fi
4792
4793   # If we find X, set shell vars x_includes and x_libraries to the
4794 # paths, otherwise set no_x=yes.
4795 # Uses ac_ vars as temps to allow command line to override cache and checks.
4796 # --without-x overrides everything else, but does not touch the cache.
4797 echo $ac_n "checking for X""... $ac_c" 1>&6
4798 echo "configure:4799: checking for X" >&5
4799
4800 # Check whether --with-x or --without-x was given.
4801 if test "${with_x+set}" = set; then
4802   withval="$with_x"
4803   :
4804 fi
4805
4806 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4807 if test "x$with_x" = xno; then
4808   # The user explicitly disabled X.
4809   have_x=disabled
4810 else
4811   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4812     # Both variables are already set.
4813     have_x=yes
4814   else
4815
4816 # One or both of the vars are not set, and there is no cached value.
4817 ac_x_includes=NO ac_x_libraries=NO
4818 rm -fr conftestdir
4819 if mkdir conftestdir; then
4820   cd conftestdir
4821   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4822   cat > Imakefile <<'EOF'
4823 acfindx:
4824         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4825 EOF
4826   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4827     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4828     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4829     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4830     for ac_extension in a so sl; do
4831       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4832         test -f $ac_im_libdir/libX11.$ac_extension; then
4833         ac_im_usrlibdir=$ac_im_libdir; break
4834       fi
4835     done
4836     # Screen out bogus values from the imake configuration.  They are
4837     # bogus both because they are the default anyway, and because
4838     # using them would break gcc on systems where it needs fixed includes.
4839     case "$ac_im_incroot" in
4840         /usr/include) ;;
4841         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4842     esac
4843     case "$ac_im_usrlibdir" in
4844         /usr/lib | /lib) ;;
4845         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4846     esac
4847   fi
4848   cd ..
4849   rm -fr conftestdir
4850 fi
4851
4852 if test "$ac_x_includes" = NO; then
4853   # Guess where to find include files, by looking for this one X11 .h file.
4854   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4855
4856   # First, try using that file with no special directory specified.
4857 cat > conftest.$ac_ext <<EOF
4858 #line 4859 "configure"
4859 #include "confdefs.h"
4860 #include <$x_direct_test_include>
4861 EOF
4862 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4863 { (eval echo configure:4864: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4864 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4865 if test -z "$ac_err"; then
4866   rm -rf conftest*
4867   # We can compile using X headers with no special include directory.
4868 ac_x_includes=
4869 else
4870   echo "$ac_err" >&5
4871   echo "configure: failed program was:" >&5
4872   cat conftest.$ac_ext >&5
4873   rm -rf conftest*
4874   # Look for the header file in a standard set of common directories.
4875 # Check X11 before X11Rn because it is often a symlink to the current release.
4876   for ac_dir in               \
4877     /usr/X11/include          \
4878     /usr/X11R6/include        \
4879     /usr/X11R5/include        \
4880     /usr/X11R4/include        \
4881                               \
4882     /usr/include/X11          \
4883     /usr/include/X11R6        \
4884     /usr/include/X11R5        \
4885     /usr/include/X11R4        \
4886                               \
4887     /usr/local/X11/include    \
4888     /usr/local/X11R6/include  \
4889     /usr/local/X11R5/include  \
4890     /usr/local/X11R4/include  \
4891                               \
4892     /usr/local/include/X11    \
4893     /usr/local/include/X11R6  \
4894     /usr/local/include/X11R5  \
4895     /usr/local/include/X11R4  \
4896                               \
4897     /usr/X386/include         \
4898     /usr/x386/include         \
4899     /usr/XFree86/include/X11  \
4900                               \
4901     /usr/include              \
4902     /usr/local/include        \
4903     /usr/unsupported/include  \
4904     /usr/athena/include       \
4905     /usr/local/x11r5/include  \
4906     /usr/lpp/Xamples/include  \
4907                               \
4908     /usr/openwin/include      \
4909     /usr/openwin/share/include \
4910     ; \
4911   do
4912     if test -r "$ac_dir/$x_direct_test_include"; then
4913       ac_x_includes=$ac_dir
4914       break
4915     fi
4916   done
4917 fi
4918 rm -f conftest*
4919 fi # $ac_x_includes = NO
4920
4921 if test "$ac_x_libraries" = NO; then
4922   # Check for the libraries.
4923
4924   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4925   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4926
4927   # See if we find them without any special options.
4928   # Don't add to $LIBS permanently.
4929   ac_save_LIBS="$LIBS"
4930   LIBS="-l$x_direct_test_library $LIBS"
4931 cat > conftest.$ac_ext <<EOF
4932 #line 4933 "configure"
4933 #include "confdefs.h"
4934
4935 int main() {
4936 ${x_direct_test_function}()
4937 ; return 0; }
4938 EOF
4939 if { (eval echo configure:4940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4940   rm -rf conftest*
4941   LIBS="$ac_save_LIBS"
4942 # We can link X programs with no special library path.
4943 ac_x_libraries=
4944 else
4945   echo "configure: failed program was:" >&5
4946   cat conftest.$ac_ext >&5
4947   rm -rf conftest*
4948   LIBS="$ac_save_LIBS"
4949 # First see if replacing the include by lib works.
4950 # Check X11 before X11Rn because it is often a symlink to the current release.
4951 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4952     /usr/X11/lib          \
4953     /usr/X11R6/lib        \
4954     /usr/X11R5/lib        \
4955     /usr/X11R4/lib        \
4956                           \
4957     /usr/lib/X11          \
4958     /usr/lib/X11R6        \
4959     /usr/lib/X11R5        \
4960     /usr/lib/X11R4        \
4961                           \
4962     /usr/local/X11/lib    \
4963     /usr/local/X11R6/lib  \
4964     /usr/local/X11R5/lib  \
4965     /usr/local/X11R4/lib  \
4966                           \
4967     /usr/local/lib/X11    \
4968     /usr/local/lib/X11R6  \
4969     /usr/local/lib/X11R5  \
4970     /usr/local/lib/X11R4  \
4971                           \
4972     /usr/X386/lib         \
4973     /usr/x386/lib         \
4974     /usr/XFree86/lib/X11  \
4975                           \
4976     /usr/lib              \
4977     /usr/local/lib        \
4978     /usr/unsupported/lib  \
4979     /usr/athena/lib       \
4980     /usr/local/x11r5/lib  \
4981     /usr/lpp/Xamples/lib  \
4982     /lib/usr/lib/X11      \
4983                           \
4984     /usr/openwin/lib      \
4985     /usr/openwin/share/lib \
4986     ; \
4987 do
4988   for ac_extension in a so sl; do
4989     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4990       ac_x_libraries=$ac_dir
4991       break 2
4992     fi
4993   done
4994 done
4995 fi
4996 rm -f conftest*
4997 fi # $ac_x_libraries = NO
4998
4999 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5000   # Didn't find X anywhere.  Cache the known absence of X.
5001   ac_cv_have_x="have_x=no"
5002 else
5003   # Record where we found X for the cache.
5004   ac_cv_have_x="have_x=yes \
5005                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5006 fi
5007   fi
5008   eval "$ac_cv_have_x"
5009 fi # $with_x != no
5010
5011 if test "$have_x" != yes; then
5012   echo "$ac_t""$have_x" 1>&6
5013   no_x=yes
5014 else
5015   # If each of the values was on the command line, it overrides each guess.
5016   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5017   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5018   # Update the cache value to reflect the command line values.
5019   ac_cv_have_x="have_x=yes \
5020                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5021   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5022 fi
5023
5024 if test "$no_x" = yes; then
5025   # Not all programs may use this symbol, but it does not hurt to define it.
5026   { test "$extra_verbose" = "yes" && cat << \EOF
5027     Defining X_DISPLAY_MISSING
5028 EOF
5029 cat >> confdefs.h <<\EOF
5030 #define X_DISPLAY_MISSING 1
5031 EOF
5032 }
5033
5034   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5035 else
5036   if test -n "$x_includes"; then
5037     X_CFLAGS="$X_CFLAGS -I$x_includes"
5038   fi
5039
5040   # It would also be nice to do this for all -L options, not just this one.
5041   if test -n "$x_libraries"; then
5042     X_LIBS="$X_LIBS -L$x_libraries"
5043     # For Solaris; some versions of Sun CC require a space after -R and
5044     # others require no space.  Words are not sufficient . . . .
5045     case "`(uname -sr) 2>/dev/null`" in
5046     "SunOS 5"*)
5047       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5048 echo "configure:5049: checking whether -R must be followed by a space" >&5
5049       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5050       cat > conftest.$ac_ext <<EOF
5051 #line 5052 "configure"
5052 #include "confdefs.h"
5053
5054 int main() {
5055
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   ac_R_nospace=yes
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   ac_R_nospace=no
5066 fi
5067 rm -f conftest*
5068       if test $ac_R_nospace = yes; then
5069         echo "$ac_t""no" 1>&6
5070         X_LIBS="$X_LIBS -R$x_libraries"
5071       else
5072         LIBS="$ac_xsave_LIBS -R $x_libraries"
5073         cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5082   rm -rf conftest*
5083   ac_R_space=yes
5084 else
5085   echo "configure: failed program was:" >&5
5086   cat conftest.$ac_ext >&5
5087   rm -rf conftest*
5088   ac_R_space=no
5089 fi
5090 rm -f conftest*
5091         if test $ac_R_space = yes; then
5092           echo "$ac_t""yes" 1>&6
5093           X_LIBS="$X_LIBS -R $x_libraries"
5094         else
5095           echo "$ac_t""neither works" 1>&6
5096         fi
5097       fi
5098       LIBS="$ac_xsave_LIBS"
5099     esac
5100   fi
5101
5102   # Check for system-dependent libraries X programs must link with.
5103   # Do this before checking for the system-independent R6 libraries
5104   # (-lICE), since we may need -lsocket or whatever for X linking.
5105
5106   if test "$ISC" = yes; then
5107     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5108   else
5109     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5110     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5111     # the Alpha needs dnet_stub (dnet does not exist).
5112     if test "$with_dnet" = "no" ; then
5113 ac_cv_lib_dnet_dnet_ntoa=no
5114 else
5115
5116 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5117 echo "configure:5118: checking for dnet_ntoa in -ldnet" >&5
5118 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5119
5120 xe_check_libs=" -ldnet "
5121 cat > conftest.$ac_ext <<EOF
5122 #line 5123 "configure"
5123 #include "confdefs.h"
5124 /* Override any gcc2 internal prototype to avoid an error.  */
5125 /* We use char because int might match the return type of a gcc2
5126     builtin and then its argument prototype would still apply.  */
5127 char dnet_ntoa();
5128
5129 int main() {
5130 dnet_ntoa()
5131 ; return 0; }
5132 EOF
5133 if { (eval echo configure:5134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5134   rm -rf conftest*
5135   eval "ac_cv_lib_$ac_lib_var=yes"
5136 else
5137   echo "configure: failed program was:" >&5
5138   cat conftest.$ac_ext >&5
5139   rm -rf conftest*
5140   eval "ac_cv_lib_$ac_lib_var=no"
5141 fi
5142 rm -f conftest*
5143 xe_check_libs=""
5144
5145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5146   echo "$ac_t""yes" 1>&6
5147   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5148 else
5149   echo "$ac_t""no" 1>&6
5150 fi
5151
5152 fi
5153
5154     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5155       
5156 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5157 echo "configure:5158: checking for dnet_ntoa in -ldnet_stub" >&5
5158 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5159
5160 xe_check_libs=" -ldnet_stub "
5161 cat > conftest.$ac_ext <<EOF
5162 #line 5163 "configure"
5163 #include "confdefs.h"
5164 /* Override any gcc2 internal prototype to avoid an error.  */
5165 /* We use char because int might match the return type of a gcc2
5166     builtin and then its argument prototype would still apply.  */
5167 char dnet_ntoa();
5168
5169 int main() {
5170 dnet_ntoa()
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5174   rm -rf conftest*
5175   eval "ac_cv_lib_$ac_lib_var=yes"
5176 else
5177   echo "configure: failed program was:" >&5
5178   cat conftest.$ac_ext >&5
5179   rm -rf conftest*
5180   eval "ac_cv_lib_$ac_lib_var=no"
5181 fi
5182 rm -f conftest*
5183 xe_check_libs=""
5184
5185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5186   echo "$ac_t""yes" 1>&6
5187   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5188 else
5189   echo "$ac_t""no" 1>&6
5190 fi
5191
5192
5193     fi
5194
5195     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5196     # to get the SysV transport functions.
5197     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5198     # needs -lnsl.
5199     # The nsl library prevents programs from opening the X display
5200     # on Irix 5.2, according to dickey@clark.net.
5201     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5202 echo "configure:5203: checking for gethostbyname" >&5
5203
5204 cat > conftest.$ac_ext <<EOF
5205 #line 5206 "configure"
5206 #include "confdefs.h"
5207 /* System header to define __stub macros and hopefully few prototypes,
5208     which can conflict with char gethostbyname(); below.  */
5209 #include <assert.h>
5210 /* Override any gcc2 internal prototype to avoid an error.  */
5211 /* We use char because int might match the return type of a gcc2
5212     builtin and then its argument prototype would still apply.  */
5213 char gethostbyname();
5214
5215 int main() {
5216
5217 /* The GNU C library defines this for functions which it implements
5218     to always fail with ENOSYS.  Some functions are actually named
5219     something starting with __ and the normal name is an alias.  */
5220 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5221 choke me
5222 #else
5223 gethostbyname();
5224 #endif
5225
5226 ; return 0; }
5227 EOF
5228 if { (eval echo configure:5229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5229   rm -rf conftest*
5230   eval "ac_cv_func_gethostbyname=yes"
5231 else
5232   echo "configure: failed program was:" >&5
5233   cat conftest.$ac_ext >&5
5234   rm -rf conftest*
5235   eval "ac_cv_func_gethostbyname=no"
5236 fi
5237 rm -f conftest*
5238
5239 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5240   echo "$ac_t""yes" 1>&6
5241   :
5242 else
5243   echo "$ac_t""no" 1>&6
5244 fi
5245
5246     if test $ac_cv_func_gethostbyname = no; then
5247       
5248 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5249 echo "configure:5250: checking for gethostbyname in -lnsl" >&5
5250 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5251
5252 xe_check_libs=" -lnsl "
5253 cat > conftest.$ac_ext <<EOF
5254 #line 5255 "configure"
5255 #include "confdefs.h"
5256 /* Override any gcc2 internal prototype to avoid an error.  */
5257 /* We use char because int might match the return type of a gcc2
5258     builtin and then its argument prototype would still apply.  */
5259 char gethostbyname();
5260
5261 int main() {
5262 gethostbyname()
5263 ; return 0; }
5264 EOF
5265 if { (eval echo configure:5266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5266   rm -rf conftest*
5267   eval "ac_cv_lib_$ac_lib_var=yes"
5268 else
5269   echo "configure: failed program was:" >&5
5270   cat conftest.$ac_ext >&5
5271   rm -rf conftest*
5272   eval "ac_cv_lib_$ac_lib_var=no"
5273 fi
5274 rm -f conftest*
5275 xe_check_libs=""
5276
5277 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5278   echo "$ac_t""yes" 1>&6
5279   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5280 else
5281   echo "$ac_t""no" 1>&6
5282 fi
5283
5284
5285     fi
5286
5287     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5288     # socket/setsockopt and other routines are undefined under SCO ODT
5289     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5290     # on later versions), says simon@lia.di.epfl.ch: it contains
5291     # gethostby* variants that don't use the nameserver (or something).
5292     # -lsocket must be given before -lnsl if both are needed.
5293     # We assume that if connect needs -lnsl, so does gethostbyname.
5294     echo $ac_n "checking for connect""... $ac_c" 1>&6
5295 echo "configure:5296: checking for connect" >&5
5296
5297 cat > conftest.$ac_ext <<EOF
5298 #line 5299 "configure"
5299 #include "confdefs.h"
5300 /* System header to define __stub macros and hopefully few prototypes,
5301     which can conflict with char connect(); below.  */
5302 #include <assert.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 connect();
5307
5308 int main() {
5309
5310 /* The GNU C library defines this for functions which it implements
5311     to always fail with ENOSYS.  Some functions are actually named
5312     something starting with __ and the normal name is an alias.  */
5313 #if defined (__stub_connect) || defined (__stub___connect)
5314 choke me
5315 #else
5316 connect();
5317 #endif
5318
5319 ; return 0; }
5320 EOF
5321 if { (eval echo configure:5322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5322   rm -rf conftest*
5323   eval "ac_cv_func_connect=yes"
5324 else
5325   echo "configure: failed program was:" >&5
5326   cat conftest.$ac_ext >&5
5327   rm -rf conftest*
5328   eval "ac_cv_func_connect=no"
5329 fi
5330 rm -f conftest*
5331
5332 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5333   echo "$ac_t""yes" 1>&6
5334   :
5335 else
5336   echo "$ac_t""no" 1>&6
5337 fi
5338
5339     if test $ac_cv_func_connect = no; then
5340       
5341 xe_msg_checking="for connect in -lsocket"
5342 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5343 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5344 echo "configure:5345: checking "$xe_msg_checking"" >&5
5345 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5346
5347 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5348 cat > conftest.$ac_ext <<EOF
5349 #line 5350 "configure"
5350 #include "confdefs.h"
5351 /* Override any gcc2 internal prototype to avoid an error.  */
5352 /* We use char because int might match the return type of a gcc2
5353     builtin and then its argument prototype would still apply.  */
5354 char connect();
5355
5356 int main() {
5357 connect()
5358 ; return 0; }
5359 EOF
5360 if { (eval echo configure:5361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5361   rm -rf conftest*
5362   eval "ac_cv_lib_$ac_lib_var=yes"
5363 else
5364   echo "configure: failed program was:" >&5
5365   cat conftest.$ac_ext >&5
5366   rm -rf conftest*
5367   eval "ac_cv_lib_$ac_lib_var=no"
5368 fi
5369 rm -f conftest*
5370 xe_check_libs=""
5371
5372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5373   echo "$ac_t""yes" 1>&6
5374   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5375 else
5376   echo "$ac_t""no" 1>&6
5377 fi
5378
5379
5380     fi
5381
5382     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5383     echo $ac_n "checking for remove""... $ac_c" 1>&6
5384 echo "configure:5385: checking for remove" >&5
5385
5386 cat > conftest.$ac_ext <<EOF
5387 #line 5388 "configure"
5388 #include "confdefs.h"
5389 /* System header to define __stub macros and hopefully few prototypes,
5390     which can conflict with char remove(); below.  */
5391 #include <assert.h>
5392 /* Override any gcc2 internal prototype to avoid an error.  */
5393 /* We use char because int might match the return type of a gcc2
5394     builtin and then its argument prototype would still apply.  */
5395 char remove();
5396
5397 int main() {
5398
5399 /* The GNU C library defines this for functions which it implements
5400     to always fail with ENOSYS.  Some functions are actually named
5401     something starting with __ and the normal name is an alias.  */
5402 #if defined (__stub_remove) || defined (__stub___remove)
5403 choke me
5404 #else
5405 remove();
5406 #endif
5407
5408 ; return 0; }
5409 EOF
5410 if { (eval echo configure:5411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5411   rm -rf conftest*
5412   eval "ac_cv_func_remove=yes"
5413 else
5414   echo "configure: failed program was:" >&5
5415   cat conftest.$ac_ext >&5
5416   rm -rf conftest*
5417   eval "ac_cv_func_remove=no"
5418 fi
5419 rm -f conftest*
5420
5421 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5422   echo "$ac_t""yes" 1>&6
5423   :
5424 else
5425   echo "$ac_t""no" 1>&6
5426 fi
5427
5428     if test $ac_cv_func_remove = no; then
5429       
5430 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5431 echo "configure:5432: checking for remove in -lposix" >&5
5432 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5433
5434 xe_check_libs=" -lposix "
5435 cat > conftest.$ac_ext <<EOF
5436 #line 5437 "configure"
5437 #include "confdefs.h"
5438 /* Override any gcc2 internal prototype to avoid an error.  */
5439 /* We use char because int might match the return type of a gcc2
5440     builtin and then its argument prototype would still apply.  */
5441 char remove();
5442
5443 int main() {
5444 remove()
5445 ; return 0; }
5446 EOF
5447 if { (eval echo configure:5448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5448   rm -rf conftest*
5449   eval "ac_cv_lib_$ac_lib_var=yes"
5450 else
5451   echo "configure: failed program was:" >&5
5452   cat conftest.$ac_ext >&5
5453   rm -rf conftest*
5454   eval "ac_cv_lib_$ac_lib_var=no"
5455 fi
5456 rm -f conftest*
5457 xe_check_libs=""
5458
5459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5460   echo "$ac_t""yes" 1>&6
5461   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5462 else
5463   echo "$ac_t""no" 1>&6
5464 fi
5465
5466
5467     fi
5468
5469     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5470     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5471 echo "configure:5472: checking for shmat" >&5
5472
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 /* System header to define __stub macros and hopefully few prototypes,
5477     which can conflict with char shmat(); below.  */
5478 #include <assert.h>
5479 /* Override any gcc2 internal prototype to avoid an error.  */
5480 /* We use char because int might match the return type of a gcc2
5481     builtin and then its argument prototype would still apply.  */
5482 char shmat();
5483
5484 int main() {
5485
5486 /* The GNU C library defines this for functions which it implements
5487     to always fail with ENOSYS.  Some functions are actually named
5488     something starting with __ and the normal name is an alias.  */
5489 #if defined (__stub_shmat) || defined (__stub___shmat)
5490 choke me
5491 #else
5492 shmat();
5493 #endif
5494
5495 ; return 0; }
5496 EOF
5497 if { (eval echo configure:5498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5498   rm -rf conftest*
5499   eval "ac_cv_func_shmat=yes"
5500 else
5501   echo "configure: failed program was:" >&5
5502   cat conftest.$ac_ext >&5
5503   rm -rf conftest*
5504   eval "ac_cv_func_shmat=no"
5505 fi
5506 rm -f conftest*
5507
5508 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5509   echo "$ac_t""yes" 1>&6
5510   :
5511 else
5512   echo "$ac_t""no" 1>&6
5513 fi
5514
5515     if test $ac_cv_func_shmat = no; then
5516       
5517 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5518 echo "configure:5519: checking for shmat in -lipc" >&5
5519 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5520
5521 xe_check_libs=" -lipc "
5522 cat > conftest.$ac_ext <<EOF
5523 #line 5524 "configure"
5524 #include "confdefs.h"
5525 /* Override any gcc2 internal prototype to avoid an error.  */
5526 /* We use char because int might match the return type of a gcc2
5527     builtin and then its argument prototype would still apply.  */
5528 char shmat();
5529
5530 int main() {
5531 shmat()
5532 ; return 0; }
5533 EOF
5534 if { (eval echo configure:5535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5535   rm -rf conftest*
5536   eval "ac_cv_lib_$ac_lib_var=yes"
5537 else
5538   echo "configure: failed program was:" >&5
5539   cat conftest.$ac_ext >&5
5540   rm -rf conftest*
5541   eval "ac_cv_lib_$ac_lib_var=no"
5542 fi
5543 rm -f conftest*
5544 xe_check_libs=""
5545
5546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5547   echo "$ac_t""yes" 1>&6
5548   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5549 else
5550   echo "$ac_t""no" 1>&6
5551 fi
5552
5553
5554     fi
5555   fi
5556
5557   # Check for libraries that X11R6 Xt/Xaw programs need.
5558   ac_save_LDFLAGS="$LDFLAGS"
5559   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5560   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5561   # check for ICE first), but we must link in the order -lSM -lICE or
5562   # we get undefined symbols.  So assume we have SM if we have ICE.
5563   # These have to be linked with before -lX11, unlike the other
5564   # libraries we check for below, so use a different variable.
5565   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5566   
5567 xe_msg_checking="for IceConnectionNumber in -lICE"
5568 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5569 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5570 echo "configure:5571: checking "$xe_msg_checking"" >&5
5571 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5572
5573 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5574 cat > conftest.$ac_ext <<EOF
5575 #line 5576 "configure"
5576 #include "confdefs.h"
5577 /* Override any gcc2 internal prototype to avoid an error.  */
5578 /* We use char because int might match the return type of a gcc2
5579     builtin and then its argument prototype would still apply.  */
5580 char IceConnectionNumber();
5581
5582 int main() {
5583 IceConnectionNumber()
5584 ; return 0; }
5585 EOF
5586 if { (eval echo configure:5587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5587   rm -rf conftest*
5588   eval "ac_cv_lib_$ac_lib_var=yes"
5589 else
5590   echo "configure: failed program was:" >&5
5591   cat conftest.$ac_ext >&5
5592   rm -rf conftest*
5593   eval "ac_cv_lib_$ac_lib_var=no"
5594 fi
5595 rm -f conftest*
5596 xe_check_libs=""
5597
5598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5599   echo "$ac_t""yes" 1>&6
5600   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5601 else
5602   echo "$ac_t""no" 1>&6
5603 fi
5604
5605
5606   LDFLAGS="$ac_save_LDFLAGS"
5607
5608 fi
5609  # Autoconf claims to find X library and include dirs for us.
5610   if test "$no_x" = "yes"
5611   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5612   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5613   fi
5614 fi
5615
5616 case "$with_x11" in
5617   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5618   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5619 esac
5620
5621 if test "$with_x11" = "yes"; then
5622   { test "$extra_verbose" = "yes" && cat << \EOF
5623     Defining HAVE_X_WINDOWS
5624 EOF
5625 cat >> confdefs.h <<\EOF
5626 #define HAVE_X_WINDOWS 1
5627 EOF
5628 }
5629
5630   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5631   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5632
5633       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5634     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5635     if test -d "$lib_dir" -a -d "$inc_dir"; then
5636       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5637         x_libraries="$lib_dir $x_libraries"
5638         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5639       esac
5640       case "$x_includes" in "$inc_dir"* ) ;; *)
5641         x_includes="$inc_dir $x_includes"
5642         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5643       esac
5644       break;       fi
5645   done
5646
5647     for rel in "X11R6" "X11R5" "X11R4"; do
5648     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5649     if test -d "$lib_dir" -a -d "$inc_dir"; then
5650       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5651         x_libraries="$x_libraries $lib_dir"
5652         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5653       esac
5654       case "$x_includes" in "$inc_dir"* ) ;; *)
5655         x_includes="$x_includes $inc_dir"
5656         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5657       esac
5658       break;     fi
5659   done
5660
5661     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
5662
5663   ld_switch_x_site="$X_LIBS"
5664
5665   
5666 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5667     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5668   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5669   
5670         runpath="" runpath_dirs=""
5671   if test -n "$LD_RUN_PATH"; then
5672     runpath="$LD_RUN_PATH"
5673   elif test "$GCC" = "yes"; then
5674         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5675     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5676     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5677     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5678       case "$arg" in P,* | -L* | -R* )
5679         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5680           {
5681 xe_runpath_dir="$dir"
5682   test "$xe_runpath_dir" != "/lib"     -a \
5683         "$xe_runpath_dir" != "/usr/lib" -a \
5684         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5685   eval "$xe_add_unique_runpath_dir"
5686 }
5687         done ;;
5688       esac
5689     done
5690     ld_switch_run="$ld_switch_run_save"
5691     rm -f conftest*
5692   else
5693         for arg in $ld_switch_site $ld_switch_x_site; do
5694       case "$arg" in -L*) {
5695 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5696   test "$xe_runpath_dir" != "/lib"     -a \
5697         "$xe_runpath_dir" != "/usr/lib" -a \
5698         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5699   eval "$xe_add_unique_runpath_dir"
5700 };; esac
5701     done
5702         if test "$opsys $need_motif" = "sol2 yes"; then
5703       xe_runpath_dir="/opt/SUNWdt/lib";
5704       eval "$xe_add_unique_runpath_dir";
5705     fi
5706   fi 
5707   if test -n "$runpath"; then
5708     ld_switch_run="${dash_r}${runpath}"
5709     
5710 if test "$GCC" = "yes"; then
5711   set x $ld_switch_run; shift; ld_switch_run=""
5712   while test -n "$1"; do
5713     case $1 in
5714       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5715       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5716       -Xlinker* ) ;;
5717       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5718     esac
5719     shift
5720   done
5721 fi
5722     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5723   fi
5724 fi
5725
5726
5727   if test "$extra_verbose" = "yes"; then
5728     echo; echo "X11 compilation variables:"
5729     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5730     echo
5731   fi
5732
5733             bitmapdirs=
5734   if test "$x_includes" != NONE; then
5735     for i in $x_includes; do
5736       if test -d "$i/bitmaps"; then
5737         bitmapdirs="$i/bitmaps:$bitmapdirs"
5738       fi
5739       if test -d "$i/X11/bitmaps"; then
5740         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5741       fi
5742     done
5743     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5744   fi
5745   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5746     Defining BITMAPDIR = "$bitmapdirs"
5747 EOF
5748 cat >> confdefs.h <<EOF
5749 #define BITMAPDIR "$bitmapdirs"
5750 EOF
5751 }
5752
5753
5754     echo "checking for X defines extracted by xmkmf" 1>&6
5755 echo "configure:5756: checking for X defines extracted by xmkmf" >&5
5756   rm -fr conftestdir
5757   if mkdir conftestdir; then
5758     cd conftestdir
5759     cat > Imakefile <<'EOF'
5760 xetest:
5761         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5762 EOF
5763     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5764       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5765       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5766     fi
5767     cd ..
5768     rm -fr conftestdir
5769     for word in $xmkmf_defines; do
5770       case "$word" in
5771         -D*=* ) ;;
5772         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5773               { test "$extra_verbose" = "yes" && cat << EOF
5774     Defining $word
5775 EOF
5776 cat >> confdefs.h <<EOF
5777 #define $word 1
5778 EOF
5779 }
5780  ;;
5781       esac
5782     done
5783   fi
5784
5785     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5786 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5787 echo "configure:5788: checking for X11/Intrinsic.h" >&5
5788
5789 cat > conftest.$ac_ext <<EOF
5790 #line 5791 "configure"
5791 #include "confdefs.h"
5792 #include <X11/Intrinsic.h>
5793 EOF
5794 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5795 { (eval echo configure:5796: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5796 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5797 if test -z "$ac_err"; then
5798   rm -rf conftest*
5799   eval "ac_cv_header_$ac_safe=yes"
5800 else
5801   echo "$ac_err" >&5
5802   echo "configure: failed program was:" >&5
5803   cat conftest.$ac_ext >&5
5804   rm -rf conftest*
5805   eval "ac_cv_header_$ac_safe=no"
5806 fi
5807 rm -f conftest*
5808 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5809   echo "$ac_t""yes" 1>&6
5810   :
5811 else
5812   echo "$ac_t""no" 1>&6
5813 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5814 fi
5815
5816
5817       
5818 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5819 echo "configure:5820: checking for XOpenDisplay in -lX11" >&5
5820 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5821
5822 xe_check_libs=" -lX11 "
5823 cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5826 /* Override any gcc2 internal prototype to avoid an error.  */
5827 /* We use char because int might match the return type of a gcc2
5828     builtin and then its argument prototype would still apply.  */
5829 char XOpenDisplay();
5830
5831 int main() {
5832 XOpenDisplay()
5833 ; return 0; }
5834 EOF
5835 if { (eval echo configure:5836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5836   rm -rf conftest*
5837   eval "ac_cv_lib_$ac_lib_var=yes"
5838 else
5839   echo "configure: failed program was:" >&5
5840   cat conftest.$ac_ext >&5
5841   rm -rf conftest*
5842   eval "ac_cv_lib_$ac_lib_var=no"
5843 fi
5844 rm -f conftest*
5845 xe_check_libs=""
5846
5847 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5848   echo "$ac_t""yes" 1>&6
5849   have_lib_x11=yes
5850 else
5851   echo "$ac_t""no" 1>&6
5852 fi
5853
5854
5855   if test "$have_lib_x11" != "yes"; then
5856     
5857 xe_msg_checking="for XGetFontProperty in -lX11"
5858 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5859 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5860 echo "configure:5861: checking "$xe_msg_checking"" >&5
5861 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5862
5863 xe_check_libs=" -lX11 -b i486-linuxaout"
5864 cat > conftest.$ac_ext <<EOF
5865 #line 5866 "configure"
5866 #include "confdefs.h"
5867 /* Override any gcc2 internal prototype to avoid an error.  */
5868 /* We use char because int might match the return type of a gcc2
5869     builtin and then its argument prototype would still apply.  */
5870 char XGetFontProperty();
5871
5872 int main() {
5873 XGetFontProperty()
5874 ; return 0; }
5875 EOF
5876 if { (eval echo configure:5877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5877   rm -rf conftest*
5878   eval "ac_cv_lib_$ac_lib_var=yes"
5879 else
5880   echo "configure: failed program was:" >&5
5881   cat conftest.$ac_ext >&5
5882   rm -rf conftest*
5883   eval "ac_cv_lib_$ac_lib_var=no"
5884 fi
5885 rm -f conftest*
5886 xe_check_libs=""
5887
5888 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5889   echo "$ac_t""yes" 1>&6
5890   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5891 else
5892   echo "$ac_t""no" 1>&6
5893 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5894 fi
5895
5896
5897   fi
5898   libs_x="-lX11"
5899   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5900
5901     
5902 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5903 echo "configure:5904: checking for XShapeSelectInput in -lXext" >&5
5904 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5905
5906 xe_check_libs=" -lXext "
5907 cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5910 /* Override any gcc2 internal prototype to avoid an error.  */
5911 /* We use char because int might match the return type of a gcc2
5912     builtin and then its argument prototype would still apply.  */
5913 char XShapeSelectInput();
5914
5915 int main() {
5916 XShapeSelectInput()
5917 ; return 0; }
5918 EOF
5919 if { (eval echo configure:5920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5920   rm -rf conftest*
5921   eval "ac_cv_lib_$ac_lib_var=yes"
5922 else
5923   echo "configure: failed program was:" >&5
5924   cat conftest.$ac_ext >&5
5925   rm -rf conftest*
5926   eval "ac_cv_lib_$ac_lib_var=no"
5927 fi
5928 rm -f conftest*
5929 xe_check_libs=""
5930
5931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5932   echo "$ac_t""yes" 1>&6
5933   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5934 else
5935   echo "$ac_t""no" 1>&6
5936 fi
5937
5938
5939
5940     
5941 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5942 echo "configure:5943: checking for XtOpenDisplay in -lXt" >&5
5943 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5944
5945 xe_check_libs=" -lXt "
5946 cat > conftest.$ac_ext <<EOF
5947 #line 5948 "configure"
5948 #include "confdefs.h"
5949 /* Override any gcc2 internal prototype to avoid an error.  */
5950 /* We use char because int might match the return type of a gcc2
5951     builtin and then its argument prototype would still apply.  */
5952 char XtOpenDisplay();
5953
5954 int main() {
5955 XtOpenDisplay()
5956 ; return 0; }
5957 EOF
5958 if { (eval echo configure:5959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5959   rm -rf conftest*
5960   eval "ac_cv_lib_$ac_lib_var=yes"
5961 else
5962   echo "configure: failed program was:" >&5
5963   cat conftest.$ac_ext >&5
5964   rm -rf conftest*
5965   eval "ac_cv_lib_$ac_lib_var=no"
5966 fi
5967 rm -f conftest*
5968 xe_check_libs=""
5969
5970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5971   echo "$ac_t""yes" 1>&6
5972   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5973 else
5974   echo "$ac_t""no" 1>&6
5975 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5976 fi
5977
5978
5979
5980   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5981 echo "configure:5982: checking the version of X11 being used" >&5
5982   cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 #include <X11/Intrinsic.h>
5986     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5987 EOF
5988 if { (eval echo configure:5989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5989 then
5990   ./conftest foobar; x11_release=$?
5991 else
5992   conftest_rc="$?"
5993   echo "configure: failed program was:" >&5
5994   cat conftest.$ac_ext >&5
5995   rm -fr conftest*
5996   x11_release=4
5997 fi
5998 rm -fr conftest*
5999   echo "$ac_t""R${x11_release}" 1>&6
6000   { test "$extra_verbose" = "yes" && cat << EOF
6001     Defining THIS_IS_X11R${x11_release}
6002 EOF
6003 cat >> confdefs.h <<EOF
6004 #define THIS_IS_X11R${x11_release} 1
6005 EOF
6006 }
6007
6008
6009   for ac_hdr in X11/Xlocale.h
6010 do
6011 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6012 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6013 echo "configure:6014: checking for $ac_hdr" >&5
6014
6015 cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 #include <$ac_hdr>
6019 EOF
6020 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6021 { (eval echo configure:6022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6022 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6023 if test -z "$ac_err"; then
6024   rm -rf conftest*
6025   eval "ac_cv_header_$ac_safe=yes"
6026 else
6027   echo "$ac_err" >&5
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_header_$ac_safe=no"
6032 fi
6033 rm -f conftest*
6034 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6035   echo "$ac_t""yes" 1>&6
6036     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6037   { test "$extra_verbose" = "yes" && cat << EOF
6038     Defining $ac_tr_hdr
6039 EOF
6040 cat >> confdefs.h <<EOF
6041 #define $ac_tr_hdr 1
6042 EOF
6043 }
6044  
6045 else
6046   echo "$ac_t""no" 1>&6
6047 fi
6048 done
6049
6050
6051     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6052 echo "configure:6053: checking for XFree86" >&5
6053   if test -d "/usr/X386/include" -o \
6054           -f "/etc/XF86Config"    -o \
6055           -f "/etc/X11/XF86Config" -o \
6056           -f "/usr/X11R6/lib/X11/XF86Config"; then
6057     echo "$ac_t""yes" 1>&6
6058     { test "$extra_verbose" = "yes" && cat << \EOF
6059     Defining HAVE_XFREE386
6060 EOF
6061 cat >> confdefs.h <<\EOF
6062 #define HAVE_XFREE386 1
6063 EOF
6064 }
6065
6066   else
6067     echo "$ac_t""no" 1>&6
6068   fi
6069
6070     test -z "$with_xmu" && { 
6071 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6072 echo "configure:6073: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6073 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6074
6075 xe_check_libs=" -lXmu "
6076 cat > conftest.$ac_ext <<EOF
6077 #line 6078 "configure"
6078 #include "confdefs.h"
6079 /* Override any gcc2 internal prototype to avoid an error.  */
6080 /* We use char because int might match the return type of a gcc2
6081     builtin and then its argument prototype would still apply.  */
6082 char XmuReadBitmapDataFromFile();
6083
6084 int main() {
6085 XmuReadBitmapDataFromFile()
6086 ; return 0; }
6087 EOF
6088 if { (eval echo configure:6089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6089   rm -rf conftest*
6090   eval "ac_cv_lib_$ac_lib_var=yes"
6091 else
6092   echo "configure: failed program was:" >&5
6093   cat conftest.$ac_ext >&5
6094   rm -rf conftest*
6095   eval "ac_cv_lib_$ac_lib_var=no"
6096 fi
6097 rm -f conftest*
6098 xe_check_libs=""
6099
6100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6101   echo "$ac_t""yes" 1>&6
6102   with_xmu=yes
6103 else
6104   echo "$ac_t""no" 1>&6
6105 with_xmu=no
6106 fi
6107
6108  }
6109   if test "$with_xmu" = "no"; then
6110     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6111    echo "    xemacs will be linked with \"xmu.o\""
6112  fi
6113   else
6114     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6115     { test "$extra_verbose" = "yes" && cat << \EOF
6116     Defining HAVE_XMU
6117 EOF
6118 cat >> confdefs.h <<\EOF
6119 #define HAVE_XMU 1
6120 EOF
6121 }
6122
6123   fi
6124
6125       
6126 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6127 echo "configure:6128: checking for main in -lXbsd" >&5
6128 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6129
6130 xe_check_libs=" -lXbsd "
6131 cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6134
6135 int main() {
6136 main()
6137 ; return 0; }
6138 EOF
6139 if { (eval echo configure:6140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6140   rm -rf conftest*
6141   eval "ac_cv_lib_$ac_lib_var=yes"
6142 else
6143   echo "configure: failed program was:" >&5
6144   cat conftest.$ac_ext >&5
6145   rm -rf conftest*
6146   eval "ac_cv_lib_$ac_lib_var=no"
6147 fi
6148 rm -f conftest*
6149 xe_check_libs=""
6150
6151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6152   echo "$ac_t""yes" 1>&6
6153   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6154 else
6155   echo "$ac_t""no" 1>&6
6156 fi
6157
6158
6159
6160     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6161         if test "$GCC" = "yes"; then
6162       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6163       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6164     else
6165       case "$CC" in
6166         "xlc" ) CC="xlc_r" ;;
6167         "xlC" ) CC="xlC_r" ;;
6168         "cc"  ) CC="cc_r" ;;
6169       esac
6170     fi
6171   fi
6172
6173 fi 
6174 if test "$with_msw" != "no"; then
6175   echo "checking for MS-Windows" 1>&6
6176 echo "configure:6177: checking for MS-Windows" >&5
6177   
6178 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6179 echo "configure:6180: checking for main in -lgdi32" >&5
6180 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6181
6182 xe_check_libs=" -lgdi32 "
6183 cat > conftest.$ac_ext <<EOF
6184 #line 6185 "configure"
6185 #include "confdefs.h"
6186
6187 int main() {
6188 main()
6189 ; return 0; }
6190 EOF
6191 if { (eval echo configure:6192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6192   rm -rf conftest*
6193   eval "ac_cv_lib_$ac_lib_var=yes"
6194 else
6195   echo "configure: failed program was:" >&5
6196   cat conftest.$ac_ext >&5
6197   rm -rf conftest*
6198   eval "ac_cv_lib_$ac_lib_var=no"
6199 fi
6200 rm -f conftest*
6201 xe_check_libs=""
6202
6203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6204   echo "$ac_t""yes" 1>&6
6205   with_msw=yes
6206 else
6207   echo "$ac_t""no" 1>&6
6208 fi
6209
6210
6211   if test "$with_msw" = "yes"; then
6212     { test "$extra_verbose" = "yes" && cat << \EOF
6213     Defining HAVE_MS_WINDOWS
6214 EOF
6215 cat >> confdefs.h <<\EOF
6216 #define HAVE_MS_WINDOWS 1
6217 EOF
6218 }
6219
6220     install_pp="$blddir/lib-src/installexe.sh"
6221     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
6222     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6223     if test "$window_system" != x11; then
6224         window_system=msw
6225         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6226             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6227    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6228  fi
6229         test "$with_menubars"   != "no" && with_menubars=msw \
6230             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6231    echo "    xemacs will be linked with \"menubar-msw.o\""
6232  fi
6233         test "$with_toolbars"   != "no" && with_toolbars=msw \
6234             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6235    echo "    xemacs will be linked with \"toolbar-msw.o\""
6236  fi
6237         test "$with_dialogs"   != "no" && with_dialogs=msw \
6238             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6239    echo "    xemacs will be linked with \"dialog-msw.o\""
6240  fi
6241         test "$with_widgets"   != "no" && with_widgets=msw
6242     else
6243         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6244    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6245  fi
6246         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6247    echo "    xemacs will be linked with \"menubar-msw.o\""
6248  fi
6249         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6250    echo "    xemacs will be linked with \"toolbar-msw.o\""
6251  fi
6252         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6253    echo "    xemacs will be linked with \"dialog-msw.o\""
6254  fi
6255     fi
6256         cat > conftest.$ac_ext <<EOF
6257 #line 6258 "configure"
6258 #include "confdefs.h"
6259 #include <fcntl.h>
6260     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6261 EOF
6262 if { (eval echo configure:6263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6263 then
6264   { test "$extra_verbose" = "yes" && cat << \EOF
6265     Defining HAVE_MSG_SELECT
6266 EOF
6267 cat >> confdefs.h <<\EOF
6268 #define HAVE_MSG_SELECT 1
6269 EOF
6270 }
6271
6272 else
6273   conftest_rc="$?"
6274   echo "configure: failed program was:" >&5
6275   cat conftest.$ac_ext >&5
6276 fi
6277 rm -fr conftest*
6278     const_is_losing=no
6279     with_file_coding=yes
6280     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
6281    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\""
6282  fi
6283   fi
6284 fi
6285
6286
6287
6288 test -z "$window_system" && window_system="none"
6289
6290 if test "$window_system" = "none"; then
6291   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6292   do
6293     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6294        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6295     fi
6296     eval "with_${feature}=no"
6297   done
6298 else
6299   test -z "$with_toolbars" && with_toolbars=yes
6300 fi
6301
6302 if test "$with_msw" != "yes"; then
6303   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6304   do
6305     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6306        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6307     fi
6308     eval "with_${feature}=no"
6309   done
6310 else
6311   :
6312 fi
6313
6314 if test "$with_x11" != "yes"; then
6315             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6316   do
6317     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6318        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6319     fi
6320     eval "with_${feature}=no"
6321   done
6322 fi
6323
6324 bitmapdir=
6325
6326 case "$window_system" in
6327   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6328   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6329   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6330 esac
6331
6332 case "$x_libraries" in *X11R4* )
6333   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6334   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6335 esac
6336
6337 echo "checking for WM_COMMAND option" 1>&6
6338 echo "configure:6339: checking for WM_COMMAND option" >&5;
6339 if test "$with_wmcommand" != "no"; then
6340   { test "$extra_verbose" = "yes" && cat << \EOF
6341     Defining HAVE_WMCOMMAND
6342 EOF
6343 cat >> confdefs.h <<\EOF
6344 #define HAVE_WMCOMMAND 1
6345 EOF
6346 }
6347
6348 fi
6349
6350 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6351 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6352 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6353 echo "configure:6354: checking for X11/Xauth.h" >&5
6354
6355 cat > conftest.$ac_ext <<EOF
6356 #line 6357 "configure"
6357 #include "confdefs.h"
6358 #include <X11/Xauth.h>
6359 EOF
6360 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6361 { (eval echo configure:6362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6362 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6363 if test -z "$ac_err"; then
6364   rm -rf conftest*
6365   eval "ac_cv_header_$ac_safe=yes"
6366 else
6367   echo "$ac_err" >&5
6368   echo "configure: failed program was:" >&5
6369   cat conftest.$ac_ext >&5
6370   rm -rf conftest*
6371   eval "ac_cv_header_$ac_safe=no"
6372 fi
6373 rm -f conftest*
6374 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6375   echo "$ac_t""yes" 1>&6
6376   :
6377 else
6378   echo "$ac_t""no" 1>&6
6379 with_xauth=no
6380 fi
6381  }
6382 test -z "$with_xauth" && { 
6383 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6384 echo "configure:6385: checking for XauGetAuthByAddr in -lXau" >&5
6385 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6386
6387 xe_check_libs=" -lXau "
6388 cat > conftest.$ac_ext <<EOF
6389 #line 6390 "configure"
6390 #include "confdefs.h"
6391 /* Override any gcc2 internal prototype to avoid an error.  */
6392 /* We use char because int might match the return type of a gcc2
6393     builtin and then its argument prototype would still apply.  */
6394 char XauGetAuthByAddr();
6395
6396 int main() {
6397 XauGetAuthByAddr()
6398 ; return 0; }
6399 EOF
6400 if { (eval echo configure:6401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6401   rm -rf conftest*
6402   eval "ac_cv_lib_$ac_lib_var=yes"
6403 else
6404   echo "configure: failed program was:" >&5
6405   cat conftest.$ac_ext >&5
6406   rm -rf conftest*
6407   eval "ac_cv_lib_$ac_lib_var=no"
6408 fi
6409 rm -f conftest*
6410 xe_check_libs=""
6411
6412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6413   echo "$ac_t""yes" 1>&6
6414   :
6415 else
6416   echo "$ac_t""no" 1>&6
6417 with_xauth=no
6418 fi
6419
6420  }
6421 test -z "$with_xauth" && with_xauth=yes
6422 if test "$with_xauth" = "yes"; then
6423   { test "$extra_verbose" = "yes" && cat << \EOF
6424     Defining HAVE_XAUTH
6425 EOF
6426 cat >> confdefs.h <<\EOF
6427 #define HAVE_XAUTH 1
6428 EOF
6429 }
6430
6431   
6432 T=""
6433 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
6434 libs_xauth="$T"
6435
6436 fi
6437
6438
6439
6440
6441 if test "$with_tooltalk" != "no" ; then
6442       for dir in "" "Tt/" "desktop/" ; do
6443     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6444 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6445 echo "configure:6446: checking for ${dir}tt_c.h" >&5
6446
6447 cat > conftest.$ac_ext <<EOF
6448 #line 6449 "configure"
6449 #include "confdefs.h"
6450 #include <${dir}tt_c.h>
6451 EOF
6452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6453 { (eval echo configure:6454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6455 if test -z "$ac_err"; then
6456   rm -rf conftest*
6457   eval "ac_cv_header_$ac_safe=yes"
6458 else
6459   echo "$ac_err" >&5
6460   echo "configure: failed program was:" >&5
6461   cat conftest.$ac_ext >&5
6462   rm -rf conftest*
6463   eval "ac_cv_header_$ac_safe=no"
6464 fi
6465 rm -f conftest*
6466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6467   echo "$ac_t""yes" 1>&6
6468   tt_c_h_path="${dir}tt_c.h"; break
6469 else
6470   echo "$ac_t""no" 1>&6
6471 fi
6472
6473   done
6474   if test -z "$tt_c_h_path"; then
6475     if test "$with_tooltalk" = "yes"; then
6476       (echo "$progname: Usage error:"
6477 echo " " "Unable to find required tooltalk header files."
6478 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6479     fi
6480     with_tooltalk=no
6481   fi
6482 fi
6483 if test "$with_tooltalk" != "no" ; then
6484   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6485     
6486 xe_msg_checking="for tt_message_create in -ltt"
6487 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6488 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6489 echo "configure:6490: checking "$xe_msg_checking"" >&5
6490 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6491
6492 xe_check_libs=" -ltt $extra_libs"
6493 cat > conftest.$ac_ext <<EOF
6494 #line 6495 "configure"
6495 #include "confdefs.h"
6496 /* Override any gcc2 internal prototype to avoid an error.  */
6497 /* We use char because int might match the return type of a gcc2
6498     builtin and then its argument prototype would still apply.  */
6499 char tt_message_create();
6500
6501 int main() {
6502 tt_message_create()
6503 ; return 0; }
6504 EOF
6505 if { (eval echo configure:6506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6506   rm -rf conftest*
6507   eval "ac_cv_lib_$ac_lib_var=yes"
6508 else
6509   echo "configure: failed program was:" >&5
6510   cat conftest.$ac_ext >&5
6511   rm -rf conftest*
6512   eval "ac_cv_lib_$ac_lib_var=no"
6513 fi
6514 rm -f conftest*
6515 xe_check_libs=""
6516
6517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6518   echo "$ac_t""yes" 1>&6
6519   tt_libs="-ltt $extra_libs"; break
6520 else
6521   echo "$ac_t""no" 1>&6
6522 :
6523 fi
6524
6525
6526   done
6527   if test -z "$tt_libs"; then
6528     if test "$with_tooltalk" = "yes"; then
6529       (echo "$progname: Usage error:"
6530 echo " " "Unable to find required tooltalk libraries."
6531 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6532     fi
6533     with_tooltalk=no
6534   fi
6535 fi
6536 test -z "$with_tooltalk" && with_tooltalk=yes
6537 if test "$with_tooltalk" = "yes"; then
6538   { test "$extra_verbose" = "yes" && cat << \EOF
6539     Defining TOOLTALK
6540 EOF
6541 cat >> confdefs.h <<\EOF
6542 #define TOOLTALK 1
6543 EOF
6544 }
6545
6546   { test "$extra_verbose" = "yes" && cat << EOF
6547     Defining TT_C_H_PATH = "$tt_c_h_path"
6548 EOF
6549 cat >> confdefs.h <<EOF
6550 #define TT_C_H_PATH "$tt_c_h_path"
6551 EOF
6552 }
6553
6554   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6555   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6556    echo "    xemacs will be linked with \"tooltalk.o\""
6557  fi
6558 fi
6559
6560 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6561 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6562 echo "configure:6563: checking for Dt/Dt.h" >&5
6563
6564 cat > conftest.$ac_ext <<EOF
6565 #line 6566 "configure"
6566 #include "confdefs.h"
6567 #include <Dt/Dt.h>
6568 EOF
6569 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6570 { (eval echo configure:6571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6571 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6572 if test -z "$ac_err"; then
6573   rm -rf conftest*
6574   eval "ac_cv_header_$ac_safe=yes"
6575 else
6576   echo "$ac_err" >&5
6577   echo "configure: failed program was:" >&5
6578   cat conftest.$ac_ext >&5
6579   rm -rf conftest*
6580   eval "ac_cv_header_$ac_safe=no"
6581 fi
6582 rm -f conftest*
6583 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6584   echo "$ac_t""yes" 1>&6
6585   :
6586 else
6587   echo "$ac_t""no" 1>&6
6588 with_cde=no
6589 fi
6590  }
6591 test -z "$with_cde" && { 
6592 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6593 echo "configure:6594: checking for DtDndDragStart in -lDtSvc" >&5
6594 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6595
6596 xe_check_libs=" -lDtSvc "
6597 cat > conftest.$ac_ext <<EOF
6598 #line 6599 "configure"
6599 #include "confdefs.h"
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char DtDndDragStart();
6604
6605 int main() {
6606 DtDndDragStart()
6607 ; return 0; }
6608 EOF
6609 if { (eval echo configure:6610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6610   rm -rf conftest*
6611   eval "ac_cv_lib_$ac_lib_var=yes"
6612 else
6613   echo "configure: failed program was:" >&5
6614   cat conftest.$ac_ext >&5
6615   rm -rf conftest*
6616   eval "ac_cv_lib_$ac_lib_var=no"
6617 fi
6618 rm -f conftest*
6619 xe_check_libs=""
6620
6621 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6622   echo "$ac_t""yes" 1>&6
6623   :
6624 else
6625   echo "$ac_t""no" 1>&6
6626 with_cde=no
6627 fi
6628
6629  }
6630 test -z "$with_cde" && with_cde=yes
6631 if test "$with_dragndrop" = no; then
6632   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6633   with_cde=no
6634 fi
6635 if test "$with_cde" = "yes" ; then
6636   { test "$extra_verbose" = "yes" && cat << \EOF
6637     Defining HAVE_CDE
6638 EOF
6639 cat >> confdefs.h <<\EOF
6640 #define HAVE_CDE 1
6641 EOF
6642 }
6643
6644   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6645   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6646   with_tooltalk=yes # CDE requires Tooltalk
6647   need_motif=yes    # CDE requires Motif
6648 fi
6649
6650 test "$window_system" != "x11" && with_offix=no
6651 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6652   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6653   with_offix=no
6654 fi
6655 if test "$with_dragndrop" = no; then
6656   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6657   with_offix=no
6658 fi
6659 if test "$with_cde" = yes; then
6660   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6661   with_offix=no
6662 fi
6663 test -z "$with_offix" && with_offix=no
6664 if test "$with_offix" = "yes"; then
6665   { test "$extra_verbose" = "yes" && cat << \EOF
6666     Defining HAVE_OFFIX_DND
6667 EOF
6668 cat >> confdefs.h <<\EOF
6669 #define HAVE_OFFIX_DND 1
6670 EOF
6671 }
6672
6673   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6674   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6675 fi
6676
6677 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6678 echo "configure:6679: checking if drag and drop API is needed" >&5
6679 if test "$with_dragndrop" != "no" ; then
6680   if test -n "$dragndrop_proto" ; then
6681     with_dragndrop=yes
6682     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6683     { test "$extra_verbose" = "yes" && cat << \EOF
6684     Defining HAVE_DRAGNDROP
6685 EOF
6686 cat >> confdefs.h <<\EOF
6687 #define HAVE_DRAGNDROP 1
6688 EOF
6689 }
6690
6691     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6692   else
6693     with_dragndrop=no
6694     echo "$ac_t""no" 1>&6
6695   fi
6696 fi
6697
6698 echo "checking for LDAP" 1>&6
6699 echo "configure:6700: checking for LDAP" >&5
6700 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6701 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6702 echo "configure:6703: checking for ldap.h" >&5
6703
6704 cat > conftest.$ac_ext <<EOF
6705 #line 6706 "configure"
6706 #include "confdefs.h"
6707 #include <ldap.h>
6708 EOF
6709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6710 { (eval echo configure:6711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6712 if test -z "$ac_err"; then
6713   rm -rf conftest*
6714   eval "ac_cv_header_$ac_safe=yes"
6715 else
6716   echo "$ac_err" >&5
6717   echo "configure: failed program was:" >&5
6718   cat conftest.$ac_ext >&5
6719   rm -rf conftest*
6720   eval "ac_cv_header_$ac_safe=no"
6721 fi
6722 rm -f conftest*
6723 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6724   echo "$ac_t""yes" 1>&6
6725   :
6726 else
6727   echo "$ac_t""no" 1>&6
6728 with_ldap=no
6729 fi
6730  }
6731 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6732 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6733 echo "configure:6734: checking for lber.h" >&5
6734
6735 cat > conftest.$ac_ext <<EOF
6736 #line 6737 "configure"
6737 #include "confdefs.h"
6738 #include <lber.h>
6739 EOF
6740 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6741 { (eval echo configure:6742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6742 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6743 if test -z "$ac_err"; then
6744   rm -rf conftest*
6745   eval "ac_cv_header_$ac_safe=yes"
6746 else
6747   echo "$ac_err" >&5
6748   echo "configure: failed program was:" >&5
6749   cat conftest.$ac_ext >&5
6750   rm -rf conftest*
6751   eval "ac_cv_header_$ac_safe=no"
6752 fi
6753 rm -f conftest*
6754 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6755   echo "$ac_t""yes" 1>&6
6756   :
6757 else
6758   echo "$ac_t""no" 1>&6
6759 with_ldap=no
6760 fi
6761  }
6762 if test "$with_ldap" != "no"; then
6763   
6764 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6765 echo "configure:6766: checking for ldap_search in -lldap" >&5
6766 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6767
6768 xe_check_libs=" -lldap "
6769 cat > conftest.$ac_ext <<EOF
6770 #line 6771 "configure"
6771 #include "confdefs.h"
6772 /* Override any gcc2 internal prototype to avoid an error.  */
6773 /* We use char because int might match the return type of a gcc2
6774     builtin and then its argument prototype would still apply.  */
6775 char ldap_search();
6776
6777 int main() {
6778 ldap_search()
6779 ; return 0; }
6780 EOF
6781 if { (eval echo configure:6782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6782   rm -rf conftest*
6783   eval "ac_cv_lib_$ac_lib_var=yes"
6784 else
6785   echo "configure: failed program was:" >&5
6786   cat conftest.$ac_ext >&5
6787   rm -rf conftest*
6788   eval "ac_cv_lib_$ac_lib_var=no"
6789 fi
6790 rm -f conftest*
6791 xe_check_libs=""
6792
6793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6794   echo "$ac_t""yes" 1>&6
6795   with_ldap_nolber=yes
6796 else
6797   echo "$ac_t""no" 1>&6
6798 with_ldap_nolber=no
6799 fi
6800
6801
6802   test "$with_ldap_nolber" = "no" && { 
6803 xe_msg_checking="for ldap_open in -lldap"
6804 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6805 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6806 echo "configure:6807: checking "$xe_msg_checking"" >&5
6807 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6808
6809 xe_check_libs=" -lldap -llber"
6810 cat > conftest.$ac_ext <<EOF
6811 #line 6812 "configure"
6812 #include "confdefs.h"
6813 /* Override any gcc2 internal prototype to avoid an error.  */
6814 /* We use char because int might match the return type of a gcc2
6815     builtin and then its argument prototype would still apply.  */
6816 char ldap_open();
6817
6818 int main() {
6819 ldap_open()
6820 ; return 0; }
6821 EOF
6822 if { (eval echo configure:6823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=yes"
6825 else
6826   echo "configure: failed program was:" >&5
6827   cat conftest.$ac_ext >&5
6828   rm -rf conftest*
6829   eval "ac_cv_lib_$ac_lib_var=no"
6830 fi
6831 rm -f conftest*
6832 xe_check_libs=""
6833
6834 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6835   echo "$ac_t""yes" 1>&6
6836   with_ldap_lber=yes
6837 else
6838   echo "$ac_t""no" 1>&6
6839 with_ldap_lber=no
6840 fi
6841
6842  }
6843   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6844 xe_msg_checking="for ldap_open in -lldap"
6845 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6846 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6847 echo "configure:6848: checking "$xe_msg_checking"" >&5
6848 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6849
6850 xe_check_libs=" -lldap -llber -lkrb"
6851 cat > conftest.$ac_ext <<EOF
6852 #line 6853 "configure"
6853 #include "confdefs.h"
6854 /* Override any gcc2 internal prototype to avoid an error.  */
6855 /* We use char because int might match the return type of a gcc2
6856     builtin and then its argument prototype would still apply.  */
6857 char ldap_open();
6858
6859 int main() {
6860 ldap_open()
6861 ; return 0; }
6862 EOF
6863 if { (eval echo configure:6864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6864   rm -rf conftest*
6865   eval "ac_cv_lib_$ac_lib_var=yes"
6866 else
6867   echo "configure: failed program was:" >&5
6868   cat conftest.$ac_ext >&5
6869   rm -rf conftest*
6870   eval "ac_cv_lib_$ac_lib_var=no"
6871 fi
6872 rm -f conftest*
6873 xe_check_libs=""
6874
6875 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6876   echo "$ac_t""yes" 1>&6
6877   with_ldap_krb=yes
6878 else
6879   echo "$ac_t""no" 1>&6
6880 with_ldap_krb=no
6881 fi
6882
6883  }
6884   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6885 xe_msg_checking="for ldap_open in -lldap"
6886 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6887 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6888 echo "configure:6889: checking "$xe_msg_checking"" >&5
6889 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6890
6891 xe_check_libs=" -lldap -llber -lkrb -ldes"
6892 cat > conftest.$ac_ext <<EOF
6893 #line 6894 "configure"
6894 #include "confdefs.h"
6895 /* Override any gcc2 internal prototype to avoid an error.  */
6896 /* We use char because int might match the return type of a gcc2
6897     builtin and then its argument prototype would still apply.  */
6898 char ldap_open();
6899
6900 int main() {
6901 ldap_open()
6902 ; return 0; }
6903 EOF
6904 if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6905   rm -rf conftest*
6906   eval "ac_cv_lib_$ac_lib_var=yes"
6907 else
6908   echo "configure: failed program was:" >&5
6909   cat conftest.$ac_ext >&5
6910   rm -rf conftest*
6911   eval "ac_cv_lib_$ac_lib_var=no"
6912 fi
6913 rm -f conftest*
6914 xe_check_libs=""
6915
6916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6917   echo "$ac_t""yes" 1>&6
6918   with_ldap_krbdes=yes
6919 else
6920   echo "$ac_t""no" 1>&6
6921 with_ldap_krbdes=no
6922 fi
6923
6924  }
6925   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
6926 fi
6927 if test "$with_ldap" = "yes"; then
6928   { test "$extra_verbose" = "yes" && cat << \EOF
6929     Defining HAVE_LDAP
6930 EOF
6931 cat >> confdefs.h <<\EOF
6932 #define HAVE_LDAP 1
6933 EOF
6934 }
6935
6936   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6937    echo "    xemacs will be linked with \"eldap.o\""
6938  fi
6939   if test "$with_ldap_nolber" = "yes" ; then
6940     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6941   else
6942     if test "$with_ldap_krb" = "yes" ; then
6943       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6944     fi
6945     if test "$with_ldap_krbdes" = "yes" ; then
6946       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6947       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6948     fi
6949     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6950     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6951   fi
6952   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6953 do
6954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6955 echo "configure:6956: checking for $ac_func" >&5
6956
6957 cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6960 /* System header to define __stub macros and hopefully few prototypes,
6961     which can conflict with char $ac_func(); below.  */
6962 #include <assert.h>
6963 /* Override any gcc2 internal prototype to avoid an error.  */
6964 /* We use char because int might match the return type of a gcc2
6965     builtin and then its argument prototype would still apply.  */
6966 char $ac_func();
6967
6968 int main() {
6969
6970 /* The GNU C library defines this for functions which it implements
6971     to always fail with ENOSYS.  Some functions are actually named
6972     something starting with __ and the normal name is an alias.  */
6973 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6974 choke me
6975 #else
6976 $ac_func();
6977 #endif
6978
6979 ; return 0; }
6980 EOF
6981 if { (eval echo configure:6982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6982   rm -rf conftest*
6983   eval "ac_cv_func_$ac_func=yes"
6984 else
6985   echo "configure: failed program was:" >&5
6986   cat conftest.$ac_ext >&5
6987   rm -rf conftest*
6988   eval "ac_cv_func_$ac_func=no"
6989 fi
6990 rm -f conftest*
6991
6992 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6993   echo "$ac_t""yes" 1>&6
6994     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6995   { test "$extra_verbose" = "yes" && cat << EOF
6996     Defining $ac_tr_func
6997 EOF
6998 cat >> confdefs.h <<EOF
6999 #define $ac_tr_func 1
7000 EOF
7001 }
7002  
7003 else
7004   echo "$ac_t""no" 1>&6
7005 fi
7006 done
7007
7008 fi
7009
7010
7011 if test "$window_system" != "none"; then
7012   echo "checking for graphics libraries" 1>&6
7013 echo "configure:7014: checking for graphics libraries" >&5
7014
7015     xpm_problem=""
7016   if test -z "$with_xpm"; then
7017     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7018 echo "configure:7019: checking for Xpm - no older than 3.4f" >&5
7019     xe_check_libs=-lXpm
7020     cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7023 #include <X11/xpm.h>
7024     int main(int c, char **v) {
7025     return c == 1 ? 0 :
7026       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7027       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7028 EOF
7029 if { (eval echo configure:7030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7030 then
7031   ./conftest dummy_arg; xpm_status=$?;
7032       if test "$xpm_status" = "0"; then
7033         with_xpm=yes;
7034       else
7035         with_xpm=no;
7036         if test "$xpm_status" = "1"; then
7037           xpm_problem="Xpm library version and header file version don't match!"
7038         elif test "$xpm_status" = "2"; then
7039           xpm_problem="Xpm library version is too old!"
7040         else
7041           xpm_problem="Internal xpm detection logic error!"
7042         fi
7043         echo "
7044 *** WARNING *** $xpm_problem
7045   I'm not touching that with a 10-foot pole!
7046   If you really want to use the installed version of Xpm, rerun
7047   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7048     fi
7049 else
7050   conftest_rc="$?"
7051   echo "configure: failed program was:" >&5
7052   cat conftest.$ac_ext >&5
7053   rm -fr conftest*
7054   with_xpm=no
7055 fi
7056 rm -fr conftest*
7057     xe_check_libs=
7058     echo "$ac_t""$with_xpm" 1>&6
7059   fi
7060   if test "$with_xpm" = "yes"; then
7061     { test "$extra_verbose" = "yes" && cat << \EOF
7062     Defining HAVE_XPM
7063 EOF
7064 cat >> confdefs.h <<\EOF
7065 #define HAVE_XPM 1
7066 EOF
7067 }
7068
7069     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7070     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7071 echo "configure:7072: checking for \"FOR_MSW\" xpm" >&5
7072     xe_check_libs=-lXpm
7073     cat > conftest.$ac_ext <<EOF
7074 #line 7075 "configure"
7075 #include "confdefs.h"
7076
7077 int main() {
7078 XpmCreatePixmapFromData()
7079 ; return 0; }
7080 EOF
7081 if { (eval echo configure:7082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7082   rm -rf conftest*
7083   xpm_for_msw=no
7084 else
7085   echo "configure: failed program was:" >&5
7086   cat conftest.$ac_ext >&5
7087   rm -rf conftest*
7088   xpm_for_msw=yes
7089 fi
7090 rm -f conftest*
7091     xe_check_libs=
7092     echo "$ac_t""$xpm_for_msw" 1>&6
7093     if test "$xpm_for_msw" = "yes"; then
7094       { test "$extra_verbose" = "yes" && cat << \EOF
7095     Defining FOR_MSW
7096 EOF
7097 cat >> confdefs.h <<\EOF
7098 #define FOR_MSW 1
7099 EOF
7100 }
7101
7102     fi
7103   fi
7104
7105     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7106 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7107 echo "configure:7108: checking for compface.h" >&5
7108
7109 cat > conftest.$ac_ext <<EOF
7110 #line 7111 "configure"
7111 #include "confdefs.h"
7112 #include <compface.h>
7113 EOF
7114 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7115 { (eval echo configure:7116: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7116 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7117 if test -z "$ac_err"; then
7118   rm -rf conftest*
7119   eval "ac_cv_header_$ac_safe=yes"
7120 else
7121   echo "$ac_err" >&5
7122   echo "configure: failed program was:" >&5
7123   cat conftest.$ac_ext >&5
7124   rm -rf conftest*
7125   eval "ac_cv_header_$ac_safe=no"
7126 fi
7127 rm -f conftest*
7128 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7129   echo "$ac_t""yes" 1>&6
7130   :
7131 else
7132   echo "$ac_t""no" 1>&6
7133 with_xface=no
7134 fi
7135  }
7136   test -z "$with_xface" && { 
7137 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7138 echo "configure:7139: checking for UnGenFace in -lcompface" >&5
7139 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7140
7141 xe_check_libs=" -lcompface "
7142 cat > conftest.$ac_ext <<EOF
7143 #line 7144 "configure"
7144 #include "confdefs.h"
7145 /* Override any gcc2 internal prototype to avoid an error.  */
7146 /* We use char because int might match the return type of a gcc2
7147     builtin and then its argument prototype would still apply.  */
7148 char UnGenFace();
7149
7150 int main() {
7151 UnGenFace()
7152 ; return 0; }
7153 EOF
7154 if { (eval echo configure:7155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7155   rm -rf conftest*
7156   eval "ac_cv_lib_$ac_lib_var=yes"
7157 else
7158   echo "configure: failed program was:" >&5
7159   cat conftest.$ac_ext >&5
7160   rm -rf conftest*
7161   eval "ac_cv_lib_$ac_lib_var=no"
7162 fi
7163 rm -f conftest*
7164 xe_check_libs=""
7165
7166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7167   echo "$ac_t""yes" 1>&6
7168   : 
7169 else
7170   echo "$ac_t""no" 1>&6
7171 with_xface=no
7172 fi
7173
7174  }
7175   test -z "$with_xface" && with_xface=yes
7176   if test "$with_xface" = "yes"; then
7177     { test "$extra_verbose" = "yes" && cat << \EOF
7178     Defining HAVE_XFACE
7179 EOF
7180 cat >> confdefs.h <<\EOF
7181 #define HAVE_XFACE 1
7182 EOF
7183 }
7184
7185     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7186   fi
7187
7188         if test "$with_gif" != "no"; then
7189     with_gif="yes"
7190     { test "$extra_verbose" = "yes" && cat << \EOF
7191     Defining HAVE_GIF
7192 EOF
7193 cat >> confdefs.h <<\EOF
7194 #define HAVE_GIF 1
7195 EOF
7196 }
7197
7198     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7199    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7200  fi
7201   fi
7202
7203       if test "$with_png $with_tiff" != "no no"; then
7204     
7205 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7206 echo "configure:7207: checking for inflate in -lc" >&5
7207 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7208
7209 xe_check_libs=" -lc "
7210 cat > conftest.$ac_ext <<EOF
7211 #line 7212 "configure"
7212 #include "confdefs.h"
7213 /* Override any gcc2 internal prototype to avoid an error.  */
7214 /* We use char because int might match the return type of a gcc2
7215     builtin and then its argument prototype would still apply.  */
7216 char inflate();
7217
7218 int main() {
7219 inflate()
7220 ; return 0; }
7221 EOF
7222 if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7223   rm -rf conftest*
7224   eval "ac_cv_lib_$ac_lib_var=yes"
7225 else
7226   echo "configure: failed program was:" >&5
7227   cat conftest.$ac_ext >&5
7228   rm -rf conftest*
7229   eval "ac_cv_lib_$ac_lib_var=no"
7230 fi
7231 rm -f conftest*
7232 xe_check_libs=""
7233
7234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7235   echo "$ac_t""yes" 1>&6
7236   :
7237 else
7238   echo "$ac_t""no" 1>&6
7239
7240 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7241 echo "configure:7242: checking for inflate in -lz" >&5
7242 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7243
7244 xe_check_libs=" -lz "
7245 cat > conftest.$ac_ext <<EOF
7246 #line 7247 "configure"
7247 #include "confdefs.h"
7248 /* Override any gcc2 internal prototype to avoid an error.  */
7249 /* We use char because int might match the return type of a gcc2
7250     builtin and then its argument prototype would still apply.  */
7251 char inflate();
7252
7253 int main() {
7254 inflate()
7255 ; return 0; }
7256 EOF
7257 if { (eval echo configure:7258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7258   rm -rf conftest*
7259   eval "ac_cv_lib_$ac_lib_var=yes"
7260 else
7261   echo "configure: failed program was:" >&5
7262   cat conftest.$ac_ext >&5
7263   rm -rf conftest*
7264   eval "ac_cv_lib_$ac_lib_var=no"
7265 fi
7266 rm -f conftest*
7267 xe_check_libs=""
7268
7269 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7270   echo "$ac_t""yes" 1>&6
7271   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7272 else
7273   echo "$ac_t""no" 1>&6
7274
7275 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7276 echo "configure:7277: checking for inflate in -lgz" >&5
7277 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7278
7279 xe_check_libs=" -lgz "
7280 cat > conftest.$ac_ext <<EOF
7281 #line 7282 "configure"
7282 #include "confdefs.h"
7283 /* Override any gcc2 internal prototype to avoid an error.  */
7284 /* We use char because int might match the return type of a gcc2
7285     builtin and then its argument prototype would still apply.  */
7286 char inflate();
7287
7288 int main() {
7289 inflate()
7290 ; return 0; }
7291 EOF
7292 if { (eval echo configure:7293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7293   rm -rf conftest*
7294   eval "ac_cv_lib_$ac_lib_var=yes"
7295 else
7296   echo "configure: failed program was:" >&5
7297   cat conftest.$ac_ext >&5
7298   rm -rf conftest*
7299   eval "ac_cv_lib_$ac_lib_var=no"
7300 fi
7301 rm -f conftest*
7302 xe_check_libs=""
7303
7304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7305   echo "$ac_t""yes" 1>&6
7306   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7307 else
7308   echo "$ac_t""no" 1>&6
7309 fi
7310
7311
7312 fi
7313
7314
7315 fi
7316
7317
7318   fi
7319
7320     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7321 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7322 echo "configure:7323: checking for jpeglib.h" >&5
7323
7324 cat > conftest.$ac_ext <<EOF
7325 #line 7326 "configure"
7326 #include "confdefs.h"
7327 #include <jpeglib.h>
7328 EOF
7329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7330 { (eval echo configure:7331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7332 if test -z "$ac_err"; then
7333   rm -rf conftest*
7334   eval "ac_cv_header_$ac_safe=yes"
7335 else
7336   echo "$ac_err" >&5
7337   echo "configure: failed program was:" >&5
7338   cat conftest.$ac_ext >&5
7339   rm -rf conftest*
7340   eval "ac_cv_header_$ac_safe=no"
7341 fi
7342 rm -f conftest*
7343 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7344   echo "$ac_t""yes" 1>&6
7345   :
7346 else
7347   echo "$ac_t""no" 1>&6
7348 with_jpeg=no
7349 fi
7350  }
7351   test -z "$with_jpeg" && { 
7352 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7353 echo "configure:7354: checking for jpeg_destroy_decompress in -ljpeg" >&5
7354 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7355
7356 xe_check_libs=" -ljpeg "
7357 cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* Override any gcc2 internal prototype to avoid an error.  */
7361 /* We use char because int might match the return type of a gcc2
7362     builtin and then its argument prototype would still apply.  */
7363 char jpeg_destroy_decompress();
7364
7365 int main() {
7366 jpeg_destroy_decompress()
7367 ; return 0; }
7368 EOF
7369 if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7370   rm -rf conftest*
7371   eval "ac_cv_lib_$ac_lib_var=yes"
7372 else
7373   echo "configure: failed program was:" >&5
7374   cat conftest.$ac_ext >&5
7375   rm -rf conftest*
7376   eval "ac_cv_lib_$ac_lib_var=no"
7377 fi
7378 rm -f conftest*
7379 xe_check_libs=""
7380
7381 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7382   echo "$ac_t""yes" 1>&6
7383   :
7384 else
7385   echo "$ac_t""no" 1>&6
7386 with_jpeg=no
7387 fi
7388
7389  }
7390   test -z "$with_jpeg" && with_jpeg=yes
7391   if test "$with_jpeg" = "yes"; then
7392     { test "$extra_verbose" = "yes" && cat << \EOF
7393     Defining HAVE_JPEG
7394 EOF
7395 cat >> confdefs.h <<\EOF
7396 #define HAVE_JPEG 1
7397 EOF
7398 }
7399
7400     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7401   fi
7402
7403     png_problem=""
7404   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7405 echo "configure:7406: checking for pow" >&5
7406
7407 cat > conftest.$ac_ext <<EOF
7408 #line 7409 "configure"
7409 #include "confdefs.h"
7410 /* System header to define __stub macros and hopefully few prototypes,
7411     which can conflict with char pow(); below.  */
7412 #include <assert.h>
7413 /* Override any gcc2 internal prototype to avoid an error.  */
7414 /* We use char because int might match the return type of a gcc2
7415     builtin and then its argument prototype would still apply.  */
7416 char pow();
7417
7418 int main() {
7419
7420 /* The GNU C library defines this for functions which it implements
7421     to always fail with ENOSYS.  Some functions are actually named
7422     something starting with __ and the normal name is an alias.  */
7423 #if defined (__stub_pow) || defined (__stub___pow)
7424 choke me
7425 #else
7426 pow();
7427 #endif
7428
7429 ; return 0; }
7430 EOF
7431 if { (eval echo configure:7432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7432   rm -rf conftest*
7433   eval "ac_cv_func_pow=yes"
7434 else
7435   echo "configure: failed program was:" >&5
7436   cat conftest.$ac_ext >&5
7437   rm -rf conftest*
7438   eval "ac_cv_func_pow=no"
7439 fi
7440 rm -f conftest*
7441
7442 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7443   echo "$ac_t""yes" 1>&6
7444   :
7445 else
7446   echo "$ac_t""no" 1>&6
7447 with_png=no
7448 fi
7449  }
7450   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7451 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7452 echo "configure:7453: checking for png.h" >&5
7453
7454 cat > conftest.$ac_ext <<EOF
7455 #line 7456 "configure"
7456 #include "confdefs.h"
7457 #include <png.h>
7458 EOF
7459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7460 { (eval echo configure:7461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7462 if test -z "$ac_err"; then
7463   rm -rf conftest*
7464   eval "ac_cv_header_$ac_safe=yes"
7465 else
7466   echo "$ac_err" >&5
7467   echo "configure: failed program was:" >&5
7468   cat conftest.$ac_ext >&5
7469   rm -rf conftest*
7470   eval "ac_cv_header_$ac_safe=no"
7471 fi
7472 rm -f conftest*
7473 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7474   echo "$ac_t""yes" 1>&6
7475   :
7476 else
7477   echo "$ac_t""no" 1>&6
7478 with_png=no
7479 fi
7480  }
7481   test -z "$with_png" && { 
7482 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7483 echo "configure:7484: checking for png_read_image in -lpng" >&5
7484 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7485
7486 xe_check_libs=" -lpng "
7487 cat > conftest.$ac_ext <<EOF
7488 #line 7489 "configure"
7489 #include "confdefs.h"
7490 /* Override any gcc2 internal prototype to avoid an error.  */
7491 /* We use char because int might match the return type of a gcc2
7492     builtin and then its argument prototype would still apply.  */
7493 char png_read_image();
7494
7495 int main() {
7496 png_read_image()
7497 ; return 0; }
7498 EOF
7499 if { (eval echo configure:7500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7500   rm -rf conftest*
7501   eval "ac_cv_lib_$ac_lib_var=yes"
7502 else
7503   echo "configure: failed program was:" >&5
7504   cat conftest.$ac_ext >&5
7505   rm -rf conftest*
7506   eval "ac_cv_lib_$ac_lib_var=no"
7507 fi
7508 rm -f conftest*
7509 xe_check_libs=""
7510
7511 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7512   echo "$ac_t""yes" 1>&6
7513   :
7514 else
7515   echo "$ac_t""no" 1>&6
7516 with_png=no
7517 fi
7518
7519  }
7520   if test -z "$with_png"; then
7521     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7522 echo "configure:7523: checking for workable png version information" >&5
7523     xe_check_libs="-lpng -lz"
7524     cat > conftest.$ac_ext <<EOF
7525 #line 7526 "configure"
7526 #include "confdefs.h"
7527 #include <png.h>
7528     int main(int c, char **v) {
7529     if (c == 1) return 0;
7530     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7531     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7532 EOF
7533 if { (eval echo configure:7534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7534 then
7535   ./conftest dummy_arg; png_status=$?;
7536       if test "$png_status" = "0"; then
7537         with_png=yes;
7538       else
7539         with_png=no;
7540         if test "$png_status" = "1"; then
7541           png_problem="PNG library version and header file don't match!"
7542         elif test "$png_status" = "2"; then
7543           png_problem="PNG library version too old (pre 1.0.2)!"
7544         fi
7545         echo "
7546 *** WARNING *** $png_problem
7547   I'm not touching that with a 10-foot pole!
7548   If you really want to use the installed version of libPNG, rerun
7549   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7550     fi
7551 else
7552   conftest_rc="$?"
7553   echo "configure: failed program was:" >&5
7554   cat conftest.$ac_ext >&5
7555   rm -fr conftest*
7556   with_png=no
7557 fi
7558 rm -fr conftest*
7559     xe_check_libs=
7560     echo "$ac_t""$with_png" 1>&6
7561   fi
7562   if test "$with_png" = "yes"; then
7563     { test "$extra_verbose" = "yes" && cat << \EOF
7564     Defining HAVE_PNG
7565 EOF
7566 cat >> confdefs.h <<\EOF
7567 #define HAVE_PNG 1
7568 EOF
7569 }
7570
7571     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7572   fi
7573
7574     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7575 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7576 echo "configure:7577: checking for tiffio.h" >&5
7577
7578 cat > conftest.$ac_ext <<EOF
7579 #line 7580 "configure"
7580 #include "confdefs.h"
7581 #include <tiffio.h>
7582 EOF
7583 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7584 { (eval echo configure:7585: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7585 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7586 if test -z "$ac_err"; then
7587   rm -rf conftest*
7588   eval "ac_cv_header_$ac_safe=yes"
7589 else
7590   echo "$ac_err" >&5
7591   echo "configure: failed program was:" >&5
7592   cat conftest.$ac_ext >&5
7593   rm -rf conftest*
7594   eval "ac_cv_header_$ac_safe=no"
7595 fi
7596 rm -f conftest*
7597 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7598   echo "$ac_t""yes" 1>&6
7599   :
7600 else
7601   echo "$ac_t""no" 1>&6
7602 with_tiff=no
7603 fi
7604  }
7605   test -z "$with_tiff" && { 
7606 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7607 echo "configure:7608: checking for TIFFClientOpen in -ltiff" >&5
7608 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7609
7610 xe_check_libs=" -ltiff "
7611 cat > conftest.$ac_ext <<EOF
7612 #line 7613 "configure"
7613 #include "confdefs.h"
7614 /* Override any gcc2 internal prototype to avoid an error.  */
7615 /* We use char because int might match the return type of a gcc2
7616     builtin and then its argument prototype would still apply.  */
7617 char TIFFClientOpen();
7618
7619 int main() {
7620 TIFFClientOpen()
7621 ; return 0; }
7622 EOF
7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7624   rm -rf conftest*
7625   eval "ac_cv_lib_$ac_lib_var=yes"
7626 else
7627   echo "configure: failed program was:" >&5
7628   cat conftest.$ac_ext >&5
7629   rm -rf conftest*
7630   eval "ac_cv_lib_$ac_lib_var=no"
7631 fi
7632 rm -f conftest*
7633 xe_check_libs=""
7634
7635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7636   echo "$ac_t""yes" 1>&6
7637   :
7638 else
7639   echo "$ac_t""no" 1>&6
7640 with_tiff=no
7641 fi
7642
7643  }
7644   test -z "$with_tiff" && with_tiff=yes
7645   if test "$with_tiff" = "yes"; then
7646     { test "$extra_verbose" = "yes" && cat << \EOF
7647     Defining HAVE_TIFF
7648 EOF
7649 cat >> confdefs.h <<\EOF
7650 #define HAVE_TIFF 1
7651 EOF
7652 }
7653
7654     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7655   fi
7656 fi
7657
7658
7659 if test "$with_x11" = "yes"; then
7660
7661   echo "checking for X11 graphics libraries" 1>&6
7662 echo "configure:7663: checking for X11 graphics libraries" >&5
7663
7664   echo "checking for the Athena widgets" 1>&6
7665 echo "configure:7666: checking for the Athena widgets" >&5
7666
7667     case "$with_athena" in
7668         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7669     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7670     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7671     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7672     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7673     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7674   esac
7675
7676     if test "$athena_3d" = "no"; then
7677     
7678 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7679 echo "configure:7680: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7680 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7681
7682 xe_check_libs=" -l$athena_variant "
7683 cat > conftest.$ac_ext <<EOF
7684 #line 7685 "configure"
7685 #include "confdefs.h"
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 /* We use char because int might match the return type of a gcc2
7688     builtin and then its argument prototype would still apply.  */
7689 char XawScrollbarSetThumb();
7690
7691 int main() {
7692 XawScrollbarSetThumb()
7693 ; return 0; }
7694 EOF
7695 if { (eval echo configure:7696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7696   rm -rf conftest*
7697   eval "ac_cv_lib_$ac_lib_var=yes"
7698 else
7699   echo "configure: failed program was:" >&5
7700   cat conftest.$ac_ext >&5
7701   rm -rf conftest*
7702   eval "ac_cv_lib_$ac_lib_var=no"
7703 fi
7704 rm -f conftest*
7705 xe_check_libs=""
7706
7707 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7708   echo "$ac_t""yes" 1>&6
7709           
7710 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7711 echo "configure:7712: checking for threeDClassRec in -l$athena_variant" >&5
7712 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7713
7714 xe_check_libs=" -l$athena_variant "
7715 cat > conftest.$ac_ext <<EOF
7716 #line 7717 "configure"
7717 #include "confdefs.h"
7718 /* Override any gcc2 internal prototype to avoid an error.  */
7719 /* We use char because int might match the return type of a gcc2
7720     builtin and then its argument prototype would still apply.  */
7721 char threeDClassRec();
7722
7723 int main() {
7724 threeDClassRec()
7725 ; return 0; }
7726 EOF
7727 if { (eval echo configure:7728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7728   rm -rf conftest*
7729   eval "ac_cv_lib_$ac_lib_var=yes"
7730 else
7731   echo "configure: failed program was:" >&5
7732   cat conftest.$ac_ext >&5
7733   rm -rf conftest*
7734   eval "ac_cv_lib_$ac_lib_var=no"
7735 fi
7736 rm -f conftest*
7737 xe_check_libs=""
7738
7739 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7740   echo "$ac_t""yes" 1>&6
7741   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7742 else
7743   echo "$ac_t""no" 1>&6
7744 athena_lib=$athena_variant
7745 fi
7746
7747
7748       
7749 else
7750   echo "$ac_t""no" 1>&6
7751 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7752 fi
7753
7754
7755   else
7756         
7757 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7758 echo "configure:7759: checking for threeDClassRec in -l$athena_variant" >&5
7759 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7760
7761 xe_check_libs=" -l$athena_variant "
7762 cat > conftest.$ac_ext <<EOF
7763 #line 7764 "configure"
7764 #include "confdefs.h"
7765 /* Override any gcc2 internal prototype to avoid an error.  */
7766 /* We use char because int might match the return type of a gcc2
7767     builtin and then its argument prototype would still apply.  */
7768 char threeDClassRec();
7769
7770 int main() {
7771 threeDClassRec()
7772 ; return 0; }
7773 EOF
7774 if { (eval echo configure:7775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7775   rm -rf conftest*
7776   eval "ac_cv_lib_$ac_lib_var=yes"
7777 else
7778   echo "configure: failed program was:" >&5
7779   cat conftest.$ac_ext >&5
7780   rm -rf conftest*
7781   eval "ac_cv_lib_$ac_lib_var=no"
7782 fi
7783 rm -f conftest*
7784 xe_check_libs=""
7785
7786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7787   echo "$ac_t""yes" 1>&6
7788   athena_lib=$athena_variant
7789 else
7790   echo "$ac_t""no" 1>&6
7791 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7792 echo "configure:7793: checking for threeDClassRec in -lXaw" >&5
7793 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7794
7795 xe_check_libs=" -lXaw "
7796 cat > conftest.$ac_ext <<EOF
7797 #line 7798 "configure"
7798 #include "confdefs.h"
7799 /* Override any gcc2 internal prototype to avoid an error.  */
7800 /* We use char because int might match the return type of a gcc2
7801     builtin and then its argument prototype would still apply.  */
7802 char threeDClassRec();
7803
7804 int main() {
7805 threeDClassRec()
7806 ; return 0; }
7807 EOF
7808 if { (eval echo configure:7809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7809   rm -rf conftest*
7810   eval "ac_cv_lib_$ac_lib_var=yes"
7811 else
7812   echo "configure: failed program was:" >&5
7813   cat conftest.$ac_ext >&5
7814   rm -rf conftest*
7815   eval "ac_cv_lib_$ac_lib_var=no"
7816 fi
7817 rm -f conftest*
7818 xe_check_libs=""
7819
7820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7821   echo "$ac_t""yes" 1>&6
7822   athena_lib=Xaw;
7823           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7824         
7825 else
7826   echo "$ac_t""no" 1>&6
7827 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7828 fi
7829
7830
7831 fi
7832
7833
7834   fi
7835
7836     if test "$athena_3d" = "no"; then
7837     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7838 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7839 echo "configure:7840: checking for X11/Xaw/ThreeD.h" >&5
7840
7841 cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 #include <X11/Xaw/ThreeD.h>
7845 EOF
7846 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7847 { (eval echo configure:7848: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7848 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7849 if test -z "$ac_err"; then
7850   rm -rf conftest*
7851   eval "ac_cv_header_$ac_safe=yes"
7852 else
7853   echo "$ac_err" >&5
7854   echo "configure: failed program was:" >&5
7855   cat conftest.$ac_ext >&5
7856   rm -rf conftest*
7857   eval "ac_cv_header_$ac_safe=no"
7858 fi
7859 rm -f conftest*
7860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7861   echo "$ac_t""yes" 1>&6
7862   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7863 else
7864   echo "$ac_t""no" 1>&6
7865 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7866 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7867 echo "configure:7868: checking for X11/Xaw/XawInit.h" >&5
7868
7869 cat > conftest.$ac_ext <<EOF
7870 #line 7871 "configure"
7871 #include "confdefs.h"
7872 #include <X11/Xaw/XawInit.h>
7873 EOF
7874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7875 { (eval echo configure:7876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7877 if test -z "$ac_err"; then
7878   rm -rf conftest*
7879   eval "ac_cv_header_$ac_safe=yes"
7880 else
7881   echo "$ac_err" >&5
7882   echo "configure: failed program was:" >&5
7883   cat conftest.$ac_ext >&5
7884   rm -rf conftest*
7885   eval "ac_cv_header_$ac_safe=no"
7886 fi
7887 rm -f conftest*
7888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7889   echo "$ac_t""yes" 1>&6
7890   athena_h_path=X11/Xaw
7891 else
7892   echo "$ac_t""no" 1>&6
7893 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7894 fi
7895
7896 fi
7897
7898   else
7899             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7900 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7901 echo "configure:7902: checking for X11/$athena_variant/XawInit.h" >&5
7902
7903 cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7906 #include <X11/$athena_variant/XawInit.h>
7907 EOF
7908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7909 { (eval echo configure:7910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7911 if test -z "$ac_err"; then
7912   rm -rf conftest*
7913   eval "ac_cv_header_$ac_safe=yes"
7914 else
7915   echo "$ac_err" >&5
7916   echo "configure: failed program was:" >&5
7917   cat conftest.$ac_ext >&5
7918   rm -rf conftest*
7919   eval "ac_cv_header_$ac_safe=no"
7920 fi
7921 rm -f conftest*
7922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7923   echo "$ac_t""yes" 1>&6
7924   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7925 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7926 echo "configure:7927: checking for X11/$athena_variant/ThreeD.h" >&5
7927
7928 cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931 #include <X11/$athena_variant/ThreeD.h>
7932 EOF
7933 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7934 { (eval echo configure:7935: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7935 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7936 if test -z "$ac_err"; then
7937   rm -rf conftest*
7938   eval "ac_cv_header_$ac_safe=yes"
7939 else
7940   echo "$ac_err" >&5
7941   echo "configure: failed program was:" >&5
7942   cat conftest.$ac_ext >&5
7943   rm -rf conftest*
7944   eval "ac_cv_header_$ac_safe=no"
7945 fi
7946 rm -f conftest*
7947 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7948   echo "$ac_t""yes" 1>&6
7949   athena_h_path=X11/$athena_variant
7950 else
7951   echo "$ac_t""no" 1>&6
7952 fi
7953
7954 else
7955   echo "$ac_t""no" 1>&6
7956 fi
7957
7958
7959         if test -z "$athena_h_path"; then
7960       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7961 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
7962 echo "configure:7963: checking for $athena_variant/XawInit.h" >&5
7963
7964 cat > conftest.$ac_ext <<EOF
7965 #line 7966 "configure"
7966 #include "confdefs.h"
7967 #include <$athena_variant/XawInit.h>
7968 EOF
7969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7970 { (eval echo configure:7971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7972 if test -z "$ac_err"; then
7973   rm -rf conftest*
7974   eval "ac_cv_header_$ac_safe=yes"
7975 else
7976   echo "$ac_err" >&5
7977   echo "configure: failed program was:" >&5
7978   cat conftest.$ac_ext >&5
7979   rm -rf conftest*
7980   eval "ac_cv_header_$ac_safe=no"
7981 fi
7982 rm -f conftest*
7983 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7984   echo "$ac_t""yes" 1>&6
7985   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7986 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
7987 echo "configure:7988: checking for $athena_variant/ThreeD.h" >&5
7988
7989 cat > conftest.$ac_ext <<EOF
7990 #line 7991 "configure"
7991 #include "confdefs.h"
7992 #include <$athena_variant/ThreeD.h>
7993 EOF
7994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7995 { (eval echo configure:7996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7997 if test -z "$ac_err"; then
7998   rm -rf conftest*
7999   eval "ac_cv_header_$ac_safe=yes"
8000 else
8001   echo "$ac_err" >&5
8002   echo "configure: failed program was:" >&5
8003   cat conftest.$ac_ext >&5
8004   rm -rf conftest*
8005   eval "ac_cv_header_$ac_safe=no"
8006 fi
8007 rm -f conftest*
8008 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8009   echo "$ac_t""yes" 1>&6
8010   athena_h_path=$athena_variant
8011 else
8012   echo "$ac_t""no" 1>&6
8013 fi
8014
8015 else
8016   echo "$ac_t""no" 1>&6
8017 fi
8018
8019     fi
8020
8021         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8022       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8023 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8024 echo "configure:8025: checking for X11/Xaw3d/XawInit.h" >&5
8025
8026 cat > conftest.$ac_ext <<EOF
8027 #line 8028 "configure"
8028 #include "confdefs.h"
8029 #include <X11/Xaw3d/XawInit.h>
8030 EOF
8031 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8032 { (eval echo configure:8033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8033 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8034 if test -z "$ac_err"; then
8035   rm -rf conftest*
8036   eval "ac_cv_header_$ac_safe=yes"
8037 else
8038   echo "$ac_err" >&5
8039   echo "configure: failed program was:" >&5
8040   cat conftest.$ac_ext >&5
8041   rm -rf conftest*
8042   eval "ac_cv_header_$ac_safe=no"
8043 fi
8044 rm -f conftest*
8045 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8046   echo "$ac_t""yes" 1>&6
8047   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8048 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8049 echo "configure:8050: checking for X11/Xaw3d/ThreeD.h" >&5
8050
8051 cat > conftest.$ac_ext <<EOF
8052 #line 8053 "configure"
8053 #include "confdefs.h"
8054 #include <X11/Xaw3d/ThreeD.h>
8055 EOF
8056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8057 { (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8058 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8059 if test -z "$ac_err"; then
8060   rm -rf conftest*
8061   eval "ac_cv_header_$ac_safe=yes"
8062 else
8063   echo "$ac_err" >&5
8064   echo "configure: failed program was:" >&5
8065   cat conftest.$ac_ext >&5
8066   rm -rf conftest*
8067   eval "ac_cv_header_$ac_safe=no"
8068 fi
8069 rm -f conftest*
8070 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8071   echo "$ac_t""yes" 1>&6
8072   
8073             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8074             athena_h_path=X11/Xaw3d
8075           
8076 else
8077   echo "$ac_t""no" 1>&6
8078 fi
8079
8080 else
8081   echo "$ac_t""no" 1>&6
8082 fi
8083
8084     fi
8085
8086         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8087       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8088 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8089 echo "configure:8090: checking for Xaw3d/XawInit.h" >&5
8090
8091 cat > conftest.$ac_ext <<EOF
8092 #line 8093 "configure"
8093 #include "confdefs.h"
8094 #include <Xaw3d/XawInit.h>
8095 EOF
8096 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8097 { (eval echo configure:8098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8098 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8099 if test -z "$ac_err"; then
8100   rm -rf conftest*
8101   eval "ac_cv_header_$ac_safe=yes"
8102 else
8103   echo "$ac_err" >&5
8104   echo "configure: failed program was:" >&5
8105   cat conftest.$ac_ext >&5
8106   rm -rf conftest*
8107   eval "ac_cv_header_$ac_safe=no"
8108 fi
8109 rm -f conftest*
8110 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8111   echo "$ac_t""yes" 1>&6
8112   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8113 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8114 echo "configure:8115: checking for Xaw3d/ThreeD.h" >&5
8115
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 #include <Xaw3d/ThreeD.h>
8120 EOF
8121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8122 { (eval echo configure:8123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8124 if test -z "$ac_err"; then
8125   rm -rf conftest*
8126   eval "ac_cv_header_$ac_safe=yes"
8127 else
8128   echo "$ac_err" >&5
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   eval "ac_cv_header_$ac_safe=no"
8133 fi
8134 rm -f conftest*
8135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8136   echo "$ac_t""yes" 1>&6
8137   
8138             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8139             athena_h_path=Xaw3d
8140           
8141 else
8142   echo "$ac_t""no" 1>&6
8143 fi
8144
8145 else
8146   echo "$ac_t""no" 1>&6
8147 fi
8148
8149     fi
8150
8151             if test -z "$athena_h_path"; then
8152       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8153 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8154 echo "configure:8155: checking for X11/Xaw/ThreeD.h" >&5
8155
8156 cat > conftest.$ac_ext <<EOF
8157 #line 8158 "configure"
8158 #include "confdefs.h"
8159 #include <X11/Xaw/ThreeD.h>
8160 EOF
8161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8162 { (eval echo configure:8163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8164 if test -z "$ac_err"; then
8165   rm -rf conftest*
8166   eval "ac_cv_header_$ac_safe=yes"
8167 else
8168   echo "$ac_err" >&5
8169   echo "configure: failed program was:" >&5
8170   cat conftest.$ac_ext >&5
8171   rm -rf conftest*
8172   eval "ac_cv_header_$ac_safe=no"
8173 fi
8174 rm -f conftest*
8175 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8176   echo "$ac_t""yes" 1>&6
8177   
8178           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8179           athena_h_path=X11/Xaw
8180         
8181 else
8182   echo "$ac_t""no" 1>&6
8183 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8184 fi
8185
8186     fi
8187   fi
8188
8189     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8190     have_xaw=yes
8191   else
8192     have_xaw=no
8193   fi
8194
8195     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8196 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8197 echo "configure:8198: checking for Xm/Xm.h" >&5
8198
8199 cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 #include <Xm/Xm.h>
8203 EOF
8204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8205 { (eval echo configure:8206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8207 if test -z "$ac_err"; then
8208   rm -rf conftest*
8209   eval "ac_cv_header_$ac_safe=yes"
8210 else
8211   echo "$ac_err" >&5
8212   echo "configure: failed program was:" >&5
8213   cat conftest.$ac_ext >&5
8214   rm -rf conftest*
8215   eval "ac_cv_header_$ac_safe=no"
8216 fi
8217 rm -f conftest*
8218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8219   echo "$ac_t""yes" 1>&6
8220   
8221 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8222 echo "configure:8223: checking for XmStringFree in -lXm" >&5
8223 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8224
8225 xe_check_libs=" -lXm "
8226 cat > conftest.$ac_ext <<EOF
8227 #line 8228 "configure"
8228 #include "confdefs.h"
8229 /* Override any gcc2 internal prototype to avoid an error.  */
8230 /* We use char because int might match the return type of a gcc2
8231     builtin and then its argument prototype would still apply.  */
8232 char XmStringFree();
8233
8234 int main() {
8235 XmStringFree()
8236 ; return 0; }
8237 EOF
8238 if { (eval echo configure:8239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8239   rm -rf conftest*
8240   eval "ac_cv_lib_$ac_lib_var=yes"
8241 else
8242   echo "configure: failed program was:" >&5
8243   cat conftest.$ac_ext >&5
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=no"
8246 fi
8247 rm -f conftest*
8248 xe_check_libs=""
8249
8250 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8251   echo "$ac_t""yes" 1>&6
8252   have_motif=yes
8253 else
8254   echo "$ac_t""no" 1>&6
8255 have_motif=no
8256 fi
8257
8258
8259 else
8260   echo "$ac_t""no" 1>&6
8261 have_motif=no
8262 fi
8263
8264
8265   if test "$have_motif" = "yes"; then
8266         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8267 echo "configure:8268: checking for Lesstif" >&5
8268     cat > conftest.$ac_ext <<EOF
8269 #line 8270 "configure"
8270 #include "confdefs.h"
8271 #include <Xm/Xm.h>
8272 #ifdef LESSTIF_VERSION
8273 yes
8274 #endif
8275
8276 EOF
8277 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8278   egrep "yes" >/dev/null 2>&1; then
8279   rm -rf conftest*
8280   have_lesstif=yes
8281 else
8282   rm -rf conftest*
8283   have_lesstif=no
8284 fi
8285 rm -f conftest*
8286
8287   echo "$ac_t""$have_lesstif" 1>&6
8288   fi
8289
8290 fi 
8291
8292 case "$with_menubars" in "" | "yes" | "athena" )
8293   with_menubars="lucid" ;;
8294 esac
8295 case "$with_dialogs" in "" | "yes" | "lucid" )
8296   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8297   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8298   else with_dialogs=no
8299   fi ;;
8300 esac
8301 case "$with_scrollbars" in "" | "yes" )
8302   with_scrollbars="lucid" ;;
8303 esac
8304 case "$with_widgets" in "" | "yes" | "lucid")
8305   if   test "$have_motif" = "yes"; then with_widgets="motif"
8306   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8307   else with_widgets=no
8308   fi ;;
8309 esac
8310
8311 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8312
8313 case "$all_widgets" in
8314   *athena* )
8315     if test "$have_xaw" != "yes"; then
8316       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8317     fi
8318
8319         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8320
8321         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8322
8323             { test "$extra_verbose" = "yes" && cat << EOF
8324     Defining ATHENA_H_PATH = $athena_h_path
8325 EOF
8326 cat >> confdefs.h <<EOF
8327 #define ATHENA_H_PATH $athena_h_path
8328 EOF
8329 }
8330
8331
8332     { test "$extra_verbose" = "yes" && cat << \EOF
8333     Defining LWLIB_USES_ATHENA
8334 EOF
8335 cat >> confdefs.h <<\EOF
8336 #define LWLIB_USES_ATHENA 1
8337 EOF
8338 }
8339
8340     { test "$extra_verbose" = "yes" && cat << \EOF
8341     Defining NEED_ATHENA
8342 EOF
8343 cat >> confdefs.h <<\EOF
8344 #define NEED_ATHENA 1
8345 EOF
8346 }
8347
8348
8349     if test "$athena_3d" = "yes"; then
8350       { test "$extra_verbose" = "yes" && cat << \EOF
8351     Defining HAVE_ATHENA_3D
8352 EOF
8353 cat >> confdefs.h <<\EOF
8354 #define HAVE_ATHENA_3D 1
8355 EOF
8356 }
8357
8358     fi
8359   ;;
8360 esac
8361
8362 case "$all_widgets" in *motif* )
8363   { test "$extra_verbose" = "yes" && cat << \EOF
8364     Defining LWLIB_USES_MOTIF
8365 EOF
8366 cat >> confdefs.h <<\EOF
8367 #define LWLIB_USES_MOTIF 1
8368 EOF
8369 }
8370
8371   { test "$extra_verbose" = "yes" && cat << \EOF
8372     Defining NEED_MOTIF
8373 EOF
8374 cat >> confdefs.h <<\EOF
8375 #define NEED_MOTIF 1
8376 EOF
8377 }
8378
8379   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8380   need_motif=yes ;;
8381 esac
8382
8383 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8384 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8385 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8386 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8387         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8388 case "$with_widgets" in athena* )
8389         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;;
8390 esac
8391 case "$all_widgets" in *lucid* )
8392   { test "$extra_verbose" = "yes" && cat << \EOF
8393     Defining NEED_LUCID
8394 EOF
8395 cat >> confdefs.h <<\EOF
8396 #define NEED_LUCID 1
8397 EOF
8398 }
8399
8400   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8401 esac
8402
8403
8404
8405 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8406     Defining LWLIB_SCROLLBARS_ATHENA
8407 EOF
8408 cat >> confdefs.h <<\EOF
8409 #define LWLIB_SCROLLBARS_ATHENA 1
8410 EOF
8411 }
8412
8413 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8414     Defining LWLIB_DIALOGS_ATHENA
8415 EOF
8416 cat >> confdefs.h <<\EOF
8417 #define LWLIB_DIALOGS_ATHENA 1
8418 EOF
8419 }
8420
8421
8422 if test "$athena_3d" = "yes"; then
8423   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8424     Defining LWLIB_SCROLLBARS_ATHENA3D
8425 EOF
8426 cat >> confdefs.h <<\EOF
8427 #define LWLIB_SCROLLBARS_ATHENA3D 1
8428 EOF
8429 }
8430
8431   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8432     Defining LWLIB_DIALOGS_ATHENA3D
8433 EOF
8434 cat >> confdefs.h <<\EOF
8435 #define LWLIB_DIALOGS_ATHENA3D 1
8436 EOF
8437 }
8438
8439 fi
8440
8441 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8442     Defining LWLIB_WIDGETS_ATHENA
8443 EOF
8444 cat >> confdefs.h <<\EOF
8445 #define LWLIB_WIDGETS_ATHENA 1
8446 EOF
8447 }
8448 ;; esac
8449 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8450         { test "$extra_verbose" = "yes" && cat << \EOF
8451     Defining LWLIB_TABS_LUCID
8452 EOF
8453 cat >> confdefs.h <<\EOF
8454 #define LWLIB_TABS_LUCID 1
8455 EOF
8456 }
8457
8458
8459 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8460     Defining HAVE_MENUBARS
8461 EOF
8462 cat >> confdefs.h <<\EOF
8463 #define HAVE_MENUBARS 1
8464 EOF
8465 }
8466
8467 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8468     Defining HAVE_SCROLLBARS
8469 EOF
8470 cat >> confdefs.h <<\EOF
8471 #define HAVE_SCROLLBARS 1
8472 EOF
8473 }
8474
8475 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8476     Defining HAVE_DIALOGS
8477 EOF
8478 cat >> confdefs.h <<\EOF
8479 #define HAVE_DIALOGS 1
8480 EOF
8481 }
8482
8483 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8484     Defining HAVE_TOOLBARS
8485 EOF
8486 cat >> confdefs.h <<\EOF
8487 #define HAVE_TOOLBARS 1
8488 EOF
8489 }
8490
8491 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8492     Defining HAVE_WIDGETS
8493 EOF
8494 cat >> confdefs.h <<\EOF
8495 #define HAVE_WIDGETS 1
8496 EOF
8497 }
8498
8499
8500 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8501     Defining LWLIB_MENUBARS_LUCID
8502 EOF
8503 cat >> confdefs.h <<\EOF
8504 #define LWLIB_MENUBARS_LUCID 1
8505 EOF
8506 }
8507
8508 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8509     Defining LWLIB_SCROLLBARS_LUCID
8510 EOF
8511 cat >> confdefs.h <<\EOF
8512 #define LWLIB_SCROLLBARS_LUCID 1
8513 EOF
8514 }
8515
8516
8517 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8518     Defining LWLIB_MENUBARS_MOTIF
8519 EOF
8520 cat >> confdefs.h <<\EOF
8521 #define LWLIB_MENUBARS_MOTIF 1
8522 EOF
8523 }
8524
8525 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8526     Defining LWLIB_SCROLLBARS_MOTIF
8527 EOF
8528 cat >> confdefs.h <<\EOF
8529 #define LWLIB_SCROLLBARS_MOTIF 1
8530 EOF
8531 }
8532
8533 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8534     Defining LWLIB_DIALOGS_MOTIF
8535 EOF
8536 cat >> confdefs.h <<\EOF
8537 #define LWLIB_DIALOGS_MOTIF 1
8538 EOF
8539 }
8540
8541 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8542     Defining LWLIB_WIDGETS_MOTIF
8543 EOF
8544 cat >> confdefs.h <<\EOF
8545 #define LWLIB_WIDGETS_MOTIF 1
8546 EOF
8547 }
8548
8549
8550 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8551    echo "    xemacs will be linked with \"menubar.o\""
8552  fi
8553 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8554    echo "    xemacs will be linked with \"scrollbar.o\""
8555  fi
8556 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8557    echo "    xemacs will be linked with \"dialog.o\""
8558  fi
8559 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8560    echo "    xemacs will be linked with \"toolbar.o\""
8561  fi
8562
8563 if test "$with_x11" = "yes"; then
8564   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8565    echo "    xemacs will be linked with \"menubar-x.o\""
8566  fi
8567   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8568    echo "    xemacs will be linked with \"scrollbar-x.o\""
8569  fi
8570   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8571    echo "    xemacs will be linked with \"dialog-x.o\""
8572  fi
8573   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8574    echo "    xemacs will be linked with \"toolbar-x.o\""
8575  fi
8576   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8577    echo "    xemacs will be linked with \"gui-x.o\""
8578  fi
8579 fi
8580
8581
8582 test -z "$with_mule" && with_mule=no
8583 test -z "$with_file_coding" && with_file_coding=no
8584
8585
8586 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8587   { test "$extra_verbose" = "yes" && cat << \EOF
8588     Defining FILE_CODING
8589 EOF
8590 cat >> confdefs.h <<\EOF
8591 #define FILE_CODING 1
8592 EOF
8593 }
8594
8595   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8596    echo "    xemacs will be linked with \"file-coding.o\""
8597  fi
8598 fi
8599
8600 if test "$with_mule" = "yes" ; then
8601   echo "checking for Mule-related features" 1>&6
8602 echo "configure:8603: checking for Mule-related features" >&5
8603   { test "$extra_verbose" = "yes" && cat << \EOF
8604     Defining MULE
8605 EOF
8606 cat >> confdefs.h <<\EOF
8607 #define MULE 1
8608 EOF
8609 }
8610
8611   { test "$extra_verbose" = "yes" && cat << \EOF
8612     Defining FILE_CODING
8613 EOF
8614 cat >> confdefs.h <<\EOF
8615 #define FILE_CODING 1
8616 EOF
8617 }
8618
8619   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8620    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8621  fi
8622
8623     for ac_hdr in libintl.h
8624 do
8625 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8626 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8627 echo "configure:8628: checking for $ac_hdr" >&5
8628
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8632 #include <$ac_hdr>
8633 EOF
8634 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8635 { (eval echo configure:8636: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8636 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8637 if test -z "$ac_err"; then
8638   rm -rf conftest*
8639   eval "ac_cv_header_$ac_safe=yes"
8640 else
8641   echo "$ac_err" >&5
8642   echo "configure: failed program was:" >&5
8643   cat conftest.$ac_ext >&5
8644   rm -rf conftest*
8645   eval "ac_cv_header_$ac_safe=no"
8646 fi
8647 rm -f conftest*
8648 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8649   echo "$ac_t""yes" 1>&6
8650     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8651   { test "$extra_verbose" = "yes" && cat << EOF
8652     Defining $ac_tr_hdr
8653 EOF
8654 cat >> confdefs.h <<EOF
8655 #define $ac_tr_hdr 1
8656 EOF
8657 }
8658  
8659 else
8660   echo "$ac_t""no" 1>&6
8661 fi
8662 done
8663
8664   
8665 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8666 echo "configure:8667: checking for strerror in -lintl" >&5
8667 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8668
8669 xe_check_libs=" -lintl "
8670 cat > conftest.$ac_ext <<EOF
8671 #line 8672 "configure"
8672 #include "confdefs.h"
8673 /* Override any gcc2 internal prototype to avoid an error.  */
8674 /* We use char because int might match the return type of a gcc2
8675     builtin and then its argument prototype would still apply.  */
8676 char strerror();
8677
8678 int main() {
8679 strerror()
8680 ; return 0; }
8681 EOF
8682 if { (eval echo configure:8683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683   rm -rf conftest*
8684   eval "ac_cv_lib_$ac_lib_var=yes"
8685 else
8686   echo "configure: failed program was:" >&5
8687   cat conftest.$ac_ext >&5
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=no"
8690 fi
8691 rm -f conftest*
8692 xe_check_libs=""
8693
8694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8695   echo "$ac_t""yes" 1>&6
8696     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8697     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8698   { test "$extra_verbose" = "yes" && cat << EOF
8699     Defining $ac_tr_lib
8700 EOF
8701 cat >> confdefs.h <<EOF
8702 #define $ac_tr_lib 1
8703 EOF
8704 }
8705
8706   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8707
8708 else
8709   echo "$ac_t""no" 1>&6
8710 fi
8711
8712
8713
8714   echo "checking for Mule input methods" 1>&6
8715 echo "configure:8716: checking for Mule input methods" >&5
8716         case "$with_xim" in "" | "yes" )
8717     echo "checking for XIM" 1>&6
8718 echo "configure:8719: checking for XIM" >&5
8719     
8720 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8721 echo "configure:8722: checking for XOpenIM in -lX11" >&5
8722 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8723
8724 xe_check_libs=" -lX11 "
8725 cat > conftest.$ac_ext <<EOF
8726 #line 8727 "configure"
8727 #include "confdefs.h"
8728 /* Override any gcc2 internal prototype to avoid an error.  */
8729 /* We use char because int might match the return type of a gcc2
8730     builtin and then its argument prototype would still apply.  */
8731 char XOpenIM();
8732
8733 int main() {
8734 XOpenIM()
8735 ; return 0; }
8736 EOF
8737 if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8738   rm -rf conftest*
8739   eval "ac_cv_lib_$ac_lib_var=yes"
8740 else
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_lib_$ac_lib_var=no"
8745 fi
8746 rm -f conftest*
8747 xe_check_libs=""
8748
8749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8750   echo "$ac_t""yes" 1>&6
8751   with_xim=xlib
8752 else
8753   echo "$ac_t""no" 1>&6
8754 with_xim=no
8755 fi
8756
8757
8758         if test "$have_motif $have_lesstif" = "yes no"; then
8759       
8760 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8761 echo "configure:8762: checking for XmImMbLookupString in -lXm" >&5
8762 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8763
8764 xe_check_libs=" -lXm "
8765 cat > conftest.$ac_ext <<EOF
8766 #line 8767 "configure"
8767 #include "confdefs.h"
8768 /* Override any gcc2 internal prototype to avoid an error.  */
8769 /* We use char because int might match the return type of a gcc2
8770     builtin and then its argument prototype would still apply.  */
8771 char XmImMbLookupString();
8772
8773 int main() {
8774 XmImMbLookupString()
8775 ; return 0; }
8776 EOF
8777 if { (eval echo configure:8778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8778   rm -rf conftest*
8779   eval "ac_cv_lib_$ac_lib_var=yes"
8780 else
8781   echo "configure: failed program was:" >&5
8782   cat conftest.$ac_ext >&5
8783   rm -rf conftest*
8784   eval "ac_cv_lib_$ac_lib_var=no"
8785 fi
8786 rm -f conftest*
8787 xe_check_libs=""
8788
8789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8790   echo "$ac_t""yes" 1>&6
8791   with_xim=motif
8792 else
8793   echo "$ac_t""no" 1>&6
8794 fi
8795
8796
8797     fi ;;
8798   esac
8799   if test "$with_xim" != "no"; then
8800     { test "$extra_verbose" = "yes" && cat << \EOF
8801     Defining HAVE_XIM
8802 EOF
8803 cat >> confdefs.h <<\EOF
8804 #define HAVE_XIM 1
8805 EOF
8806 }
8807
8808     if test "$with_xim" = "xlib"; then
8809       { test "$extra_verbose" = "yes" && cat << \EOF
8810     Defining XIM_XLIB
8811 EOF
8812 cat >> confdefs.h <<\EOF
8813 #define XIM_XLIB 1
8814 EOF
8815 }
8816
8817       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8818    echo "    xemacs will be linked with \"input-method-xlib.o\""
8819  fi
8820     fi
8821     if test "$with_xim" = "motif"; then
8822       { test "$extra_verbose" = "yes" && cat << \EOF
8823     Defining XIM_MOTIF
8824 EOF
8825 cat >> confdefs.h <<\EOF
8826 #define XIM_MOTIF 1
8827 EOF
8828 }
8829
8830       need_motif=yes
8831       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8832    echo "    xemacs will be linked with \"input-method-motif.o\""
8833  fi
8834     fi
8835     if test "$with_xim" = "motif"; then
8836       with_xfs=no
8837     fi
8838   fi
8839
8840     if test "$with_xfs" = "yes" ; then
8841     echo "checking for XFontSet" 1>&6
8842 echo "configure:8843: checking for XFontSet" >&5
8843     
8844 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8845 echo "configure:8846: checking for XmbDrawString in -lX11" >&5
8846 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8847
8848 xe_check_libs=" -lX11 "
8849 cat > conftest.$ac_ext <<EOF
8850 #line 8851 "configure"
8851 #include "confdefs.h"
8852 /* Override any gcc2 internal prototype to avoid an error.  */
8853 /* We use char because int might match the return type of a gcc2
8854     builtin and then its argument prototype would still apply.  */
8855 char XmbDrawString();
8856
8857 int main() {
8858 XmbDrawString()
8859 ; return 0; }
8860 EOF
8861 if { (eval echo configure:8862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8862   rm -rf conftest*
8863   eval "ac_cv_lib_$ac_lib_var=yes"
8864 else
8865   echo "configure: failed program was:" >&5
8866   cat conftest.$ac_ext >&5
8867   rm -rf conftest*
8868   eval "ac_cv_lib_$ac_lib_var=no"
8869 fi
8870 rm -f conftest*
8871 xe_check_libs=""
8872
8873 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8874   echo "$ac_t""yes" 1>&6
8875   :
8876 else
8877   echo "$ac_t""no" 1>&6
8878 with_xfs=no
8879 fi
8880
8881
8882     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8883       { test "$extra_verbose" = "yes" && cat << \EOF
8884     Defining USE_XFONTSET
8885 EOF
8886 cat >> confdefs.h <<\EOF
8887 #define USE_XFONTSET 1
8888 EOF
8889 }
8890
8891       if test "$with_xim" = "no" ; then
8892         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8893    echo "    xemacs will be linked with \"input-method-xfs.o\""
8894  fi
8895       fi
8896     fi
8897   fi 
8898     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8899   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8900 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8901 echo "configure:8902: checking for wnn/jllib.h" >&5
8902
8903 cat > conftest.$ac_ext <<EOF
8904 #line 8905 "configure"
8905 #include "confdefs.h"
8906 #include <wnn/jllib.h>
8907 EOF
8908 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8909 { (eval echo configure:8910: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8910 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8911 if test -z "$ac_err"; then
8912   rm -rf conftest*
8913   eval "ac_cv_header_$ac_safe=yes"
8914 else
8915   echo "$ac_err" >&5
8916   echo "configure: failed program was:" >&5
8917   cat conftest.$ac_ext >&5
8918   rm -rf conftest*
8919   eval "ac_cv_header_$ac_safe=no"
8920 fi
8921 rm -f conftest*
8922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8923   echo "$ac_t""yes" 1>&6
8924   :
8925 else
8926   echo "$ac_t""no" 1>&6
8927 with_wnn=no
8928 fi
8929  }
8930     if test "$with_wnn" != "no"; then
8931     for ac_func in crypt
8932 do
8933 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8934 echo "configure:8935: checking for $ac_func" >&5
8935
8936 cat > conftest.$ac_ext <<EOF
8937 #line 8938 "configure"
8938 #include "confdefs.h"
8939 /* System header to define __stub macros and hopefully few prototypes,
8940     which can conflict with char $ac_func(); below.  */
8941 #include <assert.h>
8942 /* Override any gcc2 internal prototype to avoid an error.  */
8943 /* We use char because int might match the return type of a gcc2
8944     builtin and then its argument prototype would still apply.  */
8945 char $ac_func();
8946
8947 int main() {
8948
8949 /* The GNU C library defines this for functions which it implements
8950     to always fail with ENOSYS.  Some functions are actually named
8951     something starting with __ and the normal name is an alias.  */
8952 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8953 choke me
8954 #else
8955 $ac_func();
8956 #endif
8957
8958 ; return 0; }
8959 EOF
8960 if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8961   rm -rf conftest*
8962   eval "ac_cv_func_$ac_func=yes"
8963 else
8964   echo "configure: failed program was:" >&5
8965   cat conftest.$ac_ext >&5
8966   rm -rf conftest*
8967   eval "ac_cv_func_$ac_func=no"
8968 fi
8969 rm -f conftest*
8970
8971 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8972   echo "$ac_t""yes" 1>&6
8973     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8974   { test "$extra_verbose" = "yes" && cat << EOF
8975     Defining $ac_tr_func
8976 EOF
8977 cat >> confdefs.h <<EOF
8978 #define $ac_tr_func 1
8979 EOF
8980 }
8981  
8982 else
8983   echo "$ac_t""no" 1>&6
8984 fi
8985 done
8986
8987     test "$ac_cv_func_crypt" != "yes" && { 
8988 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8989 echo "configure:8990: checking for crypt in -lcrypt" >&5
8990 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8991
8992 xe_check_libs=" -lcrypt "
8993 cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 /* Override any gcc2 internal prototype to avoid an error.  */
8997 /* We use char because int might match the return type of a gcc2
8998     builtin and then its argument prototype would still apply.  */
8999 char crypt();
9000
9001 int main() {
9002 crypt()
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9006   rm -rf conftest*
9007   eval "ac_cv_lib_$ac_lib_var=yes"
9008 else
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_lib_$ac_lib_var=no"
9013 fi
9014 rm -f conftest*
9015 xe_check_libs=""
9016
9017 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9018   echo "$ac_t""yes" 1>&6
9019     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9020     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9021   { test "$extra_verbose" = "yes" && cat << EOF
9022     Defining $ac_tr_lib
9023 EOF
9024 cat >> confdefs.h <<EOF
9025 #define $ac_tr_lib 1
9026 EOF
9027 }
9028
9029   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9030
9031 else
9032   echo "$ac_t""no" 1>&6
9033 fi
9034
9035  }
9036   fi
9037     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9038     
9039 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9040 echo "configure:9041: checking for jl_dic_list_e in -lwnn" >&5
9041 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9042
9043 xe_check_libs=" -lwnn "
9044 cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* Override any gcc2 internal prototype to avoid an error.  */
9048 /* We use char because int might match the return type of a gcc2
9049     builtin and then its argument prototype would still apply.  */
9050 char jl_dic_list_e();
9051
9052 int main() {
9053 jl_dic_list_e()
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=yes"
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=no"
9064 fi
9065 rm -f conftest*
9066 xe_check_libs=""
9067
9068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9069   echo "$ac_t""yes" 1>&6
9070   libwnn=wnn
9071 else
9072   echo "$ac_t""no" 1>&6
9073 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9074 echo "configure:9075: checking for jl_dic_list_e in -lwnn4" >&5
9075 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9076
9077 xe_check_libs=" -lwnn4 "
9078 cat > conftest.$ac_ext <<EOF
9079 #line 9080 "configure"
9080 #include "confdefs.h"
9081 /* Override any gcc2 internal prototype to avoid an error.  */
9082 /* We use char because int might match the return type of a gcc2
9083     builtin and then its argument prototype would still apply.  */
9084 char jl_dic_list_e();
9085
9086 int main() {
9087 jl_dic_list_e()
9088 ; return 0; }
9089 EOF
9090 if { (eval echo configure:9091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9091   rm -rf conftest*
9092   eval "ac_cv_lib_$ac_lib_var=yes"
9093 else
9094   echo "configure: failed program was:" >&5
9095   cat conftest.$ac_ext >&5
9096   rm -rf conftest*
9097   eval "ac_cv_lib_$ac_lib_var=no"
9098 fi
9099 rm -f conftest*
9100 xe_check_libs=""
9101
9102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9103   echo "$ac_t""yes" 1>&6
9104   libwnn=wnn4
9105 else
9106   echo "$ac_t""no" 1>&6
9107 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9108 echo "configure:9109: checking for jl_dic_list_e in -lwnn6" >&5
9109 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9110
9111 xe_check_libs=" -lwnn6 "
9112 cat > conftest.$ac_ext <<EOF
9113 #line 9114 "configure"
9114 #include "confdefs.h"
9115 /* Override any gcc2 internal prototype to avoid an error.  */
9116 /* We use char because int might match the return type of a gcc2
9117     builtin and then its argument prototype would still apply.  */
9118 char jl_dic_list_e();
9119
9120 int main() {
9121 jl_dic_list_e()
9122 ; return 0; }
9123 EOF
9124 if { (eval echo configure:9125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9125   rm -rf conftest*
9126   eval "ac_cv_lib_$ac_lib_var=yes"
9127 else
9128   echo "configure: failed program was:" >&5
9129   cat conftest.$ac_ext >&5
9130   rm -rf conftest*
9131   eval "ac_cv_lib_$ac_lib_var=no"
9132 fi
9133 rm -f conftest*
9134 xe_check_libs=""
9135
9136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9137   echo "$ac_t""yes" 1>&6
9138   libwnn=wnn6
9139 else
9140   echo "$ac_t""no" 1>&6
9141 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9142 echo "configure:9143: checking for dic_list_e in -lwnn6_fromsrc" >&5
9143 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9144
9145 xe_check_libs=" -lwnn6_fromsrc "
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 /* Override any gcc2 internal prototype to avoid an error.  */
9150 /* We use char because int might match the return type of a gcc2
9151     builtin and then its argument prototype would still apply.  */
9152 char dic_list_e();
9153
9154 int main() {
9155 dic_list_e()
9156 ; return 0; }
9157 EOF
9158 if { (eval echo configure:9159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9159   rm -rf conftest*
9160   eval "ac_cv_lib_$ac_lib_var=yes"
9161 else
9162   echo "configure: failed program was:" >&5
9163   cat conftest.$ac_ext >&5
9164   rm -rf conftest*
9165   eval "ac_cv_lib_$ac_lib_var=no"
9166 fi
9167 rm -f conftest*
9168 xe_check_libs=""
9169
9170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9171   echo "$ac_t""yes" 1>&6
9172   libwnn=wnn6_fromsrc
9173 else
9174   echo "$ac_t""no" 1>&6
9175 with_wnn=no
9176 fi
9177
9178
9179 fi
9180
9181
9182 fi
9183
9184
9185 fi
9186
9187
9188   fi
9189   test -z "$with_wnn" && with_wnn=yes
9190   if test "$with_wnn" = "yes"; then
9191     { test "$extra_verbose" = "yes" && cat << \EOF
9192     Defining HAVE_WNN
9193 EOF
9194 cat >> confdefs.h <<\EOF
9195 #define HAVE_WNN 1
9196 EOF
9197 }
9198
9199     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9200     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9201    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9202  fi
9203     if test "$with_wnn6" != "no"; then
9204       
9205 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9206 echo "configure:9207: checking for jl_fi_dic_list in -l$libwnn" >&5
9207 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9208
9209 xe_check_libs=" -l$libwnn "
9210 cat > conftest.$ac_ext <<EOF
9211 #line 9212 "configure"
9212 #include "confdefs.h"
9213 /* Override any gcc2 internal prototype to avoid an error.  */
9214 /* We use char because int might match the return type of a gcc2
9215     builtin and then its argument prototype would still apply.  */
9216 char jl_fi_dic_list();
9217
9218 int main() {
9219 jl_fi_dic_list()
9220 ; return 0; }
9221 EOF
9222 if { (eval echo configure:9223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9223   rm -rf conftest*
9224   eval "ac_cv_lib_$ac_lib_var=yes"
9225 else
9226   echo "configure: failed program was:" >&5
9227   cat conftest.$ac_ext >&5
9228   rm -rf conftest*
9229   eval "ac_cv_lib_$ac_lib_var=no"
9230 fi
9231 rm -f conftest*
9232 xe_check_libs=""
9233
9234 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9235   echo "$ac_t""yes" 1>&6
9236   with_wnn6=yes
9237 else
9238   echo "$ac_t""no" 1>&6
9239 fi
9240
9241
9242       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9243     Defining WNN6
9244 EOF
9245 cat >> confdefs.h <<\EOF
9246 #define WNN6 1
9247 EOF
9248 }
9249
9250     fi
9251   fi
9252
9253     canna_includes_found=no
9254   if test "$with_canna" != "no"; then
9255     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9256 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9257 echo "configure:9258: checking for canna/jrkanji.h" >&5
9258
9259 cat > conftest.$ac_ext <<EOF
9260 #line 9261 "configure"
9261 #include "confdefs.h"
9262 #include <canna/jrkanji.h>
9263 EOF
9264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9265 { (eval echo configure:9266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9267 if test -z "$ac_err"; then
9268   rm -rf conftest*
9269   eval "ac_cv_header_$ac_safe=yes"
9270 else
9271   echo "$ac_err" >&5
9272   echo "configure: failed program was:" >&5
9273   cat conftest.$ac_ext >&5
9274   rm -rf conftest*
9275   eval "ac_cv_header_$ac_safe=no"
9276 fi
9277 rm -f conftest*
9278 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9279   echo "$ac_t""yes" 1>&6
9280   canna_includes_found=yes
9281 else
9282   echo "$ac_t""no" 1>&6
9283 fi
9284
9285   fi
9286   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9287       -d "/usr/local/canna/include"; then
9288     save_c_switch_site="$c_switch_site"
9289     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9290     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9291 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9292 echo "configure:9293: checking for canna/jrkanji.h" >&5
9293
9294 cat > conftest.$ac_ext <<EOF
9295 #line 9296 "configure"
9296 #include "confdefs.h"
9297 #include <canna/jrkanji.h>
9298 EOF
9299 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9300 { (eval echo configure:9301: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9301 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9302 if test -z "$ac_err"; then
9303   rm -rf conftest*
9304   eval "ac_cv_header_$ac_safe=yes"
9305 else
9306   echo "$ac_err" >&5
9307   echo "configure: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   rm -rf conftest*
9310   eval "ac_cv_header_$ac_safe=no"
9311 fi
9312 rm -f conftest*
9313 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9314   echo "$ac_t""yes" 1>&6
9315   canna_includes_found=yes
9316 else
9317   echo "$ac_t""no" 1>&6
9318 fi
9319
9320     if test "$canna_includes_found" != "yes"; then
9321       c_switch_site="$save_c_switch_site"
9322       with_canna="no"
9323     fi
9324   fi
9325
9326   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9327 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9328 echo "configure:9329: checking for canna/RK.h" >&5
9329
9330 cat > conftest.$ac_ext <<EOF
9331 #line 9332 "configure"
9332 #include "confdefs.h"
9333 #include <canna/RK.h>
9334 EOF
9335 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9336 { (eval echo configure:9337: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9337 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9338 if test -z "$ac_err"; then
9339   rm -rf conftest*
9340   eval "ac_cv_header_$ac_safe=yes"
9341 else
9342   echo "$ac_err" >&5
9343   echo "configure: failed program was:" >&5
9344   cat conftest.$ac_ext >&5
9345   rm -rf conftest*
9346   eval "ac_cv_header_$ac_safe=no"
9347 fi
9348 rm -f conftest*
9349 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9350   echo "$ac_t""yes" 1>&6
9351   :
9352 else
9353   echo "$ac_t""no" 1>&6
9354 with_canna=no
9355 fi
9356  }
9357   test -z "$with_canna" && { 
9358 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9359 echo "configure:9360: checking for RkBgnBun in -lRKC" >&5
9360 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9361
9362 xe_check_libs=" -lRKC "
9363 cat > conftest.$ac_ext <<EOF
9364 #line 9365 "configure"
9365 #include "confdefs.h"
9366 /* Override any gcc2 internal prototype to avoid an error.  */
9367 /* We use char because int might match the return type of a gcc2
9368     builtin and then its argument prototype would still apply.  */
9369 char RkBgnBun();
9370
9371 int main() {
9372 RkBgnBun()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 xe_check_libs=""
9386
9387 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9388   echo "$ac_t""yes" 1>&6
9389   :
9390 else
9391   echo "$ac_t""no" 1>&6
9392 with_canna=no
9393 fi
9394
9395  }
9396   test -z "$with_canna" && { 
9397 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9398 echo "configure:9399: checking for jrKanjiControl in -lcanna" >&5
9399 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9400
9401 xe_check_libs=" -lcanna "
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 jrKanjiControl();
9409
9410 int main() {
9411 jrKanjiControl()
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   :
9429 else
9430   echo "$ac_t""no" 1>&6
9431 with_canna=no
9432 fi
9433
9434  }
9435   test -z "$with_canna" && with_canna=yes
9436   if test "$with_canna" = "yes"; then
9437     { test "$extra_verbose" = "yes" && cat << \EOF
9438     Defining HAVE_CANNA
9439 EOF
9440 cat >> confdefs.h <<\EOF
9441 #define HAVE_CANNA 1
9442 EOF
9443 }
9444
9445     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9446     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9447    echo "    xemacs will be linked with \"mule-canna.o\""
9448  fi
9449   fi
9450
9451 else   for feature in xim canna wnn; do
9452     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9453       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9454     fi
9455     eval "with_${feature}=no"
9456   done
9457 fi 
9458
9459 if test "$need_motif" = "yes" ; then
9460   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9461     
9462 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9463 echo "configure:9464: checking for layout_object_getvalue in -li18n" >&5
9464 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9465
9466 xe_check_libs=" -li18n "
9467 cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470 /* Override any gcc2 internal prototype to avoid an error.  */
9471 /* We use char because int might match the return type of a gcc2
9472     builtin and then its argument prototype would still apply.  */
9473 char layout_object_getvalue();
9474
9475 int main() {
9476 layout_object_getvalue()
9477 ; return 0; }
9478 EOF
9479 if { (eval echo configure:9480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9480   rm -rf conftest*
9481   eval "ac_cv_lib_$ac_lib_var=yes"
9482 else
9483   echo "configure: failed program was:" >&5
9484   cat conftest.$ac_ext >&5
9485   rm -rf conftest*
9486   eval "ac_cv_lib_$ac_lib_var=no"
9487 fi
9488 rm -f conftest*
9489 xe_check_libs=""
9490
9491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9492   echo "$ac_t""yes" 1>&6
9493   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9494 else
9495   echo "$ac_t""no" 1>&6
9496 fi
9497
9498
9499   
9500 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9501     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9502   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9503   
9504         runpath="" runpath_dirs=""
9505   if test -n "$LD_RUN_PATH"; then
9506     runpath="$LD_RUN_PATH"
9507   elif test "$GCC" = "yes"; then
9508         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9509     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9510     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9511     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9512       case "$arg" in P,* | -L* | -R* )
9513         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9514           {
9515 xe_runpath_dir="$dir"
9516   test "$xe_runpath_dir" != "/lib"     -a \
9517         "$xe_runpath_dir" != "/usr/lib" -a \
9518         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9519   eval "$xe_add_unique_runpath_dir"
9520 }
9521         done ;;
9522       esac
9523     done
9524     ld_switch_run="$ld_switch_run_save"
9525     rm -f conftest*
9526   else
9527         for arg in $ld_switch_site $ld_switch_x_site; do
9528       case "$arg" in -L*) {
9529 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9530   test "$xe_runpath_dir" != "/lib"     -a \
9531         "$xe_runpath_dir" != "/usr/lib" -a \
9532         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9533   eval "$xe_add_unique_runpath_dir"
9534 };; esac
9535     done
9536         if test "$opsys $need_motif" = "sol2 yes"; then
9537       xe_runpath_dir="/opt/SUNWdt/lib";
9538       eval "$xe_add_unique_runpath_dir";
9539     fi
9540   fi 
9541   if test -n "$runpath"; then
9542     ld_switch_run="${dash_r}${runpath}"
9543     
9544 if test "$GCC" = "yes"; then
9545   set x $ld_switch_run; shift; ld_switch_run=""
9546   while test -n "$1"; do
9547     case $1 in
9548       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9549       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9550       -Xlinker* ) ;;
9551       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9552     esac
9553     shift
9554   done
9555 fi
9556     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9557   fi
9558 fi
9559
9560 fi
9561
9562 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
9563 do
9564 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9565 echo "configure:9566: checking for $ac_func" >&5
9566
9567 cat > conftest.$ac_ext <<EOF
9568 #line 9569 "configure"
9569 #include "confdefs.h"
9570 /* System header to define __stub macros and hopefully few prototypes,
9571     which can conflict with char $ac_func(); below.  */
9572 #include <assert.h>
9573 /* Override any gcc2 internal prototype to avoid an error.  */
9574 /* We use char because int might match the return type of a gcc2
9575     builtin and then its argument prototype would still apply.  */
9576 char $ac_func();
9577
9578 int main() {
9579
9580 /* The GNU C library defines this for functions which it implements
9581     to always fail with ENOSYS.  Some functions are actually named
9582     something starting with __ and the normal name is an alias.  */
9583 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9584 choke me
9585 #else
9586 $ac_func();
9587 #endif
9588
9589 ; return 0; }
9590 EOF
9591 if { (eval echo configure:9592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9592   rm -rf conftest*
9593   eval "ac_cv_func_$ac_func=yes"
9594 else
9595   echo "configure: failed program was:" >&5
9596   cat conftest.$ac_ext >&5
9597   rm -rf conftest*
9598   eval "ac_cv_func_$ac_func=no"
9599 fi
9600 rm -f conftest*
9601
9602 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9603   echo "$ac_t""yes" 1>&6
9604     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9605   { test "$extra_verbose" = "yes" && cat << EOF
9606     Defining $ac_tr_func
9607 EOF
9608 cat >> confdefs.h <<EOF
9609 #define $ac_tr_func 1
9610 EOF
9611 }
9612  
9613 else
9614   echo "$ac_t""no" 1>&6
9615 fi
9616 done
9617
9618
9619 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9620    echo "    xemacs will be linked with \"realpath.o\""
9621  fi
9622
9623 for ac_func in getloadavg
9624 do
9625 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9626 echo "configure:9627: checking for $ac_func" >&5
9627
9628 cat > conftest.$ac_ext <<EOF
9629 #line 9630 "configure"
9630 #include "confdefs.h"
9631 /* System header to define __stub macros and hopefully few prototypes,
9632     which can conflict with char $ac_func(); below.  */
9633 #include <assert.h>
9634 /* Override any gcc2 internal prototype to avoid an error.  */
9635 /* We use char because int might match the return type of a gcc2
9636     builtin and then its argument prototype would still apply.  */
9637 char $ac_func();
9638
9639 int main() {
9640
9641 /* The GNU C library defines this for functions which it implements
9642     to always fail with ENOSYS.  Some functions are actually named
9643     something starting with __ and the normal name is an alias.  */
9644 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9645 choke me
9646 #else
9647 $ac_func();
9648 #endif
9649
9650 ; return 0; }
9651 EOF
9652 if { (eval echo configure:9653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9653   rm -rf conftest*
9654   eval "ac_cv_func_$ac_func=yes"
9655 else
9656   echo "configure: failed program was:" >&5
9657   cat conftest.$ac_ext >&5
9658   rm -rf conftest*
9659   eval "ac_cv_func_$ac_func=no"
9660 fi
9661 rm -f conftest*
9662
9663 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9664   echo "$ac_t""yes" 1>&6
9665     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9666   { test "$extra_verbose" = "yes" && cat << EOF
9667     Defining $ac_tr_func
9668 EOF
9669 cat >> confdefs.h <<EOF
9670 #define $ac_tr_func 1
9671 EOF
9672 }
9673  
9674 else
9675   echo "$ac_t""no" 1>&6
9676 fi
9677 done
9678
9679
9680 if test "$ac_cv_func_getloadavg" != "yes"
9681 then
9682   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9683    echo "    xemacs will be linked with \"getloadavg.o\""
9684  fi
9685
9686     
9687 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9688 echo "configure:9689: checking for kstat_open in -lkstat" >&5
9689 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9690
9691 xe_check_libs=" -lkstat "
9692 cat > conftest.$ac_ext <<EOF
9693 #line 9694 "configure"
9694 #include "confdefs.h"
9695 /* Override any gcc2 internal prototype to avoid an error.  */
9696 /* We use char because int might match the return type of a gcc2
9697     builtin and then its argument prototype would still apply.  */
9698 char kstat_open();
9699
9700 int main() {
9701 kstat_open()
9702 ; return 0; }
9703 EOF
9704 if { (eval echo configure:9705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9705   rm -rf conftest*
9706   eval "ac_cv_lib_$ac_lib_var=yes"
9707 else
9708   echo "configure: failed program was:" >&5
9709   cat conftest.$ac_ext >&5
9710   rm -rf conftest*
9711   eval "ac_cv_lib_$ac_lib_var=no"
9712 fi
9713 rm -f conftest*
9714 xe_check_libs=""
9715
9716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9717   echo "$ac_t""yes" 1>&6
9718     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9719     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9720   { test "$extra_verbose" = "yes" && cat << EOF
9721     Defining $ac_tr_lib
9722 EOF
9723 cat >> confdefs.h <<EOF
9724 #define $ac_tr_lib 1
9725 EOF
9726 }
9727
9728   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9729
9730 else
9731   echo "$ac_t""no" 1>&6
9732 fi
9733
9734
9735
9736     
9737 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9738 echo "configure:9739: checking for kvm_read in -lkvm" >&5
9739 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9740
9741 xe_check_libs=" -lkvm "
9742 cat > conftest.$ac_ext <<EOF
9743 #line 9744 "configure"
9744 #include "confdefs.h"
9745 /* Override any gcc2 internal prototype to avoid an error.  */
9746 /* We use char because int might match the return type of a gcc2
9747     builtin and then its argument prototype would still apply.  */
9748 char kvm_read();
9749
9750 int main() {
9751 kvm_read()
9752 ; return 0; }
9753 EOF
9754 if { (eval echo configure:9755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755   rm -rf conftest*
9756   eval "ac_cv_lib_$ac_lib_var=yes"
9757 else
9758   echo "configure: failed program was:" >&5
9759   cat conftest.$ac_ext >&5
9760   rm -rf conftest*
9761   eval "ac_cv_lib_$ac_lib_var=no"
9762 fi
9763 rm -f conftest*
9764 xe_check_libs=""
9765
9766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9767   echo "$ac_t""yes" 1>&6
9768     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9769     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9770   { test "$extra_verbose" = "yes" && cat << EOF
9771     Defining $ac_tr_lib
9772 EOF
9773 cat >> confdefs.h <<EOF
9774 #define $ac_tr_lib 1
9775 EOF
9776 }
9777
9778   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9779
9780 else
9781   echo "$ac_t""no" 1>&6
9782 fi
9783
9784
9785 fi
9786
9787 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9788 echo "configure:9789: checking whether netdb declares h_errno" >&5
9789 cat > conftest.$ac_ext <<EOF
9790 #line 9791 "configure"
9791 #include "confdefs.h"
9792 #include <netdb.h>
9793 int main() {
9794 return h_errno;
9795 ; return 0; }
9796 EOF
9797 if { (eval echo configure:9798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9798   rm -rf conftest*
9799   echo "$ac_t""yes" 1>&6
9800    { test "$extra_verbose" = "yes" && cat << \EOF
9801     Defining HAVE_H_ERRNO
9802 EOF
9803 cat >> confdefs.h <<\EOF
9804 #define HAVE_H_ERRNO 1
9805 EOF
9806 }
9807
9808 else
9809   echo "configure: failed program was:" >&5
9810   cat conftest.$ac_ext >&5
9811   rm -rf conftest*
9812   echo "$ac_t""no" 1>&6
9813 fi
9814 rm -f conftest*
9815
9816 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9817 echo "configure:9818: checking for sigsetjmp" >&5
9818 cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 #include <setjmp.h>
9822 int main() {
9823 sigjmp_buf bar; sigsetjmp (bar, 0);
9824 ; return 0; }
9825 EOF
9826 if { (eval echo configure:9827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9827   rm -rf conftest*
9828   echo "$ac_t""yes" 1>&6
9829    { test "$extra_verbose" = "yes" && cat << \EOF
9830     Defining HAVE_SIGSETJMP
9831 EOF
9832 cat >> confdefs.h <<\EOF
9833 #define HAVE_SIGSETJMP 1
9834 EOF
9835 }
9836
9837 else
9838   echo "configure: failed program was:" >&5
9839   cat conftest.$ac_ext >&5
9840   rm -rf conftest*
9841   echo "$ac_t""no" 1>&6
9842 fi
9843 rm -f conftest*
9844
9845 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9846 echo "configure:9847: checking whether localtime caches TZ" >&5
9847
9848 if test "$ac_cv_func_tzset" = "yes"; then
9849 cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 #include <time.h>
9853 #if STDC_HEADERS
9854 # include <stdlib.h>
9855 #endif
9856 extern char **environ;
9857 unset_TZ ()
9858 {
9859   char **from, **to;
9860   for (to = from = environ; (*to = *from); from++)
9861     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9862       to++;
9863 }
9864 char TZ_GMT0[] = "TZ=GMT0";
9865 char TZ_PST8[] = "TZ=PST8";
9866 main()
9867 {
9868   time_t now = time ((time_t *) 0);
9869   int hour_GMT0, hour_unset;
9870   if (putenv (TZ_GMT0) != 0)
9871     exit (1);
9872   hour_GMT0 = localtime (&now)->tm_hour;
9873   unset_TZ ();
9874   hour_unset = localtime (&now)->tm_hour;
9875   if (putenv (TZ_PST8) != 0)
9876     exit (1);
9877   if (localtime (&now)->tm_hour == hour_GMT0)
9878     exit (1);
9879   unset_TZ ();
9880   if (localtime (&now)->tm_hour != hour_unset)
9881     exit (1);
9882   exit (0);
9883 }
9884 EOF
9885 if { (eval echo configure:9886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9886 then
9887   emacs_cv_localtime_cache=no
9888 else
9889   conftest_rc="$?"
9890   echo "configure: failed program was:" >&5
9891   cat conftest.$ac_ext >&5
9892   rm -fr conftest*
9893   emacs_cv_localtime_cache=yes
9894 fi
9895 rm -fr conftest*
9896 else
9897         # If we lack tzset, report that localtime does not cache TZ,
9898         # since we can't invalidate the cache if we don't have tzset.
9899         emacs_cv_localtime_cache=no
9900 fi
9901 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9902 if test $emacs_cv_localtime_cache = yes; then
9903   { test "$extra_verbose" = "yes" && cat << \EOF
9904     Defining LOCALTIME_CACHE
9905 EOF
9906 cat >> confdefs.h <<\EOF
9907 #define LOCALTIME_CACHE 1
9908 EOF
9909 }
9910
9911 fi
9912
9913 if test "$HAVE_TIMEVAL" = "yes"; then
9914 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9915 echo "configure:9916: checking whether gettimeofday accepts one or two arguments" >&5
9916 cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919
9920 #ifdef TIME_WITH_SYS_TIME
9921 #include <sys/time.h>
9922 #include <time.h>
9923 #else
9924 #ifdef HAVE_SYS_TIME_H
9925 #include <sys/time.h>
9926 #else
9927 #include <time.h>
9928 #endif
9929 #endif
9930   
9931 int main() {
9932
9933   struct timeval time;
9934   struct timezone dummy;
9935   gettimeofday (&time, &dummy);
9936
9937 ; return 0; }
9938 EOF
9939 if { (eval echo configure:9940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9940   rm -rf conftest*
9941   echo "$ac_t""two" 1>&6
9942 else
9943   echo "configure: failed program was:" >&5
9944   cat conftest.$ac_ext >&5
9945   rm -rf conftest*
9946   echo "$ac_t""one" 1>&6
9947    { test "$extra_verbose" = "yes" && cat << \EOF
9948     Defining GETTIMEOFDAY_ONE_ARGUMENT
9949 EOF
9950 cat >> confdefs.h <<\EOF
9951 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9952 EOF
9953 }
9954
9955 fi
9956 rm -f conftest*
9957 fi
9958
9959
9960 echo $ac_n "checking for inline""... $ac_c" 1>&6
9961 echo "configure:9962: checking for inline" >&5
9962
9963 ac_cv_c_inline=no
9964 for ac_kw in inline __inline__ __inline; do
9965   cat > conftest.$ac_ext <<EOF
9966 #line 9967 "configure"
9967 #include "confdefs.h"
9968
9969 int main() {
9970 } $ac_kw foo() {
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9974   rm -rf conftest*
9975   ac_cv_c_inline=$ac_kw; break
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979 fi
9980 rm -f conftest*
9981 done
9982
9983
9984 echo "$ac_t""$ac_cv_c_inline" 1>&6
9985 case "$ac_cv_c_inline" in
9986   inline | yes) ;;
9987   no) { test "$extra_verbose" = "yes" && cat << \EOF
9988     Defining inline = 
9989 EOF
9990 cat >> confdefs.h <<\EOF
9991 #define inline 
9992 EOF
9993 }
9994  ;;
9995   *)  { test "$extra_verbose" = "yes" && cat << EOF
9996     Defining inline = $ac_cv_c_inline
9997 EOF
9998 cat >> confdefs.h <<EOF
9999 #define inline $ac_cv_c_inline
10000 EOF
10001 }
10002  ;;
10003 esac
10004
10005 if test "$ac_cv_c_inline" != "no"; then
10006   { test "$extra_verbose" = "yes" && cat << \EOF
10007     Defining HAVE_INLINE
10008 EOF
10009 cat >> confdefs.h <<\EOF
10010 #define HAVE_INLINE 1
10011 EOF
10012 }
10013
10014   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10015    echo "    xemacs will be linked with \"inline.o\""
10016  fi
10017 fi
10018
10019
10020 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10021 # for constant arguments.  Useless!
10022 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10023 echo "configure:10024: checking for working alloca.h" >&5
10024
10025 cat > conftest.$ac_ext <<EOF
10026 #line 10027 "configure"
10027 #include "confdefs.h"
10028 #include <alloca.h>
10029 int main() {
10030 char *p = alloca(2 * sizeof(int));
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10034   rm -rf conftest*
10035   ac_cv_header_alloca_h=yes
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   ac_cv_header_alloca_h=no
10041 fi
10042 rm -f conftest*
10043
10044 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10045 if test $ac_cv_header_alloca_h = yes; then
10046   { test "$extra_verbose" = "yes" && cat << \EOF
10047     Defining HAVE_ALLOCA_H
10048 EOF
10049 cat >> confdefs.h <<\EOF
10050 #define HAVE_ALLOCA_H 1
10051 EOF
10052 }
10053
10054 fi
10055
10056 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10057 echo "configure:10058: checking for alloca" >&5
10058
10059 cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062
10063 #ifdef __GNUC__
10064 # define alloca __builtin_alloca
10065 #else
10066 # ifdef _MSC_VER
10067 #  include <malloc.h>
10068 #  define alloca _alloca
10069 # else
10070 #  if HAVE_ALLOCA_H
10071 #   include <alloca.h>
10072 #  else
10073 #   ifdef _AIX
10074  #pragma alloca
10075 #   else
10076 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10077 char *alloca ();
10078 #    endif
10079 #   endif
10080 #  endif
10081 # endif
10082 #endif
10083
10084 int main() {
10085 char *p = (char *) alloca(1);
10086 ; return 0; }
10087 EOF
10088 if { (eval echo configure:10089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10089   rm -rf conftest*
10090   ac_cv_func_alloca_works=yes
10091 else
10092   echo "configure: failed program was:" >&5
10093   cat conftest.$ac_ext >&5
10094   rm -rf conftest*
10095   ac_cv_func_alloca_works=no
10096 fi
10097 rm -f conftest*
10098
10099 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10100 if test $ac_cv_func_alloca_works = yes; then
10101   { test "$extra_verbose" = "yes" && cat << \EOF
10102     Defining HAVE_ALLOCA
10103 EOF
10104 cat >> confdefs.h <<\EOF
10105 #define HAVE_ALLOCA 1
10106 EOF
10107 }
10108
10109 fi
10110
10111 if test $ac_cv_func_alloca_works = no; then
10112   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10113   # that cause trouble.  Some versions do not even contain alloca or
10114   # contain a buggy version.  If you still want to use their alloca,
10115   # use ar to extract alloca.o from them instead of compiling alloca.c.
10116   ALLOCA=alloca.${ac_objext}
10117   { test "$extra_verbose" = "yes" && cat << \EOF
10118     Defining C_ALLOCA
10119 EOF
10120 cat >> confdefs.h <<\EOF
10121 #define C_ALLOCA 1
10122 EOF
10123 }
10124
10125
10126 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10127 echo "configure:10128: checking whether alloca needs Cray hooks" >&5
10128
10129 cat > conftest.$ac_ext <<EOF
10130 #line 10131 "configure"
10131 #include "confdefs.h"
10132 #if defined(CRAY) && ! defined(CRAY2)
10133 webecray
10134 #else
10135 wenotbecray
10136 #endif
10137
10138 EOF
10139 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10140   egrep "webecray" >/dev/null 2>&1; then
10141   rm -rf conftest*
10142   ac_cv_os_cray=yes
10143 else
10144   rm -rf conftest*
10145   ac_cv_os_cray=no
10146 fi
10147 rm -f conftest*
10148
10149
10150 echo "$ac_t""$ac_cv_os_cray" 1>&6
10151 if test $ac_cv_os_cray = yes; then
10152 for ac_func in _getb67 GETB67 getb67; do
10153   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10154 echo "configure:10155: checking for $ac_func" >&5
10155
10156 cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159 /* System header to define __stub macros and hopefully few prototypes,
10160     which can conflict with char $ac_func(); below.  */
10161 #include <assert.h>
10162 /* Override any gcc2 internal prototype to avoid an error.  */
10163 /* We use char because int might match the return type of a gcc2
10164     builtin and then its argument prototype would still apply.  */
10165 char $ac_func();
10166
10167 int main() {
10168
10169 /* The GNU C library defines this for functions which it implements
10170     to always fail with ENOSYS.  Some functions are actually named
10171     something starting with __ and the normal name is an alias.  */
10172 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10173 choke me
10174 #else
10175 $ac_func();
10176 #endif
10177
10178 ; return 0; }
10179 EOF
10180 if { (eval echo configure:10181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10181   rm -rf conftest*
10182   eval "ac_cv_func_$ac_func=yes"
10183 else
10184   echo "configure: failed program was:" >&5
10185   cat conftest.$ac_ext >&5
10186   rm -rf conftest*
10187   eval "ac_cv_func_$ac_func=no"
10188 fi
10189 rm -f conftest*
10190
10191 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10192   echo "$ac_t""yes" 1>&6
10193   { test "$extra_verbose" = "yes" && cat << EOF
10194     Defining CRAY_STACKSEG_END = $ac_func
10195 EOF
10196 cat >> confdefs.h <<EOF
10197 #define CRAY_STACKSEG_END $ac_func
10198 EOF
10199 }
10200
10201   break
10202 else
10203   echo "$ac_t""no" 1>&6
10204 fi
10205
10206 done
10207 fi
10208
10209 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10210 echo "configure:10211: checking stack direction for C alloca" >&5
10211
10212 cat > conftest.$ac_ext <<EOF
10213 #line 10214 "configure"
10214 #include "confdefs.h"
10215 find_stack_direction ()
10216 {
10217   static char *addr = 0;
10218   auto char dummy;
10219   if (addr == 0)
10220     {
10221       addr = &dummy;
10222       return find_stack_direction ();
10223     }
10224   else
10225     return (&dummy > addr) ? 1 : -1;
10226 }
10227 main ()
10228 {
10229   exit (find_stack_direction() < 0);
10230 }
10231 EOF
10232 if { (eval echo configure:10233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10233 then
10234   ac_cv_c_stack_direction=1
10235 else
10236   conftest_rc="$?"
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -fr conftest*
10240   ac_cv_c_stack_direction=-1
10241 fi
10242 rm -fr conftest*
10243
10244 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10245 { test "$extra_verbose" = "yes" && cat << EOF
10246     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10247 EOF
10248 cat >> confdefs.h <<EOF
10249 #define STACK_DIRECTION $ac_cv_c_stack_direction
10250 EOF
10251 }
10252
10253 fi
10254
10255 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10256    echo "    xemacs will be linked with \"$ALLOCA\""
10257  fi
10258
10259 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10260 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10261 echo "configure:10262: checking for vfork.h" >&5
10262
10263 cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 #include <vfork.h>
10267 EOF
10268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10269 { (eval echo configure:10270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10271 if test -z "$ac_err"; then
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=yes"
10274 else
10275   echo "$ac_err" >&5
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_header_$ac_safe=no"
10280 fi
10281 rm -f conftest*
10282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10283   echo "$ac_t""yes" 1>&6
10284   { test "$extra_verbose" = "yes" && cat << \EOF
10285     Defining HAVE_VFORK_H
10286 EOF
10287 cat >> confdefs.h <<\EOF
10288 #define HAVE_VFORK_H 1
10289 EOF
10290 }
10291
10292 else
10293   echo "$ac_t""no" 1>&6
10294 fi
10295
10296 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10297 echo "configure:10298: checking for working vfork" >&5
10298
10299 cat > conftest.$ac_ext <<EOF
10300 #line 10301 "configure"
10301 #include "confdefs.h"
10302 /* Thanks to Paul Eggert for this test.  */
10303 #include <stdio.h>
10304 #include <sys/types.h>
10305 #include <sys/stat.h>
10306 #ifdef HAVE_UNISTD_H
10307 #include <unistd.h>
10308 #endif
10309 #ifdef HAVE_VFORK_H
10310 #include <vfork.h>
10311 #endif
10312 /* On some sparc systems, changes by the child to local and incoming
10313    argument registers are propagated back to the parent.
10314    The compiler is told about this with #include <vfork.h>,
10315    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10316    Test for this by using a static variable whose address
10317    is put into a register that is clobbered by the vfork.  */
10318 static
10319 #ifdef __cplusplus
10320 sparc_address_test (int arg)
10321 #else
10322 sparc_address_test (arg) int arg;
10323 #endif
10324 {
10325   static pid_t child;
10326   if (!child) {
10327     child = vfork ();
10328     if (child < 0) {
10329       perror ("vfork");
10330       _exit(2);
10331     }
10332     if (!child) {
10333       arg = getpid();
10334       write(-1, "", 0);
10335       _exit (arg);
10336     }
10337   }
10338 }
10339 main() {
10340   pid_t parent = getpid ();
10341   pid_t child;
10342
10343   sparc_address_test ();
10344
10345   child = vfork ();
10346
10347   if (child == 0) {
10348     /* Here is another test for sparc vfork register problems.
10349        This test uses lots of local variables, at least
10350        as many local variables as main has allocated so far
10351        including compiler temporaries.  4 locals are enough for
10352        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10353        A buggy compiler should reuse the register of parent
10354        for one of the local variables, since it will think that
10355        parent can't possibly be used any more in this routine.
10356        Assigning to the local variable will thus munge parent
10357        in the parent process.  */
10358     pid_t
10359       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10360       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10361     /* Convince the compiler that p..p7 are live; otherwise, it might
10362        use the same hardware register for all 8 local variables.  */
10363     if (p != p1 || p != p2 || p != p3 || p != p4
10364         || p != p5 || p != p6 || p != p7)
10365       _exit(1);
10366
10367     /* On some systems (e.g. IRIX 3.3),
10368        vfork doesn't separate parent from child file descriptors.
10369        If the child closes a descriptor before it execs or exits,
10370        this munges the parent's descriptor as well.
10371        Test for this by closing stdout in the child.  */
10372     _exit(close(fileno(stdout)) != 0);
10373   } else {
10374     int status;
10375     struct stat st;
10376
10377     while (wait(&status) != child)
10378       ;
10379     exit(
10380          /* Was there some problem with vforking?  */
10381          child < 0
10382
10383          /* Did the child fail?  (This shouldn't happen.)  */
10384          || status
10385
10386          /* Did the vfork/compiler bug occur?  */
10387          || parent != getpid()
10388
10389          /* Did the file descriptor bug occur?  */
10390          || fstat(fileno(stdout), &st) != 0
10391          );
10392   }
10393 }
10394 EOF
10395 if { (eval echo configure:10396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10396 then
10397   ac_cv_func_vfork_works=yes
10398 else
10399   conftest_rc="$?"
10400   echo "configure: failed program was:" >&5
10401   cat conftest.$ac_ext >&5
10402   rm -fr conftest*
10403   ac_cv_func_vfork_works=no
10404 fi
10405 rm -fr conftest*
10406
10407 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10408 if test $ac_cv_func_vfork_works = no; then
10409   { test "$extra_verbose" = "yes" && cat << \EOF
10410     Defining vfork = fork
10411 EOF
10412 cat >> confdefs.h <<\EOF
10413 #define vfork fork
10414 EOF
10415 }
10416
10417 fi
10418
10419
10420 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10421 echo "configure:10422: checking for working strcoll" >&5
10422
10423 cat > conftest.$ac_ext <<EOF
10424 #line 10425 "configure"
10425 #include "confdefs.h"
10426 #include <string.h>
10427 main ()
10428 {
10429   exit (strcoll ("abc", "def") >= 0 ||
10430         strcoll ("ABC", "DEF") >= 0 ||
10431         strcoll ("123", "456") >= 0);
10432 }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10435 then
10436   ac_cv_func_strcoll_works=yes
10437 else
10438   conftest_rc="$?"
10439   echo "configure: failed program was:" >&5
10440   cat conftest.$ac_ext >&5
10441   rm -fr conftest*
10442   ac_cv_func_strcoll_works=no
10443 fi
10444 rm -fr conftest*
10445
10446 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10447 if test $ac_cv_func_strcoll_works = yes; then
10448   { test "$extra_verbose" = "yes" && cat << \EOF
10449     Defining HAVE_STRCOLL
10450 EOF
10451 cat >> confdefs.h <<\EOF
10452 #define HAVE_STRCOLL 1
10453 EOF
10454 }
10455
10456 fi
10457
10458
10459 for ac_func in getpgrp
10460 do
10461 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10462 echo "configure:10463: checking for $ac_func" >&5
10463
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467 /* System header to define __stub macros and hopefully few prototypes,
10468     which can conflict with char $ac_func(); below.  */
10469 #include <assert.h>
10470 /* Override any gcc2 internal prototype to avoid an error.  */
10471 /* We use char because int might match the return type of a gcc2
10472     builtin and then its argument prototype would still apply.  */
10473 char $ac_func();
10474
10475 int main() {
10476
10477 /* The GNU C library defines this for functions which it implements
10478     to always fail with ENOSYS.  Some functions are actually named
10479     something starting with __ and the normal name is an alias.  */
10480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10481 choke me
10482 #else
10483 $ac_func();
10484 #endif
10485
10486 ; return 0; }
10487 EOF
10488 if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10489   rm -rf conftest*
10490   eval "ac_cv_func_$ac_func=yes"
10491 else
10492   echo "configure: failed program was:" >&5
10493   cat conftest.$ac_ext >&5
10494   rm -rf conftest*
10495   eval "ac_cv_func_$ac_func=no"
10496 fi
10497 rm -f conftest*
10498
10499 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10500   echo "$ac_t""yes" 1>&6
10501     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10502   { test "$extra_verbose" = "yes" && cat << EOF
10503     Defining $ac_tr_func
10504 EOF
10505 cat >> confdefs.h <<EOF
10506 #define $ac_tr_func 1
10507 EOF
10508 }
10509  
10510 else
10511   echo "$ac_t""no" 1>&6
10512 fi
10513 done
10514
10515 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10516 echo "configure:10517: checking whether getpgrp takes no argument" >&5
10517
10518 cat > conftest.$ac_ext <<EOF
10519 #line 10520 "configure"
10520 #include "confdefs.h"
10521
10522 /*
10523  * If this system has a BSD-style getpgrp(),
10524  * which takes a pid argument, exit unsuccessfully.
10525  *
10526  * Snarfed from Chet Ramey's bash pgrp.c test program
10527  */
10528 #include <stdio.h>
10529 #include <sys/types.h>
10530
10531 int     pid;
10532 int     pg1, pg2, pg3, pg4;
10533 int     ng, np, s, child;
10534
10535 main()
10536 {
10537         pid = getpid();
10538         pg1 = getpgrp(0);
10539         pg2 = getpgrp();
10540         pg3 = getpgrp(pid);
10541         pg4 = getpgrp(1);
10542
10543         /*
10544          * If all of these values are the same, it's pretty sure that
10545          * we're on a system that ignores getpgrp's first argument.
10546          */
10547         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10548                 exit(0);
10549
10550         child = fork();
10551         if (child < 0)
10552                 exit(1);
10553         else if (child == 0) {
10554                 np = getpid();
10555                 /*
10556                  * If this is Sys V, this will not work; pgrp will be
10557                  * set to np because setpgrp just changes a pgrp to be
10558                  * the same as the pid.
10559                  */
10560                 setpgrp(np, pg1);
10561                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10562                 if (ng == pg1) {
10563                         exit(1);
10564                 } else {
10565                         exit(0);
10566                 }
10567         } else {
10568                 wait(&s);
10569                 exit(s>>8);
10570         }
10571 }
10572
10573 EOF
10574 if { (eval echo configure:10575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10575 then
10576   ac_cv_func_getpgrp_void=yes
10577 else
10578   conftest_rc="$?"
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -fr conftest*
10582   ac_cv_func_getpgrp_void=no
10583 fi
10584 rm -fr conftest*
10585
10586
10587 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10588 if test $ac_cv_func_getpgrp_void = yes; then
10589   { test "$extra_verbose" = "yes" && cat << \EOF
10590     Defining GETPGRP_VOID
10591 EOF
10592 cat >> confdefs.h <<\EOF
10593 #define GETPGRP_VOID 1
10594 EOF
10595 }
10596
10597 fi
10598
10599
10600 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10601 echo "configure:10602: checking for working mmap" >&5
10602 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10603 cat > conftest.$ac_ext <<EOF
10604 #line 10605 "configure"
10605 #include "confdefs.h"
10606 #include <stdio.h>
10607 #include <unistd.h>
10608 #include <fcntl.h>
10609 #include <sys/mman.h>
10610
10611 #ifndef MAP_VARIABLE
10612 #define MAP_VARIABLE 0
10613 #endif
10614
10615 #ifndef MAP_FAILED
10616 #define MAP_FAILED -1
10617 #endif
10618
10619 int main (int argc, char *argv[])
10620 {
10621   int fd = -1;
10622   caddr_t p;
10623 #ifndef MAP_ANONYMOUS
10624   fd = open ("/dev/zero", O_RDWR);
10625   if (fd < 0)
10626     return 1;
10627 #define MAP_ANONYMOUS 0
10628 #endif
10629   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10630            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10631            fd, 0) != (void *) MAP_FAILED)
10632     return 0;
10633   perror ("conftest: mmap failed");
10634   return 1;
10635 }
10636 EOF
10637 if { (eval echo configure:10638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10638 then
10639   have_mmap=yes
10640 else
10641   conftest_rc="$?"
10642   echo "configure: failed program was:" >&5
10643   cat conftest.$ac_ext >&5
10644   rm -fr conftest*
10645   have_mmap=no
10646 fi
10647 rm -fr conftest* ;;
10648 esac
10649 echo "$ac_t""$have_mmap" 1>&6
10650 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10651     Defining HAVE_MMAP
10652 EOF
10653 cat >> confdefs.h <<\EOF
10654 #define HAVE_MMAP 1
10655 EOF
10656 }
10657
10658
10659 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10660 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10661 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10662     Defining REL_ALLOC
10663 EOF
10664 cat >> confdefs.h <<\EOF
10665 #define REL_ALLOC 1
10666 EOF
10667 }
10668
10669
10670 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10671 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10672 echo "configure:10673: checking for termios.h" >&5
10673
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10676 "configure"
10676 #include "confdefs.h"
10677 #include <termios.h>
10678 EOF
10679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10680 { (eval echo configure:10681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10682 if test -z "$ac_err"; then
10683   rm -rf conftest*
10684   eval "ac_cv_header_$ac_safe=yes"
10685 else
10686   echo "$ac_err" >&5
10687   echo "configure: failed program was:" >&5
10688   cat conftest.$ac_ext >&5
10689   rm -rf conftest*
10690   eval "ac_cv_header_$ac_safe=no"
10691 fi
10692 rm -f conftest*
10693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10694   echo "$ac_t""yes" 1>&6
10695   { test "$extra_verbose" = "yes" && cat << \EOF
10696     Defining HAVE_TERMIOS
10697 EOF
10698 cat >> confdefs.h <<\EOF
10699 #define HAVE_TERMIOS 1
10700 EOF
10701 }
10702
10703   { test "$extra_verbose" = "yes" && cat << \EOF
10704     Defining SIGNALS_VIA_CHARACTERS
10705 EOF
10706 cat >> confdefs.h <<\EOF
10707 #define SIGNALS_VIA_CHARACTERS 1
10708 EOF
10709 }
10710
10711   { test "$extra_verbose" = "yes" && cat << \EOF
10712     Defining NO_TERMIO
10713 EOF
10714 cat >> confdefs.h <<\EOF
10715 #define NO_TERMIO 1
10716 EOF
10717 }
10718
10719 else
10720   echo "$ac_t""no" 1>&6
10721 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10722 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10723 echo "configure:10724: checking for termio.h" >&5
10724
10725 cat > conftest.$ac_ext <<EOF
10726 #line 10727 "configure"
10727 #include "confdefs.h"
10728 #include <termio.h>
10729 EOF
10730 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10731 { (eval echo configure:10732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10732 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10733 if test -z "$ac_err"; then
10734   rm -rf conftest*
10735   eval "ac_cv_header_$ac_safe=yes"
10736 else
10737   echo "$ac_err" >&5
10738   echo "configure: failed program was:" >&5
10739   cat conftest.$ac_ext >&5
10740   rm -rf conftest*
10741   eval "ac_cv_header_$ac_safe=no"
10742 fi
10743 rm -f conftest*
10744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10745   echo "$ac_t""yes" 1>&6
10746   { test "$extra_verbose" = "yes" && cat << \EOF
10747     Defining HAVE_TERMIO
10748 EOF
10749 cat >> confdefs.h <<\EOF
10750 #define HAVE_TERMIO 1
10751 EOF
10752 }
10753
10754 else
10755   echo "$ac_t""no" 1>&6
10756 fi
10757
10758 fi
10759
10760
10761
10762 echo $ac_n "checking for socket""... $ac_c" 1>&6
10763 echo "configure:10764: checking for socket" >&5
10764
10765 cat > conftest.$ac_ext <<EOF
10766 #line 10767 "configure"
10767 #include "confdefs.h"
10768 /* System header to define __stub macros and hopefully few prototypes,
10769     which can conflict with char socket(); below.  */
10770 #include <assert.h>
10771 /* Override any gcc2 internal prototype to avoid an error.  */
10772 /* We use char because int might match the return type of a gcc2
10773     builtin and then its argument prototype would still apply.  */
10774 char socket();
10775
10776 int main() {
10777
10778 /* The GNU C library defines this for functions which it implements
10779     to always fail with ENOSYS.  Some functions are actually named
10780     something starting with __ and the normal name is an alias.  */
10781 #if defined (__stub_socket) || defined (__stub___socket)
10782 choke me
10783 #else
10784 socket();
10785 #endif
10786
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10790   rm -rf conftest*
10791   eval "ac_cv_func_socket=yes"
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   eval "ac_cv_func_socket=no"
10797 fi
10798 rm -f conftest*
10799
10800 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10801   echo "$ac_t""yes" 1>&6
10802   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10803 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10804 echo "configure:10805: checking for netinet/in.h" >&5
10805
10806 cat > conftest.$ac_ext <<EOF
10807 #line 10808 "configure"
10808 #include "confdefs.h"
10809 #include <netinet/in.h>
10810 EOF
10811 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10812 { (eval echo configure:10813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10813 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10814 if test -z "$ac_err"; then
10815   rm -rf conftest*
10816   eval "ac_cv_header_$ac_safe=yes"
10817 else
10818   echo "$ac_err" >&5
10819   echo "configure: failed program was:" >&5
10820   cat conftest.$ac_ext >&5
10821   rm -rf conftest*
10822   eval "ac_cv_header_$ac_safe=no"
10823 fi
10824 rm -f conftest*
10825 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10826   echo "$ac_t""yes" 1>&6
10827   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10828 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10829 echo "configure:10830: checking for arpa/inet.h" >&5
10830
10831 cat > conftest.$ac_ext <<EOF
10832 #line 10833 "configure"
10833 #include "confdefs.h"
10834 #include <arpa/inet.h>
10835 EOF
10836 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10837 { (eval echo configure:10838: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10838 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10839 if test -z "$ac_err"; then
10840   rm -rf conftest*
10841   eval "ac_cv_header_$ac_safe=yes"
10842 else
10843   echo "$ac_err" >&5
10844   echo "configure: failed program was:" >&5
10845   cat conftest.$ac_ext >&5
10846   rm -rf conftest*
10847   eval "ac_cv_header_$ac_safe=no"
10848 fi
10849 rm -f conftest*
10850 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10851   echo "$ac_t""yes" 1>&6
10852   
10853   { test "$extra_verbose" = "yes" && cat << \EOF
10854     Defining HAVE_SOCKETS
10855 EOF
10856 cat >> confdefs.h <<\EOF
10857 #define HAVE_SOCKETS 1
10858 EOF
10859 }
10860
10861       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10862 echo "configure:10863: checking "for sun_len member in struct sockaddr_un"" >&5
10863       cat > conftest.$ac_ext <<EOF
10864 #line 10865 "configure"
10865 #include "confdefs.h"
10866
10867 #include <sys/types.h>
10868 #include <sys/socket.h>
10869 #include <sys/un.h>
10870       
10871 int main() {
10872 static struct sockaddr_un x; x.sun_len = 1;
10873 ; return 0; }
10874 EOF
10875 if { (eval echo configure:10876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10876   rm -rf conftest*
10877   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10878     Defining HAVE_SOCKADDR_SUN_LEN
10879 EOF
10880 cat >> confdefs.h <<\EOF
10881 #define HAVE_SOCKADDR_SUN_LEN 1
10882 EOF
10883 }
10884
10885 else
10886   echo "configure: failed program was:" >&5
10887   cat conftest.$ac_ext >&5
10888   rm -rf conftest*
10889   echo "$ac_t""no" 1>&6
10890 fi
10891 rm -f conftest*
10892       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10893 echo "configure:10894: checking "for ip_mreq struct in netinet/in.h"" >&5
10894       cat > conftest.$ac_ext <<EOF
10895 #line 10896 "configure"
10896 #include "confdefs.h"
10897
10898 #include <sys/types.h>
10899 #include <netinet/in.h>
10900       
10901 int main() {
10902 static struct ip_mreq x;
10903 ; return 0; }
10904 EOF
10905 if { (eval echo configure:10906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10906   rm -rf conftest*
10907   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10908     Defining HAVE_MULTICAST
10909 EOF
10910 cat >> confdefs.h <<\EOF
10911 #define HAVE_MULTICAST 1
10912 EOF
10913 }
10914
10915 else
10916   echo "configure: failed program was:" >&5
10917   cat conftest.$ac_ext >&5
10918   rm -rf conftest*
10919   echo "$ac_t""no" 1>&6
10920 fi
10921 rm -f conftest*
10922 else
10923   echo "$ac_t""no" 1>&6
10924 fi
10925
10926 else
10927   echo "$ac_t""no" 1>&6
10928 fi
10929
10930 else
10931   echo "$ac_t""no" 1>&6
10932 fi
10933
10934
10935 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10936 echo "configure:10937: checking for msgget" >&5
10937
10938 cat > conftest.$ac_ext <<EOF
10939 #line 10940 "configure"
10940 #include "confdefs.h"
10941 /* System header to define __stub macros and hopefully few prototypes,
10942     which can conflict with char msgget(); below.  */
10943 #include <assert.h>
10944 /* Override any gcc2 internal prototype to avoid an error.  */
10945 /* We use char because int might match the return type of a gcc2
10946     builtin and then its argument prototype would still apply.  */
10947 char msgget();
10948
10949 int main() {
10950
10951 /* The GNU C library defines this for functions which it implements
10952     to always fail with ENOSYS.  Some functions are actually named
10953     something starting with __ and the normal name is an alias.  */
10954 #if defined (__stub_msgget) || defined (__stub___msgget)
10955 choke me
10956 #else
10957 msgget();
10958 #endif
10959
10960 ; return 0; }
10961 EOF
10962 if { (eval echo configure:10963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10963   rm -rf conftest*
10964   eval "ac_cv_func_msgget=yes"
10965 else
10966   echo "configure: failed program was:" >&5
10967   cat conftest.$ac_ext >&5
10968   rm -rf conftest*
10969   eval "ac_cv_func_msgget=no"
10970 fi
10971 rm -f conftest*
10972
10973 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10974   echo "$ac_t""yes" 1>&6
10975   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10976 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10977 echo "configure:10978: checking for sys/ipc.h" >&5
10978
10979 cat > conftest.$ac_ext <<EOF
10980 #line 10981 "configure"
10981 #include "confdefs.h"
10982 #include <sys/ipc.h>
10983 EOF
10984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10985 { (eval echo configure:10986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10987 if test -z "$ac_err"; then
10988   rm -rf conftest*
10989   eval "ac_cv_header_$ac_safe=yes"
10990 else
10991   echo "$ac_err" >&5
10992   echo "configure: failed program was:" >&5
10993   cat conftest.$ac_ext >&5
10994   rm -rf conftest*
10995   eval "ac_cv_header_$ac_safe=no"
10996 fi
10997 rm -f conftest*
10998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10999   echo "$ac_t""yes" 1>&6
11000   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11001 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11002 echo "configure:11003: checking for sys/msg.h" >&5
11003
11004 cat > conftest.$ac_ext <<EOF
11005 #line 11006 "configure"
11006 #include "confdefs.h"
11007 #include <sys/msg.h>
11008 EOF
11009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11010 { (eval echo configure:11011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11012 if test -z "$ac_err"; then
11013   rm -rf conftest*
11014   eval "ac_cv_header_$ac_safe=yes"
11015 else
11016   echo "$ac_err" >&5
11017   echo "configure: failed program was:" >&5
11018   cat conftest.$ac_ext >&5
11019   rm -rf conftest*
11020   eval "ac_cv_header_$ac_safe=no"
11021 fi
11022 rm -f conftest*
11023 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11024   echo "$ac_t""yes" 1>&6
11025   { test "$extra_verbose" = "yes" && cat << \EOF
11026     Defining HAVE_SYSVIPC
11027 EOF
11028 cat >> confdefs.h <<\EOF
11029 #define HAVE_SYSVIPC 1
11030 EOF
11031 }
11032
11033 else
11034   echo "$ac_t""no" 1>&6
11035 fi
11036
11037 else
11038   echo "$ac_t""no" 1>&6
11039 fi
11040
11041 else
11042   echo "$ac_t""no" 1>&6
11043 fi
11044
11045
11046 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11047 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11048 echo "configure:11049: checking for dirent.h" >&5
11049
11050 cat > conftest.$ac_ext <<EOF
11051 #line 11052 "configure"
11052 #include "confdefs.h"
11053 #include <dirent.h>
11054 EOF
11055 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11056 { (eval echo configure:11057: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11057 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11058 if test -z "$ac_err"; then
11059   rm -rf conftest*
11060   eval "ac_cv_header_$ac_safe=yes"
11061 else
11062   echo "$ac_err" >&5
11063   echo "configure: failed program was:" >&5
11064   cat conftest.$ac_ext >&5
11065   rm -rf conftest*
11066   eval "ac_cv_header_$ac_safe=no"
11067 fi
11068 rm -f conftest*
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071   { test "$extra_verbose" = "yes" && cat << \EOF
11072     Defining SYSV_SYSTEM_DIR
11073 EOF
11074 cat >> confdefs.h <<\EOF
11075 #define SYSV_SYSTEM_DIR 1
11076 EOF
11077 }
11078
11079 else
11080   echo "$ac_t""no" 1>&6
11081 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11082 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11083 echo "configure:11084: checking for sys/dir.h" >&5
11084
11085 cat > conftest.$ac_ext <<EOF
11086 #line 11087 "configure"
11087 #include "confdefs.h"
11088 #include <sys/dir.h>
11089 EOF
11090 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11091 { (eval echo configure:11092: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11092 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11093 if test -z "$ac_err"; then
11094   rm -rf conftest*
11095   eval "ac_cv_header_$ac_safe=yes"
11096 else
11097   echo "$ac_err" >&5
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   eval "ac_cv_header_$ac_safe=no"
11102 fi
11103 rm -f conftest*
11104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11105   echo "$ac_t""yes" 1>&6
11106   :
11107 else
11108   echo "$ac_t""no" 1>&6
11109 { test "$extra_verbose" = "yes" && cat << \EOF
11110     Defining NONSYSTEM_DIR_LIBRARY
11111 EOF
11112 cat >> confdefs.h <<\EOF
11113 #define NONSYSTEM_DIR_LIBRARY 1
11114 EOF
11115 }
11116
11117 fi
11118
11119 fi
11120
11121
11122 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11123 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11124 echo "configure:11125: checking for nlist.h" >&5
11125
11126 cat > conftest.$ac_ext <<EOF
11127 #line 11128 "configure"
11128 #include "confdefs.h"
11129 #include <nlist.h>
11130 EOF
11131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11132 { (eval echo configure:11133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11134 if test -z "$ac_err"; then
11135   rm -rf conftest*
11136   eval "ac_cv_header_$ac_safe=yes"
11137 else
11138   echo "$ac_err" >&5
11139   echo "configure: failed program was:" >&5
11140   cat conftest.$ac_ext >&5
11141   rm -rf conftest*
11142   eval "ac_cv_header_$ac_safe=no"
11143 fi
11144 rm -f conftest*
11145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147   { test "$extra_verbose" = "yes" && cat << \EOF
11148     Defining NLIST_STRUCT
11149 EOF
11150 cat >> confdefs.h <<\EOF
11151 #define NLIST_STRUCT 1
11152 EOF
11153 }
11154
11155 else
11156   echo "$ac_t""no" 1>&6
11157 fi
11158
11159
11160
11161 echo "checking "for sound support"" 1>&6
11162 echo "configure:11163: checking "for sound support"" >&5
11163 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11164
11165 if test "$with_native_sound" != "no"; then
11166     if test -n "$native_sound_lib"; then
11167     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11168 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11169 echo "configure:11170: checking for multimedia/audio_device.h" >&5
11170
11171 cat > conftest.$ac_ext <<EOF
11172 #line 11173 "configure"
11173 #include "confdefs.h"
11174 #include <multimedia/audio_device.h>
11175 EOF
11176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11177 { (eval echo configure:11178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11179 if test -z "$ac_err"; then
11180   rm -rf conftest*
11181   eval "ac_cv_header_$ac_safe=yes"
11182 else
11183   echo "$ac_err" >&5
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   eval "ac_cv_header_$ac_safe=no"
11188 fi
11189 rm -f conftest*
11190 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11191   echo "$ac_t""yes" 1>&6
11192   sound_found=yes sound_cflags=""
11193       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11194    echo "    xemacs will be linked with \"sunplay.o\""
11195  fi
11196 else
11197   echo "$ac_t""no" 1>&6
11198 fi
11199
11200   fi
11201
11202     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11203     sound_found=yes
11204     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11205    echo "    xemacs will be linked with \"sunplay.o\""
11206  fi
11207     if test -d "/usr/demo/SOUND/include"
11208       then sound_cflags="-I/usr/demo/SOUND/include"
11209       else sound_cflags="-I/usr/demo/SOUND"
11210     fi
11211     if test -z "$native_sound_lib" ; then
11212       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11213         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11214         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11215       fi
11216     fi
11217   fi
11218
11219     if test -z "$sound_found"; then
11220     case "$canonical" in
11221     *-sgi-* )
11222       if test -z "$native_sound_lib"; then
11223         
11224 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11225 echo "configure:11226: checking for ALopenport in -laudio" >&5
11226 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11227
11228 xe_check_libs=" -laudio "
11229 cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 /* Override any gcc2 internal prototype to avoid an error.  */
11233 /* We use char because int might match the return type of a gcc2
11234     builtin and then its argument prototype would still apply.  */
11235 char ALopenport();
11236
11237 int main() {
11238 ALopenport()
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11242   rm -rf conftest*
11243   eval "ac_cv_lib_$ac_lib_var=yes"
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_lib_$ac_lib_var=no"
11249 fi
11250 rm -f conftest*
11251 xe_check_libs=""
11252
11253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11254   echo "$ac_t""yes" 1>&6
11255   native_sound_lib="-laudio"
11256 else
11257   echo "$ac_t""no" 1>&6
11258 fi
11259
11260
11261       fi
11262       if test -n "$native_sound_lib"; then
11263         sound_found=yes sound_cflags=""
11264         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11265    echo "    xemacs will be linked with \"sgiplay.o\""
11266  fi
11267       fi ;;
11268     hppa*-hp-hpux* )
11269       if test -z "$native_sound_lib"; then
11270         
11271 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11272 echo "configure:11273: checking for AOpenAudio in -lAlib" >&5
11273 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11274
11275 xe_check_libs=" -lAlib "
11276 cat > conftest.$ac_ext <<EOF
11277 #line 11278 "configure"
11278 #include "confdefs.h"
11279 /* Override any gcc2 internal prototype to avoid an error.  */
11280 /* We use char because int might match the return type of a gcc2
11281     builtin and then its argument prototype would still apply.  */
11282 char AOpenAudio();
11283
11284 int main() {
11285 AOpenAudio()
11286 ; return 0; }
11287 EOF
11288 if { (eval echo configure:11289: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11289   rm -rf conftest*
11290   eval "ac_cv_lib_$ac_lib_var=yes"
11291 else
11292   echo "configure: failed program was:" >&5
11293   cat conftest.$ac_ext >&5
11294   rm -rf conftest*
11295   eval "ac_cv_lib_$ac_lib_var=no"
11296 fi
11297 rm -f conftest*
11298 xe_check_libs=""
11299
11300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11301   echo "$ac_t""yes" 1>&6
11302   native_sound_lib="-lAlib"
11303 else
11304   echo "$ac_t""no" 1>&6
11305 fi
11306
11307
11308       fi
11309       if test -n "$native_sound_lib"; then
11310         sound_found=yes
11311         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11312    echo "    xemacs will be linked with \"hpplay.o\""
11313  fi
11314         if test "$GCC" = "yes" # Kludge city
11315           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11316           else sound_cflags="+e -I/usr/audio/examples"
11317         fi
11318       fi ;;
11319     esac
11320   fi
11321
11322     if test -z "$sound_found"; then
11323     for dir in "machine" "sys" "linux"; do
11324       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11325 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11326 echo "configure:11327: checking for ${dir}/soundcard.h" >&5
11327
11328 cat > conftest.$ac_ext <<EOF
11329 #line 11330 "configure"
11330 #include "confdefs.h"
11331 #include <${dir}/soundcard.h>
11332 EOF
11333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11334 { (eval echo configure:11335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11336 if test -z "$ac_err"; then
11337   rm -rf conftest*
11338   eval "ac_cv_header_$ac_safe=yes"
11339 else
11340   echo "$ac_err" >&5
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   eval "ac_cv_header_$ac_safe=no"
11345 fi
11346 rm -f conftest*
11347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11348   echo "$ac_t""yes" 1>&6
11349   sound_found=yes
11350        need_miscplay=yes
11351         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11352    echo "    xemacs will be linked with \"linuxplay.o\""
11353  fi
11354         { test "$extra_verbose" = "yes" && cat << EOF
11355     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11356 EOF
11357 cat >> confdefs.h <<EOF
11358 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11359 EOF
11360 }
11361
11362         break
11363 else
11364   echo "$ac_t""no" 1>&6
11365 fi
11366
11367     done
11368   fi
11369
11370   test "$sound_found" = "yes" && with_native_sound=yes
11371 fi
11372
11373 if test "$with_native_sound" = "yes"; then
11374   { test "$extra_verbose" = "yes" && cat << \EOF
11375     Defining HAVE_NATIVE_SOUND
11376 EOF
11377 cat >> confdefs.h <<\EOF
11378 #define HAVE_NATIVE_SOUND 1
11379 EOF
11380 }
11381
11382   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11383 fi
11384
11385 if test "$with_nas_sound" != "no"; then
11386   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11387 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11388 echo "configure:11389: checking for audio/audiolib.h" >&5
11389
11390 cat > conftest.$ac_ext <<EOF
11391 #line 11392 "configure"
11392 #include "confdefs.h"
11393 #include <audio/audiolib.h>
11394 EOF
11395 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11396 { (eval echo configure:11397: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11397 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11398 if test -z "$ac_err"; then
11399   rm -rf conftest*
11400   eval "ac_cv_header_$ac_safe=yes"
11401 else
11402   echo "$ac_err" >&5
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   eval "ac_cv_header_$ac_safe=no"
11407 fi
11408 rm -f conftest*
11409 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11410   echo "$ac_t""yes" 1>&6
11411   
11412     
11413 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11414 echo "configure:11415: checking for AuOpenServer in -laudio" >&5
11415 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11416
11417 xe_check_libs=" -laudio "
11418 cat > conftest.$ac_ext <<EOF
11419 #line 11420 "configure"
11420 #include "confdefs.h"
11421 /* Override any gcc2 internal prototype to avoid an error.  */
11422 /* We use char because int might match the return type of a gcc2
11423     builtin and then its argument prototype would still apply.  */
11424 char AuOpenServer();
11425
11426 int main() {
11427 AuOpenServer()
11428 ; return 0; }
11429 EOF
11430 if { (eval echo configure:11431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11431   rm -rf conftest*
11432   eval "ac_cv_lib_$ac_lib_var=yes"
11433 else
11434   echo "configure: failed program was:" >&5
11435   cat conftest.$ac_ext >&5
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=no"
11438 fi
11439 rm -f conftest*
11440 xe_check_libs=""
11441
11442 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11443   echo "$ac_t""yes" 1>&6
11444   have_nas_sound=yes
11445 else
11446   echo "$ac_t""no" 1>&6
11447 fi
11448
11449
11450 else
11451   echo "$ac_t""no" 1>&6
11452 fi
11453
11454   if test "$have_nas_sound" = "yes"; then
11455     with_nas_sound=yes
11456     { test "$extra_verbose" = "yes" && cat << \EOF
11457     Defining HAVE_NAS_SOUND
11458 EOF
11459 cat >> confdefs.h <<\EOF
11460 #define HAVE_NAS_SOUND 1
11461 EOF
11462 }
11463
11464     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11465    echo "    xemacs will be linked with \"nas.o\""
11466  fi
11467     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11468             cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 #include <audio/Xtutil.h>
11472 EOF
11473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11474   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11475   :
11476 else
11477   rm -rf conftest*
11478   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11479     Defining NAS_NO_ERROR_JUMP
11480 EOF
11481 cat >> confdefs.h <<\EOF
11482 #define NAS_NO_ERROR_JUMP 1
11483 EOF
11484 }
11485
11486 fi
11487 rm -f conftest*
11488
11489   else
11490     test "$with_nas_sound" = "yes" && \
11491       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11492     with_nas_sound=no
11493   fi
11494 fi
11495
11496 if test "$with_esd_sound" != "no"; then
11497   # Extract the first word of "esd-config", so it can be a program name with args.
11498 set dummy esd-config; ac_word=$2
11499 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11500 echo "configure:11501: checking for $ac_word" >&5
11501
11502 if test -n "$have_esd_config"; then
11503   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11504 else
11505   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11506   ac_dummy="$PATH"
11507   for ac_dir in $ac_dummy; do
11508     test -z "$ac_dir" && ac_dir=.
11509     if test -f $ac_dir/$ac_word; then
11510       ac_cv_prog_have_esd_config="yes"
11511       break
11512     fi
11513   done
11514   IFS="$ac_save_ifs"
11515   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11516 fi
11517 have_esd_config="$ac_cv_prog_have_esd_config"
11518 if test -n "$have_esd_config"; then
11519   echo "$ac_t""$have_esd_config" 1>&6
11520 else
11521   echo "$ac_t""no" 1>&6
11522 fi
11523
11524   if test "$have_esd_config" = "yes"; then
11525     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11526     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
11527     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11528     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11529 echo "configure:11530: checking for esd_play_stream" >&5
11530
11531 cat > conftest.$ac_ext <<EOF
11532 #line 11533 "configure"
11533 #include "confdefs.h"
11534 /* System header to define __stub macros and hopefully few prototypes,
11535     which can conflict with char esd_play_stream(); below.  */
11536 #include <assert.h>
11537 /* Override any gcc2 internal prototype to avoid an error.  */
11538 /* We use char because int might match the return type of a gcc2
11539     builtin and then its argument prototype would still apply.  */
11540 char esd_play_stream();
11541
11542 int main() {
11543
11544 /* The GNU C library defines this for functions which it implements
11545     to always fail with ENOSYS.  Some functions are actually named
11546     something starting with __ and the normal name is an alias.  */
11547 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11548 choke me
11549 #else
11550 esd_play_stream();
11551 #endif
11552
11553 ; return 0; }
11554 EOF
11555 if { (eval echo configure:11556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11556   rm -rf conftest*
11557   eval "ac_cv_func_esd_play_stream=yes"
11558 else
11559   echo "configure: failed program was:" >&5
11560   cat conftest.$ac_ext >&5
11561   rm -rf conftest*
11562   eval "ac_cv_func_esd_play_stream=no"
11563 fi
11564 rm -f conftest*
11565
11566 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11567   echo "$ac_t""yes" 1>&6
11568   have_esd_sound=yes
11569 else
11570   echo "$ac_t""no" 1>&6
11571 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11572 fi
11573
11574   fi
11575
11576   if test "$have_esd_sound" = "yes"; then
11577     with_esd_sound=yes
11578     need_miscplay=yes
11579     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11580    echo "    xemacs will be linked with \"esd.o\""
11581  fi
11582     { test "$extra_verbose" = "yes" && cat << \EOF
11583     Defining HAVE_ESD_SOUND
11584 EOF
11585 cat >> confdefs.h <<\EOF
11586 #define HAVE_ESD_SOUND 1
11587 EOF
11588 }
11589
11590   else
11591     test "$with_esd_sound" = "yes" && \
11592       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11593     with_esd_sound=no
11594   fi
11595 fi
11596
11597 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11598    echo "    xemacs will be linked with \"miscplay.o\""
11599  fi
11600
11601
11602 test -z "$with_tty" && with_tty=yes
11603
11604 if test "$with_tty" = "yes"  ; then
11605   echo "checking for TTY-related features" 1>&6
11606 echo "configure:11607: checking for TTY-related features" >&5
11607   { test "$extra_verbose" = "yes" && cat << \EOF
11608     Defining HAVE_TTY
11609 EOF
11610 cat >> confdefs.h <<\EOF
11611 #define HAVE_TTY 1
11612 EOF
11613 }
11614
11615   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
11616    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\""
11617  fi
11618
11619     if test -z "$with_ncurses"; then
11620     
11621 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11622 echo "configure:11623: checking for tgetent in -lncurses" >&5
11623 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11624
11625 xe_check_libs=" -lncurses "
11626 cat > conftest.$ac_ext <<EOF
11627 #line 11628 "configure"
11628 #include "confdefs.h"
11629 /* Override any gcc2 internal prototype to avoid an error.  */
11630 /* We use char because int might match the return type of a gcc2
11631     builtin and then its argument prototype would still apply.  */
11632 char tgetent();
11633
11634 int main() {
11635 tgetent()
11636 ; return 0; }
11637 EOF
11638 if { (eval echo configure:11639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11639   rm -rf conftest*
11640   eval "ac_cv_lib_$ac_lib_var=yes"
11641 else
11642   echo "configure: failed program was:" >&5
11643   cat conftest.$ac_ext >&5
11644   rm -rf conftest*
11645   eval "ac_cv_lib_$ac_lib_var=no"
11646 fi
11647 rm -f conftest*
11648 xe_check_libs=""
11649
11650 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11651   echo "$ac_t""yes" 1>&6
11652   with_ncurses=yes
11653 else
11654   echo "$ac_t""no" 1>&6
11655 with_ncurses=no
11656 fi
11657
11658
11659   fi
11660   if test "$with_ncurses" = "yes"; then
11661     { test "$extra_verbose" = "yes" && cat << \EOF
11662     Defining HAVE_NCURSES
11663 EOF
11664 cat >> confdefs.h <<\EOF
11665 #define HAVE_NCURSES 1
11666 EOF
11667 }
11668
11669     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11670 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11671 echo "configure:11672: checking for ncurses/curses.h" >&5
11672
11673 cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676 #include <ncurses/curses.h>
11677 EOF
11678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11679 { (eval echo configure:11680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11681 if test -z "$ac_err"; then
11682   rm -rf conftest*
11683   eval "ac_cv_header_$ac_safe=yes"
11684 else
11685   echo "$ac_err" >&5
11686   echo "configure: failed program was:" >&5
11687   cat conftest.$ac_ext >&5
11688   rm -rf conftest*
11689   eval "ac_cv_header_$ac_safe=no"
11690 fi
11691 rm -f conftest*
11692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11693   echo "$ac_t""yes" 1>&6
11694   curses_h_path=ncurses/curses.h
11695 else
11696   echo "$ac_t""no" 1>&6
11697 fi
11698
11699     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11700 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11701 echo "configure:11702: checking for ncurses/term.h" >&5
11702
11703 cat > conftest.$ac_ext <<EOF
11704 #line 11705 "configure"
11705 #include "confdefs.h"
11706 #include <ncurses/term.h>
11707 EOF
11708 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11709 { (eval echo configure:11710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11710 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11711 if test -z "$ac_err"; then
11712   rm -rf conftest*
11713   eval "ac_cv_header_$ac_safe=yes"
11714 else
11715   echo "$ac_err" >&5
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   eval "ac_cv_header_$ac_safe=no"
11720 fi
11721 rm -f conftest*
11722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11723   echo "$ac_t""yes" 1>&6
11724   term_h_path=ncurses/term.h
11725 else
11726   echo "$ac_t""no" 1>&6
11727 fi
11728
11729     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11730    echo "    xemacs will be linked with \"terminfo.o\""
11731  fi
11732     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11733
11734     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11735                         save_c_switch_site="$c_switch_site"
11736       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11737       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11738 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11739 echo "configure:11740: checking for ncurses/curses.h" >&5
11740
11741 cat > conftest.$ac_ext <<EOF
11742 #line 11743 "configure"
11743 #include "confdefs.h"
11744 #include <ncurses/curses.h>
11745 EOF
11746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11747 { (eval echo configure:11748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11749 if test -z "$ac_err"; then
11750   rm -rf conftest*
11751   eval "ac_cv_header_$ac_safe=yes"
11752 else
11753   echo "$ac_err" >&5
11754   echo "configure: failed program was:" >&5
11755   cat conftest.$ac_ext >&5
11756   rm -rf conftest*
11757   eval "ac_cv_header_$ac_safe=no"
11758 fi
11759 rm -f conftest*
11760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11761   echo "$ac_t""yes" 1>&6
11762   curses_h_path=ncurses/curses.h
11763 else
11764   echo "$ac_t""no" 1>&6
11765 fi
11766
11767       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11768         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11769         else c_switch_site="$save_c_switch_site"
11770       fi
11771     fi
11772   else         if test "$have_terminfo" = "yes"; then
11773       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11774    echo "    xemacs will be linked with \"terminfo.o\""
11775  fi
11776       if test -n "$libs_termcap"; then
11777         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11778       else
11779         for lib in curses termlib termcap; do
11780           
11781 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11782 echo "configure:11783: checking for tgetent in -l$lib" >&5
11783 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11784
11785 xe_check_libs=" -l$lib "
11786 cat > conftest.$ac_ext <<EOF
11787 #line 11788 "configure"
11788 #include "confdefs.h"
11789 /* Override any gcc2 internal prototype to avoid an error.  */
11790 /* We use char because int might match the return type of a gcc2
11791     builtin and then its argument prototype would still apply.  */
11792 char tgetent();
11793
11794 int main() {
11795 tgetent()
11796 ; return 0; }
11797 EOF
11798 if { (eval echo configure:11799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11799   rm -rf conftest*
11800   eval "ac_cv_lib_$ac_lib_var=yes"
11801 else
11802   echo "configure: failed program was:" >&5
11803   cat conftest.$ac_ext >&5
11804   rm -rf conftest*
11805   eval "ac_cv_lib_$ac_lib_var=no"
11806 fi
11807 rm -f conftest*
11808 xe_check_libs=""
11809
11810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11811   echo "$ac_t""yes" 1>&6
11812   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11813 else
11814   echo "$ac_t""no" 1>&6
11815 fi
11816
11817
11818         done
11819       fi
11820     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11821    echo "    xemacs will be linked with \"tparam.o\""
11822  fi
11823                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11824       if test -n "$libs_termcap"; then
11825         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11826       else
11827         
11828 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11829 echo "configure:11830: checking for tgetent in -lcurses" >&5
11830 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11831
11832 xe_check_libs=" -lcurses "
11833 cat > conftest.$ac_ext <<EOF
11834 #line 11835 "configure"
11835 #include "confdefs.h"
11836 /* Override any gcc2 internal prototype to avoid an error.  */
11837 /* We use char because int might match the return type of a gcc2
11838     builtin and then its argument prototype would still apply.  */
11839 char tgetent();
11840
11841 int main() {
11842 tgetent()
11843 ; return 0; }
11844 EOF
11845 if { (eval echo configure:11846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11846   rm -rf conftest*
11847   eval "ac_cv_lib_$ac_lib_var=yes"
11848 else
11849   echo "configure: failed program was:" >&5
11850   cat conftest.$ac_ext >&5
11851   rm -rf conftest*
11852   eval "ac_cv_lib_$ac_lib_var=no"
11853 fi
11854 rm -f conftest*
11855 xe_check_libs=""
11856
11857 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11858   echo "$ac_t""yes" 1>&6
11859   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11860 else
11861   echo "$ac_t""no" 1>&6
11862 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11863 echo "configure:11864: checking for tgetent in -ltermcap" >&5
11864 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11865
11866 xe_check_libs=" -ltermcap "
11867 cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 /* Override any gcc2 internal prototype to avoid an error.  */
11871 /* We use char because int might match the return type of a gcc2
11872     builtin and then its argument prototype would still apply.  */
11873 char tgetent();
11874
11875 int main() {
11876 tgetent()
11877 ; return 0; }
11878 EOF
11879 if { (eval echo configure:11880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11880   rm -rf conftest*
11881   eval "ac_cv_lib_$ac_lib_var=yes"
11882 else
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   eval "ac_cv_lib_$ac_lib_var=no"
11887 fi
11888 rm -f conftest*
11889 xe_check_libs=""
11890
11891 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11892   echo "$ac_t""yes" 1>&6
11893   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11894 else
11895   echo "$ac_t""no" 1>&6
11896 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11897    echo "    xemacs will be linked with \"termcap.o\""
11898  fi
11899 fi
11900
11901
11902 fi
11903
11904
11905       fi
11906     fi
11907   fi
11908   { test "$extra_verbose" = "yes" && cat << EOF
11909     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11910 EOF
11911 cat >> confdefs.h <<EOF
11912 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11913 EOF
11914 }
11915
11916   { test "$extra_verbose" = "yes" && cat << EOF
11917     Defining TERM_H_PATH = "${term_h_path-term.h}"
11918 EOF
11919 cat >> confdefs.h <<EOF
11920 #define TERM_H_PATH "${term_h_path-term.h}"
11921 EOF
11922 }
11923
11924
11925     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11926 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11927 echo "configure:11928: checking for gpm.h" >&5
11928
11929 cat > conftest.$ac_ext <<EOF
11930 #line 11931 "configure"
11931 #include "confdefs.h"
11932 #include <gpm.h>
11933 EOF
11934 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11935 { (eval echo configure:11936: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11936 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11937 if test -z "$ac_err"; then
11938   rm -rf conftest*
11939   eval "ac_cv_header_$ac_safe=yes"
11940 else
11941   echo "$ac_err" >&5
11942   echo "configure: failed program was:" >&5
11943   cat conftest.$ac_ext >&5
11944   rm -rf conftest*
11945   eval "ac_cv_header_$ac_safe=no"
11946 fi
11947 rm -f conftest*
11948 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11949   echo "$ac_t""yes" 1>&6
11950   :
11951 else
11952   echo "$ac_t""no" 1>&6
11953 with_gpm=no
11954 fi
11955  }
11956   test -z "$with_gpm" && { 
11957 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11958 echo "configure:11959: checking for Gpm_Open in -lgpm" >&5
11959 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11960
11961 xe_check_libs=" -lgpm "
11962 cat > conftest.$ac_ext <<EOF
11963 #line 11964 "configure"
11964 #include "confdefs.h"
11965 /* Override any gcc2 internal prototype to avoid an error.  */
11966 /* We use char because int might match the return type of a gcc2
11967     builtin and then its argument prototype would still apply.  */
11968 char Gpm_Open();
11969
11970 int main() {
11971 Gpm_Open()
11972 ; return 0; }
11973 EOF
11974 if { (eval echo configure:11975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11975   rm -rf conftest*
11976   eval "ac_cv_lib_$ac_lib_var=yes"
11977 else
11978   echo "configure: failed program was:" >&5
11979   cat conftest.$ac_ext >&5
11980   rm -rf conftest*
11981   eval "ac_cv_lib_$ac_lib_var=no"
11982 fi
11983 rm -f conftest*
11984 xe_check_libs=""
11985
11986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11987   echo "$ac_t""yes" 1>&6
11988   with_gpm=yes
11989 else
11990   echo "$ac_t""no" 1>&6
11991 with_gpm=no
11992 fi
11993
11994  }
11995   if test "$with_gpm" = "yes"; then
11996     { test "$extra_verbose" = "yes" && cat << \EOF
11997     Defining HAVE_GPM
11998 EOF
11999 cat >> confdefs.h <<\EOF
12000 #define HAVE_GPM 1
12001 EOF
12002 }
12003
12004     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12005    echo "    xemacs will be linked with \"gpmevent.o\""
12006  fi
12007     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12008   fi
12009
12010 else   for feature in ncurses gpm; do
12011     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12012       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12013     fi
12014     eval "with_${feature}=no"
12015   done
12016 fi 
12017 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12018    echo "    xemacs will be linked with \"event-unixoid.o\""
12019  fi
12020
12021
12022 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12023   != "no no no" && echo "checking for database support" 1>&6
12024 echo "configure:12025: checking for database support" >&5
12025
12026 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12027   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12028 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12029 echo "configure:12030: checking for ndbm.h" >&5
12030
12031 cat > conftest.$ac_ext <<EOF
12032 #line 12033 "configure"
12033 #include "confdefs.h"
12034 #include <ndbm.h>
12035 EOF
12036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12037 { (eval echo configure:12038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12039 if test -z "$ac_err"; then
12040   rm -rf conftest*
12041   eval "ac_cv_header_$ac_safe=yes"
12042 else
12043   echo "$ac_err" >&5
12044   echo "configure: failed program was:" >&5
12045   cat conftest.$ac_ext >&5
12046   rm -rf conftest*
12047   eval "ac_cv_header_$ac_safe=no"
12048 fi
12049 rm -f conftest*
12050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12051   echo "$ac_t""yes" 1>&6
12052   :
12053 else
12054   echo "$ac_t""no" 1>&6
12055
12056     test "$with_database_gdbm" = "yes" -o \
12057          "$with_database_dbm"  = "yes" && \
12058       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12059     with_database_gdbm=no with_database_dbm=no
12060 fi
12061
12062 fi
12063
12064 if test "$with_database_gdbm" != "no"; then
12065   
12066 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12067 echo "configure:12068: checking for dbm_open in -lgdbm" >&5
12068 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12069
12070 xe_check_libs=" -lgdbm "
12071 cat > conftest.$ac_ext <<EOF
12072 #line 12073 "configure"
12073 #include "confdefs.h"
12074 /* Override any gcc2 internal prototype to avoid an error.  */
12075 /* We use char because int might match the return type of a gcc2
12076     builtin and then its argument prototype would still apply.  */
12077 char dbm_open();
12078
12079 int main() {
12080 dbm_open()
12081 ; return 0; }
12082 EOF
12083 if { (eval echo configure:12084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12084   rm -rf conftest*
12085   eval "ac_cv_lib_$ac_lib_var=yes"
12086 else
12087   echo "configure: failed program was:" >&5
12088   cat conftest.$ac_ext >&5
12089   rm -rf conftest*
12090   eval "ac_cv_lib_$ac_lib_var=no"
12091 fi
12092 rm -f conftest*
12093 xe_check_libs=""
12094
12095 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12096   echo "$ac_t""yes" 1>&6
12097   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12098 else
12099   echo "$ac_t""no" 1>&6
12100 if test "$with_database_gdbm" = "yes"; then
12101      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12102    fi
12103    with_database_gdbm=no
12104 fi
12105
12106
12107 fi
12108
12109 if test "$with_database_dbm" != "no"; then
12110   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12111 echo "configure:12112: checking for dbm_open" >&5
12112
12113 cat > conftest.$ac_ext <<EOF
12114 #line 12115 "configure"
12115 #include "confdefs.h"
12116 /* System header to define __stub macros and hopefully few prototypes,
12117     which can conflict with char dbm_open(); below.  */
12118 #include <assert.h>
12119 /* Override any gcc2 internal prototype to avoid an error.  */
12120 /* We use char because int might match the return type of a gcc2
12121     builtin and then its argument prototype would still apply.  */
12122 char dbm_open();
12123
12124 int main() {
12125
12126 /* The GNU C library defines this for functions which it implements
12127     to always fail with ENOSYS.  Some functions are actually named
12128     something starting with __ and the normal name is an alias.  */
12129 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12130 choke me
12131 #else
12132 dbm_open();
12133 #endif
12134
12135 ; return 0; }
12136 EOF
12137 if { (eval echo configure:12138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12138   rm -rf conftest*
12139   eval "ac_cv_func_dbm_open=yes"
12140 else
12141   echo "configure: failed program was:" >&5
12142   cat conftest.$ac_ext >&5
12143   rm -rf conftest*
12144   eval "ac_cv_func_dbm_open=no"
12145 fi
12146 rm -f conftest*
12147
12148 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12149   echo "$ac_t""yes" 1>&6
12150   with_database_dbm=yes libdbm=
12151 else
12152   echo "$ac_t""no" 1>&6
12153
12154     
12155 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12156 echo "configure:12157: checking for dbm_open in -ldbm" >&5
12157 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12158
12159 xe_check_libs=" -ldbm "
12160 cat > conftest.$ac_ext <<EOF
12161 #line 12162 "configure"
12162 #include "confdefs.h"
12163 /* Override any gcc2 internal prototype to avoid an error.  */
12164 /* We use char because int might match the return type of a gcc2
12165     builtin and then its argument prototype would still apply.  */
12166 char dbm_open();
12167
12168 int main() {
12169 dbm_open()
12170 ; return 0; }
12171 EOF
12172 if { (eval echo configure:12173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12173   rm -rf conftest*
12174   eval "ac_cv_lib_$ac_lib_var=yes"
12175 else
12176   echo "configure: failed program was:" >&5
12177   cat conftest.$ac_ext >&5
12178   rm -rf conftest*
12179   eval "ac_cv_lib_$ac_lib_var=no"
12180 fi
12181 rm -f conftest*
12182 xe_check_libs=""
12183
12184 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12185   echo "$ac_t""yes" 1>&6
12186   with_database_dbm=yes libdbm=-ldbm
12187 else
12188   echo "$ac_t""no" 1>&6
12189 test "$with_database_dbm" = "yes" && \
12190         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12191       with_database_dbm=no
12192 fi
12193
12194
12195 fi
12196
12197 fi
12198
12199 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12200 test "$with_database_gdbm" = "yes" -o \
12201      "$with_database_dbm"  = "yes" && \
12202   { test "$extra_verbose" = "yes" && cat << \EOF
12203     Defining HAVE_DBM
12204 EOF
12205 cat >> confdefs.h <<\EOF
12206 #define HAVE_DBM 1
12207 EOF
12208 }
12209
12210
12211 if test "$with_database_berkdb" != "no"; then
12212   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12213 echo "configure:12214: checking for Berkeley db.h" >&5
12214   for path in "db/db.h" "db.h"; do
12215     cat > conftest.$ac_ext <<EOF
12216 #line 12217 "configure"
12217 #include "confdefs.h"
12218 #ifdef HAVE_INTTYPES_H
12219 #define __BIT_TYPES_DEFINED__
12220 #include <inttypes.h>
12221 typedef uint8_t  u_int8_t;
12222 typedef uint16_t u_int16_t;
12223 typedef uint32_t u_int32_t;
12224 #ifdef WE_DONT_NEED_QUADS
12225 typedef uint64_t u_int64_t;
12226 #endif
12227 #endif
12228 #include <$path>
12229
12230 int main() {
12231
12232 ; return 0; }
12233 EOF
12234 if { (eval echo configure:12235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12235   rm -rf conftest*
12236   db_h_path="$path"; break
12237 else
12238   echo "configure: failed program was:" >&5
12239   cat conftest.$ac_ext >&5
12240 fi
12241 rm -f conftest*
12242   done
12243   if test -z "$db_h_path"
12244   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12245   else echo "$ac_t""$db_h_path" 1>&6
12246   fi
12247
12248   if test "$with_database_berkdb" != "no"; then
12249     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12250 echo "configure:12251: checking for Berkeley DB version" >&5
12251     cat > conftest.$ac_ext <<EOF
12252 #line 12253 "configure"
12253 #include "confdefs.h"
12254 #include <$db_h_path>
12255 #if DB_VERSION_MAJOR > 1
12256 yes
12257 #endif
12258
12259 EOF
12260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12261   egrep "yes" >/dev/null 2>&1; then
12262   rm -rf conftest*
12263   echo "$ac_t""2" 1>&6; dbfunc=db_open
12264 else
12265   rm -rf conftest*
12266   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12267 fi
12268 rm -f conftest*
12269
12270     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12271 echo "configure:12272: checking for $dbfunc" >&5
12272
12273 cat > conftest.$ac_ext <<EOF
12274 #line 12275 "configure"
12275 #include "confdefs.h"
12276 /* System header to define __stub macros and hopefully few prototypes,
12277     which can conflict with char $dbfunc(); below.  */
12278 #include <assert.h>
12279 /* Override any gcc2 internal prototype to avoid an error.  */
12280 /* We use char because int might match the return type of a gcc2
12281     builtin and then its argument prototype would still apply.  */
12282 char $dbfunc();
12283
12284 int main() {
12285
12286 /* The GNU C library defines this for functions which it implements
12287     to always fail with ENOSYS.  Some functions are actually named
12288     something starting with __ and the normal name is an alias.  */
12289 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12290 choke me
12291 #else
12292 $dbfunc();
12293 #endif
12294
12295 ; return 0; }
12296 EOF
12297 if { (eval echo configure:12298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12298   rm -rf conftest*
12299   eval "ac_cv_func_$dbfunc=yes"
12300 else
12301   echo "configure: failed program was:" >&5
12302   cat conftest.$ac_ext >&5
12303   rm -rf conftest*
12304   eval "ac_cv_func_$dbfunc=no"
12305 fi
12306 rm -f conftest*
12307
12308 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12309   echo "$ac_t""yes" 1>&6
12310   with_database_berkdb=yes need_libdb=no
12311 else
12312   echo "$ac_t""no" 1>&6
12313
12314     
12315 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12316 echo "configure:12317: checking for $dbfunc in -ldb" >&5
12317 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12318
12319 xe_check_libs=" -ldb "
12320 cat > conftest.$ac_ext <<EOF
12321 #line 12322 "configure"
12322 #include "confdefs.h"
12323 /* Override any gcc2 internal prototype to avoid an error.  */
12324 /* We use char because int might match the return type of a gcc2
12325     builtin and then its argument prototype would still apply.  */
12326 char $dbfunc();
12327
12328 int main() {
12329 $dbfunc()
12330 ; return 0; }
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12333   rm -rf conftest*
12334   eval "ac_cv_lib_$ac_lib_var=yes"
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -rf conftest*
12339   eval "ac_cv_lib_$ac_lib_var=no"
12340 fi
12341 rm -f conftest*
12342 xe_check_libs=""
12343
12344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12345   echo "$ac_t""yes" 1>&6
12346   with_database_berkdb=yes need_libdb=yes
12347 else
12348   echo "$ac_t""no" 1>&6
12349 fi
12350
12351
12352 fi
12353
12354   fi
12355
12356   if test "$with_database_berkdb" = "yes"; then
12357     { test "$extra_verbose" = "yes" && cat << EOF
12358     Defining DB_H_PATH = "$db_h_path"
12359 EOF
12360 cat >> confdefs.h <<EOF
12361 #define DB_H_PATH "$db_h_path"
12362 EOF
12363 }
12364
12365     { test "$extra_verbose" = "yes" && cat << \EOF
12366     Defining HAVE_BERKELEY_DB
12367 EOF
12368 cat >> confdefs.h <<\EOF
12369 #define HAVE_BERKELEY_DB 1
12370 EOF
12371 }
12372
12373     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12374   else with_database_berkdb=no
12375   fi
12376 fi
12377
12378 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12379      != "no no no"; then
12380   { test "$extra_verbose" = "yes" && cat << \EOF
12381     Defining HAVE_DATABASE
12382 EOF
12383 cat >> confdefs.h <<\EOF
12384 #define HAVE_DATABASE 1
12385 EOF
12386 }
12387
12388   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12389    echo "    xemacs will be linked with \"database.o\""
12390  fi
12391 fi
12392
12393 if test "$with_socks" = "yes"; then
12394   
12395 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12396 echo "configure:12397: checking for SOCKSinit in -lsocks" >&5
12397 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12398
12399 xe_check_libs=" -lsocks "
12400 cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 /* Override any gcc2 internal prototype to avoid an error.  */
12404 /* We use char because int might match the return type of a gcc2
12405     builtin and then its argument prototype would still apply.  */
12406 char SOCKSinit();
12407
12408 int main() {
12409 SOCKSinit()
12410 ; return 0; }
12411 EOF
12412 if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12413   rm -rf conftest*
12414   eval "ac_cv_lib_$ac_lib_var=yes"
12415 else
12416   echo "configure: failed program was:" >&5
12417   cat conftest.$ac_ext >&5
12418   rm -rf conftest*
12419   eval "ac_cv_lib_$ac_lib_var=no"
12420 fi
12421 rm -f conftest*
12422 xe_check_libs=""
12423
12424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12425   echo "$ac_t""yes" 1>&6
12426     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12427     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12428   { test "$extra_verbose" = "yes" && cat << EOF
12429     Defining $ac_tr_lib
12430 EOF
12431 cat >> confdefs.h <<EOF
12432 #define $ac_tr_lib 1
12433 EOF
12434 }
12435
12436   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12437
12438 else
12439   echo "$ac_t""no" 1>&6
12440 fi
12441
12442
12443   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12444     Defining HAVE_SOCKS
12445 EOF
12446 cat >> confdefs.h <<\EOF
12447 #define HAVE_SOCKS 1
12448 EOF
12449 }
12450
12451 fi
12452
12453 if test "$usage_tracking" = "yes"; then
12454   { test "$extra_verbose" = "yes" && cat << \EOF
12455     Defining USAGE_TRACKING
12456 EOF
12457 cat >> confdefs.h <<\EOF
12458 #define USAGE_TRACKING 1
12459 EOF
12460 }
12461
12462   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12463 fi
12464
12465 if test "$with_modules" != "no"; then
12466   echo "checking for module support" 1>&6
12467 echo "configure:12468: checking for module support" >&5
12468
12469     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12470 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12471 echo "configure:12472: checking for dlfcn.h" >&5
12472
12473 cat > conftest.$ac_ext <<EOF
12474 #line 12475 "configure"
12475 #include "confdefs.h"
12476 #include <dlfcn.h>
12477 EOF
12478 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12479 { (eval echo configure:12480: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12480 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12481 if test -z "$ac_err"; then
12482   rm -rf conftest*
12483   eval "ac_cv_header_$ac_safe=yes"
12484 else
12485   echo "$ac_err" >&5
12486   echo "configure: failed program was:" >&5
12487   cat conftest.$ac_ext >&5
12488   rm -rf conftest*
12489   eval "ac_cv_header_$ac_safe=no"
12490 fi
12491 rm -f conftest*
12492 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12493   echo "$ac_t""yes" 1>&6
12494   
12495     
12496 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12497 echo "configure:12498: checking for dlopen in -ldl" >&5
12498 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12499
12500 xe_check_libs=" -ldl "
12501 cat > conftest.$ac_ext <<EOF
12502 #line 12503 "configure"
12503 #include "confdefs.h"
12504 /* Override any gcc2 internal prototype to avoid an error.  */
12505 /* We use char because int might match the return type of a gcc2
12506     builtin and then its argument prototype would still apply.  */
12507 char dlopen();
12508
12509 int main() {
12510 dlopen()
12511 ; return 0; }
12512 EOF
12513 if { (eval echo configure:12514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12514   rm -rf conftest*
12515   eval "ac_cv_lib_$ac_lib_var=yes"
12516 else
12517   echo "configure: failed program was:" >&5
12518   cat conftest.$ac_ext >&5
12519   rm -rf conftest*
12520   eval "ac_cv_lib_$ac_lib_var=no"
12521 fi
12522 rm -f conftest*
12523 xe_check_libs=""
12524
12525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12526   echo "$ac_t""yes" 1>&6
12527   have_dl=yes libdl=dl
12528 else
12529   echo "$ac_t""no" 1>&6
12530
12531 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12532 echo "configure:12533: checking for dlopen in -lc" >&5
12533 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12534
12535 xe_check_libs=" -lc "
12536 cat > conftest.$ac_ext <<EOF
12537 #line 12538 "configure"
12538 #include "confdefs.h"
12539 /* Override any gcc2 internal prototype to avoid an error.  */
12540 /* We use char because int might match the return type of a gcc2
12541     builtin and then its argument prototype would still apply.  */
12542 char dlopen();
12543
12544 int main() {
12545 dlopen()
12546 ; return 0; }
12547 EOF
12548 if { (eval echo configure:12549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12549   rm -rf conftest*
12550   eval "ac_cv_lib_$ac_lib_var=yes"
12551 else
12552   echo "configure: failed program was:" >&5
12553   cat conftest.$ac_ext >&5
12554   rm -rf conftest*
12555   eval "ac_cv_lib_$ac_lib_var=no"
12556 fi
12557 rm -f conftest*
12558 xe_check_libs=""
12559
12560 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12561   echo "$ac_t""yes" 1>&6
12562   have_dl=yes 
12563 else
12564   echo "$ac_t""no" 1>&6
12565 fi
12566
12567
12568 fi
12569
12570
12571 else
12572   echo "$ac_t""no" 1>&6
12573 fi
12574
12575   if test -n "$have_dl"; then
12576     { test "$extra_verbose" = "yes" && cat << \EOF
12577     Defining HAVE_DLOPEN
12578 EOF
12579 cat >> confdefs.h <<\EOF
12580 #define HAVE_DLOPEN 1
12581 EOF
12582 }
12583
12584   else
12585     
12586 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12587 echo "configure:12588: checking for shl_load in -ldld" >&5
12588 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12589
12590 xe_check_libs=" -ldld "
12591 cat > conftest.$ac_ext <<EOF
12592 #line 12593 "configure"
12593 #include "confdefs.h"
12594 /* Override any gcc2 internal prototype to avoid an error.  */
12595 /* We use char because int might match the return type of a gcc2
12596     builtin and then its argument prototype would still apply.  */
12597 char shl_load();
12598
12599 int main() {
12600 shl_load()
12601 ; return 0; }
12602 EOF
12603 if { (eval echo configure:12604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12604   rm -rf conftest*
12605   eval "ac_cv_lib_$ac_lib_var=yes"
12606 else
12607   echo "configure: failed program was:" >&5
12608   cat conftest.$ac_ext >&5
12609   rm -rf conftest*
12610   eval "ac_cv_lib_$ac_lib_var=no"
12611 fi
12612 rm -f conftest*
12613 xe_check_libs=""
12614
12615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12616   echo "$ac_t""yes" 1>&6
12617   libdl=dld have_dl=yes;
12618       { test "$extra_verbose" = "yes" && cat << \EOF
12619     Defining HAVE_SHL_LOAD
12620 EOF
12621 cat >> confdefs.h <<\EOF
12622 #define HAVE_SHL_LOAD 1
12623 EOF
12624 }
12625
12626 else
12627   echo "$ac_t""no" 1>&6
12628
12629 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12630 echo "configure:12631: checking for dld_init in -ldld" >&5
12631 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12632
12633 xe_check_libs=" -ldld "
12634 cat > conftest.$ac_ext <<EOF
12635 #line 12636 "configure"
12636 #include "confdefs.h"
12637 /* Override any gcc2 internal prototype to avoid an error.  */
12638 /* We use char because int might match the return type of a gcc2
12639     builtin and then its argument prototype would still apply.  */
12640 char dld_init();
12641
12642 int main() {
12643 dld_init()
12644 ; return 0; }
12645 EOF
12646 if { (eval echo configure:12647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12647   rm -rf conftest*
12648   eval "ac_cv_lib_$ac_lib_var=yes"
12649 else
12650   echo "configure: failed program was:" >&5
12651   cat conftest.$ac_ext >&5
12652   rm -rf conftest*
12653   eval "ac_cv_lib_$ac_lib_var=no"
12654 fi
12655 rm -f conftest*
12656 xe_check_libs=""
12657
12658 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12659   echo "$ac_t""yes" 1>&6
12660   libdl=dld have_dl=yes;
12661       { test "$extra_verbose" = "yes" && cat << \EOF
12662     Defining HAVE_DLD_INIT
12663 EOF
12664 cat >> confdefs.h <<\EOF
12665 #define HAVE_DLD_INIT 1
12666 EOF
12667 }
12668
12669 else
12670   echo "$ac_t""no" 1>&6
12671 fi
12672
12673
12674 fi
12675
12676
12677   fi
12678
12679   if test -n "$have_dl"; then
12680         
12681 dll_ld=
12682 dll_ldflags=
12683 dll_cflags=
12684 dll_post=
12685 dll_ldo="-o"
12686 ld_dynamic_link_flags=
12687 xehost=$canonical
12688 xealias=$internal_configuration
12689
12690 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12691 echo "configure:12692: checking how to build dynamic libraries for ${xehost}" >&5
12692 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12693 case "$xehost" in
12694 *-*-linux-gnu*) ;;
12695 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12696 esac
12697
12698 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12699 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12700 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12701
12702 case "$xehost_os" in
12703 aix3*)
12704   # AIX sometimes has problems with the GCC collect2 program.  For some
12705   # reason, if we set the COLLECT_NAMES environment variable, the problems
12706   # vanish in a puff of smoke.
12707   if test "${COLLECT_NAMES+set}" != set; then
12708     COLLECT_NAMES=
12709     export COLLECT_NAMES
12710   fi
12711   ;;
12712 esac
12713
12714 # Now see if the compiler is really GCC.
12715 if test "$GCC" = "yes"; then
12716   XEGCC=yes
12717 else
12718   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12719 echo "configure:12720: checking checking whether we are using GNU C" >&5
12720   cat > conftest.$ac_ext <<EOF
12721 #line 12722 "configure"
12722 #include "confdefs.h"
12723
12724 #ifdef __GNUC__
12725   yes;
12726 #endif
12727
12728 EOF
12729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12730   egrep "yes" >/dev/null 2>&1; then
12731   rm -rf conftest*
12732   XEGCC=yes
12733 else
12734   rm -rf conftest*
12735   XEGCC=no
12736 fi
12737 rm -f conftest*
12738
12739   echo "$ac_t""${XEGCC}" 1>&6
12740 fi
12741
12742 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12743 echo "configure:12744: checking how to produce PIC code" >&5
12744 wl=
12745
12746 can_build_shared=yes
12747 if test "$XEGCC" = yes; then
12748   wl='-Wl,'
12749
12750   case "$xehost_os" in
12751   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12752     # PIC is the default for these OSes.
12753     ;;
12754
12755   os2*)
12756     # We can build DLLs from non-PIC.
12757     ;;
12758   amigaos*)
12759     # FIXME: we need at least 68020 code to build shared libraries, but
12760     # adding the `-m68020' flag to GCC prevents building anything better,
12761     # like `-m68040'.
12762     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12763     ;;
12764   *)
12765     dll_cflags='-fPIC'
12766     ;;
12767   esac
12768 else
12769   # PORTME Check for PIC flags for the system compiler.
12770   case "$xehost_os" in
12771   hpux9* | hpux1[0-9]*)
12772     # Is there a better link_static_flag that works with the bundled CC?
12773     wl='-Wl,'
12774     dll_cflags='+Z'
12775     ;;
12776
12777   irix5* | irix6*)
12778     wl='-Wl,'
12779     # PIC (with -KPIC) is the default.
12780     ;;
12781
12782   os2*)
12783     # We can build DLLs from non-PIC.
12784     ;;
12785
12786   osf3* | osf4*)
12787     # All OSF/1 code is PIC.
12788     wl='-Wl,'
12789     ;;
12790
12791   sco3.2v5*)
12792     dll_cflags='-belf -Kpic'
12793     wl='-Wl,'
12794     ;;
12795
12796   unixware*)
12797     dll_cflags="-KPIC"
12798     wl="-Wl,"
12799     ;;
12800
12801   sysv4*)
12802     dll_cflags="-KPIC"
12803     wl="-Wl,"
12804     ;;
12805
12806   sysv5*)
12807     dll_cflags="-KPIC"
12808     wl="-Wl,"
12809     ;;
12810
12811   solaris2*)
12812     dll_cflags='-KPIC'
12813     wl='-Wl,'
12814     ;;
12815
12816   sunos4*)
12817     dll_cflags='-PIC'
12818     wl='-Qoption ld '
12819     ;;
12820
12821   uts4*)
12822     dll_cflags='-pic'
12823     ;;
12824
12825   *)
12826     can_build_shared=no
12827     ;;
12828   esac
12829 fi
12830
12831 if test -n "$dll_cflags"; then
12832   echo "$ac_t""${dll_cflags}" 1>&6
12833   
12834   # Check to make sure the dll_cflags actually works.
12835   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12836 echo "configure:12837: checking if PIC flag ${dll_cflags} really works" >&5
12837   save_CFLAGS="$CFLAGS"
12838   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12839   cat > conftest.$ac_ext <<EOF
12840 #line 12841 "configure"
12841 #include "confdefs.h"
12842
12843 int main() {
12844 int x=0;
12845 ; return 0; }
12846 EOF
12847 if { (eval echo configure:12848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12848   rm -rf conftest*
12849   
12850     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12851     # reports no error.  So, we need to grep stderr for (Bundled).
12852     if grep '(Bundled)' config.log >/dev/null; then
12853       echo "$ac_t""no" 1>&6
12854       can_build_shared=no
12855       dll_cflags=
12856     else
12857       echo "$ac_t""yes" 1>&6
12858     fi
12859 else
12860   echo "configure: failed program was:" >&5
12861   cat conftest.$ac_ext >&5
12862   rm -rf conftest*
12863   echo "$ac_t""no" 1>&6
12864     can_build_shared=no
12865     dll_cflags=
12866 fi
12867 rm -f conftest*
12868   CFLAGS="$save_CFLAGS"
12869 else
12870   echo "$ac_t""none" 1>&6
12871 fi
12872
12873 if test "$can_build_shared" = "yes"; then
12874 cc_produces_so=no
12875 xldf=
12876 xcldf=
12877 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12878 echo "configure:12879: checking if C compiler can produce shared libraries" >&5
12879 if test "$XEGCC" = yes; then
12880   xcldf="-shared"
12881   xldf="-shared"
12882 else # Not using GCC
12883   case "$xehost_os" in
12884     aix3* | aix4*)
12885       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12886       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12887       ;;
12888
12889     freebsd2* | netbsd* | openbsd*)
12890       xldf="-Bshareable"
12891       xcldf="${wl}-Bshareable"
12892       ;;
12893
12894     freebsd3*)
12895       xcldf="-shared"
12896       ;;
12897
12898     hpux*)
12899       xldf="-b +s"
12900       xcldf="${wl}-b ${wl}+s"
12901       ;;
12902
12903     irix5* | irix6* | osf3* | osf4*)
12904       xcldf="${wl}-shared"
12905       xldf="-shared"
12906       ;;
12907
12908     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12909       xcldf="-G"
12910       xldf="-G"
12911       ;;
12912
12913     sunos4*)
12914       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12915       xldf="-assert pure-text -Bstatic"
12916       ;;
12917   esac
12918 fi # End if if we are using gcc
12919
12920 if test -n "$xcldf"; then
12921   save_LDFLAGS=$LDFLAGS
12922   save_LIBS=$LIBS
12923   save_xe_libs=$xe_libs
12924   LDFLAGS="$xcldf $LDFLAGS"
12925   LIBS=
12926   xe_libs=
12927   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12928   cat > conftest.$ac_ext <<EOF
12929 #line 12930 "configure"
12930 #include "confdefs.h"
12931
12932 int main() {
12933 int x=0;
12934 ; return 0; }
12935 EOF
12936 if { (eval echo configure:12937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12937   rm -rf conftest*
12938   cc_produces_so=yes
12939 else
12940   echo "configure: failed program was:" >&5
12941   cat conftest.$ac_ext >&5
12942   rm -rf conftest*
12943   cc_produces_so=no
12944 fi
12945 rm -f conftest*
12946   LDFLAGS=$save_LDFLAGS
12947   LIBS=$save_LIBS
12948   xe_libs=$save_xe_libs
12949   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12950 else
12951   cc_produces_so=no
12952 fi
12953 echo "$ac_t""${cc_produces_so}" 1>&6
12954
12955 LTLD=$LD
12956 if test -z "$LTLD"; then
12957   ac_prog=ld
12958   if test "$XEGCC" = yes; then
12959     # Check if gcc -print-prog-name=ld gives a path.
12960     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12961 echo "configure:12962: checking for ld used by GCC" >&5
12962     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12963     case "$ac_prog" in
12964     # Accept absolute paths.
12965     /*)
12966       if test -z "$LTLD"; then
12967         case "$ac_prog" in
12968           *gcc-lib*) LTLD="$CC"
12969                      ;;
12970           *)         LTLD="$ac_prog"
12971                      ;;
12972         esac
12973       fi
12974       ;;
12975     "")
12976       # If it fails, then pretend we aren't using GCC.
12977       ac_prog=ld
12978       ;;
12979     *)
12980       # If it is relative, then search for the first ld in PATH.
12981       with_gnu_ld=unknown
12982       ;;
12983     esac
12984   else
12985     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12986 echo "configure:12987: checking for GNU ld" >&5
12987   fi
12988
12989   if test -z "$LTLD"; then
12990     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12991     for ac_dir in $PATH; do
12992       test -z "$ac_dir" && ac_dir=.
12993       if test -f "$ac_dir/$ac_prog"; then
12994         LTLD="$ac_dir/$ac_prog"
12995         # Check to see if the program is GNU ld.  I'd rather use --version,
12996         # but apparently some GNU ld's only accept -v.
12997         # Break only if it was the GNU/non-GNU ld that we prefer.
12998         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12999           xe_gnu_ld=yes
13000         else
13001           xe_gnu_ld=no
13002         fi
13003       fi
13004     done
13005     IFS="$ac_save_ifs"
13006   fi
13007
13008   if test -n "$LTLD"; then
13009     echo "$ac_t""${LTLD}" 1>&6
13010   else
13011     echo "$ac_t""no" 1>&6
13012   fi
13013
13014   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13015     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13016     exit 1
13017   fi
13018 fi
13019
13020 ld_dynamic_link_flags=
13021
13022 # Check to see if it really is or isn't GNU ld.
13023 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13024 echo "configure:13025: checking if the linker is GNU ld" >&5
13025 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13026 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13027   xe_gnu_ld=yes
13028 else
13029   xe_gnu_ld=no
13030 fi
13031 echo "$ac_t""${xe_gnu_ld}" 1>&6
13032
13033 case "$xehost_os" in
13034   amigaos* | sunos4*)
13035     # On these operating systems, we should treat GNU ld like the system ld.
13036     gnu_ld_acts_native=yes
13037     ;;
13038   *)
13039     gnu_ld_acts_native=no
13040     ;;
13041 esac
13042
13043 if test "$cc_produces_so" = "yes"; then
13044   dll_ld=$CC
13045   dll_ldflags=$xcldf
13046   can_build_shared=yes
13047 else
13048   # OK - only NOW do we futz about with ld.
13049   # See if the linker supports building shared libraries.
13050   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13051 echo "configure:13052: checking whether the linker supports shared libraries" >&5
13052   dll_ld=$CC
13053   dll_ldflags=$LDFLAGS
13054   ld_shlibs=yes
13055   can_build_shared=yes
13056   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13057     # See if GNU ld supports shared libraries.
13058     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13059       dll_ld=$CC
13060       dll_ldflags="-shared"
13061       ld_shlibs=yes
13062     else
13063       ld_shlibs=no
13064     fi
13065   else
13066     # PORTME fill in a description of your system's linker (not GNU ld)
13067     case "$xehost_os" in
13068     aix3*)
13069       dll_ld=$LTLD
13070       dll_ldflags=$xldf
13071       ;;
13072
13073     aix4*)
13074       dll_ldflags=$xcldf
13075       ;;
13076
13077     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13078     # support.  Future versions do this automatically, but an explicit c++rt0.o
13079     # doesn't break anything, and helps significantly (at the cost of a little
13080     # extra space).
13081     freebsd2.2*)
13082       dll_ld=$LTLD
13083       dll_ldflags=$xldf
13084       dll_post="/usr/lib/c++rt0.o"
13085       ;;
13086
13087     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13088     freebsd2*)
13089       dll_ld=$LTLD
13090       dll_ldflags="-Bshareable"
13091       ;;
13092
13093     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13094     freebsd3*)
13095       dll_ldflags="-shared"
13096       ;;
13097
13098     hpux*)
13099       dll_ld=$LTLD
13100       dll_ldflags=$xldf
13101       ;;
13102
13103     irix5* | irix6*)
13104       dll_ld=$LTLD
13105       dll_ldflags=$xldf
13106       ;;
13107
13108     netbsd*)
13109       # Tested with NetBSD 1.2 ld
13110       dll_ld=$LTLD
13111       dll_ldflags=$xldf
13112       ;;
13113
13114     openbsd*)
13115       dll_ld=$LTLD
13116       dll_ldflags=$xldf
13117       ;;
13118
13119     osf3* | osf4*)
13120       dll_ld=$LTLD
13121       dll_ldflags=$xldf
13122       ;;
13123
13124     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13125     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13126       dll_ld=$LTLD
13127       case "$dll_ld" in
13128         *gcc*) dll_ldflags="-shared"
13129                dll_ld=$CC
13130                ;;
13131         *)     dll_ldflags="-G"
13132                ;;
13133       esac
13134       ;;
13135
13136     sunos4*)
13137       if test "$XEGCC" = yes; then
13138         dll_ld=$CC
13139       else
13140         dll_ld=$LTLD
13141       fi
13142       dll_ldflags=$xldf
13143       ;;
13144
13145     uts4*)
13146       dll_ld=$LTLD
13147       dll_ldflags="-G"
13148       ;;
13149
13150     bsdi*)
13151       dll_ldflags="-r"
13152       dll_ld="shlicc2"
13153       ;;
13154
13155     *)
13156       ld_shlibs=no
13157       can_build_shared=no
13158       ;;
13159     esac
13160   fi
13161   echo "$ac_t""${ld_shlibs}" 1>&6
13162   if test "$ld_shlibs" = "no"; then
13163     can_build_shared=no
13164   fi
13165 fi # End of if cc_produces_so = no
13166
13167
13168 if test "$xe_gnu_ld" = yes; then
13169   if test "$ld_shlibs" = yes; then
13170     ld_dynamic_link_flags="${wl}-export-dynamic"
13171   fi
13172 fi
13173
13174 if test -z "$ld_dynamic_link_flags"; then
13175   case "$xehost_os" in
13176   aix3*)
13177     ld_dynamic_link_flags=
13178     ;;
13179
13180   aix4*)
13181     ld_dynamic_link_flags=
13182     ;;
13183
13184   freebsd2.2*)
13185     ld_dynamic_link_flags=
13186     ;;
13187
13188   freebsd2*)
13189     ld_dynamic_link_flags=
13190     ;;
13191
13192   freebsd3*)
13193     ld_dynamic_link_flags=
13194     ;;
13195
13196   hpux*)
13197     ld_dynamic_link_flags="${wl}-E"
13198     ;;
13199
13200   irix5* | irix6*)
13201     ld_dynamic_link_flags=
13202     ;;
13203
13204   netbsd*)
13205     ld_dynamic_link_flags=
13206     ;;
13207
13208   openbsd*)
13209     ld_dynamic_link_flags=
13210     ;;
13211
13212   osf3* | osf4*)
13213     ld_dynamic_link_flags=
13214     ;;
13215
13216   solaris2* | solaris7*)
13217     ld_dynamic_link_flags=
13218     ;;
13219
13220   sco3.2v5* | unixware* | sysv5* | sysv4*)
13221     ld_dynamic_link_flags="${wl}-Bexport"
13222     ;;
13223
13224   sunos4*)
13225     ld_dynamic_link_flags=
13226     ;;
13227
13228   uts4*)
13229     ld_dynamic_link_flags=
13230     ;;
13231
13232   bsdi*)
13233     ld_dynamic_link_flags=
13234     ;;
13235
13236   esac
13237 fi # End of if -z ld_dynamic_link_flags
13238 fi # End of if test "$can_build_shared" = "yes"
13239
13240
13241
13242
13243
13244
13245
13246
13247   fi
13248
13249   if test "$can_build_shared" = "yes"; then
13250     { test "$extra_verbose" = "yes" && cat << \EOF
13251     Defining HAVE_SHLIB
13252 EOF
13253 cat >> confdefs.h <<\EOF
13254 #define HAVE_SHLIB 1
13255 EOF
13256 }
13257
13258     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13259    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13260  fi
13261     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13262     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13263     for ac_func in dlerror _dlerror
13264 do
13265 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13266 echo "configure:13267: checking for $ac_func" >&5
13267
13268 cat > conftest.$ac_ext <<EOF
13269 #line 13270 "configure"
13270 #include "confdefs.h"
13271 /* System header to define __stub macros and hopefully few prototypes,
13272     which can conflict with char $ac_func(); below.  */
13273 #include <assert.h>
13274 /* Override any gcc2 internal prototype to avoid an error.  */
13275 /* We use char because int might match the return type of a gcc2
13276     builtin and then its argument prototype would still apply.  */
13277 char $ac_func();
13278
13279 int main() {
13280
13281 /* The GNU C library defines this for functions which it implements
13282     to always fail with ENOSYS.  Some functions are actually named
13283     something starting with __ and the normal name is an alias.  */
13284 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13285 choke me
13286 #else
13287 $ac_func();
13288 #endif
13289
13290 ; return 0; }
13291 EOF
13292 if { (eval echo configure:13293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13293   rm -rf conftest*
13294   eval "ac_cv_func_$ac_func=yes"
13295 else
13296   echo "configure: failed program was:" >&5
13297   cat conftest.$ac_ext >&5
13298   rm -rf conftest*
13299   eval "ac_cv_func_$ac_func=no"
13300 fi
13301 rm -f conftest*
13302
13303 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13304   echo "$ac_t""yes" 1>&6
13305     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13306   { test "$extra_verbose" = "yes" && cat << EOF
13307     Defining $ac_tr_func
13308 EOF
13309 cat >> confdefs.h <<EOF
13310 #define $ac_tr_func 1
13311 EOF
13312 }
13313  
13314 else
13315   echo "$ac_t""no" 1>&6
13316 fi
13317 done
13318
13319     with_modules=yes
13320   else
13321     if test "$with_modules" = "yes"; then
13322       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13323     else
13324       echo "configure: warning: "Module support cannot be provided."" 1>&2
13325     fi
13326     with_modules=no
13327   fi
13328 fi
13329
13330 cat > conftest.$ac_ext <<EOF
13331 #line 13332 "configure"
13332 #include "confdefs.h"
13333 int main(int c,char *v[]){return 0;}
13334 EOF
13335 if { (eval echo configure:13336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13336 then
13337   :
13338 else
13339   conftest_rc="$?"
13340   echo "configure: failed program was:" >&5
13341   cat conftest.$ac_ext >&5
13342   rm -fr conftest*
13343   
13344   echo ""
13345   echo "*** PANIC *** The C compiler can no longer build working executables."
13346   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13347   echo "*** PANIC *** The most likely reason for this problem is that configure"
13348   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13349   echo "*** PANIC *** found at run time."
13350   echo "*** PANIC ***"
13351   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13352   echo "*** PANIC *** On other systems, try telling configure where to find the"
13353   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13354   echo "*** PANIC ***"
13355   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13356   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13357   echo "*** PANIC *** on your system.  Don't do that."
13358   exit 1
13359 fi
13360 rm -fr conftest*
13361
13362 if test "$win32_processes" = "yes"; then
13363   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13364    echo "    xemacs will be linked with \"process-nt.o\""
13365  fi
13366 else
13367   { test "$extra_verbose" = "yes" && cat << \EOF
13368     Defining HAVE_UNIX_PROCESSES
13369 EOF
13370 cat >> confdefs.h <<\EOF
13371 #define HAVE_UNIX_PROCESSES 1
13372 EOF
13373 }
13374
13375   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13376    echo "    xemacs will be linked with \"process-unix.o\""
13377  fi
13378 fi
13379
13380
13381
13382 T=""
13383 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13384 CFLAGS="$T"
13385
13386
13387 T=""
13388 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13389 extra_objs="$T"
13390
13391
13392 T=""
13393 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
13394 c_switch_general="$T"
13395
13396
13397 T=""
13398 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13399 c_switch_window_system="$T"
13400
13401
13402 T=""
13403 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13404 c_switch_all="$T"
13405
13406
13407 T=""
13408 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
13409 ld_switch_general="$T"
13410
13411
13412 T=""
13413 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13414 ld_switch_window_system="$T"
13415
13416
13417 T=""
13418 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13419 ld_switch_all="$T"
13420
13421
13422 T=""
13423 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13424 ld_libs_general="$T"
13425
13426
13427 T=""
13428 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
13429 ld_libs_window_system="$T"
13430
13431
13432 T=""
13433 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13434 ld_libs_all="$T"
13435
13436
13437
13438 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13439 internal_makefile_list="Makefile.in"
13440 SUBDIR_MAKEFILES=''
13441 test -d lock || mkdir lock
13442 for dir in $MAKE_SUBDIR; do
13443   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13444         test -d "$d" || mkdir "$d"; cd "$d"
13445       done ) ;;
13446    * ) test -d "$dir" || mkdir "$dir" ;;
13447   esac
13448   
13449 T=""
13450 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13451 SUBDIR_MAKEFILES="$T"
13452
13453   
13454 T=""
13455 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13456 internal_makefile_list="$T"
13457
13458 done
13459
13460
13461
13462
13463 for dir in src/s src/m; do
13464   if test ! -d "$dir" ; then
13465     echo Making symbolic link to "$srcdir/$dir"
13466     ${LN_S} "$srcdir/$dir" "$dir"
13467   fi
13468 done
13469
13470 if test "$extra_verbose" = "yes"; then
13471   echo ""
13472   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
13473   echo ""
13474 fi
13475
13476
13477 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13478   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13479   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13480 fi
13481
13482 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13483   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13484   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13485 fi
13486
13487 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13488   test "$extra_verbose" = "yes" && echo "creating TAGS"
13489   echo "\f
13490 $srcdir/TAGS,include" > "TAGS"
13491 fi
13492
13493 if test "$__SUNPRO_C" = "yes"; then
13494   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13495   ( echo "# For use with Sun WorkShop's Source browser."
13496     echo "# See sbquery(1) and sbinit(4) for more information"
13497     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13498   ) > .sbinit
13499 fi
13500
13501 rm -f core
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521 PREFIX=$prefix
13522 while true; do
13523   case "$PREFIX" in
13524     *\$* ) eval "PREFIX=$PREFIX" ;;
13525     *) break ;;
13526   esac
13527 done
13528
13529
13530
13531
13532 EXEC_PREFIX=$exec_prefix
13533 while true; do
13534   case "$EXEC_PREFIX" in
13535     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13536     *) break ;;
13537   esac
13538 done
13539
13540
13541
13542
13543 INFODIR=$infodir
13544 while true; do
13545   case "$INFODIR" in
13546     *\$* ) eval "INFODIR=$INFODIR" ;;
13547     *) break ;;
13548   esac
13549 done
13550
13551
13552
13553
13554 INFOPATH=$infopath
13555 while true; do
13556   case "$INFOPATH" in
13557     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13558     *) break ;;
13559   esac
13560 done
13561
13562
13563
13564
13565 PACKAGE_PATH=$package_path
13566 while true; do
13567   case "$PACKAGE_PATH" in
13568     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13569     *) break ;;
13570   esac
13571 done
13572
13573
13574
13575
13576 LISPDIR=$lispdir
13577 while true; do
13578   case "$LISPDIR" in
13579     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13580     *) break ;;
13581   esac
13582 done
13583
13584
13585
13586
13587 MODULEDIR=$moduledir
13588 while true; do
13589   case "$MODULEDIR" in
13590     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13591     *) break ;;
13592   esac
13593 done
13594
13595
13596
13597
13598 SITELISPDIR=$sitelispdir
13599 while true; do
13600   case "$SITELISPDIR" in
13601     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13602     *) break ;;
13603   esac
13604 done
13605
13606
13607
13608
13609 SITEMODULEDIR=$sitemoduledir
13610 while true; do
13611   case "$SITEMODULEDIR" in
13612     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13613     *) break ;;
13614   esac
13615 done
13616
13617
13618
13619
13620 ETCDIR=$etcdir
13621 while true; do
13622   case "$ETCDIR" in
13623     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13624     *) break ;;
13625   esac
13626 done
13627
13628
13629
13630
13631 LOCKDIR=$lockdir
13632 while true; do
13633   case "$LOCKDIR" in
13634     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13635     *) break ;;
13636   esac
13637 done
13638
13639
13640
13641
13642 DOCDIR=$docdir
13643 while true; do
13644   case "$DOCDIR" in
13645     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13646     *) break ;;
13647   esac
13648 done
13649
13650
13651
13652
13653 ARCHLIBDIR=$archlibdir
13654 while true; do
13655   case "$ARCHLIBDIR" in
13656     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13657     *) break ;;
13658   esac
13659 done
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13681
13682
13683
13684
13685
13686
13687
13688 : ${XEMACS_CC:=$CC}
13689
13690
13691 if test "$with_prefix" = "yes"; then
13692   { test "$extra_verbose" = "yes" && cat << \EOF
13693     Defining PREFIX_USER_DEFINED
13694 EOF
13695 cat >> confdefs.h <<\EOF
13696 #define PREFIX_USER_DEFINED 1
13697 EOF
13698 }
13699
13700 fi
13701
13702 if test "$with_site_lisp" = "no"; then
13703   { test "$extra_verbose" = "yes" && cat << \EOF
13704     Defining INHIBIT_SITE_LISP
13705 EOF
13706 cat >> confdefs.h <<\EOF
13707 #define INHIBIT_SITE_LISP 1
13708 EOF
13709 }
13710
13711 fi
13712 if test "$with_site_modules" = "no"; then
13713   { test "$extra_verbose" = "yes" && cat << \EOF
13714     Defining INHIBIT_SITE_MODULES
13715 EOF
13716 cat >> confdefs.h <<\EOF
13717 #define INHIBIT_SITE_MODULES 1
13718 EOF
13719 }
13720
13721 fi
13722
13723
13724 T=""
13725 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13726 ac_configure_args="$T"
13727
13728 { test "$extra_verbose" = "yes" && cat << EOF
13729     Defining EMACS_CONFIGURATION = "$configuration"
13730 EOF
13731 cat >> confdefs.h <<EOF
13732 #define EMACS_CONFIGURATION "$configuration"
13733 EOF
13734 }
13735
13736 { test "$extra_verbose" = "yes" && cat << EOF
13737     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13738 EOF
13739 cat >> confdefs.h <<EOF
13740 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13741 EOF
13742 }
13743
13744 { test "$extra_verbose" = "yes" && cat << EOF
13745     Defining config_machfile = "$machfile"
13746 EOF
13747 cat >> confdefs.h <<EOF
13748 #define config_machfile "$machfile"
13749 EOF
13750 }
13751
13752 { test "$extra_verbose" = "yes" && cat << EOF
13753     Defining config_opsysfile = "$opsysfile"
13754 EOF
13755 cat >> confdefs.h <<EOF
13756 #define config_opsysfile "$opsysfile"
13757 EOF
13758 }
13759
13760
13761
13762 null_string=""
13763 { test "$extra_verbose" = "yes" && cat << EOF
13764     Defining LD_SWITCH_X_SITE = $null_string
13765 EOF
13766 cat >> confdefs.h <<EOF
13767 #define LD_SWITCH_X_SITE $null_string
13768 EOF
13769 }
13770
13771 { test "$extra_verbose" = "yes" && cat << EOF
13772     Defining LD_SWITCH_X_SITE_AUX = $null_string
13773 EOF
13774 cat >> confdefs.h <<EOF
13775 #define LD_SWITCH_X_SITE_AUX $null_string
13776 EOF
13777 }
13778
13779 { test "$extra_verbose" = "yes" && cat << EOF
13780     Defining C_SWITCH_X_SITE = $null_string
13781 EOF
13782 cat >> confdefs.h <<EOF
13783 #define C_SWITCH_X_SITE $null_string
13784 EOF
13785 }
13786
13787 { test "$extra_verbose" = "yes" && cat << EOF
13788     Defining LD_SWITCH_SITE = $null_string
13789 EOF
13790 cat >> confdefs.h <<EOF
13791 #define LD_SWITCH_SITE $null_string
13792 EOF
13793 }
13794
13795 { test "$extra_verbose" = "yes" && cat << EOF
13796     Defining C_SWITCH_SITE = $null_string
13797 EOF
13798 cat >> confdefs.h <<EOF
13799 #define C_SWITCH_SITE $null_string
13800 EOF
13801 }
13802
13803
13804
13805 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13806     Defining GNU_MALLOC
13807 EOF
13808 cat >> confdefs.h <<\EOF
13809 #define GNU_MALLOC 1
13810 EOF
13811 }
13812
13813 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13814     Defining USE_SYSTEM_MALLOC
13815 EOF
13816 cat >> confdefs.h <<\EOF
13817 #define USE_SYSTEM_MALLOC 1
13818 EOF
13819 }
13820
13821 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13822     Defining USE_DEBUG_MALLOC
13823 EOF
13824 cat >> confdefs.h <<\EOF
13825 #define USE_DEBUG_MALLOC 1
13826 EOF
13827 }
13828
13829                                               { test "$extra_verbose" = "yes" && cat << \EOF
13830     Defining USE_SYSTEM_MALLOC
13831 EOF
13832 cat >> confdefs.h <<\EOF
13833 #define USE_SYSTEM_MALLOC 1
13834 EOF
13835 }
13836
13837 fi
13838 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13839     Defining I18N3
13840 EOF
13841 cat >> confdefs.h <<\EOF
13842 #define I18N3 1
13843 EOF
13844 }
13845
13846 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13847     Defining USE_GCC
13848 EOF
13849 cat >> confdefs.h <<\EOF
13850 #define USE_GCC 1
13851 EOF
13852 }
13853
13854 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13855     Defining EXTERNAL_WIDGET
13856 EOF
13857 cat >> confdefs.h <<\EOF
13858 #define EXTERNAL_WIDGET 1
13859 EOF
13860 }
13861
13862 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13863     Defining NO_DOC_FILE
13864 EOF
13865 cat >> confdefs.h <<\EOF
13866 #define NO_DOC_FILE 1
13867 EOF
13868 }
13869
13870 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13871     Defining PURIFY
13872 EOF
13873 cat >> confdefs.h <<\EOF
13874 #define PURIFY 1
13875 EOF
13876 }
13877
13878 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13879     Defining QUANTIFY
13880 EOF
13881 cat >> confdefs.h <<\EOF
13882 #define QUANTIFY 1
13883 EOF
13884 }
13885
13886 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13887     Defining MAIL_USE_POP
13888 EOF
13889 cat >> confdefs.h <<\EOF
13890 #define MAIL_USE_POP 1
13891 EOF
13892 }
13893
13894 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13895     Defining KERBEROS
13896 EOF
13897 cat >> confdefs.h <<\EOF
13898 #define KERBEROS 1
13899 EOF
13900 }
13901
13902 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13903     Defining HESIOD
13904 EOF
13905 cat >> confdefs.h <<\EOF
13906 #define HESIOD 1
13907 EOF
13908 }
13909
13910 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13911     Defining USE_UNION_TYPE
13912 EOF
13913 cat >> confdefs.h <<\EOF
13914 #define USE_UNION_TYPE 1
13915 EOF
13916 }
13917
13918 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13919     Defining PDUMP
13920 EOF
13921 cat >> confdefs.h <<\EOF
13922 #define PDUMP 1
13923 EOF
13924 }
13925
13926
13927
13928 (
13929 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13930 else
13931   echo "uname -a: `uname -a`"
13932 fi
13933 echo ""
13934 echo "$0 $quoted_arguments"
13935 ) > Installation
13936
13937 if test ! -z ${emacs_beta_version} ; then
13938   if test -z "${emacs_is_beta}" ; then
13939         xemacs_betaname=".${emacs_beta_version}"
13940   else
13941         xemacs_betaname="-b${emacs_beta_version}"
13942   fi
13943 else
13944   xemacs_betaname=""
13945 fi
13946
13947 (
13948 echo "
13949
13950 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13951
13952   Where should the build process find the source code?    $srcdir
13953   What installation prefix should install use?            $prefix
13954   What operating system and machine description files should XEmacs use?
13955         \`$opsysfile' and \`$machfile'
13956   What compiler should XEmacs be built with?              $CC $CFLAGS
13957   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13958   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13959   What window system should XEmacs use?                   ${window_system}"
13960 if test "$with_x11" = "yes"; then
13961   echo "  Where do we find X Windows header files?                $x_includes"
13962   echo "  Where do we find X Windows libraries?                   $x_libraries"
13963 fi
13964 if test -n "$site_includes"; then
13965   echo "  Additional header files:                                $site_includes"
13966 fi
13967 if test -n "$site_libraries"; then
13968   echo "  Additional libraries:                                   $site_libraries"
13969 fi
13970 if test -n "$site_prefixes"; then
13971   echo "  Additional prefixes:                                    $site_prefixes"
13972 fi
13973 if test -n "$runpath"; then
13974   echo "  Runtime library search path:                            $runpath"
13975 fi
13976 if test "$have_xaw" = "yes"; then
13977   echo "  Athena library to link:                                 $athena_lib"
13978   echo "  Athena header include path:                             $athena_h_path"
13979 fi
13980 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13981 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13982 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13983 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13984   echo "  No Xmu; substituting equivalent routines."
13985 fi
13986
13987 if test "$with_xpm" = yes; then
13988   echo "  Compiling in support for XPM images."
13989 elif test "$with_x11" = yes; then
13990   echo "  --------------------------------------------------------------------"
13991   echo "  WARNING: Compiling without XPM support."
13992   if test "$xpm_problem" != ""; then
13993     echo "  Reason: $xpm_problem"
13994   fi
13995   echo "  WARNING: You should strongly consider installing XPM."
13996   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13997   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13998   echo "  --------------------------------------------------------------------"
13999 fi
14000 if test "$with_png" = yes; then
14001   echo "  Compiling in support for PNG image handling."
14002 elif test "$window_system" != "none"; then
14003   echo "  --------------------------------------------------------------------"
14004   echo "  WARNING: Compiling without PNG image support."
14005   if test "$png_problem" != ""; then
14006     echo "  Reason: $png_problem"
14007   fi
14008   echo "  WARNING: You should strongly consider installing the PNG libraries."
14009   echo "  WARNING: Otherwise certain images and glyphs may not display."
14010   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14011   echo "  --------------------------------------------------------------------"
14012 fi
14013 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
14014 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
14015 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
14016 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14017
14018 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
14019 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
14020 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
14021 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
14022
14023 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
14024 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14025 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14026
14027 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
14028
14029 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
14030 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14031
14032 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14033 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14034 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14035 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14036 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14037 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14038 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14039 if test "$with_wnn" = yes; then
14040   echo "  Compiling in support for the WNN input method on Mule."
14041   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14042 fi
14043 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14044
14045 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14046 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14047 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14048 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14049 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14050 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14051 case "$with_menubars" in
14052   lucid ) echo "  Using Lucid menubars." ;;
14053   motif ) echo "  Using Motif menubars."
14054           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14055           echo "             We recommend using the Lucid menubar instead."
14056           echo "             Re-run configure with --with-menubars='lucid'." ;;
14057   msw ) echo "  Using MS-Windows menubars." ;;
14058 esac
14059 case "$with_scrollbars" in
14060   lucid    ) echo "  Using Lucid scrollbars."     ;;
14061   motif    ) echo "  Using Motif scrollbars."     ;;
14062   athena   ) echo "  Using Athena scrollbars."    ;;
14063   msw ) echo "  Using MS-Windows scrollbars." ;;
14064 esac
14065 case "$with_widgets" in
14066   motif    ) echo "  Using Motif native widgets."     ;;
14067   athena   ) echo "  Using Athena native widgets."    ;;
14068   msw ) echo "  Using MS-Windows native widgets." ;;
14069 esac
14070 case "$with_dialogs" in
14071   motif    )
14072     echo "  Using Motif dialog boxes."
14073     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14074       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14075       echo "             We recommend using the Athena dialog boxes instead."
14076       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14077       echo "             Read the PROBLEMS file for more information."
14078     fi; fi
14079     ;;
14080   athena   ) echo "  Using Athena dialog boxes."    ;;
14081   msw ) echo "  Using MS-Windows dialog boxes." ;;
14082 esac
14083 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14084 test "$with_clash_detection" = yes && \
14085   echo "  Clash detection will use \"$lockdir\" for locking files."
14086 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14087 test "$with_pop"        = yes && echo "  Using POP for mail access."
14088 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14089 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14090 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14091 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14092 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14093 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14094 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14095   != "no no no no no"; then
14096   echo "  WARNING: ---------------------------------------------------------"
14097   echo "  WARNING: Compiling in support for runtime error checking."
14098   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14099   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14100   echo "  WARNING: ---------------------------------------------------------"
14101 fi
14102 echo ""
14103 ) | tee -a Installation
14104 echo ""
14105
14106
14107 # Remove any trailing slashes in these variables.
14108 test -n "$prefix" &&
14109   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14110 test -n "$exec_prefix" &&
14111   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14112
14113
14114 for file in $internal_makefile_list; do
14115   test "$file" = src/Makefile.in && \
14116     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14117   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14118 done
14119 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14120 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
14121
14122 trap '' 1 2 15
14123
14124 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14125
14126 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14127 # Let make expand exec_prefix.
14128 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14129
14130 # Any assignment to VPATH causes Sun make to only execute
14131 # the first set of double-colon rules, so remove it if not needed.
14132 # If there is a colon in the path, we need to keep it.
14133 if test "x$srcdir" = x.; then
14134   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14135 fi
14136
14137 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14138
14139 DEFS=-DHAVE_CONFIG_H
14140
14141 # Without the "./", some shells look in PATH for config.status.
14142 : ${CONFIG_STATUS=./config.status}
14143
14144 echo creating $CONFIG_STATUS
14145 rm -f $CONFIG_STATUS
14146 cat > $CONFIG_STATUS <<EOF
14147 #! /bin/sh
14148 # Generated automatically by configure.
14149 # Run this file to recreate the current configuration.
14150 # This directory was configured as follows,
14151 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14152 #
14153 # $0 $ac_configure_args
14154 #
14155 # Compiler output produced by configure, useful for debugging
14156 # configure, is in ./config.log if it exists.
14157
14158 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14159 for ac_option
14160 do
14161   case "\$ac_option" in
14162   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14163     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14164     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14165   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14166     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14167     exit 0 ;;
14168   -help | --help | --hel | --he | --h)
14169     echo "\$ac_cs_usage"; exit 0 ;;
14170   *) echo "\$ac_cs_usage"; exit 1 ;;
14171   esac
14172 done
14173
14174 ac_given_srcdir=$srcdir
14175 ac_given_INSTALL="$INSTALL"
14176
14177 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14178 EOF
14179 cat >> $CONFIG_STATUS <<EOF
14180
14181 # Protect against being on the right side of a sed subst in config.status.
14182 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14183  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14184 $ac_vpsub
14185 $extrasub
14186 s%@SHELL@%$SHELL%g
14187 s%@CFLAGS@%$CFLAGS%g
14188 s%@CPPFLAGS@%$CPPFLAGS%g
14189 s%@CXXFLAGS@%$CXXFLAGS%g
14190 s%@FFLAGS@%$FFLAGS%g
14191 s%@DEFS@%$DEFS%g
14192 s%@LDFLAGS@%$LDFLAGS%g
14193 s%@LIBS@%$LIBS%g
14194 s%@exec_prefix@%$exec_prefix%g
14195 s%@prefix@%$prefix%g
14196 s%@program_transform_name@%$program_transform_name%g
14197 s%@bindir@%$bindir%g
14198 s%@sbindir@%$sbindir%g
14199 s%@libexecdir@%$libexecdir%g
14200 s%@datadir@%$datadir%g
14201 s%@sysconfdir@%$sysconfdir%g
14202 s%@sharedstatedir@%$sharedstatedir%g
14203 s%@localstatedir@%$localstatedir%g
14204 s%@libdir@%$libdir%g
14205 s%@includedir@%$includedir%g
14206 s%@oldincludedir@%$oldincludedir%g
14207 s%@infodir@%$infodir%g
14208 s%@mandir@%$mandir%g
14209 s%@LN_S@%$LN_S%g
14210 s%@blddir@%$blddir%g
14211 s%@CC@%$CC%g
14212 s%@CPP@%$CPP%g
14213 s%@start_flags@%$start_flags%g
14214 s%@ld_switch_shared@%$ld_switch_shared%g
14215 s%@start_files@%$start_files%g
14216 s%@ld@%$ld%g
14217 s%@lib_gcc@%$lib_gcc%g
14218 s%@RANLIB@%$RANLIB%g
14219 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14220 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14221 s%@INSTALL_DATA@%$INSTALL_DATA%g
14222 s%@YACC@%$YACC%g
14223 s%@SET_MAKE@%$SET_MAKE%g
14224 s%@X_CFLAGS@%$X_CFLAGS%g
14225 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14226 s%@X_LIBS@%$X_LIBS%g
14227 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14228 s%@install_pp@%$install_pp%g
14229 s%@libs_xauth@%$libs_xauth%g
14230 s%@dnd_objs@%$dnd_objs%g
14231 s%@lwlib_objs@%$lwlib_objs%g
14232 s%@ALLOCA@%$ALLOCA%g
14233 s%@have_esd_config@%$have_esd_config%g
14234 s%@dll_ld@%$dll_ld%g
14235 s%@dll_cflags@%$dll_cflags%g
14236 s%@dll_ldflags@%$dll_ldflags%g
14237 s%@dll_post@%$dll_post%g
14238 s%@dll_ldo@%$dll_ldo%g
14239 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14240 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14241 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14242 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14243 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14244 s%@PROGNAME@%$PROGNAME%g
14245 s%@version@%$version%g
14246 s%@configuration@%$configuration%g
14247 s%@canonical@%$canonical%g
14248 s%@inststaticdir@%$inststaticdir%g
14249 s%@instvardir@%$instvardir%g
14250 s%@srcdir@%$srcdir%g
14251 s%@pkgdir@%$pkgdir%g
14252 s%@statedir@%$statedir%g
14253 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14254 s%@PREFIX@%$PREFIX%g
14255 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14256 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14257 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14258 s%@INFODIR@%$INFODIR%g
14259 s%@infopath@%$infopath%g
14260 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14261 s%@INFOPATH@%$INFOPATH%g
14262 s%@package_path@%$package_path%g
14263 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14264 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14265 s%@lispdir@%$lispdir%g
14266 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14267 s%@LISPDIR@%$LISPDIR%g
14268 s%@moduledir@%$moduledir%g
14269 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14270 s%@MODULEDIR@%$MODULEDIR%g
14271 s%@sitelispdir@%$sitelispdir%g
14272 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14273 s%@SITELISPDIR@%$SITELISPDIR%g
14274 s%@sitemoduledir@%$sitemoduledir%g
14275 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14276 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14277 s%@etcdir@%$etcdir%g
14278 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14279 s%@ETCDIR@%$ETCDIR%g
14280 s%@lockdir@%$lockdir%g
14281 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14282 s%@LOCKDIR@%$LOCKDIR%g
14283 s%@docdir@%$docdir%g
14284 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14285 s%@DOCDIR@%$DOCDIR%g
14286 s%@archlibdir@%$archlibdir%g
14287 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14288 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14289 s%@bitmapdir@%$bitmapdir%g
14290 s%@extra_objs@%$extra_objs%g
14291 s%@machfile@%$machfile%g
14292 s%@opsysfile@%$opsysfile%g
14293 s%@c_switch_general@%$c_switch_general%g
14294 s%@c_switch_window_system@%$c_switch_window_system%g
14295 s%@c_switch_all@%$c_switch_all%g
14296 s%@ld_switch_general@%$ld_switch_general%g
14297 s%@ld_switch_window_system@%$ld_switch_window_system%g
14298 s%@ld_switch_all@%$ld_switch_all%g
14299 s%@ld_libs_general@%$ld_libs_general%g
14300 s%@ld_libs_window_system@%$ld_libs_window_system%g
14301 s%@ld_libs_all@%$ld_libs_all%g
14302 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14303 s%@native_sound_lib@%$native_sound_lib%g
14304 s%@sound_cflags@%$sound_cflags%g
14305 s%@dynodump_arch@%$dynodump_arch%g
14306 s%@XEMACS_CC@%$XEMACS_CC%g
14307 s%@internal_makefile_list@%$internal_makefile_list%g
14308
14309 CEOF
14310 EOF
14311
14312 cat >> $CONFIG_STATUS <<\EOF
14313
14314 # Split the substitutions into bite-sized pieces for seds with
14315 # small command number limits, like on Digital OSF/1 and HP-UX.
14316 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14317 ac_file=1 # Number of current file.
14318 ac_beg=1 # First line for current file.
14319 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14320 ac_more_lines=:
14321 ac_sed_cmds=""
14322 while $ac_more_lines; do
14323   if test $ac_beg -gt 1; then
14324     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14325   else
14326     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14327   fi
14328   if test ! -s conftest.s$ac_file; then
14329     ac_more_lines=false
14330     rm -f conftest.s$ac_file
14331   else
14332     if test -z "$ac_sed_cmds"; then
14333       ac_sed_cmds="sed -f conftest.s$ac_file"
14334     else
14335       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14336     fi
14337     ac_file=`expr $ac_file + 1`
14338     ac_beg=$ac_end
14339     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14340   fi
14341 done
14342 if test -z "$ac_sed_cmds"; then
14343   ac_sed_cmds=cat
14344 fi
14345 EOF
14346
14347 cat >> $CONFIG_STATUS <<EOF
14348
14349 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14350 EOF
14351 cat >> $CONFIG_STATUS <<\EOF
14352 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14353   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14354   case "$ac_file" in
14355   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14356        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14357   *) ac_file_in="${ac_file}.in" ;;
14358   esac
14359
14360   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14361
14362   # Remove last slash and all that follows it.  Not all systems have dirname.
14363   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14364   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14365     # The file is in a subdirectory.
14366     test ! -d "$ac_dir" && mkdir "$ac_dir"
14367     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14368     # A "../" for each directory in $ac_dir_suffix.
14369     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14370   else
14371     ac_dir_suffix= ac_dots=
14372   fi
14373
14374   case "$ac_given_srcdir" in
14375   .)  srcdir=.
14376       if test -z "$ac_dots"; then top_srcdir=.
14377       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14378   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14379   *) # Relative path.
14380     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14381     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14382   esac
14383
14384   case "$ac_given_INSTALL" in
14385   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14386   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14387   esac
14388
14389   echo creating "$ac_file"
14390   rm -f "$ac_file"
14391   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14392   case "$ac_file" in
14393   *Makefile*) ac_comsub="1i\\
14394 # $configure_input" ;;
14395   *) ac_comsub= ;;
14396   esac
14397
14398   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14399   sed -e "$ac_comsub
14400 s%@configure_input@%$configure_input%g
14401 s%@srcdir@%$srcdir%g
14402 s%@top_srcdir@%$top_srcdir%g
14403 s%@INSTALL@%$INSTALL%g
14404 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14405 fi; done
14406 rm -f conftest.s*
14407
14408 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14409 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14410 #
14411 # ac_d sets the value in "#define NAME VALUE" lines.
14412 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14413 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14414 ac_dC='\3'
14415 ac_dD='%g'
14416 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14417 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14418 ac_uB='\([      ]\)%\1#\2define\3'
14419 ac_uC=' '
14420 ac_uD='\4%g'
14421 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14422 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14423 ac_eB='$%\1#\2define\3'
14424 ac_eC=' '
14425 ac_eD='%g'
14426
14427 if test "${CONFIG_HEADERS+set}" != set; then
14428 EOF
14429 cat >> $CONFIG_STATUS <<EOF
14430   CONFIG_HEADERS="src/config.h lwlib/config.h"
14431 EOF
14432 cat >> $CONFIG_STATUS <<\EOF
14433 fi
14434 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14435   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14436   case "$ac_file" in
14437   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14438        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14439   *) ac_file_in="${ac_file}.in" ;;
14440   esac
14441
14442   echo creating $ac_file
14443
14444   rm -f conftest.frag conftest.in conftest.out
14445   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14446   cat $ac_file_inputs > conftest.in
14447
14448 EOF
14449
14450 # Transform confdefs.h into a sed script conftest.vals that substitutes
14451 # the proper values into config.h.in to produce config.h.  And first:
14452 # Protect against being on the right side of a sed subst in config.status.
14453 # Protect against being in an unquoted here document in config.status.
14454 rm -f conftest.vals
14455 cat > conftest.hdr <<\EOF
14456 s/[\\&%]/\\&/g
14457 s%[\\$`]%\\&%g
14458 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14459 s%ac_d%ac_u%gp
14460 s%ac_u%ac_e%gp
14461 EOF
14462 sed -n -f conftest.hdr confdefs.h > conftest.vals
14463 rm -f conftest.hdr
14464
14465 # This sed command replaces #undef with comments.  This is necessary, for
14466 # example, in the case of _POSIX_SOURCE, which is predefined and required
14467 # on some systems where configure will not decide to define it.
14468 cat >> conftest.vals <<\EOF
14469 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14470 EOF
14471
14472 # Break up conftest.vals because some shells have a limit on
14473 # the size of here documents, and old seds have small limits too.
14474
14475 rm -f conftest.tail
14476 while :
14477 do
14478   ac_lines=`grep -c . conftest.vals`
14479   # grep -c gives empty output for an empty file on some AIX systems.
14480   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14481   # Write a limited-size here document to conftest.frag.
14482   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14483   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14484   echo 'CEOF
14485   sed -f conftest.frag conftest.in > conftest.out
14486   rm -f conftest.in
14487   mv conftest.out conftest.in
14488 ' >> $CONFIG_STATUS
14489   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14490   rm -f conftest.vals
14491   mv conftest.tail conftest.vals
14492 done
14493 rm -f conftest.vals
14494
14495 cat >> $CONFIG_STATUS <<\EOF
14496   rm -f conftest.frag conftest.h
14497   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14498   cat conftest.in >> conftest.h
14499   rm -f conftest.in
14500   if cmp -s $ac_file conftest.h 2>/dev/null; then
14501     echo "$ac_file is unchanged"
14502     rm -f conftest.h
14503   else
14504     # Remove last slash and all that follows it.  Not all systems have dirname.
14505       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14506       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14507       # The file is in a subdirectory.
14508       test ! -d "$ac_dir" && mkdir "$ac_dir"
14509     fi
14510     rm -f $ac_file
14511     mv conftest.h $ac_file
14512   fi
14513 fi; done
14514
14515 EOF
14516 cat >> $CONFIG_STATUS <<EOF
14517 CPP="$CPP"
14518  top_srcdir="$srcdir"
14519  MAKE_SUBDIR="$MAKE_SUBDIR"
14520
14521 EOF
14522 cat >> $CONFIG_STATUS <<\EOF
14523 for dir in . $MAKE_SUBDIR; do
14524   (
14525     cd $dir
14526     rm -f junk.c
14527     < Makefile.in \
14528       sed -e '/^# Generated/d' \
14529           -e 's%/\*\*/#.*%%' \
14530           -e 's/^ *# */#/' \
14531           -e '/^##/d' \
14532           -e '/^#/ {
14533 p
14534 d
14535 }'        \
14536           -e '/./ {
14537 s/\([\"]\)/\\\1/g
14538 s/^/"/
14539 s/$/"/
14540 }'  > junk.c;
14541
14542
14543
14544     echo creating $dir/Makefile
14545 $CPP -I. -I${top_srcdir}/src  junk.c \
14546   | sed -e 's/^\#.*//'          \
14547         -e 's/^[        ][      ]*$//'\
14548         -e 's/^ /       /'              \
14549   | sed -n -e '/^..*$/p'        \
14550   | sed '/^\"/ {
14551         s/\\\([\"]\)/\1/g
14552         s/^[    ]*\"//
14553         s/\"[   ]*$//
14554 }' > Makefile.new
14555     chmod 444 Makefile.new
14556     mv -f Makefile.new Makefile
14557
14558     echo creating $dir/GNUmakefile
14559 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14560   | sed -e 's/^\#.*//'          \
14561         -e 's/^[        ][      ]*$//'\
14562         -e 's/^ /       /'              \
14563   | sed -n -e '/^..*$/p'        \
14564   | sed '/^\"/ {
14565         s/\\\([\"]\)/\1/g
14566         s/^[    ]*\"//
14567         s/\"[   ]*$//
14568 }' > Makefile.new
14569     chmod 444 Makefile.new
14570     mv -f Makefile.new GNUmakefile
14571
14572     rm -f junk.c
14573   )
14574 done
14575
14576 sed < config.status >> lib-src/config.values \
14577   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14578   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14579   -e 's/^\([^ ]*\) $/\1 ""/' \
14580   -e 's/ 1$/ t/'
14581
14582
14583 exit 0
14584 EOF
14585 chmod +x $CONFIG_STATUS
14586 rm -fr confdefs* $ac_clean_files
14587 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1