XEmacs 21.2.25 "Hephaestus".
[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
268
269
270
271 arguments="$@"
272
273 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
274 quoted_arguments=
275 for i in "$@"; do
276    case "$i" in
277    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
278    | --no-cr | --no-c) ;;
279    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
280    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
281    *)
282    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
283    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
284    esac
285 done
286
287 while test $# != 0; do
288   arg="$1"; shift
289   case "$arg" in
290     --no-create|--no-recursion) ;;
291         -* )
292             case "$arg" in
293         -*=*)
294           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
295           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
296           valomitted=no
297         ;;
298                                                                           -*)
299                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
300           val="yes" valomitted=yes
301         ;;
302       esac
303
304             optname="$opt"
305       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
306
307             case "${valomitted}-${opt}" in yes-without_* )
308         opt=`echo $opt | sed 's/without/with/'`
309         valomitted="no" val="no" ;;
310       esac
311
312             case "$opt" in
313
314         with_site_lisp  | \
315         with_prefix     | \
316         with_site_modules | \
317         with_x          | \
318         with_x11        | \
319         with_msw        | \
320         with_gcc        | \
321         dynamic         | \
322         with_ncurses    | \
323         with_dnet       | \
324         with_socks      | \
325         with_dragndrop  | \
326         with_cde        | \
327         with_offix      | \
328         with_gpm        | \
329         with_xpm        | \
330         with_xface      | \
331         with_gif        | \
332         with_jpeg       | \
333         with_png        | \
334         with_tiff       | \
335         with_wmcommand  | \
336         with_xmu        | \
337         with_purify     | \
338         with_quantify   | \
339         with_toolbars   | \
340         with_tty        | \
341         with_xfs        | \
342         with_i18n3      | \
343         with_mule       | \
344         with_file_coding| \
345         with_canna      | \
346         with_wnn        | \
347         with_wnn6       | \
348         with_workshop   | \
349         with_sparcworks | \
350         with_tooltalk   | \
351         with_ldap       | \
352         with_pop        | \
353         with_kerberos   | \
354         with_hesiod     | \
355         with_dnet       | \
356         with_infodock   | \
357         external_widget | \
358         verbose         | \
359         extra_verbose   | \
360         const_is_losing | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         no_doc_file )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 The default is to autodetect all sound support."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
475             elif test -n "$new_sdefault" ; then
476                 with_native_sound=$new_sdefault
477                 with_nas_sound=$new_sdefault
478                 with_esd_sound=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                         "with_athena" )
486           case "$val" in
487             xa | xaw )                    val=xaw    ;;
488             3 | 3d | xaw3d )              val=3d     ;;
489                         ne | nex | next | naxtaw)     val=next   ;;
490                         9 | 95 | xaw95 )              val=95     ;;
491             xp | xpm | xawxpm )           val=xpm    ;;
492             * ) (echo "$progname: Usage error:"
493 echo " " "The \`--$optname' option must have one of these values:
494   \`xaw', \`3d', \`next', \`95', or \`xpm'."
495 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
496           esac
497           eval "$opt=\"$val\""
498         ;;
499
500                 "with_xim" )
501           case "$val" in
502             y | ye | yes )                val=yes   ;;
503             n | no | non | none )         val=no    ;;
504             x | xl | xli | xlib )         val=xlib  ;;
505             m | mo | mot | moti | motif ) val=motif ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`motif', \`xlib', \`yes', or \`no'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "mail_locking" )
515           case "$val" in
516             lockf )     val=lockf ;;
517             flock )     val=flock ;;
518             file )      val=file  ;;
519             * ) (echo "$progname: Usage error:"
520 echo " " "The \`--$optname' option must have one of these values:
521   \`lockf', \`flock', or \`file'."
522 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
523           esac
524           eval "$opt=\"$val\""
525         ;;
526
527                 "error_checking" )
528                           
529           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
530             case "$x" in
531                       n | no | non | none ) new_default=no ;;
532               a | al | all )        new_default=yes ;;
533
534               extents )       error_check_extents=yes ;;
535               noextents )     error_check_extents=no ;;
536
537               typecheck )     error_check_typecheck=yes ;;
538               notypecheck )   error_check_typecheck=no ;;
539
540               bufpos )        error_check_bufpos=yes ;;
541               nobufpos )      error_check_bufpos=no ;;
542
543               gc )            error_check_gc=yes ;;
544               nogc )          error_check_gc=no ;;
545
546               malloc )        error_check_malloc=yes ;;
547               nomalloc )      error_check_malloc=no ;;
548
549               byte_code )     error_check_byte_code=yes ;;
550               nobyte_code )   error_check_byte_code=no ;;
551
552               * ) bogus_error_check=yes ;;
553             esac
554             if test "$bogus_error_check" -o \
555                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
556                 if test "$error_check_default" = yes ; then
557                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
558                 else
559                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
560                 fi
561                 (echo "$progname: Usage error:"
562 echo " " "Valid types for the \`--$optname' option are:
563   $types."
564 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
565             elif test -n "$new_default" ; then
566                 error_check_extents=$new_default
567                 error_check_typecheck=$new_default
568                 error_check_bufpos=$new_default
569                 error_check_gc=$new_default
570                 error_check_malloc=$new_default
571                 error_check_byte_code=$new_default
572                 new_default=    # reset this
573             fi
574             echeck_notfirst=true
575           done
576         ;;
577
578                                 
579                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
580         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
581         archlibdir | docdir | package_path )
582                    if test "$valomitted" = "yes"; then
583              if test "$#" = 0; then
584                  (echo "$progname: Usage error:"
585 echo " " "The \`--$optname' option requires a value."
586 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
587              fi
588              val="$1"; shift
589            fi
590            eval "$opt=\"$val\""
591
592                            case "$opt" in
593                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
594     Defining EXEC_PREFIX_USER_DEFINED
595 EOF
596 cat >> confdefs.h <<\EOF
597 #define EXEC_PREFIX_USER_DEFINED 1
598 EOF
599 }
600  ;;
601              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
602     Defining LISPDIR_USER_DEFINED
603 EOF
604 cat >> confdefs.h <<\EOF
605 #define LISPDIR_USER_DEFINED 1
606 EOF
607 }
608  ;;
609              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
610     Defining SITELISPDIR_USER_DEFINED
611 EOF
612 cat >> confdefs.h <<\EOF
613 #define SITELISPDIR_USER_DEFINED 1
614 EOF
615 }
616  ;;
617              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
618     Defining MODULEDIR_USER_DEFINED
619 EOF
620 cat >> confdefs.h <<\EOF
621 #define MODULEDIR_USER_DEFINED 1
622 EOF
623 }
624  ;;
625              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
626     Defining ETCDIR_USER_DEFINED
627 EOF
628 cat >> confdefs.h <<\EOF
629 #define ETCDIR_USER_DEFINED 1
630 EOF
631 }
632  ;;
633              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
634     Defining INFODIR_USER_DEFINED
635 EOF
636 cat >> confdefs.h <<\EOF
637 #define INFODIR_USER_DEFINED 1
638 EOF
639 }
640  ;;
641              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
642     Defining INFOPATH_USER_DEFINED
643 EOF
644 cat >> confdefs.h <<\EOF
645 #define INFOPATH_USER_DEFINED 1
646 EOF
647 }
648  ;;
649              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
650     Defining PACKAGE_PATH_USER_DEFINED
651 EOF
652 cat >> confdefs.h <<\EOF
653 #define PACKAGE_PATH_USER_DEFINED 1
654 EOF
655 }
656  ;;
657              datadir )
658                 { test "$extra_verbose" = "yes" && cat << \EOF
659     Defining INFODIR_USER_DEFINED
660 EOF
661 cat >> confdefs.h <<\EOF
662 #define INFODIR_USER_DEFINED 1
663 EOF
664 }
665
666                 { test "$extra_verbose" = "yes" && cat << \EOF
667     Defining LISPDIR_USER_DEFINED
668 EOF
669 cat >> confdefs.h <<\EOF
670 #define LISPDIR_USER_DEFINED 1
671 EOF
672 }
673
674             { test "$extra_verbose" = "yes" && cat << \EOF
675     Defining MODULEDIR_USER_DEFINED
676 EOF
677 cat >> confdefs.h <<\EOF
678 #define MODULEDIR_USER_DEFINED 1
679 EOF
680 }
681
682                 { test "$extra_verbose" = "yes" && cat << \EOF
683     Defining ETCDIR_USER_DEFINED
684 EOF
685 cat >> confdefs.h <<\EOF
686 #define ETCDIR_USER_DEFINED 1
687 EOF
688 }
689  ;;
690              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
691     Defining LOCKDIR_USER_DEFINED
692 EOF
693 cat >> confdefs.h <<\EOF
694 #define LOCKDIR_USER_DEFINED 1
695 EOF
696 }
697  ;;
698              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
699     Defining DOCDIR_USER_DEFINED
700 EOF
701 cat >> confdefs.h <<\EOF
702 #define DOCDIR_USER_DEFINED 1
703 EOF
704 }
705  ;;
706              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
707     Defining ARCHLIBDIR_USER_DEFINED
708 EOF
709 cat >> confdefs.h <<\EOF
710 #define ARCHLIBDIR_USER_DEFINED 1
711 EOF
712 }
713  ;;
714            esac
715         ;;
716
717                 "no_create" ) ;;
718
719                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
720
721                 "with_menubars"   | \
722         "with_scrollbars" | \
723         "with_dialogs" | \
724         "with_widgets" )
725           case "$val" in
726             l | lu | luc | luci | lucid )               val=lucid  ;;
727             m | mo | mot | moti | motif )               val=motif  ;;
728             a | at | ath | athe | athen | athena )      val=athena ;;
729             n | no | non | none )                       val=no ;;
730             * ) (echo "$progname: Usage error:"
731 echo " " "The \`--$optname' option must have one of these values:
732   \`lucid', \`motif', \`athena', or \`no'."
733 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
734           esac
735           eval "$opt=\"$val\""
736         ;;
737
738                 "use_minimal_tagbits" | \
739         "use_indexed_lrecord_implementation" | \
740         "run_in_place"  | \
741         "with_gnu_make" )
742           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
743         ;;
744
745                 * ) (echo "$progname: Usage error:"
746 echo " " "Unrecognized option: $arg"
747 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
748
749       esac
750     ;;
751
752         *-*-*) configuration="$arg" ;;
753
754         *) (echo "$progname: Usage error:"
755 echo " " "Unrecognized argument: $arg"
756 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
757
758   esac
759 done
760
761
762 test -n "$cpp"      && CPP="$cpp"
763 test -n "$cppflags" && CPPFLAGS="$cppflags"
764 test -n "$libs"     && LIBS="$libs"
765 test -n "$ldflags"  && LDFLAGS="$ldflags"
766
767 eval set x "$quoted_arguments"; shift
768
769 test "$extra_verbose" = "yes" && verbose=yes
770
771 test -n "$with_x" && with_x11="$with_x"
772
773 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
774   test "$with_system_malloc" = "default" && with_system_malloc=yes
775 fi
776
777
778
779 if test "$with_cde $with_tooltalk" = "yes no"; then
780   (echo "$progname: Usage error:"
781 echo " " "--with-cde requires --with-tooltalk"
782 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
783 elif test "$with_tooltalk" = "no" ; then with_cde=no
784 elif test "$with_cde" = "yes"; then with_tooltalk=yes
785 fi
786
787
788 case "$srcdir" in
789
790     "" )
791     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
792       if test -f "$dir/src/lisp.h" -a \
793               -f "$dir/lisp/version.el" ; then
794         srcdir="$dir"
795         break
796       fi
797     done
798     if test -z "$srcdir" ; then
799       (echo "$progname: Usage error:"
800 echo " " "Neither the current directory nor its parent seem to
801   contain the XEmacs sources.  If you do not want to build XEmacs in its
802   source tree, you should run \`$progname' in the directory in which
803   you wish to build XEmacs, using the \`--srcdir' option to say where the
804   sources may be found."
805 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
806     fi
807   ;;
808
809     * )
810     if test ! -f "$srcdir/src/lisp.h" -o \
811             ! -f "$srcdir/lisp/version.el" ; then
812       (echo "$progname: Usage error:"
813 echo " " "The directory specified with the \`--srcdir' option,
814   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
815   either run the \`$progname' script at the top of the XEmacs source
816   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
817 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
818     fi
819   ;;
820 esac
821
822 if test -z "$configuration"; then
823     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
824   if test -z "$configuration"; then
825     (echo "$progname: Usage error:"
826 echo " " "XEmacs has not been ported to this host type.
827 Try explicitly specifying the CONFIGURATION when rerunning configure."
828 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
829   fi
830 fi
831
832 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
833 echo "configure:834: checking whether ln -s works" >&5
834
835 rm -f conftestdata
836 if ln -s X conftestdata 2>/dev/null
837 then
838   rm -f conftestdata
839   ac_cv_prog_LN_S="ln -s"
840 else
841   ac_cv_prog_LN_S=ln
842 fi
843 LN_S="$ac_cv_prog_LN_S"
844 if test "$ac_cv_prog_LN_S" = "ln -s"; then
845   echo "$ac_t""yes" 1>&6
846 else
847   echo "$ac_t""no" 1>&6
848 fi
849
850
851 for dir in lisp etc man info; do
852   if test ! -d "$dir" ; then
853     echo Making symbolic link to "$srcdir/$dir"
854     ${LN_S} "$srcdir/$dir" "$dir"
855   fi
856 done
857
858
859 absolute_pwd="`pwd`";
860 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
861 then blddir="$PWD"
862 else blddir="$absolute_pwd"; if test -d "/net"; then
863   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
864   blddir=`echo "$blddir" | \
865    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
866 fi
867 fi
868
869
870 case "$srcdir" in
871   /* ) ;;
872   .  ) srcdir="$blddir" ;;
873   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
874   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
875   srcdir=`echo "$srcdir" | \
876    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
877 fi ;;
878 esac
879
880 if test `pwd` != `sh -c cd $srcdir && pwd`  \
881    && test -f "$srcdir/src/config.h"; then
882   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
883    echo "   as a build directory right now; it has been configured in its own"
884    echo "   right.  To configure in another directory as well, you MUST"
885    echo "   use GNU make.  If you do not have GNU make, then you must"
886    echo "   now do \`make distclean' in $srcdir,"
887    echo "   and then run $progname again.") >&2
888   extrasub='/^VPATH[     ]*=/c\
889 vpath %.c $(srcdir)\
890 vpath %.h $(srcdir)\
891 vpath %.y $(srcdir)\
892 vpath %.l $(srcdir)\
893 vpath %.s $(srcdir)\
894 vpath %.in $(srcdir)'
895 fi
896
897 . "$srcdir/version.sh" || exit 1;
898 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
899 : "${extra_verbose=$beta}"
900 version="${emacs_major_version}.${emacs_minor_version}"
901 { test "$extra_verbose" = "yes" && cat << EOF
902     Defining EMACS_MAJOR_VERSION = $emacs_major_version
903 EOF
904 cat >> confdefs.h <<EOF
905 #define EMACS_MAJOR_VERSION $emacs_major_version
906 EOF
907 }
908
909 { test "$extra_verbose" = "yes" && cat << EOF
910     Defining EMACS_MINOR_VERSION = $emacs_minor_version
911 EOF
912 cat >> confdefs.h <<EOF
913 #define EMACS_MINOR_VERSION $emacs_minor_version
914 EOF
915 }
916
917 if test -n "$emacs_beta_version" ; then
918   if test "$beta" = "yes"; then
919         version="${version}-b${emacs_beta_version}"
920         { test "$extra_verbose" = "yes" && cat << EOF
921     Defining EMACS_BETA_VERSION = $emacs_beta_version
922 EOF
923 cat >> confdefs.h <<EOF
924 #define EMACS_BETA_VERSION $emacs_beta_version
925 EOF
926 }
927
928   else
929         version="${version}.${emacs_beta_version}"
930         { test "$extra_verbose" = "yes" && cat << EOF
931     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
932 EOF
933 cat >> confdefs.h <<EOF
934 #define EMACS_PATCH_LEVEL $emacs_beta_version
935 EOF
936 }
937
938   fi
939 fi
940 { test "$extra_verbose" = "yes" && cat << EOF
941     Defining XEMACS_CODENAME = "$xemacs_codename"
942 EOF
943 cat >> confdefs.h <<EOF
944 #define XEMACS_CODENAME "$xemacs_codename"
945 EOF
946 }
947
948 { test "$extra_verbose" = "yes" && cat << EOF
949     Defining EMACS_VERSION = "$version"
950 EOF
951 cat >> confdefs.h <<EOF
952 #define EMACS_VERSION "$version"
953 EOF
954 }
955
956
957 if test "$with_infodock" = "yes"; then
958   if test ! -f ../../ID-INSTALL; then
959     echo "Cannot build InfoDock without InfoDock sources"
960     with_infodock=no
961   fi
962 fi
963
964 if test "$with_infodock" = "yes"; then
965       { test "$extra_verbose" = "yes" && cat << EOF
966     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
967 EOF
968 cat >> confdefs.h <<EOF
969 #define INFODOCK_MAJOR_VERSION $infodock_major_version
970 EOF
971 }
972
973   { test "$extra_verbose" = "yes" && cat << EOF
974     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
975 EOF
976 cat >> confdefs.h <<EOF
977 #define INFODOCK_MINOR_VERSION $infodock_minor_version
978 EOF
979 }
980
981   { test "$extra_verbose" = "yes" && cat << EOF
982     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
983 EOF
984 cat >> confdefs.h <<EOF
985 #define INFODOCK_BUILD_VERSION $infodock_build_version
986 EOF
987 }
988
989   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
990   PROGNAME=infodock
991   CPPFLAGS="$CPPFLAGS -DINFODOCK"
992 else
993   PROGNAME=xemacs
994 fi
995
996 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
997 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
998     Defining ERROR_CHECK_EXTENTS
999 EOF
1000 cat >> confdefs.h <<\EOF
1001 #define ERROR_CHECK_EXTENTS 1
1002 EOF
1003 }
1004
1005 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1006     Defining ERROR_CHECK_TYPECHECK
1007 EOF
1008 cat >> confdefs.h <<\EOF
1009 #define ERROR_CHECK_TYPECHECK 1
1010 EOF
1011 }
1012
1013 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1014     Defining ERROR_CHECK_BUFPOS
1015 EOF
1016 cat >> confdefs.h <<\EOF
1017 #define ERROR_CHECK_BUFPOS 1
1018 EOF
1019 }
1020
1021 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1022     Defining ERROR_CHECK_GC
1023 EOF
1024 cat >> confdefs.h <<\EOF
1025 #define ERROR_CHECK_GC 1
1026 EOF
1027 }
1028
1029 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1030     Defining ERROR_CHECK_MALLOC
1031 EOF
1032 cat >> confdefs.h <<\EOF
1033 #define ERROR_CHECK_MALLOC 1
1034 EOF
1035 }
1036
1037 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1038     Defining ERROR_CHECK_BYTE_CODE
1039 EOF
1040 cat >> confdefs.h <<\EOF
1041 #define ERROR_CHECK_BYTE_CODE 1
1042 EOF
1043 }
1044
1045 if test "${debug:=$beta}" = "yes"; then
1046   use_assertions=yes memory_usage_stats=yes
1047   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1048    echo "    xemacs will be linked with \"debug.o\""
1049  fi
1050   { test "$extra_verbose" = "yes" && cat << \EOF
1051     Defining DEBUG_XEMACS
1052 EOF
1053 cat >> confdefs.h <<\EOF
1054 #define DEBUG_XEMACS 1
1055 EOF
1056 }
1057
1058 fi
1059 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1060     Defining USE_ASSERTIONS
1061 EOF
1062 cat >> confdefs.h <<\EOF
1063 #define USE_ASSERTIONS 1
1064 EOF
1065 }
1066
1067 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1068     Defining MEMORY_USAGE_STATS
1069 EOF
1070 cat >> confdefs.h <<\EOF
1071 #define MEMORY_USAGE_STATS 1
1072 EOF
1073 }
1074
1075
1076
1077 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1078 echo "configure:1079: checking "host system type"" >&5
1079 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1080 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1081 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1082 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1083 echo "$ac_t""$configuration" 1>&6
1084
1085
1086
1087
1088
1089 machine='' opsys=''
1090
1091 case "$canonical" in
1092   sparc-*-*        ) machine=sparc ;;
1093   alpha*-*-*       ) machine=alpha ;;
1094   vax-*-*          ) machine=vax ;;
1095   mips-dec-*       ) machine=pmax ;;
1096   mips-sgi-*       ) machine=iris4d ;;
1097   mips*-linux      ) machine=mips ;;
1098   romp-ibm-*       ) machine=ibmrt ;;
1099   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1100   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1101   powerpc*-*       ) machine=powerpc ;;
1102   hppa-*-*         ) machine=hp800 ;;
1103   m88k-dg-*        ) machine=aviion ;;
1104   m68*-sony-*      ) machine=news ;;
1105   mips-sony-*      ) machine=news-risc ;;
1106   clipper-*        ) machine=clipper ;;
1107   arm-*            ) machine=arm ;;
1108   ns32k-*          ) machine=ns32000 ;;
1109 esac
1110
1111 case "$canonical" in
1112   *-*-linux*    ) opsys=linux ;;
1113   *-*-netbsd*   ) opsys=netbsd ;;
1114   *-*-openbsd*  ) opsys=openbsd ;;
1115   *-*-nextstep* ) opsys=nextstep ;;
1116   *-*-vms       ) opsys=vms ;;
1117
1118     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1119   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1120   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1121   *-dec-osf3*                ) opsys=decosf3-1 ;;
1122   *-dec-osf4*                ) opsys=decosf4-0 ;;
1123
1124     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1125   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1126   *-*-ultrix* )         opsys=ultrix4-3 ;;
1127
1128     *-*-aix3.1*  ) opsys=aix3-1 ;;
1129   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1130   *-*-aix3*    ) opsys=aix3-2   ;;
1131   *-*-aix4.0*  ) opsys=aix4     ;;
1132   *-*-aix4.1*  ) opsys=aix4-1   ;;
1133   *-*-aix4*    ) opsys=aix4-2   ;;
1134
1135     *-gnu* )                    opsys=gnu    ;;
1136   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1137   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1138   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1139   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1140   *-*-aos*   )                  opsys=bsd4-3 ;;
1141   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1142   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1143   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1144   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1145   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1146   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1147         if test -z "$NON_GNU_CPP" ; then
1148           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1149             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1150           done
1151         fi
1152         opsys=usg5-4-2 ;;
1153     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1154     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1155 esac
1156
1157 case "$canonical" in
1158
1159     *-*-netbsd* )
1160     case "$canonical" in
1161       i[3-9]86-*-netbsd*) machine=intel386 ;;
1162       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1163                                             machine=hp9000s300 ;;
1164       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1165       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1166     esac
1167   ;;
1168
1169     *-*-openbsd* )
1170     case "${canonical}" in
1171       i386-*-openbsd*)          machine=intel386 ;;
1172       m68k-*-openbsd*)          machine=hp9000s300 ;;
1173       mipsel-*-openbsd*)        machine=pmax ;;
1174      esac
1175    ;;
1176
1177     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1178   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1179
1180     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1181   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1182
1183     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1184
1185     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1186
1187     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1188
1189     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1190
1191     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1192
1193     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1194   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1195   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1196
1197   
1198     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1199
1200     *-convex-bsd* | *-convex-convexos* )
1201     machine=convex opsys=bsd4-3
1202     NON_GNU_CPP="cc -E -P"
1203   ;;
1204
1205     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1206
1207     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1208   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1209   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1210   m88k-dg-dgux*                           ) opsys=dgux     ;;
1211
1212     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1213   m88k-motorola-sysv4* )
1214                     machine=delta88k opsys=usg5-4-2
1215   ;;
1216   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1217
1218     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1219   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1220
1221     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1222
1223     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1224   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1225   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1226
1227       m88k-harris-cxux* )
1228         case "`uname -r`" in
1229        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1230        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1231     esac
1232     NON_GNU_CPP="/lib/cpp"
1233   ;;
1234     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1235     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1236
1237     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1238
1239     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1240
1241     *-hp-hpux* )
1242         case "$canonical" in
1243       m68*  ) machine=hp9000s300 ;;
1244       hppa* ) machine=hp800      ;;
1245     esac
1246
1247     case "$canonical" in
1248       *-hp-hpux7*  )  opsys=hpux   ;;
1249       *-hp-hpux8*  )  opsys=hpux8  ;;
1250       *-hp-hpux9*  )  opsys=hpux9  ;;
1251       *-hp-hpux10* )  opsys=hpux10 ;;
1252       *-hp-hpux11* )  opsys=hpux11 ;;
1253       *            )  opsys=hpux   ;;
1254     esac
1255
1256         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1257    echo "    xemacs will be linked with \"strcat.o\""
1258  fi ;; esac
1259
1260     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1261         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1262     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1263
1264     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1265   ;;
1266
1267     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1268   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1269
1270     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1271   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1272   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1273   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1274   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1275   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1276
1277     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1278   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1279
1280     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1281
1282     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1283
1284     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1285
1286     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1287
1288       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1289
1290     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1291
1292     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1293
1294     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1295
1296     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1297
1298         mips-mips-usg* ) machine=mips4 ;;
1299   mips-mips-riscos4 )
1300     machine=mips4
1301     NON_GNU_CC="cc -systype bsd43"
1302     NON_GNU_CPP="cc -systype bsd43 -E"
1303     case "$canonical" in
1304       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1305       mips-mips-riscos5* ) opsys=riscos5 ;;
1306     esac
1307   ;;
1308   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1309   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1310
1311     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1312
1313     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1314
1315     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1316   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1317
1318     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1319
1320     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1321
1322     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1323
1324     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1325
1326     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1327   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1328
1329     mips-siemens-sysv* | mips-sni-sysv*)
1330     machine=mips-siemens opsys=usg5-4
1331     NON_GNU_CC=/usr/ccs/bin/cc
1332     NON_GNU_CPP=/usr/ccs/lib/cpp
1333   ;;
1334
1335     mips-nec-sysv*)
1336     machine=mips-nec
1337     NON_GNU_CC=/usr/ccs/bin/cc
1338     NON_GNU_CPP=/usr/ccs/lib/cpp
1339   ;;
1340
1341       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1342   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1343     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1344   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1345   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1346   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1347   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1348   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1349   mips-sgi-irix*      ) opsys=irix5-0 ;;
1350
1351     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1352   *-sony-news* ) opsys=newsos5 ;;
1353
1354     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1355
1356     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1357         case "$canonical" in
1358       m68*-sunos1* )             machine=sun1     ;;
1359       m68*-sunos2* )             machine=sun2     ;;
1360       m68* )                     machine=sun3     ;;
1361       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1362       i*86-*-* )                 machine=intel386 ;;
1363       rs6000* )                  machine=rs6000   ;;
1364     esac
1365
1366         case "$canonical" in *-sunos5*)
1367       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1368     esac
1369
1370                     case "$canonical" in
1371       *-sunos4* )
1372         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1373         : ;;
1374       *-solaris2* )
1375         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1376         RANLIB=':' ;;
1377     esac
1378
1379     case "$canonical" in
1380       *-solaris*          )
1381         opsys=sol2
1382         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1383         { test "$extra_verbose" = "yes" && cat << EOF
1384     Defining OS_RELEASE = $os_release
1385 EOF
1386 cat >> confdefs.h <<EOF
1387 #define OS_RELEASE $os_release
1388 EOF
1389 }
1390  ;;
1391
1392             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1393       *-sunos4.0*         ) opsys=sunos4-0      ;;
1394       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1395       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1396       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1397       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1398       *-mach*             ) opsys=mach-bsd4-3   ;;
1399       *                   ) opsys=bsd4-2        ;;
1400     esac
1401
1402     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1403
1404         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1405   ;;
1406
1407     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1408
1409     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1410   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1411
1412     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1413
1414     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1415
1416     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1417       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1418
1419     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1420
1421     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1422
1423     vax-dec-* )
1424     case "$canonical" in
1425       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1426       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1427       *-mach* )                         opsys=mach-bsd4-3 ;;
1428     esac
1429   ;;
1430
1431     ns16k-whitechapel-* ) machine=mg1 ;;
1432
1433     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1434
1435     i[3-9]86-*-* )
1436     machine=intel386
1437     case "$canonical" in
1438       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1439       *-isc2.2* )               opsys=isc2-2 ;;
1440       *-isc4.0* )               opsys=isc4-0 ;;
1441       *-isc4.* )                opsys=isc4-1
1442                                 GCC_TEST_OPTIONS=-posix
1443                                 NON_GCC_TEST_OPTIONS=-Xp
1444                                 ;;
1445       *-isc* )                  opsys=isc3-0 ;;
1446       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1447       *-esix* )                 opsys=esix ;;
1448       *-mach* )                 opsys=mach-bsd4-3 ;;
1449       *-xenix* )                opsys=xenix ;;
1450       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1451       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1452       *-bsdi4* )                opsys=bsdos4 ;;
1453       *-bsdi3* )                opsys=bsdos3 ;;
1454       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1455       *-bsdi2* )                opsys=bsdos2 ;;
1456       *-sco3.2v5* )             opsys=sco5 ;
1457                                                         if test "$dynamic" = "yes" ; then
1458                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1459         else
1460                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1461         fi ;;
1462       *-sysv5* )                opsys=sco7 ;;
1463       *-386bsd* )               opsys=386bsd ;;
1464       *-freebsd* )              opsys=freebsd ;;
1465       *-nextstep* )             opsys=nextstep ;;
1466       *-pc-cygwin* )            opsys=cygwin32 ;;
1467       *-pc-mingw* )             opsys=mingw32 ;
1468                                 test -z "$with_tty" && with_tty="no";;
1469           esac
1470   ;;
1471
1472     m68k-*-linux* ) machine=m68k opsys=linux ;;
1473
1474 esac
1475
1476 if test -z "$machine" -o -z "$opsys"; then
1477   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1478    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1479   ) >&2
1480   exit 1
1481 fi
1482
1483 if test -z "$dynamic"; then
1484   case "$opsys" in
1485     hpux* | sunos4* ) dynamic=no ;;
1486     *) dynamic=yes ;;
1487   esac
1488 fi
1489 if test "$dynamic" = "yes"; then
1490   case "$opsys" in
1491     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1492     decosf* ) ld_call_shared="-call_shared" ;;
1493   esac
1494 else   case "$opsys" in
1495     sol2 )
1496       echo "Static linking is not supported on Solaris 2."
1497       echo "Rerun configure without specifying --dynamic=no."
1498       exit 1 ;;
1499     linux   ) ld_call_shared="-Bstatic" ;;
1500     decosf* ) ld_call_shared="-non_shared" ;;
1501   esac
1502 fi
1503
1504 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1505
1506 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1507 { test "$extra_verbose" = "yes" && cat << EOF
1508     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1509 EOF
1510 cat >> confdefs.h <<EOF
1511 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1512 EOF
1513 }
1514
1515
1516 machfile="m/${machine}.h"
1517 opsysfile="s/${opsys}.h"
1518
1519
1520 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1521 if test "$with_workshop $with_tooltalk" = "yes no"; then
1522   (echo "$progname: Usage error:"
1523 echo " " "--with-workshop requires --with-tooltalk"
1524 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1525 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1526 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1527 fi
1528
1529 if test "$with_workshop" = "yes"; then
1530   { test "$extra_verbose" = "yes" && cat << \EOF
1531     Defining SUNPRO
1532 EOF
1533 cat >> confdefs.h <<\EOF
1534 #define SUNPRO 1
1535 EOF
1536 }
1537
1538   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1539    echo "    xemacs will be linked with \"sunpro.o\""
1540  fi
1541 fi
1542
1543 if test "$with_clash_detection" = "yes"; then
1544   { test "$extra_verbose" = "yes" && cat << \EOF
1545     Defining CLASH_DETECTION
1546 EOF
1547 cat >> confdefs.h <<\EOF
1548 #define CLASH_DETECTION 1
1549 EOF
1550 }
1551
1552   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1553    echo "    xemacs will be linked with \"filelock.o\""
1554  fi
1555 fi
1556
1557 test -n "$compiler" && CC="$compiler"
1558 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1559 fi
1560
1561 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1562 if test "${CFLAGS-unset}" != unset
1563   then cflags_specified=yes;
1564   else cflags_specified=no;
1565 fi
1566
1567 xe_save_CFLAGS="$CFLAGS"
1568
1569 # Extract the first word of "gcc", so it can be a program name with args.
1570 set dummy gcc; ac_word=$2
1571 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1572 echo "configure:1573: checking for $ac_word" >&5
1573
1574 if test -n "$CC"; then
1575   ac_cv_prog_CC="$CC" # Let the user override the test.
1576 else
1577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1578   ac_dummy="$PATH"
1579   for ac_dir in $ac_dummy; do
1580     test -z "$ac_dir" && ac_dir=.
1581     if test -f $ac_dir/$ac_word; then
1582       ac_cv_prog_CC="gcc"
1583       break
1584     fi
1585   done
1586   IFS="$ac_save_ifs"
1587 fi
1588 CC="$ac_cv_prog_CC"
1589 if test -n "$CC"; then
1590   echo "$ac_t""$CC" 1>&6
1591 else
1592   echo "$ac_t""no" 1>&6
1593 fi
1594
1595 if test -z "$CC"; then
1596   # Extract the first word of "cc", so it can be a program name with args.
1597 set dummy cc; ac_word=$2
1598 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1599 echo "configure:1600: checking for $ac_word" >&5
1600
1601 if test -n "$CC"; then
1602   ac_cv_prog_CC="$CC" # Let the user override the test.
1603 else
1604   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1605   ac_prog_rejected=no
1606   ac_dummy="$PATH"
1607   for ac_dir in $ac_dummy; do
1608     test -z "$ac_dir" && ac_dir=.
1609     if test -f $ac_dir/$ac_word; then
1610       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1611         ac_prog_rejected=yes
1612         continue
1613       fi
1614       ac_cv_prog_CC="cc"
1615       break
1616     fi
1617   done
1618   IFS="$ac_save_ifs"
1619 if test $ac_prog_rejected = yes; then
1620   # We found a bogon in the path, so make sure we never use it.
1621   set dummy $ac_cv_prog_CC
1622   shift
1623   if test $# -gt 0; then
1624     # We chose a different compiler from the bogus one.
1625     # However, it has the same basename, so the bogon will be chosen
1626     # first if we set CC to just the basename; use the full file name.
1627     shift
1628     set dummy "$ac_dir/$ac_word" "$@"
1629     shift
1630     ac_cv_prog_CC="$@"
1631   fi
1632 fi
1633 fi
1634 CC="$ac_cv_prog_CC"
1635 if test -n "$CC"; then
1636   echo "$ac_t""$CC" 1>&6
1637 else
1638   echo "$ac_t""no" 1>&6
1639 fi
1640
1641   if test -z "$CC"; then
1642     case "`uname -s`" in
1643     *win32* | *WIN32*)
1644       # Extract the first word of "cl", so it can be a program name with args.
1645 set dummy cl; ac_word=$2
1646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_word" >&5
1648
1649 if test -n "$CC"; then
1650   ac_cv_prog_CC="$CC" # Let the user override the test.
1651 else
1652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1653   ac_dummy="$PATH"
1654   for ac_dir in $ac_dummy; do
1655     test -z "$ac_dir" && ac_dir=.
1656     if test -f $ac_dir/$ac_word; then
1657       ac_cv_prog_CC="cl"
1658       break
1659     fi
1660   done
1661   IFS="$ac_save_ifs"
1662 fi
1663 CC="$ac_cv_prog_CC"
1664 if test -n "$CC"; then
1665   echo "$ac_t""$CC" 1>&6
1666 else
1667   echo "$ac_t""no" 1>&6
1668 fi
1669  ;;
1670     esac
1671   fi
1672   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1673 fi
1674
1675 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1676 echo "configure:1677: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1677
1678 ac_ext=c
1679 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1680 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1681 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1682 ac_cpp='$CPP '"$xe_cppflags"
1683 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1684 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1685 cross_compiling=no
1686
1687 cat > conftest.$ac_ext << EOF
1688
1689 #line 1690 "configure"
1690 #include "confdefs.h"
1691
1692 main(){return(0);}
1693 EOF
1694 if { (eval echo configure:1695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1695   ac_cv_prog_cc_works=yes
1696   # If we can't run a trivial program, we are probably using a cross compiler.
1697   if (./conftest; exit) 2>/dev/null; then
1698     ac_cv_prog_cc_cross=no
1699   else
1700     ac_cv_prog_cc_cross=yes
1701   fi
1702 else
1703   echo "configure: failed program was:" >&5
1704   cat conftest.$ac_ext >&5
1705   ac_cv_prog_cc_works=no
1706 fi
1707 rm -fr conftest*
1708 ac_ext=c
1709 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1710 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1711 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1712 ac_cpp='$CPP '"$xe_cppflags"
1713 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1714 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1715 cross_compiling=no
1716
1717 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1718 if test $ac_cv_prog_cc_works = no; then
1719   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1720 fi
1721 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1722 echo "configure:1723: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1723 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1724 cross_compiling=$ac_cv_prog_cc_cross
1725
1726 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1727 echo "configure:1728: checking whether we are using GNU C" >&5
1728
1729 cat > conftest.c <<EOF
1730 #ifdef __GNUC__
1731   yes;
1732 #endif
1733 EOF
1734 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1735   ac_cv_prog_gcc=yes
1736 else
1737   ac_cv_prog_gcc=no
1738 fi
1739
1740 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1741
1742 if test $ac_cv_prog_gcc = yes; then
1743   GCC=yes
1744 else
1745   GCC=
1746 fi
1747
1748 ac_test_CFLAGS="${CFLAGS+set}"
1749 ac_save_CFLAGS="$CFLAGS"
1750 CFLAGS=
1751 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1752 echo "configure:1753: checking whether ${CC-cc} accepts -g" >&5
1753
1754 echo 'void f(){}' > conftest.c
1755 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1756   ac_cv_prog_cc_g=yes
1757 else
1758   ac_cv_prog_cc_g=no
1759 fi
1760 rm -f conftest*
1761
1762
1763 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1764 if test "$ac_test_CFLAGS" = set; then
1765   CFLAGS="$ac_save_CFLAGS"
1766 elif test $ac_cv_prog_cc_g = yes; then
1767   if test "$GCC" = yes; then
1768     CFLAGS="-g -O2"
1769   else
1770     CFLAGS="-g"
1771   fi
1772 else
1773   if test "$GCC" = yes; then
1774     CFLAGS="-O2"
1775   else
1776     CFLAGS=
1777   fi
1778 fi
1779  
1780 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1781   CC=${NON_GNU_CC-cc}
1782   # Extract the first word of "gcc", so it can be a program name with args.
1783 set dummy gcc; ac_word=$2
1784 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1785 echo "configure:1786: checking for $ac_word" >&5
1786
1787 if test -n "$CC"; then
1788   ac_cv_prog_CC="$CC" # Let the user override the test.
1789 else
1790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1791   ac_dummy="$PATH"
1792   for ac_dir in $ac_dummy; do
1793     test -z "$ac_dir" && ac_dir=.
1794     if test -f $ac_dir/$ac_word; then
1795       ac_cv_prog_CC="gcc"
1796       break
1797     fi
1798   done
1799   IFS="$ac_save_ifs"
1800 fi
1801 CC="$ac_cv_prog_CC"
1802 if test -n "$CC"; then
1803   echo "$ac_t""$CC" 1>&6
1804 else
1805   echo "$ac_t""no" 1>&6
1806 fi
1807
1808 if test -z "$CC"; then
1809   # Extract the first word of "cc", so it can be a program name with args.
1810 set dummy cc; ac_word=$2
1811 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1812 echo "configure:1813: checking for $ac_word" >&5
1813
1814 if test -n "$CC"; then
1815   ac_cv_prog_CC="$CC" # Let the user override the test.
1816 else
1817   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1818   ac_prog_rejected=no
1819   ac_dummy="$PATH"
1820   for ac_dir in $ac_dummy; do
1821     test -z "$ac_dir" && ac_dir=.
1822     if test -f $ac_dir/$ac_word; then
1823       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1824         ac_prog_rejected=yes
1825         continue
1826       fi
1827       ac_cv_prog_CC="cc"
1828       break
1829     fi
1830   done
1831   IFS="$ac_save_ifs"
1832 if test $ac_prog_rejected = yes; then
1833   # We found a bogon in the path, so make sure we never use it.
1834   set dummy $ac_cv_prog_CC
1835   shift
1836   if test $# -gt 0; then
1837     # We chose a different compiler from the bogus one.
1838     # However, it has the same basename, so the bogon will be chosen
1839     # first if we set CC to just the basename; use the full file name.
1840     shift
1841     set dummy "$ac_dir/$ac_word" "$@"
1842     shift
1843     ac_cv_prog_CC="$@"
1844   fi
1845 fi
1846 fi
1847 CC="$ac_cv_prog_CC"
1848 if test -n "$CC"; then
1849   echo "$ac_t""$CC" 1>&6
1850 else
1851   echo "$ac_t""no" 1>&6
1852 fi
1853
1854   if test -z "$CC"; then
1855     case "`uname -s`" in
1856     *win32* | *WIN32*)
1857       # Extract the first word of "cl", so it can be a program name with args.
1858 set dummy cl; ac_word=$2
1859 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1860 echo "configure:1861: checking for $ac_word" >&5
1861
1862 if test -n "$CC"; then
1863   ac_cv_prog_CC="$CC" # Let the user override the test.
1864 else
1865   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1866   ac_dummy="$PATH"
1867   for ac_dir in $ac_dummy; do
1868     test -z "$ac_dir" && ac_dir=.
1869     if test -f $ac_dir/$ac_word; then
1870       ac_cv_prog_CC="cl"
1871       break
1872     fi
1873   done
1874   IFS="$ac_save_ifs"
1875 fi
1876 CC="$ac_cv_prog_CC"
1877 if test -n "$CC"; then
1878   echo "$ac_t""$CC" 1>&6
1879 else
1880   echo "$ac_t""no" 1>&6
1881 fi
1882  ;;
1883     esac
1884   fi
1885   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1886 fi
1887
1888 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1889 echo "configure:1890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1890
1891 ac_ext=c
1892 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1893 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1894 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1895 ac_cpp='$CPP '"$xe_cppflags"
1896 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1897 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1898 cross_compiling=no
1899
1900 cat > conftest.$ac_ext << EOF
1901
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904
1905 main(){return(0);}
1906 EOF
1907 if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1908   ac_cv_prog_cc_works=yes
1909   # If we can't run a trivial program, we are probably using a cross compiler.
1910   if (./conftest; exit) 2>/dev/null; then
1911     ac_cv_prog_cc_cross=no
1912   else
1913     ac_cv_prog_cc_cross=yes
1914   fi
1915 else
1916   echo "configure: failed program was:" >&5
1917   cat conftest.$ac_ext >&5
1918   ac_cv_prog_cc_works=no
1919 fi
1920 rm -fr conftest*
1921 ac_ext=c
1922 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1923 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1924 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1925 ac_cpp='$CPP '"$xe_cppflags"
1926 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1927 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1928 cross_compiling=no
1929
1930 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1931 if test $ac_cv_prog_cc_works = no; then
1932   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1933 fi
1934 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1935 echo "configure:1936: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1936 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1937 cross_compiling=$ac_cv_prog_cc_cross
1938
1939 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1940 echo "configure:1941: checking whether we are using GNU C" >&5
1941
1942 cat > conftest.c <<EOF
1943 #ifdef __GNUC__
1944   yes;
1945 #endif
1946 EOF
1947 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1948   ac_cv_prog_gcc=yes
1949 else
1950   ac_cv_prog_gcc=no
1951 fi
1952
1953 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1954
1955 if test $ac_cv_prog_gcc = yes; then
1956   GCC=yes
1957 else
1958   GCC=
1959 fi
1960
1961 ac_test_CFLAGS="${CFLAGS+set}"
1962 ac_save_CFLAGS="$CFLAGS"
1963 CFLAGS=
1964 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1965 echo "configure:1966: checking whether ${CC-cc} accepts -g" >&5
1966
1967 echo 'void f(){}' > conftest.c
1968 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1969   ac_cv_prog_cc_g=yes
1970 else
1971   ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest*
1974
1975
1976 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS="$ac_save_CFLAGS"
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992
1993 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1994   CC=gcc
1995   # Extract the first word of "gcc", so it can be a program name with args.
1996 set dummy gcc; ac_word=$2
1997 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1998 echo "configure:1999: checking for $ac_word" >&5
1999
2000 if test -n "$CC"; then
2001   ac_cv_prog_CC="$CC" # Let the user override the test.
2002 else
2003   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2004   ac_dummy="$PATH"
2005   for ac_dir in $ac_dummy; do
2006     test -z "$ac_dir" && ac_dir=.
2007     if test -f $ac_dir/$ac_word; then
2008       ac_cv_prog_CC="gcc"
2009       break
2010     fi
2011   done
2012   IFS="$ac_save_ifs"
2013 fi
2014 CC="$ac_cv_prog_CC"
2015 if test -n "$CC"; then
2016   echo "$ac_t""$CC" 1>&6
2017 else
2018   echo "$ac_t""no" 1>&6
2019 fi
2020
2021 if test -z "$CC"; then
2022   # Extract the first word of "cc", so it can be a program name with args.
2023 set dummy cc; ac_word=$2
2024 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2025 echo "configure:2026: checking for $ac_word" >&5
2026
2027 if test -n "$CC"; then
2028   ac_cv_prog_CC="$CC" # Let the user override the test.
2029 else
2030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2031   ac_prog_rejected=no
2032   ac_dummy="$PATH"
2033   for ac_dir in $ac_dummy; do
2034     test -z "$ac_dir" && ac_dir=.
2035     if test -f $ac_dir/$ac_word; then
2036       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2037         ac_prog_rejected=yes
2038         continue
2039       fi
2040       ac_cv_prog_CC="cc"
2041       break
2042     fi
2043   done
2044   IFS="$ac_save_ifs"
2045 if test $ac_prog_rejected = yes; then
2046   # We found a bogon in the path, so make sure we never use it.
2047   set dummy $ac_cv_prog_CC
2048   shift
2049   if test $# -gt 0; then
2050     # We chose a different compiler from the bogus one.
2051     # However, it has the same basename, so the bogon will be chosen
2052     # first if we set CC to just the basename; use the full file name.
2053     shift
2054     set dummy "$ac_dir/$ac_word" "$@"
2055     shift
2056     ac_cv_prog_CC="$@"
2057   fi
2058 fi
2059 fi
2060 CC="$ac_cv_prog_CC"
2061 if test -n "$CC"; then
2062   echo "$ac_t""$CC" 1>&6
2063 else
2064   echo "$ac_t""no" 1>&6
2065 fi
2066
2067   if test -z "$CC"; then
2068     case "`uname -s`" in
2069     *win32* | *WIN32*)
2070       # Extract the first word of "cl", so it can be a program name with args.
2071 set dummy cl; ac_word=$2
2072 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2073 echo "configure:2074: checking for $ac_word" >&5
2074
2075 if test -n "$CC"; then
2076   ac_cv_prog_CC="$CC" # Let the user override the test.
2077 else
2078   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2079   ac_dummy="$PATH"
2080   for ac_dir in $ac_dummy; do
2081     test -z "$ac_dir" && ac_dir=.
2082     if test -f $ac_dir/$ac_word; then
2083       ac_cv_prog_CC="cl"
2084       break
2085     fi
2086   done
2087   IFS="$ac_save_ifs"
2088 fi
2089 CC="$ac_cv_prog_CC"
2090 if test -n "$CC"; then
2091   echo "$ac_t""$CC" 1>&6
2092 else
2093   echo "$ac_t""no" 1>&6
2094 fi
2095  ;;
2096     esac
2097   fi
2098   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2099 fi
2100
2101 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2102 echo "configure:2103: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2103
2104 ac_ext=c
2105 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2106 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2107 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2108 ac_cpp='$CPP '"$xe_cppflags"
2109 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2110 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2111 cross_compiling=no
2112
2113 cat > conftest.$ac_ext << EOF
2114
2115 #line 2116 "configure"
2116 #include "confdefs.h"
2117
2118 main(){return(0);}
2119 EOF
2120 if { (eval echo configure:2121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2121   ac_cv_prog_cc_works=yes
2122   # If we can't run a trivial program, we are probably using a cross compiler.
2123   if (./conftest; exit) 2>/dev/null; then
2124     ac_cv_prog_cc_cross=no
2125   else
2126     ac_cv_prog_cc_cross=yes
2127   fi
2128 else
2129   echo "configure: failed program was:" >&5
2130   cat conftest.$ac_ext >&5
2131   ac_cv_prog_cc_works=no
2132 fi
2133 rm -fr conftest*
2134 ac_ext=c
2135 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2136 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2137 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2138 ac_cpp='$CPP '"$xe_cppflags"
2139 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2140 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2141 cross_compiling=no
2142
2143 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2144 if test $ac_cv_prog_cc_works = no; then
2145   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2146 fi
2147 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2148 echo "configure:2149: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2149 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2150 cross_compiling=$ac_cv_prog_cc_cross
2151
2152 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2153 echo "configure:2154: checking whether we are using GNU C" >&5
2154
2155 cat > conftest.c <<EOF
2156 #ifdef __GNUC__
2157   yes;
2158 #endif
2159 EOF
2160 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2161: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2161   ac_cv_prog_gcc=yes
2162 else
2163   ac_cv_prog_gcc=no
2164 fi
2165
2166 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2167
2168 if test $ac_cv_prog_gcc = yes; then
2169   GCC=yes
2170 else
2171   GCC=
2172 fi
2173
2174 ac_test_CFLAGS="${CFLAGS+set}"
2175 ac_save_CFLAGS="$CFLAGS"
2176 CFLAGS=
2177 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2178 echo "configure:2179: checking whether ${CC-cc} accepts -g" >&5
2179
2180 echo 'void f(){}' > conftest.c
2181 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2182   ac_cv_prog_cc_g=yes
2183 else
2184   ac_cv_prog_cc_g=no
2185 fi
2186 rm -f conftest*
2187
2188
2189 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2190 if test "$ac_test_CFLAGS" = set; then
2191   CFLAGS="$ac_save_CFLAGS"
2192 elif test $ac_cv_prog_cc_g = yes; then
2193   if test "$GCC" = yes; then
2194     CFLAGS="-g -O2"
2195   else
2196     CFLAGS="-g"
2197   fi
2198 else
2199   if test "$GCC" = yes; then
2200     CFLAGS="-O2"
2201   else
2202     CFLAGS=
2203   fi
2204 fi
2205
2206 fi
2207 CFLAGS="$xe_save_CFLAGS"
2208
2209
2210 test -n "$CPP" -a -d "$CPP" && CPP=
2211
2212 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2213
2214 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2215 echo "configure:2216: checking how to run the C preprocessor" >&5
2216 # On Suns, sometimes $CPP names a directory.
2217 if test -n "$CPP" && test -d "$CPP"; then
2218   CPP=
2219 fi
2220 if test -z "$CPP"; then
2221
2222   # This must be in double quotes, not single quotes, because CPP may get
2223   # substituted into the Makefile and "${CC-cc}" will confuse make.
2224   CPP="${CC-cc} -E"
2225   # On the NeXT, cc -E runs the code through the compiler's parser,
2226   # not just through cpp.
2227   cat > conftest.$ac_ext <<EOF
2228 #line 2229 "configure"
2229 #include "confdefs.h"
2230 #include <assert.h>
2231 Syntax Error
2232 EOF
2233 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2234 { (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2235 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2236 if test -z "$ac_err"; then
2237   :
2238 else
2239   echo "$ac_err" >&5
2240   echo "configure: failed program was:" >&5
2241   cat conftest.$ac_ext >&5
2242   rm -rf conftest*
2243   CPP="${CC-cc} -E -traditional-cpp"
2244   cat > conftest.$ac_ext <<EOF
2245 #line 2246 "configure"
2246 #include "confdefs.h"
2247 #include <assert.h>
2248 Syntax Error
2249 EOF
2250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2251 { (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2253 if test -z "$ac_err"; then
2254   :
2255 else
2256   echo "$ac_err" >&5
2257   echo "configure: failed program was:" >&5
2258   cat conftest.$ac_ext >&5
2259   rm -rf conftest*
2260   CPP="${CC-cc} -nologo -E"
2261   cat > conftest.$ac_ext <<EOF
2262 #line 2263 "configure"
2263 #include "confdefs.h"
2264 #include <assert.h>
2265 Syntax Error
2266 EOF
2267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2268 { (eval echo configure:2269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2270 if test -z "$ac_err"; then
2271   :
2272 else
2273   echo "$ac_err" >&5
2274   echo "configure: failed program was:" >&5
2275   cat conftest.$ac_ext >&5
2276   rm -rf conftest*
2277   CPP=/lib/cpp
2278 fi
2279 rm -f conftest*
2280 fi
2281 rm -f conftest*
2282 fi
2283 rm -f conftest*
2284   ac_cv_prog_CPP="$CPP"
2285   CPP="$ac_cv_prog_CPP"
2286 else
2287   ac_cv_prog_CPP="$CPP"
2288 fi
2289 echo "$ac_t""$CPP" 1>&6
2290
2291
2292 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2293 echo "configure:2294: checking for AIX" >&5
2294 cat > conftest.$ac_ext <<EOF
2295 #line 2296 "configure"
2296 #include "confdefs.h"
2297 #ifdef _AIX
2298   yes
2299 #endif
2300
2301 EOF
2302 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2303   egrep "yes" >/dev/null 2>&1; then
2304   rm -rf conftest*
2305   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2306     Defining _ALL_SOURCE
2307 EOF
2308 cat >> confdefs.h <<\EOF
2309 #define _ALL_SOURCE 1
2310 EOF
2311 }
2312
2313 else
2314   rm -rf conftest*
2315   echo "$ac_t""no" 1>&6
2316 fi
2317 rm -f conftest*
2318
2319
2320
2321 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2322 echo "configure:2323: checking for GNU libc" >&5
2323 cat > conftest.$ac_ext <<EOF
2324 #line 2325 "configure"
2325 #include "confdefs.h"
2326 #include <features.h>
2327 int main() {
2328
2329 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2330 #error Not a GNU libc system :-(
2331 ******* ======= ******** &&&&&&&&
2332 #endif
2333
2334 ; return 0; }
2335 EOF
2336 if { (eval echo configure:2337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2337   rm -rf conftest*
2338   have_glibc=yes
2339 else
2340   echo "configure: failed program was:" >&5
2341   cat conftest.$ac_ext >&5
2342   rm -rf conftest*
2343   have_glibc=no
2344 fi
2345 rm -f conftest*
2346 echo "$ac_t""$have_glibc" 1>&6
2347 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2348     Defining _GNU_SOURCE
2349 EOF
2350 cat >> confdefs.h <<\EOF
2351 #define _GNU_SOURCE 1
2352 EOF
2353 }
2354
2355
2356
2357 cat > conftest.$ac_ext <<EOF
2358 #line 2359 "configure"
2359 #include "confdefs.h"
2360 int main () {
2361 #if defined __SUNPRO_C
2362 return 11;
2363 #elif defined __DECC
2364 return 12;
2365 #else
2366 return 0;
2367 #endif
2368 }
2369 EOF
2370 if { (eval echo configure:2371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2371 then
2372   :
2373 else
2374   conftest_rc="$?"
2375   echo "configure: failed program was:" >&5
2376   cat conftest.$ac_ext >&5
2377   rm -fr conftest*
2378   case "$conftest_rc" in
2379   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2380   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2381 esac
2382 fi
2383 rm -fr conftest*
2384
2385
2386
2387
2388 echo "Extracting information from the machine- and system-dependent headers..."
2389
2390 tempcname="conftest.c"
2391
2392
2393
2394 cat > $tempcname <<EOF
2395 #define NOT_C_CODE
2396 #define C_SWITCH_SITE
2397 #define C_SWITCH_X_SITE
2398 #define LD_SWITCH_SITE
2399 #define LD_SWITCH_X_SITE
2400 #define LD_SWITCH_X_SITE_AUX
2401 #define OS_RELEASE $os_release
2402 #include "$srcdir/src/$opsysfile"
2403 #include "$srcdir/src/$machfile"
2404
2405 #ifndef LIBS_MACHINE
2406 #define LIBS_MACHINE
2407 #endif
2408 configure___ libs_machine=LIBS_MACHINE
2409
2410 #ifndef LIBS_SYSTEM
2411 #define LIBS_SYSTEM
2412 #endif
2413 configure___ libs_system=LIBS_SYSTEM
2414
2415 #ifndef LIBS_TERMCAP
2416 #define LIBS_TERMCAP
2417 #endif
2418 configure___ libs_termcap=LIBS_TERMCAP
2419
2420 #ifndef LIB_STANDARD
2421 #define LIB_STANDARD
2422 #endif
2423 configure___ libs_standard=LIB_STANDARD
2424
2425
2426 #ifndef OBJECTS_MACHINE
2427 #define OBJECTS_MACHINE
2428 #endif
2429 configure___ objects_machine=OBJECTS_MACHINE
2430
2431 #ifndef OBJECTS_SYSTEM
2432 #define OBJECTS_SYSTEM
2433 #endif
2434 configure___ objects_system=OBJECTS_SYSTEM
2435
2436
2437 #ifndef C_SWITCH_MACHINE
2438 #define C_SWITCH_MACHINE
2439 #endif
2440 configure___ c_switch_machine=C_SWITCH_MACHINE
2441
2442 #ifndef C_SWITCH_SYSTEM
2443 #define C_SWITCH_SYSTEM
2444 #endif
2445 configure___ c_switch_system=C_SWITCH_SYSTEM
2446
2447
2448 #ifndef LD_SWITCH_MACHINE
2449 #define LD_SWITCH_MACHINE
2450 #endif
2451 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2452
2453 #ifndef LD_SWITCH_SYSTEM
2454 #define LD_SWITCH_SYSTEM
2455 #endif
2456 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2457
2458
2459 #ifndef UNEXEC
2460 #define UNEXEC "unexec.o"
2461 #endif
2462 configure___ unexec=UNEXEC
2463
2464
2465 #ifndef LD_SWITCH_SHARED
2466 #define LD_SWITCH_SHARED "-c"
2467 #endif
2468 configure___ ld_switch_shared=LD_SWITCH_SHARED
2469
2470
2471 #ifdef ORDINARY_LINK
2472 #define LD "\$(CC) \$(CFLAGS)"
2473 #else /* no ORDINARY LINK */
2474 #ifdef COFF_ENCAPSULATE
2475 #define LD "\$(CC) -nostdlib"
2476 #else /* not COFF_ENCAPSULATE */
2477 #ifdef LINKER
2478 #define LD LINKER
2479 #else /* ! defined (LINKER) */
2480 #define LD "ld"
2481 #endif /* ! defined (LINKER) */
2482 #endif /* ! defined (COFF_ENCAPSULATE) */
2483 #endif /* not ORDINARY_LINK */
2484 configure___ ld=LD
2485
2486 #ifndef LIB_GCC
2487 #define LIB_GCC
2488 #endif
2489 configure___ lib_gcc=LIB_GCC
2490
2491 #ifndef LD_TEXT_START_ADDR
2492 #define LD_TEXT_START_ADDR
2493 #endif
2494 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2495
2496
2497 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2498 #ifdef NO_REMAP
2499 #ifdef COFF_ENCAPSULATE
2500 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2501 #else /* ! defined (COFF_ENCAPSULATE) */
2502 #define START_FILES "pre-crt0.o /lib/crt0.o"
2503 #endif /* ! defined (COFF_ENCAPSULATE) */
2504 #else /* ! defined (NO_REMAP) */
2505 #define START_FILES "ecrt0.o"
2506 #endif /* ! defined (NO_REMAP) */
2507 #endif /* no ORDINARY_LINK */
2508 #ifndef START_FILES
2509 #define START_FILES
2510 #endif
2511 configure___ start_files=START_FILES
2512
2513 #ifdef ORDINARY_LINK
2514 configure___ ordinary_link=yes
2515 #else
2516 configure___ ordinary_link=no
2517 #endif
2518
2519 #ifdef SYSTEM_MALLOC
2520 configure___ system_malloc=yes
2521 #else
2522 configure___ system_malloc=no
2523 #endif
2524
2525 #ifdef TERMINFO
2526 configure___ have_terminfo=yes
2527 #else
2528 configure___ have_terminfo=no
2529 #endif
2530
2531 #ifdef MAIL_USE_FLOCK
2532 configure___ mail_use_flock=yes
2533 #else
2534 configure___ mail_use_flock=no
2535 #endif
2536
2537 #ifdef MAIL_USE_LOCKF
2538 configure___ mail_use_lockf=yes
2539 #else
2540 configure___ mail_use_lockf=no
2541 #endif
2542
2543 #ifdef HAVE_WIN32_PROCESSES
2544 configure___ win32_processes=yes
2545 #else
2546 configure___ win32_processes=no
2547 #endif
2548
2549 EOF
2550
2551 CPP=`eval "echo $CPP $CPPFLAGS"`
2552 eval `$CPP -Isrc $tempcname \
2553         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2554
2555 rm $tempcname
2556
2557 test "$extra_verbose" = "yes" && \
2558   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 ""
2559
2560 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2561
2562 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2563
2564 if test "$cflags_specified" = "no"; then
2565       if   test "$GCC" = "yes"; then
2566     CFLAGS="-g -O3 -Wall -Wno-switch"
2567               elif test "$__SUNPRO_C" = "yes"; then
2568     case "$opsys" in
2569       sol2    ) CFLAGS="-v -xO4" ;;
2570       sunos4* ) CFLAGS="-xO2";;
2571     esac
2572   elif test "$__DECC" = "yes"; then
2573     CFLAGS="-O3"
2574   elif test "$CC" = "xlc"; then
2575     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2576     else
2577     CFLAGS="-O" ;  fi
2578 fi
2579
2580
2581 if test "$GCC" = "yes"; then
2582   set x $ld_switch_system; shift; ld_switch_system=""
2583   while test -n "$1"; do
2584     case $1 in
2585       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2586       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2587       -Xlinker* ) ;;
2588       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2589     esac
2590     shift
2591   done
2592 fi
2593
2594 if test "$GCC" = "yes"; then
2595   set x $ld_switch_machine; shift; ld_switch_machine=""
2596   while test -n "$1"; do
2597     case $1 in
2598       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2599       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2600       -Xlinker* ) ;;
2601       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2602     esac
2603     shift
2604   done
2605 fi
2606
2607 if test "$GCC" = "yes"; then
2608   set x $LDFLAGS; shift; LDFLAGS=""
2609   while test -n "$1"; do
2610     case $1 in
2611       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2612       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2613       -Xlinker* ) ;;
2614       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2615     esac
2616     shift
2617   done
2618 fi
2619
2620 if test "$GCC" = "yes"; then
2621   set x $ld_call_shared; shift; ld_call_shared=""
2622   while test -n "$1"; do
2623     case $1 in
2624       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2625       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2626       -Xlinker* ) ;;
2627       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2628     esac
2629     shift
2630   done
2631 fi
2632
2633 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2634    echo "    xemacs will be linked with \"$objects_machine\""
2635  fi
2636 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2637    echo "    xemacs will be linked with \"$objects_system\""
2638  fi
2639 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2640    echo "    xemacs will be linked with \"$unexec\""
2641  fi
2642
2643 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2644 echo "configure:2645: checking for dynodump" >&5
2645 if test "$unexec" != "unexsol2.o"; then
2646   echo "$ac_t""no" 1>&6
2647 else
2648   echo "$ac_t""yes" 1>&6
2649   { test "$extra_verbose" = "yes" && cat << \EOF
2650     Defining DYNODUMP
2651 EOF
2652 cat >> confdefs.h <<\EOF
2653 #define DYNODUMP 1
2654 EOF
2655 }
2656
2657   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2658   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2659   case "$machine" in
2660     sparc   ) dynodump_arch=sparc ;;
2661     *86*    ) dynodump_arch=i386  ;;
2662     powerpc ) dynodump_arch=ppc   ;;
2663   esac
2664     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
2665 fi
2666
2667
2668 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2669
2670 if test "$unexec" = "unexaix.o"; then
2671   if   test "$dynamic" = "no"; then
2672   start_flags="-Wl,-bnso,-bnodelcsect"
2673   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2674   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2675     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2676   done
2677   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2678     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2679   done
2680   
2681 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2682 echo "configure:2683: checking for terminateAndUnload in -lC" >&5
2683 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2684
2685 xe_check_libs=" -lC "
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 /* Override any gcc2 internal prototype to avoid an error.  */
2690 /* We use char because int might match the return type of a gcc2
2691     builtin and then its argument prototype would still apply.  */
2692 char terminateAndUnload();
2693
2694 int main() {
2695 terminateAndUnload()
2696 ; return 0; }
2697 EOF
2698 if { (eval echo configure:2699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2699   rm -rf conftest*
2700   eval "ac_cv_lib_$ac_lib_var=yes"
2701 else
2702   echo "configure: failed program was:" >&5
2703   cat conftest.$ac_ext >&5
2704   rm -rf conftest*
2705   eval "ac_cv_lib_$ac_lib_var=no"
2706 fi
2707 rm -f conftest*
2708 xe_check_libs=""
2709
2710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2711   echo "$ac_t""yes" 1>&6
2712   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2713 else
2714   echo "$ac_t""no" 1>&6
2715 fi
2716
2717
2718   fi
2719 elif test -n "$ld_text_start_addr"; then
2720   start_flags="-T $ld_text_start_addr -e __start"
2721 fi
2722
2723
2724
2725
2726 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2727  test -z "$linker" &&  linker='$(CC) -nostdlib'
2728  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2729 fi
2730 test "$GCC" != "yes" && lib_gcc=
2731
2732
2733
2734
2735
2736 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2737 if test -n "$site_libraries"; then
2738   for arg in $site_libraries; do
2739     case "$arg" in
2740      -* ) ;;
2741      * ) test -d "$arg" || \
2742            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2743        arg="-L${arg}" ;;
2744     esac
2745     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2746   done
2747 fi
2748
2749 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2750 if test -n "$site_includes"; then
2751   for arg in $site_includes; do
2752     case "$arg" in
2753       -* ) ;;
2754       * ) test -d "$arg" || \
2755            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2756       arg="-I${arg}" ;;
2757     esac
2758     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2759   done
2760 fi
2761
2762 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2763 if test -n "$site_prefixes"; then
2764   for dir in $site_prefixes; do
2765     lib_dir="${dir}/lib"
2766     inc_dir="${dir}/include"
2767     if test ! -d "$dir"; then
2768       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2769     elif test ! -d "$lib_dir"; then
2770       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2771     else
2772       if test -d "$inc_dir"; then
2773         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
2774       fi
2775       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
2776     fi
2777   done
2778 fi
2779
2780
2781 for dir in "/usr/ccs/lib"; do
2782   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
2783 done
2784
2785 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2786 if test -n "$site_runtime_libraries"; then
2787   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2788   export LD_RUN_PATH
2789 fi
2790
2791
2792 if   test "$dynamic" = "no"; then add_runtime_path=no
2793 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2794 else case "$opsys" in
2795        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2796        * ) add_runtime_path=no ;;
2797      esac
2798 fi
2799
2800 if test "$add_runtime_path" = "yes"; then
2801       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2802 echo "configure:2803: checking "for runtime libraries flag"" >&5
2803   case "$opsys" in
2804     sol2 ) dash_r="-R" ;;
2805     decosf* | linux* | irix*) dash_r="-rpath " ;;
2806     *)
2807       dash_r=""
2808       for try_dash_r in "-R" "-R " "-rpath "; do
2809         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2810         
2811 if test "$GCC" = "yes"; then
2812   set x $xe_check_libs; shift; xe_check_libs=""
2813   while test -n "$1"; do
2814     case $1 in
2815       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2816       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2817       -Xlinker* ) ;;
2818       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2819     esac
2820     shift
2821   done
2822 fi
2823         cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 #include "confdefs.h"
2826
2827 int main() {
2828
2829 ; return 0; }
2830 EOF
2831 if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2832   rm -rf conftest*
2833   dash_r="$try_dash_r"
2834 else
2835   echo "configure: failed program was:" >&5
2836   cat conftest.$ac_ext >&5
2837 fi
2838 rm -f conftest*
2839         xe_check_libs=""
2840         test -n "$dash_r" && break
2841       done ;;
2842   esac
2843   if test -n "$dash_r";
2844     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2845     else echo "$ac_t""NONE" 1>&6
2846   fi
2847 fi
2848
2849 xe_add_unique_runpath_dir='
2850   xe_add_p=yes
2851   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2852   done
2853   if test "$xe_add_p" = "yes"; then
2854     test -n "$runpath" && runpath="${runpath}:"
2855     runpath="${runpath}${xe_runpath_dir}"
2856     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2857   fi'
2858
2859
2860
2861
2862 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2863     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2864   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2865   
2866         runpath="" runpath_dirs=""
2867   if test -n "$LD_RUN_PATH"; then
2868     runpath="$LD_RUN_PATH"
2869   elif test "$GCC" = "yes"; then
2870         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2871     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2872     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2873     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2874       case "$arg" in P,* | -L* | -R* )
2875         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2876           {
2877 xe_runpath_dir="$dir"
2878   test "$xe_runpath_dir" != "/lib"     -a \
2879         "$xe_runpath_dir" != "/usr/lib" -a \
2880         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2881   eval "$xe_add_unique_runpath_dir"
2882 }
2883         done ;;
2884       esac
2885     done
2886     ld_switch_run="$ld_switch_run_save"
2887     rm -f conftest*
2888   else
2889         for arg in $ld_switch_site $ld_switch_x_site; do
2890       case "$arg" in -L*) {
2891 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2892   test "$xe_runpath_dir" != "/lib"     -a \
2893         "$xe_runpath_dir" != "/usr/lib" -a \
2894         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2895   eval "$xe_add_unique_runpath_dir"
2896 };; esac
2897     done
2898         if test "$opsys $need_motif" = "sol2 yes"; then
2899       xe_runpath_dir="/opt/SUNWdt/lib";
2900       eval "$xe_add_unique_runpath_dir";
2901     fi
2902   fi 
2903   if test -n "$runpath"; then
2904     ld_switch_run="${dash_r}${runpath}"
2905     
2906 if test "$GCC" = "yes"; then
2907   set x $ld_switch_run; shift; ld_switch_run=""
2908   while test -n "$1"; do
2909     case $1 in
2910       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2911       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2912       -Xlinker* ) ;;
2913       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2914     esac
2915     shift
2916   done
2917 fi
2918     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2919   fi
2920 fi
2921
2922
2923
2924
2925 GNU_MALLOC=yes
2926 if test "$with_dlmalloc" != "no"; then
2927         doug_lea_malloc=yes
2928 else
2929         doug_lea_malloc=no
2930 fi
2931 after_morecore_hook_exists=yes
2932 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2933 echo "configure:2934: checking for malloc_get_state" >&5
2934
2935 cat > conftest.$ac_ext <<EOF
2936 #line 2937 "configure"
2937 #include "confdefs.h"
2938 /* System header to define __stub macros and hopefully few prototypes,
2939     which can conflict with char malloc_get_state(); below.  */
2940 #include <assert.h>
2941 /* Override any gcc2 internal prototype to avoid an error.  */
2942 /* We use char because int might match the return type of a gcc2
2943     builtin and then its argument prototype would still apply.  */
2944 char malloc_get_state();
2945
2946 int main() {
2947
2948 /* The GNU C library defines this for functions which it implements
2949     to always fail with ENOSYS.  Some functions are actually named
2950     something starting with __ and the normal name is an alias.  */
2951 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2952 choke me
2953 #else
2954 malloc_get_state();
2955 #endif
2956
2957 ; return 0; }
2958 EOF
2959 if { (eval echo configure:2960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2960   rm -rf conftest*
2961   eval "ac_cv_func_malloc_get_state=yes"
2962 else
2963   echo "configure: failed program was:" >&5
2964   cat conftest.$ac_ext >&5
2965   rm -rf conftest*
2966   eval "ac_cv_func_malloc_get_state=no"
2967 fi
2968 rm -f conftest*
2969
2970 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2971   echo "$ac_t""yes" 1>&6
2972   :
2973 else
2974   echo "$ac_t""no" 1>&6
2975 doug_lea_malloc=no
2976 fi
2977
2978 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2979 echo "configure:2980: checking for malloc_set_state" >&5
2980
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 /* System header to define __stub macros and hopefully few prototypes,
2985     which can conflict with char malloc_set_state(); below.  */
2986 #include <assert.h>
2987 /* Override any gcc2 internal prototype to avoid an error.  */
2988 /* We use char because int might match the return type of a gcc2
2989     builtin and then its argument prototype would still apply.  */
2990 char malloc_set_state();
2991
2992 int main() {
2993
2994 /* The GNU C library defines this for functions which it implements
2995     to always fail with ENOSYS.  Some functions are actually named
2996     something starting with __ and the normal name is an alias.  */
2997 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2998 choke me
2999 #else
3000 malloc_set_state();
3001 #endif
3002
3003 ; return 0; }
3004 EOF
3005 if { (eval echo configure:3006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3006   rm -rf conftest*
3007   eval "ac_cv_func_malloc_set_state=yes"
3008 else
3009   echo "configure: failed program was:" >&5
3010   cat conftest.$ac_ext >&5
3011   rm -rf conftest*
3012   eval "ac_cv_func_malloc_set_state=no"
3013 fi
3014 rm -f conftest*
3015
3016 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3017   echo "$ac_t""yes" 1>&6
3018   :
3019 else
3020   echo "$ac_t""no" 1>&6
3021 doug_lea_malloc=no
3022 fi
3023
3024 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3025 echo "configure:3026: checking whether __after_morecore_hook exists" >&5
3026 cat > conftest.$ac_ext <<EOF
3027 #line 3028 "configure"
3028 #include "confdefs.h"
3029 extern void (* __after_morecore_hook)();
3030 int main() {
3031 __after_morecore_hook = 0
3032 ; return 0; }
3033 EOF
3034 if { (eval echo configure:3035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3035   rm -rf conftest*
3036   echo "$ac_t""yes" 1>&6
3037 else
3038   echo "configure: failed program was:" >&5
3039   cat conftest.$ac_ext >&5
3040   rm -rf conftest*
3041   echo "$ac_t""no" 1>&6
3042    after_morecore_hook_exists=no
3043 fi
3044 rm -f conftest*
3045 if test "$system_malloc" = "yes" ; then
3046   GNU_MALLOC=no
3047   GNU_MALLOC_reason="
3048   (The GNU allocators don't work with this system configuration)."
3049 elif test "$with_system_malloc" = "yes" ; then
3050   GNU_MALLOC=no
3051   GNU_MALLOC_reason="
3052   (User chose not to use GNU allocators)."
3053 elif test "$with_debug_malloc" = "yes" ; then
3054   GNU_MALLOC=no
3055   GNU_MALLOC_reason="
3056   (User chose to use Debugging Malloc)."
3057 fi
3058
3059 if test "$doug_lea_malloc" = "yes" ; then
3060   if test "$GNU_MALLOC" = yes ; then
3061     GNU_MALLOC_reason="
3062   (Using Doug Lea's new malloc from the GNU C Library.)"
3063   fi
3064   { test "$extra_verbose" = "yes" && cat << \EOF
3065     Defining DOUG_LEA_MALLOC
3066 EOF
3067 cat >> confdefs.h <<\EOF
3068 #define DOUG_LEA_MALLOC 1
3069 EOF
3070 }
3071
3072   if test "$after_morecore_hook_exists" = "no" ; then
3073     GNU_MALLOC_reason="
3074   (Using Doug Lea's new malloc from the Linux C Library.)"
3075     { test "$extra_verbose" = "yes" && cat << \EOF
3076     Defining _NO_MALLOC_WARNING_
3077 EOF
3078 cat >> confdefs.h <<\EOF
3079 #define _NO_MALLOC_WARNING_ 1
3080 EOF
3081 }
3082
3083   fi
3084   use_minimal_tagbits=yes
3085 fi
3086
3087
3088
3089
3090 # Extract the first word of "ranlib", so it can be a program name with args.
3091 set dummy ranlib; ac_word=$2
3092 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3093 echo "configure:3094: checking for $ac_word" >&5
3094
3095 if test -n "$RANLIB"; then
3096   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3097 else
3098   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3099   ac_dummy="$PATH"
3100   for ac_dir in $ac_dummy; do
3101     test -z "$ac_dir" && ac_dir=.
3102     if test -f $ac_dir/$ac_word; then
3103       ac_cv_prog_RANLIB="ranlib"
3104       break
3105     fi
3106   done
3107   IFS="$ac_save_ifs"
3108   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3109 fi
3110 RANLIB="$ac_cv_prog_RANLIB"
3111 if test -n "$RANLIB"; then
3112   echo "$ac_t""$RANLIB" 1>&6
3113 else
3114   echo "$ac_t""no" 1>&6
3115 fi
3116
3117 ac_aux_dir=
3118 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3119   if test -f $ac_dir/install-sh; then
3120     ac_aux_dir=$ac_dir
3121     ac_install_sh="$ac_aux_dir/install-sh -c"
3122     break
3123   elif test -f $ac_dir/install.sh; then
3124     ac_aux_dir=$ac_dir
3125     ac_install_sh="$ac_aux_dir/install.sh -c"
3126     break
3127   fi
3128 done
3129 if test -z "$ac_aux_dir"; then
3130   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3131 fi
3132 ac_config_guess=$ac_aux_dir/config.guess
3133 ac_config_sub=$ac_aux_dir/config.sub
3134 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3135
3136 # Find a good install program.  We prefer a C program (faster),
3137 # so one script is as good as another.  But avoid the broken or
3138 # incompatible versions:
3139 # SysV /etc/install, /usr/sbin/install
3140 # SunOS /usr/etc/install
3141 # IRIX /sbin/install
3142 # AIX /bin/install
3143 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3144 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3145 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3146 # ./install, which can be erroneously created by make from ./install.sh.
3147 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3148 echo "configure:3149: checking for a BSD compatible install" >&5
3149 if test -z "$INSTALL"; then
3150
3151   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3152   for ac_dir in $PATH; do
3153     # Account for people who put trailing slashes in PATH elements.
3154     case "$ac_dir/" in
3155     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3156     *)
3157       # OSF1 and SCO ODT 3.0 have their own names for install.
3158       # Don't use installbsd from OSF since it installs stuff as root
3159       # by default.
3160       for ac_prog in ginstall scoinst install; do
3161         if test -f $ac_dir/$ac_prog; then
3162           if test $ac_prog = install &&
3163             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3164             # AIX install.  It has an incompatible calling convention.
3165             :
3166           else
3167             ac_cv_path_install="$ac_dir/$ac_prog -c"
3168             break 2
3169           fi
3170         fi
3171       done
3172       ;;
3173     esac
3174   done
3175   IFS="$ac_save_IFS"
3176
3177   if test "${ac_cv_path_install+set}" = set; then
3178     INSTALL="$ac_cv_path_install"
3179   else
3180     # As a last resort, use the slow shell script.  We don't cache a
3181     # path for INSTALL within a source directory, because that will
3182     # break other packages using the cache if that directory is
3183     # removed, or if the path is relative.
3184     INSTALL="$ac_install_sh"
3185   fi
3186 fi
3187 echo "$ac_t""$INSTALL" 1>&6
3188
3189 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3190 # It thinks the first close brace ends the variable substitution.
3191 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3192
3193 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3194
3195 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3196
3197 for ac_prog in 'bison -y' byacc
3198 do
3199 # Extract the first word of "$ac_prog", so it can be a program name with args.
3200 set dummy $ac_prog; ac_word=$2
3201 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3202 echo "configure:3203: checking for $ac_word" >&5
3203
3204 if test -n "$YACC"; then
3205   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3206 else
3207   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3208   ac_dummy="$PATH"
3209   for ac_dir in $ac_dummy; do
3210     test -z "$ac_dir" && ac_dir=.
3211     if test -f $ac_dir/$ac_word; then
3212       ac_cv_prog_YACC="$ac_prog"
3213       break
3214     fi
3215   done
3216   IFS="$ac_save_ifs"
3217 fi
3218 YACC="$ac_cv_prog_YACC"
3219 if test -n "$YACC"; then
3220   echo "$ac_t""$YACC" 1>&6
3221 else
3222   echo "$ac_t""no" 1>&6
3223 fi
3224
3225 test -n "$YACC" && break
3226 done
3227 test -n "$YACC" || YACC="yacc"
3228
3229
3230 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3231 do
3232 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3233 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3234 echo "configure:3235: checking for $ac_hdr" >&5
3235
3236 cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239 #include <$ac_hdr>
3240 EOF
3241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3242 { (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3244 if test -z "$ac_err"; then
3245   rm -rf conftest*
3246   eval "ac_cv_header_$ac_safe=yes"
3247 else
3248   echo "$ac_err" >&5
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   eval "ac_cv_header_$ac_safe=no"
3253 fi
3254 rm -f conftest*
3255 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3256   echo "$ac_t""yes" 1>&6
3257     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3258   { test "$extra_verbose" = "yes" && cat << EOF
3259     Defining $ac_tr_hdr
3260 EOF
3261 cat >> confdefs.h <<EOF
3262 #define $ac_tr_hdr 1
3263 EOF
3264 }
3265  
3266 else
3267   echo "$ac_t""no" 1>&6
3268 fi
3269 done
3270
3271 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3272 do
3273 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3274 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3275 echo "configure:3276: checking for $ac_hdr" >&5
3276
3277 cat > conftest.$ac_ext <<EOF
3278 #line 3279 "configure"
3279 #include "confdefs.h"
3280 #include <$ac_hdr>
3281 EOF
3282 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3283 { (eval echo configure:3284: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3284 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3285 if test -z "$ac_err"; then
3286   rm -rf conftest*
3287   eval "ac_cv_header_$ac_safe=yes"
3288 else
3289   echo "$ac_err" >&5
3290   echo "configure: failed program was:" >&5
3291   cat conftest.$ac_ext >&5
3292   rm -rf conftest*
3293   eval "ac_cv_header_$ac_safe=no"
3294 fi
3295 rm -f conftest*
3296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3297   echo "$ac_t""yes" 1>&6
3298     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3299   { test "$extra_verbose" = "yes" && cat << EOF
3300     Defining $ac_tr_hdr
3301 EOF
3302 cat >> confdefs.h <<EOF
3303 #define $ac_tr_hdr 1
3304 EOF
3305 }
3306  
3307 else
3308   echo "$ac_t""no" 1>&6
3309 fi
3310 done
3311
3312 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3313 do
3314 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3315 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3316 echo "configure:3317: checking for $ac_hdr" >&5
3317
3318 cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <$ac_hdr>
3322 EOF
3323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3324 { (eval echo configure:3325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3326 if test -z "$ac_err"; then
3327   rm -rf conftest*
3328   eval "ac_cv_header_$ac_safe=yes"
3329 else
3330   echo "$ac_err" >&5
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   eval "ac_cv_header_$ac_safe=no"
3335 fi
3336 rm -f conftest*
3337 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3338   echo "$ac_t""yes" 1>&6
3339     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3340   { test "$extra_verbose" = "yes" && cat << EOF
3341     Defining $ac_tr_hdr
3342 EOF
3343 cat >> confdefs.h <<EOF
3344 #define $ac_tr_hdr 1
3345 EOF
3346 }
3347  
3348 else
3349   echo "$ac_t""no" 1>&6
3350 fi
3351 done
3352
3353 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3354 echo "configure:3355: checking for sys/wait.h that is POSIX.1 compatible" >&5
3355
3356 cat > conftest.$ac_ext <<EOF
3357 #line 3358 "configure"
3358 #include "confdefs.h"
3359 #include <sys/types.h>
3360 #include <sys/wait.h>
3361 #ifndef WEXITSTATUS
3362 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3363 #endif
3364 #ifndef WIFEXITED
3365 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3366 #endif
3367 int main() {
3368 int s;
3369 wait (&s);
3370 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3371 ; return 0; }
3372 EOF
3373 if { (eval echo configure:3374: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3374   rm -rf conftest*
3375   ac_cv_header_sys_wait_h=yes
3376 else
3377   echo "configure: failed program was:" >&5
3378   cat conftest.$ac_ext >&5
3379   rm -rf conftest*
3380   ac_cv_header_sys_wait_h=no
3381 fi
3382 rm -f conftest*
3383
3384 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3385 if test $ac_cv_header_sys_wait_h = yes; then
3386   { test "$extra_verbose" = "yes" && cat << \EOF
3387     Defining HAVE_SYS_WAIT_H
3388 EOF
3389 cat >> confdefs.h <<\EOF
3390 #define HAVE_SYS_WAIT_H 1
3391 EOF
3392 }
3393
3394 fi
3395
3396 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3397 echo "configure:3398: checking for ANSI C header files" >&5
3398
3399 cat > conftest.$ac_ext <<EOF
3400 #line 3401 "configure"
3401 #include "confdefs.h"
3402 #include <stdlib.h>
3403 #include <stdarg.h>
3404 #include <string.h>
3405 #include <float.h>
3406 EOF
3407 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3408 { (eval echo configure:3409: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3409 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3410 if test -z "$ac_err"; then
3411   rm -rf conftest*
3412   ac_cv_header_stdc=yes
3413 else
3414   echo "$ac_err" >&5
3415   echo "configure: failed program was:" >&5
3416   cat conftest.$ac_ext >&5
3417   rm -rf conftest*
3418   ac_cv_header_stdc=no
3419 fi
3420 rm -f conftest*
3421
3422 if test $ac_cv_header_stdc = yes; then
3423   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3424 cat > conftest.$ac_ext <<EOF
3425 #line 3426 "configure"
3426 #include "confdefs.h"
3427 #include <string.h>
3428 EOF
3429 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3430   egrep "memchr" >/dev/null 2>&1; then
3431   :
3432 else
3433   rm -rf conftest*
3434   ac_cv_header_stdc=no
3435 fi
3436 rm -f conftest*
3437
3438 fi
3439
3440 if test $ac_cv_header_stdc = yes; then
3441   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3442 cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445 #include <stdlib.h>
3446 EOF
3447 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3448   egrep "free" >/dev/null 2>&1; then
3449   :
3450 else
3451   rm -rf conftest*
3452   ac_cv_header_stdc=no
3453 fi
3454 rm -f conftest*
3455
3456 fi
3457
3458 if test $ac_cv_header_stdc = yes; then
3459   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3460 cat > conftest.$ac_ext <<EOF
3461 #line 3462 "configure"
3462 #include "confdefs.h"
3463 #include <ctype.h>
3464 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3465 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3466 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3467 int main () { int i; for (i = 0; i < 256; i++)
3468 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3469 exit (0); }
3470
3471 EOF
3472 if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3473 then
3474   :
3475 else
3476   conftest_rc="$?"
3477   echo "configure: failed program was:" >&5
3478   cat conftest.$ac_ext >&5
3479   rm -fr conftest*
3480   ac_cv_header_stdc=no
3481 fi
3482 rm -fr conftest*
3483 fi
3484
3485 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3486 if test $ac_cv_header_stdc = yes; then
3487   { test "$extra_verbose" = "yes" && cat << \EOF
3488     Defining STDC_HEADERS
3489 EOF
3490 cat >> confdefs.h <<\EOF
3491 #define STDC_HEADERS 1
3492 EOF
3493 }
3494
3495 fi
3496
3497 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3498 echo "configure:3499: checking whether time.h and sys/time.h may both be included" >&5
3499
3500 cat > conftest.$ac_ext <<EOF
3501 #line 3502 "configure"
3502 #include "confdefs.h"
3503 #include <sys/types.h>
3504 #include <sys/time.h>
3505 #include <time.h>
3506 int main() {
3507 struct tm *tp;
3508 ; return 0; }
3509 EOF
3510 if { (eval echo configure:3511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3511   rm -rf conftest*
3512   ac_cv_header_time=yes
3513 else
3514   echo "configure: failed program was:" >&5
3515   cat conftest.$ac_ext >&5
3516   rm -rf conftest*
3517   ac_cv_header_time=no
3518 fi
3519 rm -f conftest*
3520
3521 echo "$ac_t""$ac_cv_header_time" 1>&6
3522 if test $ac_cv_header_time = yes; then
3523   { test "$extra_verbose" = "yes" && cat << \EOF
3524     Defining TIME_WITH_SYS_TIME
3525 EOF
3526 cat >> confdefs.h <<\EOF
3527 #define TIME_WITH_SYS_TIME 1
3528 EOF
3529 }
3530
3531 fi
3532
3533 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3534 echo "configure:3535: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3535
3536 cat > conftest.$ac_ext <<EOF
3537 #line 3538 "configure"
3538 #include "confdefs.h"
3539 #include <sys/types.h>
3540 #include <signal.h>
3541 /* NetBSD declares sys_siglist in unistd.h.  */
3542 #ifdef HAVE_UNISTD_H
3543 #include <unistd.h>
3544 #endif
3545 int main() {
3546 char *msg = *(sys_siglist + 1);
3547 ; return 0; }
3548 EOF
3549 if { (eval echo configure:3550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3550   rm -rf conftest*
3551   ac_cv_decl_sys_siglist=yes
3552 else
3553   echo "configure: failed program was:" >&5
3554   cat conftest.$ac_ext >&5
3555   rm -rf conftest*
3556   ac_cv_decl_sys_siglist=no
3557 fi
3558 rm -f conftest*
3559
3560 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3561 if test $ac_cv_decl_sys_siglist = yes; then
3562   { test "$extra_verbose" = "yes" && cat << \EOF
3563     Defining SYS_SIGLIST_DECLARED
3564 EOF
3565 cat >> confdefs.h <<\EOF
3566 #define SYS_SIGLIST_DECLARED 1
3567 EOF
3568 }
3569
3570 fi
3571
3572
3573 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3574 echo "configure:3575: checking for struct utimbuf" >&5
3575 cat > conftest.$ac_ext <<EOF
3576 #line 3577 "configure"
3577 #include "confdefs.h"
3578 #ifdef TIME_WITH_SYS_TIME
3579 #include <sys/time.h>
3580 #include <time.h>
3581 #else
3582 #ifdef HAVE_SYS_TIME_H
3583 #include <sys/time.h>
3584 #else
3585 #include <time.h>
3586 #endif
3587 #endif
3588 #ifdef HAVE_UTIME_H
3589 #include <utime.h>
3590 #endif
3591 int main() {
3592 static struct utimbuf x; x.actime = x.modtime;
3593 ; return 0; }
3594 EOF
3595 if { (eval echo configure:3596: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3596   rm -rf conftest*
3597   echo "$ac_t""yes" 1>&6
3598    { test "$extra_verbose" = "yes" && cat << \EOF
3599     Defining HAVE_STRUCT_UTIMBUF
3600 EOF
3601 cat >> confdefs.h <<\EOF
3602 #define HAVE_STRUCT_UTIMBUF 1
3603 EOF
3604 }
3605
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   echo "$ac_t""no" 1>&6
3611 fi
3612 rm -f conftest*
3613
3614 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3615 echo "configure:3616: checking return type of signal handlers" >&5
3616
3617 cat > conftest.$ac_ext <<EOF
3618 #line 3619 "configure"
3619 #include "confdefs.h"
3620 #include <sys/types.h>
3621 #include <signal.h>
3622 #ifdef signal
3623 #undef signal
3624 #endif
3625 #ifdef __cplusplus
3626 extern "C" void (*signal (int, void (*)(int)))(int);
3627 #else
3628 void (*signal ()) ();
3629 #endif
3630
3631 int main() {
3632 int i;
3633 ; return 0; }
3634 EOF
3635 if { (eval echo configure:3636: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3636   rm -rf conftest*
3637   ac_cv_type_signal=void
3638 else
3639   echo "configure: failed program was:" >&5
3640   cat conftest.$ac_ext >&5
3641   rm -rf conftest*
3642   ac_cv_type_signal=int
3643 fi
3644 rm -f conftest*
3645
3646 echo "$ac_t""$ac_cv_type_signal" 1>&6
3647 { test "$extra_verbose" = "yes" && cat << EOF
3648     Defining RETSIGTYPE = $ac_cv_type_signal
3649 EOF
3650 cat >> confdefs.h <<EOF
3651 #define RETSIGTYPE $ac_cv_type_signal
3652 EOF
3653 }
3654
3655
3656 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3657 echo "configure:3658: checking for size_t" >&5
3658
3659 cat > conftest.$ac_ext <<EOF
3660 #line 3661 "configure"
3661 #include "confdefs.h"
3662 #include <sys/types.h>
3663 #if STDC_HEADERS
3664 #include <stdlib.h>
3665 #include <stddef.h>
3666 #endif
3667 EOF
3668 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3669   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3670   rm -rf conftest*
3671   ac_cv_type_size_t=yes
3672 else
3673   rm -rf conftest*
3674   ac_cv_type_size_t=no
3675 fi
3676 rm -f conftest*
3677
3678 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3679 if test $ac_cv_type_size_t = no; then
3680   { test "$extra_verbose" = "yes" && cat << \EOF
3681     Defining size_t = unsigned
3682 EOF
3683 cat >> confdefs.h <<\EOF
3684 #define size_t unsigned
3685 EOF
3686 }
3687
3688 fi
3689
3690 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3691 echo "configure:3692: checking for pid_t" >&5
3692
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <sys/types.h>
3697 #if STDC_HEADERS
3698 #include <stdlib.h>
3699 #include <stddef.h>
3700 #endif
3701 EOF
3702 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3703   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3704   rm -rf conftest*
3705   ac_cv_type_pid_t=yes
3706 else
3707   rm -rf conftest*
3708   ac_cv_type_pid_t=no
3709 fi
3710 rm -f conftest*
3711
3712 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3713 if test $ac_cv_type_pid_t = no; then
3714   { test "$extra_verbose" = "yes" && cat << \EOF
3715     Defining pid_t = int
3716 EOF
3717 cat >> confdefs.h <<\EOF
3718 #define pid_t int
3719 EOF
3720 }
3721
3722 fi
3723
3724 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3725 echo "configure:3726: checking for uid_t in sys/types.h" >&5
3726
3727 cat > conftest.$ac_ext <<EOF
3728 #line 3729 "configure"
3729 #include "confdefs.h"
3730 #include <sys/types.h>
3731 EOF
3732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3733   egrep "uid_t" >/dev/null 2>&1; then
3734   rm -rf conftest*
3735   ac_cv_type_uid_t=yes
3736 else
3737   rm -rf conftest*
3738   ac_cv_type_uid_t=no
3739 fi
3740 rm -f conftest*
3741
3742
3743 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3744 if test $ac_cv_type_uid_t = no; then
3745   { test "$extra_verbose" = "yes" && cat << \EOF
3746     Defining uid_t = int
3747 EOF
3748 cat >> confdefs.h <<\EOF
3749 #define uid_t int
3750 EOF
3751 }
3752
3753   { test "$extra_verbose" = "yes" && cat << \EOF
3754     Defining gid_t = int
3755 EOF
3756 cat >> confdefs.h <<\EOF
3757 #define gid_t int
3758 EOF
3759 }
3760
3761 fi
3762
3763 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3764 echo "configure:3765: checking for mode_t" >&5
3765
3766 cat > conftest.$ac_ext <<EOF
3767 #line 3768 "configure"
3768 #include "confdefs.h"
3769 #include <sys/types.h>
3770 #if STDC_HEADERS
3771 #include <stdlib.h>
3772 #include <stddef.h>
3773 #endif
3774 EOF
3775 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3776   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3777   rm -rf conftest*
3778   ac_cv_type_mode_t=yes
3779 else
3780   rm -rf conftest*
3781   ac_cv_type_mode_t=no
3782 fi
3783 rm -f conftest*
3784
3785 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3786 if test $ac_cv_type_mode_t = no; then
3787   { test "$extra_verbose" = "yes" && cat << \EOF
3788     Defining mode_t = int
3789 EOF
3790 cat >> confdefs.h <<\EOF
3791 #define mode_t int
3792 EOF
3793 }
3794
3795 fi
3796
3797 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3798 echo "configure:3799: checking for off_t" >&5
3799
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3803 #include <sys/types.h>
3804 #if STDC_HEADERS
3805 #include <stdlib.h>
3806 #include <stddef.h>
3807 #endif
3808 EOF
3809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3810   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3811   rm -rf conftest*
3812   ac_cv_type_off_t=yes
3813 else
3814   rm -rf conftest*
3815   ac_cv_type_off_t=no
3816 fi
3817 rm -f conftest*
3818
3819 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3820 if test $ac_cv_type_off_t = no; then
3821   { test "$extra_verbose" = "yes" && cat << \EOF
3822     Defining off_t = long
3823 EOF
3824 cat >> confdefs.h <<\EOF
3825 #define off_t long
3826 EOF
3827 }
3828
3829 fi
3830
3831 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3832 echo "configure:3833: checking for ssize_t" >&5
3833
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 #include <sys/types.h>
3838 #if STDC_HEADERS
3839 #include <stdlib.h>
3840 #include <stddef.h>
3841 #endif
3842 EOF
3843 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3844   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3845   rm -rf conftest*
3846   ac_cv_type_ssize_t=yes
3847 else
3848   rm -rf conftest*
3849   ac_cv_type_ssize_t=no
3850 fi
3851 rm -f conftest*
3852
3853 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3854 if test $ac_cv_type_ssize_t = no; then
3855   { test "$extra_verbose" = "yes" && cat << \EOF
3856     Defining ssize_t = int
3857 EOF
3858 cat >> confdefs.h <<\EOF
3859 #define ssize_t int
3860 EOF
3861 }
3862
3863 fi
3864
3865
3866 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3867 echo "configure:3868: checking for struct timeval" >&5
3868 cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #ifdef TIME_WITH_SYS_TIME
3872 #include <sys/time.h>
3873 #include <time.h>
3874 #else
3875 #ifdef HAVE_SYS_TIME_H
3876 #include <sys/time.h>
3877 #else
3878 #include <time.h>
3879 #endif
3880 #endif
3881 int main() {
3882 static struct timeval x; x.tv_sec = x.tv_usec;
3883 ; return 0; }
3884 EOF
3885 if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3886   rm -rf conftest*
3887   echo "$ac_t""yes" 1>&6
3888   HAVE_TIMEVAL=yes
3889   { test "$extra_verbose" = "yes" && cat << \EOF
3890     Defining HAVE_TIMEVAL
3891 EOF
3892 cat >> confdefs.h <<\EOF
3893 #define HAVE_TIMEVAL 1
3894 EOF
3895 }
3896
3897 else
3898   echo "configure: failed program was:" >&5
3899   cat conftest.$ac_ext >&5
3900   rm -rf conftest*
3901   echo "$ac_t""no" 1>&6
3902    HAVE_TIMEVAL=no
3903 fi
3904 rm -f conftest*
3905
3906 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3907 echo "configure:3908: checking whether struct tm is in sys/time.h or time.h" >&5
3908
3909 cat > conftest.$ac_ext <<EOF
3910 #line 3911 "configure"
3911 #include "confdefs.h"
3912 #include <sys/types.h>
3913 #include <time.h>
3914 int main() {
3915 struct tm *tp; tp->tm_sec;
3916 ; return 0; }
3917 EOF
3918 if { (eval echo configure:3919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3919   rm -rf conftest*
3920   ac_cv_struct_tm=time.h
3921 else
3922   echo "configure: failed program was:" >&5
3923   cat conftest.$ac_ext >&5
3924   rm -rf conftest*
3925   ac_cv_struct_tm=sys/time.h
3926 fi
3927 rm -f conftest*
3928
3929 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3930 if test $ac_cv_struct_tm = sys/time.h; then
3931   { test "$extra_verbose" = "yes" && cat << \EOF
3932     Defining TM_IN_SYS_TIME
3933 EOF
3934 cat >> confdefs.h <<\EOF
3935 #define TM_IN_SYS_TIME 1
3936 EOF
3937 }
3938
3939 fi
3940
3941 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3942 echo "configure:3943: checking for tm_zone in struct tm" >&5
3943
3944 cat > conftest.$ac_ext <<EOF
3945 #line 3946 "configure"
3946 #include "confdefs.h"
3947 #include <sys/types.h>
3948 #include <$ac_cv_struct_tm>
3949 int main() {
3950 struct tm tm; tm.tm_zone;
3951 ; return 0; }
3952 EOF
3953 if { (eval echo configure:3954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3954   rm -rf conftest*
3955   ac_cv_struct_tm_zone=yes
3956 else
3957   echo "configure: failed program was:" >&5
3958   cat conftest.$ac_ext >&5
3959   rm -rf conftest*
3960   ac_cv_struct_tm_zone=no
3961 fi
3962 rm -f conftest*
3963
3964 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3965 if test "$ac_cv_struct_tm_zone" = yes; then
3966   { test "$extra_verbose" = "yes" && cat << \EOF
3967     Defining HAVE_TM_ZONE
3968 EOF
3969 cat >> confdefs.h <<\EOF
3970 #define HAVE_TM_ZONE 1
3971 EOF
3972 }
3973
3974 else
3975   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3976 echo "configure:3977: checking for tzname" >&5
3977
3978 cat > conftest.$ac_ext <<EOF
3979 #line 3980 "configure"
3980 #include "confdefs.h"
3981 #include <time.h>
3982 #ifndef tzname /* For SGI.  */
3983 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3984 #endif
3985 int main() {
3986 atoi(*tzname);
3987 ; return 0; }
3988 EOF
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3990   rm -rf conftest*
3991   ac_cv_var_tzname=yes
3992 else
3993   echo "configure: failed program was:" >&5
3994   cat conftest.$ac_ext >&5
3995   rm -rf conftest*
3996   ac_cv_var_tzname=no
3997 fi
3998 rm -f conftest*
3999
4000 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4001   if test $ac_cv_var_tzname = yes; then
4002     { test "$extra_verbose" = "yes" && cat << \EOF
4003     Defining HAVE_TZNAME
4004 EOF
4005 cat >> confdefs.h <<\EOF
4006 #define HAVE_TZNAME 1
4007 EOF
4008 }
4009
4010   fi
4011 fi
4012
4013
4014 echo $ac_n "checking for working const""... $ac_c" 1>&6
4015 echo "configure:4016: checking for working const" >&5
4016
4017 cat > conftest.$ac_ext <<EOF
4018 #line 4019 "configure"
4019 #include "confdefs.h"
4020
4021 int main() {
4022
4023 /* Ultrix mips cc rejects this.  */
4024 typedef int charset[2]; const charset x;
4025 /* SunOS 4.1.1 cc rejects this.  */
4026 char const *const *ccp;
4027 char **p;
4028 /* NEC SVR4.0.2 mips cc rejects this.  */
4029 struct point {int x, y;};
4030 static struct point const zero = {0,0};
4031 /* AIX XL C 1.02.0.0 rejects this.
4032    It does not let you subtract one const X* pointer from another in an arm
4033    of an if-expression whose if-part is not a constant expression */
4034 const char *g = "string";
4035 ccp = &g + (g ? g-g : 0);
4036 /* HPUX 7.0 cc rejects these. */
4037 ++ccp;
4038 p = (char**) ccp;
4039 ccp = (char const *const *) p;
4040 { /* SCO 3.2v4 cc rejects this.  */
4041   char *t;
4042   char const *s = 0 ? (char *) 0 : (char const *) 0;
4043
4044   *t++ = 0;
4045 }
4046 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4047   int x[] = {25, 17};
4048   const int *foo = &x[0];
4049   ++foo;
4050 }
4051 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4052   typedef const int *iptr;
4053   iptr p = 0;
4054   ++p;
4055 }
4056 { /* AIX XL C 1.02.0.0 rejects this saying
4057      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4058   struct s { int j; const int *ap[3]; };
4059   struct s *b; b->j = 5;
4060 }
4061 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4062   const int foo = 10;
4063 }
4064
4065 ; return 0; }
4066 EOF
4067 if { (eval echo configure:4068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4068   rm -rf conftest*
4069   ac_cv_c_const=yes
4070 else
4071   echo "configure: failed program was:" >&5
4072   cat conftest.$ac_ext >&5
4073   rm -rf conftest*
4074   ac_cv_c_const=no
4075 fi
4076 rm -f conftest*
4077
4078 echo "$ac_t""$ac_cv_c_const" 1>&6
4079 if test $ac_cv_c_const = no; then
4080   { test "$extra_verbose" = "yes" && cat << \EOF
4081     Defining const = 
4082 EOF
4083 cat >> confdefs.h <<\EOF
4084 #define const 
4085 EOF
4086 }
4087
4088 fi
4089
4090
4091 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4092 echo "configure:4093: checking whether ${MAKE-make} sets \${MAKE}" >&5
4093 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4094
4095 cat > conftestmake <<\EOF
4096 all:
4097         @echo 'ac_maketemp="${MAKE}"'
4098 EOF
4099 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4100 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4101 if test -n "$ac_maketemp"; then
4102   eval ac_cv_prog_make_${ac_make}_set=yes
4103 else
4104   eval ac_cv_prog_make_${ac_make}_set=no
4105 fi
4106 rm -f conftestmake
4107 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4108   echo "$ac_t""yes" 1>&6
4109   SET_MAKE=
4110 else
4111   echo "$ac_t""no" 1>&6
4112   SET_MAKE="MAKE=${MAKE-make}"
4113 fi
4114
4115
4116 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4117 echo "configure:4118: checking whether byte ordering is bigendian" >&5
4118
4119 ac_cv_c_bigendian=unknown
4120 # See if sys/param.h defines the BYTE_ORDER macro.
4121 cat > conftest.$ac_ext <<EOF
4122 #line 4123 "configure"
4123 #include "confdefs.h"
4124 #include <sys/types.h>
4125 #include <sys/param.h>
4126 int main() {
4127
4128 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4129  bogus endian macros
4130 #endif
4131 ; return 0; }
4132 EOF
4133 if { (eval echo configure:4134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4134   rm -rf conftest*
4135   # It does; now see whether it defined to BIG_ENDIAN or not.
4136 cat > conftest.$ac_ext <<EOF
4137 #line 4138 "configure"
4138 #include "confdefs.h"
4139 #include <sys/types.h>
4140 #include <sys/param.h>
4141 int main() {
4142
4143 #if BYTE_ORDER != BIG_ENDIAN
4144  not big endian
4145 #endif
4146 ; return 0; }
4147 EOF
4148 if { (eval echo configure:4149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4149   rm -rf conftest*
4150   ac_cv_c_bigendian=yes
4151 else
4152   echo "configure: failed program was:" >&5
4153   cat conftest.$ac_ext >&5
4154   rm -rf conftest*
4155   ac_cv_c_bigendian=no
4156 fi
4157 rm -f conftest*
4158 else
4159   echo "configure: failed program was:" >&5
4160   cat conftest.$ac_ext >&5
4161 fi
4162 rm -f conftest*
4163 if test $ac_cv_c_bigendian = unknown; then
4164 cat > conftest.$ac_ext <<EOF
4165 #line 4166 "configure"
4166 #include "confdefs.h"
4167 main () {
4168   /* Are we little or big endian?  From Harbison&Steele.  */
4169   union
4170   {
4171     long l;
4172     char c[sizeof (long)];
4173   } u;
4174   u.l = 1;
4175   exit (u.c[sizeof (long) - 1] == 1);
4176 }
4177 EOF
4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4179 then
4180   ac_cv_c_bigendian=no
4181 else
4182   conftest_rc="$?"
4183   echo "configure: failed program was:" >&5
4184   cat conftest.$ac_ext >&5
4185   rm -fr conftest*
4186   ac_cv_c_bigendian=yes
4187 fi
4188 rm -fr conftest*
4189 fi
4190
4191 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4192 if test $ac_cv_c_bigendian = yes; then
4193   { test "$extra_verbose" = "yes" && cat << \EOF
4194     Defining WORDS_BIGENDIAN
4195 EOF
4196 cat >> confdefs.h <<\EOF
4197 #define WORDS_BIGENDIAN 1
4198 EOF
4199 }
4200
4201 fi
4202
4203
4204 echo $ac_n "checking size of short""... $ac_c" 1>&6
4205 echo "configure:4206: checking size of short" >&5
4206
4207 cat > conftest.$ac_ext <<EOF
4208 #line 4209 "configure"
4209 #include "confdefs.h"
4210 #include <stdio.h>
4211 main()
4212 {
4213   FILE *f=fopen("conftestval", "w");
4214   if (!f) exit(1);
4215   fprintf(f, "%d\n", sizeof(short));
4216   exit(0);
4217 }
4218 EOF
4219 if { (eval echo configure:4220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4220 then
4221   ac_cv_sizeof_short=`cat conftestval`
4222 else
4223   conftest_rc="$?"
4224   echo "configure: failed program was:" >&5
4225   cat conftest.$ac_ext >&5
4226   rm -fr conftest*
4227   ac_cv_sizeof_short=0
4228 fi
4229 rm -fr conftest*
4230 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4231 { test "$extra_verbose" = "yes" && cat << EOF
4232     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4233 EOF
4234 cat >> confdefs.h <<EOF
4235 #define SIZEOF_SHORT $ac_cv_sizeof_short
4236 EOF
4237 }
4238
4239
4240 if test "$ac_cv_sizeof_short" = 0; then
4241   echo ""
4242   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4243   echo "*** PANIC *** Please examine config.log for compilation errors."
4244   exit 1
4245 fi
4246 echo $ac_n "checking size of int""... $ac_c" 1>&6
4247 echo "configure:4248: checking size of int" >&5
4248
4249 cat > conftest.$ac_ext <<EOF
4250 #line 4251 "configure"
4251 #include "confdefs.h"
4252 #include <stdio.h>
4253 main()
4254 {
4255   FILE *f=fopen("conftestval", "w");
4256   if (!f) exit(1);
4257   fprintf(f, "%d\n", sizeof(int));
4258   exit(0);
4259 }
4260 EOF
4261 if { (eval echo configure:4262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4262 then
4263   ac_cv_sizeof_int=`cat conftestval`
4264 else
4265   conftest_rc="$?"
4266   echo "configure: failed program was:" >&5
4267   cat conftest.$ac_ext >&5
4268   rm -fr conftest*
4269   ac_cv_sizeof_int=0
4270 fi
4271 rm -fr conftest*
4272 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4273 { test "$extra_verbose" = "yes" && cat << EOF
4274     Defining SIZEOF_INT = $ac_cv_sizeof_int
4275 EOF
4276 cat >> confdefs.h <<EOF
4277 #define SIZEOF_INT $ac_cv_sizeof_int
4278 EOF
4279 }
4280
4281
4282 echo $ac_n "checking size of long""... $ac_c" 1>&6
4283 echo "configure:4284: checking size of long" >&5
4284
4285 cat > conftest.$ac_ext <<EOF
4286 #line 4287 "configure"
4287 #include "confdefs.h"
4288 #include <stdio.h>
4289 main()
4290 {
4291   FILE *f=fopen("conftestval", "w");
4292   if (!f) exit(1);
4293   fprintf(f, "%d\n", sizeof(long));
4294   exit(0);
4295 }
4296 EOF
4297 if { (eval echo configure:4298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4298 then
4299   ac_cv_sizeof_long=`cat conftestval`
4300 else
4301   conftest_rc="$?"
4302   echo "configure: failed program was:" >&5
4303   cat conftest.$ac_ext >&5
4304   rm -fr conftest*
4305   ac_cv_sizeof_long=0
4306 fi
4307 rm -fr conftest*
4308 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4309 { test "$extra_verbose" = "yes" && cat << EOF
4310     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4311 EOF
4312 cat >> confdefs.h <<EOF
4313 #define SIZEOF_LONG $ac_cv_sizeof_long
4314 EOF
4315 }
4316
4317
4318 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4319 echo "configure:4320: checking size of long long" >&5
4320
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 #include <stdio.h>
4325 main()
4326 {
4327   FILE *f=fopen("conftestval", "w");
4328   if (!f) exit(1);
4329   fprintf(f, "%d\n", sizeof(long long));
4330   exit(0);
4331 }
4332 EOF
4333 if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4334 then
4335   ac_cv_sizeof_long_long=`cat conftestval`
4336 else
4337   conftest_rc="$?"
4338   echo "configure: failed program was:" >&5
4339   cat conftest.$ac_ext >&5
4340   rm -fr conftest*
4341   ac_cv_sizeof_long_long=0
4342 fi
4343 rm -fr conftest*
4344 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4345 { test "$extra_verbose" = "yes" && cat << EOF
4346     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4347 EOF
4348 cat >> confdefs.h <<EOF
4349 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4350 EOF
4351 }
4352
4353
4354 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4355 echo "configure:4356: checking size of void *" >&5
4356
4357 cat > conftest.$ac_ext <<EOF
4358 #line 4359 "configure"
4359 #include "confdefs.h"
4360 #include <stdio.h>
4361 main()
4362 {
4363   FILE *f=fopen("conftestval", "w");
4364   if (!f) exit(1);
4365   fprintf(f, "%d\n", sizeof(void *));
4366   exit(0);
4367 }
4368 EOF
4369 if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4370 then
4371   ac_cv_sizeof_void_p=`cat conftestval`
4372 else
4373   conftest_rc="$?"
4374   echo "configure: failed program was:" >&5
4375   cat conftest.$ac_ext >&5
4376   rm -fr conftest*
4377   ac_cv_sizeof_void_p=0
4378 fi
4379 rm -fr conftest*
4380 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4381 { test "$extra_verbose" = "yes" && cat << EOF
4382     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4383 EOF
4384 cat >> confdefs.h <<EOF
4385 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4386 EOF
4387 }
4388
4389
4390
4391 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4392 echo "configure:4393: checking for long file names" >&5
4393
4394 ac_cv_sys_long_file_names=yes
4395 # Test for long file names in all the places we know might matter:
4396 #      .                the current directory, where building will happen
4397 #      $prefix/lib      where we will be installing things
4398 #      $exec_prefix/lib likewise
4399 # eval it to expand exec_prefix.
4400 #      $TMPDIR          if set, where it might want to write temporary files
4401 # if $TMPDIR is not set:
4402 #      /tmp             where it might want to write temporary files
4403 #      /var/tmp         likewise
4404 #      /usr/tmp         likewise
4405 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4406   ac_tmpdirs="$TMPDIR"
4407 else
4408   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4409 fi
4410 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4411   test -d $ac_dir || continue
4412   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4413   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4414   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4415   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4416   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4417     ac_cv_sys_long_file_names=no
4418     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4419     break
4420   fi
4421   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4422 done
4423
4424 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4425 if test $ac_cv_sys_long_file_names = yes; then
4426   { test "$extra_verbose" = "yes" && cat << \EOF
4427     Defining HAVE_LONG_FILE_NAMES
4428 EOF
4429 cat >> confdefs.h <<\EOF
4430 #define HAVE_LONG_FILE_NAMES 1
4431 EOF
4432 }
4433
4434 fi
4435
4436
4437 echo $ac_n "checking for sin""... $ac_c" 1>&6
4438 echo "configure:4439: checking for sin" >&5
4439
4440 cat > conftest.$ac_ext <<EOF
4441 #line 4442 "configure"
4442 #include "confdefs.h"
4443 /* System header to define __stub macros and hopefully few prototypes,
4444     which can conflict with char sin(); below.  */
4445 #include <assert.h>
4446 /* Override any gcc2 internal prototype to avoid an error.  */
4447 /* We use char because int might match the return type of a gcc2
4448     builtin and then its argument prototype would still apply.  */
4449 char sin();
4450
4451 int main() {
4452
4453 /* The GNU C library defines this for functions which it implements
4454     to always fail with ENOSYS.  Some functions are actually named
4455     something starting with __ and the normal name is an alias.  */
4456 #if defined (__stub_sin) || defined (__stub___sin)
4457 choke me
4458 #else
4459 sin();
4460 #endif
4461
4462 ; return 0; }
4463 EOF
4464 if { (eval echo configure:4465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4465   rm -rf conftest*
4466   eval "ac_cv_func_sin=yes"
4467 else
4468   echo "configure: failed program was:" >&5
4469   cat conftest.$ac_ext >&5
4470   rm -rf conftest*
4471   eval "ac_cv_func_sin=no"
4472 fi
4473 rm -f conftest*
4474
4475 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4476   echo "$ac_t""yes" 1>&6
4477   :
4478 else
4479   echo "$ac_t""no" 1>&6
4480
4481 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4482 echo "configure:4483: checking for sin in -lm" >&5
4483 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4484
4485 xe_check_libs=" -lm "
4486 cat > conftest.$ac_ext <<EOF
4487 #line 4488 "configure"
4488 #include "confdefs.h"
4489 /* Override any gcc2 internal prototype to avoid an error.  */
4490 /* We use char because int might match the return type of a gcc2
4491     builtin and then its argument prototype would still apply.  */
4492 char sin();
4493
4494 int main() {
4495 sin()
4496 ; return 0; }
4497 EOF
4498 if { (eval echo configure:4499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4499   rm -rf conftest*
4500   eval "ac_cv_lib_$ac_lib_var=yes"
4501 else
4502   echo "configure: failed program was:" >&5
4503   cat conftest.$ac_ext >&5
4504   rm -rf conftest*
4505   eval "ac_cv_lib_$ac_lib_var=no"
4506 fi
4507 rm -f conftest*
4508 xe_check_libs=""
4509
4510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4511   echo "$ac_t""yes" 1>&6
4512     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4513     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4514   { test "$extra_verbose" = "yes" && cat << EOF
4515     Defining $ac_tr_lib
4516 EOF
4517 cat >> confdefs.h <<EOF
4518 #define $ac_tr_lib 1
4519 EOF
4520 }
4521
4522   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4523
4524 else
4525   echo "$ac_t""no" 1>&6
4526 fi
4527
4528
4529 fi
4530
4531
4532 { test "$extra_verbose" = "yes" && cat << \EOF
4533     Defining LISP_FLOAT_TYPE
4534 EOF
4535 cat >> confdefs.h <<\EOF
4536 #define LISP_FLOAT_TYPE 1
4537 EOF
4538 }
4539
4540
4541 cat > conftest.$ac_ext <<EOF
4542 #line 4543 "configure"
4543 #include "confdefs.h"
4544 #include <math.h>
4545 int main() {
4546 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4547 ; return 0; }
4548 EOF
4549 if { (eval echo configure:4550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4550   rm -rf conftest*
4551   { test "$extra_verbose" = "yes" && cat << \EOF
4552     Defining HAVE_INVERSE_HYPERBOLIC
4553 EOF
4554 cat >> confdefs.h <<\EOF
4555 #define HAVE_INVERSE_HYPERBOLIC 1
4556 EOF
4557 }
4558
4559 else
4560   echo "configure: failed program was:" >&5
4561   cat conftest.$ac_ext >&5
4562 fi
4563 rm -f conftest*
4564
4565 echo "checking type of mail spool file locking" 1>&6
4566 echo "configure:4567: checking type of mail spool file locking" >&5
4567 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4568 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4569 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4570     Defining REAL_MAIL_USE_LOCKF
4571 EOF
4572 cat >> confdefs.h <<\EOF
4573 #define REAL_MAIL_USE_LOCKF 1
4574 EOF
4575 }
4576
4577 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4578     Defining REAL_MAIL_USE_FLOCK
4579 EOF
4580 cat >> confdefs.h <<\EOF
4581 #define REAL_MAIL_USE_FLOCK 1
4582 EOF
4583 }
4584
4585 else mail_locking="dot-locking"
4586 fi
4587
4588 case "$opsys" in decosf*)
4589   
4590 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4591 echo "configure:4592: checking for cma_open in -lpthreads" >&5
4592 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4593
4594 xe_check_libs=" -lpthreads "
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 /* Override any gcc2 internal prototype to avoid an error.  */
4599 /* We use char because int might match the return type of a gcc2
4600     builtin and then its argument prototype would still apply.  */
4601 char cma_open();
4602
4603 int main() {
4604 cma_open()
4605 ; return 0; }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608   rm -rf conftest*
4609   eval "ac_cv_lib_$ac_lib_var=yes"
4610 else
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -rf conftest*
4614   eval "ac_cv_lib_$ac_lib_var=no"
4615 fi
4616 rm -f conftest*
4617 xe_check_libs=""
4618
4619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4620   echo "$ac_t""yes" 1>&6
4621     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4622     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4623   { test "$extra_verbose" = "yes" && cat << EOF
4624     Defining $ac_tr_lib
4625 EOF
4626 cat >> confdefs.h <<EOF
4627 #define $ac_tr_lib 1
4628 EOF
4629 }
4630
4631   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4632
4633 else
4634   echo "$ac_t""no" 1>&6
4635 fi
4636
4637
4638   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4639     c_switch_site="$c_switch_site -threads" ;;
4640 esac
4641
4642 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4643 echo "configure:4644: checking whether the -xildoff compiler flag is required" >&5
4644 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4645   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4646     then echo "$ac_t""no" 1>&6;
4647     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
4648   fi
4649   else echo "$ac_t""no" 1>&6
4650 fi
4651
4652 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4653   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4654 echo "configure:4655: checking for \"-z ignore\" linker flag" >&5
4655   case "`ld -h 2>&1`" in
4656     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4657       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4658     *) echo "$ac_t""no" 1>&6 ;;
4659   esac
4660 fi
4661
4662
4663 echo "checking "for specified window system"" 1>&6
4664 echo "configure:4665: checking "for specified window system"" >&5
4665
4666 if test "$with_x11" != "no"; then
4667     test "$x_includes $x_libraries" != "NONE NONE" && \
4668    window_system=x11 with_x11=yes
4669
4670         
4671       if test "$x_includes $x_libraries" = "NONE NONE" \
4672     -a -n "$OPENWINHOME" \
4673     -a "$OPENWINHOME" != "/usr/openwin" \
4674     -a -d "$OPENWINHOME"; then
4675       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4676       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4677       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4678   fi
4679
4680   if test "$x_includes" = "NONE"; then
4681                     for dir in "/usr/X11" "/usr/X11R6"; do
4682       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4683     done
4684   fi
4685
4686   if test "$x_libraries" = "NONE"; then
4687     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4688       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4689     done
4690   fi
4691
4692   # If we find X, set shell vars x_includes and x_libraries to the
4693 # paths, otherwise set no_x=yes.
4694 # Uses ac_ vars as temps to allow command line to override cache and checks.
4695 # --without-x overrides everything else, but does not touch the cache.
4696 echo $ac_n "checking for X""... $ac_c" 1>&6
4697 echo "configure:4698: checking for X" >&5
4698
4699 # Check whether --with-x or --without-x was given.
4700 if test "${with_x+set}" = set; then
4701   withval="$with_x"
4702   :
4703 fi
4704
4705 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4706 if test "x$with_x" = xno; then
4707   # The user explicitly disabled X.
4708   have_x=disabled
4709 else
4710   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4711     # Both variables are already set.
4712     have_x=yes
4713   else
4714
4715 # One or both of the vars are not set, and there is no cached value.
4716 ac_x_includes=NO ac_x_libraries=NO
4717 rm -fr conftestdir
4718 if mkdir conftestdir; then
4719   cd conftestdir
4720   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4721   cat > Imakefile <<'EOF'
4722 acfindx:
4723         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4724 EOF
4725   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4726     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4727     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4728     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4729     for ac_extension in a so sl; do
4730       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4731         test -f $ac_im_libdir/libX11.$ac_extension; then
4732         ac_im_usrlibdir=$ac_im_libdir; break
4733       fi
4734     done
4735     # Screen out bogus values from the imake configuration.  They are
4736     # bogus both because they are the default anyway, and because
4737     # using them would break gcc on systems where it needs fixed includes.
4738     case "$ac_im_incroot" in
4739         /usr/include) ;;
4740         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4741     esac
4742     case "$ac_im_usrlibdir" in
4743         /usr/lib | /lib) ;;
4744         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4745     esac
4746   fi
4747   cd ..
4748   rm -fr conftestdir
4749 fi
4750
4751 if test "$ac_x_includes" = NO; then
4752   # Guess where to find include files, by looking for this one X11 .h file.
4753   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4754
4755   # First, try using that file with no special directory specified.
4756 cat > conftest.$ac_ext <<EOF
4757 #line 4758 "configure"
4758 #include "confdefs.h"
4759 #include <$x_direct_test_include>
4760 EOF
4761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4762 { (eval echo configure:4763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4764 if test -z "$ac_err"; then
4765   rm -rf conftest*
4766   # We can compile using X headers with no special include directory.
4767 ac_x_includes=
4768 else
4769   echo "$ac_err" >&5
4770   echo "configure: failed program was:" >&5
4771   cat conftest.$ac_ext >&5
4772   rm -rf conftest*
4773   # Look for the header file in a standard set of common directories.
4774 # Check X11 before X11Rn because it is often a symlink to the current release.
4775   for ac_dir in               \
4776     /usr/X11/include          \
4777     /usr/X11R6/include        \
4778     /usr/X11R5/include        \
4779     /usr/X11R4/include        \
4780                               \
4781     /usr/include/X11          \
4782     /usr/include/X11R6        \
4783     /usr/include/X11R5        \
4784     /usr/include/X11R4        \
4785                               \
4786     /usr/local/X11/include    \
4787     /usr/local/X11R6/include  \
4788     /usr/local/X11R5/include  \
4789     /usr/local/X11R4/include  \
4790                               \
4791     /usr/local/include/X11    \
4792     /usr/local/include/X11R6  \
4793     /usr/local/include/X11R5  \
4794     /usr/local/include/X11R4  \
4795                               \
4796     /usr/X386/include         \
4797     /usr/x386/include         \
4798     /usr/XFree86/include/X11  \
4799                               \
4800     /usr/include              \
4801     /usr/local/include        \
4802     /usr/unsupported/include  \
4803     /usr/athena/include       \
4804     /usr/local/x11r5/include  \
4805     /usr/lpp/Xamples/include  \
4806                               \
4807     /usr/openwin/include      \
4808     /usr/openwin/share/include \
4809     ; \
4810   do
4811     if test -r "$ac_dir/$x_direct_test_include"; then
4812       ac_x_includes=$ac_dir
4813       break
4814     fi
4815   done
4816 fi
4817 rm -f conftest*
4818 fi # $ac_x_includes = NO
4819
4820 if test "$ac_x_libraries" = NO; then
4821   # Check for the libraries.
4822
4823   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4824   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4825
4826   # See if we find them without any special options.
4827   # Don't add to $LIBS permanently.
4828   ac_save_LIBS="$LIBS"
4829   LIBS="-l$x_direct_test_library $LIBS"
4830 cat > conftest.$ac_ext <<EOF
4831 #line 4832 "configure"
4832 #include "confdefs.h"
4833
4834 int main() {
4835 ${x_direct_test_function}()
4836 ; return 0; }
4837 EOF
4838 if { (eval echo configure:4839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4839   rm -rf conftest*
4840   LIBS="$ac_save_LIBS"
4841 # We can link X programs with no special library path.
4842 ac_x_libraries=
4843 else
4844   echo "configure: failed program was:" >&5
4845   cat conftest.$ac_ext >&5
4846   rm -rf conftest*
4847   LIBS="$ac_save_LIBS"
4848 # First see if replacing the include by lib works.
4849 # Check X11 before X11Rn because it is often a symlink to the current release.
4850 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4851     /usr/X11/lib          \
4852     /usr/X11R6/lib        \
4853     /usr/X11R5/lib        \
4854     /usr/X11R4/lib        \
4855                           \
4856     /usr/lib/X11          \
4857     /usr/lib/X11R6        \
4858     /usr/lib/X11R5        \
4859     /usr/lib/X11R4        \
4860                           \
4861     /usr/local/X11/lib    \
4862     /usr/local/X11R6/lib  \
4863     /usr/local/X11R5/lib  \
4864     /usr/local/X11R4/lib  \
4865                           \
4866     /usr/local/lib/X11    \
4867     /usr/local/lib/X11R6  \
4868     /usr/local/lib/X11R5  \
4869     /usr/local/lib/X11R4  \
4870                           \
4871     /usr/X386/lib         \
4872     /usr/x386/lib         \
4873     /usr/XFree86/lib/X11  \
4874                           \
4875     /usr/lib              \
4876     /usr/local/lib        \
4877     /usr/unsupported/lib  \
4878     /usr/athena/lib       \
4879     /usr/local/x11r5/lib  \
4880     /usr/lpp/Xamples/lib  \
4881     /lib/usr/lib/X11      \
4882                           \
4883     /usr/openwin/lib      \
4884     /usr/openwin/share/lib \
4885     ; \
4886 do
4887   for ac_extension in a so sl; do
4888     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4889       ac_x_libraries=$ac_dir
4890       break 2
4891     fi
4892   done
4893 done
4894 fi
4895 rm -f conftest*
4896 fi # $ac_x_libraries = NO
4897
4898 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4899   # Didn't find X anywhere.  Cache the known absence of X.
4900   ac_cv_have_x="have_x=no"
4901 else
4902   # Record where we found X for the cache.
4903   ac_cv_have_x="have_x=yes \
4904                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4905 fi
4906   fi
4907   eval "$ac_cv_have_x"
4908 fi # $with_x != no
4909
4910 if test "$have_x" != yes; then
4911   echo "$ac_t""$have_x" 1>&6
4912   no_x=yes
4913 else
4914   # If each of the values was on the command line, it overrides each guess.
4915   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4916   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4917   # Update the cache value to reflect the command line values.
4918   ac_cv_have_x="have_x=yes \
4919                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4920   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4921 fi
4922
4923 if test "$no_x" = yes; then
4924   # Not all programs may use this symbol, but it does not hurt to define it.
4925   { test "$extra_verbose" = "yes" && cat << \EOF
4926     Defining X_DISPLAY_MISSING
4927 EOF
4928 cat >> confdefs.h <<\EOF
4929 #define X_DISPLAY_MISSING 1
4930 EOF
4931 }
4932
4933   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4934 else
4935   if test -n "$x_includes"; then
4936     X_CFLAGS="$X_CFLAGS -I$x_includes"
4937   fi
4938
4939   # It would also be nice to do this for all -L options, not just this one.
4940   if test -n "$x_libraries"; then
4941     X_LIBS="$X_LIBS -L$x_libraries"
4942     # For Solaris; some versions of Sun CC require a space after -R and
4943     # others require no space.  Words are not sufficient . . . .
4944     case "`(uname -sr) 2>/dev/null`" in
4945     "SunOS 5"*)
4946       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4947 echo "configure:4948: checking whether -R must be followed by a space" >&5
4948       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4949       cat > conftest.$ac_ext <<EOF
4950 #line 4951 "configure"
4951 #include "confdefs.h"
4952
4953 int main() {
4954
4955 ; return 0; }
4956 EOF
4957 if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958   rm -rf conftest*
4959   ac_R_nospace=yes
4960 else
4961   echo "configure: failed program was:" >&5
4962   cat conftest.$ac_ext >&5
4963   rm -rf conftest*
4964   ac_R_nospace=no
4965 fi
4966 rm -f conftest*
4967       if test $ac_R_nospace = yes; then
4968         echo "$ac_t""no" 1>&6
4969         X_LIBS="$X_LIBS -R$x_libraries"
4970       else
4971         LIBS="$ac_xsave_LIBS -R $x_libraries"
4972         cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975
4976 int main() {
4977
4978 ; return 0; }
4979 EOF
4980 if { (eval echo configure:4981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4981   rm -rf conftest*
4982   ac_R_space=yes
4983 else
4984   echo "configure: failed program was:" >&5
4985   cat conftest.$ac_ext >&5
4986   rm -rf conftest*
4987   ac_R_space=no
4988 fi
4989 rm -f conftest*
4990         if test $ac_R_space = yes; then
4991           echo "$ac_t""yes" 1>&6
4992           X_LIBS="$X_LIBS -R $x_libraries"
4993         else
4994           echo "$ac_t""neither works" 1>&6
4995         fi
4996       fi
4997       LIBS="$ac_xsave_LIBS"
4998     esac
4999   fi
5000
5001   # Check for system-dependent libraries X programs must link with.
5002   # Do this before checking for the system-independent R6 libraries
5003   # (-lICE), since we may need -lsocket or whatever for X linking.
5004
5005   if test "$ISC" = yes; then
5006     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5007   else
5008     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5009     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5010     # the Alpha needs dnet_stub (dnet does not exist).
5011     if test "$with_dnet" = "no" ; then
5012 ac_cv_lib_dnet_dnet_ntoa=no
5013 else
5014
5015 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5016 echo "configure:5017: checking for dnet_ntoa in -ldnet" >&5
5017 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5018
5019 xe_check_libs=" -ldnet "
5020 cat > conftest.$ac_ext <<EOF
5021 #line 5022 "configure"
5022 #include "confdefs.h"
5023 /* Override any gcc2 internal prototype to avoid an error.  */
5024 /* We use char because int might match the return type of a gcc2
5025     builtin and then its argument prototype would still apply.  */
5026 char dnet_ntoa();
5027
5028 int main() {
5029 dnet_ntoa()
5030 ; return 0; }
5031 EOF
5032 if { (eval echo configure:5033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5033   rm -rf conftest*
5034   eval "ac_cv_lib_$ac_lib_var=yes"
5035 else
5036   echo "configure: failed program was:" >&5
5037   cat conftest.$ac_ext >&5
5038   rm -rf conftest*
5039   eval "ac_cv_lib_$ac_lib_var=no"
5040 fi
5041 rm -f conftest*
5042 xe_check_libs=""
5043
5044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5045   echo "$ac_t""yes" 1>&6
5046   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5047 else
5048   echo "$ac_t""no" 1>&6
5049 fi
5050
5051 fi
5052
5053     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5054       
5055 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5056 echo "configure:5057: checking for dnet_ntoa in -ldnet_stub" >&5
5057 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5058
5059 xe_check_libs=" -ldnet_stub "
5060 cat > conftest.$ac_ext <<EOF
5061 #line 5062 "configure"
5062 #include "confdefs.h"
5063 /* Override any gcc2 internal prototype to avoid an error.  */
5064 /* We use char because int might match the return type of a gcc2
5065     builtin and then its argument prototype would still apply.  */
5066 char dnet_ntoa();
5067
5068 int main() {
5069 dnet_ntoa()
5070 ; return 0; }
5071 EOF
5072 if { (eval echo configure:5073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5073   rm -rf conftest*
5074   eval "ac_cv_lib_$ac_lib_var=yes"
5075 else
5076   echo "configure: failed program was:" >&5
5077   cat conftest.$ac_ext >&5
5078   rm -rf conftest*
5079   eval "ac_cv_lib_$ac_lib_var=no"
5080 fi
5081 rm -f conftest*
5082 xe_check_libs=""
5083
5084 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5085   echo "$ac_t""yes" 1>&6
5086   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5087 else
5088   echo "$ac_t""no" 1>&6
5089 fi
5090
5091
5092     fi
5093
5094     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5095     # to get the SysV transport functions.
5096     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5097     # needs -lnsl.
5098     # The nsl library prevents programs from opening the X display
5099     # on Irix 5.2, according to dickey@clark.net.
5100     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5101 echo "configure:5102: checking for gethostbyname" >&5
5102
5103 cat > conftest.$ac_ext <<EOF
5104 #line 5105 "configure"
5105 #include "confdefs.h"
5106 /* System header to define __stub macros and hopefully few prototypes,
5107     which can conflict with char gethostbyname(); below.  */
5108 #include <assert.h>
5109 /* Override any gcc2 internal prototype to avoid an error.  */
5110 /* We use char because int might match the return type of a gcc2
5111     builtin and then its argument prototype would still apply.  */
5112 char gethostbyname();
5113
5114 int main() {
5115
5116 /* The GNU C library defines this for functions which it implements
5117     to always fail with ENOSYS.  Some functions are actually named
5118     something starting with __ and the normal name is an alias.  */
5119 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5120 choke me
5121 #else
5122 gethostbyname();
5123 #endif
5124
5125 ; return 0; }
5126 EOF
5127 if { (eval echo configure:5128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5128   rm -rf conftest*
5129   eval "ac_cv_func_gethostbyname=yes"
5130 else
5131   echo "configure: failed program was:" >&5
5132   cat conftest.$ac_ext >&5
5133   rm -rf conftest*
5134   eval "ac_cv_func_gethostbyname=no"
5135 fi
5136 rm -f conftest*
5137
5138 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5139   echo "$ac_t""yes" 1>&6
5140   :
5141 else
5142   echo "$ac_t""no" 1>&6
5143 fi
5144
5145     if test $ac_cv_func_gethostbyname = no; then
5146       
5147 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5148 echo "configure:5149: checking for gethostbyname in -lnsl" >&5
5149 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5150
5151 xe_check_libs=" -lnsl "
5152 cat > conftest.$ac_ext <<EOF
5153 #line 5154 "configure"
5154 #include "confdefs.h"
5155 /* Override any gcc2 internal prototype to avoid an error.  */
5156 /* We use char because int might match the return type of a gcc2
5157     builtin and then its argument prototype would still apply.  */
5158 char gethostbyname();
5159
5160 int main() {
5161 gethostbyname()
5162 ; return 0; }
5163 EOF
5164 if { (eval echo configure:5165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5165   rm -rf conftest*
5166   eval "ac_cv_lib_$ac_lib_var=yes"
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170   rm -rf conftest*
5171   eval "ac_cv_lib_$ac_lib_var=no"
5172 fi
5173 rm -f conftest*
5174 xe_check_libs=""
5175
5176 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5177   echo "$ac_t""yes" 1>&6
5178   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5179 else
5180   echo "$ac_t""no" 1>&6
5181 fi
5182
5183
5184     fi
5185
5186     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5187     # socket/setsockopt and other routines are undefined under SCO ODT
5188     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5189     # on later versions), says simon@lia.di.epfl.ch: it contains
5190     # gethostby* variants that don't use the nameserver (or something).
5191     # -lsocket must be given before -lnsl if both are needed.
5192     # We assume that if connect needs -lnsl, so does gethostbyname.
5193     echo $ac_n "checking for connect""... $ac_c" 1>&6
5194 echo "configure:5195: checking for connect" >&5
5195
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* System header to define __stub macros and hopefully few prototypes,
5200     which can conflict with char connect(); below.  */
5201 #include <assert.h>
5202 /* Override any gcc2 internal prototype to avoid an error.  */
5203 /* We use char because int might match the return type of a gcc2
5204     builtin and then its argument prototype would still apply.  */
5205 char connect();
5206
5207 int main() {
5208
5209 /* The GNU C library defines this for functions which it implements
5210     to always fail with ENOSYS.  Some functions are actually named
5211     something starting with __ and the normal name is an alias.  */
5212 #if defined (__stub_connect) || defined (__stub___connect)
5213 choke me
5214 #else
5215 connect();
5216 #endif
5217
5218 ; return 0; }
5219 EOF
5220 if { (eval echo configure:5221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221   rm -rf conftest*
5222   eval "ac_cv_func_connect=yes"
5223 else
5224   echo "configure: failed program was:" >&5
5225   cat conftest.$ac_ext >&5
5226   rm -rf conftest*
5227   eval "ac_cv_func_connect=no"
5228 fi
5229 rm -f conftest*
5230
5231 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5232   echo "$ac_t""yes" 1>&6
5233   :
5234 else
5235   echo "$ac_t""no" 1>&6
5236 fi
5237
5238     if test $ac_cv_func_connect = no; then
5239       
5240 xe_msg_checking="for connect in -lsocket"
5241 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5242 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5243 echo "configure:5244: checking "$xe_msg_checking"" >&5
5244 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5245
5246 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* Override any gcc2 internal prototype to avoid an error.  */
5251 /* We use char because int might match the return type of a gcc2
5252     builtin and then its argument prototype would still apply.  */
5253 char connect();
5254
5255 int main() {
5256 connect()
5257 ; return 0; }
5258 EOF
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5260   rm -rf conftest*
5261   eval "ac_cv_lib_$ac_lib_var=yes"
5262 else
5263   echo "configure: failed program was:" >&5
5264   cat conftest.$ac_ext >&5
5265   rm -rf conftest*
5266   eval "ac_cv_lib_$ac_lib_var=no"
5267 fi
5268 rm -f conftest*
5269 xe_check_libs=""
5270
5271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5272   echo "$ac_t""yes" 1>&6
5273   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5274 else
5275   echo "$ac_t""no" 1>&6
5276 fi
5277
5278
5279     fi
5280
5281     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5282     echo $ac_n "checking for remove""... $ac_c" 1>&6
5283 echo "configure:5284: checking for remove" >&5
5284
5285 cat > conftest.$ac_ext <<EOF
5286 #line 5287 "configure"
5287 #include "confdefs.h"
5288 /* System header to define __stub macros and hopefully few prototypes,
5289     which can conflict with char remove(); below.  */
5290 #include <assert.h>
5291 /* Override any gcc2 internal prototype to avoid an error.  */
5292 /* We use char because int might match the return type of a gcc2
5293     builtin and then its argument prototype would still apply.  */
5294 char remove();
5295
5296 int main() {
5297
5298 /* The GNU C library defines this for functions which it implements
5299     to always fail with ENOSYS.  Some functions are actually named
5300     something starting with __ and the normal name is an alias.  */
5301 #if defined (__stub_remove) || defined (__stub___remove)
5302 choke me
5303 #else
5304 remove();
5305 #endif
5306
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5310   rm -rf conftest*
5311   eval "ac_cv_func_remove=yes"
5312 else
5313   echo "configure: failed program was:" >&5
5314   cat conftest.$ac_ext >&5
5315   rm -rf conftest*
5316   eval "ac_cv_func_remove=no"
5317 fi
5318 rm -f conftest*
5319
5320 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5321   echo "$ac_t""yes" 1>&6
5322   :
5323 else
5324   echo "$ac_t""no" 1>&6
5325 fi
5326
5327     if test $ac_cv_func_remove = no; then
5328       
5329 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5330 echo "configure:5331: checking for remove in -lposix" >&5
5331 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5332
5333 xe_check_libs=" -lposix "
5334 cat > conftest.$ac_ext <<EOF
5335 #line 5336 "configure"
5336 #include "confdefs.h"
5337 /* Override any gcc2 internal prototype to avoid an error.  */
5338 /* We use char because int might match the return type of a gcc2
5339     builtin and then its argument prototype would still apply.  */
5340 char remove();
5341
5342 int main() {
5343 remove()
5344 ; return 0; }
5345 EOF
5346 if { (eval echo configure:5347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5347   rm -rf conftest*
5348   eval "ac_cv_lib_$ac_lib_var=yes"
5349 else
5350   echo "configure: failed program was:" >&5
5351   cat conftest.$ac_ext >&5
5352   rm -rf conftest*
5353   eval "ac_cv_lib_$ac_lib_var=no"
5354 fi
5355 rm -f conftest*
5356 xe_check_libs=""
5357
5358 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5359   echo "$ac_t""yes" 1>&6
5360   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5361 else
5362   echo "$ac_t""no" 1>&6
5363 fi
5364
5365
5366     fi
5367
5368     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5369     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5370 echo "configure:5371: checking for shmat" >&5
5371
5372 cat > conftest.$ac_ext <<EOF
5373 #line 5374 "configure"
5374 #include "confdefs.h"
5375 /* System header to define __stub macros and hopefully few prototypes,
5376     which can conflict with char shmat(); below.  */
5377 #include <assert.h>
5378 /* Override any gcc2 internal prototype to avoid an error.  */
5379 /* We use char because int might match the return type of a gcc2
5380     builtin and then its argument prototype would still apply.  */
5381 char shmat();
5382
5383 int main() {
5384
5385 /* The GNU C library defines this for functions which it implements
5386     to always fail with ENOSYS.  Some functions are actually named
5387     something starting with __ and the normal name is an alias.  */
5388 #if defined (__stub_shmat) || defined (__stub___shmat)
5389 choke me
5390 #else
5391 shmat();
5392 #endif
5393
5394 ; return 0; }
5395 EOF
5396 if { (eval echo configure:5397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5397   rm -rf conftest*
5398   eval "ac_cv_func_shmat=yes"
5399 else
5400   echo "configure: failed program was:" >&5
5401   cat conftest.$ac_ext >&5
5402   rm -rf conftest*
5403   eval "ac_cv_func_shmat=no"
5404 fi
5405 rm -f conftest*
5406
5407 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5408   echo "$ac_t""yes" 1>&6
5409   :
5410 else
5411   echo "$ac_t""no" 1>&6
5412 fi
5413
5414     if test $ac_cv_func_shmat = no; then
5415       
5416 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5417 echo "configure:5418: checking for shmat in -lipc" >&5
5418 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5419
5420 xe_check_libs=" -lipc "
5421 cat > conftest.$ac_ext <<EOF
5422 #line 5423 "configure"
5423 #include "confdefs.h"
5424 /* Override any gcc2 internal prototype to avoid an error.  */
5425 /* We use char because int might match the return type of a gcc2
5426     builtin and then its argument prototype would still apply.  */
5427 char shmat();
5428
5429 int main() {
5430 shmat()
5431 ; return 0; }
5432 EOF
5433 if { (eval echo configure:5434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5434   rm -rf conftest*
5435   eval "ac_cv_lib_$ac_lib_var=yes"
5436 else
5437   echo "configure: failed program was:" >&5
5438   cat conftest.$ac_ext >&5
5439   rm -rf conftest*
5440   eval "ac_cv_lib_$ac_lib_var=no"
5441 fi
5442 rm -f conftest*
5443 xe_check_libs=""
5444
5445 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5446   echo "$ac_t""yes" 1>&6
5447   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5448 else
5449   echo "$ac_t""no" 1>&6
5450 fi
5451
5452
5453     fi
5454   fi
5455
5456   # Check for libraries that X11R6 Xt/Xaw programs need.
5457   ac_save_LDFLAGS="$LDFLAGS"
5458   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5459   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5460   # check for ICE first), but we must link in the order -lSM -lICE or
5461   # we get undefined symbols.  So assume we have SM if we have ICE.
5462   # These have to be linked with before -lX11, unlike the other
5463   # libraries we check for below, so use a different variable.
5464   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5465   
5466 xe_msg_checking="for IceConnectionNumber in -lICE"
5467 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5468 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5469 echo "configure:5470: checking "$xe_msg_checking"" >&5
5470 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5471
5472 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5473 cat > conftest.$ac_ext <<EOF
5474 #line 5475 "configure"
5475 #include "confdefs.h"
5476 /* Override any gcc2 internal prototype to avoid an error.  */
5477 /* We use char because int might match the return type of a gcc2
5478     builtin and then its argument prototype would still apply.  */
5479 char IceConnectionNumber();
5480
5481 int main() {
5482 IceConnectionNumber()
5483 ; return 0; }
5484 EOF
5485 if { (eval echo configure:5486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5486   rm -rf conftest*
5487   eval "ac_cv_lib_$ac_lib_var=yes"
5488 else
5489   echo "configure: failed program was:" >&5
5490   cat conftest.$ac_ext >&5
5491   rm -rf conftest*
5492   eval "ac_cv_lib_$ac_lib_var=no"
5493 fi
5494 rm -f conftest*
5495 xe_check_libs=""
5496
5497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5498   echo "$ac_t""yes" 1>&6
5499   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5500 else
5501   echo "$ac_t""no" 1>&6
5502 fi
5503
5504
5505   LDFLAGS="$ac_save_LDFLAGS"
5506
5507 fi
5508  # Autoconf claims to find X library and include dirs for us.
5509   if test "$no_x" = "yes"
5510   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5511   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5512   fi
5513 fi
5514
5515 case "$with_x11" in
5516   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5517   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5518 esac
5519
5520 if test "$with_x11" = "yes"; then
5521   { test "$extra_verbose" = "yes" && cat << \EOF
5522     Defining HAVE_X_WINDOWS
5523 EOF
5524 cat >> confdefs.h <<\EOF
5525 #define HAVE_X_WINDOWS 1
5526 EOF
5527 }
5528
5529   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5530   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5531
5532       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5533     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5534     if test -d "$lib_dir" -a -d "$inc_dir"; then
5535       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5536         x_libraries="$lib_dir $x_libraries"
5537         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5538       esac
5539       case "$x_includes" in "$inc_dir"* ) ;; *)
5540         x_includes="$inc_dir $x_includes"
5541         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5542       esac
5543       break;       fi
5544   done
5545
5546     for rel in "X11R6" "X11R5" "X11R4"; do
5547     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5548     if test -d "$lib_dir" -a -d "$inc_dir"; then
5549       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5550         x_libraries="$x_libraries $lib_dir"
5551         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5552       esac
5553       case "$x_includes" in "$inc_dir"* ) ;; *)
5554         x_includes="$x_includes $inc_dir"
5555         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5556       esac
5557       break;     fi
5558   done
5559
5560     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
5561
5562   ld_switch_x_site="$X_LIBS"
5563
5564   
5565 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5566     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5567   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5568   
5569         runpath="" runpath_dirs=""
5570   if test -n "$LD_RUN_PATH"; then
5571     runpath="$LD_RUN_PATH"
5572   elif test "$GCC" = "yes"; then
5573         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5574     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5575     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5576     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5577       case "$arg" in P,* | -L* | -R* )
5578         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5579           {
5580 xe_runpath_dir="$dir"
5581   test "$xe_runpath_dir" != "/lib"     -a \
5582         "$xe_runpath_dir" != "/usr/lib" -a \
5583         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5584   eval "$xe_add_unique_runpath_dir"
5585 }
5586         done ;;
5587       esac
5588     done
5589     ld_switch_run="$ld_switch_run_save"
5590     rm -f conftest*
5591   else
5592         for arg in $ld_switch_site $ld_switch_x_site; do
5593       case "$arg" in -L*) {
5594 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5595   test "$xe_runpath_dir" != "/lib"     -a \
5596         "$xe_runpath_dir" != "/usr/lib" -a \
5597         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5598   eval "$xe_add_unique_runpath_dir"
5599 };; esac
5600     done
5601         if test "$opsys $need_motif" = "sol2 yes"; then
5602       xe_runpath_dir="/opt/SUNWdt/lib";
5603       eval "$xe_add_unique_runpath_dir";
5604     fi
5605   fi 
5606   if test -n "$runpath"; then
5607     ld_switch_run="${dash_r}${runpath}"
5608     
5609 if test "$GCC" = "yes"; then
5610   set x $ld_switch_run; shift; ld_switch_run=""
5611   while test -n "$1"; do
5612     case $1 in
5613       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5614       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5615       -Xlinker* ) ;;
5616       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5617     esac
5618     shift
5619   done
5620 fi
5621     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5622   fi
5623 fi
5624
5625
5626   if test "$extra_verbose" = "yes"; then
5627     echo; echo "X11 compilation variables:"
5628     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5629     echo
5630   fi
5631
5632             bitmapdirs=
5633   if test "$x_includes" != NONE; then
5634     for i in $x_includes; do
5635       if test -d "$i/bitmaps"; then
5636         bitmapdirs="$i/bitmaps:$bitmapdirs"
5637       fi
5638       if test -d "$i/X11/bitmaps"; then
5639         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5640       fi
5641     done
5642     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5643   fi
5644   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5645     Defining BITMAPDIR = "$bitmapdirs"
5646 EOF
5647 cat >> confdefs.h <<EOF
5648 #define BITMAPDIR "$bitmapdirs"
5649 EOF
5650 }
5651
5652
5653     echo "checking for X defines extracted by xmkmf" 1>&6
5654 echo "configure:5655: checking for X defines extracted by xmkmf" >&5
5655   rm -fr conftestdir
5656   if mkdir conftestdir; then
5657     cd conftestdir
5658     cat > Imakefile <<'EOF'
5659 xetest:
5660         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5661 EOF
5662     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5663       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5664       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5665     fi
5666     cd ..
5667     rm -fr conftestdir
5668     for word in $xmkmf_defines; do
5669       case "$word" in
5670         -D*=* ) ;;
5671         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5672               { test "$extra_verbose" = "yes" && cat << EOF
5673     Defining $word
5674 EOF
5675 cat >> confdefs.h <<EOF
5676 #define $word 1
5677 EOF
5678 }
5679  ;;
5680       esac
5681     done
5682   fi
5683
5684     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5685 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5686 echo "configure:5687: checking for X11/Intrinsic.h" >&5
5687
5688 cat > conftest.$ac_ext <<EOF
5689 #line 5690 "configure"
5690 #include "confdefs.h"
5691 #include <X11/Intrinsic.h>
5692 EOF
5693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5694 { (eval echo configure:5695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5696 if test -z "$ac_err"; then
5697   rm -rf conftest*
5698   eval "ac_cv_header_$ac_safe=yes"
5699 else
5700   echo "$ac_err" >&5
5701   echo "configure: failed program was:" >&5
5702   cat conftest.$ac_ext >&5
5703   rm -rf conftest*
5704   eval "ac_cv_header_$ac_safe=no"
5705 fi
5706 rm -f conftest*
5707 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5708   echo "$ac_t""yes" 1>&6
5709   :
5710 else
5711   echo "$ac_t""no" 1>&6
5712 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5713 fi
5714
5715
5716       
5717 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5718 echo "configure:5719: checking for XOpenDisplay in -lX11" >&5
5719 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5720
5721 xe_check_libs=" -lX11 "
5722 cat > conftest.$ac_ext <<EOF
5723 #line 5724 "configure"
5724 #include "confdefs.h"
5725 /* Override any gcc2 internal prototype to avoid an error.  */
5726 /* We use char because int might match the return type of a gcc2
5727     builtin and then its argument prototype would still apply.  */
5728 char XOpenDisplay();
5729
5730 int main() {
5731 XOpenDisplay()
5732 ; return 0; }
5733 EOF
5734 if { (eval echo configure:5735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5735   rm -rf conftest*
5736   eval "ac_cv_lib_$ac_lib_var=yes"
5737 else
5738   echo "configure: failed program was:" >&5
5739   cat conftest.$ac_ext >&5
5740   rm -rf conftest*
5741   eval "ac_cv_lib_$ac_lib_var=no"
5742 fi
5743 rm -f conftest*
5744 xe_check_libs=""
5745
5746 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5747   echo "$ac_t""yes" 1>&6
5748   have_lib_x11=yes
5749 else
5750   echo "$ac_t""no" 1>&6
5751 fi
5752
5753
5754   if test "$have_lib_x11" != "yes"; then
5755     
5756 xe_msg_checking="for XGetFontProperty in -lX11"
5757 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5758 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5759 echo "configure:5760: checking "$xe_msg_checking"" >&5
5760 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5761
5762 xe_check_libs=" -lX11 -b i486-linuxaout"
5763 cat > conftest.$ac_ext <<EOF
5764 #line 5765 "configure"
5765 #include "confdefs.h"
5766 /* Override any gcc2 internal prototype to avoid an error.  */
5767 /* We use char because int might match the return type of a gcc2
5768     builtin and then its argument prototype would still apply.  */
5769 char XGetFontProperty();
5770
5771 int main() {
5772 XGetFontProperty()
5773 ; return 0; }
5774 EOF
5775 if { (eval echo configure:5776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5776   rm -rf conftest*
5777   eval "ac_cv_lib_$ac_lib_var=yes"
5778 else
5779   echo "configure: failed program was:" >&5
5780   cat conftest.$ac_ext >&5
5781   rm -rf conftest*
5782   eval "ac_cv_lib_$ac_lib_var=no"
5783 fi
5784 rm -f conftest*
5785 xe_check_libs=""
5786
5787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5788   echo "$ac_t""yes" 1>&6
5789   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5790 else
5791   echo "$ac_t""no" 1>&6
5792 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5793 fi
5794
5795
5796   fi
5797   libs_x="-lX11"
5798   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5799
5800     
5801 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5802 echo "configure:5803: checking for XShapeSelectInput in -lXext" >&5
5803 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5804
5805 xe_check_libs=" -lXext "
5806 cat > conftest.$ac_ext <<EOF
5807 #line 5808 "configure"
5808 #include "confdefs.h"
5809 /* Override any gcc2 internal prototype to avoid an error.  */
5810 /* We use char because int might match the return type of a gcc2
5811     builtin and then its argument prototype would still apply.  */
5812 char XShapeSelectInput();
5813
5814 int main() {
5815 XShapeSelectInput()
5816 ; return 0; }
5817 EOF
5818 if { (eval echo configure:5819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=yes"
5821 else
5822   echo "configure: failed program was:" >&5
5823   cat conftest.$ac_ext >&5
5824   rm -rf conftest*
5825   eval "ac_cv_lib_$ac_lib_var=no"
5826 fi
5827 rm -f conftest*
5828 xe_check_libs=""
5829
5830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5831   echo "$ac_t""yes" 1>&6
5832   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5833 else
5834   echo "$ac_t""no" 1>&6
5835 fi
5836
5837
5838
5839     
5840 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5841 echo "configure:5842: checking for XtOpenDisplay in -lXt" >&5
5842 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5843
5844 xe_check_libs=" -lXt "
5845 cat > conftest.$ac_ext <<EOF
5846 #line 5847 "configure"
5847 #include "confdefs.h"
5848 /* Override any gcc2 internal prototype to avoid an error.  */
5849 /* We use char because int might match the return type of a gcc2
5850     builtin and then its argument prototype would still apply.  */
5851 char XtOpenDisplay();
5852
5853 int main() {
5854 XtOpenDisplay()
5855 ; return 0; }
5856 EOF
5857 if { (eval echo configure:5858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5858   rm -rf conftest*
5859   eval "ac_cv_lib_$ac_lib_var=yes"
5860 else
5861   echo "configure: failed program was:" >&5
5862   cat conftest.$ac_ext >&5
5863   rm -rf conftest*
5864   eval "ac_cv_lib_$ac_lib_var=no"
5865 fi
5866 rm -f conftest*
5867 xe_check_libs=""
5868
5869 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5870   echo "$ac_t""yes" 1>&6
5871   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5872 else
5873   echo "$ac_t""no" 1>&6
5874 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5875 fi
5876
5877
5878
5879   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5880 echo "configure:5881: checking the version of X11 being used" >&5
5881   cat > conftest.$ac_ext <<EOF
5882 #line 5883 "configure"
5883 #include "confdefs.h"
5884 #include <X11/Intrinsic.h>
5885     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5886 EOF
5887 if { (eval echo configure:5888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5888 then
5889   ./conftest foobar; x11_release=$?
5890 else
5891   conftest_rc="$?"
5892   echo "configure: failed program was:" >&5
5893   cat conftest.$ac_ext >&5
5894   rm -fr conftest*
5895   x11_release=4
5896 fi
5897 rm -fr conftest*
5898   echo "$ac_t""R${x11_release}" 1>&6
5899   { test "$extra_verbose" = "yes" && cat << EOF
5900     Defining THIS_IS_X11R${x11_release}
5901 EOF
5902 cat >> confdefs.h <<EOF
5903 #define THIS_IS_X11R${x11_release} 1
5904 EOF
5905 }
5906
5907
5908   for ac_hdr in X11/Xlocale.h
5909 do
5910 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5911 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5912 echo "configure:5913: checking for $ac_hdr" >&5
5913
5914 cat > conftest.$ac_ext <<EOF
5915 #line 5916 "configure"
5916 #include "confdefs.h"
5917 #include <$ac_hdr>
5918 EOF
5919 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5920 { (eval echo configure:5921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5921 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5922 if test -z "$ac_err"; then
5923   rm -rf conftest*
5924   eval "ac_cv_header_$ac_safe=yes"
5925 else
5926   echo "$ac_err" >&5
5927   echo "configure: failed program was:" >&5
5928   cat conftest.$ac_ext >&5
5929   rm -rf conftest*
5930   eval "ac_cv_header_$ac_safe=no"
5931 fi
5932 rm -f conftest*
5933 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5934   echo "$ac_t""yes" 1>&6
5935     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5936   { test "$extra_verbose" = "yes" && cat << EOF
5937     Defining $ac_tr_hdr
5938 EOF
5939 cat >> confdefs.h <<EOF
5940 #define $ac_tr_hdr 1
5941 EOF
5942 }
5943  
5944 else
5945   echo "$ac_t""no" 1>&6
5946 fi
5947 done
5948
5949
5950     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5951 echo "configure:5952: checking for XFree86" >&5
5952   if test -d "/usr/X386/include" -o \
5953           -f "/etc/XF86Config"    -o \
5954           -f "/etc/X11/XF86Config" -o \
5955           -f "/usr/X11R6/lib/X11/XF86Config"; then
5956     echo "$ac_t""yes" 1>&6
5957     { test "$extra_verbose" = "yes" && cat << \EOF
5958     Defining HAVE_XFREE386
5959 EOF
5960 cat >> confdefs.h <<\EOF
5961 #define HAVE_XFREE386 1
5962 EOF
5963 }
5964
5965   else
5966     echo "$ac_t""no" 1>&6
5967   fi
5968
5969     test -z "$with_xmu" && { 
5970 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5971 echo "configure:5972: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5972 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5973
5974 xe_check_libs=" -lXmu "
5975 cat > conftest.$ac_ext <<EOF
5976 #line 5977 "configure"
5977 #include "confdefs.h"
5978 /* Override any gcc2 internal prototype to avoid an error.  */
5979 /* We use char because int might match the return type of a gcc2
5980     builtin and then its argument prototype would still apply.  */
5981 char XmuReadBitmapDataFromFile();
5982
5983 int main() {
5984 XmuReadBitmapDataFromFile()
5985 ; return 0; }
5986 EOF
5987 if { (eval echo configure:5988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5988   rm -rf conftest*
5989   eval "ac_cv_lib_$ac_lib_var=yes"
5990 else
5991   echo "configure: failed program was:" >&5
5992   cat conftest.$ac_ext >&5
5993   rm -rf conftest*
5994   eval "ac_cv_lib_$ac_lib_var=no"
5995 fi
5996 rm -f conftest*
5997 xe_check_libs=""
5998
5999 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6000   echo "$ac_t""yes" 1>&6
6001   with_xmu=yes
6002 else
6003   echo "$ac_t""no" 1>&6
6004 with_xmu=no
6005 fi
6006
6007  }
6008   if test "$with_xmu" = "no"; then
6009     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6010    echo "    xemacs will be linked with \"xmu.o\""
6011  fi
6012   else
6013     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6014     { test "$extra_verbose" = "yes" && cat << \EOF
6015     Defining HAVE_XMU
6016 EOF
6017 cat >> confdefs.h <<\EOF
6018 #define HAVE_XMU 1
6019 EOF
6020 }
6021
6022   fi
6023
6024       
6025 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6026 echo "configure:6027: checking for main in -lXbsd" >&5
6027 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6028
6029 xe_check_libs=" -lXbsd "
6030 cat > conftest.$ac_ext <<EOF
6031 #line 6032 "configure"
6032 #include "confdefs.h"
6033
6034 int main() {
6035 main()
6036 ; return 0; }
6037 EOF
6038 if { (eval echo configure:6039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6039   rm -rf conftest*
6040   eval "ac_cv_lib_$ac_lib_var=yes"
6041 else
6042   echo "configure: failed program was:" >&5
6043   cat conftest.$ac_ext >&5
6044   rm -rf conftest*
6045   eval "ac_cv_lib_$ac_lib_var=no"
6046 fi
6047 rm -f conftest*
6048 xe_check_libs=""
6049
6050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6051   echo "$ac_t""yes" 1>&6
6052   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6053 else
6054   echo "$ac_t""no" 1>&6
6055 fi
6056
6057
6058
6059     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6060         if test "$GCC" = "yes"; then
6061       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6062       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6063     else
6064       case "$CC" in
6065         "xlc" ) CC="xlc_r" ;;
6066         "xlC" ) CC="xlC_r" ;;
6067         "cc"  ) CC="cc_r" ;;
6068       esac
6069     fi
6070   fi
6071
6072 fi 
6073 if test "$with_msw" != "no"; then
6074   echo "checking for MS-Windows" 1>&6
6075 echo "configure:6076: checking for MS-Windows" >&5
6076   
6077 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6078 echo "configure:6079: checking for main in -lgdi32" >&5
6079 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6080
6081 xe_check_libs=" -lgdi32 "
6082 cat > conftest.$ac_ext <<EOF
6083 #line 6084 "configure"
6084 #include "confdefs.h"
6085
6086 int main() {
6087 main()
6088 ; return 0; }
6089 EOF
6090 if { (eval echo configure:6091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6091   rm -rf conftest*
6092   eval "ac_cv_lib_$ac_lib_var=yes"
6093 else
6094   echo "configure: failed program was:" >&5
6095   cat conftest.$ac_ext >&5
6096   rm -rf conftest*
6097   eval "ac_cv_lib_$ac_lib_var=no"
6098 fi
6099 rm -f conftest*
6100 xe_check_libs=""
6101
6102 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6103   echo "$ac_t""yes" 1>&6
6104   with_msw=yes
6105 else
6106   echo "$ac_t""no" 1>&6
6107 fi
6108
6109
6110   if test "$with_msw" = "yes"; then
6111     { test "$extra_verbose" = "yes" && cat << \EOF
6112     Defining HAVE_MS_WINDOWS
6113 EOF
6114 cat >> confdefs.h <<\EOF
6115 #define HAVE_MS_WINDOWS 1
6116 EOF
6117 }
6118
6119     install_pp="$blddir/lib-src/installexe.sh"
6120     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6121     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6122     if test "$window_system" != x11; then
6123         window_system=msw
6124         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6125             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6126    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6127  fi
6128         test "$with_menubars"   != "no" && with_menubars=msw \
6129             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6130    echo "    xemacs will be linked with \"menubar-msw.o\""
6131  fi
6132         test "$with_toolbars"   != "no" && with_toolbars=msw \
6133             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6134    echo "    xemacs will be linked with \"toolbar-msw.o\""
6135  fi
6136         test "$with_dialogs"   != "no" && with_dialogs=msw \
6137             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6138    echo "    xemacs will be linked with \"dialog-msw.o\""
6139  fi
6140         test "$with_widgets"   != "no" && with_widgets=msw
6141     else
6142         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6143    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6144  fi
6145         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6146    echo "    xemacs will be linked with \"menubar-msw.o\""
6147  fi
6148         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6149    echo "    xemacs will be linked with \"toolbar-msw.o\""
6150  fi
6151         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6152    echo "    xemacs will be linked with \"dialog-msw.o\""
6153  fi
6154     fi
6155         cat > conftest.$ac_ext <<EOF
6156 #line 6157 "configure"
6157 #include "confdefs.h"
6158 #include <fcntl.h>
6159     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6160 EOF
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6162 then
6163   { test "$extra_verbose" = "yes" && cat << \EOF
6164     Defining HAVE_MSG_SELECT
6165 EOF
6166 cat >> confdefs.h <<\EOF
6167 #define HAVE_MSG_SELECT 1
6168 EOF
6169 }
6170
6171 else
6172   conftest_rc="$?"
6173   echo "configure: failed program was:" >&5
6174   cat conftest.$ac_ext >&5
6175 fi
6176 rm -fr conftest*
6177     const_is_losing=no
6178     with_file_coding=yes
6179     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
6180    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\""
6181  fi
6182   fi
6183 fi
6184
6185
6186
6187 test -z "$window_system" && window_system="none"
6188
6189 if test "$window_system" = "none"; then
6190   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6191   do
6192     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6193        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6194     fi
6195     eval "with_${feature}=no"
6196   done
6197 else
6198   test -z "$with_toolbars" && with_toolbars=yes
6199 fi
6200
6201 if test "$with_msw" != "yes"; then
6202   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6203   do
6204     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6205        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6206     fi
6207     eval "with_${feature}=no"
6208   done
6209 else
6210   :
6211 fi
6212
6213 if test "$with_x11" != "yes"; then
6214             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6215   do
6216     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6217        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6218     fi
6219     eval "with_${feature}=no"
6220   done
6221 fi
6222
6223 bitmapdir=
6224
6225 case "$window_system" in
6226   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6227   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6228   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6229 esac
6230
6231 case "$x_libraries" in *X11R4* )
6232   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6233   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6234 esac
6235
6236 echo "checking for WM_COMMAND option" 1>&6
6237 echo "configure:6238: checking for WM_COMMAND option" >&5;
6238 if test "$with_wmcommand" != "no"; then
6239   { test "$extra_verbose" = "yes" && cat << \EOF
6240     Defining HAVE_WMCOMMAND
6241 EOF
6242 cat >> confdefs.h <<\EOF
6243 #define HAVE_WMCOMMAND 1
6244 EOF
6245 }
6246
6247 fi
6248
6249 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6250 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6251 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6252 echo "configure:6253: checking for X11/Xauth.h" >&5
6253
6254 cat > conftest.$ac_ext <<EOF
6255 #line 6256 "configure"
6256 #include "confdefs.h"
6257 #include <X11/Xauth.h>
6258 EOF
6259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6260 { (eval echo configure:6261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6262 if test -z "$ac_err"; then
6263   rm -rf conftest*
6264   eval "ac_cv_header_$ac_safe=yes"
6265 else
6266   echo "$ac_err" >&5
6267   echo "configure: failed program was:" >&5
6268   cat conftest.$ac_ext >&5
6269   rm -rf conftest*
6270   eval "ac_cv_header_$ac_safe=no"
6271 fi
6272 rm -f conftest*
6273 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6274   echo "$ac_t""yes" 1>&6
6275   :
6276 else
6277   echo "$ac_t""no" 1>&6
6278 with_xauth=no
6279 fi
6280  }
6281 test -z "$with_xauth" && { 
6282 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6283 echo "configure:6284: checking for XauGetAuthByAddr in -lXau" >&5
6284 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6285
6286 xe_check_libs=" -lXau "
6287 cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290 /* Override any gcc2 internal prototype to avoid an error.  */
6291 /* We use char because int might match the return type of a gcc2
6292     builtin and then its argument prototype would still apply.  */
6293 char XauGetAuthByAddr();
6294
6295 int main() {
6296 XauGetAuthByAddr()
6297 ; return 0; }
6298 EOF
6299 if { (eval echo configure:6300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6300   rm -rf conftest*
6301   eval "ac_cv_lib_$ac_lib_var=yes"
6302 else
6303   echo "configure: failed program was:" >&5
6304   cat conftest.$ac_ext >&5
6305   rm -rf conftest*
6306   eval "ac_cv_lib_$ac_lib_var=no"
6307 fi
6308 rm -f conftest*
6309 xe_check_libs=""
6310
6311 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6312   echo "$ac_t""yes" 1>&6
6313   :
6314 else
6315   echo "$ac_t""no" 1>&6
6316 with_xauth=no
6317 fi
6318
6319  }
6320 test -z "$with_xauth" && with_xauth=yes
6321 if test "$with_xauth" = "yes"; then
6322   { test "$extra_verbose" = "yes" && cat << \EOF
6323     Defining HAVE_XAUTH
6324 EOF
6325 cat >> confdefs.h <<\EOF
6326 #define HAVE_XAUTH 1
6327 EOF
6328 }
6329
6330   
6331 T=""
6332 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
6333 libs_xauth="$T"
6334
6335 fi
6336
6337
6338
6339
6340 if test "$with_tooltalk" != "no" ; then
6341       for dir in "" "Tt/" "desktop/" ; do
6342     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6343 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6344 echo "configure:6345: checking for ${dir}tt_c.h" >&5
6345
6346 cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6349 #include <${dir}tt_c.h>
6350 EOF
6351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6352 { (eval echo configure:6353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6354 if test -z "$ac_err"; then
6355   rm -rf conftest*
6356   eval "ac_cv_header_$ac_safe=yes"
6357 else
6358   echo "$ac_err" >&5
6359   echo "configure: failed program was:" >&5
6360   cat conftest.$ac_ext >&5
6361   rm -rf conftest*
6362   eval "ac_cv_header_$ac_safe=no"
6363 fi
6364 rm -f conftest*
6365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6366   echo "$ac_t""yes" 1>&6
6367   tt_c_h_path="${dir}tt_c.h"; break
6368 else
6369   echo "$ac_t""no" 1>&6
6370 fi
6371
6372   done
6373   if test -z "$tt_c_h_path"; then
6374     if test "$with_tooltalk" = "yes"; then
6375       (echo "$progname: Usage error:"
6376 echo " " "Unable to find required tooltalk header files."
6377 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6378     fi
6379     with_tooltalk=no
6380   fi
6381 fi
6382 if test "$with_tooltalk" != "no" ; then
6383   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6384     
6385 xe_msg_checking="for tt_message_create in -ltt"
6386 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6387 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6388 echo "configure:6389: checking "$xe_msg_checking"" >&5
6389 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6390
6391 xe_check_libs=" -ltt $extra_libs"
6392 cat > conftest.$ac_ext <<EOF
6393 #line 6394 "configure"
6394 #include "confdefs.h"
6395 /* Override any gcc2 internal prototype to avoid an error.  */
6396 /* We use char because int might match the return type of a gcc2
6397     builtin and then its argument prototype would still apply.  */
6398 char tt_message_create();
6399
6400 int main() {
6401 tt_message_create()
6402 ; return 0; }
6403 EOF
6404 if { (eval echo configure:6405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405   rm -rf conftest*
6406   eval "ac_cv_lib_$ac_lib_var=yes"
6407 else
6408   echo "configure: failed program was:" >&5
6409   cat conftest.$ac_ext >&5
6410   rm -rf conftest*
6411   eval "ac_cv_lib_$ac_lib_var=no"
6412 fi
6413 rm -f conftest*
6414 xe_check_libs=""
6415
6416 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6417   echo "$ac_t""yes" 1>&6
6418   tt_libs="-ltt $extra_libs"; break
6419 else
6420   echo "$ac_t""no" 1>&6
6421 :
6422 fi
6423
6424
6425   done
6426   if test -z "$tt_libs"; then
6427     if test "$with_tooltalk" = "yes"; then
6428       (echo "$progname: Usage error:"
6429 echo " " "Unable to find required tooltalk libraries."
6430 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6431     fi
6432     with_tooltalk=no
6433   fi
6434 fi
6435 test -z "$with_tooltalk" && with_tooltalk=yes
6436 if test "$with_tooltalk" = "yes"; then
6437   { test "$extra_verbose" = "yes" && cat << \EOF
6438     Defining TOOLTALK
6439 EOF
6440 cat >> confdefs.h <<\EOF
6441 #define TOOLTALK 1
6442 EOF
6443 }
6444
6445   { test "$extra_verbose" = "yes" && cat << EOF
6446     Defining TT_C_H_PATH = "$tt_c_h_path"
6447 EOF
6448 cat >> confdefs.h <<EOF
6449 #define TT_C_H_PATH "$tt_c_h_path"
6450 EOF
6451 }
6452
6453   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6454   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6455    echo "    xemacs will be linked with \"tooltalk.o\""
6456  fi
6457 fi
6458
6459 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6460 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6461 echo "configure:6462: checking for Dt/Dt.h" >&5
6462
6463 cat > conftest.$ac_ext <<EOF
6464 #line 6465 "configure"
6465 #include "confdefs.h"
6466 #include <Dt/Dt.h>
6467 EOF
6468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6469 { (eval echo configure:6470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6471 if test -z "$ac_err"; then
6472   rm -rf conftest*
6473   eval "ac_cv_header_$ac_safe=yes"
6474 else
6475   echo "$ac_err" >&5
6476   echo "configure: failed program was:" >&5
6477   cat conftest.$ac_ext >&5
6478   rm -rf conftest*
6479   eval "ac_cv_header_$ac_safe=no"
6480 fi
6481 rm -f conftest*
6482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6483   echo "$ac_t""yes" 1>&6
6484   :
6485 else
6486   echo "$ac_t""no" 1>&6
6487 with_cde=no
6488 fi
6489  }
6490 test -z "$with_cde" && { 
6491 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6492 echo "configure:6493: checking for DtDndDragStart in -lDtSvc" >&5
6493 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6494
6495 xe_check_libs=" -lDtSvc "
6496 cat > conftest.$ac_ext <<EOF
6497 #line 6498 "configure"
6498 #include "confdefs.h"
6499 /* Override any gcc2 internal prototype to avoid an error.  */
6500 /* We use char because int might match the return type of a gcc2
6501     builtin and then its argument prototype would still apply.  */
6502 char DtDndDragStart();
6503
6504 int main() {
6505 DtDndDragStart()
6506 ; return 0; }
6507 EOF
6508 if { (eval echo configure:6509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=yes"
6511 else
6512   echo "configure: failed program was:" >&5
6513   cat conftest.$ac_ext >&5
6514   rm -rf conftest*
6515   eval "ac_cv_lib_$ac_lib_var=no"
6516 fi
6517 rm -f conftest*
6518 xe_check_libs=""
6519
6520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6521   echo "$ac_t""yes" 1>&6
6522   :
6523 else
6524   echo "$ac_t""no" 1>&6
6525 with_cde=no
6526 fi
6527
6528  }
6529 test -z "$with_cde" && with_cde=yes
6530 if test "$with_dragndrop" = no; then
6531   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6532   with_cde=no
6533 fi
6534 if test "$with_cde" = "yes" ; then
6535   { test "$extra_verbose" = "yes" && cat << \EOF
6536     Defining HAVE_CDE
6537 EOF
6538 cat >> confdefs.h <<\EOF
6539 #define HAVE_CDE 1
6540 EOF
6541 }
6542
6543   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6544   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6545   with_tooltalk=yes # CDE requires Tooltalk
6546   need_motif=yes    # CDE requires Motif
6547 fi
6548
6549 test "$window_system" != "x11" && with_offix=no
6550 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6551   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6552   with_offix=no
6553 fi
6554 if test "$with_dragndrop" = no; then
6555   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6556   with_offix=no
6557 fi
6558 if test "$with_cde" = yes; then
6559   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6560   with_offix=no
6561 fi
6562 test -z "$with_offix" && with_offix=no
6563 if test "$with_offix" = "yes"; then
6564   { test "$extra_verbose" = "yes" && cat << \EOF
6565     Defining HAVE_OFFIX_DND
6566 EOF
6567 cat >> confdefs.h <<\EOF
6568 #define HAVE_OFFIX_DND 1
6569 EOF
6570 }
6571
6572   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6573   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6574 fi
6575
6576 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6577 echo "configure:6578: checking if drag and drop API is needed" >&5
6578 if test "$with_dragndrop" != "no" ; then
6579   if test -n "$dragndrop_proto" ; then
6580     with_dragndrop=yes
6581     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6582     { test "$extra_verbose" = "yes" && cat << \EOF
6583     Defining HAVE_DRAGNDROP
6584 EOF
6585 cat >> confdefs.h <<\EOF
6586 #define HAVE_DRAGNDROP 1
6587 EOF
6588 }
6589
6590     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6591   else
6592     with_dragndrop=no
6593     echo "$ac_t""no" 1>&6
6594   fi
6595 fi
6596
6597 echo "checking for LDAP" 1>&6
6598 echo "configure:6599: checking for LDAP" >&5
6599 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6600 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6601 echo "configure:6602: checking for ldap.h" >&5
6602
6603 cat > conftest.$ac_ext <<EOF
6604 #line 6605 "configure"
6605 #include "confdefs.h"
6606 #include <ldap.h>
6607 EOF
6608 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6609 { (eval echo configure:6610: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6610 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6611 if test -z "$ac_err"; then
6612   rm -rf conftest*
6613   eval "ac_cv_header_$ac_safe=yes"
6614 else
6615   echo "$ac_err" >&5
6616   echo "configure: failed program was:" >&5
6617   cat conftest.$ac_ext >&5
6618   rm -rf conftest*
6619   eval "ac_cv_header_$ac_safe=no"
6620 fi
6621 rm -f conftest*
6622 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6623   echo "$ac_t""yes" 1>&6
6624   :
6625 else
6626   echo "$ac_t""no" 1>&6
6627 with_ldap=no
6628 fi
6629  }
6630 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6631 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6632 echo "configure:6633: checking for lber.h" >&5
6633
6634 cat > conftest.$ac_ext <<EOF
6635 #line 6636 "configure"
6636 #include "confdefs.h"
6637 #include <lber.h>
6638 EOF
6639 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6640 { (eval echo configure:6641: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6641 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6642 if test -z "$ac_err"; then
6643   rm -rf conftest*
6644   eval "ac_cv_header_$ac_safe=yes"
6645 else
6646   echo "$ac_err" >&5
6647   echo "configure: failed program was:" >&5
6648   cat conftest.$ac_ext >&5
6649   rm -rf conftest*
6650   eval "ac_cv_header_$ac_safe=no"
6651 fi
6652 rm -f conftest*
6653 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6654   echo "$ac_t""yes" 1>&6
6655   :
6656 else
6657   echo "$ac_t""no" 1>&6
6658 with_ldap=no
6659 fi
6660  }
6661 if test "$with_ldap" != "no"; then
6662   
6663 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6664 echo "configure:6665: checking for ldap_search in -lldap" >&5
6665 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6666
6667 xe_check_libs=" -lldap "
6668 cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6671 /* Override any gcc2 internal prototype to avoid an error.  */
6672 /* We use char because int might match the return type of a gcc2
6673     builtin and then its argument prototype would still apply.  */
6674 char ldap_search();
6675
6676 int main() {
6677 ldap_search()
6678 ; return 0; }
6679 EOF
6680 if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6681   rm -rf conftest*
6682   eval "ac_cv_lib_$ac_lib_var=yes"
6683 else
6684   echo "configure: failed program was:" >&5
6685   cat conftest.$ac_ext >&5
6686   rm -rf conftest*
6687   eval "ac_cv_lib_$ac_lib_var=no"
6688 fi
6689 rm -f conftest*
6690 xe_check_libs=""
6691
6692 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6693   echo "$ac_t""yes" 1>&6
6694   with_ldap_nolber=yes
6695 else
6696   echo "$ac_t""no" 1>&6
6697 with_ldap_nolber=no
6698 fi
6699
6700
6701   test "$with_ldap_nolber" = "no" && { 
6702 xe_msg_checking="for ldap_open in -lldap"
6703 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6704 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6705 echo "configure:6706: checking "$xe_msg_checking"" >&5
6706 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6707
6708 xe_check_libs=" -lldap -llber"
6709 cat > conftest.$ac_ext <<EOF
6710 #line 6711 "configure"
6711 #include "confdefs.h"
6712 /* Override any gcc2 internal prototype to avoid an error.  */
6713 /* We use char because int might match the return type of a gcc2
6714     builtin and then its argument prototype would still apply.  */
6715 char ldap_open();
6716
6717 int main() {
6718 ldap_open()
6719 ; return 0; }
6720 EOF
6721 if { (eval echo configure:6722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722   rm -rf conftest*
6723   eval "ac_cv_lib_$ac_lib_var=yes"
6724 else
6725   echo "configure: failed program was:" >&5
6726   cat conftest.$ac_ext >&5
6727   rm -rf conftest*
6728   eval "ac_cv_lib_$ac_lib_var=no"
6729 fi
6730 rm -f conftest*
6731 xe_check_libs=""
6732
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6734   echo "$ac_t""yes" 1>&6
6735   with_ldap_lber=yes
6736 else
6737   echo "$ac_t""no" 1>&6
6738 with_ldap_lber=no
6739 fi
6740
6741  }
6742   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6743 xe_msg_checking="for ldap_open in -lldap"
6744 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6745 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6746 echo "configure:6747: checking "$xe_msg_checking"" >&5
6747 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6748
6749 xe_check_libs=" -lldap -llber -lkrb"
6750 cat > conftest.$ac_ext <<EOF
6751 #line 6752 "configure"
6752 #include "confdefs.h"
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char ldap_open();
6757
6758 int main() {
6759 ldap_open()
6760 ; return 0; }
6761 EOF
6762 if { (eval echo configure:6763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=yes"
6765 else
6766   echo "configure: failed program was:" >&5
6767   cat conftest.$ac_ext >&5
6768   rm -rf conftest*
6769   eval "ac_cv_lib_$ac_lib_var=no"
6770 fi
6771 rm -f conftest*
6772 xe_check_libs=""
6773
6774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6775   echo "$ac_t""yes" 1>&6
6776   with_ldap_krb=yes
6777 else
6778   echo "$ac_t""no" 1>&6
6779 with_ldap_krb=no
6780 fi
6781
6782  }
6783   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6784 xe_msg_checking="for ldap_open in -lldap"
6785 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6786 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6787 echo "configure:6788: checking "$xe_msg_checking"" >&5
6788 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6789
6790 xe_check_libs=" -lldap -llber -lkrb -ldes"
6791 cat > conftest.$ac_ext <<EOF
6792 #line 6793 "configure"
6793 #include "confdefs.h"
6794 /* Override any gcc2 internal prototype to avoid an error.  */
6795 /* We use char because int might match the return type of a gcc2
6796     builtin and then its argument prototype would still apply.  */
6797 char ldap_open();
6798
6799 int main() {
6800 ldap_open()
6801 ; return 0; }
6802 EOF
6803 if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6804   rm -rf conftest*
6805   eval "ac_cv_lib_$ac_lib_var=yes"
6806 else
6807   echo "configure: failed program was:" >&5
6808   cat conftest.$ac_ext >&5
6809   rm -rf conftest*
6810   eval "ac_cv_lib_$ac_lib_var=no"
6811 fi
6812 rm -f conftest*
6813 xe_check_libs=""
6814
6815 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6816   echo "$ac_t""yes" 1>&6
6817   with_ldap_krbdes=yes
6818 else
6819   echo "$ac_t""no" 1>&6
6820 with_ldap_krbdes=no
6821 fi
6822
6823  }
6824   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
6825 fi
6826 if test "$with_ldap" = "yes"; then
6827   { test "$extra_verbose" = "yes" && cat << \EOF
6828     Defining HAVE_LDAP
6829 EOF
6830 cat >> confdefs.h <<\EOF
6831 #define HAVE_LDAP 1
6832 EOF
6833 }
6834
6835   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6836    echo "    xemacs will be linked with \"eldap.o\""
6837  fi
6838   if test "$with_ldap_nolber" = "yes" ; then
6839     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6840   else
6841     if test "$with_ldap_krb" = "yes" ; then
6842       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6843     fi
6844     if test "$with_ldap_krbdes" = "yes" ; then
6845       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6846       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6847     fi
6848     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6849     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6850   fi
6851   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6852 do
6853 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6854 echo "configure:6855: checking for $ac_func" >&5
6855
6856 cat > conftest.$ac_ext <<EOF
6857 #line 6858 "configure"
6858 #include "confdefs.h"
6859 /* System header to define __stub macros and hopefully few prototypes,
6860     which can conflict with char $ac_func(); below.  */
6861 #include <assert.h>
6862 /* Override any gcc2 internal prototype to avoid an error.  */
6863 /* We use char because int might match the return type of a gcc2
6864     builtin and then its argument prototype would still apply.  */
6865 char $ac_func();
6866
6867 int main() {
6868
6869 /* The GNU C library defines this for functions which it implements
6870     to always fail with ENOSYS.  Some functions are actually named
6871     something starting with __ and the normal name is an alias.  */
6872 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6873 choke me
6874 #else
6875 $ac_func();
6876 #endif
6877
6878 ; return 0; }
6879 EOF
6880 if { (eval echo configure:6881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6881   rm -rf conftest*
6882   eval "ac_cv_func_$ac_func=yes"
6883 else
6884   echo "configure: failed program was:" >&5
6885   cat conftest.$ac_ext >&5
6886   rm -rf conftest*
6887   eval "ac_cv_func_$ac_func=no"
6888 fi
6889 rm -f conftest*
6890
6891 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6892   echo "$ac_t""yes" 1>&6
6893     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6894   { test "$extra_verbose" = "yes" && cat << EOF
6895     Defining $ac_tr_func
6896 EOF
6897 cat >> confdefs.h <<EOF
6898 #define $ac_tr_func 1
6899 EOF
6900 }
6901  
6902 else
6903   echo "$ac_t""no" 1>&6
6904 fi
6905 done
6906
6907 fi
6908
6909
6910 if test "$window_system" != "none"; then
6911   echo "checking for graphics libraries" 1>&6
6912 echo "configure:6913: checking for graphics libraries" >&5
6913
6914     xpm_problem=""
6915   if test -z "$with_xpm"; then
6916     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6917 echo "configure:6918: checking for Xpm - no older than 3.4f" >&5
6918     xe_check_libs=-lXpm
6919     cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6922 #include <X11/xpm.h>
6923     int main(int c, char **v) {
6924     return c == 1 ? 0 :
6925       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6926       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6927 EOF
6928 if { (eval echo configure:6929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6929 then
6930   ./conftest dummy_arg; xpm_status=$?;
6931       if test "$xpm_status" = "0"; then
6932         with_xpm=yes;
6933       else
6934         with_xpm=no;
6935         if test "$xpm_status" = "1"; then
6936           xpm_problem="Xpm library version and header file version don't match!"
6937         elif test "$xpm_status" = "2"; then
6938           xpm_problem="Xpm library version is too old!"
6939         else
6940           xpm_problem="Internal xpm detection logic error!"
6941         fi
6942         echo "
6943 *** WARNING *** $xpm_problem
6944   I'm not touching that with a 10-foot pole!
6945   If you really want to use the installed version of Xpm, rerun
6946   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6947     fi
6948 else
6949   conftest_rc="$?"
6950   echo "configure: failed program was:" >&5
6951   cat conftest.$ac_ext >&5
6952   rm -fr conftest*
6953   with_xpm=no
6954 fi
6955 rm -fr conftest*
6956     xe_check_libs=
6957     echo "$ac_t""$with_xpm" 1>&6
6958   fi
6959   if test "$with_xpm" = "yes"; then
6960     { test "$extra_verbose" = "yes" && cat << \EOF
6961     Defining HAVE_XPM
6962 EOF
6963 cat >> confdefs.h <<\EOF
6964 #define HAVE_XPM 1
6965 EOF
6966 }
6967
6968     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6969     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6970 echo "configure:6971: checking for \"FOR_MSW\" xpm" >&5
6971     xe_check_libs=-lXpm
6972     cat > conftest.$ac_ext <<EOF
6973 #line 6974 "configure"
6974 #include "confdefs.h"
6975
6976 int main() {
6977 XpmCreatePixmapFromData()
6978 ; return 0; }
6979 EOF
6980 if { (eval echo configure:6981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6981   rm -rf conftest*
6982   xpm_for_msw=no
6983 else
6984   echo "configure: failed program was:" >&5
6985   cat conftest.$ac_ext >&5
6986   rm -rf conftest*
6987   xpm_for_msw=yes
6988 fi
6989 rm -f conftest*
6990     xe_check_libs=
6991     echo "$ac_t""$xpm_for_msw" 1>&6
6992     if test "$xpm_for_msw" = "yes"; then
6993       { test "$extra_verbose" = "yes" && cat << \EOF
6994     Defining FOR_MSW
6995 EOF
6996 cat >> confdefs.h <<\EOF
6997 #define FOR_MSW 1
6998 EOF
6999 }
7000
7001     fi
7002   fi
7003
7004     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7005 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7006 echo "configure:7007: checking for compface.h" >&5
7007
7008 cat > conftest.$ac_ext <<EOF
7009 #line 7010 "configure"
7010 #include "confdefs.h"
7011 #include <compface.h>
7012 EOF
7013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7014 { (eval echo configure:7015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7016 if test -z "$ac_err"; then
7017   rm -rf conftest*
7018   eval "ac_cv_header_$ac_safe=yes"
7019 else
7020   echo "$ac_err" >&5
7021   echo "configure: failed program was:" >&5
7022   cat conftest.$ac_ext >&5
7023   rm -rf conftest*
7024   eval "ac_cv_header_$ac_safe=no"
7025 fi
7026 rm -f conftest*
7027 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7028   echo "$ac_t""yes" 1>&6
7029   :
7030 else
7031   echo "$ac_t""no" 1>&6
7032 with_xface=no
7033 fi
7034  }
7035   test -z "$with_xface" && { 
7036 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7037 echo "configure:7038: checking for UnGenFace in -lcompface" >&5
7038 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7039
7040 xe_check_libs=" -lcompface "
7041 cat > conftest.$ac_ext <<EOF
7042 #line 7043 "configure"
7043 #include "confdefs.h"
7044 /* Override any gcc2 internal prototype to avoid an error.  */
7045 /* We use char because int might match the return type of a gcc2
7046     builtin and then its argument prototype would still apply.  */
7047 char UnGenFace();
7048
7049 int main() {
7050 UnGenFace()
7051 ; return 0; }
7052 EOF
7053 if { (eval echo configure:7054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7054   rm -rf conftest*
7055   eval "ac_cv_lib_$ac_lib_var=yes"
7056 else
7057   echo "configure: failed program was:" >&5
7058   cat conftest.$ac_ext >&5
7059   rm -rf conftest*
7060   eval "ac_cv_lib_$ac_lib_var=no"
7061 fi
7062 rm -f conftest*
7063 xe_check_libs=""
7064
7065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7066   echo "$ac_t""yes" 1>&6
7067   : 
7068 else
7069   echo "$ac_t""no" 1>&6
7070 with_xface=no
7071 fi
7072
7073  }
7074   test -z "$with_xface" && with_xface=yes
7075   if test "$with_xface" = "yes"; then
7076     { test "$extra_verbose" = "yes" && cat << \EOF
7077     Defining HAVE_XFACE
7078 EOF
7079 cat >> confdefs.h <<\EOF
7080 #define HAVE_XFACE 1
7081 EOF
7082 }
7083
7084     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7085   fi
7086
7087         if test "$with_gif" != "no"; then
7088     with_gif="yes"
7089     { test "$extra_verbose" = "yes" && cat << \EOF
7090     Defining HAVE_GIF
7091 EOF
7092 cat >> confdefs.h <<\EOF
7093 #define HAVE_GIF 1
7094 EOF
7095 }
7096
7097     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7098    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7099  fi
7100   fi
7101
7102       if test "$with_png $with_tiff" != "no no"; then
7103     
7104 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7105 echo "configure:7106: checking for inflate in -lc" >&5
7106 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7107
7108 xe_check_libs=" -lc "
7109 cat > conftest.$ac_ext <<EOF
7110 #line 7111 "configure"
7111 #include "confdefs.h"
7112 /* Override any gcc2 internal prototype to avoid an error.  */
7113 /* We use char because int might match the return type of a gcc2
7114     builtin and then its argument prototype would still apply.  */
7115 char inflate();
7116
7117 int main() {
7118 inflate()
7119 ; return 0; }
7120 EOF
7121 if { (eval echo configure:7122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7122   rm -rf conftest*
7123   eval "ac_cv_lib_$ac_lib_var=yes"
7124 else
7125   echo "configure: failed program was:" >&5
7126   cat conftest.$ac_ext >&5
7127   rm -rf conftest*
7128   eval "ac_cv_lib_$ac_lib_var=no"
7129 fi
7130 rm -f conftest*
7131 xe_check_libs=""
7132
7133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7134   echo "$ac_t""yes" 1>&6
7135   :
7136 else
7137   echo "$ac_t""no" 1>&6
7138
7139 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7140 echo "configure:7141: checking for inflate in -lz" >&5
7141 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7142
7143 xe_check_libs=" -lz "
7144 cat > conftest.$ac_ext <<EOF
7145 #line 7146 "configure"
7146 #include "confdefs.h"
7147 /* Override any gcc2 internal prototype to avoid an error.  */
7148 /* We use char because int might match the return type of a gcc2
7149     builtin and then its argument prototype would still apply.  */
7150 char inflate();
7151
7152 int main() {
7153 inflate()
7154 ; return 0; }
7155 EOF
7156 if { (eval echo configure:7157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7157   rm -rf conftest*
7158   eval "ac_cv_lib_$ac_lib_var=yes"
7159 else
7160   echo "configure: failed program was:" >&5
7161   cat conftest.$ac_ext >&5
7162   rm -rf conftest*
7163   eval "ac_cv_lib_$ac_lib_var=no"
7164 fi
7165 rm -f conftest*
7166 xe_check_libs=""
7167
7168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7169   echo "$ac_t""yes" 1>&6
7170   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7171 else
7172   echo "$ac_t""no" 1>&6
7173
7174 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7175 echo "configure:7176: checking for inflate in -lgz" >&5
7176 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7177
7178 xe_check_libs=" -lgz "
7179 cat > conftest.$ac_ext <<EOF
7180 #line 7181 "configure"
7181 #include "confdefs.h"
7182 /* Override any gcc2 internal prototype to avoid an error.  */
7183 /* We use char because int might match the return type of a gcc2
7184     builtin and then its argument prototype would still apply.  */
7185 char inflate();
7186
7187 int main() {
7188 inflate()
7189 ; return 0; }
7190 EOF
7191 if { (eval echo configure:7192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7192   rm -rf conftest*
7193   eval "ac_cv_lib_$ac_lib_var=yes"
7194 else
7195   echo "configure: failed program was:" >&5
7196   cat conftest.$ac_ext >&5
7197   rm -rf conftest*
7198   eval "ac_cv_lib_$ac_lib_var=no"
7199 fi
7200 rm -f conftest*
7201 xe_check_libs=""
7202
7203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7204   echo "$ac_t""yes" 1>&6
7205   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7206 else
7207   echo "$ac_t""no" 1>&6
7208 fi
7209
7210
7211 fi
7212
7213
7214 fi
7215
7216
7217   fi
7218
7219     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7220 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7221 echo "configure:7222: checking for jpeglib.h" >&5
7222
7223 cat > conftest.$ac_ext <<EOF
7224 #line 7225 "configure"
7225 #include "confdefs.h"
7226 #include <jpeglib.h>
7227 EOF
7228 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7229 { (eval echo configure:7230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7230 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7231 if test -z "$ac_err"; then
7232   rm -rf conftest*
7233   eval "ac_cv_header_$ac_safe=yes"
7234 else
7235   echo "$ac_err" >&5
7236   echo "configure: failed program was:" >&5
7237   cat conftest.$ac_ext >&5
7238   rm -rf conftest*
7239   eval "ac_cv_header_$ac_safe=no"
7240 fi
7241 rm -f conftest*
7242 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7243   echo "$ac_t""yes" 1>&6
7244   :
7245 else
7246   echo "$ac_t""no" 1>&6
7247 with_jpeg=no
7248 fi
7249  }
7250   test -z "$with_jpeg" && { 
7251 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7252 echo "configure:7253: checking for jpeg_destroy_decompress in -ljpeg" >&5
7253 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7254
7255 xe_check_libs=" -ljpeg "
7256 cat > conftest.$ac_ext <<EOF
7257 #line 7258 "configure"
7258 #include "confdefs.h"
7259 /* Override any gcc2 internal prototype to avoid an error.  */
7260 /* We use char because int might match the return type of a gcc2
7261     builtin and then its argument prototype would still apply.  */
7262 char jpeg_destroy_decompress();
7263
7264 int main() {
7265 jpeg_destroy_decompress()
7266 ; return 0; }
7267 EOF
7268 if { (eval echo configure:7269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7269   rm -rf conftest*
7270   eval "ac_cv_lib_$ac_lib_var=yes"
7271 else
7272   echo "configure: failed program was:" >&5
7273   cat conftest.$ac_ext >&5
7274   rm -rf conftest*
7275   eval "ac_cv_lib_$ac_lib_var=no"
7276 fi
7277 rm -f conftest*
7278 xe_check_libs=""
7279
7280 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7281   echo "$ac_t""yes" 1>&6
7282   :
7283 else
7284   echo "$ac_t""no" 1>&6
7285 with_jpeg=no
7286 fi
7287
7288  }
7289   test -z "$with_jpeg" && with_jpeg=yes
7290   if test "$with_jpeg" = "yes"; then
7291     { test "$extra_verbose" = "yes" && cat << \EOF
7292     Defining HAVE_JPEG
7293 EOF
7294 cat >> confdefs.h <<\EOF
7295 #define HAVE_JPEG 1
7296 EOF
7297 }
7298
7299     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7300   fi
7301
7302     png_problem=""
7303   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7304 echo "configure:7305: checking for pow" >&5
7305
7306 cat > conftest.$ac_ext <<EOF
7307 #line 7308 "configure"
7308 #include "confdefs.h"
7309 /* System header to define __stub macros and hopefully few prototypes,
7310     which can conflict with char pow(); below.  */
7311 #include <assert.h>
7312 /* Override any gcc2 internal prototype to avoid an error.  */
7313 /* We use char because int might match the return type of a gcc2
7314     builtin and then its argument prototype would still apply.  */
7315 char pow();
7316
7317 int main() {
7318
7319 /* The GNU C library defines this for functions which it implements
7320     to always fail with ENOSYS.  Some functions are actually named
7321     something starting with __ and the normal name is an alias.  */
7322 #if defined (__stub_pow) || defined (__stub___pow)
7323 choke me
7324 #else
7325 pow();
7326 #endif
7327
7328 ; return 0; }
7329 EOF
7330 if { (eval echo configure:7331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7331   rm -rf conftest*
7332   eval "ac_cv_func_pow=yes"
7333 else
7334   echo "configure: failed program was:" >&5
7335   cat conftest.$ac_ext >&5
7336   rm -rf conftest*
7337   eval "ac_cv_func_pow=no"
7338 fi
7339 rm -f conftest*
7340
7341 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7342   echo "$ac_t""yes" 1>&6
7343   :
7344 else
7345   echo "$ac_t""no" 1>&6
7346 with_png=no
7347 fi
7348  }
7349   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7350 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7351 echo "configure:7352: checking for png.h" >&5
7352
7353 cat > conftest.$ac_ext <<EOF
7354 #line 7355 "configure"
7355 #include "confdefs.h"
7356 #include <png.h>
7357 EOF
7358 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7359 { (eval echo configure:7360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7360 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7361 if test -z "$ac_err"; then
7362   rm -rf conftest*
7363   eval "ac_cv_header_$ac_safe=yes"
7364 else
7365   echo "$ac_err" >&5
7366   echo "configure: failed program was:" >&5
7367   cat conftest.$ac_ext >&5
7368   rm -rf conftest*
7369   eval "ac_cv_header_$ac_safe=no"
7370 fi
7371 rm -f conftest*
7372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7373   echo "$ac_t""yes" 1>&6
7374   :
7375 else
7376   echo "$ac_t""no" 1>&6
7377 with_png=no
7378 fi
7379  }
7380   test -z "$with_png" && { 
7381 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7382 echo "configure:7383: checking for png_read_image in -lpng" >&5
7383 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7384
7385 xe_check_libs=" -lpng "
7386 cat > conftest.$ac_ext <<EOF
7387 #line 7388 "configure"
7388 #include "confdefs.h"
7389 /* Override any gcc2 internal prototype to avoid an error.  */
7390 /* We use char because int might match the return type of a gcc2
7391     builtin and then its argument prototype would still apply.  */
7392 char png_read_image();
7393
7394 int main() {
7395 png_read_image()
7396 ; return 0; }
7397 EOF
7398 if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7399   rm -rf conftest*
7400   eval "ac_cv_lib_$ac_lib_var=yes"
7401 else
7402   echo "configure: failed program was:" >&5
7403   cat conftest.$ac_ext >&5
7404   rm -rf conftest*
7405   eval "ac_cv_lib_$ac_lib_var=no"
7406 fi
7407 rm -f conftest*
7408 xe_check_libs=""
7409
7410 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7411   echo "$ac_t""yes" 1>&6
7412   :
7413 else
7414   echo "$ac_t""no" 1>&6
7415 with_png=no
7416 fi
7417
7418  }
7419   if test -z "$with_png"; then
7420     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7421 echo "configure:7422: checking for workable png version information" >&5
7422     xe_check_libs="-lpng -lz"
7423     cat > conftest.$ac_ext <<EOF
7424 #line 7425 "configure"
7425 #include "confdefs.h"
7426 #include <png.h>
7427     int main(int c, char **v) {
7428     if (c == 1) return 0;
7429     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7430     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7431 EOF
7432 if { (eval echo configure:7433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7433 then
7434   ./conftest dummy_arg; png_status=$?;
7435       if test "$png_status" = "0"; then
7436         with_png=yes;
7437       else
7438         with_png=no;
7439         if test "$png_status" = "1"; then
7440           png_problem="PNG library version and header file don't match!"
7441         elif test "$png_status" = "2"; then
7442           png_problem="PNG library version too old (pre 1.0.2)!"
7443         fi
7444         echo "
7445 *** WARNING *** $png_problem
7446   I'm not touching that with a 10-foot pole!
7447   If you really want to use the installed version of libPNG, rerun
7448   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7449     fi
7450 else
7451   conftest_rc="$?"
7452   echo "configure: failed program was:" >&5
7453   cat conftest.$ac_ext >&5
7454   rm -fr conftest*
7455   with_png=no
7456 fi
7457 rm -fr conftest*
7458     xe_check_libs=
7459     echo "$ac_t""$with_png" 1>&6
7460   fi
7461   if test "$with_png" = "yes"; then
7462     { test "$extra_verbose" = "yes" && cat << \EOF
7463     Defining HAVE_PNG
7464 EOF
7465 cat >> confdefs.h <<\EOF
7466 #define HAVE_PNG 1
7467 EOF
7468 }
7469
7470     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7471   fi
7472
7473     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7474 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7475 echo "configure:7476: checking for tiffio.h" >&5
7476
7477 cat > conftest.$ac_ext <<EOF
7478 #line 7479 "configure"
7479 #include "confdefs.h"
7480 #include <tiffio.h>
7481 EOF
7482 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7483 { (eval echo configure:7484: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7484 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7485 if test -z "$ac_err"; then
7486   rm -rf conftest*
7487   eval "ac_cv_header_$ac_safe=yes"
7488 else
7489   echo "$ac_err" >&5
7490   echo "configure: failed program was:" >&5
7491   cat conftest.$ac_ext >&5
7492   rm -rf conftest*
7493   eval "ac_cv_header_$ac_safe=no"
7494 fi
7495 rm -f conftest*
7496 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7497   echo "$ac_t""yes" 1>&6
7498   :
7499 else
7500   echo "$ac_t""no" 1>&6
7501 with_tiff=no
7502 fi
7503  }
7504   test -z "$with_tiff" && { 
7505 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7506 echo "configure:7507: checking for TIFFClientOpen in -ltiff" >&5
7507 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7508
7509 xe_check_libs=" -ltiff "
7510 cat > conftest.$ac_ext <<EOF
7511 #line 7512 "configure"
7512 #include "confdefs.h"
7513 /* Override any gcc2 internal prototype to avoid an error.  */
7514 /* We use char because int might match the return type of a gcc2
7515     builtin and then its argument prototype would still apply.  */
7516 char TIFFClientOpen();
7517
7518 int main() {
7519 TIFFClientOpen()
7520 ; return 0; }
7521 EOF
7522 if { (eval echo configure:7523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7523   rm -rf conftest*
7524   eval "ac_cv_lib_$ac_lib_var=yes"
7525 else
7526   echo "configure: failed program was:" >&5
7527   cat conftest.$ac_ext >&5
7528   rm -rf conftest*
7529   eval "ac_cv_lib_$ac_lib_var=no"
7530 fi
7531 rm -f conftest*
7532 xe_check_libs=""
7533
7534 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7535   echo "$ac_t""yes" 1>&6
7536   :
7537 else
7538   echo "$ac_t""no" 1>&6
7539 with_tiff=no
7540 fi
7541
7542  }
7543   test -z "$with_tiff" && with_tiff=yes
7544   if test "$with_tiff" = "yes"; then
7545     { test "$extra_verbose" = "yes" && cat << \EOF
7546     Defining HAVE_TIFF
7547 EOF
7548 cat >> confdefs.h <<\EOF
7549 #define HAVE_TIFF 1
7550 EOF
7551 }
7552
7553     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7554   fi
7555 fi
7556
7557
7558 if test "$with_x11" = "yes"; then
7559
7560   echo "checking for X11 graphics libraries" 1>&6
7561 echo "configure:7562: checking for X11 graphics libraries" >&5
7562
7563   echo "checking for the Athena widgets" 1>&6
7564 echo "configure:7565: checking for the Athena widgets" >&5
7565
7566     case "$with_athena" in
7567         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7568     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7569     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7570     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7571     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7572     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7573   esac
7574
7575     if test "$athena_3d" = "no"; then
7576     
7577 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7578 echo "configure:7579: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7579 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7580
7581 xe_check_libs=" -l$athena_variant "
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error.  */
7586 /* We use char because int might match the return type of a gcc2
7587     builtin and then its argument prototype would still apply.  */
7588 char XawScrollbarSetThumb();
7589
7590 int main() {
7591 XawScrollbarSetThumb()
7592 ; return 0; }
7593 EOF
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=yes"
7597 else
7598   echo "configure: failed program was:" >&5
7599   cat conftest.$ac_ext >&5
7600   rm -rf conftest*
7601   eval "ac_cv_lib_$ac_lib_var=no"
7602 fi
7603 rm -f conftest*
7604 xe_check_libs=""
7605
7606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7607   echo "$ac_t""yes" 1>&6
7608           
7609 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7610 echo "configure:7611: checking for threeDClassRec in -l$athena_variant" >&5
7611 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7612
7613 xe_check_libs=" -l$athena_variant "
7614 cat > conftest.$ac_ext <<EOF
7615 #line 7616 "configure"
7616 #include "confdefs.h"
7617 /* Override any gcc2 internal prototype to avoid an error.  */
7618 /* We use char because int might match the return type of a gcc2
7619     builtin and then its argument prototype would still apply.  */
7620 char threeDClassRec();
7621
7622 int main() {
7623 threeDClassRec()
7624 ; return 0; }
7625 EOF
7626 if { (eval echo configure:7627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7627   rm -rf conftest*
7628   eval "ac_cv_lib_$ac_lib_var=yes"
7629 else
7630   echo "configure: failed program was:" >&5
7631   cat conftest.$ac_ext >&5
7632   rm -rf conftest*
7633   eval "ac_cv_lib_$ac_lib_var=no"
7634 fi
7635 rm -f conftest*
7636 xe_check_libs=""
7637
7638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7639   echo "$ac_t""yes" 1>&6
7640   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7641 else
7642   echo "$ac_t""no" 1>&6
7643 athena_lib=$athena_variant
7644 fi
7645
7646
7647       
7648 else
7649   echo "$ac_t""no" 1>&6
7650 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7651 fi
7652
7653
7654   else
7655         
7656 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7657 echo "configure:7658: checking for threeDClassRec in -l$athena_variant" >&5
7658 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7659
7660 xe_check_libs=" -l$athena_variant "
7661 cat > conftest.$ac_ext <<EOF
7662 #line 7663 "configure"
7663 #include "confdefs.h"
7664 /* Override any gcc2 internal prototype to avoid an error.  */
7665 /* We use char because int might match the return type of a gcc2
7666     builtin and then its argument prototype would still apply.  */
7667 char threeDClassRec();
7668
7669 int main() {
7670 threeDClassRec()
7671 ; return 0; }
7672 EOF
7673 if { (eval echo configure:7674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7674   rm -rf conftest*
7675   eval "ac_cv_lib_$ac_lib_var=yes"
7676 else
7677   echo "configure: failed program was:" >&5
7678   cat conftest.$ac_ext >&5
7679   rm -rf conftest*
7680   eval "ac_cv_lib_$ac_lib_var=no"
7681 fi
7682 rm -f conftest*
7683 xe_check_libs=""
7684
7685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7686   echo "$ac_t""yes" 1>&6
7687   athena_lib=$athena_variant
7688 else
7689   echo "$ac_t""no" 1>&6
7690 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7691 echo "configure:7692: checking for threeDClassRec in -lXaw" >&5
7692 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7693
7694 xe_check_libs=" -lXaw "
7695 cat > conftest.$ac_ext <<EOF
7696 #line 7697 "configure"
7697 #include "confdefs.h"
7698 /* Override any gcc2 internal prototype to avoid an error.  */
7699 /* We use char because int might match the return type of a gcc2
7700     builtin and then its argument prototype would still apply.  */
7701 char threeDClassRec();
7702
7703 int main() {
7704 threeDClassRec()
7705 ; return 0; }
7706 EOF
7707 if { (eval echo configure:7708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7708   rm -rf conftest*
7709   eval "ac_cv_lib_$ac_lib_var=yes"
7710 else
7711   echo "configure: failed program was:" >&5
7712   cat conftest.$ac_ext >&5
7713   rm -rf conftest*
7714   eval "ac_cv_lib_$ac_lib_var=no"
7715 fi
7716 rm -f conftest*
7717 xe_check_libs=""
7718
7719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7720   echo "$ac_t""yes" 1>&6
7721   athena_lib=Xaw; 
7722           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7723         
7724 else
7725   echo "$ac_t""no" 1>&6
7726 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7727 fi
7728
7729
7730 fi
7731
7732
7733   fi
7734
7735     if test "$athena_3d" = "no"; then
7736     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7737 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7738 echo "configure:7739: checking for X11/Xaw/ThreeD.h" >&5
7739
7740 cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 #include <X11/Xaw/ThreeD.h>
7744 EOF
7745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7746 { (eval echo configure:7747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7748 if test -z "$ac_err"; then
7749   rm -rf conftest*
7750   eval "ac_cv_header_$ac_safe=yes"
7751 else
7752   echo "$ac_err" >&5
7753   echo "configure: failed program was:" >&5
7754   cat conftest.$ac_ext >&5
7755   rm -rf conftest*
7756   eval "ac_cv_header_$ac_safe=no"
7757 fi
7758 rm -f conftest*
7759 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7760   echo "$ac_t""yes" 1>&6
7761   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7762 else
7763   echo "$ac_t""no" 1>&6
7764 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7765 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7766 echo "configure:7767: checking for X11/Xaw/XawInit.h" >&5
7767
7768 cat > conftest.$ac_ext <<EOF
7769 #line 7770 "configure"
7770 #include "confdefs.h"
7771 #include <X11/Xaw/XawInit.h>
7772 EOF
7773 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7774 { (eval echo configure:7775: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7775 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7776 if test -z "$ac_err"; then
7777   rm -rf conftest*
7778   eval "ac_cv_header_$ac_safe=yes"
7779 else
7780   echo "$ac_err" >&5
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   eval "ac_cv_header_$ac_safe=no"
7785 fi
7786 rm -f conftest*
7787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7788   echo "$ac_t""yes" 1>&6
7789   athena_h_path=X11/Xaw
7790 else
7791   echo "$ac_t""no" 1>&6
7792 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7793 fi
7794
7795 fi
7796
7797   else
7798             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7799 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7800 echo "configure:7801: checking for X11/$athena_variant/XawInit.h" >&5
7801
7802 cat > conftest.$ac_ext <<EOF
7803 #line 7804 "configure"
7804 #include "confdefs.h"
7805 #include <X11/$athena_variant/XawInit.h>
7806 EOF
7807 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7808 { (eval echo configure:7809: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7809 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7810 if test -z "$ac_err"; then
7811   rm -rf conftest*
7812   eval "ac_cv_header_$ac_safe=yes"
7813 else
7814   echo "$ac_err" >&5
7815   echo "configure: failed program was:" >&5
7816   cat conftest.$ac_ext >&5
7817   rm -rf conftest*
7818   eval "ac_cv_header_$ac_safe=no"
7819 fi
7820 rm -f conftest*
7821 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7822   echo "$ac_t""yes" 1>&6
7823   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
7824 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
7825 echo "configure:7826: checking for X11/$athena_variant/ThreeD.h" >&5
7826
7827 cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830 #include <X11/$athena_variant/ThreeD.h>
7831 EOF
7832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7833 { (eval echo configure:7834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7835 if test -z "$ac_err"; then
7836   rm -rf conftest*
7837   eval "ac_cv_header_$ac_safe=yes"
7838 else
7839   echo "$ac_err" >&5
7840   echo "configure: failed program was:" >&5
7841   cat conftest.$ac_ext >&5
7842   rm -rf conftest*
7843   eval "ac_cv_header_$ac_safe=no"
7844 fi
7845 rm -f conftest*
7846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7847   echo "$ac_t""yes" 1>&6
7848   athena_h_path=X11/$athena_variant
7849 else
7850   echo "$ac_t""no" 1>&6
7851 fi
7852
7853 else
7854   echo "$ac_t""no" 1>&6
7855 fi
7856
7857
7858         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
7859       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
7860 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
7861 echo "configure:7862: checking for X11/Xaw3d/XawInit.h" >&5
7862
7863 cat > conftest.$ac_ext <<EOF
7864 #line 7865 "configure"
7865 #include "confdefs.h"
7866 #include <X11/Xaw3d/XawInit.h>
7867 EOF
7868 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7869 { (eval echo configure:7870: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7870 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7871 if test -z "$ac_err"; then
7872   rm -rf conftest*
7873   eval "ac_cv_header_$ac_safe=yes"
7874 else
7875   echo "$ac_err" >&5
7876   echo "configure: failed program was:" >&5
7877   cat conftest.$ac_ext >&5
7878   rm -rf conftest*
7879   eval "ac_cv_header_$ac_safe=no"
7880 fi
7881 rm -f conftest*
7882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7883   echo "$ac_t""yes" 1>&6
7884   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
7885 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
7886 echo "configure:7887: checking for X11/Xaw3d/ThreeD.h" >&5
7887
7888 cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 #include <X11/Xaw3d/ThreeD.h>
7892 EOF
7893 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7894 { (eval echo configure:7895: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7895 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7896 if test -z "$ac_err"; then
7897   rm -rf conftest*
7898   eval "ac_cv_header_$ac_safe=yes"
7899 else
7900   echo "$ac_err" >&5
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   eval "ac_cv_header_$ac_safe=no"
7905 fi
7906 rm -f conftest*
7907 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7908   echo "$ac_t""yes" 1>&6
7909   
7910             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
7911             athena_h_path=X11/Xaw3d
7912           
7913 else
7914   echo "$ac_t""no" 1>&6
7915 fi
7916
7917 else
7918   echo "$ac_t""no" 1>&6
7919 fi
7920
7921     fi
7922
7923             if test -z "$athena_h_path"; then
7924       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7925 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7926 echo "configure:7927: checking for X11/Xaw/ThreeD.h" >&5
7927
7928 cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931 #include <X11/Xaw/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   
7950           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
7951           athena_h_path=X11/Xaw
7952         
7953 else
7954   echo "$ac_t""no" 1>&6
7955 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
7956 fi
7957
7958     fi
7959   fi
7960
7961     if test -n "$athena_lib" -a -n "$athena_h_path"; then
7962     have_xaw=yes
7963   else
7964     have_xaw=no
7965   fi
7966
7967     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7968 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7969 echo "configure:7970: checking for Xm/Xm.h" >&5
7970
7971 cat > conftest.$ac_ext <<EOF
7972 #line 7973 "configure"
7973 #include "confdefs.h"
7974 #include <Xm/Xm.h>
7975 EOF
7976 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7977 { (eval echo configure:7978: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7978 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7979 if test -z "$ac_err"; then
7980   rm -rf conftest*
7981   eval "ac_cv_header_$ac_safe=yes"
7982 else
7983   echo "$ac_err" >&5
7984   echo "configure: failed program was:" >&5
7985   cat conftest.$ac_ext >&5
7986   rm -rf conftest*
7987   eval "ac_cv_header_$ac_safe=no"
7988 fi
7989 rm -f conftest*
7990 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7991   echo "$ac_t""yes" 1>&6
7992   
7993 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7994 echo "configure:7995: checking for XmStringFree in -lXm" >&5
7995 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7996
7997 xe_check_libs=" -lXm "
7998 cat > conftest.$ac_ext <<EOF
7999 #line 8000 "configure"
8000 #include "confdefs.h"
8001 /* Override any gcc2 internal prototype to avoid an error.  */
8002 /* We use char because int might match the return type of a gcc2
8003     builtin and then its argument prototype would still apply.  */
8004 char XmStringFree();
8005
8006 int main() {
8007 XmStringFree()
8008 ; return 0; }
8009 EOF
8010 if { (eval echo configure:8011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8011   rm -rf conftest*
8012   eval "ac_cv_lib_$ac_lib_var=yes"
8013 else
8014   echo "configure: failed program was:" >&5
8015   cat conftest.$ac_ext >&5
8016   rm -rf conftest*
8017   eval "ac_cv_lib_$ac_lib_var=no"
8018 fi
8019 rm -f conftest*
8020 xe_check_libs=""
8021
8022 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8023   echo "$ac_t""yes" 1>&6
8024   have_motif=yes
8025 else
8026   echo "$ac_t""no" 1>&6
8027 have_motif=no
8028 fi
8029
8030
8031 else
8032   echo "$ac_t""no" 1>&6
8033 have_motif=no
8034 fi
8035
8036
8037   if test "$have_motif" = "yes"; then
8038         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8039 echo "configure:8040: checking for Lesstif" >&5
8040     cat > conftest.$ac_ext <<EOF
8041 #line 8042 "configure"
8042 #include "confdefs.h"
8043 #include <Xm/Xm.h>
8044 #ifdef LESSTIF_VERSION
8045 yes
8046 #endif
8047
8048 EOF
8049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8050   egrep "yes" >/dev/null 2>&1; then
8051   rm -rf conftest*
8052   have_lesstif=yes
8053 else
8054   rm -rf conftest*
8055   have_lesstif=no
8056 fi
8057 rm -f conftest*
8058
8059   echo "$ac_t""$have_lesstif" 1>&6
8060   fi
8061
8062 fi 
8063
8064 case "$with_menubars" in "" | "yes" | "athena" )
8065   with_menubars="lucid" ;;
8066 esac
8067 case "$with_dialogs" in "" | "yes" | "lucid" )
8068   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8069   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8070   else with_dialogs=no
8071   fi ;;
8072 esac
8073 case "$with_scrollbars" in "" | "yes" )
8074   with_scrollbars="lucid" ;;
8075 esac
8076 case "$with_widgets" in "" | "yes" | "lucid")
8077   if   test "$have_motif" = "yes"; then with_widgets="motif"
8078   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8079   else with_widgets=no
8080   fi ;;
8081 esac
8082
8083 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8084
8085 case "$all_widgets" in
8086   *athena* )
8087     if test "$have_xaw" != "yes"; then
8088       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8089     fi
8090
8091         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8092
8093         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8094
8095             { test "$extra_verbose" = "yes" && cat << EOF
8096     Defining ATHENA_H_PATH = $athena_h_path
8097 EOF
8098 cat >> confdefs.h <<EOF
8099 #define ATHENA_H_PATH $athena_h_path
8100 EOF
8101 }
8102
8103
8104     { test "$extra_verbose" = "yes" && cat << \EOF
8105     Defining LWLIB_USES_ATHENA
8106 EOF
8107 cat >> confdefs.h <<\EOF
8108 #define LWLIB_USES_ATHENA 1
8109 EOF
8110 }
8111
8112     { test "$extra_verbose" = "yes" && cat << \EOF
8113     Defining NEED_ATHENA
8114 EOF
8115 cat >> confdefs.h <<\EOF
8116 #define NEED_ATHENA 1
8117 EOF
8118 }
8119
8120
8121     if test "$athena_3d" = "yes"; then
8122       { test "$extra_verbose" = "yes" && cat << \EOF
8123     Defining HAVE_ATHENA_3D
8124 EOF
8125 cat >> confdefs.h <<\EOF
8126 #define HAVE_ATHENA_3D 1
8127 EOF
8128 }
8129
8130     fi
8131   ;;
8132 esac
8133
8134 case "$all_widgets" in *motif* )
8135   { test "$extra_verbose" = "yes" && cat << \EOF
8136     Defining LWLIB_USES_MOTIF
8137 EOF
8138 cat >> confdefs.h <<\EOF
8139 #define LWLIB_USES_MOTIF 1
8140 EOF
8141 }
8142
8143   { test "$extra_verbose" = "yes" && cat << \EOF
8144     Defining NEED_MOTIF
8145 EOF
8146 cat >> confdefs.h <<\EOF
8147 #define NEED_MOTIF 1
8148 EOF
8149 }
8150
8151   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8152   need_motif=yes ;;
8153 esac
8154
8155 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8156 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8157 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8158 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8159         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8160 case "$with_widgets" in athena* )
8161         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;;
8162 esac
8163 case "$all_widgets" in *lucid* )
8164   { test "$extra_verbose" = "yes" && cat << \EOF
8165     Defining NEED_LUCID
8166 EOF
8167 cat >> confdefs.h <<\EOF
8168 #define NEED_LUCID 1
8169 EOF
8170 }
8171
8172   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8173 esac
8174
8175
8176
8177 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8178     Defining LWLIB_SCROLLBARS_ATHENA
8179 EOF
8180 cat >> confdefs.h <<\EOF
8181 #define LWLIB_SCROLLBARS_ATHENA 1
8182 EOF
8183 }
8184
8185 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8186     Defining LWLIB_DIALOGS_ATHENA
8187 EOF
8188 cat >> confdefs.h <<\EOF
8189 #define LWLIB_DIALOGS_ATHENA 1
8190 EOF
8191 }
8192
8193
8194 if test "$athena_3d" = "yes"; then
8195   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8196     Defining LWLIB_SCROLLBARS_ATHENA3D
8197 EOF
8198 cat >> confdefs.h <<\EOF
8199 #define LWLIB_SCROLLBARS_ATHENA3D 1
8200 EOF
8201 }
8202
8203   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8204     Defining LWLIB_DIALOGS_ATHENA3D
8205 EOF
8206 cat >> confdefs.h <<\EOF
8207 #define LWLIB_DIALOGS_ATHENA3D 1
8208 EOF
8209 }
8210
8211 fi
8212
8213 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8214     Defining LWLIB_WIDGETS_ATHENA
8215 EOF
8216 cat >> confdefs.h <<\EOF
8217 #define LWLIB_WIDGETS_ATHENA 1
8218 EOF
8219 }
8220 ;; esac
8221 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8222         { test "$extra_verbose" = "yes" && cat << \EOF
8223     Defining LWLIB_TABS_LUCID
8224 EOF
8225 cat >> confdefs.h <<\EOF
8226 #define LWLIB_TABS_LUCID 1
8227 EOF
8228 }
8229
8230
8231 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8232     Defining HAVE_MENUBARS
8233 EOF
8234 cat >> confdefs.h <<\EOF
8235 #define HAVE_MENUBARS 1
8236 EOF
8237 }
8238
8239 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8240     Defining HAVE_SCROLLBARS
8241 EOF
8242 cat >> confdefs.h <<\EOF
8243 #define HAVE_SCROLLBARS 1
8244 EOF
8245 }
8246
8247 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8248     Defining HAVE_DIALOGS
8249 EOF
8250 cat >> confdefs.h <<\EOF
8251 #define HAVE_DIALOGS 1
8252 EOF
8253 }
8254
8255 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8256     Defining HAVE_TOOLBARS
8257 EOF
8258 cat >> confdefs.h <<\EOF
8259 #define HAVE_TOOLBARS 1
8260 EOF
8261 }
8262
8263 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8264     Defining HAVE_WIDGETS
8265 EOF
8266 cat >> confdefs.h <<\EOF
8267 #define HAVE_WIDGETS 1
8268 EOF
8269 }
8270
8271
8272 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8273     Defining LWLIB_MENUBARS_LUCID
8274 EOF
8275 cat >> confdefs.h <<\EOF
8276 #define LWLIB_MENUBARS_LUCID 1
8277 EOF
8278 }
8279
8280 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8281     Defining LWLIB_SCROLLBARS_LUCID
8282 EOF
8283 cat >> confdefs.h <<\EOF
8284 #define LWLIB_SCROLLBARS_LUCID 1
8285 EOF
8286 }
8287
8288
8289 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8290     Defining LWLIB_MENUBARS_MOTIF
8291 EOF
8292 cat >> confdefs.h <<\EOF
8293 #define LWLIB_MENUBARS_MOTIF 1
8294 EOF
8295 }
8296
8297 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8298     Defining LWLIB_SCROLLBARS_MOTIF
8299 EOF
8300 cat >> confdefs.h <<\EOF
8301 #define LWLIB_SCROLLBARS_MOTIF 1
8302 EOF
8303 }
8304
8305 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8306     Defining LWLIB_DIALOGS_MOTIF
8307 EOF
8308 cat >> confdefs.h <<\EOF
8309 #define LWLIB_DIALOGS_MOTIF 1
8310 EOF
8311 }
8312
8313 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8314     Defining LWLIB_WIDGETS_MOTIF
8315 EOF
8316 cat >> confdefs.h <<\EOF
8317 #define LWLIB_WIDGETS_MOTIF 1
8318 EOF
8319 }
8320
8321
8322 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8323    echo "    xemacs will be linked with \"menubar.o\""
8324  fi
8325 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8326    echo "    xemacs will be linked with \"scrollbar.o\""
8327  fi
8328 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8329    echo "    xemacs will be linked with \"dialog.o\""
8330  fi
8331 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8332    echo "    xemacs will be linked with \"toolbar.o\""
8333  fi
8334
8335 if test "$with_x11" = "yes"; then
8336   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8337    echo "    xemacs will be linked with \"menubar-x.o\""
8338  fi
8339   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8340    echo "    xemacs will be linked with \"scrollbar-x.o\""
8341  fi
8342   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8343    echo "    xemacs will be linked with \"dialog-x.o\""
8344  fi
8345   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8346    echo "    xemacs will be linked with \"toolbar-x.o\""
8347  fi
8348   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8349    echo "    xemacs will be linked with \"gui-x.o\""
8350  fi
8351 fi
8352
8353
8354 test -z "$with_mule" && with_mule=no
8355 test -z "$with_file_coding" && with_file_coding=no
8356
8357
8358 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8359   { test "$extra_verbose" = "yes" && cat << \EOF
8360     Defining FILE_CODING
8361 EOF
8362 cat >> confdefs.h <<\EOF
8363 #define FILE_CODING 1
8364 EOF
8365 }
8366
8367   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8368    echo "    xemacs will be linked with \"file-coding.o\""
8369  fi
8370 fi
8371
8372 if test "$with_mule" = "yes" ; then
8373   echo "checking for Mule-related features" 1>&6
8374 echo "configure:8375: checking for Mule-related features" >&5
8375   { test "$extra_verbose" = "yes" && cat << \EOF
8376     Defining MULE
8377 EOF
8378 cat >> confdefs.h <<\EOF
8379 #define MULE 1
8380 EOF
8381 }
8382
8383   { test "$extra_verbose" = "yes" && cat << \EOF
8384     Defining FILE_CODING
8385 EOF
8386 cat >> confdefs.h <<\EOF
8387 #define FILE_CODING 1
8388 EOF
8389 }
8390
8391   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8392    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8393  fi
8394
8395     for ac_hdr in libintl.h
8396 do
8397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8399 echo "configure:8400: checking for $ac_hdr" >&5
8400
8401 cat > conftest.$ac_ext <<EOF
8402 #line 8403 "configure"
8403 #include "confdefs.h"
8404 #include <$ac_hdr>
8405 EOF
8406 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8407 { (eval echo configure:8408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8408 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8409 if test -z "$ac_err"; then
8410   rm -rf conftest*
8411   eval "ac_cv_header_$ac_safe=yes"
8412 else
8413   echo "$ac_err" >&5
8414   echo "configure: failed program was:" >&5
8415   cat conftest.$ac_ext >&5
8416   rm -rf conftest*
8417   eval "ac_cv_header_$ac_safe=no"
8418 fi
8419 rm -f conftest*
8420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8421   echo "$ac_t""yes" 1>&6
8422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8423   { test "$extra_verbose" = "yes" && cat << EOF
8424     Defining $ac_tr_hdr
8425 EOF
8426 cat >> confdefs.h <<EOF
8427 #define $ac_tr_hdr 1
8428 EOF
8429 }
8430  
8431 else
8432   echo "$ac_t""no" 1>&6
8433 fi
8434 done
8435
8436   
8437 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8438 echo "configure:8439: checking for strerror in -lintl" >&5
8439 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8440
8441 xe_check_libs=" -lintl "
8442 cat > conftest.$ac_ext <<EOF
8443 #line 8444 "configure"
8444 #include "confdefs.h"
8445 /* Override any gcc2 internal prototype to avoid an error.  */
8446 /* We use char because int might match the return type of a gcc2
8447     builtin and then its argument prototype would still apply.  */
8448 char strerror();
8449
8450 int main() {
8451 strerror()
8452 ; return 0; }
8453 EOF
8454 if { (eval echo configure:8455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8455   rm -rf conftest*
8456   eval "ac_cv_lib_$ac_lib_var=yes"
8457 else
8458   echo "configure: failed program was:" >&5
8459   cat conftest.$ac_ext >&5
8460   rm -rf conftest*
8461   eval "ac_cv_lib_$ac_lib_var=no"
8462 fi
8463 rm -f conftest*
8464 xe_check_libs=""
8465
8466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8467   echo "$ac_t""yes" 1>&6
8468     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8469     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8470   { test "$extra_verbose" = "yes" && cat << EOF
8471     Defining $ac_tr_lib
8472 EOF
8473 cat >> confdefs.h <<EOF
8474 #define $ac_tr_lib 1
8475 EOF
8476 }
8477
8478   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8479
8480 else
8481   echo "$ac_t""no" 1>&6
8482 fi
8483
8484
8485
8486   echo "checking for Mule input methods" 1>&6
8487 echo "configure:8488: checking for Mule input methods" >&5
8488         case "$with_xim" in "" | "yes" )
8489     echo "checking for XIM" 1>&6
8490 echo "configure:8491: checking for XIM" >&5
8491     
8492 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8493 echo "configure:8494: checking for XOpenIM in -lX11" >&5
8494 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8495
8496 xe_check_libs=" -lX11 "
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 /* Override any gcc2 internal prototype to avoid an error.  */
8501 /* We use char because int might match the return type of a gcc2
8502     builtin and then its argument prototype would still apply.  */
8503 char XOpenIM();
8504
8505 int main() {
8506 XOpenIM()
8507 ; return 0; }
8508 EOF
8509 if { (eval echo configure:8510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8510   rm -rf conftest*
8511   eval "ac_cv_lib_$ac_lib_var=yes"
8512 else
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   eval "ac_cv_lib_$ac_lib_var=no"
8517 fi
8518 rm -f conftest*
8519 xe_check_libs=""
8520
8521 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8522   echo "$ac_t""yes" 1>&6
8523   with_xim=xlib
8524 else
8525   echo "$ac_t""no" 1>&6
8526 with_xim=no
8527 fi
8528
8529
8530         if test "$have_motif $have_lesstif" = "yes no"; then
8531       
8532 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8533 echo "configure:8534: checking for XmImMbLookupString in -lXm" >&5
8534 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8535
8536 xe_check_libs=" -lXm "
8537 cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 /* Override any gcc2 internal prototype to avoid an error.  */
8541 /* We use char because int might match the return type of a gcc2
8542     builtin and then its argument prototype would still apply.  */
8543 char XmImMbLookupString();
8544
8545 int main() {
8546 XmImMbLookupString()
8547 ; return 0; }
8548 EOF
8549 if { (eval echo configure:8550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8550   rm -rf conftest*
8551   eval "ac_cv_lib_$ac_lib_var=yes"
8552 else
8553   echo "configure: failed program was:" >&5
8554   cat conftest.$ac_ext >&5
8555   rm -rf conftest*
8556   eval "ac_cv_lib_$ac_lib_var=no"
8557 fi
8558 rm -f conftest*
8559 xe_check_libs=""
8560
8561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8562   echo "$ac_t""yes" 1>&6
8563   with_xim=motif
8564 else
8565   echo "$ac_t""no" 1>&6
8566 fi
8567
8568
8569     fi ;;
8570   esac
8571   if test "$with_xim" != "no"; then
8572     { test "$extra_verbose" = "yes" && cat << \EOF
8573     Defining HAVE_XIM
8574 EOF
8575 cat >> confdefs.h <<\EOF
8576 #define HAVE_XIM 1
8577 EOF
8578 }
8579
8580     if test "$with_xim" = "xlib"; then
8581       { test "$extra_verbose" = "yes" && cat << \EOF
8582     Defining XIM_XLIB
8583 EOF
8584 cat >> confdefs.h <<\EOF
8585 #define XIM_XLIB 1
8586 EOF
8587 }
8588
8589       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8590    echo "    xemacs will be linked with \"input-method-xlib.o\""
8591  fi
8592     fi
8593     if test "$with_xim" = "motif"; then
8594       { test "$extra_verbose" = "yes" && cat << \EOF
8595     Defining XIM_MOTIF
8596 EOF
8597 cat >> confdefs.h <<\EOF
8598 #define XIM_MOTIF 1
8599 EOF
8600 }
8601
8602       need_motif=yes
8603       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8604    echo "    xemacs will be linked with \"input-method-motif.o\""
8605  fi
8606     fi
8607     if test "$with_xim" = "motif"; then
8608       with_xfs=no
8609     fi
8610   fi
8611
8612     if test "$with_xfs" = "yes" ; then
8613     echo "checking for XFontSet" 1>&6
8614 echo "configure:8615: checking for XFontSet" >&5
8615     
8616 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8617 echo "configure:8618: checking for XmbDrawString in -lX11" >&5
8618 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8619
8620 xe_check_libs=" -lX11 "
8621 cat > conftest.$ac_ext <<EOF
8622 #line 8623 "configure"
8623 #include "confdefs.h"
8624 /* Override any gcc2 internal prototype to avoid an error.  */
8625 /* We use char because int might match the return type of a gcc2
8626     builtin and then its argument prototype would still apply.  */
8627 char XmbDrawString();
8628
8629 int main() {
8630 XmbDrawString()
8631 ; return 0; }
8632 EOF
8633 if { (eval echo configure:8634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8634   rm -rf conftest*
8635   eval "ac_cv_lib_$ac_lib_var=yes"
8636 else
8637   echo "configure: failed program was:" >&5
8638   cat conftest.$ac_ext >&5
8639   rm -rf conftest*
8640   eval "ac_cv_lib_$ac_lib_var=no"
8641 fi
8642 rm -f conftest*
8643 xe_check_libs=""
8644
8645 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8646   echo "$ac_t""yes" 1>&6
8647   :
8648 else
8649   echo "$ac_t""no" 1>&6
8650 with_xfs=no
8651 fi
8652
8653
8654     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8655       { test "$extra_verbose" = "yes" && cat << \EOF
8656     Defining USE_XFONTSET
8657 EOF
8658 cat >> confdefs.h <<\EOF
8659 #define USE_XFONTSET 1
8660 EOF
8661 }
8662
8663       if test "$with_xim" = "no" ; then
8664         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8665    echo "    xemacs will be linked with \"input-method-xfs.o\""
8666  fi
8667       fi
8668     fi
8669   fi 
8670     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8671   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8672 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8673 echo "configure:8674: checking for wnn/jllib.h" >&5
8674
8675 cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 #include <wnn/jllib.h>
8679 EOF
8680 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8681 { (eval echo configure:8682: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8682 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8683 if test -z "$ac_err"; then
8684   rm -rf conftest*
8685   eval "ac_cv_header_$ac_safe=yes"
8686 else
8687   echo "$ac_err" >&5
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   eval "ac_cv_header_$ac_safe=no"
8692 fi
8693 rm -f conftest*
8694 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8695   echo "$ac_t""yes" 1>&6
8696   :
8697 else
8698   echo "$ac_t""no" 1>&6
8699 with_wnn=no
8700 fi
8701  }
8702     if test "$with_wnn" != "no"; then
8703     for ac_func in crypt
8704 do
8705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8706 echo "configure:8707: checking for $ac_func" >&5
8707
8708 cat > conftest.$ac_ext <<EOF
8709 #line 8710 "configure"
8710 #include "confdefs.h"
8711 /* System header to define __stub macros and hopefully few prototypes,
8712     which can conflict with char $ac_func(); below.  */
8713 #include <assert.h>
8714 /* Override any gcc2 internal prototype to avoid an error.  */
8715 /* We use char because int might match the return type of a gcc2
8716     builtin and then its argument prototype would still apply.  */
8717 char $ac_func();
8718
8719 int main() {
8720
8721 /* The GNU C library defines this for functions which it implements
8722     to always fail with ENOSYS.  Some functions are actually named
8723     something starting with __ and the normal name is an alias.  */
8724 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8725 choke me
8726 #else
8727 $ac_func();
8728 #endif
8729
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8733   rm -rf conftest*
8734   eval "ac_cv_func_$ac_func=yes"
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738   rm -rf conftest*
8739   eval "ac_cv_func_$ac_func=no"
8740 fi
8741 rm -f conftest*
8742
8743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8744   echo "$ac_t""yes" 1>&6
8745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8746   { test "$extra_verbose" = "yes" && cat << EOF
8747     Defining $ac_tr_func
8748 EOF
8749 cat >> confdefs.h <<EOF
8750 #define $ac_tr_func 1
8751 EOF
8752 }
8753  
8754 else
8755   echo "$ac_t""no" 1>&6
8756 fi
8757 done
8758
8759     test "$ac_cv_func_crypt" != "yes" && { 
8760 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8761 echo "configure:8762: checking for crypt in -lcrypt" >&5
8762 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8763
8764 xe_check_libs=" -lcrypt "
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 crypt();
8772
8773 int main() {
8774 crypt()
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     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8792     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8793   { test "$extra_verbose" = "yes" && cat << EOF
8794     Defining $ac_tr_lib
8795 EOF
8796 cat >> confdefs.h <<EOF
8797 #define $ac_tr_lib 1
8798 EOF
8799 }
8800
8801   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8802
8803 else
8804   echo "$ac_t""no" 1>&6
8805 fi
8806
8807  }
8808   fi
8809     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8810     
8811 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8812 echo "configure:8813: checking for jl_dic_list_e in -lwnn" >&5
8813 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8814
8815 xe_check_libs=" -lwnn "
8816 cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 /* Override any gcc2 internal prototype to avoid an error.  */
8820 /* We use char because int might match the return type of a gcc2
8821     builtin and then its argument prototype would still apply.  */
8822 char jl_dic_list_e();
8823
8824 int main() {
8825 jl_dic_list_e()
8826 ; return 0; }
8827 EOF
8828 if { (eval echo configure:8829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8829   rm -rf conftest*
8830   eval "ac_cv_lib_$ac_lib_var=yes"
8831 else
8832   echo "configure: failed program was:" >&5
8833   cat conftest.$ac_ext >&5
8834   rm -rf conftest*
8835   eval "ac_cv_lib_$ac_lib_var=no"
8836 fi
8837 rm -f conftest*
8838 xe_check_libs=""
8839
8840 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8841   echo "$ac_t""yes" 1>&6
8842   libwnn=wnn
8843 else
8844   echo "$ac_t""no" 1>&6
8845 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8846 echo "configure:8847: checking for jl_dic_list_e in -lwnn4" >&5
8847 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8848
8849 xe_check_libs=" -lwnn4 "
8850 cat > conftest.$ac_ext <<EOF
8851 #line 8852 "configure"
8852 #include "confdefs.h"
8853 /* Override any gcc2 internal prototype to avoid an error.  */
8854 /* We use char because int might match the return type of a gcc2
8855     builtin and then its argument prototype would still apply.  */
8856 char jl_dic_list_e();
8857
8858 int main() {
8859 jl_dic_list_e()
8860 ; return 0; }
8861 EOF
8862 if { (eval echo configure:8863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8863   rm -rf conftest*
8864   eval "ac_cv_lib_$ac_lib_var=yes"
8865 else
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -rf conftest*
8869   eval "ac_cv_lib_$ac_lib_var=no"
8870 fi
8871 rm -f conftest*
8872 xe_check_libs=""
8873
8874 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8875   echo "$ac_t""yes" 1>&6
8876   libwnn=wnn4
8877 else
8878   echo "$ac_t""no" 1>&6
8879 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8880 echo "configure:8881: checking for jl_dic_list_e in -lwnn6" >&5
8881 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8882
8883 xe_check_libs=" -lwnn6 "
8884 cat > conftest.$ac_ext <<EOF
8885 #line 8886 "configure"
8886 #include "confdefs.h"
8887 /* Override any gcc2 internal prototype to avoid an error.  */
8888 /* We use char because int might match the return type of a gcc2
8889     builtin and then its argument prototype would still apply.  */
8890 char jl_dic_list_e();
8891
8892 int main() {
8893 jl_dic_list_e()
8894 ; return 0; }
8895 EOF
8896 if { (eval echo configure:8897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8897   rm -rf conftest*
8898   eval "ac_cv_lib_$ac_lib_var=yes"
8899 else
8900   echo "configure: failed program was:" >&5
8901   cat conftest.$ac_ext >&5
8902   rm -rf conftest*
8903   eval "ac_cv_lib_$ac_lib_var=no"
8904 fi
8905 rm -f conftest*
8906 xe_check_libs=""
8907
8908 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8909   echo "$ac_t""yes" 1>&6
8910   libwnn=wnn6
8911 else
8912   echo "$ac_t""no" 1>&6
8913 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8914 echo "configure:8915: checking for dic_list_e in -lwnn6_fromsrc" >&5
8915 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8916
8917 xe_check_libs=" -lwnn6_fromsrc "
8918 cat > conftest.$ac_ext <<EOF
8919 #line 8920 "configure"
8920 #include "confdefs.h"
8921 /* Override any gcc2 internal prototype to avoid an error.  */
8922 /* We use char because int might match the return type of a gcc2
8923     builtin and then its argument prototype would still apply.  */
8924 char dic_list_e();
8925
8926 int main() {
8927 dic_list_e()
8928 ; return 0; }
8929 EOF
8930 if { (eval echo configure:8931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8931   rm -rf conftest*
8932   eval "ac_cv_lib_$ac_lib_var=yes"
8933 else
8934   echo "configure: failed program was:" >&5
8935   cat conftest.$ac_ext >&5
8936   rm -rf conftest*
8937   eval "ac_cv_lib_$ac_lib_var=no"
8938 fi
8939 rm -f conftest*
8940 xe_check_libs=""
8941
8942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8943   echo "$ac_t""yes" 1>&6
8944   libwnn=wnn6_fromsrc
8945 else
8946   echo "$ac_t""no" 1>&6
8947 with_wnn=no
8948 fi
8949
8950
8951 fi
8952
8953
8954 fi
8955
8956
8957 fi
8958
8959
8960   fi
8961   test -z "$with_wnn" && with_wnn=yes
8962   if test "$with_wnn" = "yes"; then
8963     { test "$extra_verbose" = "yes" && cat << \EOF
8964     Defining HAVE_WNN
8965 EOF
8966 cat >> confdefs.h <<\EOF
8967 #define HAVE_WNN 1
8968 EOF
8969 }
8970
8971     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8972     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8973    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8974  fi
8975     if test "$with_wnn6" != "no"; then
8976       
8977 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8978 echo "configure:8979: checking for jl_fi_dic_list in -l$libwnn" >&5
8979 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8980
8981 xe_check_libs=" -l$libwnn "
8982 cat > conftest.$ac_ext <<EOF
8983 #line 8984 "configure"
8984 #include "confdefs.h"
8985 /* Override any gcc2 internal prototype to avoid an error.  */
8986 /* We use char because int might match the return type of a gcc2
8987     builtin and then its argument prototype would still apply.  */
8988 char jl_fi_dic_list();
8989
8990 int main() {
8991 jl_fi_dic_list()
8992 ; return 0; }
8993 EOF
8994 if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8995   rm -rf conftest*
8996   eval "ac_cv_lib_$ac_lib_var=yes"
8997 else
8998   echo "configure: failed program was:" >&5
8999   cat conftest.$ac_ext >&5
9000   rm -rf conftest*
9001   eval "ac_cv_lib_$ac_lib_var=no"
9002 fi
9003 rm -f conftest*
9004 xe_check_libs=""
9005
9006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9007   echo "$ac_t""yes" 1>&6
9008   with_wnn6=yes
9009 else
9010   echo "$ac_t""no" 1>&6
9011 fi
9012
9013
9014       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9015     Defining WNN6
9016 EOF
9017 cat >> confdefs.h <<\EOF
9018 #define WNN6 1
9019 EOF
9020 }
9021
9022     fi
9023   fi
9024
9025     canna_includes_found=no
9026   if test "$with_canna" != "no"; then
9027     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9028 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9029 echo "configure:9030: checking for canna/jrkanji.h" >&5
9030
9031 cat > conftest.$ac_ext <<EOF
9032 #line 9033 "configure"
9033 #include "confdefs.h"
9034 #include <canna/jrkanji.h>
9035 EOF
9036 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9037 { (eval echo configure:9038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9038 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9039 if test -z "$ac_err"; then
9040   rm -rf conftest*
9041   eval "ac_cv_header_$ac_safe=yes"
9042 else
9043   echo "$ac_err" >&5
9044   echo "configure: failed program was:" >&5
9045   cat conftest.$ac_ext >&5
9046   rm -rf conftest*
9047   eval "ac_cv_header_$ac_safe=no"
9048 fi
9049 rm -f conftest*
9050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9051   echo "$ac_t""yes" 1>&6
9052   canna_includes_found=yes
9053 else
9054   echo "$ac_t""no" 1>&6
9055 fi
9056
9057   fi
9058   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9059       -d "/usr/local/canna/include"; then
9060     save_c_switch_site="$c_switch_site"
9061     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9062     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9063 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9064 echo "configure:9065: checking for canna/jrkanji.h" >&5
9065
9066 cat > conftest.$ac_ext <<EOF
9067 #line 9068 "configure"
9068 #include "confdefs.h"
9069 #include <canna/jrkanji.h>
9070 EOF
9071 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9072 { (eval echo configure:9073: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9073 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9074 if test -z "$ac_err"; then
9075   rm -rf conftest*
9076   eval "ac_cv_header_$ac_safe=yes"
9077 else
9078   echo "$ac_err" >&5
9079   echo "configure: failed program was:" >&5
9080   cat conftest.$ac_ext >&5
9081   rm -rf conftest*
9082   eval "ac_cv_header_$ac_safe=no"
9083 fi
9084 rm -f conftest*
9085 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9086   echo "$ac_t""yes" 1>&6
9087   canna_includes_found=yes
9088 else
9089   echo "$ac_t""no" 1>&6
9090 fi
9091
9092     if test "$canna_includes_found" != "yes"; then
9093       c_switch_site="$save_c_switch_site"
9094       with_canna="no"
9095     fi
9096   fi
9097
9098   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9099 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9100 echo "configure:9101: checking for canna/RK.h" >&5
9101
9102 cat > conftest.$ac_ext <<EOF
9103 #line 9104 "configure"
9104 #include "confdefs.h"
9105 #include <canna/RK.h>
9106 EOF
9107 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9108 { (eval echo configure:9109: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9109 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9110 if test -z "$ac_err"; then
9111   rm -rf conftest*
9112   eval "ac_cv_header_$ac_safe=yes"
9113 else
9114   echo "$ac_err" >&5
9115   echo "configure: failed program was:" >&5
9116   cat conftest.$ac_ext >&5
9117   rm -rf conftest*
9118   eval "ac_cv_header_$ac_safe=no"
9119 fi
9120 rm -f conftest*
9121 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9122   echo "$ac_t""yes" 1>&6
9123   :
9124 else
9125   echo "$ac_t""no" 1>&6
9126 with_canna=no
9127 fi
9128  }
9129   test -z "$with_canna" && { 
9130 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9131 echo "configure:9132: checking for RkBgnBun in -lRKC" >&5
9132 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9133
9134 xe_check_libs=" -lRKC "
9135 cat > conftest.$ac_ext <<EOF
9136 #line 9137 "configure"
9137 #include "confdefs.h"
9138 /* Override any gcc2 internal prototype to avoid an error.  */
9139 /* We use char because int might match the return type of a gcc2
9140     builtin and then its argument prototype would still apply.  */
9141 char RkBgnBun();
9142
9143 int main() {
9144 RkBgnBun()
9145 ; return 0; }
9146 EOF
9147 if { (eval echo configure:9148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9148   rm -rf conftest*
9149   eval "ac_cv_lib_$ac_lib_var=yes"
9150 else
9151   echo "configure: failed program was:" >&5
9152   cat conftest.$ac_ext >&5
9153   rm -rf conftest*
9154   eval "ac_cv_lib_$ac_lib_var=no"
9155 fi
9156 rm -f conftest*
9157 xe_check_libs=""
9158
9159 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9160   echo "$ac_t""yes" 1>&6
9161   :
9162 else
9163   echo "$ac_t""no" 1>&6
9164 with_canna=no
9165 fi
9166
9167  }
9168   test -z "$with_canna" && { 
9169 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9170 echo "configure:9171: checking for jrKanjiControl in -lcanna" >&5
9171 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9172
9173 xe_check_libs=" -lcanna "
9174 cat > conftest.$ac_ext <<EOF
9175 #line 9176 "configure"
9176 #include "confdefs.h"
9177 /* Override any gcc2 internal prototype to avoid an error.  */
9178 /* We use char because int might match the return type of a gcc2
9179     builtin and then its argument prototype would still apply.  */
9180 char jrKanjiControl();
9181
9182 int main() {
9183 jrKanjiControl()
9184 ; return 0; }
9185 EOF
9186 if { (eval echo configure:9187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9187   rm -rf conftest*
9188   eval "ac_cv_lib_$ac_lib_var=yes"
9189 else
9190   echo "configure: failed program was:" >&5
9191   cat conftest.$ac_ext >&5
9192   rm -rf conftest*
9193   eval "ac_cv_lib_$ac_lib_var=no"
9194 fi
9195 rm -f conftest*
9196 xe_check_libs=""
9197
9198 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9199   echo "$ac_t""yes" 1>&6
9200   :
9201 else
9202   echo "$ac_t""no" 1>&6
9203 with_canna=no
9204 fi
9205
9206  }
9207   test -z "$with_canna" && with_canna=yes
9208   if test "$with_canna" = "yes"; then
9209     { test "$extra_verbose" = "yes" && cat << \EOF
9210     Defining HAVE_CANNA
9211 EOF
9212 cat >> confdefs.h <<\EOF
9213 #define HAVE_CANNA 1
9214 EOF
9215 }
9216
9217     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9218     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9219    echo "    xemacs will be linked with \"mule-canna.o\""
9220  fi
9221   fi
9222
9223 else   for feature in xim canna wnn; do
9224     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9225       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9226     fi
9227     eval "with_${feature}=no"
9228   done
9229 fi 
9230
9231 if test "$need_motif" = "yes" ; then
9232   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9233     
9234 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9235 echo "configure:9236: checking for layout_object_getvalue in -li18n" >&5
9236 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9237
9238 xe_check_libs=" -li18n "
9239 cat > conftest.$ac_ext <<EOF
9240 #line 9241 "configure"
9241 #include "confdefs.h"
9242 /* Override any gcc2 internal prototype to avoid an error.  */
9243 /* We use char because int might match the return type of a gcc2
9244     builtin and then its argument prototype would still apply.  */
9245 char layout_object_getvalue();
9246
9247 int main() {
9248 layout_object_getvalue()
9249 ; return 0; }
9250 EOF
9251 if { (eval echo configure:9252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9252   rm -rf conftest*
9253   eval "ac_cv_lib_$ac_lib_var=yes"
9254 else
9255   echo "configure: failed program was:" >&5
9256   cat conftest.$ac_ext >&5
9257   rm -rf conftest*
9258   eval "ac_cv_lib_$ac_lib_var=no"
9259 fi
9260 rm -f conftest*
9261 xe_check_libs=""
9262
9263 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9264   echo "$ac_t""yes" 1>&6
9265   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9266 else
9267   echo "$ac_t""no" 1>&6
9268 fi
9269
9270
9271   
9272 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9273     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9274   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9275   
9276         runpath="" runpath_dirs=""
9277   if test -n "$LD_RUN_PATH"; then
9278     runpath="$LD_RUN_PATH"
9279   elif test "$GCC" = "yes"; then
9280         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9281     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9282     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9283     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9284       case "$arg" in P,* | -L* | -R* )
9285         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9286           {
9287 xe_runpath_dir="$dir"
9288   test "$xe_runpath_dir" != "/lib"     -a \
9289         "$xe_runpath_dir" != "/usr/lib" -a \
9290         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9291   eval "$xe_add_unique_runpath_dir"
9292 }
9293         done ;;
9294       esac
9295     done
9296     ld_switch_run="$ld_switch_run_save"
9297     rm -f conftest*
9298   else
9299         for arg in $ld_switch_site $ld_switch_x_site; do
9300       case "$arg" in -L*) {
9301 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9302   test "$xe_runpath_dir" != "/lib"     -a \
9303         "$xe_runpath_dir" != "/usr/lib" -a \
9304         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9305   eval "$xe_add_unique_runpath_dir"
9306 };; esac
9307     done
9308         if test "$opsys $need_motif" = "sol2 yes"; then
9309       xe_runpath_dir="/opt/SUNWdt/lib";
9310       eval "$xe_add_unique_runpath_dir";
9311     fi
9312   fi 
9313   if test -n "$runpath"; then
9314     ld_switch_run="${dash_r}${runpath}"
9315     
9316 if test "$GCC" = "yes"; then
9317   set x $ld_switch_run; shift; ld_switch_run=""
9318   while test -n "$1"; do
9319     case $1 in
9320       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9321       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9322       -Xlinker* ) ;;
9323       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9324     esac
9325     shift
9326   done
9327 fi
9328     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9329   fi
9330 fi
9331
9332 fi
9333
9334 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname 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
9335 do
9336 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9337 echo "configure:9338: checking for $ac_func" >&5
9338
9339 cat > conftest.$ac_ext <<EOF
9340 #line 9341 "configure"
9341 #include "confdefs.h"
9342 /* System header to define __stub macros and hopefully few prototypes,
9343     which can conflict with char $ac_func(); below.  */
9344 #include <assert.h>
9345 /* Override any gcc2 internal prototype to avoid an error.  */
9346 /* We use char because int might match the return type of a gcc2
9347     builtin and then its argument prototype would still apply.  */
9348 char $ac_func();
9349
9350 int main() {
9351
9352 /* The GNU C library defines this for functions which it implements
9353     to always fail with ENOSYS.  Some functions are actually named
9354     something starting with __ and the normal name is an alias.  */
9355 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9356 choke me
9357 #else
9358 $ac_func();
9359 #endif
9360
9361 ; return 0; }
9362 EOF
9363 if { (eval echo configure:9364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9364   rm -rf conftest*
9365   eval "ac_cv_func_$ac_func=yes"
9366 else
9367   echo "configure: failed program was:" >&5
9368   cat conftest.$ac_ext >&5
9369   rm -rf conftest*
9370   eval "ac_cv_func_$ac_func=no"
9371 fi
9372 rm -f conftest*
9373
9374 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9375   echo "$ac_t""yes" 1>&6
9376     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9377   { test "$extra_verbose" = "yes" && cat << EOF
9378     Defining $ac_tr_func
9379 EOF
9380 cat >> confdefs.h <<EOF
9381 #define $ac_tr_func 1
9382 EOF
9383 }
9384  
9385 else
9386   echo "$ac_t""no" 1>&6
9387 fi
9388 done
9389
9390
9391
9392 case "$opsys" in
9393   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9394    echo "    xemacs will be linked with \"realpath.o\""
9395  fi ;;
9396   * )
9397     case "$canonical" in
9398       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9399    echo "    xemacs will be linked with \"realpath.o\""
9400  fi ;;
9401       * ) for ac_func in realpath
9402 do
9403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9404 echo "configure:9405: checking for $ac_func" >&5
9405
9406 cat > conftest.$ac_ext <<EOF
9407 #line 9408 "configure"
9408 #include "confdefs.h"
9409 /* System header to define __stub macros and hopefully few prototypes,
9410     which can conflict with char $ac_func(); below.  */
9411 #include <assert.h>
9412 /* Override any gcc2 internal prototype to avoid an error.  */
9413 /* We use char because int might match the return type of a gcc2
9414     builtin and then its argument prototype would still apply.  */
9415 char $ac_func();
9416
9417 int main() {
9418
9419 /* The GNU C library defines this for functions which it implements
9420     to always fail with ENOSYS.  Some functions are actually named
9421     something starting with __ and the normal name is an alias.  */
9422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9423 choke me
9424 #else
9425 $ac_func();
9426 #endif
9427
9428 ; return 0; }
9429 EOF
9430 if { (eval echo configure:9431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9431   rm -rf conftest*
9432   eval "ac_cv_func_$ac_func=yes"
9433 else
9434   echo "configure: failed program was:" >&5
9435   cat conftest.$ac_ext >&5
9436   rm -rf conftest*
9437   eval "ac_cv_func_$ac_func=no"
9438 fi
9439 rm -f conftest*
9440
9441 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9442   echo "$ac_t""yes" 1>&6
9443     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9444   { test "$extra_verbose" = "yes" && cat << EOF
9445     Defining $ac_tr_func
9446 EOF
9447 cat >> confdefs.h <<EOF
9448 #define $ac_tr_func 1
9449 EOF
9450 }
9451  
9452 else
9453   echo "$ac_t""no" 1>&6
9454 fi
9455 done
9456
9457           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9458    echo "    xemacs will be linked with \"realpath.o\""
9459  fi ;;
9460     esac ;;
9461 esac
9462
9463 for ac_func in getloadavg
9464 do
9465 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9466 echo "configure:9467: checking for $ac_func" >&5
9467
9468 cat > conftest.$ac_ext <<EOF
9469 #line 9470 "configure"
9470 #include "confdefs.h"
9471 /* System header to define __stub macros and hopefully few prototypes,
9472     which can conflict with char $ac_func(); below.  */
9473 #include <assert.h>
9474 /* Override any gcc2 internal prototype to avoid an error.  */
9475 /* We use char because int might match the return type of a gcc2
9476     builtin and then its argument prototype would still apply.  */
9477 char $ac_func();
9478
9479 int main() {
9480
9481 /* The GNU C library defines this for functions which it implements
9482     to always fail with ENOSYS.  Some functions are actually named
9483     something starting with __ and the normal name is an alias.  */
9484 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9485 choke me
9486 #else
9487 $ac_func();
9488 #endif
9489
9490 ; return 0; }
9491 EOF
9492 if { (eval echo configure:9493: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9493   rm -rf conftest*
9494   eval "ac_cv_func_$ac_func=yes"
9495 else
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   eval "ac_cv_func_$ac_func=no"
9500 fi
9501 rm -f conftest*
9502
9503 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9504   echo "$ac_t""yes" 1>&6
9505     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9506   { test "$extra_verbose" = "yes" && cat << EOF
9507     Defining $ac_tr_func
9508 EOF
9509 cat >> confdefs.h <<EOF
9510 #define $ac_tr_func 1
9511 EOF
9512 }
9513  
9514 else
9515   echo "$ac_t""no" 1>&6
9516 fi
9517 done
9518
9519
9520 if test "$ac_cv_func_getloadavg" != "yes"
9521 then
9522   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9523    echo "    xemacs will be linked with \"getloadavg.o\""
9524  fi
9525
9526     
9527 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9528 echo "configure:9529: checking for kstat_open in -lkstat" >&5
9529 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9530
9531 xe_check_libs=" -lkstat "
9532 cat > conftest.$ac_ext <<EOF
9533 #line 9534 "configure"
9534 #include "confdefs.h"
9535 /* Override any gcc2 internal prototype to avoid an error.  */
9536 /* We use char because int might match the return type of a gcc2
9537     builtin and then its argument prototype would still apply.  */
9538 char kstat_open();
9539
9540 int main() {
9541 kstat_open()
9542 ; return 0; }
9543 EOF
9544 if { (eval echo configure:9545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9545   rm -rf conftest*
9546   eval "ac_cv_lib_$ac_lib_var=yes"
9547 else
9548   echo "configure: failed program was:" >&5
9549   cat conftest.$ac_ext >&5
9550   rm -rf conftest*
9551   eval "ac_cv_lib_$ac_lib_var=no"
9552 fi
9553 rm -f conftest*
9554 xe_check_libs=""
9555
9556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9557   echo "$ac_t""yes" 1>&6
9558     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9559     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9560   { test "$extra_verbose" = "yes" && cat << EOF
9561     Defining $ac_tr_lib
9562 EOF
9563 cat >> confdefs.h <<EOF
9564 #define $ac_tr_lib 1
9565 EOF
9566 }
9567
9568   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9569
9570 else
9571   echo "$ac_t""no" 1>&6
9572 fi
9573
9574
9575
9576     
9577 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9578 echo "configure:9579: checking for kvm_read in -lkvm" >&5
9579 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9580
9581 xe_check_libs=" -lkvm "
9582 cat > conftest.$ac_ext <<EOF
9583 #line 9584 "configure"
9584 #include "confdefs.h"
9585 /* Override any gcc2 internal prototype to avoid an error.  */
9586 /* We use char because int might match the return type of a gcc2
9587     builtin and then its argument prototype would still apply.  */
9588 char kvm_read();
9589
9590 int main() {
9591 kvm_read()
9592 ; return 0; }
9593 EOF
9594 if { (eval echo configure:9595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9595   rm -rf conftest*
9596   eval "ac_cv_lib_$ac_lib_var=yes"
9597 else
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600   rm -rf conftest*
9601   eval "ac_cv_lib_$ac_lib_var=no"
9602 fi
9603 rm -f conftest*
9604 xe_check_libs=""
9605
9606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9607   echo "$ac_t""yes" 1>&6
9608     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9609     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9610   { test "$extra_verbose" = "yes" && cat << EOF
9611     Defining $ac_tr_lib
9612 EOF
9613 cat >> confdefs.h <<EOF
9614 #define $ac_tr_lib 1
9615 EOF
9616 }
9617
9618   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9619
9620 else
9621   echo "$ac_t""no" 1>&6
9622 fi
9623
9624
9625 fi
9626
9627 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9628 echo "configure:9629: checking whether netdb declares h_errno" >&5
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 #include <netdb.h>
9633 int main() {
9634 return h_errno;
9635 ; return 0; }
9636 EOF
9637 if { (eval echo configure:9638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9638   rm -rf conftest*
9639   echo "$ac_t""yes" 1>&6
9640    { test "$extra_verbose" = "yes" && cat << \EOF
9641     Defining HAVE_H_ERRNO
9642 EOF
9643 cat >> confdefs.h <<\EOF
9644 #define HAVE_H_ERRNO 1
9645 EOF
9646 }
9647
9648 else
9649   echo "configure: failed program was:" >&5
9650   cat conftest.$ac_ext >&5
9651   rm -rf conftest*
9652   echo "$ac_t""no" 1>&6
9653 fi
9654 rm -f conftest*
9655
9656 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9657 echo "configure:9658: checking for sigsetjmp" >&5
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 #include <setjmp.h>
9662 int main() {
9663 sigjmp_buf bar; sigsetjmp (bar, 0);
9664 ; return 0; }
9665 EOF
9666 if { (eval echo configure:9667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9667   rm -rf conftest*
9668   echo "$ac_t""yes" 1>&6
9669    { test "$extra_verbose" = "yes" && cat << \EOF
9670     Defining HAVE_SIGSETJMP
9671 EOF
9672 cat >> confdefs.h <<\EOF
9673 #define HAVE_SIGSETJMP 1
9674 EOF
9675 }
9676
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -rf conftest*
9681   echo "$ac_t""no" 1>&6
9682 fi
9683 rm -f conftest*
9684
9685 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9686 echo "configure:9687: checking whether localtime caches TZ" >&5
9687
9688 if test "$ac_cv_func_tzset" = "yes"; then
9689 cat > conftest.$ac_ext <<EOF
9690 #line 9691 "configure"
9691 #include "confdefs.h"
9692 #include <time.h>
9693 #if STDC_HEADERS
9694 # include <stdlib.h>
9695 #endif
9696 extern char **environ;
9697 unset_TZ ()
9698 {
9699   char **from, **to;
9700   for (to = from = environ; (*to = *from); from++)
9701     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9702       to++;
9703 }
9704 char TZ_GMT0[] = "TZ=GMT0";
9705 char TZ_PST8[] = "TZ=PST8";
9706 main()
9707 {
9708   time_t now = time ((time_t *) 0);
9709   int hour_GMT0, hour_unset;
9710   if (putenv (TZ_GMT0) != 0)
9711     exit (1);
9712   hour_GMT0 = localtime (&now)->tm_hour;
9713   unset_TZ ();
9714   hour_unset = localtime (&now)->tm_hour;
9715   if (putenv (TZ_PST8) != 0)
9716     exit (1);
9717   if (localtime (&now)->tm_hour == hour_GMT0)
9718     exit (1);
9719   unset_TZ ();
9720   if (localtime (&now)->tm_hour != hour_unset)
9721     exit (1);
9722   exit (0);
9723 }
9724 EOF
9725 if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9726 then
9727   emacs_cv_localtime_cache=no
9728 else
9729   conftest_rc="$?"
9730   echo "configure: failed program was:" >&5
9731   cat conftest.$ac_ext >&5
9732   rm -fr conftest*
9733   emacs_cv_localtime_cache=yes
9734 fi
9735 rm -fr conftest*
9736 else
9737         # If we lack tzset, report that localtime does not cache TZ,
9738         # since we can't invalidate the cache if we don't have tzset.
9739         emacs_cv_localtime_cache=no
9740 fi
9741 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9742 if test $emacs_cv_localtime_cache = yes; then
9743   { test "$extra_verbose" = "yes" && cat << \EOF
9744     Defining LOCALTIME_CACHE
9745 EOF
9746 cat >> confdefs.h <<\EOF
9747 #define LOCALTIME_CACHE 1
9748 EOF
9749 }
9750
9751 fi
9752
9753 if test "$HAVE_TIMEVAL" = "yes"; then
9754 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9755 echo "configure:9756: checking whether gettimeofday accepts one or two arguments" >&5
9756 cat > conftest.$ac_ext <<EOF
9757 #line 9758 "configure"
9758 #include "confdefs.h"
9759
9760 #ifdef TIME_WITH_SYS_TIME
9761 #include <sys/time.h>
9762 #include <time.h>
9763 #else
9764 #ifdef HAVE_SYS_TIME_H
9765 #include <sys/time.h>
9766 #else
9767 #include <time.h>
9768 #endif
9769 #endif
9770   
9771 int main() {
9772
9773   struct timeval time;
9774   struct timezone dummy;
9775   gettimeofday (&time, &dummy);
9776
9777 ; return 0; }
9778 EOF
9779 if { (eval echo configure:9780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9780   rm -rf conftest*
9781   echo "$ac_t""two" 1>&6
9782 else
9783   echo "configure: failed program was:" >&5
9784   cat conftest.$ac_ext >&5
9785   rm -rf conftest*
9786   echo "$ac_t""one" 1>&6
9787    { test "$extra_verbose" = "yes" && cat << \EOF
9788     Defining GETTIMEOFDAY_ONE_ARGUMENT
9789 EOF
9790 cat >> confdefs.h <<\EOF
9791 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9792 EOF
9793 }
9794
9795 fi
9796 rm -f conftest*
9797 fi
9798
9799
9800 echo $ac_n "checking for inline""... $ac_c" 1>&6
9801 echo "configure:9802: checking for inline" >&5
9802
9803 ac_cv_c_inline=no
9804 for ac_kw in inline __inline__ __inline; do
9805   cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808
9809 int main() {
9810 } $ac_kw foo() {
9811 ; return 0; }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9814   rm -rf conftest*
9815   ac_cv_c_inline=$ac_kw; break
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819 fi
9820 rm -f conftest*
9821 done
9822
9823
9824 echo "$ac_t""$ac_cv_c_inline" 1>&6
9825 case "$ac_cv_c_inline" in
9826   inline | yes) ;;
9827   no) { test "$extra_verbose" = "yes" && cat << \EOF
9828     Defining inline = 
9829 EOF
9830 cat >> confdefs.h <<\EOF
9831 #define inline 
9832 EOF
9833 }
9834  ;;
9835   *)  { test "$extra_verbose" = "yes" && cat << EOF
9836     Defining inline = $ac_cv_c_inline
9837 EOF
9838 cat >> confdefs.h <<EOF
9839 #define inline $ac_cv_c_inline
9840 EOF
9841 }
9842  ;;
9843 esac
9844
9845 if test "$ac_cv_c_inline" != "no"; then
9846   { test "$extra_verbose" = "yes" && cat << \EOF
9847     Defining HAVE_INLINE
9848 EOF
9849 cat >> confdefs.h <<\EOF
9850 #define HAVE_INLINE 1
9851 EOF
9852 }
9853
9854   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9855    echo "    xemacs will be linked with \"inline.o\""
9856  fi
9857 fi
9858
9859
9860 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9861 # for constant arguments.  Useless!
9862 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9863 echo "configure:9864: checking for working alloca.h" >&5
9864
9865 cat > conftest.$ac_ext <<EOF
9866 #line 9867 "configure"
9867 #include "confdefs.h"
9868 #include <alloca.h>
9869 int main() {
9870 char *p = alloca(2 * sizeof(int));
9871 ; return 0; }
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9874   rm -rf conftest*
9875   ac_cv_header_alloca_h=yes
9876 else
9877   echo "configure: failed program was:" >&5
9878   cat conftest.$ac_ext >&5
9879   rm -rf conftest*
9880   ac_cv_header_alloca_h=no
9881 fi
9882 rm -f conftest*
9883
9884 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9885 if test $ac_cv_header_alloca_h = yes; then
9886   { test "$extra_verbose" = "yes" && cat << \EOF
9887     Defining HAVE_ALLOCA_H
9888 EOF
9889 cat >> confdefs.h <<\EOF
9890 #define HAVE_ALLOCA_H 1
9891 EOF
9892 }
9893
9894 fi
9895
9896 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9897 echo "configure:9898: checking for alloca" >&5
9898
9899 cat > conftest.$ac_ext <<EOF
9900 #line 9901 "configure"
9901 #include "confdefs.h"
9902
9903 #ifdef __GNUC__
9904 # define alloca __builtin_alloca
9905 #else
9906 # ifdef _MSC_VER
9907 #  include <malloc.h>
9908 #  define alloca _alloca
9909 # else
9910 #  if HAVE_ALLOCA_H
9911 #   include <alloca.h>
9912 #  else
9913 #   ifdef _AIX
9914  #pragma alloca
9915 #   else
9916 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9917 char *alloca ();
9918 #    endif
9919 #   endif
9920 #  endif
9921 # endif
9922 #endif
9923
9924 int main() {
9925 char *p = (char *) alloca(1);
9926 ; return 0; }
9927 EOF
9928 if { (eval echo configure:9929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9929   rm -rf conftest*
9930   ac_cv_func_alloca_works=yes
9931 else
9932   echo "configure: failed program was:" >&5
9933   cat conftest.$ac_ext >&5
9934   rm -rf conftest*
9935   ac_cv_func_alloca_works=no
9936 fi
9937 rm -f conftest*
9938
9939 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9940 if test $ac_cv_func_alloca_works = yes; then
9941   { test "$extra_verbose" = "yes" && cat << \EOF
9942     Defining HAVE_ALLOCA
9943 EOF
9944 cat >> confdefs.h <<\EOF
9945 #define HAVE_ALLOCA 1
9946 EOF
9947 }
9948
9949 fi
9950
9951 if test $ac_cv_func_alloca_works = no; then
9952   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9953   # that cause trouble.  Some versions do not even contain alloca or
9954   # contain a buggy version.  If you still want to use their alloca,
9955   # use ar to extract alloca.o from them instead of compiling alloca.c.
9956   ALLOCA=alloca.${ac_objext}
9957   { test "$extra_verbose" = "yes" && cat << \EOF
9958     Defining C_ALLOCA
9959 EOF
9960 cat >> confdefs.h <<\EOF
9961 #define C_ALLOCA 1
9962 EOF
9963 }
9964
9965
9966 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9967 echo "configure:9968: checking whether alloca needs Cray hooks" >&5
9968
9969 cat > conftest.$ac_ext <<EOF
9970 #line 9971 "configure"
9971 #include "confdefs.h"
9972 #if defined(CRAY) && ! defined(CRAY2)
9973 webecray
9974 #else
9975 wenotbecray
9976 #endif
9977
9978 EOF
9979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9980   egrep "webecray" >/dev/null 2>&1; then
9981   rm -rf conftest*
9982   ac_cv_os_cray=yes
9983 else
9984   rm -rf conftest*
9985   ac_cv_os_cray=no
9986 fi
9987 rm -f conftest*
9988
9989
9990 echo "$ac_t""$ac_cv_os_cray" 1>&6
9991 if test $ac_cv_os_cray = yes; then
9992 for ac_func in _getb67 GETB67 getb67; do
9993   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9994 echo "configure:9995: checking for $ac_func" >&5
9995
9996 cat > conftest.$ac_ext <<EOF
9997 #line 9998 "configure"
9998 #include "confdefs.h"
9999 /* System header to define __stub macros and hopefully few prototypes,
10000     which can conflict with char $ac_func(); below.  */
10001 #include <assert.h>
10002 /* Override any gcc2 internal prototype to avoid an error.  */
10003 /* We use char because int might match the return type of a gcc2
10004     builtin and then its argument prototype would still apply.  */
10005 char $ac_func();
10006
10007 int main() {
10008
10009 /* The GNU C library defines this for functions which it implements
10010     to always fail with ENOSYS.  Some functions are actually named
10011     something starting with __ and the normal name is an alias.  */
10012 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10013 choke me
10014 #else
10015 $ac_func();
10016 #endif
10017
10018 ; return 0; }
10019 EOF
10020 if { (eval echo configure:10021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10021   rm -rf conftest*
10022   eval "ac_cv_func_$ac_func=yes"
10023 else
10024   echo "configure: failed program was:" >&5
10025   cat conftest.$ac_ext >&5
10026   rm -rf conftest*
10027   eval "ac_cv_func_$ac_func=no"
10028 fi
10029 rm -f conftest*
10030
10031 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10032   echo "$ac_t""yes" 1>&6
10033   { test "$extra_verbose" = "yes" && cat << EOF
10034     Defining CRAY_STACKSEG_END = $ac_func
10035 EOF
10036 cat >> confdefs.h <<EOF
10037 #define CRAY_STACKSEG_END $ac_func
10038 EOF
10039 }
10040
10041   break
10042 else
10043   echo "$ac_t""no" 1>&6
10044 fi
10045
10046 done
10047 fi
10048
10049 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10050 echo "configure:10051: checking stack direction for C alloca" >&5
10051
10052 cat > conftest.$ac_ext <<EOF
10053 #line 10054 "configure"
10054 #include "confdefs.h"
10055 find_stack_direction ()
10056 {
10057   static char *addr = 0;
10058   auto char dummy;
10059   if (addr == 0)
10060     {
10061       addr = &dummy;
10062       return find_stack_direction ();
10063     }
10064   else
10065     return (&dummy > addr) ? 1 : -1;
10066 }
10067 main ()
10068 {
10069   exit (find_stack_direction() < 0);
10070 }
10071 EOF
10072 if { (eval echo configure:10073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10073 then
10074   ac_cv_c_stack_direction=1
10075 else
10076   conftest_rc="$?"
10077   echo "configure: failed program was:" >&5
10078   cat conftest.$ac_ext >&5
10079   rm -fr conftest*
10080   ac_cv_c_stack_direction=-1
10081 fi
10082 rm -fr conftest*
10083
10084 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10085 { test "$extra_verbose" = "yes" && cat << EOF
10086     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10087 EOF
10088 cat >> confdefs.h <<EOF
10089 #define STACK_DIRECTION $ac_cv_c_stack_direction
10090 EOF
10091 }
10092
10093 fi
10094
10095 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10096    echo "    xemacs will be linked with \"$ALLOCA\""
10097  fi
10098
10099 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10100 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10101 echo "configure:10102: checking for vfork.h" >&5
10102
10103 cat > conftest.$ac_ext <<EOF
10104 #line 10105 "configure"
10105 #include "confdefs.h"
10106 #include <vfork.h>
10107 EOF
10108 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10109 { (eval echo configure:10110: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10110 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10111 if test -z "$ac_err"; then
10112   rm -rf conftest*
10113   eval "ac_cv_header_$ac_safe=yes"
10114 else
10115   echo "$ac_err" >&5
10116   echo "configure: failed program was:" >&5
10117   cat conftest.$ac_ext >&5
10118   rm -rf conftest*
10119   eval "ac_cv_header_$ac_safe=no"
10120 fi
10121 rm -f conftest*
10122 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10123   echo "$ac_t""yes" 1>&6
10124   { test "$extra_verbose" = "yes" && cat << \EOF
10125     Defining HAVE_VFORK_H
10126 EOF
10127 cat >> confdefs.h <<\EOF
10128 #define HAVE_VFORK_H 1
10129 EOF
10130 }
10131
10132 else
10133   echo "$ac_t""no" 1>&6
10134 fi
10135
10136 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10137 echo "configure:10138: checking for working vfork" >&5
10138
10139 cat > conftest.$ac_ext <<EOF
10140 #line 10141 "configure"
10141 #include "confdefs.h"
10142 /* Thanks to Paul Eggert for this test.  */
10143 #include <stdio.h>
10144 #include <sys/types.h>
10145 #include <sys/stat.h>
10146 #ifdef HAVE_UNISTD_H
10147 #include <unistd.h>
10148 #endif
10149 #ifdef HAVE_VFORK_H
10150 #include <vfork.h>
10151 #endif
10152 /* On some sparc systems, changes by the child to local and incoming
10153    argument registers are propagated back to the parent.
10154    The compiler is told about this with #include <vfork.h>,
10155    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10156    Test for this by using a static variable whose address
10157    is put into a register that is clobbered by the vfork.  */
10158 static
10159 #ifdef __cplusplus
10160 sparc_address_test (int arg)
10161 #else
10162 sparc_address_test (arg) int arg;
10163 #endif
10164 {
10165   static pid_t child;
10166   if (!child) {
10167     child = vfork ();
10168     if (child < 0) {
10169       perror ("vfork");
10170       _exit(2);
10171     }
10172     if (!child) {
10173       arg = getpid();
10174       write(-1, "", 0);
10175       _exit (arg);
10176     }
10177   }
10178 }
10179 main() {
10180   pid_t parent = getpid ();
10181   pid_t child;
10182
10183   sparc_address_test ();
10184
10185   child = vfork ();
10186
10187   if (child == 0) {
10188     /* Here is another test for sparc vfork register problems.
10189        This test uses lots of local variables, at least
10190        as many local variables as main has allocated so far
10191        including compiler temporaries.  4 locals are enough for
10192        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10193        A buggy compiler should reuse the register of parent
10194        for one of the local variables, since it will think that
10195        parent can't possibly be used any more in this routine.
10196        Assigning to the local variable will thus munge parent
10197        in the parent process.  */
10198     pid_t
10199       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10200       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10201     /* Convince the compiler that p..p7 are live; otherwise, it might
10202        use the same hardware register for all 8 local variables.  */
10203     if (p != p1 || p != p2 || p != p3 || p != p4
10204         || p != p5 || p != p6 || p != p7)
10205       _exit(1);
10206
10207     /* On some systems (e.g. IRIX 3.3),
10208        vfork doesn't separate parent from child file descriptors.
10209        If the child closes a descriptor before it execs or exits,
10210        this munges the parent's descriptor as well.
10211        Test for this by closing stdout in the child.  */
10212     _exit(close(fileno(stdout)) != 0);
10213   } else {
10214     int status;
10215     struct stat st;
10216
10217     while (wait(&status) != child)
10218       ;
10219     exit(
10220          /* Was there some problem with vforking?  */
10221          child < 0
10222
10223          /* Did the child fail?  (This shouldn't happen.)  */
10224          || status
10225
10226          /* Did the vfork/compiler bug occur?  */
10227          || parent != getpid()
10228
10229          /* Did the file descriptor bug occur?  */
10230          || fstat(fileno(stdout), &st) != 0
10231          );
10232   }
10233 }
10234 EOF
10235 if { (eval echo configure:10236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10236 then
10237   ac_cv_func_vfork_works=yes
10238 else
10239   conftest_rc="$?"
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -fr conftest*
10243   ac_cv_func_vfork_works=no
10244 fi
10245 rm -fr conftest*
10246
10247 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10248 if test $ac_cv_func_vfork_works = no; then
10249   { test "$extra_verbose" = "yes" && cat << \EOF
10250     Defining vfork = fork
10251 EOF
10252 cat >> confdefs.h <<\EOF
10253 #define vfork fork
10254 EOF
10255 }
10256
10257 fi
10258
10259
10260 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10261 echo "configure:10262: checking for working strcoll" >&5
10262
10263 cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 #include <string.h>
10267 main ()
10268 {
10269   exit (strcoll ("abc", "def") >= 0 ||
10270         strcoll ("ABC", "DEF") >= 0 ||
10271         strcoll ("123", "456") >= 0);
10272 }
10273 EOF
10274 if { (eval echo configure:10275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10275 then
10276   ac_cv_func_strcoll_works=yes
10277 else
10278   conftest_rc="$?"
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -fr conftest*
10282   ac_cv_func_strcoll_works=no
10283 fi
10284 rm -fr conftest*
10285
10286 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10287 if test $ac_cv_func_strcoll_works = yes; then
10288   { test "$extra_verbose" = "yes" && cat << \EOF
10289     Defining HAVE_STRCOLL
10290 EOF
10291 cat >> confdefs.h <<\EOF
10292 #define HAVE_STRCOLL 1
10293 EOF
10294 }
10295
10296 fi
10297
10298
10299 for ac_func in getpgrp
10300 do
10301 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10302 echo "configure:10303: checking for $ac_func" >&5
10303
10304 cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307 /* System header to define __stub macros and hopefully few prototypes,
10308     which can conflict with char $ac_func(); below.  */
10309 #include <assert.h>
10310 /* Override any gcc2 internal prototype to avoid an error.  */
10311 /* We use char because int might match the return type of a gcc2
10312     builtin and then its argument prototype would still apply.  */
10313 char $ac_func();
10314
10315 int main() {
10316
10317 /* The GNU C library defines this for functions which it implements
10318     to always fail with ENOSYS.  Some functions are actually named
10319     something starting with __ and the normal name is an alias.  */
10320 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10321 choke me
10322 #else
10323 $ac_func();
10324 #endif
10325
10326 ; return 0; }
10327 EOF
10328 if { (eval echo configure:10329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10329   rm -rf conftest*
10330   eval "ac_cv_func_$ac_func=yes"
10331 else
10332   echo "configure: failed program was:" >&5
10333   cat conftest.$ac_ext >&5
10334   rm -rf conftest*
10335   eval "ac_cv_func_$ac_func=no"
10336 fi
10337 rm -f conftest*
10338
10339 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10340   echo "$ac_t""yes" 1>&6
10341     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10342   { test "$extra_verbose" = "yes" && cat << EOF
10343     Defining $ac_tr_func
10344 EOF
10345 cat >> confdefs.h <<EOF
10346 #define $ac_tr_func 1
10347 EOF
10348 }
10349  
10350 else
10351   echo "$ac_t""no" 1>&6
10352 fi
10353 done
10354
10355 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10356 echo "configure:10357: checking whether getpgrp takes no argument" >&5
10357
10358 cat > conftest.$ac_ext <<EOF
10359 #line 10360 "configure"
10360 #include "confdefs.h"
10361
10362 /*
10363  * If this system has a BSD-style getpgrp(),
10364  * which takes a pid argument, exit unsuccessfully.
10365  *
10366  * Snarfed from Chet Ramey's bash pgrp.c test program
10367  */
10368 #include <stdio.h>
10369 #include <sys/types.h>
10370
10371 int     pid;
10372 int     pg1, pg2, pg3, pg4;
10373 int     ng, np, s, child;
10374
10375 main()
10376 {
10377         pid = getpid();
10378         pg1 = getpgrp(0);
10379         pg2 = getpgrp();
10380         pg3 = getpgrp(pid);
10381         pg4 = getpgrp(1);
10382
10383         /*
10384          * If all of these values are the same, it's pretty sure that
10385          * we're on a system that ignores getpgrp's first argument.
10386          */
10387         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10388                 exit(0);
10389
10390         child = fork();
10391         if (child < 0)
10392                 exit(1);
10393         else if (child == 0) {
10394                 np = getpid();
10395                 /*
10396                  * If this is Sys V, this will not work; pgrp will be
10397                  * set to np because setpgrp just changes a pgrp to be
10398                  * the same as the pid.
10399                  */
10400                 setpgrp(np, pg1);
10401                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10402                 if (ng == pg1) {
10403                         exit(1);
10404                 } else {
10405                         exit(0);
10406                 }
10407         } else {
10408                 wait(&s);
10409                 exit(s>>8);
10410         }
10411 }
10412
10413 EOF
10414 if { (eval echo configure:10415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10415 then
10416   ac_cv_func_getpgrp_void=yes
10417 else
10418   conftest_rc="$?"
10419   echo "configure: failed program was:" >&5
10420   cat conftest.$ac_ext >&5
10421   rm -fr conftest*
10422   ac_cv_func_getpgrp_void=no
10423 fi
10424 rm -fr conftest*
10425
10426
10427 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10428 if test $ac_cv_func_getpgrp_void = yes; then
10429   { test "$extra_verbose" = "yes" && cat << \EOF
10430     Defining GETPGRP_VOID
10431 EOF
10432 cat >> confdefs.h <<\EOF
10433 #define GETPGRP_VOID 1
10434 EOF
10435 }
10436
10437 fi
10438
10439
10440 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10441 echo "configure:10442: checking for working mmap" >&5
10442 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10443 cat > conftest.$ac_ext <<EOF
10444 #line 10445 "configure"
10445 #include "confdefs.h"
10446 #include <stdio.h>
10447 #include <unistd.h>
10448 #include <fcntl.h>
10449 #include <sys/mman.h>
10450
10451 #ifndef MAP_VARIABLE
10452 #define MAP_VARIABLE 0
10453 #endif
10454
10455 #ifndef MAP_FAILED
10456 #define MAP_FAILED -1
10457 #endif
10458
10459 int main (int argc, char *argv[])
10460 {
10461   int fd = -1;
10462   caddr_t p;
10463 #ifndef MAP_ANONYMOUS
10464   fd = open ("/dev/zero", O_RDWR);
10465   if (fd < 0)
10466     return 1;
10467 #define MAP_ANONYMOUS 0
10468 #endif
10469   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10470            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10471            fd, 0) != (void *) MAP_FAILED)
10472     return 0;
10473   perror ("conftest: mmap failed");
10474   return 1;
10475 }
10476 EOF
10477 if { (eval echo configure:10478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10478 then
10479   have_mmap=yes
10480 else
10481   conftest_rc="$?"
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -fr conftest*
10485   have_mmap=no
10486 fi
10487 rm -fr conftest* ;;
10488 esac
10489 echo "$ac_t""$have_mmap" 1>&6
10490 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10491     Defining HAVE_MMAP
10492 EOF
10493 cat >> confdefs.h <<\EOF
10494 #define HAVE_MMAP 1
10495 EOF
10496 }
10497
10498
10499 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10500 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10501 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10502     Defining REL_ALLOC
10503 EOF
10504 cat >> confdefs.h <<\EOF
10505 #define REL_ALLOC 1
10506 EOF
10507 }
10508
10509
10510 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10511 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10512 echo "configure:10513: checking for termios.h" >&5
10513
10514 cat > conftest.$ac_ext <<EOF
10515 #line 10516 "configure"
10516 #include "confdefs.h"
10517 #include <termios.h>
10518 EOF
10519 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10520 { (eval echo configure:10521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10521 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10522 if test -z "$ac_err"; then
10523   rm -rf conftest*
10524   eval "ac_cv_header_$ac_safe=yes"
10525 else
10526   echo "$ac_err" >&5
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=no"
10531 fi
10532 rm -f conftest*
10533 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10534   echo "$ac_t""yes" 1>&6
10535   { test "$extra_verbose" = "yes" && cat << \EOF
10536     Defining HAVE_TERMIOS
10537 EOF
10538 cat >> confdefs.h <<\EOF
10539 #define HAVE_TERMIOS 1
10540 EOF
10541 }
10542
10543   { test "$extra_verbose" = "yes" && cat << \EOF
10544     Defining SIGNALS_VIA_CHARACTERS
10545 EOF
10546 cat >> confdefs.h <<\EOF
10547 #define SIGNALS_VIA_CHARACTERS 1
10548 EOF
10549 }
10550
10551   { test "$extra_verbose" = "yes" && cat << \EOF
10552     Defining NO_TERMIO
10553 EOF
10554 cat >> confdefs.h <<\EOF
10555 #define NO_TERMIO 1
10556 EOF
10557 }
10558
10559 else
10560   echo "$ac_t""no" 1>&6
10561 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10562 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10563 echo "configure:10564: checking for termio.h" >&5
10564
10565 cat > conftest.$ac_ext <<EOF
10566 #line 10567 "configure"
10567 #include "confdefs.h"
10568 #include <termio.h>
10569 EOF
10570 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10571 { (eval echo configure:10572: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10572 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10573 if test -z "$ac_err"; then
10574   rm -rf conftest*
10575   eval "ac_cv_header_$ac_safe=yes"
10576 else
10577   echo "$ac_err" >&5
10578   echo "configure: failed program was:" >&5
10579   cat conftest.$ac_ext >&5
10580   rm -rf conftest*
10581   eval "ac_cv_header_$ac_safe=no"
10582 fi
10583 rm -f conftest*
10584 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10585   echo "$ac_t""yes" 1>&6
10586   { test "$extra_verbose" = "yes" && cat << \EOF
10587     Defining HAVE_TERMIO
10588 EOF
10589 cat >> confdefs.h <<\EOF
10590 #define HAVE_TERMIO 1
10591 EOF
10592 }
10593
10594 else
10595   echo "$ac_t""no" 1>&6
10596 fi
10597
10598 fi
10599
10600
10601
10602 echo $ac_n "checking for socket""... $ac_c" 1>&6
10603 echo "configure:10604: checking for socket" >&5
10604
10605 cat > conftest.$ac_ext <<EOF
10606 #line 10607 "configure"
10607 #include "confdefs.h"
10608 /* System header to define __stub macros and hopefully few prototypes,
10609     which can conflict with char socket(); below.  */
10610 #include <assert.h>
10611 /* Override any gcc2 internal prototype to avoid an error.  */
10612 /* We use char because int might match the return type of a gcc2
10613     builtin and then its argument prototype would still apply.  */
10614 char socket();
10615
10616 int main() {
10617
10618 /* The GNU C library defines this for functions which it implements
10619     to always fail with ENOSYS.  Some functions are actually named
10620     something starting with __ and the normal name is an alias.  */
10621 #if defined (__stub_socket) || defined (__stub___socket)
10622 choke me
10623 #else
10624 socket();
10625 #endif
10626
10627 ; return 0; }
10628 EOF
10629 if { (eval echo configure:10630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10630   rm -rf conftest*
10631   eval "ac_cv_func_socket=yes"
10632 else
10633   echo "configure: failed program was:" >&5
10634   cat conftest.$ac_ext >&5
10635   rm -rf conftest*
10636   eval "ac_cv_func_socket=no"
10637 fi
10638 rm -f conftest*
10639
10640 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10641   echo "$ac_t""yes" 1>&6
10642   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10643 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10644 echo "configure:10645: checking for netinet/in.h" >&5
10645
10646 cat > conftest.$ac_ext <<EOF
10647 #line 10648 "configure"
10648 #include "confdefs.h"
10649 #include <netinet/in.h>
10650 EOF
10651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10652 { (eval echo configure:10653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10654 if test -z "$ac_err"; then
10655   rm -rf conftest*
10656   eval "ac_cv_header_$ac_safe=yes"
10657 else
10658   echo "$ac_err" >&5
10659   echo "configure: failed program was:" >&5
10660   cat conftest.$ac_ext >&5
10661   rm -rf conftest*
10662   eval "ac_cv_header_$ac_safe=no"
10663 fi
10664 rm -f conftest*
10665 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10666   echo "$ac_t""yes" 1>&6
10667   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10668 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10669 echo "configure:10670: checking for arpa/inet.h" >&5
10670
10671 cat > conftest.$ac_ext <<EOF
10672 #line 10673 "configure"
10673 #include "confdefs.h"
10674 #include <arpa/inet.h>
10675 EOF
10676 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10677 { (eval echo configure:10678: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10678 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10679 if test -z "$ac_err"; then
10680   rm -rf conftest*
10681   eval "ac_cv_header_$ac_safe=yes"
10682 else
10683   echo "$ac_err" >&5
10684   echo "configure: failed program was:" >&5
10685   cat conftest.$ac_ext >&5
10686   rm -rf conftest*
10687   eval "ac_cv_header_$ac_safe=no"
10688 fi
10689 rm -f conftest*
10690 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10691   echo "$ac_t""yes" 1>&6
10692   
10693   { test "$extra_verbose" = "yes" && cat << \EOF
10694     Defining HAVE_SOCKETS
10695 EOF
10696 cat >> confdefs.h <<\EOF
10697 #define HAVE_SOCKETS 1
10698 EOF
10699 }
10700
10701       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10702 echo "configure:10703: checking "for sun_len member in struct sockaddr_un"" >&5
10703       cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706
10707 #include <sys/types.h>
10708 #include <sys/socket.h>
10709 #include <sys/un.h>
10710       
10711 int main() {
10712 static struct sockaddr_un x; x.sun_len = 1;
10713 ; return 0; }
10714 EOF
10715 if { (eval echo configure:10716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10716   rm -rf conftest*
10717   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10718     Defining HAVE_SOCKADDR_SUN_LEN
10719 EOF
10720 cat >> confdefs.h <<\EOF
10721 #define HAVE_SOCKADDR_SUN_LEN 1
10722 EOF
10723 }
10724
10725 else
10726   echo "configure: failed program was:" >&5
10727   cat conftest.$ac_ext >&5
10728   rm -rf conftest*
10729   echo "$ac_t""no" 1>&6
10730 fi
10731 rm -f conftest*
10732       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10733 echo "configure:10734: checking "for ip_mreq struct in netinet/in.h"" >&5
10734       cat > conftest.$ac_ext <<EOF
10735 #line 10736 "configure"
10736 #include "confdefs.h"
10737
10738 #include <sys/types.h>
10739 #include <netinet/in.h>
10740       
10741 int main() {
10742 static struct ip_mreq x;
10743 ; return 0; }
10744 EOF
10745 if { (eval echo configure:10746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10746   rm -rf conftest*
10747   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10748     Defining HAVE_MULTICAST
10749 EOF
10750 cat >> confdefs.h <<\EOF
10751 #define HAVE_MULTICAST 1
10752 EOF
10753 }
10754
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   echo "$ac_t""no" 1>&6
10760 fi
10761 rm -f conftest*
10762 else
10763   echo "$ac_t""no" 1>&6
10764 fi
10765
10766 else
10767   echo "$ac_t""no" 1>&6
10768 fi
10769
10770 else
10771   echo "$ac_t""no" 1>&6
10772 fi
10773
10774
10775 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10776 echo "configure:10777: checking for msgget" >&5
10777
10778 cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 /* System header to define __stub macros and hopefully few prototypes,
10782     which can conflict with char msgget(); below.  */
10783 #include <assert.h>
10784 /* Override any gcc2 internal prototype to avoid an error.  */
10785 /* We use char because int might match the return type of a gcc2
10786     builtin and then its argument prototype would still apply.  */
10787 char msgget();
10788
10789 int main() {
10790
10791 /* The GNU C library defines this for functions which it implements
10792     to always fail with ENOSYS.  Some functions are actually named
10793     something starting with __ and the normal name is an alias.  */
10794 #if defined (__stub_msgget) || defined (__stub___msgget)
10795 choke me
10796 #else
10797 msgget();
10798 #endif
10799
10800 ; return 0; }
10801 EOF
10802 if { (eval echo configure:10803: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10803   rm -rf conftest*
10804   eval "ac_cv_func_msgget=yes"
10805 else
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -rf conftest*
10809   eval "ac_cv_func_msgget=no"
10810 fi
10811 rm -f conftest*
10812
10813 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10814   echo "$ac_t""yes" 1>&6
10815   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10816 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10817 echo "configure:10818: checking for sys/ipc.h" >&5
10818
10819 cat > conftest.$ac_ext <<EOF
10820 #line 10821 "configure"
10821 #include "confdefs.h"
10822 #include <sys/ipc.h>
10823 EOF
10824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10825 { (eval echo configure:10826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10826 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10827 if test -z "$ac_err"; then
10828   rm -rf conftest*
10829   eval "ac_cv_header_$ac_safe=yes"
10830 else
10831   echo "$ac_err" >&5
10832   echo "configure: failed program was:" >&5
10833   cat conftest.$ac_ext >&5
10834   rm -rf conftest*
10835   eval "ac_cv_header_$ac_safe=no"
10836 fi
10837 rm -f conftest*
10838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10839   echo "$ac_t""yes" 1>&6
10840   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10841 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10842 echo "configure:10843: checking for sys/msg.h" >&5
10843
10844 cat > conftest.$ac_ext <<EOF
10845 #line 10846 "configure"
10846 #include "confdefs.h"
10847 #include <sys/msg.h>
10848 EOF
10849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10850 { (eval echo configure:10851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10852 if test -z "$ac_err"; then
10853   rm -rf conftest*
10854   eval "ac_cv_header_$ac_safe=yes"
10855 else
10856   echo "$ac_err" >&5
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -rf conftest*
10860   eval "ac_cv_header_$ac_safe=no"
10861 fi
10862 rm -f conftest*
10863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10864   echo "$ac_t""yes" 1>&6
10865   { test "$extra_verbose" = "yes" && cat << \EOF
10866     Defining HAVE_SYSVIPC
10867 EOF
10868 cat >> confdefs.h <<\EOF
10869 #define HAVE_SYSVIPC 1
10870 EOF
10871 }
10872
10873 else
10874   echo "$ac_t""no" 1>&6
10875 fi
10876
10877 else
10878   echo "$ac_t""no" 1>&6
10879 fi
10880
10881 else
10882   echo "$ac_t""no" 1>&6
10883 fi
10884
10885
10886 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10887 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10888 echo "configure:10889: checking for dirent.h" >&5
10889
10890 cat > conftest.$ac_ext <<EOF
10891 #line 10892 "configure"
10892 #include "confdefs.h"
10893 #include <dirent.h>
10894 EOF
10895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10896 { (eval echo configure:10897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10898 if test -z "$ac_err"; then
10899   rm -rf conftest*
10900   eval "ac_cv_header_$ac_safe=yes"
10901 else
10902   echo "$ac_err" >&5
10903   echo "configure: failed program was:" >&5
10904   cat conftest.$ac_ext >&5
10905   rm -rf conftest*
10906   eval "ac_cv_header_$ac_safe=no"
10907 fi
10908 rm -f conftest*
10909 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10910   echo "$ac_t""yes" 1>&6
10911   { test "$extra_verbose" = "yes" && cat << \EOF
10912     Defining SYSV_SYSTEM_DIR
10913 EOF
10914 cat >> confdefs.h <<\EOF
10915 #define SYSV_SYSTEM_DIR 1
10916 EOF
10917 }
10918
10919 else
10920   echo "$ac_t""no" 1>&6
10921 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10922 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10923 echo "configure:10924: checking for sys/dir.h" >&5
10924
10925 cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928 #include <sys/dir.h>
10929 EOF
10930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10931 { (eval echo configure:10932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10933 if test -z "$ac_err"; then
10934   rm -rf conftest*
10935   eval "ac_cv_header_$ac_safe=yes"
10936 else
10937   echo "$ac_err" >&5
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -rf conftest*
10941   eval "ac_cv_header_$ac_safe=no"
10942 fi
10943 rm -f conftest*
10944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946   :
10947 else
10948   echo "$ac_t""no" 1>&6
10949 { test "$extra_verbose" = "yes" && cat << \EOF
10950     Defining NONSYSTEM_DIR_LIBRARY
10951 EOF
10952 cat >> confdefs.h <<\EOF
10953 #define NONSYSTEM_DIR_LIBRARY 1
10954 EOF
10955 }
10956
10957 fi
10958
10959 fi
10960
10961
10962 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10963 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10964 echo "configure:10965: checking for nlist.h" >&5
10965
10966 cat > conftest.$ac_ext <<EOF
10967 #line 10968 "configure"
10968 #include "confdefs.h"
10969 #include <nlist.h>
10970 EOF
10971 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10972 { (eval echo configure:10973: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10973 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10974 if test -z "$ac_err"; then
10975   rm -rf conftest*
10976   eval "ac_cv_header_$ac_safe=yes"
10977 else
10978   echo "$ac_err" >&5
10979   echo "configure: failed program was:" >&5
10980   cat conftest.$ac_ext >&5
10981   rm -rf conftest*
10982   eval "ac_cv_header_$ac_safe=no"
10983 fi
10984 rm -f conftest*
10985 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10986   echo "$ac_t""yes" 1>&6
10987   { test "$extra_verbose" = "yes" && cat << \EOF
10988     Defining NLIST_STRUCT
10989 EOF
10990 cat >> confdefs.h <<\EOF
10991 #define NLIST_STRUCT 1
10992 EOF
10993 }
10994
10995 else
10996   echo "$ac_t""no" 1>&6
10997 fi
10998
10999
11000
11001 echo "checking "for sound support"" 1>&6
11002 echo "configure:11003: checking "for sound support"" >&5
11003 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11004
11005 if test "$with_native_sound" != "no"; then
11006     if test -n "$native_sound_lib"; then
11007     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11008 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11009 echo "configure:11010: checking for multimedia/audio_device.h" >&5
11010
11011 cat > conftest.$ac_ext <<EOF
11012 #line 11013 "configure"
11013 #include "confdefs.h"
11014 #include <multimedia/audio_device.h>
11015 EOF
11016 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11017 { (eval echo configure:11018: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11018 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11019 if test -z "$ac_err"; then
11020   rm -rf conftest*
11021   eval "ac_cv_header_$ac_safe=yes"
11022 else
11023   echo "$ac_err" >&5
11024   echo "configure: failed program was:" >&5
11025   cat conftest.$ac_ext >&5
11026   rm -rf conftest*
11027   eval "ac_cv_header_$ac_safe=no"
11028 fi
11029 rm -f conftest*
11030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11031   echo "$ac_t""yes" 1>&6
11032   sound_found=yes sound_cflags=""
11033       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11034    echo "    xemacs will be linked with \"sunplay.o\""
11035  fi
11036 else
11037   echo "$ac_t""no" 1>&6
11038 fi
11039
11040   fi
11041
11042     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11043     sound_found=yes
11044     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11045    echo "    xemacs will be linked with \"sunplay.o\""
11046  fi
11047     if test -d "/usr/demo/SOUND/include"
11048       then sound_cflags="-I/usr/demo/SOUND/include"
11049       else sound_cflags="-I/usr/demo/SOUND"
11050     fi
11051     if test -z "$native_sound_lib" ; then
11052       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11053         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11054         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11055       fi
11056     fi
11057   fi
11058
11059     if test -z "$sound_found"; then
11060     case "$canonical" in
11061     *-sgi-* )
11062       if test -z "$native_sound_lib"; then
11063         
11064 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11065 echo "configure:11066: checking for ALopenport in -laudio" >&5
11066 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11067
11068 xe_check_libs=" -laudio "
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char ALopenport();
11076
11077 int main() {
11078 ALopenport()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 xe_check_libs=""
11092
11093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11094   echo "$ac_t""yes" 1>&6
11095   native_sound_lib="-laudio"
11096 else
11097   echo "$ac_t""no" 1>&6
11098 fi
11099
11100
11101       fi
11102       if test -n "$native_sound_lib"; then
11103         sound_found=yes sound_cflags=""
11104         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11105    echo "    xemacs will be linked with \"sgiplay.o\""
11106  fi
11107       fi ;;
11108     hppa*-hp-hpux* )
11109       if test -z "$native_sound_lib"; then
11110         
11111 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11112 echo "configure:11113: checking for AOpenAudio in -lAlib" >&5
11113 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11114
11115 xe_check_libs=" -lAlib "
11116 cat > conftest.$ac_ext <<EOF
11117 #line 11118 "configure"
11118 #include "confdefs.h"
11119 /* Override any gcc2 internal prototype to avoid an error.  */
11120 /* We use char because int might match the return type of a gcc2
11121     builtin and then its argument prototype would still apply.  */
11122 char AOpenAudio();
11123
11124 int main() {
11125 AOpenAudio()
11126 ; return 0; }
11127 EOF
11128 if { (eval echo configure:11129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11129   rm -rf conftest*
11130   eval "ac_cv_lib_$ac_lib_var=yes"
11131 else
11132   echo "configure: failed program was:" >&5
11133   cat conftest.$ac_ext >&5
11134   rm -rf conftest*
11135   eval "ac_cv_lib_$ac_lib_var=no"
11136 fi
11137 rm -f conftest*
11138 xe_check_libs=""
11139
11140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11141   echo "$ac_t""yes" 1>&6
11142   native_sound_lib="-lAlib"
11143 else
11144   echo "$ac_t""no" 1>&6
11145 fi
11146
11147
11148       fi
11149       if test -n "$native_sound_lib"; then
11150         sound_found=yes
11151         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11152    echo "    xemacs will be linked with \"hpplay.o\""
11153  fi
11154         if test "$GCC" = "yes" # Kludge city
11155           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11156           else sound_cflags="+e -I/usr/audio/examples"
11157         fi
11158       fi ;;
11159     esac
11160   fi
11161
11162     if test -z "$sound_found"; then
11163     for dir in "machine" "sys" "linux"; do
11164       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11165 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11166 echo "configure:11167: checking for ${dir}/soundcard.h" >&5
11167
11168 cat > conftest.$ac_ext <<EOF
11169 #line 11170 "configure"
11170 #include "confdefs.h"
11171 #include <${dir}/soundcard.h>
11172 EOF
11173 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11174 { (eval echo configure:11175: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11175 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11176 if test -z "$ac_err"; then
11177   rm -rf conftest*
11178   eval "ac_cv_header_$ac_safe=yes"
11179 else
11180   echo "$ac_err" >&5
11181   echo "configure: failed program was:" >&5
11182   cat conftest.$ac_ext >&5
11183   rm -rf conftest*
11184   eval "ac_cv_header_$ac_safe=no"
11185 fi
11186 rm -f conftest*
11187 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11188   echo "$ac_t""yes" 1>&6
11189   sound_found=yes
11190        need_miscplay=yes
11191         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11192    echo "    xemacs will be linked with \"linuxplay.o\""
11193  fi
11194         { test "$extra_verbose" = "yes" && cat << EOF
11195     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11196 EOF
11197 cat >> confdefs.h <<EOF
11198 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11199 EOF
11200 }
11201
11202         break
11203 else
11204   echo "$ac_t""no" 1>&6
11205 fi
11206
11207     done
11208   fi
11209
11210   test "$sound_found" = "yes" && with_native_sound=yes
11211 fi
11212
11213 if test "$with_native_sound" = "yes"; then
11214   { test "$extra_verbose" = "yes" && cat << \EOF
11215     Defining HAVE_NATIVE_SOUND
11216 EOF
11217 cat >> confdefs.h <<\EOF
11218 #define HAVE_NATIVE_SOUND 1
11219 EOF
11220 }
11221
11222   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11223 fi
11224
11225 if test "$with_nas_sound" != "no"; then
11226   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11227 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11228 echo "configure:11229: checking for audio/audiolib.h" >&5
11229
11230 cat > conftest.$ac_ext <<EOF
11231 #line 11232 "configure"
11232 #include "confdefs.h"
11233 #include <audio/audiolib.h>
11234 EOF
11235 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11236 { (eval echo configure:11237: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11237 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11238 if test -z "$ac_err"; then
11239   rm -rf conftest*
11240   eval "ac_cv_header_$ac_safe=yes"
11241 else
11242   echo "$ac_err" >&5
11243   echo "configure: failed program was:" >&5
11244   cat conftest.$ac_ext >&5
11245   rm -rf conftest*
11246   eval "ac_cv_header_$ac_safe=no"
11247 fi
11248 rm -f conftest*
11249 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11250   echo "$ac_t""yes" 1>&6
11251   
11252     
11253 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11254 echo "configure:11255: checking for AuOpenServer in -laudio" >&5
11255 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11256
11257 xe_check_libs=" -laudio "
11258 cat > conftest.$ac_ext <<EOF
11259 #line 11260 "configure"
11260 #include "confdefs.h"
11261 /* Override any gcc2 internal prototype to avoid an error.  */
11262 /* We use char because int might match the return type of a gcc2
11263     builtin and then its argument prototype would still apply.  */
11264 char AuOpenServer();
11265
11266 int main() {
11267 AuOpenServer()
11268 ; return 0; }
11269 EOF
11270 if { (eval echo configure:11271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11271   rm -rf conftest*
11272   eval "ac_cv_lib_$ac_lib_var=yes"
11273 else
11274   echo "configure: failed program was:" >&5
11275   cat conftest.$ac_ext >&5
11276   rm -rf conftest*
11277   eval "ac_cv_lib_$ac_lib_var=no"
11278 fi
11279 rm -f conftest*
11280 xe_check_libs=""
11281
11282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11283   echo "$ac_t""yes" 1>&6
11284   have_nas_sound=yes
11285 else
11286   echo "$ac_t""no" 1>&6
11287 fi
11288
11289
11290 else
11291   echo "$ac_t""no" 1>&6
11292 fi
11293
11294   if test "$have_nas_sound" = "yes"; then
11295     with_nas_sound=yes
11296     { test "$extra_verbose" = "yes" && cat << \EOF
11297     Defining HAVE_NAS_SOUND
11298 EOF
11299 cat >> confdefs.h <<\EOF
11300 #define HAVE_NAS_SOUND 1
11301 EOF
11302 }
11303
11304     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11305    echo "    xemacs will be linked with \"nas.o\""
11306  fi
11307     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11308             cat > conftest.$ac_ext <<EOF
11309 #line 11310 "configure"
11310 #include "confdefs.h"
11311 #include <audio/Xtutil.h>
11312 EOF
11313 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11314   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11315   :
11316 else
11317   rm -rf conftest*
11318   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11319     Defining NAS_NO_ERROR_JUMP
11320 EOF
11321 cat >> confdefs.h <<\EOF
11322 #define NAS_NO_ERROR_JUMP 1
11323 EOF
11324 }
11325
11326 fi
11327 rm -f conftest*
11328
11329   else
11330     test "$with_nas_sound" = "yes" && \
11331       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11332     with_nas_sound=no
11333   fi
11334 fi
11335
11336 if test "$with_esd_sound" != "no"; then
11337   # Extract the first word of "esd-config", so it can be a program name with args.
11338 set dummy esd-config; ac_word=$2
11339 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11340 echo "configure:11341: checking for $ac_word" >&5
11341
11342 if test -n "$have_esd_config"; then
11343   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11344 else
11345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11346   ac_dummy="$PATH"
11347   for ac_dir in $ac_dummy; do
11348     test -z "$ac_dir" && ac_dir=.
11349     if test -f $ac_dir/$ac_word; then
11350       ac_cv_prog_have_esd_config="yes"
11351       break
11352     fi
11353   done
11354   IFS="$ac_save_ifs"
11355   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11356 fi
11357 have_esd_config="$ac_cv_prog_have_esd_config"
11358 if test -n "$have_esd_config"; then
11359   echo "$ac_t""$have_esd_config" 1>&6
11360 else
11361   echo "$ac_t""no" 1>&6
11362 fi
11363
11364   if test "$have_esd_config" = "yes"; then
11365     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11366     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
11367     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11368     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11369 echo "configure:11370: checking for esd_play_stream" >&5
11370
11371 cat > conftest.$ac_ext <<EOF
11372 #line 11373 "configure"
11373 #include "confdefs.h"
11374 /* System header to define __stub macros and hopefully few prototypes,
11375     which can conflict with char esd_play_stream(); below.  */
11376 #include <assert.h>
11377 /* Override any gcc2 internal prototype to avoid an error.  */
11378 /* We use char because int might match the return type of a gcc2
11379     builtin and then its argument prototype would still apply.  */
11380 char esd_play_stream();
11381
11382 int main() {
11383
11384 /* The GNU C library defines this for functions which it implements
11385     to always fail with ENOSYS.  Some functions are actually named
11386     something starting with __ and the normal name is an alias.  */
11387 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11388 choke me
11389 #else
11390 esd_play_stream();
11391 #endif
11392
11393 ; return 0; }
11394 EOF
11395 if { (eval echo configure:11396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11396   rm -rf conftest*
11397   eval "ac_cv_func_esd_play_stream=yes"
11398 else
11399   echo "configure: failed program was:" >&5
11400   cat conftest.$ac_ext >&5
11401   rm -rf conftest*
11402   eval "ac_cv_func_esd_play_stream=no"
11403 fi
11404 rm -f conftest*
11405
11406 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11407   echo "$ac_t""yes" 1>&6
11408   have_esd_sound=yes
11409 else
11410   echo "$ac_t""no" 1>&6
11411 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11412 fi
11413
11414   fi
11415
11416   if test "$have_esd_sound" = "yes"; then
11417     with_esd_sound=yes
11418     need_miscplay=yes
11419     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11420    echo "    xemacs will be linked with \"esd.o\""
11421  fi
11422     { test "$extra_verbose" = "yes" && cat << \EOF
11423     Defining HAVE_ESD_SOUND
11424 EOF
11425 cat >> confdefs.h <<\EOF
11426 #define HAVE_ESD_SOUND 1
11427 EOF
11428 }
11429
11430   else
11431     test "$with_esd_sound" = "yes" && \
11432       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11433     with_esd_sound=no
11434   fi
11435 fi
11436
11437 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11438    echo "    xemacs will be linked with \"miscplay.o\""
11439  fi
11440
11441
11442 test -z "$with_tty" && with_tty=yes
11443
11444 if test "$with_tty" = "yes"  ; then
11445   echo "checking for TTY-related features" 1>&6
11446 echo "configure:11447: checking for TTY-related features" >&5
11447   { test "$extra_verbose" = "yes" && cat << \EOF
11448     Defining HAVE_TTY
11449 EOF
11450 cat >> confdefs.h <<\EOF
11451 #define HAVE_TTY 1
11452 EOF
11453 }
11454
11455   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
11456    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\""
11457  fi
11458
11459     if test -z "$with_ncurses"; then
11460     
11461 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11462 echo "configure:11463: checking for tgetent in -lncurses" >&5
11463 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11464
11465 xe_check_libs=" -lncurses "
11466 cat > conftest.$ac_ext <<EOF
11467 #line 11468 "configure"
11468 #include "confdefs.h"
11469 /* Override any gcc2 internal prototype to avoid an error.  */
11470 /* We use char because int might match the return type of a gcc2
11471     builtin and then its argument prototype would still apply.  */
11472 char tgetent();
11473
11474 int main() {
11475 tgetent()
11476 ; return 0; }
11477 EOF
11478 if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11479   rm -rf conftest*
11480   eval "ac_cv_lib_$ac_lib_var=yes"
11481 else
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   eval "ac_cv_lib_$ac_lib_var=no"
11486 fi
11487 rm -f conftest*
11488 xe_check_libs=""
11489
11490 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11491   echo "$ac_t""yes" 1>&6
11492   with_ncurses=yes
11493 else
11494   echo "$ac_t""no" 1>&6
11495 with_ncurses=no
11496 fi
11497
11498
11499   fi
11500   if test "$with_ncurses" = "yes"; then
11501     { test "$extra_verbose" = "yes" && cat << \EOF
11502     Defining HAVE_NCURSES
11503 EOF
11504 cat >> confdefs.h <<\EOF
11505 #define HAVE_NCURSES 1
11506 EOF
11507 }
11508
11509     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11510 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11511 echo "configure:11512: checking for ncurses/curses.h" >&5
11512
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <ncurses/curses.h>
11517 EOF
11518 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11519 { (eval echo configure:11520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11520 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11521 if test -z "$ac_err"; then
11522   rm -rf conftest*
11523   eval "ac_cv_header_$ac_safe=yes"
11524 else
11525   echo "$ac_err" >&5
11526   echo "configure: failed program was:" >&5
11527   cat conftest.$ac_ext >&5
11528   rm -rf conftest*
11529   eval "ac_cv_header_$ac_safe=no"
11530 fi
11531 rm -f conftest*
11532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11533   echo "$ac_t""yes" 1>&6
11534   curses_h_path=ncurses/curses.h
11535 else
11536   echo "$ac_t""no" 1>&6
11537 fi
11538
11539     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11540 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11541 echo "configure:11542: checking for ncurses/term.h" >&5
11542
11543 cat > conftest.$ac_ext <<EOF
11544 #line 11545 "configure"
11545 #include "confdefs.h"
11546 #include <ncurses/term.h>
11547 EOF
11548 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11549 { (eval echo configure:11550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11550 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11551 if test -z "$ac_err"; then
11552   rm -rf conftest*
11553   eval "ac_cv_header_$ac_safe=yes"
11554 else
11555   echo "$ac_err" >&5
11556   echo "configure: failed program was:" >&5
11557   cat conftest.$ac_ext >&5
11558   rm -rf conftest*
11559   eval "ac_cv_header_$ac_safe=no"
11560 fi
11561 rm -f conftest*
11562 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11563   echo "$ac_t""yes" 1>&6
11564   term_h_path=ncurses/term.h
11565 else
11566   echo "$ac_t""no" 1>&6
11567 fi
11568
11569     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11570    echo "    xemacs will be linked with \"terminfo.o\""
11571  fi
11572     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11573
11574     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11575                         save_c_switch_site="$c_switch_site"
11576       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11577       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11578 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11579 echo "configure:11580: checking for ncurses/curses.h" >&5
11580
11581 cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584 #include <ncurses/curses.h>
11585 EOF
11586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11587 { (eval echo configure:11588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11589 if test -z "$ac_err"; then
11590   rm -rf conftest*
11591   eval "ac_cv_header_$ac_safe=yes"
11592 else
11593   echo "$ac_err" >&5
11594   echo "configure: failed program was:" >&5
11595   cat conftest.$ac_ext >&5
11596   rm -rf conftest*
11597   eval "ac_cv_header_$ac_safe=no"
11598 fi
11599 rm -f conftest*
11600 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11601   echo "$ac_t""yes" 1>&6
11602   curses_h_path=ncurses/curses.h
11603 else
11604   echo "$ac_t""no" 1>&6
11605 fi
11606
11607       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11608         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11609         else c_switch_site="$save_c_switch_site"
11610       fi
11611     fi
11612   else         if test "$have_terminfo" = "yes"; then
11613       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11614    echo "    xemacs will be linked with \"terminfo.o\""
11615  fi
11616       if test -n "$libs_termcap"; then
11617         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11618       else
11619         for lib in curses termlib termcap; do
11620           
11621 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11622 echo "configure:11623: checking for tgetent in -l$lib" >&5
11623 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11624
11625 xe_check_libs=" -l$lib "
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   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11653 else
11654   echo "$ac_t""no" 1>&6
11655 fi
11656
11657
11658         done
11659       fi
11660     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11661    echo "    xemacs will be linked with \"tparam.o\""
11662  fi
11663                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11664       if test -n "$libs_termcap"; then
11665         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11666       else
11667         
11668 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11669 echo "configure:11670: checking for tgetent in -lcurses" >&5
11670 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11671
11672 xe_check_libs=" -lcurses "
11673 cat > conftest.$ac_ext <<EOF
11674 #line 11675 "configure"
11675 #include "confdefs.h"
11676 /* Override any gcc2 internal prototype to avoid an error.  */
11677 /* We use char because int might match the return type of a gcc2
11678     builtin and then its argument prototype would still apply.  */
11679 char tgetent();
11680
11681 int main() {
11682 tgetent()
11683 ; return 0; }
11684 EOF
11685 if { (eval echo configure:11686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11686   rm -rf conftest*
11687   eval "ac_cv_lib_$ac_lib_var=yes"
11688 else
11689   echo "configure: failed program was:" >&5
11690   cat conftest.$ac_ext >&5
11691   rm -rf conftest*
11692   eval "ac_cv_lib_$ac_lib_var=no"
11693 fi
11694 rm -f conftest*
11695 xe_check_libs=""
11696
11697 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11698   echo "$ac_t""yes" 1>&6
11699   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11700 else
11701   echo "$ac_t""no" 1>&6
11702 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11703 echo "configure:11704: checking for tgetent in -ltermcap" >&5
11704 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11705
11706 xe_check_libs=" -ltermcap "
11707 cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710 /* Override any gcc2 internal prototype to avoid an error.  */
11711 /* We use char because int might match the return type of a gcc2
11712     builtin and then its argument prototype would still apply.  */
11713 char tgetent();
11714
11715 int main() {
11716 tgetent()
11717 ; return 0; }
11718 EOF
11719 if { (eval echo configure:11720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11720   rm -rf conftest*
11721   eval "ac_cv_lib_$ac_lib_var=yes"
11722 else
11723   echo "configure: failed program was:" >&5
11724   cat conftest.$ac_ext >&5
11725   rm -rf conftest*
11726   eval "ac_cv_lib_$ac_lib_var=no"
11727 fi
11728 rm -f conftest*
11729 xe_check_libs=""
11730
11731 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11732   echo "$ac_t""yes" 1>&6
11733   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11734 else
11735   echo "$ac_t""no" 1>&6
11736 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11737    echo "    xemacs will be linked with \"termcap.o\""
11738  fi
11739 fi
11740
11741
11742 fi
11743
11744
11745       fi
11746     fi
11747   fi
11748   { test "$extra_verbose" = "yes" && cat << EOF
11749     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11750 EOF
11751 cat >> confdefs.h <<EOF
11752 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11753 EOF
11754 }
11755
11756   { test "$extra_verbose" = "yes" && cat << EOF
11757     Defining TERM_H_PATH = "${term_h_path-term.h}"
11758 EOF
11759 cat >> confdefs.h <<EOF
11760 #define TERM_H_PATH "${term_h_path-term.h}"
11761 EOF
11762 }
11763
11764
11765     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11766 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11767 echo "configure:11768: checking for gpm.h" >&5
11768
11769 cat > conftest.$ac_ext <<EOF
11770 #line 11771 "configure"
11771 #include "confdefs.h"
11772 #include <gpm.h>
11773 EOF
11774 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11775 { (eval echo configure:11776: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11776 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11777 if test -z "$ac_err"; then
11778   rm -rf conftest*
11779   eval "ac_cv_header_$ac_safe=yes"
11780 else
11781   echo "$ac_err" >&5
11782   echo "configure: failed program was:" >&5
11783   cat conftest.$ac_ext >&5
11784   rm -rf conftest*
11785   eval "ac_cv_header_$ac_safe=no"
11786 fi
11787 rm -f conftest*
11788 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11789   echo "$ac_t""yes" 1>&6
11790   :
11791 else
11792   echo "$ac_t""no" 1>&6
11793 with_gpm=no
11794 fi
11795  }
11796   test -z "$with_gpm" && { 
11797 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11798 echo "configure:11799: checking for Gpm_Open in -lgpm" >&5
11799 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11800
11801 xe_check_libs=" -lgpm "
11802 cat > conftest.$ac_ext <<EOF
11803 #line 11804 "configure"
11804 #include "confdefs.h"
11805 /* Override any gcc2 internal prototype to avoid an error.  */
11806 /* We use char because int might match the return type of a gcc2
11807     builtin and then its argument prototype would still apply.  */
11808 char Gpm_Open();
11809
11810 int main() {
11811 Gpm_Open()
11812 ; return 0; }
11813 EOF
11814 if { (eval echo configure:11815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11815   rm -rf conftest*
11816   eval "ac_cv_lib_$ac_lib_var=yes"
11817 else
11818   echo "configure: failed program was:" >&5
11819   cat conftest.$ac_ext >&5
11820   rm -rf conftest*
11821   eval "ac_cv_lib_$ac_lib_var=no"
11822 fi
11823 rm -f conftest*
11824 xe_check_libs=""
11825
11826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11827   echo "$ac_t""yes" 1>&6
11828   with_gpm=yes
11829 else
11830   echo "$ac_t""no" 1>&6
11831 with_gpm=no
11832 fi
11833
11834  }
11835   if test "$with_gpm" = "yes"; then
11836     { test "$extra_verbose" = "yes" && cat << \EOF
11837     Defining HAVE_GPM
11838 EOF
11839 cat >> confdefs.h <<\EOF
11840 #define HAVE_GPM 1
11841 EOF
11842 }
11843
11844     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11845    echo "    xemacs will be linked with \"gpmevent.o\""
11846  fi
11847     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11848   fi
11849
11850 else   for feature in ncurses gpm; do
11851     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11852       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11853     fi
11854     eval "with_${feature}=no"
11855   done
11856 fi 
11857 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11858    echo "    xemacs will be linked with \"event-unixoid.o\""
11859  fi
11860
11861
11862 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11863   != "no no no" && echo "checking for database support" 1>&6
11864 echo "configure:11865: checking for database support" >&5
11865
11866 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11867   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11868 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11869 echo "configure:11870: checking for ndbm.h" >&5
11870
11871 cat > conftest.$ac_ext <<EOF
11872 #line 11873 "configure"
11873 #include "confdefs.h"
11874 #include <ndbm.h>
11875 EOF
11876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11877 { (eval echo configure:11878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11879 if test -z "$ac_err"; then
11880   rm -rf conftest*
11881   eval "ac_cv_header_$ac_safe=yes"
11882 else
11883   echo "$ac_err" >&5
11884   echo "configure: failed program was:" >&5
11885   cat conftest.$ac_ext >&5
11886   rm -rf conftest*
11887   eval "ac_cv_header_$ac_safe=no"
11888 fi
11889 rm -f conftest*
11890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11891   echo "$ac_t""yes" 1>&6
11892   :
11893 else
11894   echo "$ac_t""no" 1>&6
11895
11896     test "$with_database_gdbm" = "yes" -o \
11897          "$with_database_dbm"  = "yes" && \
11898       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11899     with_database_gdbm=no with_database_dbm=no
11900 fi
11901
11902 fi
11903
11904 if test "$with_database_gdbm" != "no"; then
11905   
11906 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11907 echo "configure:11908: checking for dbm_open in -lgdbm" >&5
11908 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11909
11910 xe_check_libs=" -lgdbm "
11911 cat > conftest.$ac_ext <<EOF
11912 #line 11913 "configure"
11913 #include "confdefs.h"
11914 /* Override any gcc2 internal prototype to avoid an error.  */
11915 /* We use char because int might match the return type of a gcc2
11916     builtin and then its argument prototype would still apply.  */
11917 char dbm_open();
11918
11919 int main() {
11920 dbm_open()
11921 ; return 0; }
11922 EOF
11923 if { (eval echo configure:11924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11924   rm -rf conftest*
11925   eval "ac_cv_lib_$ac_lib_var=yes"
11926 else
11927   echo "configure: failed program was:" >&5
11928   cat conftest.$ac_ext >&5
11929   rm -rf conftest*
11930   eval "ac_cv_lib_$ac_lib_var=no"
11931 fi
11932 rm -f conftest*
11933 xe_check_libs=""
11934
11935 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11936   echo "$ac_t""yes" 1>&6
11937   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
11938 else
11939   echo "$ac_t""no" 1>&6
11940 if test "$with_database_gdbm" = "yes"; then
11941      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11942    fi
11943    with_database_gdbm=no
11944 fi
11945
11946
11947 fi
11948
11949 if test "$with_database_dbm" != "no"; then
11950   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11951 echo "configure:11952: checking for dbm_open" >&5
11952
11953 cat > conftest.$ac_ext <<EOF
11954 #line 11955 "configure"
11955 #include "confdefs.h"
11956 /* System header to define __stub macros and hopefully few prototypes,
11957     which can conflict with char dbm_open(); below.  */
11958 #include <assert.h>
11959 /* Override any gcc2 internal prototype to avoid an error.  */
11960 /* We use char because int might match the return type of a gcc2
11961     builtin and then its argument prototype would still apply.  */
11962 char dbm_open();
11963
11964 int main() {
11965
11966 /* The GNU C library defines this for functions which it implements
11967     to always fail with ENOSYS.  Some functions are actually named
11968     something starting with __ and the normal name is an alias.  */
11969 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11970 choke me
11971 #else
11972 dbm_open();
11973 #endif
11974
11975 ; return 0; }
11976 EOF
11977 if { (eval echo configure:11978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11978   rm -rf conftest*
11979   eval "ac_cv_func_dbm_open=yes"
11980 else
11981   echo "configure: failed program was:" >&5
11982   cat conftest.$ac_ext >&5
11983   rm -rf conftest*
11984   eval "ac_cv_func_dbm_open=no"
11985 fi
11986 rm -f conftest*
11987
11988 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11989   echo "$ac_t""yes" 1>&6
11990   with_database_dbm=yes libdbm=
11991 else
11992   echo "$ac_t""no" 1>&6
11993
11994     
11995 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11996 echo "configure:11997: checking for dbm_open in -ldbm" >&5
11997 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11998
11999 xe_check_libs=" -ldbm "
12000 cat > conftest.$ac_ext <<EOF
12001 #line 12002 "configure"
12002 #include "confdefs.h"
12003 /* Override any gcc2 internal prototype to avoid an error.  */
12004 /* We use char because int might match the return type of a gcc2
12005     builtin and then its argument prototype would still apply.  */
12006 char dbm_open();
12007
12008 int main() {
12009 dbm_open()
12010 ; return 0; }
12011 EOF
12012 if { (eval echo configure:12013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12013   rm -rf conftest*
12014   eval "ac_cv_lib_$ac_lib_var=yes"
12015 else
12016   echo "configure: failed program was:" >&5
12017   cat conftest.$ac_ext >&5
12018   rm -rf conftest*
12019   eval "ac_cv_lib_$ac_lib_var=no"
12020 fi
12021 rm -f conftest*
12022 xe_check_libs=""
12023
12024 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12025   echo "$ac_t""yes" 1>&6
12026   with_database_dbm=yes libdbm=-ldbm
12027 else
12028   echo "$ac_t""no" 1>&6
12029 test "$with_database_dbm" = "yes" && \
12030         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12031       with_database_dbm=no
12032 fi
12033
12034
12035 fi
12036
12037 fi
12038
12039 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12040 test "$with_database_gdbm" = "yes" -o \
12041      "$with_database_dbm"  = "yes" && \
12042   { test "$extra_verbose" = "yes" && cat << \EOF
12043     Defining HAVE_DBM
12044 EOF
12045 cat >> confdefs.h <<\EOF
12046 #define HAVE_DBM 1
12047 EOF
12048 }
12049
12050
12051 if test "$with_database_berkdb" != "no"; then
12052   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12053 echo "configure:12054: checking for Berkeley db.h" >&5
12054   for path in "db/db.h" "db.h"; do
12055     cat > conftest.$ac_ext <<EOF
12056 #line 12057 "configure"
12057 #include "confdefs.h"
12058 #ifdef HAVE_INTTYPES_H
12059 #define __BIT_TYPES_DEFINED__
12060 #include <inttypes.h>
12061 typedef uint8_t  u_int8_t;
12062 typedef uint16_t u_int16_t;
12063 typedef uint32_t u_int32_t;
12064 #ifdef WE_DONT_NEED_QUADS
12065 typedef uint64_t u_int64_t;
12066 #endif
12067 #endif
12068 #include <$path>
12069
12070 int main() {
12071
12072 ; return 0; }
12073 EOF
12074 if { (eval echo configure:12075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12075   rm -rf conftest*
12076   db_h_path="$path"; break
12077 else
12078   echo "configure: failed program was:" >&5
12079   cat conftest.$ac_ext >&5
12080 fi
12081 rm -f conftest*
12082   done
12083   if test -z "$db_h_path"
12084   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12085   else echo "$ac_t""$db_h_path" 1>&6
12086   fi
12087
12088   if test "$with_database_berkdb" != "no"; then
12089     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12090 echo "configure:12091: checking for Berkeley DB version" >&5
12091     cat > conftest.$ac_ext <<EOF
12092 #line 12093 "configure"
12093 #include "confdefs.h"
12094 #include <$db_h_path>
12095 #if DB_VERSION_MAJOR > 1
12096 yes
12097 #endif
12098
12099 EOF
12100 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12101   egrep "yes" >/dev/null 2>&1; then
12102   rm -rf conftest*
12103   echo "$ac_t""2" 1>&6; dbfunc=db_open
12104 else
12105   rm -rf conftest*
12106   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12107 fi
12108 rm -f conftest*
12109
12110     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12111 echo "configure:12112: checking for $dbfunc" >&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 $dbfunc(); 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 $dbfunc();
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_$dbfunc) || defined (__stub___$dbfunc)
12130 choke me
12131 #else
12132 $dbfunc();
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_$dbfunc=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_$dbfunc=no"
12145 fi
12146 rm -f conftest*
12147
12148 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12149   echo "$ac_t""yes" 1>&6
12150   with_database_berkdb=yes need_libdb=no
12151 else
12152   echo "$ac_t""no" 1>&6
12153
12154     
12155 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12156 echo "configure:12157: checking for $dbfunc in -ldb" >&5
12157 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12158
12159 xe_check_libs=" -ldb "
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 $dbfunc();
12167
12168 int main() {
12169 $dbfunc()
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_berkdb=yes need_libdb=yes
12187 else
12188   echo "$ac_t""no" 1>&6
12189 fi
12190
12191
12192 fi
12193
12194   fi
12195
12196   if test "$with_database_berkdb" = "yes"; then
12197     { test "$extra_verbose" = "yes" && cat << EOF
12198     Defining DB_H_PATH = "$db_h_path"
12199 EOF
12200 cat >> confdefs.h <<EOF
12201 #define DB_H_PATH "$db_h_path"
12202 EOF
12203 }
12204
12205     { test "$extra_verbose" = "yes" && cat << \EOF
12206     Defining HAVE_BERKELEY_DB
12207 EOF
12208 cat >> confdefs.h <<\EOF
12209 #define HAVE_BERKELEY_DB 1
12210 EOF
12211 }
12212
12213     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12214   else with_database_berkdb=no
12215   fi
12216 fi
12217
12218 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12219      != "no no no"; then
12220   { test "$extra_verbose" = "yes" && cat << \EOF
12221     Defining HAVE_DATABASE
12222 EOF
12223 cat >> confdefs.h <<\EOF
12224 #define HAVE_DATABASE 1
12225 EOF
12226 }
12227
12228   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12229    echo "    xemacs will be linked with \"database.o\""
12230  fi
12231 fi
12232
12233 if test "$with_socks" = "yes"; then
12234   
12235 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12236 echo "configure:12237: checking for SOCKSinit in -lsocks" >&5
12237 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12238
12239 xe_check_libs=" -lsocks "
12240 cat > conftest.$ac_ext <<EOF
12241 #line 12242 "configure"
12242 #include "confdefs.h"
12243 /* Override any gcc2 internal prototype to avoid an error.  */
12244 /* We use char because int might match the return type of a gcc2
12245     builtin and then its argument prototype would still apply.  */
12246 char SOCKSinit();
12247
12248 int main() {
12249 SOCKSinit()
12250 ; return 0; }
12251 EOF
12252 if { (eval echo configure:12253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12253   rm -rf conftest*
12254   eval "ac_cv_lib_$ac_lib_var=yes"
12255 else
12256   echo "configure: failed program was:" >&5
12257   cat conftest.$ac_ext >&5
12258   rm -rf conftest*
12259   eval "ac_cv_lib_$ac_lib_var=no"
12260 fi
12261 rm -f conftest*
12262 xe_check_libs=""
12263
12264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12265   echo "$ac_t""yes" 1>&6
12266     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12267     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12268   { test "$extra_verbose" = "yes" && cat << EOF
12269     Defining $ac_tr_lib
12270 EOF
12271 cat >> confdefs.h <<EOF
12272 #define $ac_tr_lib 1
12273 EOF
12274 }
12275
12276   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12277
12278 else
12279   echo "$ac_t""no" 1>&6
12280 fi
12281
12282
12283   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12284     Defining HAVE_SOCKS
12285 EOF
12286 cat >> confdefs.h <<\EOF
12287 #define HAVE_SOCKS 1
12288 EOF
12289 }
12290
12291 fi
12292
12293 if test "$usage_tracking" = "yes"; then
12294   { test "$extra_verbose" = "yes" && cat << \EOF
12295     Defining USAGE_TRACKING
12296 EOF
12297 cat >> confdefs.h <<\EOF
12298 #define USAGE_TRACKING 1
12299 EOF
12300 }
12301
12302   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12303 fi
12304
12305 if test "$with_modules" != "no"; then
12306   echo "checking for module support" 1>&6
12307 echo "configure:12308: checking for module support" >&5
12308
12309     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12310 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12311 echo "configure:12312: checking for dlfcn.h" >&5
12312
12313 cat > conftest.$ac_ext <<EOF
12314 #line 12315 "configure"
12315 #include "confdefs.h"
12316 #include <dlfcn.h>
12317 EOF
12318 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12319 { (eval echo configure:12320: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12320 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12321 if test -z "$ac_err"; then
12322   rm -rf conftest*
12323   eval "ac_cv_header_$ac_safe=yes"
12324 else
12325   echo "$ac_err" >&5
12326   echo "configure: failed program was:" >&5
12327   cat conftest.$ac_ext >&5
12328   rm -rf conftest*
12329   eval "ac_cv_header_$ac_safe=no"
12330 fi
12331 rm -f conftest*
12332 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12333   echo "$ac_t""yes" 1>&6
12334   
12335     
12336 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12337 echo "configure:12338: checking for dlopen in -ldl" >&5
12338 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12339
12340 xe_check_libs=" -ldl "
12341 cat > conftest.$ac_ext <<EOF
12342 #line 12343 "configure"
12343 #include "confdefs.h"
12344 /* Override any gcc2 internal prototype to avoid an error.  */
12345 /* We use char because int might match the return type of a gcc2
12346     builtin and then its argument prototype would still apply.  */
12347 char dlopen();
12348
12349 int main() {
12350 dlopen()
12351 ; return 0; }
12352 EOF
12353 if { (eval echo configure:12354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12354   rm -rf conftest*
12355   eval "ac_cv_lib_$ac_lib_var=yes"
12356 else
12357   echo "configure: failed program was:" >&5
12358   cat conftest.$ac_ext >&5
12359   rm -rf conftest*
12360   eval "ac_cv_lib_$ac_lib_var=no"
12361 fi
12362 rm -f conftest*
12363 xe_check_libs=""
12364
12365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12366   echo "$ac_t""yes" 1>&6
12367   have_dl=yes libdl=dl
12368 else
12369   echo "$ac_t""no" 1>&6
12370
12371 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12372 echo "configure:12373: checking for dlopen in -lc" >&5
12373 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12374
12375 xe_check_libs=" -lc "
12376 cat > conftest.$ac_ext <<EOF
12377 #line 12378 "configure"
12378 #include "confdefs.h"
12379 /* Override any gcc2 internal prototype to avoid an error.  */
12380 /* We use char because int might match the return type of a gcc2
12381     builtin and then its argument prototype would still apply.  */
12382 char dlopen();
12383
12384 int main() {
12385 dlopen()
12386 ; return 0; }
12387 EOF
12388 if { (eval echo configure:12389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12389   rm -rf conftest*
12390   eval "ac_cv_lib_$ac_lib_var=yes"
12391 else
12392   echo "configure: failed program was:" >&5
12393   cat conftest.$ac_ext >&5
12394   rm -rf conftest*
12395   eval "ac_cv_lib_$ac_lib_var=no"
12396 fi
12397 rm -f conftest*
12398 xe_check_libs=""
12399
12400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12401   echo "$ac_t""yes" 1>&6
12402   have_dl=yes 
12403 else
12404   echo "$ac_t""no" 1>&6
12405 fi
12406
12407
12408 fi
12409
12410
12411 else
12412   echo "$ac_t""no" 1>&6
12413 fi
12414
12415   if test -n "$have_dl"; then
12416     { test "$extra_verbose" = "yes" && cat << \EOF
12417     Defining HAVE_DLOPEN
12418 EOF
12419 cat >> confdefs.h <<\EOF
12420 #define HAVE_DLOPEN 1
12421 EOF
12422 }
12423
12424   else
12425     
12426 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12427 echo "configure:12428: checking for shl_load in -ldld" >&5
12428 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12429
12430 xe_check_libs=" -ldld "
12431 cat > conftest.$ac_ext <<EOF
12432 #line 12433 "configure"
12433 #include "confdefs.h"
12434 /* Override any gcc2 internal prototype to avoid an error.  */
12435 /* We use char because int might match the return type of a gcc2
12436     builtin and then its argument prototype would still apply.  */
12437 char shl_load();
12438
12439 int main() {
12440 shl_load()
12441 ; return 0; }
12442 EOF
12443 if { (eval echo configure:12444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12444   rm -rf conftest*
12445   eval "ac_cv_lib_$ac_lib_var=yes"
12446 else
12447   echo "configure: failed program was:" >&5
12448   cat conftest.$ac_ext >&5
12449   rm -rf conftest*
12450   eval "ac_cv_lib_$ac_lib_var=no"
12451 fi
12452 rm -f conftest*
12453 xe_check_libs=""
12454
12455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12456   echo "$ac_t""yes" 1>&6
12457   libdl=dld have_dl=yes;
12458       { test "$extra_verbose" = "yes" && cat << \EOF
12459     Defining HAVE_SHL_LOAD
12460 EOF
12461 cat >> confdefs.h <<\EOF
12462 #define HAVE_SHL_LOAD 1
12463 EOF
12464 }
12465
12466 else
12467   echo "$ac_t""no" 1>&6
12468
12469 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12470 echo "configure:12471: checking for dld_init in -ldld" >&5
12471 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12472
12473 xe_check_libs=" -ldld "
12474 cat > conftest.$ac_ext <<EOF
12475 #line 12476 "configure"
12476 #include "confdefs.h"
12477 /* Override any gcc2 internal prototype to avoid an error.  */
12478 /* We use char because int might match the return type of a gcc2
12479     builtin and then its argument prototype would still apply.  */
12480 char dld_init();
12481
12482 int main() {
12483 dld_init()
12484 ; return 0; }
12485 EOF
12486 if { (eval echo configure:12487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12487   rm -rf conftest*
12488   eval "ac_cv_lib_$ac_lib_var=yes"
12489 else
12490   echo "configure: failed program was:" >&5
12491   cat conftest.$ac_ext >&5
12492   rm -rf conftest*
12493   eval "ac_cv_lib_$ac_lib_var=no"
12494 fi
12495 rm -f conftest*
12496 xe_check_libs=""
12497
12498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12499   echo "$ac_t""yes" 1>&6
12500   libdl=dld have_dl=yes;
12501       { test "$extra_verbose" = "yes" && cat << \EOF
12502     Defining HAVE_DLD_INIT
12503 EOF
12504 cat >> confdefs.h <<\EOF
12505 #define HAVE_DLD_INIT 1
12506 EOF
12507 }
12508
12509 else
12510   echo "$ac_t""no" 1>&6
12511 fi
12512
12513
12514 fi
12515
12516
12517   fi
12518
12519   if test -n "$have_dl"; then
12520         
12521 dll_ld=
12522 dll_ldflags=
12523 dll_cflags=
12524 dll_post=
12525 dll_ldo="-o"
12526 ld_dynamic_link_flags=
12527 xehost=$canonical
12528 xealias=$internal_configuration
12529
12530 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12531 echo "configure:12532: checking how to build dynamic libraries for ${xehost}" >&5
12532 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12533 case "$xehost" in
12534 *-*-linux-gnu*) ;;
12535 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12536 esac
12537
12538 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12539 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12540 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12541
12542 case "$xehost_os" in
12543 aix3*)
12544   # AIX sometimes has problems with the GCC collect2 program.  For some
12545   # reason, if we set the COLLECT_NAMES environment variable, the problems
12546   # vanish in a puff of smoke.
12547   if test "${COLLECT_NAMES+set}" != set; then
12548     COLLECT_NAMES=
12549     export COLLECT_NAMES
12550   fi
12551   ;;
12552 esac
12553
12554 # Now see if the compiler is really GCC.
12555 if test "$GCC" = "yes"; then
12556   XEGCC=yes
12557 else
12558   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12559 echo "configure:12560: checking checking whether we are using GNU C" >&5
12560   cat > conftest.$ac_ext <<EOF
12561 #line 12562 "configure"
12562 #include "confdefs.h"
12563
12564 #ifdef __GNUC__
12565   yes;
12566 #endif
12567
12568 EOF
12569 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12570   egrep "yes" >/dev/null 2>&1; then
12571   rm -rf conftest*
12572   XEGCC=yes
12573 else
12574   rm -rf conftest*
12575   XEGCC=no
12576 fi
12577 rm -f conftest*
12578
12579   echo "$ac_t""${XEGCC}" 1>&6
12580 fi
12581
12582 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12583 echo "configure:12584: checking how to produce PIC code" >&5
12584 wl=
12585
12586 can_build_shared=yes
12587 if test "$XEGCC" = yes; then
12588   wl='-Wl,'
12589
12590   case "$xehost_os" in
12591   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12592     # PIC is the default for these OSes.
12593     ;;
12594
12595   os2*)
12596     # We can build DLLs from non-PIC.
12597     ;;
12598   amigaos*)
12599     # FIXME: we need at least 68020 code to build shared libraries, but
12600     # adding the `-m68020' flag to GCC prevents building anything better,
12601     # like `-m68040'.
12602     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12603     ;;
12604   *)
12605     dll_cflags='-fPIC'
12606     ;;
12607   esac
12608 else
12609   # PORTME Check for PIC flags for the system compiler.
12610   case "$xehost_os" in
12611   hpux9* | hpux1[0-9]*)
12612     # Is there a better link_static_flag that works with the bundled CC?
12613     wl='-Wl,'
12614     dll_cflags='+Z'
12615     ;;
12616
12617   irix5* | irix6*)
12618     wl='-Wl,'
12619     # PIC (with -KPIC) is the default.
12620     ;;
12621
12622   os2*)
12623     # We can build DLLs from non-PIC.
12624     ;;
12625
12626   osf3* | osf4*)
12627     # All OSF/1 code is PIC.
12628     wl='-Wl,'
12629     ;;
12630
12631   sco3.2v5*)
12632     dll_cflags='-belf -Kpic'
12633     wl='-Wl,'
12634     ;;
12635
12636   unixware*)
12637     dll_cflags="-KPIC"
12638     wl="-Wl,"
12639     ;;
12640
12641   sysv4*)
12642     dll_cflags="-KPIC"
12643     wl="-Wl,"
12644     ;;
12645
12646   sysv5*)
12647     dll_cflags="-KPIC"
12648     wl="-Wl,"
12649     ;;
12650
12651   solaris2*)
12652     dll_cflags='-KPIC'
12653     wl='-Wl,'
12654     ;;
12655
12656   sunos4*)
12657     dll_cflags='-PIC'
12658     wl='-Qoption ld '
12659     ;;
12660
12661   uts4*)
12662     dll_cflags='-pic'
12663     ;;
12664
12665   *)
12666     can_build_shared=no
12667     ;;
12668   esac
12669 fi
12670
12671 if test -n "$dll_cflags"; then
12672   echo "$ac_t""${dll_cflags}" 1>&6
12673   
12674   # Check to make sure the dll_cflags actually works.
12675   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12676 echo "configure:12677: checking if PIC flag ${dll_cflags} really works" >&5
12677   save_CFLAGS="$CFLAGS"
12678   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12679   cat > conftest.$ac_ext <<EOF
12680 #line 12681 "configure"
12681 #include "confdefs.h"
12682
12683 int main() {
12684 int x=0;
12685 ; return 0; }
12686 EOF
12687 if { (eval echo configure:12688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12688   rm -rf conftest*
12689   
12690     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12691     # reports no error.  So, we need to grep stderr for (Bundled).
12692     if grep '(Bundled)' config.log >/dev/null; then
12693       echo "$ac_t""no" 1>&6
12694       can_build_shared=no
12695       dll_cflags=
12696     else
12697       echo "$ac_t""yes" 1>&6
12698     fi
12699 else
12700   echo "configure: failed program was:" >&5
12701   cat conftest.$ac_ext >&5
12702   rm -rf conftest*
12703   echo "$ac_t""no" 1>&6
12704     can_build_shared=no
12705     dll_cflags=
12706 fi
12707 rm -f conftest*
12708   CFLAGS="$save_CFLAGS"
12709 else
12710   echo "$ac_t""none" 1>&6
12711 fi
12712
12713 if test "$can_build_shared" = "yes"; then
12714 cc_produces_so=no
12715 xldf=
12716 xcldf=
12717 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12718 echo "configure:12719: checking if C compiler can produce shared libraries" >&5
12719 if test "$XEGCC" = yes; then
12720   xcldf="-shared"
12721   xldf="-shared"
12722 else # Not using GCC
12723   case "$xehost_os" in
12724     aix3* | aix4*)
12725       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12726       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12727       ;;
12728
12729     freebsd2* | netbsd* | openbsd*)
12730       xldf="-Bshareable"
12731       xcldf="${wl}-Bshareable"
12732       ;;
12733
12734     freebsd3*)
12735       xcldf="-shared"
12736       ;;
12737
12738     hpux*)
12739       xldf="-b +s"
12740       xcldf="${wl}-b ${wl}+s"
12741       ;;
12742
12743     irix5* | irix6* | osf3* | osf4*)
12744       xcldf="${wl}-shared"
12745       xldf="-shared"
12746       ;;
12747
12748     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12749       xcldf="-G"
12750       xldf="-G"
12751       ;;
12752
12753     sunos4*)
12754       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12755       xldf="-assert pure-text -Bstatic"
12756       ;;
12757   esac
12758 fi # End if if we are using gcc
12759
12760 if test -n "$xcldf"; then
12761   save_LDFLAGS=$LDFLAGS
12762   save_LIBS=$LIBS
12763   save_xe_libs=$xe_libs
12764   LDFLAGS="$xcldf $LDFLAGS"
12765   LIBS=
12766   xe_libs=
12767   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12768   cat > conftest.$ac_ext <<EOF
12769 #line 12770 "configure"
12770 #include "confdefs.h"
12771
12772 int main() {
12773 int x=0;
12774 ; return 0; }
12775 EOF
12776 if { (eval echo configure:12777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12777   rm -rf conftest*
12778   cc_produces_so=yes
12779 else
12780   echo "configure: failed program was:" >&5
12781   cat conftest.$ac_ext >&5
12782   rm -rf conftest*
12783   cc_produces_so=no
12784 fi
12785 rm -f conftest*
12786   LDFLAGS=$save_LDFLAGS
12787   LIBS=$save_LIBS
12788   xe_libs=$save_xe_libs
12789   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12790 else
12791   cc_produces_so=no
12792 fi
12793 echo "$ac_t""${cc_produces_so}" 1>&6
12794
12795 LTLD=$LD
12796 if test -z "$LTLD"; then
12797   ac_prog=ld
12798   if test "$XEGCC" = yes; then
12799     # Check if gcc -print-prog-name=ld gives a path.
12800     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12801 echo "configure:12802: checking for ld used by GCC" >&5
12802     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12803     case "$ac_prog" in
12804     # Accept absolute paths.
12805     /*)
12806       if test -z "$LTLD"; then
12807         case "$ac_prog" in
12808           *gcc-lib*) LTLD="$CC"
12809                      ;;
12810           *)         LTLD="$ac_prog"
12811                      ;;
12812         esac
12813       fi
12814       ;;
12815     "")
12816       # If it fails, then pretend we aren't using GCC.
12817       ac_prog=ld
12818       ;;
12819     *)
12820       # If it is relative, then search for the first ld in PATH.
12821       with_gnu_ld=unknown
12822       ;;
12823     esac
12824   else
12825     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12826 echo "configure:12827: checking for GNU ld" >&5
12827   fi
12828
12829   if test -z "$LTLD"; then
12830     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12831     for ac_dir in $PATH; do
12832       test -z "$ac_dir" && ac_dir=.
12833       if test -f "$ac_dir/$ac_prog"; then
12834         LTLD="$ac_dir/$ac_prog"
12835         # Check to see if the program is GNU ld.  I'd rather use --version,
12836         # but apparently some GNU ld's only accept -v.
12837         # Break only if it was the GNU/non-GNU ld that we prefer.
12838         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12839           xe_gnu_ld=yes
12840         else
12841           xe_gnu_ld=no
12842         fi
12843       fi
12844     done
12845     IFS="$ac_save_ifs"
12846   fi
12847
12848   if test -n "$LTLD"; then
12849     echo "$ac_t""${LTLD}" 1>&6
12850   else
12851     echo "$ac_t""no" 1>&6
12852   fi
12853
12854   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12855     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12856     exit 1
12857   fi
12858 fi
12859
12860 ld_dynamic_link_flags=
12861
12862 # Check to see if it really is or isn't GNU ld.
12863 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12864 echo "configure:12865: checking if the linker is GNU ld" >&5
12865 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12866 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12867   xe_gnu_ld=yes
12868 else
12869   xe_gnu_ld=no
12870 fi
12871 echo "$ac_t""${xe_gnu_ld}" 1>&6
12872
12873 case "$xehost_os" in
12874   amigaos* | sunos4*)
12875     # On these operating systems, we should treat GNU ld like the system ld.
12876     gnu_ld_acts_native=yes
12877     ;;
12878   *)
12879     gnu_ld_acts_native=no
12880     ;;
12881 esac
12882
12883 if test "$cc_produces_so" = "yes"; then
12884   dll_ld=$CC
12885   dll_ldflags=$xcldf
12886   can_build_shared=yes
12887 else
12888   # OK - only NOW do we futz about with ld.
12889   # See if the linker supports building shared libraries.
12890   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12891 echo "configure:12892: checking whether the linker supports shared libraries" >&5
12892   dll_ld=$CC
12893   dll_ldflags=$LDFLAGS
12894   ld_shlibs=yes
12895   can_build_shared=yes
12896   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12897     # See if GNU ld supports shared libraries.
12898     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12899       dll_ld=$CC
12900       dll_ldflags="-shared"
12901       ld_shlibs=yes
12902     else
12903       ld_shlibs=no
12904     fi
12905   else
12906     # PORTME fill in a description of your system's linker (not GNU ld)
12907     case "$xehost_os" in
12908     aix3*)
12909       dll_ld=$LTLD
12910       dll_ldflags=$xldf
12911       ;;
12912
12913     aix4*)
12914       dll_ldflags=$xcldf
12915       ;;
12916
12917     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12918     # support.  Future versions do this automatically, but an explicit c++rt0.o
12919     # doesn't break anything, and helps significantly (at the cost of a little
12920     # extra space).
12921     freebsd2.2*)
12922       dll_ld=$LTLD
12923       dll_ldflags=$xldf
12924       dll_post="/usr/lib/c++rt0.o"
12925       ;;
12926
12927     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12928     freebsd2*)
12929       dll_ld=$LTLD
12930       dll_ldflags="-Bshareable"
12931       ;;
12932
12933     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12934     freebsd3*)
12935       dll_ldflags="-shared"
12936       ;;
12937
12938     hpux*)
12939       dll_ld=$LTLD
12940       dll_ldflags=$xldf
12941       ;;
12942
12943     irix5* | irix6*)
12944       dll_ld=$LTLD
12945       dll_ldflags=$xldf
12946       ;;
12947
12948     netbsd*)
12949       # Tested with NetBSD 1.2 ld
12950       dll_ld=$LTLD
12951       dll_ldflags=$xldf
12952       ;;
12953
12954     openbsd*)
12955       dll_ld=$LTLD
12956       dll_ldflags=$xldf
12957       ;;
12958
12959     osf3* | osf4*)
12960       dll_ld=$LTLD
12961       dll_ldflags=$xldf
12962       ;;
12963
12964     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12965     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12966       dll_ld=$LTLD
12967       case "$dll_ld" in
12968         *gcc*) dll_ldflags="-shared"
12969                dll_ld=$CC
12970                ;;
12971         *)     dll_ldflags="-G"
12972                ;;
12973       esac
12974       ;;
12975
12976     sunos4*)
12977       if test "$XEGCC" = yes; then
12978         dll_ld=$CC
12979       else
12980         dll_ld=$LTLD
12981       fi
12982       dll_ldflags=$xldf
12983       ;;
12984
12985     uts4*)
12986       dll_ld=$LTLD
12987       dll_ldflags="-G"
12988       ;;
12989
12990     bsdi*)
12991       dll_ldflags="-r"
12992       dll_ld="shlicc2"
12993       ;;
12994
12995     *)
12996       ld_shlibs=no
12997       can_build_shared=no
12998       ;;
12999     esac
13000   fi
13001   echo "$ac_t""${ld_shlibs}" 1>&6
13002   if test "$ld_shlibs" = "no"; then
13003     can_build_shared=no
13004   fi
13005 fi # End of if cc_produces_so = no
13006
13007
13008 if test "$xe_gnu_ld" = yes; then
13009   if test "$ld_shlibs" = yes; then
13010     ld_dynamic_link_flags="${wl}-export-dynamic"
13011   fi
13012 fi
13013
13014 if test -z "$ld_dynamic_link_flags"; then
13015   case "$xehost_os" in
13016   aix3*)
13017     ld_dynamic_link_flags=
13018     ;;
13019
13020   aix4*)
13021     ld_dynamic_link_flags=
13022     ;;
13023
13024   freebsd2.2*)
13025     ld_dynamic_link_flags=
13026     ;;
13027
13028   freebsd2*)
13029     ld_dynamic_link_flags=
13030     ;;
13031
13032   freebsd3*)
13033     ld_dynamic_link_flags=
13034     ;;
13035
13036   hpux*)
13037     ld_dynamic_link_flags="${wl}-E"
13038     ;;
13039
13040   irix5* | irix6*)
13041     ld_dynamic_link_flags=
13042     ;;
13043
13044   netbsd*)
13045     ld_dynamic_link_flags=
13046     ;;
13047
13048   openbsd*)
13049     ld_dynamic_link_flags=
13050     ;;
13051
13052   osf3* | osf4*)
13053     ld_dynamic_link_flags=
13054     ;;
13055
13056   solaris2* | solaris7*)
13057     ld_dynamic_link_flags=
13058     ;;
13059
13060   sco3.2v5* | unixware* | sysv5* | sysv4*)
13061     ld_dynamic_link_flags="${wl}-Bexport"
13062     ;;
13063
13064   sunos4*)
13065     ld_dynamic_link_flags=
13066     ;;
13067
13068   uts4*)
13069     ld_dynamic_link_flags=
13070     ;;
13071
13072   bsdi*)
13073     ld_dynamic_link_flags=
13074     ;;
13075
13076   esac
13077 fi # End of if -z ld_dynamic_link_flags
13078 fi # End of if test "$can_build_shared" = "yes"
13079
13080
13081
13082
13083
13084
13085
13086
13087   fi
13088
13089   if test "$can_build_shared" = "yes"; then
13090     { test "$extra_verbose" = "yes" && cat << \EOF
13091     Defining HAVE_SHLIB
13092 EOF
13093 cat >> confdefs.h <<\EOF
13094 #define HAVE_SHLIB 1
13095 EOF
13096 }
13097
13098     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13099    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13100  fi
13101     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13102     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13103     for ac_func in dlerror _dlerror
13104 do
13105 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13106 echo "configure:13107: checking for $ac_func" >&5
13107
13108 cat > conftest.$ac_ext <<EOF
13109 #line 13110 "configure"
13110 #include "confdefs.h"
13111 /* System header to define __stub macros and hopefully few prototypes,
13112     which can conflict with char $ac_func(); below.  */
13113 #include <assert.h>
13114 /* Override any gcc2 internal prototype to avoid an error.  */
13115 /* We use char because int might match the return type of a gcc2
13116     builtin and then its argument prototype would still apply.  */
13117 char $ac_func();
13118
13119 int main() {
13120
13121 /* The GNU C library defines this for functions which it implements
13122     to always fail with ENOSYS.  Some functions are actually named
13123     something starting with __ and the normal name is an alias.  */
13124 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13125 choke me
13126 #else
13127 $ac_func();
13128 #endif
13129
13130 ; return 0; }
13131 EOF
13132 if { (eval echo configure:13133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13133   rm -rf conftest*
13134   eval "ac_cv_func_$ac_func=yes"
13135 else
13136   echo "configure: failed program was:" >&5
13137   cat conftest.$ac_ext >&5
13138   rm -rf conftest*
13139   eval "ac_cv_func_$ac_func=no"
13140 fi
13141 rm -f conftest*
13142
13143 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13144   echo "$ac_t""yes" 1>&6
13145     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13146   { test "$extra_verbose" = "yes" && cat << EOF
13147     Defining $ac_tr_func
13148 EOF
13149 cat >> confdefs.h <<EOF
13150 #define $ac_tr_func 1
13151 EOF
13152 }
13153  
13154 else
13155   echo "$ac_t""no" 1>&6
13156 fi
13157 done
13158
13159     with_modules=yes
13160   else
13161     if test "$with_modules" = "yes"; then
13162       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13163     else
13164       echo "configure: warning: "Module support cannot be provided."" 1>&2
13165     fi
13166     with_modules=no
13167   fi
13168 fi
13169
13170 cat > conftest.$ac_ext <<EOF
13171 #line 13172 "configure"
13172 #include "confdefs.h"
13173 int main(int c,char *v[]){return 0;}
13174 EOF
13175 if { (eval echo configure:13176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13176 then
13177   :
13178 else
13179   conftest_rc="$?"
13180   echo "configure: failed program was:" >&5
13181   cat conftest.$ac_ext >&5
13182   rm -fr conftest*
13183   
13184   echo ""
13185   echo "*** PANIC *** The C compiler can no longer build working executables."
13186   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13187   echo "*** PANIC *** The most likely reason for this problem is that configure"
13188   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13189   echo "*** PANIC *** found at run time."
13190   echo "*** PANIC ***"
13191   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13192   echo "*** PANIC *** On other systems, try telling configure where to find the"
13193   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13194   echo "*** PANIC ***"
13195   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13196   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13197   echo "*** PANIC *** on your system.  Don't do that."
13198   exit 1
13199 fi
13200 rm -fr conftest*
13201
13202 if test "$win32_processes" = "yes"; then
13203   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13204    echo "    xemacs will be linked with \"process-nt.o\""
13205  fi
13206 else
13207   { test "$extra_verbose" = "yes" && cat << \EOF
13208     Defining HAVE_UNIX_PROCESSES
13209 EOF
13210 cat >> confdefs.h <<\EOF
13211 #define HAVE_UNIX_PROCESSES 1
13212 EOF
13213 }
13214
13215   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13216    echo "    xemacs will be linked with \"process-unix.o\""
13217  fi
13218 fi
13219
13220
13221
13222 T=""
13223 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13224 CFLAGS="$T"
13225
13226
13227 T=""
13228 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13229 extra_objs="$T"
13230
13231
13232 T=""
13233 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
13234 c_switch_general="$T"
13235
13236
13237 T=""
13238 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13239 c_switch_window_system="$T"
13240
13241
13242 T=""
13243 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13244 c_switch_all="$T"
13245
13246
13247 T=""
13248 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
13249 ld_switch_general="$T"
13250
13251
13252 T=""
13253 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13254 ld_switch_window_system="$T"
13255
13256
13257 T=""
13258 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13259 ld_switch_all="$T"
13260
13261
13262 T=""
13263 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13264 ld_libs_general="$T"
13265
13266
13267 T=""
13268 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
13269 ld_libs_window_system="$T"
13270
13271
13272 T=""
13273 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13274 ld_libs_all="$T"
13275
13276
13277
13278 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13279 internal_makefile_list="Makefile.in"
13280 SUBDIR_MAKEFILES=''
13281 test -d lock || mkdir lock
13282 for dir in $MAKE_SUBDIR; do
13283   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13284         test -d "$d" || mkdir "$d"; cd "$d"
13285       done ) ;;
13286    * ) test -d "$dir" || mkdir "$dir" ;;
13287   esac
13288   
13289 T=""
13290 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13291 SUBDIR_MAKEFILES="$T"
13292
13293   
13294 T=""
13295 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13296 internal_makefile_list="$T"
13297
13298 done
13299
13300
13301
13302
13303 for dir in src/s src/m; do
13304   if test ! -d "$dir" ; then
13305     echo Making symbolic link to "$srcdir/$dir"
13306     ${LN_S} "$srcdir/$dir" "$dir"
13307   fi
13308 done
13309
13310 if test "$extra_verbose" = "yes"; then
13311   echo ""
13312   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
13313   echo ""
13314 fi
13315
13316 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
13317   echo "creating src/gdbinit"; echo ""
13318   echo "source $srcdir/src/gdbinit" > src/gdbinit
13319 fi
13320
13321 if test "$__SUNPRO_C" = "yes"; then
13322   echo "creating .sbinit"; echo ""
13323   ( echo "# For use with Sun WorkShop's Source browser."
13324     echo "# See sbquery(1) and sbinit(4) for more information"
13325     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13326   ) > .sbinit
13327 fi
13328
13329 rm -f core
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349 PREFIX=$prefix
13350 while true; do
13351   case "$PREFIX" in
13352     *\$* ) eval "PREFIX=$PREFIX" ;;
13353     *) break ;;
13354   esac
13355 done
13356
13357
13358
13359
13360 EXEC_PREFIX=$exec_prefix
13361 while true; do
13362   case "$EXEC_PREFIX" in
13363     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13364     *) break ;;
13365   esac
13366 done
13367
13368
13369
13370
13371 INFODIR=$infodir
13372 while true; do
13373   case "$INFODIR" in
13374     *\$* ) eval "INFODIR=$INFODIR" ;;
13375     *) break ;;
13376   esac
13377 done
13378
13379
13380
13381
13382 INFOPATH=$infopath
13383 while true; do
13384   case "$INFOPATH" in
13385     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13386     *) break ;;
13387   esac
13388 done
13389
13390
13391
13392
13393 PACKAGE_PATH=$package_path
13394 while true; do
13395   case "$PACKAGE_PATH" in
13396     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13397     *) break ;;
13398   esac
13399 done
13400
13401
13402
13403
13404 LISPDIR=$lispdir
13405 while true; do
13406   case "$LISPDIR" in
13407     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13408     *) break ;;
13409   esac
13410 done
13411
13412
13413
13414
13415 MODULEDIR=$moduledir
13416 while true; do
13417   case "$MODULEDIR" in
13418     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13419     *) break ;;
13420   esac
13421 done
13422
13423
13424
13425
13426 SITELISPDIR=$sitelispdir
13427 while true; do
13428   case "$SITELISPDIR" in
13429     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13430     *) break ;;
13431   esac
13432 done
13433
13434
13435
13436
13437 SITEMODULEDIR=$sitemoduledir
13438 while true; do
13439   case "$SITEMODULEDIR" in
13440     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13441     *) break ;;
13442   esac
13443 done
13444
13445
13446
13447
13448 ETCDIR=$etcdir
13449 while true; do
13450   case "$ETCDIR" in
13451     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13452     *) break ;;
13453   esac
13454 done
13455
13456
13457
13458
13459 LOCKDIR=$lockdir
13460 while true; do
13461   case "$LOCKDIR" in
13462     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13463     *) break ;;
13464   esac
13465 done
13466
13467
13468
13469
13470 DOCDIR=$docdir
13471 while true; do
13472   case "$DOCDIR" in
13473     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13474     *) break ;;
13475   esac
13476 done
13477
13478
13479
13480
13481 ARCHLIBDIR=$archlibdir
13482 while true; do
13483   case "$ARCHLIBDIR" in
13484     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13485     *) break ;;
13486   esac
13487 done
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13509
13510
13511
13512
13513
13514
13515
13516 : ${XEMACS_CC:=$CC}
13517
13518
13519 if test "$with_prefix" = "yes"; then
13520   { test "$extra_verbose" = "yes" && cat << \EOF
13521     Defining PREFIX_USER_DEFINED
13522 EOF
13523 cat >> confdefs.h <<\EOF
13524 #define PREFIX_USER_DEFINED 1
13525 EOF
13526 }
13527
13528 fi
13529
13530 if test "$with_site_lisp" = "no"; then
13531   { test "$extra_verbose" = "yes" && cat << \EOF
13532     Defining INHIBIT_SITE_LISP
13533 EOF
13534 cat >> confdefs.h <<\EOF
13535 #define INHIBIT_SITE_LISP 1
13536 EOF
13537 }
13538
13539 fi
13540 if test "$with_site_modules" = "no"; then
13541   { test "$extra_verbose" = "yes" && cat << \EOF
13542     Defining INHIBIT_SITE_MODULES
13543 EOF
13544 cat >> confdefs.h <<\EOF
13545 #define INHIBIT_SITE_MODULES 1
13546 EOF
13547 }
13548
13549 fi
13550
13551
13552 T=""
13553 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13554 ac_configure_args="$T"
13555
13556 { test "$extra_verbose" = "yes" && cat << EOF
13557     Defining EMACS_CONFIGURATION = "$configuration"
13558 EOF
13559 cat >> confdefs.h <<EOF
13560 #define EMACS_CONFIGURATION "$configuration"
13561 EOF
13562 }
13563
13564 { test "$extra_verbose" = "yes" && cat << EOF
13565     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13566 EOF
13567 cat >> confdefs.h <<EOF
13568 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13569 EOF
13570 }
13571
13572 { test "$extra_verbose" = "yes" && cat << EOF
13573     Defining config_machfile = "$machfile"
13574 EOF
13575 cat >> confdefs.h <<EOF
13576 #define config_machfile "$machfile"
13577 EOF
13578 }
13579
13580 { test "$extra_verbose" = "yes" && cat << EOF
13581     Defining config_opsysfile = "$opsysfile"
13582 EOF
13583 cat >> confdefs.h <<EOF
13584 #define config_opsysfile "$opsysfile"
13585 EOF
13586 }
13587
13588
13589
13590 null_string=""
13591 { test "$extra_verbose" = "yes" && cat << EOF
13592     Defining LD_SWITCH_X_SITE = $null_string
13593 EOF
13594 cat >> confdefs.h <<EOF
13595 #define LD_SWITCH_X_SITE $null_string
13596 EOF
13597 }
13598
13599 { test "$extra_verbose" = "yes" && cat << EOF
13600     Defining LD_SWITCH_X_SITE_AUX = $null_string
13601 EOF
13602 cat >> confdefs.h <<EOF
13603 #define LD_SWITCH_X_SITE_AUX $null_string
13604 EOF
13605 }
13606
13607 { test "$extra_verbose" = "yes" && cat << EOF
13608     Defining C_SWITCH_X_SITE = $null_string
13609 EOF
13610 cat >> confdefs.h <<EOF
13611 #define C_SWITCH_X_SITE $null_string
13612 EOF
13613 }
13614
13615 { test "$extra_verbose" = "yes" && cat << EOF
13616     Defining LD_SWITCH_SITE = $null_string
13617 EOF
13618 cat >> confdefs.h <<EOF
13619 #define LD_SWITCH_SITE $null_string
13620 EOF
13621 }
13622
13623 { test "$extra_verbose" = "yes" && cat << EOF
13624     Defining C_SWITCH_SITE = $null_string
13625 EOF
13626 cat >> confdefs.h <<EOF
13627 #define C_SWITCH_SITE $null_string
13628 EOF
13629 }
13630
13631
13632
13633 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13634     Defining GNU_MALLOC
13635 EOF
13636 cat >> confdefs.h <<\EOF
13637 #define GNU_MALLOC 1
13638 EOF
13639 }
13640
13641 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13642     Defining USE_SYSTEM_MALLOC
13643 EOF
13644 cat >> confdefs.h <<\EOF
13645 #define USE_SYSTEM_MALLOC 1
13646 EOF
13647 }
13648
13649 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13650     Defining USE_DEBUG_MALLOC
13651 EOF
13652 cat >> confdefs.h <<\EOF
13653 #define USE_DEBUG_MALLOC 1
13654 EOF
13655 }
13656
13657                                               { test "$extra_verbose" = "yes" && cat << \EOF
13658     Defining USE_SYSTEM_MALLOC
13659 EOF
13660 cat >> confdefs.h <<\EOF
13661 #define USE_SYSTEM_MALLOC 1
13662 EOF
13663 }
13664
13665 fi
13666 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13667     Defining I18N3
13668 EOF
13669 cat >> confdefs.h <<\EOF
13670 #define I18N3 1
13671 EOF
13672 }
13673
13674 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13675     Defining USE_GCC
13676 EOF
13677 cat >> confdefs.h <<\EOF
13678 #define USE_GCC 1
13679 EOF
13680 }
13681
13682 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13683     Defining EXTERNAL_WIDGET
13684 EOF
13685 cat >> confdefs.h <<\EOF
13686 #define EXTERNAL_WIDGET 1
13687 EOF
13688 }
13689
13690 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13691     Defining NO_DOC_FILE
13692 EOF
13693 cat >> confdefs.h <<\EOF
13694 #define NO_DOC_FILE 1
13695 EOF
13696 }
13697
13698 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13699     Defining PURIFY
13700 EOF
13701 cat >> confdefs.h <<\EOF
13702 #define PURIFY 1
13703 EOF
13704 }
13705
13706 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13707     Defining QUANTIFY
13708 EOF
13709 cat >> confdefs.h <<\EOF
13710 #define QUANTIFY 1
13711 EOF
13712 }
13713
13714 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13715     Defining MAIL_USE_POP
13716 EOF
13717 cat >> confdefs.h <<\EOF
13718 #define MAIL_USE_POP 1
13719 EOF
13720 }
13721
13722 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13723     Defining KERBEROS
13724 EOF
13725 cat >> confdefs.h <<\EOF
13726 #define KERBEROS 1
13727 EOF
13728 }
13729
13730 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13731     Defining HESIOD
13732 EOF
13733 cat >> confdefs.h <<\EOF
13734 #define HESIOD 1
13735 EOF
13736 }
13737
13738 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13739     Defining USE_UNION_TYPE
13740 EOF
13741 cat >> confdefs.h <<\EOF
13742 #define USE_UNION_TYPE 1
13743 EOF
13744 }
13745
13746 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13747     Defining PDUMP
13748 EOF
13749 cat >> confdefs.h <<\EOF
13750 #define PDUMP 1
13751 EOF
13752 }
13753
13754
13755
13756 (
13757 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13758 else
13759   echo "uname -a: `uname -a`"
13760 fi
13761 echo ""
13762 echo "$0 $quoted_arguments"
13763 ) > Installation
13764
13765 if test ! -z ${emacs_beta_version} ; then
13766   if test -z "${emacs_is_beta}" ; then
13767         xemacs_betaname=".${emacs_beta_version}"
13768   else
13769         xemacs_betaname="-b${emacs_beta_version}"
13770   fi
13771 else
13772   xemacs_betaname=""
13773 fi
13774
13775 (
13776 echo "
13777
13778 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13779
13780   Where should the build process find the source code?    $srcdir
13781   What installation prefix should install use?            $prefix
13782   What operating system and machine description files should XEmacs use?
13783         \`$opsysfile' and \`$machfile'
13784   What compiler should XEmacs be built with?              $CC $CFLAGS
13785   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13786   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13787   What window system should XEmacs use?                   ${window_system}"
13788 if test "$with_x11" = "yes"; then
13789   echo "  Where do we find X Windows header files?                $x_includes"
13790   echo "  Where do we find X Windows libraries?                   $x_libraries"
13791 fi
13792 if test -n "$site_includes"; then
13793   echo "  Additional header files:                                $site_includes"
13794 fi
13795 if test -n "$site_libraries"; then
13796   echo "  Additional libraries:                                   $site_libraries"
13797 fi
13798 if test -n "$site_prefixes"; then
13799   echo "  Additional prefixes:                                    $site_prefixes"
13800 fi
13801 if test -n "$runpath"; then
13802   echo "  Runtime library search path:                            $runpath"
13803 fi
13804 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13805 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13806 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13807 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13808   echo "  No Xmu; substituting equivalent routines."
13809 fi
13810
13811 if test "$with_xpm" = yes; then
13812   echo "  Compiling in support for XPM images."
13813 elif test "$with_x11" = yes; then
13814   echo "  --------------------------------------------------------------------"
13815   echo "  WARNING: Compiling without XPM support."
13816   if test "$xpm_problem" != ""; then
13817     echo "  Reason: $xpm_problem"
13818   fi
13819   echo "  WARNING: You should strongly consider installing XPM."
13820   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13821   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13822   echo "  --------------------------------------------------------------------"
13823 fi
13824 if test "$with_png" = yes; then
13825   echo "  Compiling in support for PNG image handling."
13826 elif test "$window_system" != "none"; then
13827   echo "  --------------------------------------------------------------------"
13828   echo "  WARNING: Compiling without PNG image support."
13829   if test "$png_problem" != ""; then
13830     echo "  Reason: $png_problem"
13831   fi
13832   echo "  WARNING: You should strongly consider installing the PNG libraries."
13833   echo "  WARNING: Otherwise certain images and glyphs may not display."
13834   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13835   echo "  --------------------------------------------------------------------"
13836 fi
13837 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13838 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13839 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13840 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13841
13842 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13843 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
13844 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
13845 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
13846
13847 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13848 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13849 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13850
13851 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13852
13853 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13854 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13855
13856 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13857 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13858 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13859 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13860 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13861 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13862 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13863 if test "$with_wnn" = yes; then
13864   echo "  Compiling in support for the WNN input method on Mule."
13865   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13866 fi
13867 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13868
13869 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13870 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13871 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13872 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13873 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13874 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13875 case "$with_menubars" in
13876   lucid ) echo "  Using Lucid menubars." ;;
13877   motif ) echo "  Using Motif menubars."
13878           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13879           echo "             We recommend using the Lucid menubar instead."
13880           echo "             Re-run configure with --with-menubars='lucid'." ;;
13881   msw ) echo "  Using MS-Windows menubars." ;;
13882 esac
13883 case "$with_scrollbars" in
13884   lucid    ) echo "  Using Lucid scrollbars."     ;;
13885   motif    ) echo "  Using Motif scrollbars."     ;;
13886   athena   ) echo "  Using Athena scrollbars."    ;;
13887   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13888   msw ) echo "  Using MS-Windows scrollbars." ;;
13889 esac
13890 case "$with_widgets" in
13891   motif    ) echo "  Using Motif native widgets."     ;;
13892   athena   ) echo "  Using Athena native widgets."    ;;
13893   athena3d ) echo "  Using Athena-3d native widgets." ;;
13894   msw ) echo "  Using MS-Windows native widgets." ;;
13895 esac
13896 case "$with_dialogs" in
13897   motif    )
13898     echo "  Using Motif dialog boxes."
13899     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13900       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13901       echo "             We recommend using the Athena dialog boxes instead."
13902       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13903       echo "             Read the PROBLEMS file for more information."
13904     fi; fi
13905     ;;
13906   athena   ) echo "  Using Athena dialog boxes."    ;;
13907   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13908   msw ) echo "  Using MS-Windows dialog boxes." ;;
13909 esac
13910 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
13911 test "$with_clash_detection" = yes && \
13912   echo "  Clash detection will use \"$lockdir\" for locking files."
13913 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13914 test "$with_pop"        = yes && echo "  Using POP for mail access."
13915 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13916 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13917 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13918 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
13919 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
13920 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
13921 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13922   != "no no no no no"; then
13923   echo "  WARNING: ---------------------------------------------------------"
13924   echo "  WARNING: Compiling in support for runtime error checking."
13925   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13926   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13927   echo "  WARNING: ---------------------------------------------------------"
13928 fi
13929 echo ""
13930 ) | tee -a Installation
13931 echo ""
13932
13933
13934 # Remove any trailing slashes in these variables.
13935 test -n "$prefix" &&
13936   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13937 test -n "$exec_prefix" &&
13938   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13939
13940
13941 for file in $internal_makefile_list; do
13942   test "$file" = src/Makefile.in && \
13943     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13944   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
13945 done
13946 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13947 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
13948
13949 trap '' 1 2 15
13950
13951 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13952
13953 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13954 # Let make expand exec_prefix.
13955 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13956
13957 # Any assignment to VPATH causes Sun make to only execute
13958 # the first set of double-colon rules, so remove it if not needed.
13959 # If there is a colon in the path, we need to keep it.
13960 if test "x$srcdir" = x.; then
13961   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13962 fi
13963
13964 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13965
13966 DEFS=-DHAVE_CONFIG_H
13967
13968 # Without the "./", some shells look in PATH for config.status.
13969 : ${CONFIG_STATUS=./config.status}
13970
13971 echo creating $CONFIG_STATUS
13972 rm -f $CONFIG_STATUS
13973 cat > $CONFIG_STATUS <<EOF
13974 #! /bin/sh
13975 # Generated automatically by configure.
13976 # Run this file to recreate the current configuration.
13977 # This directory was configured as follows,
13978 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13979 #
13980 # $0 $ac_configure_args
13981 #
13982 # Compiler output produced by configure, useful for debugging
13983 # configure, is in ./config.log if it exists.
13984
13985 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13986 for ac_option
13987 do
13988   case "\$ac_option" in
13989   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13990     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13991     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13992   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13993     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13994     exit 0 ;;
13995   -help | --help | --hel | --he | --h)
13996     echo "\$ac_cs_usage"; exit 0 ;;
13997   *) echo "\$ac_cs_usage"; exit 1 ;;
13998   esac
13999 done
14000
14001 ac_given_srcdir=$srcdir
14002 ac_given_INSTALL="$INSTALL"
14003
14004 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14005 EOF
14006 cat >> $CONFIG_STATUS <<EOF
14007
14008 # Protect against being on the right side of a sed subst in config.status.
14009 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14010  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14011 $ac_vpsub
14012 $extrasub
14013 s%@SHELL@%$SHELL%g
14014 s%@CFLAGS@%$CFLAGS%g
14015 s%@CPPFLAGS@%$CPPFLAGS%g
14016 s%@CXXFLAGS@%$CXXFLAGS%g
14017 s%@FFLAGS@%$FFLAGS%g
14018 s%@DEFS@%$DEFS%g
14019 s%@LDFLAGS@%$LDFLAGS%g
14020 s%@LIBS@%$LIBS%g
14021 s%@exec_prefix@%$exec_prefix%g
14022 s%@prefix@%$prefix%g
14023 s%@program_transform_name@%$program_transform_name%g
14024 s%@bindir@%$bindir%g
14025 s%@sbindir@%$sbindir%g
14026 s%@libexecdir@%$libexecdir%g
14027 s%@datadir@%$datadir%g
14028 s%@sysconfdir@%$sysconfdir%g
14029 s%@sharedstatedir@%$sharedstatedir%g
14030 s%@localstatedir@%$localstatedir%g
14031 s%@libdir@%$libdir%g
14032 s%@includedir@%$includedir%g
14033 s%@oldincludedir@%$oldincludedir%g
14034 s%@infodir@%$infodir%g
14035 s%@mandir@%$mandir%g
14036 s%@LN_S@%$LN_S%g
14037 s%@blddir@%$blddir%g
14038 s%@CC@%$CC%g
14039 s%@CPP@%$CPP%g
14040 s%@start_flags@%$start_flags%g
14041 s%@ld_switch_shared@%$ld_switch_shared%g
14042 s%@start_files@%$start_files%g
14043 s%@ld@%$ld%g
14044 s%@lib_gcc@%$lib_gcc%g
14045 s%@RANLIB@%$RANLIB%g
14046 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14047 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14048 s%@INSTALL_DATA@%$INSTALL_DATA%g
14049 s%@YACC@%$YACC%g
14050 s%@SET_MAKE@%$SET_MAKE%g
14051 s%@X_CFLAGS@%$X_CFLAGS%g
14052 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14053 s%@X_LIBS@%$X_LIBS%g
14054 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14055 s%@install_pp@%$install_pp%g
14056 s%@libs_xauth@%$libs_xauth%g
14057 s%@dnd_objs@%$dnd_objs%g
14058 s%@lwlib_objs@%$lwlib_objs%g
14059 s%@ALLOCA@%$ALLOCA%g
14060 s%@have_esd_config@%$have_esd_config%g
14061 s%@dll_ld@%$dll_ld%g
14062 s%@dll_cflags@%$dll_cflags%g
14063 s%@dll_ldflags@%$dll_ldflags%g
14064 s%@dll_post@%$dll_post%g
14065 s%@dll_ldo@%$dll_ldo%g
14066 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14067 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14068 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14069 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14070 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14071 s%@PROGNAME@%$PROGNAME%g
14072 s%@version@%$version%g
14073 s%@configuration@%$configuration%g
14074 s%@canonical@%$canonical%g
14075 s%@inststaticdir@%$inststaticdir%g
14076 s%@instvardir@%$instvardir%g
14077 s%@srcdir@%$srcdir%g
14078 s%@pkgdir@%$pkgdir%g
14079 s%@statedir@%$statedir%g
14080 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14081 s%@PREFIX@%$PREFIX%g
14082 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14083 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14084 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14085 s%@INFODIR@%$INFODIR%g
14086 s%@infopath@%$infopath%g
14087 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14088 s%@INFOPATH@%$INFOPATH%g
14089 s%@package_path@%$package_path%g
14090 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14091 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14092 s%@lispdir@%$lispdir%g
14093 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14094 s%@LISPDIR@%$LISPDIR%g
14095 s%@moduledir@%$moduledir%g
14096 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14097 s%@MODULEDIR@%$MODULEDIR%g
14098 s%@sitelispdir@%$sitelispdir%g
14099 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14100 s%@SITELISPDIR@%$SITELISPDIR%g
14101 s%@sitemoduledir@%$sitemoduledir%g
14102 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14103 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14104 s%@etcdir@%$etcdir%g
14105 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14106 s%@ETCDIR@%$ETCDIR%g
14107 s%@lockdir@%$lockdir%g
14108 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14109 s%@LOCKDIR@%$LOCKDIR%g
14110 s%@docdir@%$docdir%g
14111 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14112 s%@DOCDIR@%$DOCDIR%g
14113 s%@archlibdir@%$archlibdir%g
14114 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14115 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14116 s%@bitmapdir@%$bitmapdir%g
14117 s%@extra_objs@%$extra_objs%g
14118 s%@machfile@%$machfile%g
14119 s%@opsysfile@%$opsysfile%g
14120 s%@c_switch_general@%$c_switch_general%g
14121 s%@c_switch_window_system@%$c_switch_window_system%g
14122 s%@c_switch_all@%$c_switch_all%g
14123 s%@ld_switch_general@%$ld_switch_general%g
14124 s%@ld_switch_window_system@%$ld_switch_window_system%g
14125 s%@ld_switch_all@%$ld_switch_all%g
14126 s%@ld_libs_general@%$ld_libs_general%g
14127 s%@ld_libs_window_system@%$ld_libs_window_system%g
14128 s%@ld_libs_all@%$ld_libs_all%g
14129 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14130 s%@native_sound_lib@%$native_sound_lib%g
14131 s%@sound_cflags@%$sound_cflags%g
14132 s%@dynodump_arch@%$dynodump_arch%g
14133 s%@XEMACS_CC@%$XEMACS_CC%g
14134 s%@internal_makefile_list@%$internal_makefile_list%g
14135
14136 CEOF
14137 EOF
14138
14139 cat >> $CONFIG_STATUS <<\EOF
14140
14141 # Split the substitutions into bite-sized pieces for seds with
14142 # small command number limits, like on Digital OSF/1 and HP-UX.
14143 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14144 ac_file=1 # Number of current file.
14145 ac_beg=1 # First line for current file.
14146 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14147 ac_more_lines=:
14148 ac_sed_cmds=""
14149 while $ac_more_lines; do
14150   if test $ac_beg -gt 1; then
14151     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14152   else
14153     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14154   fi
14155   if test ! -s conftest.s$ac_file; then
14156     ac_more_lines=false
14157     rm -f conftest.s$ac_file
14158   else
14159     if test -z "$ac_sed_cmds"; then
14160       ac_sed_cmds="sed -f conftest.s$ac_file"
14161     else
14162       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14163     fi
14164     ac_file=`expr $ac_file + 1`
14165     ac_beg=$ac_end
14166     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14167   fi
14168 done
14169 if test -z "$ac_sed_cmds"; then
14170   ac_sed_cmds=cat
14171 fi
14172 EOF
14173
14174 cat >> $CONFIG_STATUS <<EOF
14175
14176 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14177 EOF
14178 cat >> $CONFIG_STATUS <<\EOF
14179 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14180   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14181   case "$ac_file" in
14182   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14183        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14184   *) ac_file_in="${ac_file}.in" ;;
14185   esac
14186
14187   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14188
14189   # Remove last slash and all that follows it.  Not all systems have dirname.
14190   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14191   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14192     # The file is in a subdirectory.
14193     test ! -d "$ac_dir" && mkdir "$ac_dir"
14194     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14195     # A "../" for each directory in $ac_dir_suffix.
14196     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14197   else
14198     ac_dir_suffix= ac_dots=
14199   fi
14200
14201   case "$ac_given_srcdir" in
14202   .)  srcdir=.
14203       if test -z "$ac_dots"; then top_srcdir=.
14204       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14205   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14206   *) # Relative path.
14207     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14208     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14209   esac
14210
14211   case "$ac_given_INSTALL" in
14212   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14213   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14214   esac
14215
14216   echo creating "$ac_file"
14217   rm -f "$ac_file"
14218   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14219   case "$ac_file" in
14220   *Makefile*) ac_comsub="1i\\
14221 # $configure_input" ;;
14222   *) ac_comsub= ;;
14223   esac
14224
14225   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14226   sed -e "$ac_comsub
14227 s%@configure_input@%$configure_input%g
14228 s%@srcdir@%$srcdir%g
14229 s%@top_srcdir@%$top_srcdir%g
14230 s%@INSTALL@%$INSTALL%g
14231 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14232 fi; done
14233 rm -f conftest.s*
14234
14235 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14236 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14237 #
14238 # ac_d sets the value in "#define NAME VALUE" lines.
14239 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14240 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14241 ac_dC='\3'
14242 ac_dD='%g'
14243 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14244 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14245 ac_uB='\([      ]\)%\1#\2define\3'
14246 ac_uC=' '
14247 ac_uD='\4%g'
14248 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14249 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14250 ac_eB='$%\1#\2define\3'
14251 ac_eC=' '
14252 ac_eD='%g'
14253
14254 if test "${CONFIG_HEADERS+set}" != set; then
14255 EOF
14256 cat >> $CONFIG_STATUS <<EOF
14257   CONFIG_HEADERS="src/config.h lwlib/config.h"
14258 EOF
14259 cat >> $CONFIG_STATUS <<\EOF
14260 fi
14261 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14262   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14263   case "$ac_file" in
14264   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14265        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14266   *) ac_file_in="${ac_file}.in" ;;
14267   esac
14268
14269   echo creating $ac_file
14270
14271   rm -f conftest.frag conftest.in conftest.out
14272   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14273   cat $ac_file_inputs > conftest.in
14274
14275 EOF
14276
14277 # Transform confdefs.h into a sed script conftest.vals that substitutes
14278 # the proper values into config.h.in to produce config.h.  And first:
14279 # Protect against being on the right side of a sed subst in config.status.
14280 # Protect against being in an unquoted here document in config.status.
14281 rm -f conftest.vals
14282 cat > conftest.hdr <<\EOF
14283 s/[\\&%]/\\&/g
14284 s%[\\$`]%\\&%g
14285 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14286 s%ac_d%ac_u%gp
14287 s%ac_u%ac_e%gp
14288 EOF
14289 sed -n -f conftest.hdr confdefs.h > conftest.vals
14290 rm -f conftest.hdr
14291
14292 # This sed command replaces #undef with comments.  This is necessary, for
14293 # example, in the case of _POSIX_SOURCE, which is predefined and required
14294 # on some systems where configure will not decide to define it.
14295 cat >> conftest.vals <<\EOF
14296 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14297 EOF
14298
14299 # Break up conftest.vals because some shells have a limit on
14300 # the size of here documents, and old seds have small limits too.
14301
14302 rm -f conftest.tail
14303 while :
14304 do
14305   ac_lines=`grep -c . conftest.vals`
14306   # grep -c gives empty output for an empty file on some AIX systems.
14307   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14308   # Write a limited-size here document to conftest.frag.
14309   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14310   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14311   echo 'CEOF
14312   sed -f conftest.frag conftest.in > conftest.out
14313   rm -f conftest.in
14314   mv conftest.out conftest.in
14315 ' >> $CONFIG_STATUS
14316   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14317   rm -f conftest.vals
14318   mv conftest.tail conftest.vals
14319 done
14320 rm -f conftest.vals
14321
14322 cat >> $CONFIG_STATUS <<\EOF
14323   rm -f conftest.frag conftest.h
14324   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14325   cat conftest.in >> conftest.h
14326   rm -f conftest.in
14327   if cmp -s $ac_file conftest.h 2>/dev/null; then
14328     echo "$ac_file is unchanged"
14329     rm -f conftest.h
14330   else
14331     # Remove last slash and all that follows it.  Not all systems have dirname.
14332       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14333       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14334       # The file is in a subdirectory.
14335       test ! -d "$ac_dir" && mkdir "$ac_dir"
14336     fi
14337     rm -f $ac_file
14338     mv conftest.h $ac_file
14339   fi
14340 fi; done
14341
14342 EOF
14343 cat >> $CONFIG_STATUS <<EOF
14344 CPP="$CPP"
14345  top_srcdir="$srcdir"
14346  MAKE_SUBDIR="$MAKE_SUBDIR"
14347
14348 EOF
14349 cat >> $CONFIG_STATUS <<\EOF
14350 for dir in . $MAKE_SUBDIR; do
14351   (
14352     cd $dir
14353     rm -f junk.c
14354     < Makefile.in \
14355       sed -e '/^# Generated/d' \
14356           -e 's%/\*\*/#.*%%' \
14357           -e 's/^ *# */#/' \
14358           -e '/^##/d' \
14359           -e '/^#/ {
14360 p
14361 d
14362 }'        \
14363           -e '/./ {
14364 s/\([\"]\)/\\\1/g
14365 s/^/"/
14366 s/$/"/
14367 }'  > junk.c;
14368
14369
14370
14371     echo creating $dir/Makefile
14372 $CPP -I. -I${top_srcdir}/src  junk.c \
14373   | sed -e 's/^\#.*//'          \
14374         -e 's/^[        ][      ]*$//'\
14375         -e 's/^ /       /'              \
14376   | sed -n -e '/^..*$/p'        \
14377   | sed '/^\"/ {
14378         s/\\\([\"]\)/\1/g
14379         s/^[    ]*\"//
14380         s/\"[   ]*$//
14381 }' > Makefile.new
14382     chmod 444 Makefile.new
14383     mv -f Makefile.new Makefile
14384
14385     echo creating $dir/GNUmakefile
14386 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14387   | sed -e 's/^\#.*//'          \
14388         -e 's/^[        ][      ]*$//'\
14389         -e 's/^ /       /'              \
14390   | sed -n -e '/^..*$/p'        \
14391   | sed '/^\"/ {
14392         s/\\\([\"]\)/\1/g
14393         s/^[    ]*\"//
14394         s/\"[   ]*$//
14395 }' > Makefile.new
14396     chmod 444 Makefile.new
14397     mv -f Makefile.new GNUmakefile
14398
14399     rm -f junk.c
14400   )
14401 done
14402
14403 sed < config.status >> lib-src/config.values \
14404   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14405   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14406   -e 's/^\([^ ]*\) $/\1 ""/' \
14407   -e 's/ 1$/ t/'
14408
14409
14410 exit 0
14411 EOF
14412 chmod +x $CONFIG_STATUS
14413 rm -fr confdefs* $ac_clean_files
14414 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1