XEmacs 21.2.24 "Hecate".
[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=yes ;;
463               noesd )        with_esh=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 native,esd."
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=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                 "with_xim" )
486           case "$val" in
487             y | ye | yes )                val=yes   ;;
488             n | no | non | none )         val=no    ;;
489             x | xl | xli | xlib )         val=xlib  ;;
490             m | mo | mot | moti | motif ) val=motif ;;
491             * ) (echo "$progname: Usage error:"
492 echo " " "The \`--$optname' option must have one of these values:
493   \`motif', \`xlib', \`yes', or \`no'."
494 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
495           esac
496           eval "$opt=\"$val\""
497         ;;
498
499                 "mail_locking" )
500           case "$val" in
501             lockf )     val=lockf ;;
502             flock )     val=flock ;;
503             file )      val=file  ;;
504             * ) (echo "$progname: Usage error:"
505 echo " " "The \`--$optname' option must have one of these values:
506   \`lockf', \`flock', or \`file'."
507 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
508           esac
509           eval "$opt=\"$val\""
510         ;;
511
512                 "error_checking" )
513                           
514           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
515             case "$x" in
516                       n | no | non | none ) new_default=no ;;
517               a | al | all )        new_default=yes ;;
518
519               extents )       error_check_extents=yes ;;
520               noextents )     error_check_extents=no ;;
521
522               typecheck )     error_check_typecheck=yes ;;
523               notypecheck )   error_check_typecheck=no ;;
524
525               bufpos )        error_check_bufpos=yes ;;
526               nobufpos )      error_check_bufpos=no ;;
527
528               gc )            error_check_gc=yes ;;
529               nogc )          error_check_gc=no ;;
530
531               malloc )        error_check_malloc=yes ;;
532               nomalloc )      error_check_malloc=no ;;
533
534               byte_code )     error_check_byte_code=yes ;;
535               nobyte_code )   error_check_byte_code=no ;;
536
537               * ) bogus_error_check=yes ;;
538             esac
539             if test "$bogus_error_check" -o \
540                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
541                 if test "$error_check_default" = yes ; then
542                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
543                 else
544                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
545                 fi
546                 (echo "$progname: Usage error:"
547 echo " " "Valid types for the \`--$optname' option are:
548   $types."
549 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
550             elif test -n "$new_default" ; then
551                 error_check_extents=$new_default
552                 error_check_typecheck=$new_default
553                 error_check_bufpos=$new_default
554                 error_check_gc=$new_default
555                 error_check_malloc=$new_default
556                 error_check_byte_code=$new_default
557                 new_default=    # reset this
558             fi
559             echeck_notfirst=true
560           done
561         ;;
562
563                                 
564                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
565         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
566         archlibdir | docdir | package_path )
567                    if test "$valomitted" = "yes"; then
568              if test "$#" = 0; then
569                  (echo "$progname: Usage error:"
570 echo " " "The \`--$optname' option requires a value."
571 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
572              fi
573              val="$1"; shift
574            fi
575            eval "$opt=\"$val\""
576
577                            case "$opt" in
578                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
579     Defining EXEC_PREFIX_USER_DEFINED
580 EOF
581 cat >> confdefs.h <<\EOF
582 #define EXEC_PREFIX_USER_DEFINED 1
583 EOF
584 }
585  ;;
586              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
587     Defining LISPDIR_USER_DEFINED
588 EOF
589 cat >> confdefs.h <<\EOF
590 #define LISPDIR_USER_DEFINED 1
591 EOF
592 }
593  ;;
594              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining SITELISPDIR_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define SITELISPDIR_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining MODULEDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define MODULEDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining ETCDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define ETCDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining INFODIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define INFODIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining INFOPATH_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define INFOPATH_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining PACKAGE_PATH_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define PACKAGE_PATH_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              datadir )
643                 { test "$extra_verbose" = "yes" && cat << \EOF
644     Defining INFODIR_USER_DEFINED
645 EOF
646 cat >> confdefs.h <<\EOF
647 #define INFODIR_USER_DEFINED 1
648 EOF
649 }
650
651                 { test "$extra_verbose" = "yes" && cat << \EOF
652     Defining LISPDIR_USER_DEFINED
653 EOF
654 cat >> confdefs.h <<\EOF
655 #define LISPDIR_USER_DEFINED 1
656 EOF
657 }
658
659             { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining MODULEDIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define MODULEDIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining ETCDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define ETCDIR_USER_DEFINED 1
672 EOF
673 }
674  ;;
675              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining LOCKDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define LOCKDIR_USER_DEFINED 1
680 EOF
681 }
682  ;;
683              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining DOCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define DOCDIR_USER_DEFINED 1
688 EOF
689 }
690  ;;
691              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining ARCHLIBDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define ARCHLIBDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699            esac
700         ;;
701
702                 "no_create" ) ;;
703
704                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
705
706                 "with_menubars"   | \
707         "with_scrollbars" | \
708         "with_dialogs" | \
709         "with_widgets" )
710           case "$val" in
711             l | lu | luc | luci | lucid )               val=lucid  ;;
712             m | mo | mot | moti | motif )               val=motif  ;;
713             athena3d | athena-3d )                      val=athena3d ;;
714             a | at | ath | athe | athen | athena )      val=athena ;;
715             n | no | non | none )                       val=no ;;
716             * ) (echo "$progname: Usage error:"
717 echo " " "The \`--$optname' option must have one of these values:
718   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
719 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
720           esac
721           eval "$opt=\"$val\""
722         ;;
723
724                 "use_minimal_tagbits" | \
725         "use_indexed_lrecord_implementation" | \
726         "run_in_place"  | \
727         "with_gnu_make" )
728           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
729         ;;
730
731                 * ) (echo "$progname: Usage error:"
732 echo " " "Unrecognized option: $arg"
733 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
734
735       esac
736     ;;
737
738         *-*-*) configuration="$arg" ;;
739
740         *) (echo "$progname: Usage error:"
741 echo " " "Unrecognized argument: $arg"
742 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
743
744   esac
745 done
746
747
748 test -n "$cpp"      && CPP="$cpp"
749 test -n "$cppflags" && CPPFLAGS="$cppflags"
750 test -n "$libs"     && LIBS="$libs"
751 test -n "$ldflags"  && LDFLAGS="$ldflags"
752
753 eval set x "$quoted_arguments"; shift
754
755 test "$extra_verbose" = "yes" && verbose=yes
756
757 test -n "$with_x" && with_x11="$with_x"
758
759 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
760   test "$with_system_malloc" = "default" && with_system_malloc=yes
761 fi
762
763
764
765 if test "$with_cde $with_tooltalk" = "yes no"; then
766   (echo "$progname: Usage error:"
767 echo " " "--with-cde requires --with-tooltalk"
768 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
769 elif test "$with_tooltalk" = "no" ; then with_cde=no
770 elif test "$with_cde" = "yes"; then with_tooltalk=yes
771 fi
772
773
774 case "$srcdir" in
775
776     "" )
777     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
778       if test -f "$dir/src/lisp.h" -a \
779               -f "$dir/lisp/version.el" ; then
780         srcdir="$dir"
781         break
782       fi
783     done
784     if test -z "$srcdir" ; then
785       (echo "$progname: Usage error:"
786 echo " " "Neither the current directory nor its parent seem to
787   contain the XEmacs sources.  If you do not want to build XEmacs in its
788   source tree, you should run \`$progname' in the directory in which
789   you wish to build XEmacs, using the \`--srcdir' option to say where the
790   sources may be found."
791 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
792     fi
793   ;;
794
795     * )
796     if test ! -f "$srcdir/src/lisp.h" -o \
797             ! -f "$srcdir/lisp/version.el" ; then
798       (echo "$progname: Usage error:"
799 echo " " "The directory specified with the \`--srcdir' option,
800   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
801   either run the \`$progname' script at the top of the XEmacs source
802   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
803 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
804     fi
805   ;;
806 esac
807
808 if test -z "$configuration"; then
809     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
810   if test -z "$configuration"; then
811     (echo "$progname: Usage error:"
812 echo " " "XEmacs has not been ported to this host type.
813 Try explicitly specifying the CONFIGURATION when rerunning configure."
814 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
815   fi
816 fi
817
818 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
819 echo "configure:820: checking whether ln -s works" >&5
820
821 rm -f conftestdata
822 if ln -s X conftestdata 2>/dev/null
823 then
824   rm -f conftestdata
825   ac_cv_prog_LN_S="ln -s"
826 else
827   ac_cv_prog_LN_S=ln
828 fi
829 LN_S="$ac_cv_prog_LN_S"
830 if test "$ac_cv_prog_LN_S" = "ln -s"; then
831   echo "$ac_t""yes" 1>&6
832 else
833   echo "$ac_t""no" 1>&6
834 fi
835
836
837 for dir in lisp etc man info; do
838   if test ! -d "$dir" ; then
839     echo Making symbolic link to "$srcdir/$dir"
840     ${LN_S} "$srcdir/$dir" "$dir"
841   fi
842 done
843
844
845 absolute_pwd="`pwd`";
846 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
847 then blddir="$PWD"
848 else blddir="$absolute_pwd"; if test -d "/net"; then
849   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
850   blddir=`echo "$blddir" | \
851    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
852 fi
853 fi
854
855
856 case "$srcdir" in
857   /* ) ;;
858   .  ) srcdir="$blddir" ;;
859   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
860   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
861   srcdir=`echo "$srcdir" | \
862    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
863 fi ;;
864 esac
865
866 if test `pwd` != `sh -c cd $srcdir && pwd`  \
867    && test -f "$srcdir/src/config.h"; then
868   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
869    echo "   as a build directory right now; it has been configured in its own"
870    echo "   right.  To configure in another directory as well, you MUST"
871    echo "   use GNU make.  If you do not have GNU make, then you must"
872    echo "   now do \`make distclean' in $srcdir,"
873    echo "   and then run $progname again.") >&2
874   extrasub='/^VPATH[     ]*=/c\
875 vpath %.c $(srcdir)\
876 vpath %.h $(srcdir)\
877 vpath %.y $(srcdir)\
878 vpath %.l $(srcdir)\
879 vpath %.s $(srcdir)\
880 vpath %.in $(srcdir)'
881 fi
882
883 . "$srcdir/version.sh" || exit 1;
884 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
885 : "${extra_verbose=$beta}"
886 version="${emacs_major_version}.${emacs_minor_version}"
887 { test "$extra_verbose" = "yes" && cat << EOF
888     Defining EMACS_MAJOR_VERSION = $emacs_major_version
889 EOF
890 cat >> confdefs.h <<EOF
891 #define EMACS_MAJOR_VERSION $emacs_major_version
892 EOF
893 }
894
895 { test "$extra_verbose" = "yes" && cat << EOF
896     Defining EMACS_MINOR_VERSION = $emacs_minor_version
897 EOF
898 cat >> confdefs.h <<EOF
899 #define EMACS_MINOR_VERSION $emacs_minor_version
900 EOF
901 }
902
903 if test -n "$emacs_beta_version" ; then
904   if test "$beta" = "yes"; then
905         version="${version}-b${emacs_beta_version}"
906         { test "$extra_verbose" = "yes" && cat << EOF
907     Defining EMACS_BETA_VERSION = $emacs_beta_version
908 EOF
909 cat >> confdefs.h <<EOF
910 #define EMACS_BETA_VERSION $emacs_beta_version
911 EOF
912 }
913
914   else
915         version="${version}.${emacs_beta_version}"
916         { test "$extra_verbose" = "yes" && cat << EOF
917     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
918 EOF
919 cat >> confdefs.h <<EOF
920 #define EMACS_PATCH_LEVEL $emacs_beta_version
921 EOF
922 }
923
924   fi
925 fi
926 { test "$extra_verbose" = "yes" && cat << EOF
927     Defining XEMACS_CODENAME = "$xemacs_codename"
928 EOF
929 cat >> confdefs.h <<EOF
930 #define XEMACS_CODENAME "$xemacs_codename"
931 EOF
932 }
933
934 { test "$extra_verbose" = "yes" && cat << EOF
935     Defining EMACS_VERSION = "$version"
936 EOF
937 cat >> confdefs.h <<EOF
938 #define EMACS_VERSION "$version"
939 EOF
940 }
941
942
943 if test "$with_infodock" = "yes"; then
944   if test ! -f ../../ID-INSTALL; then
945     echo "Cannot build InfoDock without InfoDock sources"
946     with_infodock=no
947   fi
948 fi
949
950 if test "$with_infodock" = "yes"; then
951       { test "$extra_verbose" = "yes" && cat << EOF
952     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
953 EOF
954 cat >> confdefs.h <<EOF
955 #define INFODOCK_MAJOR_VERSION $infodock_major_version
956 EOF
957 }
958
959   { test "$extra_verbose" = "yes" && cat << EOF
960     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
961 EOF
962 cat >> confdefs.h <<EOF
963 #define INFODOCK_MINOR_VERSION $infodock_minor_version
964 EOF
965 }
966
967   { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_BUILD_VERSION $infodock_build_version
972 EOF
973 }
974
975   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
976   PROGNAME=infodock
977   CPPFLAGS="$CPPFLAGS -DINFODOCK"
978 else
979   PROGNAME=xemacs
980 fi
981
982 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
983 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
984     Defining ERROR_CHECK_EXTENTS
985 EOF
986 cat >> confdefs.h <<\EOF
987 #define ERROR_CHECK_EXTENTS 1
988 EOF
989 }
990
991 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
992     Defining ERROR_CHECK_TYPECHECK
993 EOF
994 cat >> confdefs.h <<\EOF
995 #define ERROR_CHECK_TYPECHECK 1
996 EOF
997 }
998
999 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_BUFPOS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_BUFPOS 1
1004 EOF
1005 }
1006
1007 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_GC
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_GC 1
1012 EOF
1013 }
1014
1015 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_MALLOC
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_MALLOC 1
1020 EOF
1021 }
1022
1023 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_BYTE_CODE
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_BYTE_CODE 1
1028 EOF
1029 }
1030
1031 if test "${debug:=$beta}" = "yes"; then
1032   use_assertions=yes memory_usage_stats=yes
1033   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1034    echo "    xemacs will be linked with \"debug.o\""
1035  fi
1036   { test "$extra_verbose" = "yes" && cat << \EOF
1037     Defining DEBUG_XEMACS
1038 EOF
1039 cat >> confdefs.h <<\EOF
1040 #define DEBUG_XEMACS 1
1041 EOF
1042 }
1043
1044 fi
1045 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1046     Defining USE_ASSERTIONS
1047 EOF
1048 cat >> confdefs.h <<\EOF
1049 #define USE_ASSERTIONS 1
1050 EOF
1051 }
1052
1053 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1054     Defining MEMORY_USAGE_STATS
1055 EOF
1056 cat >> confdefs.h <<\EOF
1057 #define MEMORY_USAGE_STATS 1
1058 EOF
1059 }
1060
1061
1062
1063 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1064 echo "configure:1065: checking "host system type"" >&5
1065 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1066 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1067 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1068 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1069 echo "$ac_t""$configuration" 1>&6
1070
1071
1072
1073
1074
1075 machine='' opsys=''
1076
1077 case "$canonical" in
1078   sparc-*-*        ) machine=sparc ;;
1079   alpha*-*-*       ) machine=alpha ;;
1080   vax-*-*          ) machine=vax ;;
1081   mips-dec-*       ) machine=pmax ;;
1082   mips-sgi-*       ) machine=iris4d ;;
1083   mips*-linux      ) machine=mips ;;
1084   romp-ibm-*       ) machine=ibmrt ;;
1085   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1086   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1087   powerpc*-*       ) machine=powerpc ;;
1088   hppa-*-*         ) machine=hp800 ;;
1089   m88k-dg-*        ) machine=aviion ;;
1090   m68*-sony-*      ) machine=news ;;
1091   mips-sony-*      ) machine=news-risc ;;
1092   clipper-*        ) machine=clipper ;;
1093   arm-*            ) machine=arm ;;
1094   ns32k-*          ) machine=ns32000 ;;
1095 esac
1096
1097 case "$canonical" in
1098   *-*-linux*    ) opsys=linux ;;
1099   *-*-netbsd*   ) opsys=netbsd ;;
1100   *-*-openbsd*  ) opsys=openbsd ;;
1101   *-*-nextstep* ) opsys=nextstep ;;
1102   *-*-vms       ) opsys=vms ;;
1103
1104     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1105   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1106   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1107   *-dec-osf3*                ) opsys=decosf3-1 ;;
1108   *-dec-osf4*                ) opsys=decosf4-0 ;;
1109
1110     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1111   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1112   *-*-ultrix* )         opsys=ultrix4-3 ;;
1113
1114     *-*-aix3.1*  ) opsys=aix3-1 ;;
1115   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1116   *-*-aix3*    ) opsys=aix3-2   ;;
1117   *-*-aix4.0*  ) opsys=aix4     ;;
1118   *-*-aix4.1*  ) opsys=aix4-1   ;;
1119   *-*-aix4*    ) opsys=aix4-2   ;;
1120
1121     *-gnu* )                    opsys=gnu    ;;
1122   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1123   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1124   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1125   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1126   *-*-aos*   )                  opsys=bsd4-3 ;;
1127   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1128   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1129   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1130   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1131   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1132   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1133         if test -z "$NON_GNU_CPP" ; then
1134           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1135             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1136           done
1137         fi
1138         opsys=usg5-4-2 ;;
1139     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1140     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1141 esac
1142
1143 case "$canonical" in
1144
1145     *-*-netbsd* )
1146     case "$canonical" in
1147       i[3-9]86-*-netbsd*) machine=intel386 ;;
1148       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1149                                             machine=hp9000s300 ;;
1150       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1151       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1152     esac
1153   ;;
1154
1155     *-*-openbsd* )
1156     case "${canonical}" in
1157       i386-*-openbsd*)          machine=intel386 ;;
1158       m68k-*-openbsd*)          machine=hp9000s300 ;;
1159       mipsel-*-openbsd*)        machine=pmax ;;
1160      esac
1161    ;;
1162
1163     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1164   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1165
1166     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1167   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1168
1169     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1170
1171     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1172
1173     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1174
1175     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1176
1177     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1178
1179     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1180   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1181   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1182
1183   
1184     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1185
1186     *-convex-bsd* | *-convex-convexos* )
1187     machine=convex opsys=bsd4-3
1188     NON_GNU_CPP="cc -E -P"
1189   ;;
1190
1191     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1192
1193     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1194   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1195   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1196   m88k-dg-dgux*                           ) opsys=dgux     ;;
1197
1198     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1199   m88k-motorola-sysv4* )
1200                     machine=delta88k opsys=usg5-4-2
1201   ;;
1202   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1203
1204     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1205   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1206
1207     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1208
1209     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1210   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1211   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1212
1213       m88k-harris-cxux* )
1214         case "`uname -r`" in
1215        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1216        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1217     esac
1218     NON_GNU_CPP="/lib/cpp"
1219   ;;
1220     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1221     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1222
1223     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1224
1225     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1226
1227     *-hp-hpux* )
1228         case "$canonical" in
1229       m68*  ) machine=hp9000s300 ;;
1230       hppa* ) machine=hp800      ;;
1231     esac
1232
1233     case "$canonical" in
1234       *-hp-hpux7*  )  opsys=hpux   ;;
1235       *-hp-hpux8*  )  opsys=hpux8  ;;
1236       *-hp-hpux9*  )  opsys=hpux9  ;;
1237       *-hp-hpux10* )  opsys=hpux10 ;;
1238       *-hp-hpux11* )  opsys=hpux11 ;;
1239       *            )  opsys=hpux   ;;
1240     esac
1241
1242         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1243    echo "    xemacs will be linked with \"strcat.o\""
1244  fi ;; esac
1245
1246     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1247         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1248     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1249
1250     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1251   ;;
1252
1253     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1254   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1255
1256     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1257   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1258   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1259   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1260   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1261   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1262
1263     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1264   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1265
1266     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1267
1268     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1269
1270     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1271
1272     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1273
1274       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1275
1276     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1277
1278     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1279
1280     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1281
1282     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1283
1284         mips-mips-usg* ) machine=mips4 ;;
1285   mips-mips-riscos4 )
1286     machine=mips4
1287     NON_GNU_CC="cc -systype bsd43"
1288     NON_GNU_CPP="cc -systype bsd43 -E"
1289     case "$canonical" in
1290       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1291       mips-mips-riscos5* ) opsys=riscos5 ;;
1292     esac
1293   ;;
1294   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1295   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1296
1297     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1298
1299     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1300
1301     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1302   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1303
1304     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1305
1306     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1307
1308     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1309
1310     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1311
1312     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1313   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1314
1315     mips-siemens-sysv* | mips-sni-sysv*)
1316     machine=mips-siemens opsys=usg5-4
1317     NON_GNU_CC=/usr/ccs/bin/cc
1318     NON_GNU_CPP=/usr/ccs/lib/cpp
1319   ;;
1320
1321     mips-nec-sysv*)
1322     machine=mips-nec
1323     NON_GNU_CC=/usr/ccs/bin/cc
1324     NON_GNU_CPP=/usr/ccs/lib/cpp
1325   ;;
1326
1327       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1328   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1329     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1330   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1331   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1332   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1333   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1334   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1335   mips-sgi-irix*      ) opsys=irix5-0 ;;
1336
1337     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1338   *-sony-news* ) opsys=newsos5 ;;
1339
1340     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1341
1342     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1343         case "$canonical" in
1344       m68*-sunos1* )             machine=sun1     ;;
1345       m68*-sunos2* )             machine=sun2     ;;
1346       m68* )                     machine=sun3     ;;
1347       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1348       i*86-*-* )                 machine=intel386 ;;
1349       rs6000* )                  machine=rs6000   ;;
1350     esac
1351
1352         case "$canonical" in *-sunos5*)
1353       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1354     esac
1355
1356                     case "$canonical" in
1357       *-sunos4* )
1358         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1359         : ;;
1360       *-solaris2* )
1361         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1362         RANLIB=':' ;;
1363     esac
1364
1365     case "$canonical" in
1366       *-solaris*          )
1367         opsys=sol2
1368         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1369         { test "$extra_verbose" = "yes" && cat << EOF
1370     Defining OS_RELEASE = $os_release
1371 EOF
1372 cat >> confdefs.h <<EOF
1373 #define OS_RELEASE $os_release
1374 EOF
1375 }
1376  ;;
1377
1378             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1379       *-sunos4.0*         ) opsys=sunos4-0      ;;
1380       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1381       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1382       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1383       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1384       *-mach*             ) opsys=mach-bsd4-3   ;;
1385       *                   ) opsys=bsd4-2        ;;
1386     esac
1387
1388     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1389
1390         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1391   ;;
1392
1393     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1394
1395     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1396   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1397
1398     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1399
1400     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1401
1402     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1403       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1404
1405     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1406
1407     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1408
1409     vax-dec-* )
1410     case "$canonical" in
1411       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1412       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1413       *-mach* )                         opsys=mach-bsd4-3 ;;
1414     esac
1415   ;;
1416
1417     ns16k-whitechapel-* ) machine=mg1 ;;
1418
1419     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1420
1421     i[3-9]86-*-* )
1422     machine=intel386
1423     case "$canonical" in
1424       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1425       *-isc2.2* )               opsys=isc2-2 ;;
1426       *-isc4.0* )               opsys=isc4-0 ;;
1427       *-isc4.* )                opsys=isc4-1
1428                                 GCC_TEST_OPTIONS=-posix
1429                                 NON_GCC_TEST_OPTIONS=-Xp
1430                                 ;;
1431       *-isc* )                  opsys=isc3-0 ;;
1432       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1433       *-esix* )                 opsys=esix ;;
1434       *-mach* )                 opsys=mach-bsd4-3 ;;
1435       *-xenix* )                opsys=xenix ;;
1436       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1437       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1438       *-bsdi4* )                opsys=bsdos4 ;;
1439       *-bsdi3* )                opsys=bsdos3 ;;
1440       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1441       *-bsdi2* )                opsys=bsdos2 ;;
1442       *-sco3.2v5* )             opsys=sco5 ;
1443                                                         if test "$dynamic" = "yes" ; then
1444                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1445         else
1446                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1447         fi ;;
1448       *-sysv5* )                opsys=sco7 ;;
1449       *-386bsd* )               opsys=386bsd ;;
1450       *-freebsd* )              opsys=freebsd ;;
1451       *-nextstep* )             opsys=nextstep ;;
1452       *-pc-cygwin* )            opsys=cygwin32 ;;
1453       *-pc-mingw* )             opsys=mingw32 ;
1454                                 test -z "$with_tty" && with_tty="no";;
1455           esac
1456   ;;
1457
1458     m68k-*-linux* ) machine=m68k opsys=linux ;;
1459
1460 esac
1461
1462 if test -z "$machine" -o -z "$opsys"; then
1463   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1464    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1465   ) >&2
1466   exit 1
1467 fi
1468
1469 if test -z "$dynamic"; then
1470   case "$opsys" in
1471     hpux* | sunos4* ) dynamic=no ;;
1472     *) dynamic=yes ;;
1473   esac
1474 fi
1475 if test "$dynamic" = "yes"; then
1476   case "$opsys" in
1477     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1478     decosf* ) ld_call_shared="-call_shared" ;;
1479   esac
1480 else   case "$opsys" in
1481     sol2 )
1482       echo "Static linking is not supported on Solaris 2."
1483       echo "Rerun configure without specifying --dynamic=no."
1484       exit 1 ;;
1485     linux   ) ld_call_shared="-Bstatic" ;;
1486     decosf* ) ld_call_shared="-non_shared" ;;
1487   esac
1488 fi
1489
1490 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1491
1492 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1493 { test "$extra_verbose" = "yes" && cat << EOF
1494     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1495 EOF
1496 cat >> confdefs.h <<EOF
1497 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1498 EOF
1499 }
1500
1501
1502 machfile="m/${machine}.h"
1503 opsysfile="s/${opsys}.h"
1504
1505
1506 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1507 if test "$with_workshop $with_tooltalk" = "yes no"; then
1508   (echo "$progname: Usage error:"
1509 echo " " "--with-workshop requires --with-tooltalk"
1510 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1511 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1512 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1513 fi
1514
1515 if test "$with_workshop" = "yes"; then
1516   { test "$extra_verbose" = "yes" && cat << \EOF
1517     Defining SUNPRO
1518 EOF
1519 cat >> confdefs.h <<\EOF
1520 #define SUNPRO 1
1521 EOF
1522 }
1523
1524   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1525    echo "    xemacs will be linked with \"sunpro.o\""
1526  fi
1527 fi
1528
1529 if test "$with_clash_detection" = "yes"; then
1530   { test "$extra_verbose" = "yes" && cat << \EOF
1531     Defining CLASH_DETECTION
1532 EOF
1533 cat >> confdefs.h <<\EOF
1534 #define CLASH_DETECTION 1
1535 EOF
1536 }
1537
1538   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1539    echo "    xemacs will be linked with \"filelock.o\""
1540  fi
1541 fi
1542
1543 test -n "$compiler" && CC="$compiler"
1544 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1545 fi
1546
1547 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1548 if test "${CFLAGS-unset}" != unset
1549   then cflags_specified=yes;
1550   else cflags_specified=no;
1551 fi
1552
1553 xe_save_CFLAGS="$CFLAGS"
1554
1555 # Extract the first word of "gcc", so it can be a program name with args.
1556 set dummy gcc; ac_word=$2
1557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1558 echo "configure:1559: checking for $ac_word" >&5
1559
1560 if test -n "$CC"; then
1561   ac_cv_prog_CC="$CC" # Let the user override the test.
1562 else
1563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1564   ac_dummy="$PATH"
1565   for ac_dir in $ac_dummy; do
1566     test -z "$ac_dir" && ac_dir=.
1567     if test -f $ac_dir/$ac_word; then
1568       ac_cv_prog_CC="gcc"
1569       break
1570     fi
1571   done
1572   IFS="$ac_save_ifs"
1573 fi
1574 CC="$ac_cv_prog_CC"
1575 if test -n "$CC"; then
1576   echo "$ac_t""$CC" 1>&6
1577 else
1578   echo "$ac_t""no" 1>&6
1579 fi
1580
1581 if test -z "$CC"; then
1582   # Extract the first word of "cc", so it can be a program name with args.
1583 set dummy cc; ac_word=$2
1584 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1585 echo "configure:1586: checking for $ac_word" >&5
1586
1587 if test -n "$CC"; then
1588   ac_cv_prog_CC="$CC" # Let the user override the test.
1589 else
1590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1591   ac_prog_rejected=no
1592   ac_dummy="$PATH"
1593   for ac_dir in $ac_dummy; do
1594     test -z "$ac_dir" && ac_dir=.
1595     if test -f $ac_dir/$ac_word; then
1596       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1597         ac_prog_rejected=yes
1598         continue
1599       fi
1600       ac_cv_prog_CC="cc"
1601       break
1602     fi
1603   done
1604   IFS="$ac_save_ifs"
1605 if test $ac_prog_rejected = yes; then
1606   # We found a bogon in the path, so make sure we never use it.
1607   set dummy $ac_cv_prog_CC
1608   shift
1609   if test $# -gt 0; then
1610     # We chose a different compiler from the bogus one.
1611     # However, it has the same basename, so the bogon will be chosen
1612     # first if we set CC to just the basename; use the full file name.
1613     shift
1614     set dummy "$ac_dir/$ac_word" "$@"
1615     shift
1616     ac_cv_prog_CC="$@"
1617   fi
1618 fi
1619 fi
1620 CC="$ac_cv_prog_CC"
1621 if test -n "$CC"; then
1622   echo "$ac_t""$CC" 1>&6
1623 else
1624   echo "$ac_t""no" 1>&6
1625 fi
1626
1627   if test -z "$CC"; then
1628     case "`uname -s`" in
1629     *win32* | *WIN32*)
1630       # Extract the first word of "cl", so it can be a program name with args.
1631 set dummy cl; ac_word=$2
1632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1633 echo "configure:1634: checking for $ac_word" >&5
1634
1635 if test -n "$CC"; then
1636   ac_cv_prog_CC="$CC" # Let the user override the test.
1637 else
1638   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1639   ac_dummy="$PATH"
1640   for ac_dir in $ac_dummy; do
1641     test -z "$ac_dir" && ac_dir=.
1642     if test -f $ac_dir/$ac_word; then
1643       ac_cv_prog_CC="cl"
1644       break
1645     fi
1646   done
1647   IFS="$ac_save_ifs"
1648 fi
1649 CC="$ac_cv_prog_CC"
1650 if test -n "$CC"; then
1651   echo "$ac_t""$CC" 1>&6
1652 else
1653   echo "$ac_t""no" 1>&6
1654 fi
1655  ;;
1656     esac
1657   fi
1658   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1659 fi
1660
1661 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1662 echo "configure:1663: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1663
1664 ac_ext=c
1665 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1666 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1667 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1668 ac_cpp='$CPP '"$xe_cppflags"
1669 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1670 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1671 cross_compiling=no
1672
1673 cat > conftest.$ac_ext << EOF
1674
1675 #line 1676 "configure"
1676 #include "confdefs.h"
1677
1678 main(){return(0);}
1679 EOF
1680 if { (eval echo configure:1681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1681   ac_cv_prog_cc_works=yes
1682   # If we can't run a trivial program, we are probably using a cross compiler.
1683   if (./conftest; exit) 2>/dev/null; then
1684     ac_cv_prog_cc_cross=no
1685   else
1686     ac_cv_prog_cc_cross=yes
1687   fi
1688 else
1689   echo "configure: failed program was:" >&5
1690   cat conftest.$ac_ext >&5
1691   ac_cv_prog_cc_works=no
1692 fi
1693 rm -fr conftest*
1694 ac_ext=c
1695 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1696 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1697 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1698 ac_cpp='$CPP '"$xe_cppflags"
1699 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1700 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1701 cross_compiling=no
1702
1703 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1704 if test $ac_cv_prog_cc_works = no; then
1705   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1706 fi
1707 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1708 echo "configure:1709: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1709 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1710 cross_compiling=$ac_cv_prog_cc_cross
1711
1712 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1713 echo "configure:1714: checking whether we are using GNU C" >&5
1714
1715 cat > conftest.c <<EOF
1716 #ifdef __GNUC__
1717   yes;
1718 #endif
1719 EOF
1720 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1721: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1721   ac_cv_prog_gcc=yes
1722 else
1723   ac_cv_prog_gcc=no
1724 fi
1725
1726 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1727
1728 if test $ac_cv_prog_gcc = yes; then
1729   GCC=yes
1730 else
1731   GCC=
1732 fi
1733
1734 ac_test_CFLAGS="${CFLAGS+set}"
1735 ac_save_CFLAGS="$CFLAGS"
1736 CFLAGS=
1737 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1738 echo "configure:1739: checking whether ${CC-cc} accepts -g" >&5
1739
1740 echo 'void f(){}' > conftest.c
1741 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1742   ac_cv_prog_cc_g=yes
1743 else
1744   ac_cv_prog_cc_g=no
1745 fi
1746 rm -f conftest*
1747
1748
1749 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1750 if test "$ac_test_CFLAGS" = set; then
1751   CFLAGS="$ac_save_CFLAGS"
1752 elif test $ac_cv_prog_cc_g = yes; then
1753   if test "$GCC" = yes; then
1754     CFLAGS="-g -O2"
1755   else
1756     CFLAGS="-g"
1757   fi
1758 else
1759   if test "$GCC" = yes; then
1760     CFLAGS="-O2"
1761   else
1762     CFLAGS=
1763   fi
1764 fi
1765  
1766 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1767   CC=${NON_GNU_CC-cc}
1768   # Extract the first word of "gcc", so it can be a program name with args.
1769 set dummy gcc; ac_word=$2
1770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1771 echo "configure:1772: checking for $ac_word" >&5
1772
1773 if test -n "$CC"; then
1774   ac_cv_prog_CC="$CC" # Let the user override the test.
1775 else
1776   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1777   ac_dummy="$PATH"
1778   for ac_dir in $ac_dummy; do
1779     test -z "$ac_dir" && ac_dir=.
1780     if test -f $ac_dir/$ac_word; then
1781       ac_cv_prog_CC="gcc"
1782       break
1783     fi
1784   done
1785   IFS="$ac_save_ifs"
1786 fi
1787 CC="$ac_cv_prog_CC"
1788 if test -n "$CC"; then
1789   echo "$ac_t""$CC" 1>&6
1790 else
1791   echo "$ac_t""no" 1>&6
1792 fi
1793
1794 if test -z "$CC"; then
1795   # Extract the first word of "cc", so it can be a program name with args.
1796 set dummy cc; ac_word=$2
1797 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1798 echo "configure:1799: checking for $ac_word" >&5
1799
1800 if test -n "$CC"; then
1801   ac_cv_prog_CC="$CC" # Let the user override the test.
1802 else
1803   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1804   ac_prog_rejected=no
1805   ac_dummy="$PATH"
1806   for ac_dir in $ac_dummy; do
1807     test -z "$ac_dir" && ac_dir=.
1808     if test -f $ac_dir/$ac_word; then
1809       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1810         ac_prog_rejected=yes
1811         continue
1812       fi
1813       ac_cv_prog_CC="cc"
1814       break
1815     fi
1816   done
1817   IFS="$ac_save_ifs"
1818 if test $ac_prog_rejected = yes; then
1819   # We found a bogon in the path, so make sure we never use it.
1820   set dummy $ac_cv_prog_CC
1821   shift
1822   if test $# -gt 0; then
1823     # We chose a different compiler from the bogus one.
1824     # However, it has the same basename, so the bogon will be chosen
1825     # first if we set CC to just the basename; use the full file name.
1826     shift
1827     set dummy "$ac_dir/$ac_word" "$@"
1828     shift
1829     ac_cv_prog_CC="$@"
1830   fi
1831 fi
1832 fi
1833 CC="$ac_cv_prog_CC"
1834 if test -n "$CC"; then
1835   echo "$ac_t""$CC" 1>&6
1836 else
1837   echo "$ac_t""no" 1>&6
1838 fi
1839
1840   if test -z "$CC"; then
1841     case "`uname -s`" in
1842     *win32* | *WIN32*)
1843       # Extract the first word of "cl", so it can be a program name with args.
1844 set dummy cl; ac_word=$2
1845 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1846 echo "configure:1847: checking for $ac_word" >&5
1847
1848 if test -n "$CC"; then
1849   ac_cv_prog_CC="$CC" # Let the user override the test.
1850 else
1851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1852   ac_dummy="$PATH"
1853   for ac_dir in $ac_dummy; do
1854     test -z "$ac_dir" && ac_dir=.
1855     if test -f $ac_dir/$ac_word; then
1856       ac_cv_prog_CC="cl"
1857       break
1858     fi
1859   done
1860   IFS="$ac_save_ifs"
1861 fi
1862 CC="$ac_cv_prog_CC"
1863 if test -n "$CC"; then
1864   echo "$ac_t""$CC" 1>&6
1865 else
1866   echo "$ac_t""no" 1>&6
1867 fi
1868  ;;
1869     esac
1870   fi
1871   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1872 fi
1873
1874 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1875 echo "configure:1876: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1876
1877 ac_ext=c
1878 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1879 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1880 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1881 ac_cpp='$CPP '"$xe_cppflags"
1882 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1883 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1884 cross_compiling=no
1885
1886 cat > conftest.$ac_ext << EOF
1887
1888 #line 1889 "configure"
1889 #include "confdefs.h"
1890
1891 main(){return(0);}
1892 EOF
1893 if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1894   ac_cv_prog_cc_works=yes
1895   # If we can't run a trivial program, we are probably using a cross compiler.
1896   if (./conftest; exit) 2>/dev/null; then
1897     ac_cv_prog_cc_cross=no
1898   else
1899     ac_cv_prog_cc_cross=yes
1900   fi
1901 else
1902   echo "configure: failed program was:" >&5
1903   cat conftest.$ac_ext >&5
1904   ac_cv_prog_cc_works=no
1905 fi
1906 rm -fr conftest*
1907 ac_ext=c
1908 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1909 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1910 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1911 ac_cpp='$CPP '"$xe_cppflags"
1912 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1913 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1914 cross_compiling=no
1915
1916 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1917 if test $ac_cv_prog_cc_works = no; then
1918   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1919 fi
1920 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1921 echo "configure:1922: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1922 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1923 cross_compiling=$ac_cv_prog_cc_cross
1924
1925 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1926 echo "configure:1927: checking whether we are using GNU C" >&5
1927
1928 cat > conftest.c <<EOF
1929 #ifdef __GNUC__
1930   yes;
1931 #endif
1932 EOF
1933 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1934: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1934   ac_cv_prog_gcc=yes
1935 else
1936   ac_cv_prog_gcc=no
1937 fi
1938
1939 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1940
1941 if test $ac_cv_prog_gcc = yes; then
1942   GCC=yes
1943 else
1944   GCC=
1945 fi
1946
1947 ac_test_CFLAGS="${CFLAGS+set}"
1948 ac_save_CFLAGS="$CFLAGS"
1949 CFLAGS=
1950 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1951 echo "configure:1952: checking whether ${CC-cc} accepts -g" >&5
1952
1953 echo 'void f(){}' > conftest.c
1954 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1955   ac_cv_prog_cc_g=yes
1956 else
1957   ac_cv_prog_cc_g=no
1958 fi
1959 rm -f conftest*
1960
1961
1962 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1963 if test "$ac_test_CFLAGS" = set; then
1964   CFLAGS="$ac_save_CFLAGS"
1965 elif test $ac_cv_prog_cc_g = yes; then
1966   if test "$GCC" = yes; then
1967     CFLAGS="-g -O2"
1968   else
1969     CFLAGS="-g"
1970   fi
1971 else
1972   if test "$GCC" = yes; then
1973     CFLAGS="-O2"
1974   else
1975     CFLAGS=
1976   fi
1977 fi
1978
1979 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1980   CC=gcc
1981   # Extract the first word of "gcc", so it can be a program name with args.
1982 set dummy gcc; ac_word=$2
1983 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1984 echo "configure:1985: checking for $ac_word" >&5
1985
1986 if test -n "$CC"; then
1987   ac_cv_prog_CC="$CC" # Let the user override the test.
1988 else
1989   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1990   ac_dummy="$PATH"
1991   for ac_dir in $ac_dummy; do
1992     test -z "$ac_dir" && ac_dir=.
1993     if test -f $ac_dir/$ac_word; then
1994       ac_cv_prog_CC="gcc"
1995       break
1996     fi
1997   done
1998   IFS="$ac_save_ifs"
1999 fi
2000 CC="$ac_cv_prog_CC"
2001 if test -n "$CC"; then
2002   echo "$ac_t""$CC" 1>&6
2003 else
2004   echo "$ac_t""no" 1>&6
2005 fi
2006
2007 if test -z "$CC"; then
2008   # Extract the first word of "cc", so it can be a program name with args.
2009 set dummy cc; ac_word=$2
2010 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2011 echo "configure:2012: checking for $ac_word" >&5
2012
2013 if test -n "$CC"; then
2014   ac_cv_prog_CC="$CC" # Let the user override the test.
2015 else
2016   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2017   ac_prog_rejected=no
2018   ac_dummy="$PATH"
2019   for ac_dir in $ac_dummy; do
2020     test -z "$ac_dir" && ac_dir=.
2021     if test -f $ac_dir/$ac_word; then
2022       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2023         ac_prog_rejected=yes
2024         continue
2025       fi
2026       ac_cv_prog_CC="cc"
2027       break
2028     fi
2029   done
2030   IFS="$ac_save_ifs"
2031 if test $ac_prog_rejected = yes; then
2032   # We found a bogon in the path, so make sure we never use it.
2033   set dummy $ac_cv_prog_CC
2034   shift
2035   if test $# -gt 0; then
2036     # We chose a different compiler from the bogus one.
2037     # However, it has the same basename, so the bogon will be chosen
2038     # first if we set CC to just the basename; use the full file name.
2039     shift
2040     set dummy "$ac_dir/$ac_word" "$@"
2041     shift
2042     ac_cv_prog_CC="$@"
2043   fi
2044 fi
2045 fi
2046 CC="$ac_cv_prog_CC"
2047 if test -n "$CC"; then
2048   echo "$ac_t""$CC" 1>&6
2049 else
2050   echo "$ac_t""no" 1>&6
2051 fi
2052
2053   if test -z "$CC"; then
2054     case "`uname -s`" in
2055     *win32* | *WIN32*)
2056       # Extract the first word of "cl", so it can be a program name with args.
2057 set dummy cl; ac_word=$2
2058 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2059 echo "configure:2060: checking for $ac_word" >&5
2060
2061 if test -n "$CC"; then
2062   ac_cv_prog_CC="$CC" # Let the user override the test.
2063 else
2064   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2065   ac_dummy="$PATH"
2066   for ac_dir in $ac_dummy; do
2067     test -z "$ac_dir" && ac_dir=.
2068     if test -f $ac_dir/$ac_word; then
2069       ac_cv_prog_CC="cl"
2070       break
2071     fi
2072   done
2073   IFS="$ac_save_ifs"
2074 fi
2075 CC="$ac_cv_prog_CC"
2076 if test -n "$CC"; then
2077   echo "$ac_t""$CC" 1>&6
2078 else
2079   echo "$ac_t""no" 1>&6
2080 fi
2081  ;;
2082     esac
2083   fi
2084   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2085 fi
2086
2087 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2088 echo "configure:2089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2089
2090 ac_ext=c
2091 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2092 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2093 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2094 ac_cpp='$CPP '"$xe_cppflags"
2095 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2096 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2097 cross_compiling=no
2098
2099 cat > conftest.$ac_ext << EOF
2100
2101 #line 2102 "configure"
2102 #include "confdefs.h"
2103
2104 main(){return(0);}
2105 EOF
2106 if { (eval echo configure:2107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2107   ac_cv_prog_cc_works=yes
2108   # If we can't run a trivial program, we are probably using a cross compiler.
2109   if (./conftest; exit) 2>/dev/null; then
2110     ac_cv_prog_cc_cross=no
2111   else
2112     ac_cv_prog_cc_cross=yes
2113   fi
2114 else
2115   echo "configure: failed program was:" >&5
2116   cat conftest.$ac_ext >&5
2117   ac_cv_prog_cc_works=no
2118 fi
2119 rm -fr conftest*
2120 ac_ext=c
2121 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2122 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2123 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2124 ac_cpp='$CPP '"$xe_cppflags"
2125 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2126 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2127 cross_compiling=no
2128
2129 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2130 if test $ac_cv_prog_cc_works = no; then
2131   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2132 fi
2133 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2134 echo "configure:2135: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2135 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2136 cross_compiling=$ac_cv_prog_cc_cross
2137
2138 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2139 echo "configure:2140: checking whether we are using GNU C" >&5
2140
2141 cat > conftest.c <<EOF
2142 #ifdef __GNUC__
2143   yes;
2144 #endif
2145 EOF
2146 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2147   ac_cv_prog_gcc=yes
2148 else
2149   ac_cv_prog_gcc=no
2150 fi
2151
2152 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2153
2154 if test $ac_cv_prog_gcc = yes; then
2155   GCC=yes
2156 else
2157   GCC=
2158 fi
2159
2160 ac_test_CFLAGS="${CFLAGS+set}"
2161 ac_save_CFLAGS="$CFLAGS"
2162 CFLAGS=
2163 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2164 echo "configure:2165: checking whether ${CC-cc} accepts -g" >&5
2165
2166 echo 'void f(){}' > conftest.c
2167 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2168   ac_cv_prog_cc_g=yes
2169 else
2170   ac_cv_prog_cc_g=no
2171 fi
2172 rm -f conftest*
2173
2174
2175 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2176 if test "$ac_test_CFLAGS" = set; then
2177   CFLAGS="$ac_save_CFLAGS"
2178 elif test $ac_cv_prog_cc_g = yes; then
2179   if test "$GCC" = yes; then
2180     CFLAGS="-g -O2"
2181   else
2182     CFLAGS="-g"
2183   fi
2184 else
2185   if test "$GCC" = yes; then
2186     CFLAGS="-O2"
2187   else
2188     CFLAGS=
2189   fi
2190 fi
2191
2192 fi
2193 CFLAGS="$xe_save_CFLAGS"
2194
2195
2196 test -n "$CPP" -a -d "$CPP" && CPP=
2197
2198 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2199
2200 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2201 echo "configure:2202: checking how to run the C preprocessor" >&5
2202 # On Suns, sometimes $CPP names a directory.
2203 if test -n "$CPP" && test -d "$CPP"; then
2204   CPP=
2205 fi
2206 if test -z "$CPP"; then
2207
2208   # This must be in double quotes, not single quotes, because CPP may get
2209   # substituted into the Makefile and "${CC-cc}" will confuse make.
2210   CPP="${CC-cc} -E"
2211   # On the NeXT, cc -E runs the code through the compiler's parser,
2212   # not just through cpp.
2213   cat > conftest.$ac_ext <<EOF
2214 #line 2215 "configure"
2215 #include "confdefs.h"
2216 #include <assert.h>
2217 Syntax Error
2218 EOF
2219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2220 { (eval echo configure:2221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2222 if test -z "$ac_err"; then
2223   :
2224 else
2225   echo "$ac_err" >&5
2226   echo "configure: failed program was:" >&5
2227   cat conftest.$ac_ext >&5
2228   rm -rf conftest*
2229   CPP="${CC-cc} -E -traditional-cpp"
2230   cat > conftest.$ac_ext <<EOF
2231 #line 2232 "configure"
2232 #include "confdefs.h"
2233 #include <assert.h>
2234 Syntax Error
2235 EOF
2236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2237 { (eval echo configure:2238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2239 if test -z "$ac_err"; then
2240   :
2241 else
2242   echo "$ac_err" >&5
2243   echo "configure: failed program was:" >&5
2244   cat conftest.$ac_ext >&5
2245   rm -rf conftest*
2246   CPP="${CC-cc} -nologo -E"
2247   cat > conftest.$ac_ext <<EOF
2248 #line 2249 "configure"
2249 #include "confdefs.h"
2250 #include <assert.h>
2251 Syntax Error
2252 EOF
2253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2254 { (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2256 if test -z "$ac_err"; then
2257   :
2258 else
2259   echo "$ac_err" >&5
2260   echo "configure: failed program was:" >&5
2261   cat conftest.$ac_ext >&5
2262   rm -rf conftest*
2263   CPP=/lib/cpp
2264 fi
2265 rm -f conftest*
2266 fi
2267 rm -f conftest*
2268 fi
2269 rm -f conftest*
2270   ac_cv_prog_CPP="$CPP"
2271   CPP="$ac_cv_prog_CPP"
2272 else
2273   ac_cv_prog_CPP="$CPP"
2274 fi
2275 echo "$ac_t""$CPP" 1>&6
2276
2277
2278 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2279 echo "configure:2280: checking for AIX" >&5
2280 cat > conftest.$ac_ext <<EOF
2281 #line 2282 "configure"
2282 #include "confdefs.h"
2283 #ifdef _AIX
2284   yes
2285 #endif
2286
2287 EOF
2288 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2289   egrep "yes" >/dev/null 2>&1; then
2290   rm -rf conftest*
2291   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2292     Defining _ALL_SOURCE
2293 EOF
2294 cat >> confdefs.h <<\EOF
2295 #define _ALL_SOURCE 1
2296 EOF
2297 }
2298
2299 else
2300   rm -rf conftest*
2301   echo "$ac_t""no" 1>&6
2302 fi
2303 rm -f conftest*
2304
2305
2306
2307 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2308 echo "configure:2309: checking for GNU libc" >&5
2309 cat > conftest.$ac_ext <<EOF
2310 #line 2311 "configure"
2311 #include "confdefs.h"
2312 #include <features.h>
2313 int main() {
2314
2315 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2316 #error Not a GNU libc system :-(
2317 ******* ======= ******** &&&&&&&&
2318 #endif
2319
2320 ; return 0; }
2321 EOF
2322 if { (eval echo configure:2323: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2323   rm -rf conftest*
2324   have_glibc=yes
2325 else
2326   echo "configure: failed program was:" >&5
2327   cat conftest.$ac_ext >&5
2328   rm -rf conftest*
2329   have_glibc=no
2330 fi
2331 rm -f conftest*
2332 echo "$ac_t""$have_glibc" 1>&6
2333 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2334     Defining _GNU_SOURCE
2335 EOF
2336 cat >> confdefs.h <<\EOF
2337 #define _GNU_SOURCE 1
2338 EOF
2339 }
2340
2341
2342
2343 cat > conftest.$ac_ext <<EOF
2344 #line 2345 "configure"
2345 #include "confdefs.h"
2346 int main () {
2347 #if defined __SUNPRO_C
2348 return 11;
2349 #elif defined __DECC
2350 return 12;
2351 #else
2352 return 0;
2353 #endif
2354 }
2355 EOF
2356 if { (eval echo configure:2357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2357 then
2358   :
2359 else
2360   conftest_rc="$?"
2361   echo "configure: failed program was:" >&5
2362   cat conftest.$ac_ext >&5
2363   rm -fr conftest*
2364   case "$conftest_rc" in
2365   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2366   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2367 esac
2368 fi
2369 rm -fr conftest*
2370
2371
2372
2373
2374 echo "Extracting information from the machine- and system-dependent headers..."
2375
2376 tempcname="conftest.c"
2377
2378
2379
2380 cat > $tempcname <<EOF
2381 #define NOT_C_CODE
2382 #define C_SWITCH_SITE
2383 #define C_SWITCH_X_SITE
2384 #define LD_SWITCH_SITE
2385 #define LD_SWITCH_X_SITE
2386 #define LD_SWITCH_X_SITE_AUX
2387 #define OS_RELEASE $os_release
2388 #include "$srcdir/src/$opsysfile"
2389 #include "$srcdir/src/$machfile"
2390
2391 #ifndef LIBS_MACHINE
2392 #define LIBS_MACHINE
2393 #endif
2394 configure___ libs_machine=LIBS_MACHINE
2395
2396 #ifndef LIBS_SYSTEM
2397 #define LIBS_SYSTEM
2398 #endif
2399 configure___ libs_system=LIBS_SYSTEM
2400
2401 #ifndef LIBS_TERMCAP
2402 #define LIBS_TERMCAP
2403 #endif
2404 configure___ libs_termcap=LIBS_TERMCAP
2405
2406 #ifndef LIB_STANDARD
2407 #define LIB_STANDARD
2408 #endif
2409 configure___ libs_standard=LIB_STANDARD
2410
2411
2412 #ifndef OBJECTS_MACHINE
2413 #define OBJECTS_MACHINE
2414 #endif
2415 configure___ objects_machine=OBJECTS_MACHINE
2416
2417 #ifndef OBJECTS_SYSTEM
2418 #define OBJECTS_SYSTEM
2419 #endif
2420 configure___ objects_system=OBJECTS_SYSTEM
2421
2422
2423 #ifndef C_SWITCH_MACHINE
2424 #define C_SWITCH_MACHINE
2425 #endif
2426 configure___ c_switch_machine=C_SWITCH_MACHINE
2427
2428 #ifndef C_SWITCH_SYSTEM
2429 #define C_SWITCH_SYSTEM
2430 #endif
2431 configure___ c_switch_system=C_SWITCH_SYSTEM
2432
2433
2434 #ifndef LD_SWITCH_MACHINE
2435 #define LD_SWITCH_MACHINE
2436 #endif
2437 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2438
2439 #ifndef LD_SWITCH_SYSTEM
2440 #define LD_SWITCH_SYSTEM
2441 #endif
2442 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2443
2444
2445 #ifndef UNEXEC
2446 #define UNEXEC "unexec.o"
2447 #endif
2448 configure___ unexec=UNEXEC
2449
2450
2451 #ifndef LD_SWITCH_SHARED
2452 #define LD_SWITCH_SHARED "-c"
2453 #endif
2454 configure___ ld_switch_shared=LD_SWITCH_SHARED
2455
2456
2457 #ifdef ORDINARY_LINK
2458 #define LD "\$(CC) \$(CFLAGS)"
2459 #else /* no ORDINARY LINK */
2460 #ifdef COFF_ENCAPSULATE
2461 #define LD "\$(CC) -nostdlib"
2462 #else /* not COFF_ENCAPSULATE */
2463 #ifdef LINKER
2464 #define LD LINKER
2465 #else /* ! defined (LINKER) */
2466 #define LD "ld"
2467 #endif /* ! defined (LINKER) */
2468 #endif /* ! defined (COFF_ENCAPSULATE) */
2469 #endif /* not ORDINARY_LINK */
2470 configure___ ld=LD
2471
2472 #ifndef LIB_GCC
2473 #define LIB_GCC
2474 #endif
2475 configure___ lib_gcc=LIB_GCC
2476
2477 #ifndef LD_TEXT_START_ADDR
2478 #define LD_TEXT_START_ADDR
2479 #endif
2480 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2481
2482
2483 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2484 #ifdef NO_REMAP
2485 #ifdef COFF_ENCAPSULATE
2486 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2487 #else /* ! defined (COFF_ENCAPSULATE) */
2488 #define START_FILES "pre-crt0.o /lib/crt0.o"
2489 #endif /* ! defined (COFF_ENCAPSULATE) */
2490 #else /* ! defined (NO_REMAP) */
2491 #define START_FILES "ecrt0.o"
2492 #endif /* ! defined (NO_REMAP) */
2493 #endif /* no ORDINARY_LINK */
2494 #ifndef START_FILES
2495 #define START_FILES
2496 #endif
2497 configure___ start_files=START_FILES
2498
2499 #ifdef ORDINARY_LINK
2500 configure___ ordinary_link=yes
2501 #else
2502 configure___ ordinary_link=no
2503 #endif
2504
2505 #ifdef SYSTEM_MALLOC
2506 configure___ system_malloc=yes
2507 #else
2508 configure___ system_malloc=no
2509 #endif
2510
2511 #ifdef TERMINFO
2512 configure___ have_terminfo=yes
2513 #else
2514 configure___ have_terminfo=no
2515 #endif
2516
2517 #ifdef MAIL_USE_FLOCK
2518 configure___ mail_use_flock=yes
2519 #else
2520 configure___ mail_use_flock=no
2521 #endif
2522
2523 #ifdef MAIL_USE_LOCKF
2524 configure___ mail_use_lockf=yes
2525 #else
2526 configure___ mail_use_lockf=no
2527 #endif
2528
2529 #ifdef HAVE_WIN32_PROCESSES
2530 configure___ win32_processes=yes
2531 #else
2532 configure___ win32_processes=no
2533 #endif
2534
2535 EOF
2536
2537 CPP=`eval "echo $CPP $CPPFLAGS"`
2538 eval `$CPP -Isrc $tempcname \
2539         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2540
2541 rm $tempcname
2542
2543 test "$extra_verbose" = "yes" && \
2544   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 ""
2545
2546 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2547
2548 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2549
2550 if test "$cflags_specified" = "no"; then
2551       if   test "$GCC" = "yes"; then
2552     CFLAGS="-g -O3 -Wall -Wno-switch"
2553               elif test "$__SUNPRO_C" = "yes"; then
2554     case "$opsys" in
2555       sol2    ) CFLAGS="-v -xO4" ;;
2556       sunos4* ) CFLAGS="-xO2";;
2557     esac
2558   elif test "$__DECC" = "yes"; then
2559     CFLAGS="-O3"
2560   elif test "$CC" = "xlc"; then
2561     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2562     else
2563     CFLAGS="-O" ;  fi
2564 fi
2565
2566
2567 if test "$GCC" = "yes"; then
2568   set x $ld_switch_system; shift; ld_switch_system=""
2569   while test -n "$1"; do
2570     case $1 in
2571       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2572       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2573       -Xlinker* ) ;;
2574       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2575     esac
2576     shift
2577   done
2578 fi
2579
2580 if test "$GCC" = "yes"; then
2581   set x $ld_switch_machine; shift; ld_switch_machine=""
2582   while test -n "$1"; do
2583     case $1 in
2584       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2585       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2586       -Xlinker* ) ;;
2587       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2588     esac
2589     shift
2590   done
2591 fi
2592
2593 if test "$GCC" = "yes"; then
2594   set x $LDFLAGS; shift; LDFLAGS=""
2595   while test -n "$1"; do
2596     case $1 in
2597       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2598       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2599       -Xlinker* ) ;;
2600       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2601     esac
2602     shift
2603   done
2604 fi
2605
2606 if test "$GCC" = "yes"; then
2607   set x $ld_call_shared; shift; ld_call_shared=""
2608   while test -n "$1"; do
2609     case $1 in
2610       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2611       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2612       -Xlinker* ) ;;
2613       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2614     esac
2615     shift
2616   done
2617 fi
2618
2619 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2620    echo "    xemacs will be linked with \"$objects_machine\""
2621  fi
2622 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2623    echo "    xemacs will be linked with \"$objects_system\""
2624  fi
2625 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2626    echo "    xemacs will be linked with \"$unexec\""
2627  fi
2628
2629 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2630 echo "configure:2631: checking for dynodump" >&5
2631 if test "$unexec" != "unexsol2.o"; then
2632   echo "$ac_t""no" 1>&6
2633 else
2634   echo "$ac_t""yes" 1>&6
2635   { test "$extra_verbose" = "yes" && cat << \EOF
2636     Defining DYNODUMP
2637 EOF
2638 cat >> confdefs.h <<\EOF
2639 #define DYNODUMP 1
2640 EOF
2641 }
2642
2643   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2644   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2645   case "$machine" in
2646     sparc   ) dynodump_arch=sparc ;;
2647     *86*    ) dynodump_arch=i386  ;;
2648     powerpc ) dynodump_arch=ppc   ;;
2649   esac
2650     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
2651 fi
2652
2653
2654 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2655
2656 if test "$unexec" = "unexaix.o"; then
2657   if   test "$dynamic" = "no"; then
2658   start_flags="-Wl,-bnso,-bnodelcsect"
2659   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2660   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2661     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2662   done
2663   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2664     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2665   done
2666   
2667 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2668 echo "configure:2669: checking for terminateAndUnload in -lC" >&5
2669 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2670
2671 xe_check_libs=" -lC "
2672 cat > conftest.$ac_ext <<EOF
2673 #line 2674 "configure"
2674 #include "confdefs.h"
2675 /* Override any gcc2 internal prototype to avoid an error.  */
2676 /* We use char because int might match the return type of a gcc2
2677     builtin and then its argument prototype would still apply.  */
2678 char terminateAndUnload();
2679
2680 int main() {
2681 terminateAndUnload()
2682 ; return 0; }
2683 EOF
2684 if { (eval echo configure:2685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2685   rm -rf conftest*
2686   eval "ac_cv_lib_$ac_lib_var=yes"
2687 else
2688   echo "configure: failed program was:" >&5
2689   cat conftest.$ac_ext >&5
2690   rm -rf conftest*
2691   eval "ac_cv_lib_$ac_lib_var=no"
2692 fi
2693 rm -f conftest*
2694 xe_check_libs=""
2695
2696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2697   echo "$ac_t""yes" 1>&6
2698   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2699 else
2700   echo "$ac_t""no" 1>&6
2701 fi
2702
2703
2704   fi
2705 elif test -n "$ld_text_start_addr"; then
2706   start_flags="-T $ld_text_start_addr -e __start"
2707 fi
2708
2709
2710
2711
2712 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2713  test -z "$linker" &&  linker='$(CC) -nostdlib'
2714  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2715 fi
2716 test "$GCC" != "yes" && lib_gcc=
2717
2718
2719
2720
2721
2722 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2723 if test -n "$site_libraries"; then
2724   for arg in $site_libraries; do
2725     case "$arg" in
2726      -* ) ;;
2727      * ) test -d "$arg" || \
2728            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2729        arg="-L${arg}" ;;
2730     esac
2731     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2732   done
2733 fi
2734
2735 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2736 if test -n "$site_includes"; then
2737   for arg in $site_includes; do
2738     case "$arg" in
2739       -* ) ;;
2740       * ) test -d "$arg" || \
2741            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2742       arg="-I${arg}" ;;
2743     esac
2744     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2745   done
2746 fi
2747
2748 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2749 if test -n "$site_prefixes"; then
2750   for dir in $site_prefixes; do
2751     lib_dir="${dir}/lib"
2752     inc_dir="${dir}/include"
2753     if test ! -d "$dir"; then
2754       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2755     elif test ! -d "$lib_dir"; then
2756       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2757     else
2758       if test -d "$inc_dir"; then
2759         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
2760       fi
2761       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
2762     fi
2763   done
2764 fi
2765
2766
2767 for dir in "/usr/ccs/lib"; do
2768   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
2769 done
2770
2771 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2772 if test -n "$site_runtime_libraries"; then
2773   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2774   export LD_RUN_PATH
2775 fi
2776
2777
2778 if   test "$dynamic" = "no"; then add_runtime_path=no
2779 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2780 else case "$opsys" in
2781        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2782        * ) add_runtime_path=no ;;
2783      esac
2784 fi
2785
2786 if test "$add_runtime_path" = "yes"; then
2787       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2788 echo "configure:2789: checking "for runtime libraries flag"" >&5
2789   case "$opsys" in
2790     sol2 ) dash_r="-R" ;;
2791     decosf* | linux* | irix*) dash_r="-rpath " ;;
2792     *)
2793       dash_r=""
2794       for try_dash_r in "-R" "-R " "-rpath "; do
2795         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2796         
2797 if test "$GCC" = "yes"; then
2798   set x $xe_check_libs; shift; xe_check_libs=""
2799   while test -n "$1"; do
2800     case $1 in
2801       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2802       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2803       -Xlinker* ) ;;
2804       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2805     esac
2806     shift
2807   done
2808 fi
2809         cat > conftest.$ac_ext <<EOF
2810 #line 2811 "configure"
2811 #include "confdefs.h"
2812
2813 int main() {
2814
2815 ; return 0; }
2816 EOF
2817 if { (eval echo configure:2818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2818   rm -rf conftest*
2819   dash_r="$try_dash_r"
2820 else
2821   echo "configure: failed program was:" >&5
2822   cat conftest.$ac_ext >&5
2823 fi
2824 rm -f conftest*
2825         xe_check_libs=""
2826         test -n "$dash_r" && break
2827       done ;;
2828   esac
2829   if test -n "$dash_r";
2830     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2831     else echo "$ac_t""NONE" 1>&6
2832   fi
2833 fi
2834
2835 xe_add_unique_runpath_dir='
2836   xe_add_p=yes
2837   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2838   done
2839   if test "$xe_add_p" = "yes"; then
2840     test -n "$runpath" && runpath="${runpath}:"
2841     runpath="${runpath}${xe_runpath_dir}"
2842     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2843   fi'
2844
2845
2846
2847
2848 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2849     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2850   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2851   
2852         runpath="" runpath_dirs=""
2853   if test -n "$LD_RUN_PATH"; then
2854     runpath="$LD_RUN_PATH"
2855   elif test "$GCC" = "yes"; then
2856         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2857     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2858     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2859     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2860       case "$arg" in P,* | -L* | -R* )
2861         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2862           {
2863 xe_runpath_dir="$dir"
2864   test "$xe_runpath_dir" != "/lib"     -a \
2865         "$xe_runpath_dir" != "/usr/lib" -a \
2866         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2867   eval "$xe_add_unique_runpath_dir"
2868 }
2869         done ;;
2870       esac
2871     done
2872     ld_switch_run="$ld_switch_run_save"
2873     rm -f conftest*
2874   else
2875         for arg in $ld_switch_site $ld_switch_x_site; do
2876       case "$arg" in -L*) {
2877 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
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 };; esac
2883     done
2884         if test "$opsys $need_motif" = "sol2 yes"; then
2885       xe_runpath_dir="/opt/SUNWdt/lib";
2886       eval "$xe_add_unique_runpath_dir";
2887     fi
2888   fi 
2889   if test -n "$runpath"; then
2890     ld_switch_run="${dash_r}${runpath}"
2891     
2892 if test "$GCC" = "yes"; then
2893   set x $ld_switch_run; shift; ld_switch_run=""
2894   while test -n "$1"; do
2895     case $1 in
2896       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2897       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2898       -Xlinker* ) ;;
2899       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2900     esac
2901     shift
2902   done
2903 fi
2904     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2905   fi
2906 fi
2907
2908
2909
2910
2911 GNU_MALLOC=yes
2912 if test "$with_dlmalloc" != "no"; then
2913         doug_lea_malloc=yes
2914 else
2915         doug_lea_malloc=no
2916 fi
2917 after_morecore_hook_exists=yes
2918 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2919 echo "configure:2920: checking for malloc_get_state" >&5
2920
2921 cat > conftest.$ac_ext <<EOF
2922 #line 2923 "configure"
2923 #include "confdefs.h"
2924 /* System header to define __stub macros and hopefully few prototypes,
2925     which can conflict with char malloc_get_state(); below.  */
2926 #include <assert.h>
2927 /* Override any gcc2 internal prototype to avoid an error.  */
2928 /* We use char because int might match the return type of a gcc2
2929     builtin and then its argument prototype would still apply.  */
2930 char malloc_get_state();
2931
2932 int main() {
2933
2934 /* The GNU C library defines this for functions which it implements
2935     to always fail with ENOSYS.  Some functions are actually named
2936     something starting with __ and the normal name is an alias.  */
2937 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2938 choke me
2939 #else
2940 malloc_get_state();
2941 #endif
2942
2943 ; return 0; }
2944 EOF
2945 if { (eval echo configure:2946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2946   rm -rf conftest*
2947   eval "ac_cv_func_malloc_get_state=yes"
2948 else
2949   echo "configure: failed program was:" >&5
2950   cat conftest.$ac_ext >&5
2951   rm -rf conftest*
2952   eval "ac_cv_func_malloc_get_state=no"
2953 fi
2954 rm -f conftest*
2955
2956 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2957   echo "$ac_t""yes" 1>&6
2958   :
2959 else
2960   echo "$ac_t""no" 1>&6
2961 doug_lea_malloc=no
2962 fi
2963
2964 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2965 echo "configure:2966: checking for malloc_set_state" >&5
2966
2967 cat > conftest.$ac_ext <<EOF
2968 #line 2969 "configure"
2969 #include "confdefs.h"
2970 /* System header to define __stub macros and hopefully few prototypes,
2971     which can conflict with char malloc_set_state(); below.  */
2972 #include <assert.h>
2973 /* Override any gcc2 internal prototype to avoid an error.  */
2974 /* We use char because int might match the return type of a gcc2
2975     builtin and then its argument prototype would still apply.  */
2976 char malloc_set_state();
2977
2978 int main() {
2979
2980 /* The GNU C library defines this for functions which it implements
2981     to always fail with ENOSYS.  Some functions are actually named
2982     something starting with __ and the normal name is an alias.  */
2983 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2984 choke me
2985 #else
2986 malloc_set_state();
2987 #endif
2988
2989 ; return 0; }
2990 EOF
2991 if { (eval echo configure:2992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2992   rm -rf conftest*
2993   eval "ac_cv_func_malloc_set_state=yes"
2994 else
2995   echo "configure: failed program was:" >&5
2996   cat conftest.$ac_ext >&5
2997   rm -rf conftest*
2998   eval "ac_cv_func_malloc_set_state=no"
2999 fi
3000 rm -f conftest*
3001
3002 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3003   echo "$ac_t""yes" 1>&6
3004   :
3005 else
3006   echo "$ac_t""no" 1>&6
3007 doug_lea_malloc=no
3008 fi
3009
3010 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3011 echo "configure:3012: checking whether __after_morecore_hook exists" >&5
3012 cat > conftest.$ac_ext <<EOF
3013 #line 3014 "configure"
3014 #include "confdefs.h"
3015 extern void (* __after_morecore_hook)();
3016 int main() {
3017 __after_morecore_hook = 0
3018 ; return 0; }
3019 EOF
3020 if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3021   rm -rf conftest*
3022   echo "$ac_t""yes" 1>&6
3023 else
3024   echo "configure: failed program was:" >&5
3025   cat conftest.$ac_ext >&5
3026   rm -rf conftest*
3027   echo "$ac_t""no" 1>&6
3028    after_morecore_hook_exists=no
3029 fi
3030 rm -f conftest*
3031 if test "$system_malloc" = "yes" ; then
3032   GNU_MALLOC=no
3033   GNU_MALLOC_reason="
3034   (The GNU allocators don't work with this system configuration)."
3035 elif test "$with_system_malloc" = "yes" ; then
3036   GNU_MALLOC=no
3037   GNU_MALLOC_reason="
3038   (User chose not to use GNU allocators)."
3039 elif test "$with_debug_malloc" = "yes" ; then
3040   GNU_MALLOC=no
3041   GNU_MALLOC_reason="
3042   (User chose to use Debugging Malloc)."
3043 fi
3044
3045 if test "$doug_lea_malloc" = "yes" ; then
3046   if test "$GNU_MALLOC" = yes ; then
3047     GNU_MALLOC_reason="
3048   (Using Doug Lea's new malloc from the GNU C Library.)"
3049   fi
3050   { test "$extra_verbose" = "yes" && cat << \EOF
3051     Defining DOUG_LEA_MALLOC
3052 EOF
3053 cat >> confdefs.h <<\EOF
3054 #define DOUG_LEA_MALLOC 1
3055 EOF
3056 }
3057
3058   if test "$after_morecore_hook_exists" = "no" ; then
3059     GNU_MALLOC_reason="
3060   (Using Doug Lea's new malloc from the Linux C Library.)"
3061     { test "$extra_verbose" = "yes" && cat << \EOF
3062     Defining _NO_MALLOC_WARNING_
3063 EOF
3064 cat >> confdefs.h <<\EOF
3065 #define _NO_MALLOC_WARNING_ 1
3066 EOF
3067 }
3068
3069   fi
3070   use_minimal_tagbits=yes
3071 fi
3072
3073
3074
3075
3076 # Extract the first word of "ranlib", so it can be a program name with args.
3077 set dummy ranlib; ac_word=$2
3078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3079 echo "configure:3080: checking for $ac_word" >&5
3080
3081 if test -n "$RANLIB"; then
3082   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3083 else
3084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3085   ac_dummy="$PATH"
3086   for ac_dir in $ac_dummy; do
3087     test -z "$ac_dir" && ac_dir=.
3088     if test -f $ac_dir/$ac_word; then
3089       ac_cv_prog_RANLIB="ranlib"
3090       break
3091     fi
3092   done
3093   IFS="$ac_save_ifs"
3094   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3095 fi
3096 RANLIB="$ac_cv_prog_RANLIB"
3097 if test -n "$RANLIB"; then
3098   echo "$ac_t""$RANLIB" 1>&6
3099 else
3100   echo "$ac_t""no" 1>&6
3101 fi
3102
3103 ac_aux_dir=
3104 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3105   if test -f $ac_dir/install-sh; then
3106     ac_aux_dir=$ac_dir
3107     ac_install_sh="$ac_aux_dir/install-sh -c"
3108     break
3109   elif test -f $ac_dir/install.sh; then
3110     ac_aux_dir=$ac_dir
3111     ac_install_sh="$ac_aux_dir/install.sh -c"
3112     break
3113   fi
3114 done
3115 if test -z "$ac_aux_dir"; then
3116   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3117 fi
3118 ac_config_guess=$ac_aux_dir/config.guess
3119 ac_config_sub=$ac_aux_dir/config.sub
3120 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3121
3122 # Find a good install program.  We prefer a C program (faster),
3123 # so one script is as good as another.  But avoid the broken or
3124 # incompatible versions:
3125 # SysV /etc/install, /usr/sbin/install
3126 # SunOS /usr/etc/install
3127 # IRIX /sbin/install
3128 # AIX /bin/install
3129 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3130 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3131 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3132 # ./install, which can be erroneously created by make from ./install.sh.
3133 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3134 echo "configure:3135: checking for a BSD compatible install" >&5
3135 if test -z "$INSTALL"; then
3136
3137   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3138   for ac_dir in $PATH; do
3139     # Account for people who put trailing slashes in PATH elements.
3140     case "$ac_dir/" in
3141     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3142     *)
3143       # OSF1 and SCO ODT 3.0 have their own names for install.
3144       # Don't use installbsd from OSF since it installs stuff as root
3145       # by default.
3146       for ac_prog in ginstall scoinst install; do
3147         if test -f $ac_dir/$ac_prog; then
3148           if test $ac_prog = install &&
3149             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3150             # AIX install.  It has an incompatible calling convention.
3151             :
3152           else
3153             ac_cv_path_install="$ac_dir/$ac_prog -c"
3154             break 2
3155           fi
3156         fi
3157       done
3158       ;;
3159     esac
3160   done
3161   IFS="$ac_save_IFS"
3162
3163   if test "${ac_cv_path_install+set}" = set; then
3164     INSTALL="$ac_cv_path_install"
3165   else
3166     # As a last resort, use the slow shell script.  We don't cache a
3167     # path for INSTALL within a source directory, because that will
3168     # break other packages using the cache if that directory is
3169     # removed, or if the path is relative.
3170     INSTALL="$ac_install_sh"
3171   fi
3172 fi
3173 echo "$ac_t""$INSTALL" 1>&6
3174
3175 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3176 # It thinks the first close brace ends the variable substitution.
3177 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3178
3179 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3180
3181 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3182
3183 for ac_prog in 'bison -y' byacc
3184 do
3185 # Extract the first word of "$ac_prog", so it can be a program name with args.
3186 set dummy $ac_prog; ac_word=$2
3187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3188 echo "configure:3189: checking for $ac_word" >&5
3189
3190 if test -n "$YACC"; then
3191   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3192 else
3193   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3194   ac_dummy="$PATH"
3195   for ac_dir in $ac_dummy; do
3196     test -z "$ac_dir" && ac_dir=.
3197     if test -f $ac_dir/$ac_word; then
3198       ac_cv_prog_YACC="$ac_prog"
3199       break
3200     fi
3201   done
3202   IFS="$ac_save_ifs"
3203 fi
3204 YACC="$ac_cv_prog_YACC"
3205 if test -n "$YACC"; then
3206   echo "$ac_t""$YACC" 1>&6
3207 else
3208   echo "$ac_t""no" 1>&6
3209 fi
3210
3211 test -n "$YACC" && break
3212 done
3213 test -n "$YACC" || YACC="yacc"
3214
3215
3216 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
3217 do
3218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3220 echo "configure:3221: checking for $ac_hdr" >&5
3221
3222 cat > conftest.$ac_ext <<EOF
3223 #line 3224 "configure"
3224 #include "confdefs.h"
3225 #include <$ac_hdr>
3226 EOF
3227 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3228 { (eval echo configure:3229: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3229 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3230 if test -z "$ac_err"; then
3231   rm -rf conftest*
3232   eval "ac_cv_header_$ac_safe=yes"
3233 else
3234   echo "$ac_err" >&5
3235   echo "configure: failed program was:" >&5
3236   cat conftest.$ac_ext >&5
3237   rm -rf conftest*
3238   eval "ac_cv_header_$ac_safe=no"
3239 fi
3240 rm -f conftest*
3241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3242   echo "$ac_t""yes" 1>&6
3243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3244   { test "$extra_verbose" = "yes" && cat << EOF
3245     Defining $ac_tr_hdr
3246 EOF
3247 cat >> confdefs.h <<EOF
3248 #define $ac_tr_hdr 1
3249 EOF
3250 }
3251  
3252 else
3253   echo "$ac_t""no" 1>&6
3254 fi
3255 done
3256
3257 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
3258 do
3259 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3260 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3261 echo "configure:3262: checking for $ac_hdr" >&5
3262
3263 cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3266 #include <$ac_hdr>
3267 EOF
3268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3269 { (eval echo configure:3270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3271 if test -z "$ac_err"; then
3272   rm -rf conftest*
3273   eval "ac_cv_header_$ac_safe=yes"
3274 else
3275   echo "$ac_err" >&5
3276   echo "configure: failed program was:" >&5
3277   cat conftest.$ac_ext >&5
3278   rm -rf conftest*
3279   eval "ac_cv_header_$ac_safe=no"
3280 fi
3281 rm -f conftest*
3282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3283   echo "$ac_t""yes" 1>&6
3284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3285   { test "$extra_verbose" = "yes" && cat << EOF
3286     Defining $ac_tr_hdr
3287 EOF
3288 cat >> confdefs.h <<EOF
3289 #define $ac_tr_hdr 1
3290 EOF
3291 }
3292  
3293 else
3294   echo "$ac_t""no" 1>&6
3295 fi
3296 done
3297
3298 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3299 do
3300 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3301 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3302 echo "configure:3303: checking for $ac_hdr" >&5
3303
3304 cat > conftest.$ac_ext <<EOF
3305 #line 3306 "configure"
3306 #include "confdefs.h"
3307 #include <$ac_hdr>
3308 EOF
3309 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3310 { (eval echo configure:3311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3311 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3312 if test -z "$ac_err"; then
3313   rm -rf conftest*
3314   eval "ac_cv_header_$ac_safe=yes"
3315 else
3316   echo "$ac_err" >&5
3317   echo "configure: failed program was:" >&5
3318   cat conftest.$ac_ext >&5
3319   rm -rf conftest*
3320   eval "ac_cv_header_$ac_safe=no"
3321 fi
3322 rm -f conftest*
3323 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3324   echo "$ac_t""yes" 1>&6
3325     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3326   { test "$extra_verbose" = "yes" && cat << EOF
3327     Defining $ac_tr_hdr
3328 EOF
3329 cat >> confdefs.h <<EOF
3330 #define $ac_tr_hdr 1
3331 EOF
3332 }
3333  
3334 else
3335   echo "$ac_t""no" 1>&6
3336 fi
3337 done
3338
3339 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3340 echo "configure:3341: checking for sys/wait.h that is POSIX.1 compatible" >&5
3341
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 #include <sys/types.h>
3346 #include <sys/wait.h>
3347 #ifndef WEXITSTATUS
3348 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3349 #endif
3350 #ifndef WIFEXITED
3351 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3352 #endif
3353 int main() {
3354 int s;
3355 wait (&s);
3356 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3357 ; return 0; }
3358 EOF
3359 if { (eval echo configure:3360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3360   rm -rf conftest*
3361   ac_cv_header_sys_wait_h=yes
3362 else
3363   echo "configure: failed program was:" >&5
3364   cat conftest.$ac_ext >&5
3365   rm -rf conftest*
3366   ac_cv_header_sys_wait_h=no
3367 fi
3368 rm -f conftest*
3369
3370 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3371 if test $ac_cv_header_sys_wait_h = yes; then
3372   { test "$extra_verbose" = "yes" && cat << \EOF
3373     Defining HAVE_SYS_WAIT_H
3374 EOF
3375 cat >> confdefs.h <<\EOF
3376 #define HAVE_SYS_WAIT_H 1
3377 EOF
3378 }
3379
3380 fi
3381
3382 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3383 echo "configure:3384: checking for ANSI C header files" >&5
3384
3385 cat > conftest.$ac_ext <<EOF
3386 #line 3387 "configure"
3387 #include "confdefs.h"
3388 #include <stdlib.h>
3389 #include <stdarg.h>
3390 #include <string.h>
3391 #include <float.h>
3392 EOF
3393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3394 { (eval echo configure:3395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3396 if test -z "$ac_err"; then
3397   rm -rf conftest*
3398   ac_cv_header_stdc=yes
3399 else
3400   echo "$ac_err" >&5
3401   echo "configure: failed program was:" >&5
3402   cat conftest.$ac_ext >&5
3403   rm -rf conftest*
3404   ac_cv_header_stdc=no
3405 fi
3406 rm -f conftest*
3407
3408 if test $ac_cv_header_stdc = yes; then
3409   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <string.h>
3414 EOF
3415 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3416   egrep "memchr" >/dev/null 2>&1; then
3417   :
3418 else
3419   rm -rf conftest*
3420   ac_cv_header_stdc=no
3421 fi
3422 rm -f conftest*
3423
3424 fi
3425
3426 if test $ac_cv_header_stdc = yes; then
3427   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3428 cat > conftest.$ac_ext <<EOF
3429 #line 3430 "configure"
3430 #include "confdefs.h"
3431 #include <stdlib.h>
3432 EOF
3433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3434   egrep "free" >/dev/null 2>&1; then
3435   :
3436 else
3437   rm -rf conftest*
3438   ac_cv_header_stdc=no
3439 fi
3440 rm -f conftest*
3441
3442 fi
3443
3444 if test $ac_cv_header_stdc = yes; then
3445   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3446 cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 #include <ctype.h>
3450 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3451 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3452 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3453 int main () { int i; for (i = 0; i < 256; i++)
3454 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3455 exit (0); }
3456
3457 EOF
3458 if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3459 then
3460   :
3461 else
3462   conftest_rc="$?"
3463   echo "configure: failed program was:" >&5
3464   cat conftest.$ac_ext >&5
3465   rm -fr conftest*
3466   ac_cv_header_stdc=no
3467 fi
3468 rm -fr conftest*
3469 fi
3470
3471 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3472 if test $ac_cv_header_stdc = yes; then
3473   { test "$extra_verbose" = "yes" && cat << \EOF
3474     Defining STDC_HEADERS
3475 EOF
3476 cat >> confdefs.h <<\EOF
3477 #define STDC_HEADERS 1
3478 EOF
3479 }
3480
3481 fi
3482
3483 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3484 echo "configure:3485: checking whether time.h and sys/time.h may both be included" >&5
3485
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 #include <sys/types.h>
3490 #include <sys/time.h>
3491 #include <time.h>
3492 int main() {
3493 struct tm *tp;
3494 ; return 0; }
3495 EOF
3496 if { (eval echo configure:3497: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3497   rm -rf conftest*
3498   ac_cv_header_time=yes
3499 else
3500   echo "configure: failed program was:" >&5
3501   cat conftest.$ac_ext >&5
3502   rm -rf conftest*
3503   ac_cv_header_time=no
3504 fi
3505 rm -f conftest*
3506
3507 echo "$ac_t""$ac_cv_header_time" 1>&6
3508 if test $ac_cv_header_time = yes; then
3509   { test "$extra_verbose" = "yes" && cat << \EOF
3510     Defining TIME_WITH_SYS_TIME
3511 EOF
3512 cat >> confdefs.h <<\EOF
3513 #define TIME_WITH_SYS_TIME 1
3514 EOF
3515 }
3516
3517 fi
3518
3519 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3520 echo "configure:3521: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3521
3522 cat > conftest.$ac_ext <<EOF
3523 #line 3524 "configure"
3524 #include "confdefs.h"
3525 #include <sys/types.h>
3526 #include <signal.h>
3527 /* NetBSD declares sys_siglist in unistd.h.  */
3528 #ifdef HAVE_UNISTD_H
3529 #include <unistd.h>
3530 #endif
3531 int main() {
3532 char *msg = *(sys_siglist + 1);
3533 ; return 0; }
3534 EOF
3535 if { (eval echo configure:3536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3536   rm -rf conftest*
3537   ac_cv_decl_sys_siglist=yes
3538 else
3539   echo "configure: failed program was:" >&5
3540   cat conftest.$ac_ext >&5
3541   rm -rf conftest*
3542   ac_cv_decl_sys_siglist=no
3543 fi
3544 rm -f conftest*
3545
3546 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3547 if test $ac_cv_decl_sys_siglist = yes; then
3548   { test "$extra_verbose" = "yes" && cat << \EOF
3549     Defining SYS_SIGLIST_DECLARED
3550 EOF
3551 cat >> confdefs.h <<\EOF
3552 #define SYS_SIGLIST_DECLARED 1
3553 EOF
3554 }
3555
3556 fi
3557
3558
3559 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3560 echo "configure:3561: checking for struct utimbuf" >&5
3561 cat > conftest.$ac_ext <<EOF
3562 #line 3563 "configure"
3563 #include "confdefs.h"
3564 #ifdef TIME_WITH_SYS_TIME
3565 #include <sys/time.h>
3566 #include <time.h>
3567 #else
3568 #ifdef HAVE_SYS_TIME_H
3569 #include <sys/time.h>
3570 #else
3571 #include <time.h>
3572 #endif
3573 #endif
3574 #ifdef HAVE_UTIME_H
3575 #include <utime.h>
3576 #endif
3577 int main() {
3578 static struct utimbuf x; x.actime = x.modtime;
3579 ; return 0; }
3580 EOF
3581 if { (eval echo configure:3582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3582   rm -rf conftest*
3583   echo "$ac_t""yes" 1>&6
3584    { test "$extra_verbose" = "yes" && cat << \EOF
3585     Defining HAVE_STRUCT_UTIMBUF
3586 EOF
3587 cat >> confdefs.h <<\EOF
3588 #define HAVE_STRUCT_UTIMBUF 1
3589 EOF
3590 }
3591
3592 else
3593   echo "configure: failed program was:" >&5
3594   cat conftest.$ac_ext >&5
3595   rm -rf conftest*
3596   echo "$ac_t""no" 1>&6
3597 fi
3598 rm -f conftest*
3599
3600 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3601 echo "configure:3602: checking return type of signal handlers" >&5
3602
3603 cat > conftest.$ac_ext <<EOF
3604 #line 3605 "configure"
3605 #include "confdefs.h"
3606 #include <sys/types.h>
3607 #include <signal.h>
3608 #ifdef signal
3609 #undef signal
3610 #endif
3611 #ifdef __cplusplus
3612 extern "C" void (*signal (int, void (*)(int)))(int);
3613 #else
3614 void (*signal ()) ();
3615 #endif
3616
3617 int main() {
3618 int i;
3619 ; return 0; }
3620 EOF
3621 if { (eval echo configure:3622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3622   rm -rf conftest*
3623   ac_cv_type_signal=void
3624 else
3625   echo "configure: failed program was:" >&5
3626   cat conftest.$ac_ext >&5
3627   rm -rf conftest*
3628   ac_cv_type_signal=int
3629 fi
3630 rm -f conftest*
3631
3632 echo "$ac_t""$ac_cv_type_signal" 1>&6
3633 { test "$extra_verbose" = "yes" && cat << EOF
3634     Defining RETSIGTYPE = $ac_cv_type_signal
3635 EOF
3636 cat >> confdefs.h <<EOF
3637 #define RETSIGTYPE $ac_cv_type_signal
3638 EOF
3639 }
3640
3641
3642 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3643 echo "configure:3644: checking for size_t" >&5
3644
3645 cat > conftest.$ac_ext <<EOF
3646 #line 3647 "configure"
3647 #include "confdefs.h"
3648 #include <sys/types.h>
3649 #if STDC_HEADERS
3650 #include <stdlib.h>
3651 #include <stddef.h>
3652 #endif
3653 EOF
3654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3655   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3656   rm -rf conftest*
3657   ac_cv_type_size_t=yes
3658 else
3659   rm -rf conftest*
3660   ac_cv_type_size_t=no
3661 fi
3662 rm -f conftest*
3663
3664 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3665 if test $ac_cv_type_size_t = no; then
3666   { test "$extra_verbose" = "yes" && cat << \EOF
3667     Defining size_t = unsigned
3668 EOF
3669 cat >> confdefs.h <<\EOF
3670 #define size_t unsigned
3671 EOF
3672 }
3673
3674 fi
3675
3676 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3677 echo "configure:3678: checking for pid_t" >&5
3678
3679 cat > conftest.$ac_ext <<EOF
3680 #line 3681 "configure"
3681 #include "confdefs.h"
3682 #include <sys/types.h>
3683 #if STDC_HEADERS
3684 #include <stdlib.h>
3685 #include <stddef.h>
3686 #endif
3687 EOF
3688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3689   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3690   rm -rf conftest*
3691   ac_cv_type_pid_t=yes
3692 else
3693   rm -rf conftest*
3694   ac_cv_type_pid_t=no
3695 fi
3696 rm -f conftest*
3697
3698 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3699 if test $ac_cv_type_pid_t = no; then
3700   { test "$extra_verbose" = "yes" && cat << \EOF
3701     Defining pid_t = int
3702 EOF
3703 cat >> confdefs.h <<\EOF
3704 #define pid_t int
3705 EOF
3706 }
3707
3708 fi
3709
3710 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3711 echo "configure:3712: checking for uid_t in sys/types.h" >&5
3712
3713 cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #include <sys/types.h>
3717 EOF
3718 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3719   egrep "uid_t" >/dev/null 2>&1; then
3720   rm -rf conftest*
3721   ac_cv_type_uid_t=yes
3722 else
3723   rm -rf conftest*
3724   ac_cv_type_uid_t=no
3725 fi
3726 rm -f conftest*
3727
3728
3729 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3730 if test $ac_cv_type_uid_t = no; then
3731   { test "$extra_verbose" = "yes" && cat << \EOF
3732     Defining uid_t = int
3733 EOF
3734 cat >> confdefs.h <<\EOF
3735 #define uid_t int
3736 EOF
3737 }
3738
3739   { test "$extra_verbose" = "yes" && cat << \EOF
3740     Defining gid_t = int
3741 EOF
3742 cat >> confdefs.h <<\EOF
3743 #define gid_t int
3744 EOF
3745 }
3746
3747 fi
3748
3749 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3750 echo "configure:3751: checking for mode_t" >&5
3751
3752 cat > conftest.$ac_ext <<EOF
3753 #line 3754 "configure"
3754 #include "confdefs.h"
3755 #include <sys/types.h>
3756 #if STDC_HEADERS
3757 #include <stdlib.h>
3758 #include <stddef.h>
3759 #endif
3760 EOF
3761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3762   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3763   rm -rf conftest*
3764   ac_cv_type_mode_t=yes
3765 else
3766   rm -rf conftest*
3767   ac_cv_type_mode_t=no
3768 fi
3769 rm -f conftest*
3770
3771 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3772 if test $ac_cv_type_mode_t = no; then
3773   { test "$extra_verbose" = "yes" && cat << \EOF
3774     Defining mode_t = int
3775 EOF
3776 cat >> confdefs.h <<\EOF
3777 #define mode_t int
3778 EOF
3779 }
3780
3781 fi
3782
3783 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3784 echo "configure:3785: checking for off_t" >&5
3785
3786 cat > conftest.$ac_ext <<EOF
3787 #line 3788 "configure"
3788 #include "confdefs.h"
3789 #include <sys/types.h>
3790 #if STDC_HEADERS
3791 #include <stdlib.h>
3792 #include <stddef.h>
3793 #endif
3794 EOF
3795 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3796   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3797   rm -rf conftest*
3798   ac_cv_type_off_t=yes
3799 else
3800   rm -rf conftest*
3801   ac_cv_type_off_t=no
3802 fi
3803 rm -f conftest*
3804
3805 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3806 if test $ac_cv_type_off_t = no; then
3807   { test "$extra_verbose" = "yes" && cat << \EOF
3808     Defining off_t = long
3809 EOF
3810 cat >> confdefs.h <<\EOF
3811 #define off_t long
3812 EOF
3813 }
3814
3815 fi
3816
3817 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3818 echo "configure:3819: checking for ssize_t" >&5
3819
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 #include <sys/types.h>
3824 #if STDC_HEADERS
3825 #include <stdlib.h>
3826 #include <stddef.h>
3827 #endif
3828 EOF
3829 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3830   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3831   rm -rf conftest*
3832   ac_cv_type_ssize_t=yes
3833 else
3834   rm -rf conftest*
3835   ac_cv_type_ssize_t=no
3836 fi
3837 rm -f conftest*
3838
3839 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3840 if test $ac_cv_type_ssize_t = no; then
3841   { test "$extra_verbose" = "yes" && cat << \EOF
3842     Defining ssize_t = int
3843 EOF
3844 cat >> confdefs.h <<\EOF
3845 #define ssize_t int
3846 EOF
3847 }
3848
3849 fi
3850
3851
3852 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3853 echo "configure:3854: checking for struct timeval" >&5
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 #ifdef TIME_WITH_SYS_TIME
3858 #include <sys/time.h>
3859 #include <time.h>
3860 #else
3861 #ifdef HAVE_SYS_TIME_H
3862 #include <sys/time.h>
3863 #else
3864 #include <time.h>
3865 #endif
3866 #endif
3867 int main() {
3868 static struct timeval x; x.tv_sec = x.tv_usec;
3869 ; return 0; }
3870 EOF
3871 if { (eval echo configure:3872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3872   rm -rf conftest*
3873   echo "$ac_t""yes" 1>&6
3874   HAVE_TIMEVAL=yes
3875   { test "$extra_verbose" = "yes" && cat << \EOF
3876     Defining HAVE_TIMEVAL
3877 EOF
3878 cat >> confdefs.h <<\EOF
3879 #define HAVE_TIMEVAL 1
3880 EOF
3881 }
3882
3883 else
3884   echo "configure: failed program was:" >&5
3885   cat conftest.$ac_ext >&5
3886   rm -rf conftest*
3887   echo "$ac_t""no" 1>&6
3888    HAVE_TIMEVAL=no
3889 fi
3890 rm -f conftest*
3891
3892 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3893 echo "configure:3894: checking whether struct tm is in sys/time.h or time.h" >&5
3894
3895 cat > conftest.$ac_ext <<EOF
3896 #line 3897 "configure"
3897 #include "confdefs.h"
3898 #include <sys/types.h>
3899 #include <time.h>
3900 int main() {
3901 struct tm *tp; tp->tm_sec;
3902 ; return 0; }
3903 EOF
3904 if { (eval echo configure:3905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3905   rm -rf conftest*
3906   ac_cv_struct_tm=time.h
3907 else
3908   echo "configure: failed program was:" >&5
3909   cat conftest.$ac_ext >&5
3910   rm -rf conftest*
3911   ac_cv_struct_tm=sys/time.h
3912 fi
3913 rm -f conftest*
3914
3915 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3916 if test $ac_cv_struct_tm = sys/time.h; then
3917   { test "$extra_verbose" = "yes" && cat << \EOF
3918     Defining TM_IN_SYS_TIME
3919 EOF
3920 cat >> confdefs.h <<\EOF
3921 #define TM_IN_SYS_TIME 1
3922 EOF
3923 }
3924
3925 fi
3926
3927 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3928 echo "configure:3929: checking for tm_zone in struct tm" >&5
3929
3930 cat > conftest.$ac_ext <<EOF
3931 #line 3932 "configure"
3932 #include "confdefs.h"
3933 #include <sys/types.h>
3934 #include <$ac_cv_struct_tm>
3935 int main() {
3936 struct tm tm; tm.tm_zone;
3937 ; return 0; }
3938 EOF
3939 if { (eval echo configure:3940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3940   rm -rf conftest*
3941   ac_cv_struct_tm_zone=yes
3942 else
3943   echo "configure: failed program was:" >&5
3944   cat conftest.$ac_ext >&5
3945   rm -rf conftest*
3946   ac_cv_struct_tm_zone=no
3947 fi
3948 rm -f conftest*
3949
3950 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3951 if test "$ac_cv_struct_tm_zone" = yes; then
3952   { test "$extra_verbose" = "yes" && cat << \EOF
3953     Defining HAVE_TM_ZONE
3954 EOF
3955 cat >> confdefs.h <<\EOF
3956 #define HAVE_TM_ZONE 1
3957 EOF
3958 }
3959
3960 else
3961   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3962 echo "configure:3963: checking for tzname" >&5
3963
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3967 #include <time.h>
3968 #ifndef tzname /* For SGI.  */
3969 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3970 #endif
3971 int main() {
3972 atoi(*tzname);
3973 ; return 0; }
3974 EOF
3975 if { (eval echo configure:3976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976   rm -rf conftest*
3977   ac_cv_var_tzname=yes
3978 else
3979   echo "configure: failed program was:" >&5
3980   cat conftest.$ac_ext >&5
3981   rm -rf conftest*
3982   ac_cv_var_tzname=no
3983 fi
3984 rm -f conftest*
3985
3986 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3987   if test $ac_cv_var_tzname = yes; then
3988     { test "$extra_verbose" = "yes" && cat << \EOF
3989     Defining HAVE_TZNAME
3990 EOF
3991 cat >> confdefs.h <<\EOF
3992 #define HAVE_TZNAME 1
3993 EOF
3994 }
3995
3996   fi
3997 fi
3998
3999
4000 echo $ac_n "checking for working const""... $ac_c" 1>&6
4001 echo "configure:4002: checking for working const" >&5
4002
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4006
4007 int main() {
4008
4009 /* Ultrix mips cc rejects this.  */
4010 typedef int charset[2]; const charset x;
4011 /* SunOS 4.1.1 cc rejects this.  */
4012 char const *const *ccp;
4013 char **p;
4014 /* NEC SVR4.0.2 mips cc rejects this.  */
4015 struct point {int x, y;};
4016 static struct point const zero = {0,0};
4017 /* AIX XL C 1.02.0.0 rejects this.
4018    It does not let you subtract one const X* pointer from another in an arm
4019    of an if-expression whose if-part is not a constant expression */
4020 const char *g = "string";
4021 ccp = &g + (g ? g-g : 0);
4022 /* HPUX 7.0 cc rejects these. */
4023 ++ccp;
4024 p = (char**) ccp;
4025 ccp = (char const *const *) p;
4026 { /* SCO 3.2v4 cc rejects this.  */
4027   char *t;
4028   char const *s = 0 ? (char *) 0 : (char const *) 0;
4029
4030   *t++ = 0;
4031 }
4032 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4033   int x[] = {25, 17};
4034   const int *foo = &x[0];
4035   ++foo;
4036 }
4037 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4038   typedef const int *iptr;
4039   iptr p = 0;
4040   ++p;
4041 }
4042 { /* AIX XL C 1.02.0.0 rejects this saying
4043      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4044   struct s { int j; const int *ap[3]; };
4045   struct s *b; b->j = 5;
4046 }
4047 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4048   const int foo = 10;
4049 }
4050
4051 ; return 0; }
4052 EOF
4053 if { (eval echo configure:4054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054   rm -rf conftest*
4055   ac_cv_c_const=yes
4056 else
4057   echo "configure: failed program was:" >&5
4058   cat conftest.$ac_ext >&5
4059   rm -rf conftest*
4060   ac_cv_c_const=no
4061 fi
4062 rm -f conftest*
4063
4064 echo "$ac_t""$ac_cv_c_const" 1>&6
4065 if test $ac_cv_c_const = no; then
4066   { test "$extra_verbose" = "yes" && cat << \EOF
4067     Defining const = 
4068 EOF
4069 cat >> confdefs.h <<\EOF
4070 #define const 
4071 EOF
4072 }
4073
4074 fi
4075
4076
4077 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4078 echo "configure:4079: checking whether ${MAKE-make} sets \${MAKE}" >&5
4079 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4080
4081 cat > conftestmake <<\EOF
4082 all:
4083         @echo 'ac_maketemp="${MAKE}"'
4084 EOF
4085 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4086 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4087 if test -n "$ac_maketemp"; then
4088   eval ac_cv_prog_make_${ac_make}_set=yes
4089 else
4090   eval ac_cv_prog_make_${ac_make}_set=no
4091 fi
4092 rm -f conftestmake
4093 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4094   echo "$ac_t""yes" 1>&6
4095   SET_MAKE=
4096 else
4097   echo "$ac_t""no" 1>&6
4098   SET_MAKE="MAKE=${MAKE-make}"
4099 fi
4100
4101
4102 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4103 echo "configure:4104: checking whether byte ordering is bigendian" >&5
4104
4105 ac_cv_c_bigendian=unknown
4106 # See if sys/param.h defines the BYTE_ORDER macro.
4107 cat > conftest.$ac_ext <<EOF
4108 #line 4109 "configure"
4109 #include "confdefs.h"
4110 #include <sys/types.h>
4111 #include <sys/param.h>
4112 int main() {
4113
4114 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4115  bogus endian macros
4116 #endif
4117 ; return 0; }
4118 EOF
4119 if { (eval echo configure:4120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4120   rm -rf conftest*
4121   # It does; now see whether it defined to BIG_ENDIAN or not.
4122 cat > conftest.$ac_ext <<EOF
4123 #line 4124 "configure"
4124 #include "confdefs.h"
4125 #include <sys/types.h>
4126 #include <sys/param.h>
4127 int main() {
4128
4129 #if BYTE_ORDER != BIG_ENDIAN
4130  not big endian
4131 #endif
4132 ; return 0; }
4133 EOF
4134 if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4135   rm -rf conftest*
4136   ac_cv_c_bigendian=yes
4137 else
4138   echo "configure: failed program was:" >&5
4139   cat conftest.$ac_ext >&5
4140   rm -rf conftest*
4141   ac_cv_c_bigendian=no
4142 fi
4143 rm -f conftest*
4144 else
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147 fi
4148 rm -f conftest*
4149 if test $ac_cv_c_bigendian = unknown; then
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4153 main () {
4154   /* Are we little or big endian?  From Harbison&Steele.  */
4155   union
4156   {
4157     long l;
4158     char c[sizeof (long)];
4159   } u;
4160   u.l = 1;
4161   exit (u.c[sizeof (long) - 1] == 1);
4162 }
4163 EOF
4164 if { (eval echo configure:4165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4165 then
4166   ac_cv_c_bigendian=no
4167 else
4168   conftest_rc="$?"
4169   echo "configure: failed program was:" >&5
4170   cat conftest.$ac_ext >&5
4171   rm -fr conftest*
4172   ac_cv_c_bigendian=yes
4173 fi
4174 rm -fr conftest*
4175 fi
4176
4177 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4178 if test $ac_cv_c_bigendian = yes; then
4179   { test "$extra_verbose" = "yes" && cat << \EOF
4180     Defining WORDS_BIGENDIAN
4181 EOF
4182 cat >> confdefs.h <<\EOF
4183 #define WORDS_BIGENDIAN 1
4184 EOF
4185 }
4186
4187 fi
4188
4189
4190 echo $ac_n "checking size of short""... $ac_c" 1>&6
4191 echo "configure:4192: checking size of short" >&5
4192
4193 cat > conftest.$ac_ext <<EOF
4194 #line 4195 "configure"
4195 #include "confdefs.h"
4196 #include <stdio.h>
4197 main()
4198 {
4199   FILE *f=fopen("conftestval", "w");
4200   if (!f) exit(1);
4201   fprintf(f, "%d\n", sizeof(short));
4202   exit(0);
4203 }
4204 EOF
4205 if { (eval echo configure:4206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4206 then
4207   ac_cv_sizeof_short=`cat conftestval`
4208 else
4209   conftest_rc="$?"
4210   echo "configure: failed program was:" >&5
4211   cat conftest.$ac_ext >&5
4212   rm -fr conftest*
4213   ac_cv_sizeof_short=0
4214 fi
4215 rm -fr conftest*
4216 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4217 { test "$extra_verbose" = "yes" && cat << EOF
4218     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4219 EOF
4220 cat >> confdefs.h <<EOF
4221 #define SIZEOF_SHORT $ac_cv_sizeof_short
4222 EOF
4223 }
4224
4225
4226 if test "$ac_cv_sizeof_short" = 0; then
4227   echo ""
4228   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4229   echo "*** PANIC *** Please examine config.log for compilation errors."
4230   exit 1
4231 fi
4232 echo $ac_n "checking size of int""... $ac_c" 1>&6
4233 echo "configure:4234: checking size of int" >&5
4234
4235 cat > conftest.$ac_ext <<EOF
4236 #line 4237 "configure"
4237 #include "confdefs.h"
4238 #include <stdio.h>
4239 main()
4240 {
4241   FILE *f=fopen("conftestval", "w");
4242   if (!f) exit(1);
4243   fprintf(f, "%d\n", sizeof(int));
4244   exit(0);
4245 }
4246 EOF
4247 if { (eval echo configure:4248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4248 then
4249   ac_cv_sizeof_int=`cat conftestval`
4250 else
4251   conftest_rc="$?"
4252   echo "configure: failed program was:" >&5
4253   cat conftest.$ac_ext >&5
4254   rm -fr conftest*
4255   ac_cv_sizeof_int=0
4256 fi
4257 rm -fr conftest*
4258 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4259 { test "$extra_verbose" = "yes" && cat << EOF
4260     Defining SIZEOF_INT = $ac_cv_sizeof_int
4261 EOF
4262 cat >> confdefs.h <<EOF
4263 #define SIZEOF_INT $ac_cv_sizeof_int
4264 EOF
4265 }
4266
4267
4268 echo $ac_n "checking size of long""... $ac_c" 1>&6
4269 echo "configure:4270: checking size of long" >&5
4270
4271 cat > conftest.$ac_ext <<EOF
4272 #line 4273 "configure"
4273 #include "confdefs.h"
4274 #include <stdio.h>
4275 main()
4276 {
4277   FILE *f=fopen("conftestval", "w");
4278   if (!f) exit(1);
4279   fprintf(f, "%d\n", sizeof(long));
4280   exit(0);
4281 }
4282 EOF
4283 if { (eval echo configure:4284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4284 then
4285   ac_cv_sizeof_long=`cat conftestval`
4286 else
4287   conftest_rc="$?"
4288   echo "configure: failed program was:" >&5
4289   cat conftest.$ac_ext >&5
4290   rm -fr conftest*
4291   ac_cv_sizeof_long=0
4292 fi
4293 rm -fr conftest*
4294 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4295 { test "$extra_verbose" = "yes" && cat << EOF
4296     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4297 EOF
4298 cat >> confdefs.h <<EOF
4299 #define SIZEOF_LONG $ac_cv_sizeof_long
4300 EOF
4301 }
4302
4303
4304 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4305 echo "configure:4306: checking size of long long" >&5
4306
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4310 #include <stdio.h>
4311 main()
4312 {
4313   FILE *f=fopen("conftestval", "w");
4314   if (!f) exit(1);
4315   fprintf(f, "%d\n", sizeof(long long));
4316   exit(0);
4317 }
4318 EOF
4319 if { (eval echo configure:4320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4320 then
4321   ac_cv_sizeof_long_long=`cat conftestval`
4322 else
4323   conftest_rc="$?"
4324   echo "configure: failed program was:" >&5
4325   cat conftest.$ac_ext >&5
4326   rm -fr conftest*
4327   ac_cv_sizeof_long_long=0
4328 fi
4329 rm -fr conftest*
4330 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4331 { test "$extra_verbose" = "yes" && cat << EOF
4332     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4333 EOF
4334 cat >> confdefs.h <<EOF
4335 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4336 EOF
4337 }
4338
4339
4340 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4341 echo "configure:4342: checking size of void *" >&5
4342
4343 cat > conftest.$ac_ext <<EOF
4344 #line 4345 "configure"
4345 #include "confdefs.h"
4346 #include <stdio.h>
4347 main()
4348 {
4349   FILE *f=fopen("conftestval", "w");
4350   if (!f) exit(1);
4351   fprintf(f, "%d\n", sizeof(void *));
4352   exit(0);
4353 }
4354 EOF
4355 if { (eval echo configure:4356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4356 then
4357   ac_cv_sizeof_void_p=`cat conftestval`
4358 else
4359   conftest_rc="$?"
4360   echo "configure: failed program was:" >&5
4361   cat conftest.$ac_ext >&5
4362   rm -fr conftest*
4363   ac_cv_sizeof_void_p=0
4364 fi
4365 rm -fr conftest*
4366 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4367 { test "$extra_verbose" = "yes" && cat << EOF
4368     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4369 EOF
4370 cat >> confdefs.h <<EOF
4371 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4372 EOF
4373 }
4374
4375
4376
4377 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4378 echo "configure:4379: checking for long file names" >&5
4379
4380 ac_cv_sys_long_file_names=yes
4381 # Test for long file names in all the places we know might matter:
4382 #      .                the current directory, where building will happen
4383 #      $prefix/lib      where we will be installing things
4384 #      $exec_prefix/lib likewise
4385 # eval it to expand exec_prefix.
4386 #      $TMPDIR          if set, where it might want to write temporary files
4387 # if $TMPDIR is not set:
4388 #      /tmp             where it might want to write temporary files
4389 #      /var/tmp         likewise
4390 #      /usr/tmp         likewise
4391 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4392   ac_tmpdirs="$TMPDIR"
4393 else
4394   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4395 fi
4396 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4397   test -d $ac_dir || continue
4398   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4399   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4400   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4401   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4402   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4403     ac_cv_sys_long_file_names=no
4404     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4405     break
4406   fi
4407   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4408 done
4409
4410 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4411 if test $ac_cv_sys_long_file_names = yes; then
4412   { test "$extra_verbose" = "yes" && cat << \EOF
4413     Defining HAVE_LONG_FILE_NAMES
4414 EOF
4415 cat >> confdefs.h <<\EOF
4416 #define HAVE_LONG_FILE_NAMES 1
4417 EOF
4418 }
4419
4420 fi
4421
4422
4423 echo $ac_n "checking for sin""... $ac_c" 1>&6
4424 echo "configure:4425: checking for sin" >&5
4425
4426 cat > conftest.$ac_ext <<EOF
4427 #line 4428 "configure"
4428 #include "confdefs.h"
4429 /* System header to define __stub macros and hopefully few prototypes,
4430     which can conflict with char sin(); below.  */
4431 #include <assert.h>
4432 /* Override any gcc2 internal prototype to avoid an error.  */
4433 /* We use char because int might match the return type of a gcc2
4434     builtin and then its argument prototype would still apply.  */
4435 char sin();
4436
4437 int main() {
4438
4439 /* The GNU C library defines this for functions which it implements
4440     to always fail with ENOSYS.  Some functions are actually named
4441     something starting with __ and the normal name is an alias.  */
4442 #if defined (__stub_sin) || defined (__stub___sin)
4443 choke me
4444 #else
4445 sin();
4446 #endif
4447
4448 ; return 0; }
4449 EOF
4450 if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4451   rm -rf conftest*
4452   eval "ac_cv_func_sin=yes"
4453 else
4454   echo "configure: failed program was:" >&5
4455   cat conftest.$ac_ext >&5
4456   rm -rf conftest*
4457   eval "ac_cv_func_sin=no"
4458 fi
4459 rm -f conftest*
4460
4461 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4462   echo "$ac_t""yes" 1>&6
4463   :
4464 else
4465   echo "$ac_t""no" 1>&6
4466
4467 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4468 echo "configure:4469: checking for sin in -lm" >&5
4469 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4470
4471 xe_check_libs=" -lm "
4472 cat > conftest.$ac_ext <<EOF
4473 #line 4474 "configure"
4474 #include "confdefs.h"
4475 /* Override any gcc2 internal prototype to avoid an error.  */
4476 /* We use char because int might match the return type of a gcc2
4477     builtin and then its argument prototype would still apply.  */
4478 char sin();
4479
4480 int main() {
4481 sin()
4482 ; return 0; }
4483 EOF
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4485   rm -rf conftest*
4486   eval "ac_cv_lib_$ac_lib_var=yes"
4487 else
4488   echo "configure: failed program was:" >&5
4489   cat conftest.$ac_ext >&5
4490   rm -rf conftest*
4491   eval "ac_cv_lib_$ac_lib_var=no"
4492 fi
4493 rm -f conftest*
4494 xe_check_libs=""
4495
4496 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4497   echo "$ac_t""yes" 1>&6
4498     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4499     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4500   { test "$extra_verbose" = "yes" && cat << EOF
4501     Defining $ac_tr_lib
4502 EOF
4503 cat >> confdefs.h <<EOF
4504 #define $ac_tr_lib 1
4505 EOF
4506 }
4507
4508   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4509
4510 else
4511   echo "$ac_t""no" 1>&6
4512 fi
4513
4514
4515 fi
4516
4517
4518 { test "$extra_verbose" = "yes" && cat << \EOF
4519     Defining LISP_FLOAT_TYPE
4520 EOF
4521 cat >> confdefs.h <<\EOF
4522 #define LISP_FLOAT_TYPE 1
4523 EOF
4524 }
4525
4526
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <math.h>
4531 int main() {
4532 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4533 ; return 0; }
4534 EOF
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536   rm -rf conftest*
4537   { test "$extra_verbose" = "yes" && cat << \EOF
4538     Defining HAVE_INVERSE_HYPERBOLIC
4539 EOF
4540 cat >> confdefs.h <<\EOF
4541 #define HAVE_INVERSE_HYPERBOLIC 1
4542 EOF
4543 }
4544
4545 else
4546   echo "configure: failed program was:" >&5
4547   cat conftest.$ac_ext >&5
4548 fi
4549 rm -f conftest*
4550
4551 echo "checking type of mail spool file locking" 1>&6
4552 echo "configure:4553: checking type of mail spool file locking" >&5
4553 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4554 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4555 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4556     Defining REAL_MAIL_USE_LOCKF
4557 EOF
4558 cat >> confdefs.h <<\EOF
4559 #define REAL_MAIL_USE_LOCKF 1
4560 EOF
4561 }
4562
4563 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4564     Defining REAL_MAIL_USE_FLOCK
4565 EOF
4566 cat >> confdefs.h <<\EOF
4567 #define REAL_MAIL_USE_FLOCK 1
4568 EOF
4569 }
4570
4571 else mail_locking="dot-locking"
4572 fi
4573
4574 case "$opsys" in decosf*)
4575   
4576 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4577 echo "configure:4578: checking for cma_open in -lpthreads" >&5
4578 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4579
4580 xe_check_libs=" -lpthreads "
4581 cat > conftest.$ac_ext <<EOF
4582 #line 4583 "configure"
4583 #include "confdefs.h"
4584 /* Override any gcc2 internal prototype to avoid an error.  */
4585 /* We use char because int might match the return type of a gcc2
4586     builtin and then its argument prototype would still apply.  */
4587 char cma_open();
4588
4589 int main() {
4590 cma_open()
4591 ; return 0; }
4592 EOF
4593 if { (eval echo configure:4594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4594   rm -rf conftest*
4595   eval "ac_cv_lib_$ac_lib_var=yes"
4596 else
4597   echo "configure: failed program was:" >&5
4598   cat conftest.$ac_ext >&5
4599   rm -rf conftest*
4600   eval "ac_cv_lib_$ac_lib_var=no"
4601 fi
4602 rm -f conftest*
4603 xe_check_libs=""
4604
4605 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4606   echo "$ac_t""yes" 1>&6
4607     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4608     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4609   { test "$extra_verbose" = "yes" && cat << EOF
4610     Defining $ac_tr_lib
4611 EOF
4612 cat >> confdefs.h <<EOF
4613 #define $ac_tr_lib 1
4614 EOF
4615 }
4616
4617   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4618
4619 else
4620   echo "$ac_t""no" 1>&6
4621 fi
4622
4623
4624   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4625     c_switch_site="$c_switch_site -threads" ;;
4626 esac
4627
4628 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4629 echo "configure:4630: checking whether the -xildoff compiler flag is required" >&5
4630 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4631   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4632     then echo "$ac_t""no" 1>&6;
4633     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
4634   fi
4635   else echo "$ac_t""no" 1>&6
4636 fi
4637
4638 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4639   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4640 echo "configure:4641: checking for \"-z ignore\" linker flag" >&5
4641   case "`ld -h 2>&1`" in
4642     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4643       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4644     *) echo "$ac_t""no" 1>&6 ;;
4645   esac
4646 fi
4647
4648
4649 echo "checking "for specified window system"" 1>&6
4650 echo "configure:4651: checking "for specified window system"" >&5
4651
4652 if test "$with_x11" != "no"; then
4653     test "$x_includes $x_libraries" != "NONE NONE" && \
4654    window_system=x11 with_x11=yes
4655
4656         
4657       if test "$x_includes $x_libraries" = "NONE NONE" \
4658     -a -n "$OPENWINHOME" \
4659     -a "$OPENWINHOME" != "/usr/openwin" \
4660     -a -d "$OPENWINHOME"; then
4661       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4662       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4663       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4664   fi
4665
4666   if test "$x_includes" = "NONE"; then
4667                     for dir in "/usr/X11" "/usr/X11R6"; do
4668       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4669     done
4670   fi
4671
4672   if test "$x_libraries" = "NONE"; then
4673     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4674       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4675     done
4676   fi
4677
4678   # If we find X, set shell vars x_includes and x_libraries to the
4679 # paths, otherwise set no_x=yes.
4680 # Uses ac_ vars as temps to allow command line to override cache and checks.
4681 # --without-x overrides everything else, but does not touch the cache.
4682 echo $ac_n "checking for X""... $ac_c" 1>&6
4683 echo "configure:4684: checking for X" >&5
4684
4685 # Check whether --with-x or --without-x was given.
4686 if test "${with_x+set}" = set; then
4687   withval="$with_x"
4688   :
4689 fi
4690
4691 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4692 if test "x$with_x" = xno; then
4693   # The user explicitly disabled X.
4694   have_x=disabled
4695 else
4696   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4697     # Both variables are already set.
4698     have_x=yes
4699   else
4700
4701 # One or both of the vars are not set, and there is no cached value.
4702 ac_x_includes=NO ac_x_libraries=NO
4703 rm -fr conftestdir
4704 if mkdir conftestdir; then
4705   cd conftestdir
4706   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4707   cat > Imakefile <<'EOF'
4708 acfindx:
4709         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4710 EOF
4711   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4712     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4713     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4714     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4715     for ac_extension in a so sl; do
4716       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4717         test -f $ac_im_libdir/libX11.$ac_extension; then
4718         ac_im_usrlibdir=$ac_im_libdir; break
4719       fi
4720     done
4721     # Screen out bogus values from the imake configuration.  They are
4722     # bogus both because they are the default anyway, and because
4723     # using them would break gcc on systems where it needs fixed includes.
4724     case "$ac_im_incroot" in
4725         /usr/include) ;;
4726         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4727     esac
4728     case "$ac_im_usrlibdir" in
4729         /usr/lib | /lib) ;;
4730         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4731     esac
4732   fi
4733   cd ..
4734   rm -fr conftestdir
4735 fi
4736
4737 if test "$ac_x_includes" = NO; then
4738   # Guess where to find include files, by looking for this one X11 .h file.
4739   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4740
4741   # First, try using that file with no special directory specified.
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4745 #include <$x_direct_test_include>
4746 EOF
4747 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4748 { (eval echo configure:4749: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4749 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4750 if test -z "$ac_err"; then
4751   rm -rf conftest*
4752   # We can compile using X headers with no special include directory.
4753 ac_x_includes=
4754 else
4755   echo "$ac_err" >&5
4756   echo "configure: failed program was:" >&5
4757   cat conftest.$ac_ext >&5
4758   rm -rf conftest*
4759   # Look for the header file in a standard set of common directories.
4760 # Check X11 before X11Rn because it is often a symlink to the current release.
4761   for ac_dir in               \
4762     /usr/X11/include          \
4763     /usr/X11R6/include        \
4764     /usr/X11R5/include        \
4765     /usr/X11R4/include        \
4766                               \
4767     /usr/include/X11          \
4768     /usr/include/X11R6        \
4769     /usr/include/X11R5        \
4770     /usr/include/X11R4        \
4771                               \
4772     /usr/local/X11/include    \
4773     /usr/local/X11R6/include  \
4774     /usr/local/X11R5/include  \
4775     /usr/local/X11R4/include  \
4776                               \
4777     /usr/local/include/X11    \
4778     /usr/local/include/X11R6  \
4779     /usr/local/include/X11R5  \
4780     /usr/local/include/X11R4  \
4781                               \
4782     /usr/X386/include         \
4783     /usr/x386/include         \
4784     /usr/XFree86/include/X11  \
4785                               \
4786     /usr/include              \
4787     /usr/local/include        \
4788     /usr/unsupported/include  \
4789     /usr/athena/include       \
4790     /usr/local/x11r5/include  \
4791     /usr/lpp/Xamples/include  \
4792                               \
4793     /usr/openwin/include      \
4794     /usr/openwin/share/include \
4795     ; \
4796   do
4797     if test -r "$ac_dir/$x_direct_test_include"; then
4798       ac_x_includes=$ac_dir
4799       break
4800     fi
4801   done
4802 fi
4803 rm -f conftest*
4804 fi # $ac_x_includes = NO
4805
4806 if test "$ac_x_libraries" = NO; then
4807   # Check for the libraries.
4808
4809   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4810   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4811
4812   # See if we find them without any special options.
4813   # Don't add to $LIBS permanently.
4814   ac_save_LIBS="$LIBS"
4815   LIBS="-l$x_direct_test_library $LIBS"
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819
4820 int main() {
4821 ${x_direct_test_function}()
4822 ; return 0; }
4823 EOF
4824 if { (eval echo configure:4825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4825   rm -rf conftest*
4826   LIBS="$ac_save_LIBS"
4827 # We can link X programs with no special library path.
4828 ac_x_libraries=
4829 else
4830   echo "configure: failed program was:" >&5
4831   cat conftest.$ac_ext >&5
4832   rm -rf conftest*
4833   LIBS="$ac_save_LIBS"
4834 # First see if replacing the include by lib works.
4835 # Check X11 before X11Rn because it is often a symlink to the current release.
4836 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4837     /usr/X11/lib          \
4838     /usr/X11R6/lib        \
4839     /usr/X11R5/lib        \
4840     /usr/X11R4/lib        \
4841                           \
4842     /usr/lib/X11          \
4843     /usr/lib/X11R6        \
4844     /usr/lib/X11R5        \
4845     /usr/lib/X11R4        \
4846                           \
4847     /usr/local/X11/lib    \
4848     /usr/local/X11R6/lib  \
4849     /usr/local/X11R5/lib  \
4850     /usr/local/X11R4/lib  \
4851                           \
4852     /usr/local/lib/X11    \
4853     /usr/local/lib/X11R6  \
4854     /usr/local/lib/X11R5  \
4855     /usr/local/lib/X11R4  \
4856                           \
4857     /usr/X386/lib         \
4858     /usr/x386/lib         \
4859     /usr/XFree86/lib/X11  \
4860                           \
4861     /usr/lib              \
4862     /usr/local/lib        \
4863     /usr/unsupported/lib  \
4864     /usr/athena/lib       \
4865     /usr/local/x11r5/lib  \
4866     /usr/lpp/Xamples/lib  \
4867     /lib/usr/lib/X11      \
4868                           \
4869     /usr/openwin/lib      \
4870     /usr/openwin/share/lib \
4871     ; \
4872 do
4873   for ac_extension in a so sl; do
4874     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4875       ac_x_libraries=$ac_dir
4876       break 2
4877     fi
4878   done
4879 done
4880 fi
4881 rm -f conftest*
4882 fi # $ac_x_libraries = NO
4883
4884 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4885   # Didn't find X anywhere.  Cache the known absence of X.
4886   ac_cv_have_x="have_x=no"
4887 else
4888   # Record where we found X for the cache.
4889   ac_cv_have_x="have_x=yes \
4890                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4891 fi
4892   fi
4893   eval "$ac_cv_have_x"
4894 fi # $with_x != no
4895
4896 if test "$have_x" != yes; then
4897   echo "$ac_t""$have_x" 1>&6
4898   no_x=yes
4899 else
4900   # If each of the values was on the command line, it overrides each guess.
4901   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4902   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4903   # Update the cache value to reflect the command line values.
4904   ac_cv_have_x="have_x=yes \
4905                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4906   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4907 fi
4908
4909 if test "$no_x" = yes; then
4910   # Not all programs may use this symbol, but it does not hurt to define it.
4911   { test "$extra_verbose" = "yes" && cat << \EOF
4912     Defining X_DISPLAY_MISSING
4913 EOF
4914 cat >> confdefs.h <<\EOF
4915 #define X_DISPLAY_MISSING 1
4916 EOF
4917 }
4918
4919   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4920 else
4921   if test -n "$x_includes"; then
4922     X_CFLAGS="$X_CFLAGS -I$x_includes"
4923   fi
4924
4925   # It would also be nice to do this for all -L options, not just this one.
4926   if test -n "$x_libraries"; then
4927     X_LIBS="$X_LIBS -L$x_libraries"
4928     # For Solaris; some versions of Sun CC require a space after -R and
4929     # others require no space.  Words are not sufficient . . . .
4930     case "`(uname -sr) 2>/dev/null`" in
4931     "SunOS 5"*)
4932       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4933 echo "configure:4934: checking whether -R must be followed by a space" >&5
4934       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4935       cat > conftest.$ac_ext <<EOF
4936 #line 4937 "configure"
4937 #include "confdefs.h"
4938
4939 int main() {
4940
4941 ; return 0; }
4942 EOF
4943 if { (eval echo configure:4944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4944   rm -rf conftest*
4945   ac_R_nospace=yes
4946 else
4947   echo "configure: failed program was:" >&5
4948   cat conftest.$ac_ext >&5
4949   rm -rf conftest*
4950   ac_R_nospace=no
4951 fi
4952 rm -f conftest*
4953       if test $ac_R_nospace = yes; then
4954         echo "$ac_t""no" 1>&6
4955         X_LIBS="$X_LIBS -R$x_libraries"
4956       else
4957         LIBS="$ac_xsave_LIBS -R $x_libraries"
4958         cat > conftest.$ac_ext <<EOF
4959 #line 4960 "configure"
4960 #include "confdefs.h"
4961
4962 int main() {
4963
4964 ; return 0; }
4965 EOF
4966 if { (eval echo configure:4967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4967   rm -rf conftest*
4968   ac_R_space=yes
4969 else
4970   echo "configure: failed program was:" >&5
4971   cat conftest.$ac_ext >&5
4972   rm -rf conftest*
4973   ac_R_space=no
4974 fi
4975 rm -f conftest*
4976         if test $ac_R_space = yes; then
4977           echo "$ac_t""yes" 1>&6
4978           X_LIBS="$X_LIBS -R $x_libraries"
4979         else
4980           echo "$ac_t""neither works" 1>&6
4981         fi
4982       fi
4983       LIBS="$ac_xsave_LIBS"
4984     esac
4985   fi
4986
4987   # Check for system-dependent libraries X programs must link with.
4988   # Do this before checking for the system-independent R6 libraries
4989   # (-lICE), since we may need -lsocket or whatever for X linking.
4990
4991   if test "$ISC" = yes; then
4992     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4993   else
4994     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4995     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4996     # the Alpha needs dnet_stub (dnet does not exist).
4997     if test "$with_dnet" = "no" ; then
4998 ac_cv_lib_dnet_dnet_ntoa=no
4999 else
5000
5001 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5002 echo "configure:5003: checking for dnet_ntoa in -ldnet" >&5
5003 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5004
5005 xe_check_libs=" -ldnet "
5006 cat > conftest.$ac_ext <<EOF
5007 #line 5008 "configure"
5008 #include "confdefs.h"
5009 /* Override any gcc2 internal prototype to avoid an error.  */
5010 /* We use char because int might match the return type of a gcc2
5011     builtin and then its argument prototype would still apply.  */
5012 char dnet_ntoa();
5013
5014 int main() {
5015 dnet_ntoa()
5016 ; return 0; }
5017 EOF
5018 if { (eval echo configure:5019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5019   rm -rf conftest*
5020   eval "ac_cv_lib_$ac_lib_var=yes"
5021 else
5022   echo "configure: failed program was:" >&5
5023   cat conftest.$ac_ext >&5
5024   rm -rf conftest*
5025   eval "ac_cv_lib_$ac_lib_var=no"
5026 fi
5027 rm -f conftest*
5028 xe_check_libs=""
5029
5030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5031   echo "$ac_t""yes" 1>&6
5032   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5033 else
5034   echo "$ac_t""no" 1>&6
5035 fi
5036
5037 fi
5038
5039     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5040       
5041 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5042 echo "configure:5043: checking for dnet_ntoa in -ldnet_stub" >&5
5043 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5044
5045 xe_check_libs=" -ldnet_stub "
5046 cat > conftest.$ac_ext <<EOF
5047 #line 5048 "configure"
5048 #include "confdefs.h"
5049 /* Override any gcc2 internal prototype to avoid an error.  */
5050 /* We use char because int might match the return type of a gcc2
5051     builtin and then its argument prototype would still apply.  */
5052 char dnet_ntoa();
5053
5054 int main() {
5055 dnet_ntoa()
5056 ; return 0; }
5057 EOF
5058 if { (eval echo configure:5059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5059   rm -rf conftest*
5060   eval "ac_cv_lib_$ac_lib_var=yes"
5061 else
5062   echo "configure: failed program was:" >&5
5063   cat conftest.$ac_ext >&5
5064   rm -rf conftest*
5065   eval "ac_cv_lib_$ac_lib_var=no"
5066 fi
5067 rm -f conftest*
5068 xe_check_libs=""
5069
5070 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5071   echo "$ac_t""yes" 1>&6
5072   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5073 else
5074   echo "$ac_t""no" 1>&6
5075 fi
5076
5077
5078     fi
5079
5080     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5081     # to get the SysV transport functions.
5082     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5083     # needs -lnsl.
5084     # The nsl library prevents programs from opening the X display
5085     # on Irix 5.2, according to dickey@clark.net.
5086     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5087 echo "configure:5088: checking for gethostbyname" >&5
5088
5089 cat > conftest.$ac_ext <<EOF
5090 #line 5091 "configure"
5091 #include "confdefs.h"
5092 /* System header to define __stub macros and hopefully few prototypes,
5093     which can conflict with char gethostbyname(); below.  */
5094 #include <assert.h>
5095 /* Override any gcc2 internal prototype to avoid an error.  */
5096 /* We use char because int might match the return type of a gcc2
5097     builtin and then its argument prototype would still apply.  */
5098 char gethostbyname();
5099
5100 int main() {
5101
5102 /* The GNU C library defines this for functions which it implements
5103     to always fail with ENOSYS.  Some functions are actually named
5104     something starting with __ and the normal name is an alias.  */
5105 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5106 choke me
5107 #else
5108 gethostbyname();
5109 #endif
5110
5111 ; return 0; }
5112 EOF
5113 if { (eval echo configure:5114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5114   rm -rf conftest*
5115   eval "ac_cv_func_gethostbyname=yes"
5116 else
5117   echo "configure: failed program was:" >&5
5118   cat conftest.$ac_ext >&5
5119   rm -rf conftest*
5120   eval "ac_cv_func_gethostbyname=no"
5121 fi
5122 rm -f conftest*
5123
5124 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5125   echo "$ac_t""yes" 1>&6
5126   :
5127 else
5128   echo "$ac_t""no" 1>&6
5129 fi
5130
5131     if test $ac_cv_func_gethostbyname = no; then
5132       
5133 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5134 echo "configure:5135: checking for gethostbyname in -lnsl" >&5
5135 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5136
5137 xe_check_libs=" -lnsl "
5138 cat > conftest.$ac_ext <<EOF
5139 #line 5140 "configure"
5140 #include "confdefs.h"
5141 /* Override any gcc2 internal prototype to avoid an error.  */
5142 /* We use char because int might match the return type of a gcc2
5143     builtin and then its argument prototype would still apply.  */
5144 char gethostbyname();
5145
5146 int main() {
5147 gethostbyname()
5148 ; return 0; }
5149 EOF
5150 if { (eval echo configure:5151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5151   rm -rf conftest*
5152   eval "ac_cv_lib_$ac_lib_var=yes"
5153 else
5154   echo "configure: failed program was:" >&5
5155   cat conftest.$ac_ext >&5
5156   rm -rf conftest*
5157   eval "ac_cv_lib_$ac_lib_var=no"
5158 fi
5159 rm -f conftest*
5160 xe_check_libs=""
5161
5162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5163   echo "$ac_t""yes" 1>&6
5164   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5165 else
5166   echo "$ac_t""no" 1>&6
5167 fi
5168
5169
5170     fi
5171
5172     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5173     # socket/setsockopt and other routines are undefined under SCO ODT
5174     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5175     # on later versions), says simon@lia.di.epfl.ch: it contains
5176     # gethostby* variants that don't use the nameserver (or something).
5177     # -lsocket must be given before -lnsl if both are needed.
5178     # We assume that if connect needs -lnsl, so does gethostbyname.
5179     echo $ac_n "checking for connect""... $ac_c" 1>&6
5180 echo "configure:5181: checking for connect" >&5
5181
5182 cat > conftest.$ac_ext <<EOF
5183 #line 5184 "configure"
5184 #include "confdefs.h"
5185 /* System header to define __stub macros and hopefully few prototypes,
5186     which can conflict with char connect(); below.  */
5187 #include <assert.h>
5188 /* Override any gcc2 internal prototype to avoid an error.  */
5189 /* We use char because int might match the return type of a gcc2
5190     builtin and then its argument prototype would still apply.  */
5191 char connect();
5192
5193 int main() {
5194
5195 /* The GNU C library defines this for functions which it implements
5196     to always fail with ENOSYS.  Some functions are actually named
5197     something starting with __ and the normal name is an alias.  */
5198 #if defined (__stub_connect) || defined (__stub___connect)
5199 choke me
5200 #else
5201 connect();
5202 #endif
5203
5204 ; return 0; }
5205 EOF
5206 if { (eval echo configure:5207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5207   rm -rf conftest*
5208   eval "ac_cv_func_connect=yes"
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_func_connect=no"
5214 fi
5215 rm -f conftest*
5216
5217 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5218   echo "$ac_t""yes" 1>&6
5219   :
5220 else
5221   echo "$ac_t""no" 1>&6
5222 fi
5223
5224     if test $ac_cv_func_connect = no; then
5225       
5226 xe_msg_checking="for connect in -lsocket"
5227 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5228 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5229 echo "configure:5230: checking "$xe_msg_checking"" >&5
5230 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5231
5232 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5233 cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236 /* Override any gcc2 internal prototype to avoid an error.  */
5237 /* We use char because int might match the return type of a gcc2
5238     builtin and then its argument prototype would still apply.  */
5239 char connect();
5240
5241 int main() {
5242 connect()
5243 ; return 0; }
5244 EOF
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5246   rm -rf conftest*
5247   eval "ac_cv_lib_$ac_lib_var=yes"
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251   rm -rf conftest*
5252   eval "ac_cv_lib_$ac_lib_var=no"
5253 fi
5254 rm -f conftest*
5255 xe_check_libs=""
5256
5257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5258   echo "$ac_t""yes" 1>&6
5259   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5260 else
5261   echo "$ac_t""no" 1>&6
5262 fi
5263
5264
5265     fi
5266
5267     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5268     echo $ac_n "checking for remove""... $ac_c" 1>&6
5269 echo "configure:5270: checking for remove" >&5
5270
5271 cat > conftest.$ac_ext <<EOF
5272 #line 5273 "configure"
5273 #include "confdefs.h"
5274 /* System header to define __stub macros and hopefully few prototypes,
5275     which can conflict with char remove(); below.  */
5276 #include <assert.h>
5277 /* Override any gcc2 internal prototype to avoid an error.  */
5278 /* We use char because int might match the return type of a gcc2
5279     builtin and then its argument prototype would still apply.  */
5280 char remove();
5281
5282 int main() {
5283
5284 /* The GNU C library defines this for functions which it implements
5285     to always fail with ENOSYS.  Some functions are actually named
5286     something starting with __ and the normal name is an alias.  */
5287 #if defined (__stub_remove) || defined (__stub___remove)
5288 choke me
5289 #else
5290 remove();
5291 #endif
5292
5293 ; return 0; }
5294 EOF
5295 if { (eval echo configure:5296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5296   rm -rf conftest*
5297   eval "ac_cv_func_remove=yes"
5298 else
5299   echo "configure: failed program was:" >&5
5300   cat conftest.$ac_ext >&5
5301   rm -rf conftest*
5302   eval "ac_cv_func_remove=no"
5303 fi
5304 rm -f conftest*
5305
5306 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5307   echo "$ac_t""yes" 1>&6
5308   :
5309 else
5310   echo "$ac_t""no" 1>&6
5311 fi
5312
5313     if test $ac_cv_func_remove = no; then
5314       
5315 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5316 echo "configure:5317: checking for remove in -lposix" >&5
5317 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5318
5319 xe_check_libs=" -lposix "
5320 cat > conftest.$ac_ext <<EOF
5321 #line 5322 "configure"
5322 #include "confdefs.h"
5323 /* Override any gcc2 internal prototype to avoid an error.  */
5324 /* We use char because int might match the return type of a gcc2
5325     builtin and then its argument prototype would still apply.  */
5326 char remove();
5327
5328 int main() {
5329 remove()
5330 ; return 0; }
5331 EOF
5332 if { (eval echo configure:5333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5333   rm -rf conftest*
5334   eval "ac_cv_lib_$ac_lib_var=yes"
5335 else
5336   echo "configure: failed program was:" >&5
5337   cat conftest.$ac_ext >&5
5338   rm -rf conftest*
5339   eval "ac_cv_lib_$ac_lib_var=no"
5340 fi
5341 rm -f conftest*
5342 xe_check_libs=""
5343
5344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5345   echo "$ac_t""yes" 1>&6
5346   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5347 else
5348   echo "$ac_t""no" 1>&6
5349 fi
5350
5351
5352     fi
5353
5354     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5355     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5356 echo "configure:5357: checking for shmat" >&5
5357
5358 cat > conftest.$ac_ext <<EOF
5359 #line 5360 "configure"
5360 #include "confdefs.h"
5361 /* System header to define __stub macros and hopefully few prototypes,
5362     which can conflict with char shmat(); below.  */
5363 #include <assert.h>
5364 /* Override any gcc2 internal prototype to avoid an error.  */
5365 /* We use char because int might match the return type of a gcc2
5366     builtin and then its argument prototype would still apply.  */
5367 char shmat();
5368
5369 int main() {
5370
5371 /* The GNU C library defines this for functions which it implements
5372     to always fail with ENOSYS.  Some functions are actually named
5373     something starting with __ and the normal name is an alias.  */
5374 #if defined (__stub_shmat) || defined (__stub___shmat)
5375 choke me
5376 #else
5377 shmat();
5378 #endif
5379
5380 ; return 0; }
5381 EOF
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5383   rm -rf conftest*
5384   eval "ac_cv_func_shmat=yes"
5385 else
5386   echo "configure: failed program was:" >&5
5387   cat conftest.$ac_ext >&5
5388   rm -rf conftest*
5389   eval "ac_cv_func_shmat=no"
5390 fi
5391 rm -f conftest*
5392
5393 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5394   echo "$ac_t""yes" 1>&6
5395   :
5396 else
5397   echo "$ac_t""no" 1>&6
5398 fi
5399
5400     if test $ac_cv_func_shmat = no; then
5401       
5402 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5403 echo "configure:5404: checking for shmat in -lipc" >&5
5404 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5405
5406 xe_check_libs=" -lipc "
5407 cat > conftest.$ac_ext <<EOF
5408 #line 5409 "configure"
5409 #include "confdefs.h"
5410 /* Override any gcc2 internal prototype to avoid an error.  */
5411 /* We use char because int might match the return type of a gcc2
5412     builtin and then its argument prototype would still apply.  */
5413 char shmat();
5414
5415 int main() {
5416 shmat()
5417 ; return 0; }
5418 EOF
5419 if { (eval echo configure:5420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5420   rm -rf conftest*
5421   eval "ac_cv_lib_$ac_lib_var=yes"
5422 else
5423   echo "configure: failed program was:" >&5
5424   cat conftest.$ac_ext >&5
5425   rm -rf conftest*
5426   eval "ac_cv_lib_$ac_lib_var=no"
5427 fi
5428 rm -f conftest*
5429 xe_check_libs=""
5430
5431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5432   echo "$ac_t""yes" 1>&6
5433   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5434 else
5435   echo "$ac_t""no" 1>&6
5436 fi
5437
5438
5439     fi
5440   fi
5441
5442   # Check for libraries that X11R6 Xt/Xaw programs need.
5443   ac_save_LDFLAGS="$LDFLAGS"
5444   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5445   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5446   # check for ICE first), but we must link in the order -lSM -lICE or
5447   # we get undefined symbols.  So assume we have SM if we have ICE.
5448   # These have to be linked with before -lX11, unlike the other
5449   # libraries we check for below, so use a different variable.
5450   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5451   
5452 xe_msg_checking="for IceConnectionNumber in -lICE"
5453 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5454 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5455 echo "configure:5456: checking "$xe_msg_checking"" >&5
5456 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5457
5458 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5459 cat > conftest.$ac_ext <<EOF
5460 #line 5461 "configure"
5461 #include "confdefs.h"
5462 /* Override any gcc2 internal prototype to avoid an error.  */
5463 /* We use char because int might match the return type of a gcc2
5464     builtin and then its argument prototype would still apply.  */
5465 char IceConnectionNumber();
5466
5467 int main() {
5468 IceConnectionNumber()
5469 ; return 0; }
5470 EOF
5471 if { (eval echo configure:5472: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5472   rm -rf conftest*
5473   eval "ac_cv_lib_$ac_lib_var=yes"
5474 else
5475   echo "configure: failed program was:" >&5
5476   cat conftest.$ac_ext >&5
5477   rm -rf conftest*
5478   eval "ac_cv_lib_$ac_lib_var=no"
5479 fi
5480 rm -f conftest*
5481 xe_check_libs=""
5482
5483 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5484   echo "$ac_t""yes" 1>&6
5485   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5486 else
5487   echo "$ac_t""no" 1>&6
5488 fi
5489
5490
5491   LDFLAGS="$ac_save_LDFLAGS"
5492
5493 fi
5494  # Autoconf claims to find X library and include dirs for us.
5495   if test "$no_x" = "yes"
5496   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5497   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5498   fi
5499 fi
5500
5501 case "$with_x11" in
5502   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5503   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5504 esac
5505
5506 if test "$with_x11" = "yes"; then
5507   { test "$extra_verbose" = "yes" && cat << \EOF
5508     Defining HAVE_X_WINDOWS
5509 EOF
5510 cat >> confdefs.h <<\EOF
5511 #define HAVE_X_WINDOWS 1
5512 EOF
5513 }
5514
5515   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5516   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5517
5518       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5519     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5520     if test -d "$lib_dir" -a -d "$inc_dir"; then
5521       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5522         x_libraries="$lib_dir $x_libraries"
5523         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5524       esac
5525       case "$x_includes" in "$inc_dir"* ) ;; *)
5526         x_includes="$inc_dir $x_includes"
5527         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5528       esac
5529       break;       fi
5530   done
5531
5532     for rel in "X11R6" "X11R5" "X11R4"; do
5533     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5534     if test -d "$lib_dir" -a -d "$inc_dir"; then
5535       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5536         x_libraries="$x_libraries $lib_dir"
5537         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5538       esac
5539       case "$x_includes" in "$inc_dir"* ) ;; *)
5540         x_includes="$x_includes $inc_dir"
5541         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5542       esac
5543       break;     fi
5544   done
5545
5546     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
5547
5548   ld_switch_x_site="$X_LIBS"
5549
5550   
5551 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5552     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5553   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5554   
5555         runpath="" runpath_dirs=""
5556   if test -n "$LD_RUN_PATH"; then
5557     runpath="$LD_RUN_PATH"
5558   elif test "$GCC" = "yes"; then
5559         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5560     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5561     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5562     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5563       case "$arg" in P,* | -L* | -R* )
5564         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5565           {
5566 xe_runpath_dir="$dir"
5567   test "$xe_runpath_dir" != "/lib"     -a \
5568         "$xe_runpath_dir" != "/usr/lib" -a \
5569         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5570   eval "$xe_add_unique_runpath_dir"
5571 }
5572         done ;;
5573       esac
5574     done
5575     ld_switch_run="$ld_switch_run_save"
5576     rm -f conftest*
5577   else
5578         for arg in $ld_switch_site $ld_switch_x_site; do
5579       case "$arg" in -L*) {
5580 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
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 };; esac
5586     done
5587         if test "$opsys $need_motif" = "sol2 yes"; then
5588       xe_runpath_dir="/opt/SUNWdt/lib";
5589       eval "$xe_add_unique_runpath_dir";
5590     fi
5591   fi 
5592   if test -n "$runpath"; then
5593     ld_switch_run="${dash_r}${runpath}"
5594     
5595 if test "$GCC" = "yes"; then
5596   set x $ld_switch_run; shift; ld_switch_run=""
5597   while test -n "$1"; do
5598     case $1 in
5599       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5600       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5601       -Xlinker* ) ;;
5602       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5603     esac
5604     shift
5605   done
5606 fi
5607     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5608   fi
5609 fi
5610
5611
5612   if test "$extra_verbose" = "yes"; then
5613     echo; echo "X11 compilation variables:"
5614     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5615     echo
5616   fi
5617
5618             bitmapdirs=
5619   if test "$x_includes" != NONE; then
5620     for i in $x_includes; do
5621       if test -d "$i/bitmaps"; then
5622         bitmapdirs="$i/bitmaps:$bitmapdirs"
5623       fi
5624       if test -d "$i/X11/bitmaps"; then
5625         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5626       fi
5627     done
5628     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5629   fi
5630   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5631     Defining BITMAPDIR = "$bitmapdirs"
5632 EOF
5633 cat >> confdefs.h <<EOF
5634 #define BITMAPDIR "$bitmapdirs"
5635 EOF
5636 }
5637
5638
5639     echo "checking for X defines extracted by xmkmf" 1>&6
5640 echo "configure:5641: checking for X defines extracted by xmkmf" >&5
5641   rm -fr conftestdir
5642   if mkdir conftestdir; then
5643     cd conftestdir
5644     cat > Imakefile <<'EOF'
5645 xetest:
5646         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5647 EOF
5648     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5649       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5650       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5651     fi
5652     cd ..
5653     rm -fr conftestdir
5654     for word in $xmkmf_defines; do
5655       case "$word" in
5656         -D*=* ) ;;
5657         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5658               { test "$extra_verbose" = "yes" && cat << EOF
5659     Defining $word
5660 EOF
5661 cat >> confdefs.h <<EOF
5662 #define $word 1
5663 EOF
5664 }
5665  ;;
5666       esac
5667     done
5668   fi
5669
5670     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5671 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5672 echo "configure:5673: checking for X11/Intrinsic.h" >&5
5673
5674 cat > conftest.$ac_ext <<EOF
5675 #line 5676 "configure"
5676 #include "confdefs.h"
5677 #include <X11/Intrinsic.h>
5678 EOF
5679 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5680 { (eval echo configure:5681: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5681 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5682 if test -z "$ac_err"; then
5683   rm -rf conftest*
5684   eval "ac_cv_header_$ac_safe=yes"
5685 else
5686   echo "$ac_err" >&5
5687   echo "configure: failed program was:" >&5
5688   cat conftest.$ac_ext >&5
5689   rm -rf conftest*
5690   eval "ac_cv_header_$ac_safe=no"
5691 fi
5692 rm -f conftest*
5693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5694   echo "$ac_t""yes" 1>&6
5695   :
5696 else
5697   echo "$ac_t""no" 1>&6
5698 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5699 fi
5700
5701
5702       
5703 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5704 echo "configure:5705: checking for XOpenDisplay in -lX11" >&5
5705 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5706
5707 xe_check_libs=" -lX11 "
5708 cat > conftest.$ac_ext <<EOF
5709 #line 5710 "configure"
5710 #include "confdefs.h"
5711 /* Override any gcc2 internal prototype to avoid an error.  */
5712 /* We use char because int might match the return type of a gcc2
5713     builtin and then its argument prototype would still apply.  */
5714 char XOpenDisplay();
5715
5716 int main() {
5717 XOpenDisplay()
5718 ; return 0; }
5719 EOF
5720 if { (eval echo configure:5721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5721   rm -rf conftest*
5722   eval "ac_cv_lib_$ac_lib_var=yes"
5723 else
5724   echo "configure: failed program was:" >&5
5725   cat conftest.$ac_ext >&5
5726   rm -rf conftest*
5727   eval "ac_cv_lib_$ac_lib_var=no"
5728 fi
5729 rm -f conftest*
5730 xe_check_libs=""
5731
5732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5733   echo "$ac_t""yes" 1>&6
5734   have_lib_x11=yes
5735 else
5736   echo "$ac_t""no" 1>&6
5737 fi
5738
5739
5740   if test "$have_lib_x11" != "yes"; then
5741     
5742 xe_msg_checking="for XGetFontProperty in -lX11"
5743 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5744 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5745 echo "configure:5746: checking "$xe_msg_checking"" >&5
5746 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5747
5748 xe_check_libs=" -lX11 -b i486-linuxaout"
5749 cat > conftest.$ac_ext <<EOF
5750 #line 5751 "configure"
5751 #include "confdefs.h"
5752 /* Override any gcc2 internal prototype to avoid an error.  */
5753 /* We use char because int might match the return type of a gcc2
5754     builtin and then its argument prototype would still apply.  */
5755 char XGetFontProperty();
5756
5757 int main() {
5758 XGetFontProperty()
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=no"
5769 fi
5770 rm -f conftest*
5771 xe_check_libs=""
5772
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5774   echo "$ac_t""yes" 1>&6
5775   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5776 else
5777   echo "$ac_t""no" 1>&6
5778 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5779 fi
5780
5781
5782   fi
5783   libs_x="-lX11"
5784   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5785
5786     
5787 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5788 echo "configure:5789: checking for XShapeSelectInput in -lXext" >&5
5789 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5790
5791 xe_check_libs=" -lXext "
5792 cat > conftest.$ac_ext <<EOF
5793 #line 5794 "configure"
5794 #include "confdefs.h"
5795 /* Override any gcc2 internal prototype to avoid an error.  */
5796 /* We use char because int might match the return type of a gcc2
5797     builtin and then its argument prototype would still apply.  */
5798 char XShapeSelectInput();
5799
5800 int main() {
5801 XShapeSelectInput()
5802 ; return 0; }
5803 EOF
5804 if { (eval echo configure:5805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5805   rm -rf conftest*
5806   eval "ac_cv_lib_$ac_lib_var=yes"
5807 else
5808   echo "configure: failed program was:" >&5
5809   cat conftest.$ac_ext >&5
5810   rm -rf conftest*
5811   eval "ac_cv_lib_$ac_lib_var=no"
5812 fi
5813 rm -f conftest*
5814 xe_check_libs=""
5815
5816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5817   echo "$ac_t""yes" 1>&6
5818   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5819 else
5820   echo "$ac_t""no" 1>&6
5821 fi
5822
5823
5824
5825     
5826 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5827 echo "configure:5828: checking for XtOpenDisplay in -lXt" >&5
5828 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5829
5830 xe_check_libs=" -lXt "
5831 cat > conftest.$ac_ext <<EOF
5832 #line 5833 "configure"
5833 #include "confdefs.h"
5834 /* Override any gcc2 internal prototype to avoid an error.  */
5835 /* We use char because int might match the return type of a gcc2
5836     builtin and then its argument prototype would still apply.  */
5837 char XtOpenDisplay();
5838
5839 int main() {
5840 XtOpenDisplay()
5841 ; return 0; }
5842 EOF
5843 if { (eval echo configure:5844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5844   rm -rf conftest*
5845   eval "ac_cv_lib_$ac_lib_var=yes"
5846 else
5847   echo "configure: failed program was:" >&5
5848   cat conftest.$ac_ext >&5
5849   rm -rf conftest*
5850   eval "ac_cv_lib_$ac_lib_var=no"
5851 fi
5852 rm -f conftest*
5853 xe_check_libs=""
5854
5855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5856   echo "$ac_t""yes" 1>&6
5857   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5858 else
5859   echo "$ac_t""no" 1>&6
5860 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5861 fi
5862
5863
5864
5865   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5866 echo "configure:5867: checking the version of X11 being used" >&5
5867   cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <X11/Intrinsic.h>
5871     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5872 EOF
5873 if { (eval echo configure:5874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5874 then
5875   ./conftest foobar; x11_release=$?
5876 else
5877   conftest_rc="$?"
5878   echo "configure: failed program was:" >&5
5879   cat conftest.$ac_ext >&5
5880   rm -fr conftest*
5881   x11_release=4
5882 fi
5883 rm -fr conftest*
5884   echo "$ac_t""R${x11_release}" 1>&6
5885   { test "$extra_verbose" = "yes" && cat << EOF
5886     Defining THIS_IS_X11R${x11_release}
5887 EOF
5888 cat >> confdefs.h <<EOF
5889 #define THIS_IS_X11R${x11_release} 1
5890 EOF
5891 }
5892
5893
5894   for ac_hdr in X11/Xlocale.h
5895 do
5896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5898 echo "configure:5899: checking for $ac_hdr" >&5
5899
5900 cat > conftest.$ac_ext <<EOF
5901 #line 5902 "configure"
5902 #include "confdefs.h"
5903 #include <$ac_hdr>
5904 EOF
5905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5906 { (eval echo configure:5907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5908 if test -z "$ac_err"; then
5909   rm -rf conftest*
5910   eval "ac_cv_header_$ac_safe=yes"
5911 else
5912   echo "$ac_err" >&5
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_header_$ac_safe=no"
5917 fi
5918 rm -f conftest*
5919 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5920   echo "$ac_t""yes" 1>&6
5921     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5922   { test "$extra_verbose" = "yes" && cat << EOF
5923     Defining $ac_tr_hdr
5924 EOF
5925 cat >> confdefs.h <<EOF
5926 #define $ac_tr_hdr 1
5927 EOF
5928 }
5929  
5930 else
5931   echo "$ac_t""no" 1>&6
5932 fi
5933 done
5934
5935
5936     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5937 echo "configure:5938: checking for XFree86" >&5
5938   if test -d "/usr/X386/include" -o \
5939           -f "/etc/XF86Config"    -o \
5940           -f "/etc/X11/XF86Config" -o \
5941           -f "/usr/X11R6/lib/X11/XF86Config"; then
5942     echo "$ac_t""yes" 1>&6
5943     { test "$extra_verbose" = "yes" && cat << \EOF
5944     Defining HAVE_XFREE386
5945 EOF
5946 cat >> confdefs.h <<\EOF
5947 #define HAVE_XFREE386 1
5948 EOF
5949 }
5950
5951   else
5952     echo "$ac_t""no" 1>&6
5953   fi
5954
5955     test -z "$with_xmu" && { 
5956 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5957 echo "configure:5958: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5958 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5959
5960 xe_check_libs=" -lXmu "
5961 cat > conftest.$ac_ext <<EOF
5962 #line 5963 "configure"
5963 #include "confdefs.h"
5964 /* Override any gcc2 internal prototype to avoid an error.  */
5965 /* We use char because int might match the return type of a gcc2
5966     builtin and then its argument prototype would still apply.  */
5967 char XmuReadBitmapDataFromFile();
5968
5969 int main() {
5970 XmuReadBitmapDataFromFile()
5971 ; return 0; }
5972 EOF
5973 if { (eval echo configure:5974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5974   rm -rf conftest*
5975   eval "ac_cv_lib_$ac_lib_var=yes"
5976 else
5977   echo "configure: failed program was:" >&5
5978   cat conftest.$ac_ext >&5
5979   rm -rf conftest*
5980   eval "ac_cv_lib_$ac_lib_var=no"
5981 fi
5982 rm -f conftest*
5983 xe_check_libs=""
5984
5985 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5986   echo "$ac_t""yes" 1>&6
5987   with_xmu=yes
5988 else
5989   echo "$ac_t""no" 1>&6
5990 with_xmu=no
5991 fi
5992
5993  }
5994   if test "$with_xmu" = "no"; then
5995     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5996    echo "    xemacs will be linked with \"xmu.o\""
5997  fi
5998   else
5999     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6000     { test "$extra_verbose" = "yes" && cat << \EOF
6001     Defining HAVE_XMU
6002 EOF
6003 cat >> confdefs.h <<\EOF
6004 #define HAVE_XMU 1
6005 EOF
6006 }
6007
6008   fi
6009
6010       
6011 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6012 echo "configure:6013: checking for main in -lXbsd" >&5
6013 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6014
6015 xe_check_libs=" -lXbsd "
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019
6020 int main() {
6021 main()
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_lib_$ac_lib_var=no"
6032 fi
6033 rm -f conftest*
6034 xe_check_libs=""
6035
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6037   echo "$ac_t""yes" 1>&6
6038   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6039 else
6040   echo "$ac_t""no" 1>&6
6041 fi
6042
6043
6044
6045     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6046         if test "$GCC" = "yes"; then
6047       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6048       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6049     else
6050       case "$CC" in
6051         "xlc" ) CC="xlc_r" ;;
6052         "xlC" ) CC="xlC_r" ;;
6053         "cc"  ) CC="cc_r" ;;
6054       esac
6055     fi
6056   fi
6057
6058 fi 
6059 if test "$with_msw" != "no"; then
6060   echo "checking for MS-Windows" 1>&6
6061 echo "configure:6062: checking for MS-Windows" >&5
6062   
6063 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6064 echo "configure:6065: checking for main in -lgdi32" >&5
6065 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6066
6067 xe_check_libs=" -lgdi32 "
6068 cat > conftest.$ac_ext <<EOF
6069 #line 6070 "configure"
6070 #include "confdefs.h"
6071
6072 int main() {
6073 main()
6074 ; return 0; }
6075 EOF
6076 if { (eval echo configure:6077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6077   rm -rf conftest*
6078   eval "ac_cv_lib_$ac_lib_var=yes"
6079 else
6080   echo "configure: failed program was:" >&5
6081   cat conftest.$ac_ext >&5
6082   rm -rf conftest*
6083   eval "ac_cv_lib_$ac_lib_var=no"
6084 fi
6085 rm -f conftest*
6086 xe_check_libs=""
6087
6088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6089   echo "$ac_t""yes" 1>&6
6090   with_msw=yes
6091 else
6092   echo "$ac_t""no" 1>&6
6093 fi
6094
6095
6096   if test "$with_msw" = "yes"; then
6097     { test "$extra_verbose" = "yes" && cat << \EOF
6098     Defining HAVE_MS_WINDOWS
6099 EOF
6100 cat >> confdefs.h <<\EOF
6101 #define HAVE_MS_WINDOWS 1
6102 EOF
6103 }
6104
6105     install_pp="$blddir/lib-src/installexe.sh"
6106     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
6107     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6108     if test "$window_system" != x11; then
6109         window_system=msw
6110         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6111             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6112    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6113  fi
6114         test "$with_menubars"   != "no" && with_menubars=msw \
6115             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6116    echo "    xemacs will be linked with \"menubar-msw.o\""
6117  fi
6118         test "$with_toolbars"   != "no" && with_toolbars=msw \
6119             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6120    echo "    xemacs will be linked with \"toolbar-msw.o\""
6121  fi
6122         test "$with_dialogs"   != "no" && with_dialogs=msw \
6123             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6124    echo "    xemacs will be linked with \"dialog-msw.o\""
6125  fi
6126         test "$with_widgets"   != "no" && with_widgets=msw
6127     else
6128         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6129    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6130  fi
6131         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6132    echo "    xemacs will be linked with \"menubar-msw.o\""
6133  fi
6134         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6135    echo "    xemacs will be linked with \"toolbar-msw.o\""
6136  fi
6137         test "$with_dialogs"    != "no" && 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     fi
6141         cat > conftest.$ac_ext <<EOF
6142 #line 6143 "configure"
6143 #include "confdefs.h"
6144 #include <fcntl.h>
6145     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6146 EOF
6147 if { (eval echo configure:6148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6148 then
6149   { test "$extra_verbose" = "yes" && cat << \EOF
6150     Defining HAVE_MSG_SELECT
6151 EOF
6152 cat >> confdefs.h <<\EOF
6153 #define HAVE_MSG_SELECT 1
6154 EOF
6155 }
6156
6157 else
6158   conftest_rc="$?"
6159   echo "configure: failed program was:" >&5
6160   cat conftest.$ac_ext >&5
6161 fi
6162 rm -fr conftest*
6163     const_is_losing=no
6164     with_file_coding=yes
6165     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
6166    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\""
6167  fi
6168   fi
6169 fi
6170
6171
6172
6173 test -z "$window_system" && window_system="none"
6174
6175 if test "$window_system" = "none"; then
6176   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6177   do
6178     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6179        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6180     fi
6181     eval "with_${feature}=no"
6182   done
6183 else
6184   test -z "$with_toolbars" && with_toolbars=yes
6185 fi
6186
6187 if test "$with_msw" != "yes"; then
6188   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6189   do
6190     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6191        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6192     fi
6193     eval "with_${feature}=no"
6194   done
6195 else
6196   :
6197 fi
6198
6199 if test "$with_x11" != "yes"; then
6200             for feature in tooltalk cde offix wmcommand xim xmu
6201   do
6202     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6203        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6204     fi
6205     eval "with_${feature}=no"
6206   done
6207 fi
6208
6209 bitmapdir=
6210
6211 case "$window_system" in
6212   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6213   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6214   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6215 esac
6216
6217 case "$x_libraries" in *X11R4* )
6218   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6219   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6220 esac
6221
6222 echo "checking for WM_COMMAND option" 1>&6
6223 echo "configure:6224: checking for WM_COMMAND option" >&5;
6224 if test "$with_wmcommand" != "no"; then
6225   { test "$extra_verbose" = "yes" && cat << \EOF
6226     Defining HAVE_WMCOMMAND
6227 EOF
6228 cat >> confdefs.h <<\EOF
6229 #define HAVE_WMCOMMAND 1
6230 EOF
6231 }
6232
6233 fi
6234
6235 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6236 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6237 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6238 echo "configure:6239: checking for X11/Xauth.h" >&5
6239
6240 cat > conftest.$ac_ext <<EOF
6241 #line 6242 "configure"
6242 #include "confdefs.h"
6243 #include <X11/Xauth.h>
6244 EOF
6245 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6246 { (eval echo configure:6247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6247 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6248 if test -z "$ac_err"; then
6249   rm -rf conftest*
6250   eval "ac_cv_header_$ac_safe=yes"
6251 else
6252   echo "$ac_err" >&5
6253   echo "configure: failed program was:" >&5
6254   cat conftest.$ac_ext >&5
6255   rm -rf conftest*
6256   eval "ac_cv_header_$ac_safe=no"
6257 fi
6258 rm -f conftest*
6259 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6260   echo "$ac_t""yes" 1>&6
6261   :
6262 else
6263   echo "$ac_t""no" 1>&6
6264 with_xauth=no
6265 fi
6266  }
6267 test -z "$with_xauth" && { 
6268 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6269 echo "configure:6270: checking for XauGetAuthByAddr in -lXau" >&5
6270 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lXau "
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 /* Override any gcc2 internal prototype to avoid an error.  */
6277 /* We use char because int might match the return type of a gcc2
6278     builtin and then its argument prototype would still apply.  */
6279 char XauGetAuthByAddr();
6280
6281 int main() {
6282 XauGetAuthByAddr()
6283 ; return 0; }
6284 EOF
6285 if { (eval echo configure:6286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6286   rm -rf conftest*
6287   eval "ac_cv_lib_$ac_lib_var=yes"
6288 else
6289   echo "configure: failed program was:" >&5
6290   cat conftest.$ac_ext >&5
6291   rm -rf conftest*
6292   eval "ac_cv_lib_$ac_lib_var=no"
6293 fi
6294 rm -f conftest*
6295 xe_check_libs=""
6296
6297 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6298   echo "$ac_t""yes" 1>&6
6299   :
6300 else
6301   echo "$ac_t""no" 1>&6
6302 with_xauth=no
6303 fi
6304
6305  }
6306 test -z "$with_xauth" && with_xauth=yes
6307 if test "$with_xauth" = "yes"; then
6308   { test "$extra_verbose" = "yes" && cat << \EOF
6309     Defining HAVE_XAUTH
6310 EOF
6311 cat >> confdefs.h <<\EOF
6312 #define HAVE_XAUTH 1
6313 EOF
6314 }
6315
6316   
6317 T=""
6318 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
6319 libs_xauth="$T"
6320
6321 fi
6322
6323
6324
6325
6326 if test "$with_tooltalk" != "no" ; then
6327       for dir in "" "Tt/" "desktop/" ; do
6328     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6329 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6330 echo "configure:6331: checking for ${dir}tt_c.h" >&5
6331
6332 cat > conftest.$ac_ext <<EOF
6333 #line 6334 "configure"
6334 #include "confdefs.h"
6335 #include <${dir}tt_c.h>
6336 EOF
6337 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6338 { (eval echo configure:6339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6339 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6340 if test -z "$ac_err"; then
6341   rm -rf conftest*
6342   eval "ac_cv_header_$ac_safe=yes"
6343 else
6344   echo "$ac_err" >&5
6345   echo "configure: failed program was:" >&5
6346   cat conftest.$ac_ext >&5
6347   rm -rf conftest*
6348   eval "ac_cv_header_$ac_safe=no"
6349 fi
6350 rm -f conftest*
6351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6352   echo "$ac_t""yes" 1>&6
6353   tt_c_h_path="${dir}tt_c.h"; break
6354 else
6355   echo "$ac_t""no" 1>&6
6356 fi
6357
6358   done
6359   if test -z "$tt_c_h_path"; then
6360     if test "$with_tooltalk" = "yes"; then
6361       (echo "$progname: Usage error:"
6362 echo " " "Unable to find required tooltalk header files."
6363 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6364     fi
6365     with_tooltalk=no
6366   fi
6367 fi
6368 if test "$with_tooltalk" != "no" ; then
6369   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6370     
6371 xe_msg_checking="for tt_message_create in -ltt"
6372 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6373 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6374 echo "configure:6375: checking "$xe_msg_checking"" >&5
6375 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6376
6377 xe_check_libs=" -ltt $extra_libs"
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6381 /* Override any gcc2 internal prototype to avoid an error.  */
6382 /* We use char because int might match the return type of a gcc2
6383     builtin and then its argument prototype would still apply.  */
6384 char tt_message_create();
6385
6386 int main() {
6387 tt_message_create()
6388 ; return 0; }
6389 EOF
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6391   rm -rf conftest*
6392   eval "ac_cv_lib_$ac_lib_var=yes"
6393 else
6394   echo "configure: failed program was:" >&5
6395   cat conftest.$ac_ext >&5
6396   rm -rf conftest*
6397   eval "ac_cv_lib_$ac_lib_var=no"
6398 fi
6399 rm -f conftest*
6400 xe_check_libs=""
6401
6402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6403   echo "$ac_t""yes" 1>&6
6404   tt_libs="-ltt $extra_libs"; break
6405 else
6406   echo "$ac_t""no" 1>&6
6407 :
6408 fi
6409
6410
6411   done
6412   if test -z "$tt_libs"; then
6413     if test "$with_tooltalk" = "yes"; then
6414       (echo "$progname: Usage error:"
6415 echo " " "Unable to find required tooltalk libraries."
6416 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6417     fi
6418     with_tooltalk=no
6419   fi
6420 fi
6421 test -z "$with_tooltalk" && with_tooltalk=yes
6422 if test "$with_tooltalk" = "yes"; then
6423   { test "$extra_verbose" = "yes" && cat << \EOF
6424     Defining TOOLTALK
6425 EOF
6426 cat >> confdefs.h <<\EOF
6427 #define TOOLTALK 1
6428 EOF
6429 }
6430
6431   { test "$extra_verbose" = "yes" && cat << EOF
6432     Defining TT_C_H_PATH = "$tt_c_h_path"
6433 EOF
6434 cat >> confdefs.h <<EOF
6435 #define TT_C_H_PATH "$tt_c_h_path"
6436 EOF
6437 }
6438
6439   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6440   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6441    echo "    xemacs will be linked with \"tooltalk.o\""
6442  fi
6443 fi
6444
6445 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6446 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6447 echo "configure:6448: checking for Dt/Dt.h" >&5
6448
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 #include <Dt/Dt.h>
6453 EOF
6454 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6455 { (eval echo configure:6456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6456 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6457 if test -z "$ac_err"; then
6458   rm -rf conftest*
6459   eval "ac_cv_header_$ac_safe=yes"
6460 else
6461   echo "$ac_err" >&5
6462   echo "configure: failed program was:" >&5
6463   cat conftest.$ac_ext >&5
6464   rm -rf conftest*
6465   eval "ac_cv_header_$ac_safe=no"
6466 fi
6467 rm -f conftest*
6468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6469   echo "$ac_t""yes" 1>&6
6470   :
6471 else
6472   echo "$ac_t""no" 1>&6
6473 with_cde=no
6474 fi
6475  }
6476 test -z "$with_cde" && { 
6477 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6478 echo "configure:6479: checking for DtDndDragStart in -lDtSvc" >&5
6479 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6480
6481 xe_check_libs=" -lDtSvc "
6482 cat > conftest.$ac_ext <<EOF
6483 #line 6484 "configure"
6484 #include "confdefs.h"
6485 /* Override any gcc2 internal prototype to avoid an error.  */
6486 /* We use char because int might match the return type of a gcc2
6487     builtin and then its argument prototype would still apply.  */
6488 char DtDndDragStart();
6489
6490 int main() {
6491 DtDndDragStart()
6492 ; return 0; }
6493 EOF
6494 if { (eval echo configure:6495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6495   rm -rf conftest*
6496   eval "ac_cv_lib_$ac_lib_var=yes"
6497 else
6498   echo "configure: failed program was:" >&5
6499   cat conftest.$ac_ext >&5
6500   rm -rf conftest*
6501   eval "ac_cv_lib_$ac_lib_var=no"
6502 fi
6503 rm -f conftest*
6504 xe_check_libs=""
6505
6506 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6507   echo "$ac_t""yes" 1>&6
6508   :
6509 else
6510   echo "$ac_t""no" 1>&6
6511 with_cde=no
6512 fi
6513
6514  }
6515 test -z "$with_cde" && with_cde=yes
6516 if test "$with_dragndrop" = no; then
6517   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6518   with_cde=no
6519 fi
6520 if test "$with_cde" = "yes" ; then
6521   { test "$extra_verbose" = "yes" && cat << \EOF
6522     Defining HAVE_CDE
6523 EOF
6524 cat >> confdefs.h <<\EOF
6525 #define HAVE_CDE 1
6526 EOF
6527 }
6528
6529   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6530   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6531   with_tooltalk=yes # CDE requires Tooltalk
6532   need_motif=yes    # CDE requires Motif
6533 fi
6534
6535 test "$window_system" != "x11" && with_offix=no
6536 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6537   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6538   with_offix=no
6539 fi
6540 if test "$with_dragndrop" = no; then
6541   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6542   with_offix=no
6543 fi
6544 if test "$with_cde" = yes; then
6545   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6546   with_offix=no
6547 fi
6548 test -z "$with_offix" && with_offix=no
6549 if test "$with_offix" = "yes"; then
6550   { test "$extra_verbose" = "yes" && cat << \EOF
6551     Defining HAVE_OFFIX_DND
6552 EOF
6553 cat >> confdefs.h <<\EOF
6554 #define HAVE_OFFIX_DND 1
6555 EOF
6556 }
6557
6558   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6559   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6560 fi
6561
6562 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6563 echo "configure:6564: checking if drag and drop API is needed" >&5
6564 if test "$with_dragndrop" != "no" ; then
6565   if test -n "$dragndrop_proto" ; then
6566     with_dragndrop=yes
6567     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6568     { test "$extra_verbose" = "yes" && cat << \EOF
6569     Defining HAVE_DRAGNDROP
6570 EOF
6571 cat >> confdefs.h <<\EOF
6572 #define HAVE_DRAGNDROP 1
6573 EOF
6574 }
6575
6576     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6577   else
6578     with_dragndrop=no
6579     echo "$ac_t""no" 1>&6
6580   fi
6581 fi
6582
6583 echo "checking for LDAP" 1>&6
6584 echo "configure:6585: checking for LDAP" >&5
6585 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6586 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6587 echo "configure:6588: checking for ldap.h" >&5
6588
6589 cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 #include <ldap.h>
6593 EOF
6594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6595 { (eval echo configure:6596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6597 if test -z "$ac_err"; then
6598   rm -rf conftest*
6599   eval "ac_cv_header_$ac_safe=yes"
6600 else
6601   echo "$ac_err" >&5
6602   echo "configure: failed program was:" >&5
6603   cat conftest.$ac_ext >&5
6604   rm -rf conftest*
6605   eval "ac_cv_header_$ac_safe=no"
6606 fi
6607 rm -f conftest*
6608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6609   echo "$ac_t""yes" 1>&6
6610   :
6611 else
6612   echo "$ac_t""no" 1>&6
6613 with_ldap=no
6614 fi
6615  }
6616 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6617 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6618 echo "configure:6619: checking for lber.h" >&5
6619
6620 cat > conftest.$ac_ext <<EOF
6621 #line 6622 "configure"
6622 #include "confdefs.h"
6623 #include <lber.h>
6624 EOF
6625 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6626 { (eval echo configure:6627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6627 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6628 if test -z "$ac_err"; then
6629   rm -rf conftest*
6630   eval "ac_cv_header_$ac_safe=yes"
6631 else
6632   echo "$ac_err" >&5
6633   echo "configure: failed program was:" >&5
6634   cat conftest.$ac_ext >&5
6635   rm -rf conftest*
6636   eval "ac_cv_header_$ac_safe=no"
6637 fi
6638 rm -f conftest*
6639 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6640   echo "$ac_t""yes" 1>&6
6641   :
6642 else
6643   echo "$ac_t""no" 1>&6
6644 with_ldap=no
6645 fi
6646  }
6647 if test "$with_ldap" != "no"; then
6648   
6649 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6650 echo "configure:6651: checking for ldap_search in -lldap" >&5
6651 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6652
6653 xe_check_libs=" -lldap "
6654 cat > conftest.$ac_ext <<EOF
6655 #line 6656 "configure"
6656 #include "confdefs.h"
6657 /* Override any gcc2 internal prototype to avoid an error.  */
6658 /* We use char because int might match the return type of a gcc2
6659     builtin and then its argument prototype would still apply.  */
6660 char ldap_search();
6661
6662 int main() {
6663 ldap_search()
6664 ; return 0; }
6665 EOF
6666 if { (eval echo configure:6667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6667   rm -rf conftest*
6668   eval "ac_cv_lib_$ac_lib_var=yes"
6669 else
6670   echo "configure: failed program was:" >&5
6671   cat conftest.$ac_ext >&5
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=no"
6674 fi
6675 rm -f conftest*
6676 xe_check_libs=""
6677
6678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6679   echo "$ac_t""yes" 1>&6
6680   with_ldap_nolber=yes
6681 else
6682   echo "$ac_t""no" 1>&6
6683 with_ldap_nolber=no
6684 fi
6685
6686
6687   test "$with_ldap_nolber" = "no" && { 
6688 xe_msg_checking="for ldap_open in -lldap"
6689 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6690 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6691 echo "configure:6692: checking "$xe_msg_checking"" >&5
6692 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6693
6694 xe_check_libs=" -lldap -llber"
6695 cat > conftest.$ac_ext <<EOF
6696 #line 6697 "configure"
6697 #include "confdefs.h"
6698 /* Override any gcc2 internal prototype to avoid an error.  */
6699 /* We use char because int might match the return type of a gcc2
6700     builtin and then its argument prototype would still apply.  */
6701 char ldap_open();
6702
6703 int main() {
6704 ldap_open()
6705 ; return 0; }
6706 EOF
6707 if { (eval echo configure:6708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6708   rm -rf conftest*
6709   eval "ac_cv_lib_$ac_lib_var=yes"
6710 else
6711   echo "configure: failed program was:" >&5
6712   cat conftest.$ac_ext >&5
6713   rm -rf conftest*
6714   eval "ac_cv_lib_$ac_lib_var=no"
6715 fi
6716 rm -f conftest*
6717 xe_check_libs=""
6718
6719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6720   echo "$ac_t""yes" 1>&6
6721   with_ldap_lber=yes
6722 else
6723   echo "$ac_t""no" 1>&6
6724 with_ldap_lber=no
6725 fi
6726
6727  }
6728   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6729 xe_msg_checking="for ldap_open in -lldap"
6730 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6731 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6732 echo "configure:6733: checking "$xe_msg_checking"" >&5
6733 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6734
6735 xe_check_libs=" -lldap -llber -lkrb"
6736 cat > conftest.$ac_ext <<EOF
6737 #line 6738 "configure"
6738 #include "confdefs.h"
6739 /* Override any gcc2 internal prototype to avoid an error.  */
6740 /* We use char because int might match the return type of a gcc2
6741     builtin and then its argument prototype would still apply.  */
6742 char ldap_open();
6743
6744 int main() {
6745 ldap_open()
6746 ; return 0; }
6747 EOF
6748 if { (eval echo configure:6749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6749   rm -rf conftest*
6750   eval "ac_cv_lib_$ac_lib_var=yes"
6751 else
6752   echo "configure: failed program was:" >&5
6753   cat conftest.$ac_ext >&5
6754   rm -rf conftest*
6755   eval "ac_cv_lib_$ac_lib_var=no"
6756 fi
6757 rm -f conftest*
6758 xe_check_libs=""
6759
6760 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6761   echo "$ac_t""yes" 1>&6
6762   with_ldap_krb=yes
6763 else
6764   echo "$ac_t""no" 1>&6
6765 with_ldap_krb=no
6766 fi
6767
6768  }
6769   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6770 xe_msg_checking="for ldap_open in -lldap"
6771 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6772 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6773 echo "configure:6774: checking "$xe_msg_checking"" >&5
6774 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6775
6776 xe_check_libs=" -lldap -llber -lkrb -ldes"
6777 cat > conftest.$ac_ext <<EOF
6778 #line 6779 "configure"
6779 #include "confdefs.h"
6780 /* Override any gcc2 internal prototype to avoid an error.  */
6781 /* We use char because int might match the return type of a gcc2
6782     builtin and then its argument prototype would still apply.  */
6783 char ldap_open();
6784
6785 int main() {
6786 ldap_open()
6787 ; return 0; }
6788 EOF
6789 if { (eval echo configure:6790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6790   rm -rf conftest*
6791   eval "ac_cv_lib_$ac_lib_var=yes"
6792 else
6793   echo "configure: failed program was:" >&5
6794   cat conftest.$ac_ext >&5
6795   rm -rf conftest*
6796   eval "ac_cv_lib_$ac_lib_var=no"
6797 fi
6798 rm -f conftest*
6799 xe_check_libs=""
6800
6801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6802   echo "$ac_t""yes" 1>&6
6803   with_ldap_krbdes=yes
6804 else
6805   echo "$ac_t""no" 1>&6
6806 with_ldap_krbdes=no
6807 fi
6808
6809  }
6810   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
6811 fi
6812 if test "$with_ldap" = "yes"; then
6813   { test "$extra_verbose" = "yes" && cat << \EOF
6814     Defining HAVE_LDAP
6815 EOF
6816 cat >> confdefs.h <<\EOF
6817 #define HAVE_LDAP 1
6818 EOF
6819 }
6820
6821   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6822    echo "    xemacs will be linked with \"eldap.o\""
6823  fi
6824   if test "$with_ldap_nolber" = "yes" ; then
6825     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6826   else
6827     if test "$with_ldap_krb" = "yes" ; then
6828       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6829     fi
6830     if test "$with_ldap_krbdes" = "yes" ; then
6831       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
6832       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
6833     fi
6834     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6835     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6836   fi
6837   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
6838 do
6839 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6840 echo "configure:6841: checking for $ac_func" >&5
6841
6842 cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845 /* System header to define __stub macros and hopefully few prototypes,
6846     which can conflict with char $ac_func(); below.  */
6847 #include <assert.h>
6848 /* Override any gcc2 internal prototype to avoid an error.  */
6849 /* We use char because int might match the return type of a gcc2
6850     builtin and then its argument prototype would still apply.  */
6851 char $ac_func();
6852
6853 int main() {
6854
6855 /* The GNU C library defines this for functions which it implements
6856     to always fail with ENOSYS.  Some functions are actually named
6857     something starting with __ and the normal name is an alias.  */
6858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6859 choke me
6860 #else
6861 $ac_func();
6862 #endif
6863
6864 ; return 0; }
6865 EOF
6866 if { (eval echo configure:6867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6867   rm -rf conftest*
6868   eval "ac_cv_func_$ac_func=yes"
6869 else
6870   echo "configure: failed program was:" >&5
6871   cat conftest.$ac_ext >&5
6872   rm -rf conftest*
6873   eval "ac_cv_func_$ac_func=no"
6874 fi
6875 rm -f conftest*
6876
6877 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6878   echo "$ac_t""yes" 1>&6
6879     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6880   { test "$extra_verbose" = "yes" && cat << EOF
6881     Defining $ac_tr_func
6882 EOF
6883 cat >> confdefs.h <<EOF
6884 #define $ac_tr_func 1
6885 EOF
6886 }
6887  
6888 else
6889   echo "$ac_t""no" 1>&6
6890 fi
6891 done
6892
6893 fi
6894
6895
6896 if test "$window_system" != "none"; then
6897   echo "checking for graphics libraries" 1>&6
6898 echo "configure:6899: checking for graphics libraries" >&5
6899
6900     xpm_problem=""
6901   if test -z "$with_xpm"; then
6902     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6903 echo "configure:6904: checking for Xpm - no older than 3.4f" >&5
6904     xe_check_libs=-lXpm
6905     cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908 #include <X11/xpm.h>
6909     int main(int c, char **v) {
6910     return c == 1 ? 0 :
6911       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6912       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6913 EOF
6914 if { (eval echo configure:6915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6915 then
6916   ./conftest dummy_arg; xpm_status=$?;
6917       if test "$xpm_status" = "0"; then
6918         with_xpm=yes;
6919       else
6920         with_xpm=no;
6921         if test "$xpm_status" = "1"; then
6922           xpm_problem="Xpm library version and header file version don't match!"
6923         elif test "$xpm_status" = "2"; then
6924           xpm_problem="Xpm library version is too old!"
6925         else
6926           xpm_problem="Internal xpm detection logic error!"
6927         fi
6928         echo "
6929 *** WARNING *** $xpm_problem
6930   I'm not touching that with a 10-foot pole!
6931   If you really want to use the installed version of Xpm, rerun
6932   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6933     fi
6934 else
6935   conftest_rc="$?"
6936   echo "configure: failed program was:" >&5
6937   cat conftest.$ac_ext >&5
6938   rm -fr conftest*
6939   with_xpm=no
6940 fi
6941 rm -fr conftest*
6942     xe_check_libs=
6943     echo "$ac_t""$with_xpm" 1>&6
6944   fi
6945   if test "$with_xpm" = "yes"; then
6946     { test "$extra_verbose" = "yes" && cat << \EOF
6947     Defining HAVE_XPM
6948 EOF
6949 cat >> confdefs.h <<\EOF
6950 #define HAVE_XPM 1
6951 EOF
6952 }
6953
6954     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6955     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6956 echo "configure:6957: checking for \"FOR_MSW\" xpm" >&5
6957     xe_check_libs=-lXpm
6958     cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6961
6962 int main() {
6963 XpmCreatePixmapFromData()
6964 ; return 0; }
6965 EOF
6966 if { (eval echo configure:6967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6967   rm -rf conftest*
6968   xpm_for_msw=no
6969 else
6970   echo "configure: failed program was:" >&5
6971   cat conftest.$ac_ext >&5
6972   rm -rf conftest*
6973   xpm_for_msw=yes
6974 fi
6975 rm -f conftest*
6976     xe_check_libs=
6977     echo "$ac_t""$xpm_for_msw" 1>&6
6978     if test "$xpm_for_msw" = "yes"; then
6979       { test "$extra_verbose" = "yes" && cat << \EOF
6980     Defining FOR_MSW
6981 EOF
6982 cat >> confdefs.h <<\EOF
6983 #define FOR_MSW 1
6984 EOF
6985 }
6986
6987     fi
6988   fi
6989
6990     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
6991 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
6992 echo "configure:6993: checking for compface.h" >&5
6993
6994 cat > conftest.$ac_ext <<EOF
6995 #line 6996 "configure"
6996 #include "confdefs.h"
6997 #include <compface.h>
6998 EOF
6999 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7000 { (eval echo configure:7001: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7001 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7002 if test -z "$ac_err"; then
7003   rm -rf conftest*
7004   eval "ac_cv_header_$ac_safe=yes"
7005 else
7006   echo "$ac_err" >&5
7007   echo "configure: failed program was:" >&5
7008   cat conftest.$ac_ext >&5
7009   rm -rf conftest*
7010   eval "ac_cv_header_$ac_safe=no"
7011 fi
7012 rm -f conftest*
7013 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7014   echo "$ac_t""yes" 1>&6
7015   :
7016 else
7017   echo "$ac_t""no" 1>&6
7018 with_xface=no
7019 fi
7020  }
7021   test -z "$with_xface" && { 
7022 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7023 echo "configure:7024: checking for UnGenFace in -lcompface" >&5
7024 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7025
7026 xe_check_libs=" -lcompface "
7027 cat > conftest.$ac_ext <<EOF
7028 #line 7029 "configure"
7029 #include "confdefs.h"
7030 /* Override any gcc2 internal prototype to avoid an error.  */
7031 /* We use char because int might match the return type of a gcc2
7032     builtin and then its argument prototype would still apply.  */
7033 char UnGenFace();
7034
7035 int main() {
7036 UnGenFace()
7037 ; return 0; }
7038 EOF
7039 if { (eval echo configure:7040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7040   rm -rf conftest*
7041   eval "ac_cv_lib_$ac_lib_var=yes"
7042 else
7043   echo "configure: failed program was:" >&5
7044   cat conftest.$ac_ext >&5
7045   rm -rf conftest*
7046   eval "ac_cv_lib_$ac_lib_var=no"
7047 fi
7048 rm -f conftest*
7049 xe_check_libs=""
7050
7051 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7052   echo "$ac_t""yes" 1>&6
7053   : 
7054 else
7055   echo "$ac_t""no" 1>&6
7056 with_xface=no
7057 fi
7058
7059  }
7060   test -z "$with_xface" && with_xface=yes
7061   if test "$with_xface" = "yes"; then
7062     { test "$extra_verbose" = "yes" && cat << \EOF
7063     Defining HAVE_XFACE
7064 EOF
7065 cat >> confdefs.h <<\EOF
7066 #define HAVE_XFACE 1
7067 EOF
7068 }
7069
7070     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7071   fi
7072
7073         if test "$with_gif" != "no"; then
7074     with_gif="yes"
7075     { test "$extra_verbose" = "yes" && cat << \EOF
7076     Defining HAVE_GIF
7077 EOF
7078 cat >> confdefs.h <<\EOF
7079 #define HAVE_GIF 1
7080 EOF
7081 }
7082
7083     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7084    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7085  fi
7086   fi
7087
7088       if test "$with_png $with_tiff" != "no no"; then
7089     
7090 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7091 echo "configure:7092: checking for inflate in -lc" >&5
7092 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7093
7094 xe_check_libs=" -lc "
7095 cat > conftest.$ac_ext <<EOF
7096 #line 7097 "configure"
7097 #include "confdefs.h"
7098 /* Override any gcc2 internal prototype to avoid an error.  */
7099 /* We use char because int might match the return type of a gcc2
7100     builtin and then its argument prototype would still apply.  */
7101 char inflate();
7102
7103 int main() {
7104 inflate()
7105 ; return 0; }
7106 EOF
7107 if { (eval echo configure:7108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7108   rm -rf conftest*
7109   eval "ac_cv_lib_$ac_lib_var=yes"
7110 else
7111   echo "configure: failed program was:" >&5
7112   cat conftest.$ac_ext >&5
7113   rm -rf conftest*
7114   eval "ac_cv_lib_$ac_lib_var=no"
7115 fi
7116 rm -f conftest*
7117 xe_check_libs=""
7118
7119 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7120   echo "$ac_t""yes" 1>&6
7121   :
7122 else
7123   echo "$ac_t""no" 1>&6
7124
7125 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7126 echo "configure:7127: checking for inflate in -lz" >&5
7127 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7128
7129 xe_check_libs=" -lz "
7130 cat > conftest.$ac_ext <<EOF
7131 #line 7132 "configure"
7132 #include "confdefs.h"
7133 /* Override any gcc2 internal prototype to avoid an error.  */
7134 /* We use char because int might match the return type of a gcc2
7135     builtin and then its argument prototype would still apply.  */
7136 char inflate();
7137
7138 int main() {
7139 inflate()
7140 ; return 0; }
7141 EOF
7142 if { (eval echo configure:7143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7143   rm -rf conftest*
7144   eval "ac_cv_lib_$ac_lib_var=yes"
7145 else
7146   echo "configure: failed program was:" >&5
7147   cat conftest.$ac_ext >&5
7148   rm -rf conftest*
7149   eval "ac_cv_lib_$ac_lib_var=no"
7150 fi
7151 rm -f conftest*
7152 xe_check_libs=""
7153
7154 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7155   echo "$ac_t""yes" 1>&6
7156   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7157 else
7158   echo "$ac_t""no" 1>&6
7159
7160 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7161 echo "configure:7162: checking for inflate in -lgz" >&5
7162 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7163
7164 xe_check_libs=" -lgz "
7165 cat > conftest.$ac_ext <<EOF
7166 #line 7167 "configure"
7167 #include "confdefs.h"
7168 /* Override any gcc2 internal prototype to avoid an error.  */
7169 /* We use char because int might match the return type of a gcc2
7170     builtin and then its argument prototype would still apply.  */
7171 char inflate();
7172
7173 int main() {
7174 inflate()
7175 ; return 0; }
7176 EOF
7177 if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7178   rm -rf conftest*
7179   eval "ac_cv_lib_$ac_lib_var=yes"
7180 else
7181   echo "configure: failed program was:" >&5
7182   cat conftest.$ac_ext >&5
7183   rm -rf conftest*
7184   eval "ac_cv_lib_$ac_lib_var=no"
7185 fi
7186 rm -f conftest*
7187 xe_check_libs=""
7188
7189 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7190   echo "$ac_t""yes" 1>&6
7191   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7192 else
7193   echo "$ac_t""no" 1>&6
7194 fi
7195
7196
7197 fi
7198
7199
7200 fi
7201
7202
7203   fi
7204
7205     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7206 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7207 echo "configure:7208: checking for jpeglib.h" >&5
7208
7209 cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7212 #include <jpeglib.h>
7213 EOF
7214 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7215 { (eval echo configure:7216: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7216 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7217 if test -z "$ac_err"; then
7218   rm -rf conftest*
7219   eval "ac_cv_header_$ac_safe=yes"
7220 else
7221   echo "$ac_err" >&5
7222   echo "configure: failed program was:" >&5
7223   cat conftest.$ac_ext >&5
7224   rm -rf conftest*
7225   eval "ac_cv_header_$ac_safe=no"
7226 fi
7227 rm -f conftest*
7228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7229   echo "$ac_t""yes" 1>&6
7230   :
7231 else
7232   echo "$ac_t""no" 1>&6
7233 with_jpeg=no
7234 fi
7235  }
7236   test -z "$with_jpeg" && { 
7237 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7238 echo "configure:7239: checking for jpeg_destroy_decompress in -ljpeg" >&5
7239 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7240
7241 xe_check_libs=" -ljpeg "
7242 cat > conftest.$ac_ext <<EOF
7243 #line 7244 "configure"
7244 #include "confdefs.h"
7245 /* Override any gcc2 internal prototype to avoid an error.  */
7246 /* We use char because int might match the return type of a gcc2
7247     builtin and then its argument prototype would still apply.  */
7248 char jpeg_destroy_decompress();
7249
7250 int main() {
7251 jpeg_destroy_decompress()
7252 ; return 0; }
7253 EOF
7254 if { (eval echo configure:7255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7255   rm -rf conftest*
7256   eval "ac_cv_lib_$ac_lib_var=yes"
7257 else
7258   echo "configure: failed program was:" >&5
7259   cat conftest.$ac_ext >&5
7260   rm -rf conftest*
7261   eval "ac_cv_lib_$ac_lib_var=no"
7262 fi
7263 rm -f conftest*
7264 xe_check_libs=""
7265
7266 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7267   echo "$ac_t""yes" 1>&6
7268   :
7269 else
7270   echo "$ac_t""no" 1>&6
7271 with_jpeg=no
7272 fi
7273
7274  }
7275   test -z "$with_jpeg" && with_jpeg=yes
7276   if test "$with_jpeg" = "yes"; then
7277     { test "$extra_verbose" = "yes" && cat << \EOF
7278     Defining HAVE_JPEG
7279 EOF
7280 cat >> confdefs.h <<\EOF
7281 #define HAVE_JPEG 1
7282 EOF
7283 }
7284
7285     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7286   fi
7287
7288     png_problem=""
7289   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7290 echo "configure:7291: checking for pow" >&5
7291
7292 cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7295 /* System header to define __stub macros and hopefully few prototypes,
7296     which can conflict with char pow(); below.  */
7297 #include <assert.h>
7298 /* Override any gcc2 internal prototype to avoid an error.  */
7299 /* We use char because int might match the return type of a gcc2
7300     builtin and then its argument prototype would still apply.  */
7301 char pow();
7302
7303 int main() {
7304
7305 /* The GNU C library defines this for functions which it implements
7306     to always fail with ENOSYS.  Some functions are actually named
7307     something starting with __ and the normal name is an alias.  */
7308 #if defined (__stub_pow) || defined (__stub___pow)
7309 choke me
7310 #else
7311 pow();
7312 #endif
7313
7314 ; return 0; }
7315 EOF
7316 if { (eval echo configure:7317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7317   rm -rf conftest*
7318   eval "ac_cv_func_pow=yes"
7319 else
7320   echo "configure: failed program was:" >&5
7321   cat conftest.$ac_ext >&5
7322   rm -rf conftest*
7323   eval "ac_cv_func_pow=no"
7324 fi
7325 rm -f conftest*
7326
7327 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7328   echo "$ac_t""yes" 1>&6
7329   :
7330 else
7331   echo "$ac_t""no" 1>&6
7332 with_png=no
7333 fi
7334  }
7335   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7336 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7337 echo "configure:7338: checking for png.h" >&5
7338
7339 cat > conftest.$ac_ext <<EOF
7340 #line 7341 "configure"
7341 #include "confdefs.h"
7342 #include <png.h>
7343 EOF
7344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7345 { (eval echo configure:7346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7347 if test -z "$ac_err"; then
7348   rm -rf conftest*
7349   eval "ac_cv_header_$ac_safe=yes"
7350 else
7351   echo "$ac_err" >&5
7352   echo "configure: failed program was:" >&5
7353   cat conftest.$ac_ext >&5
7354   rm -rf conftest*
7355   eval "ac_cv_header_$ac_safe=no"
7356 fi
7357 rm -f conftest*
7358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7359   echo "$ac_t""yes" 1>&6
7360   :
7361 else
7362   echo "$ac_t""no" 1>&6
7363 with_png=no
7364 fi
7365  }
7366   test -z "$with_png" && { 
7367 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7368 echo "configure:7369: checking for png_read_image in -lpng" >&5
7369 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7370
7371 xe_check_libs=" -lpng "
7372 cat > conftest.$ac_ext <<EOF
7373 #line 7374 "configure"
7374 #include "confdefs.h"
7375 /* Override any gcc2 internal prototype to avoid an error.  */
7376 /* We use char because int might match the return type of a gcc2
7377     builtin and then its argument prototype would still apply.  */
7378 char png_read_image();
7379
7380 int main() {
7381 png_read_image()
7382 ; return 0; }
7383 EOF
7384 if { (eval echo configure:7385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7385   rm -rf conftest*
7386   eval "ac_cv_lib_$ac_lib_var=yes"
7387 else
7388   echo "configure: failed program was:" >&5
7389   cat conftest.$ac_ext >&5
7390   rm -rf conftest*
7391   eval "ac_cv_lib_$ac_lib_var=no"
7392 fi
7393 rm -f conftest*
7394 xe_check_libs=""
7395
7396 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7397   echo "$ac_t""yes" 1>&6
7398   :
7399 else
7400   echo "$ac_t""no" 1>&6
7401 with_png=no
7402 fi
7403
7404  }
7405   if test -z "$with_png"; then
7406     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7407 echo "configure:7408: checking for workable png version information" >&5
7408     xe_check_libs="-lpng -lz"
7409     cat > conftest.$ac_ext <<EOF
7410 #line 7411 "configure"
7411 #include "confdefs.h"
7412 #include <png.h>
7413     int main(int c, char **v) {
7414     if (c == 1) return 0;
7415     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7416     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7417 EOF
7418 if { (eval echo configure:7419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7419 then
7420   ./conftest dummy_arg; png_status=$?;
7421       if test "$png_status" = "0"; then
7422         with_png=yes;
7423       else
7424         with_png=no;
7425         if test "$png_status" = "1"; then
7426           png_problem="PNG library version and header file don't match!"
7427         elif test "$png_status" = "2"; then
7428           png_problem="PNG library version too old (pre 1.0.2)!"
7429         fi
7430         echo "
7431 *** WARNING *** $png_problem
7432   I'm not touching that with a 10-foot pole!
7433   If you really want to use the installed version of libPNG, rerun
7434   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7435     fi
7436 else
7437   conftest_rc="$?"
7438   echo "configure: failed program was:" >&5
7439   cat conftest.$ac_ext >&5
7440   rm -fr conftest*
7441   with_png=no
7442 fi
7443 rm -fr conftest*
7444     xe_check_libs=
7445     echo "$ac_t""$with_png" 1>&6
7446   fi
7447   if test "$with_png" = "yes"; then
7448     { test "$extra_verbose" = "yes" && cat << \EOF
7449     Defining HAVE_PNG
7450 EOF
7451 cat >> confdefs.h <<\EOF
7452 #define HAVE_PNG 1
7453 EOF
7454 }
7455
7456     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7457   fi
7458
7459     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7460 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7461 echo "configure:7462: checking for tiffio.h" >&5
7462
7463 cat > conftest.$ac_ext <<EOF
7464 #line 7465 "configure"
7465 #include "confdefs.h"
7466 #include <tiffio.h>
7467 EOF
7468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7469 { (eval echo configure:7470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7471 if test -z "$ac_err"; then
7472   rm -rf conftest*
7473   eval "ac_cv_header_$ac_safe=yes"
7474 else
7475   echo "$ac_err" >&5
7476   echo "configure: failed program was:" >&5
7477   cat conftest.$ac_ext >&5
7478   rm -rf conftest*
7479   eval "ac_cv_header_$ac_safe=no"
7480 fi
7481 rm -f conftest*
7482 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7483   echo "$ac_t""yes" 1>&6
7484   :
7485 else
7486   echo "$ac_t""no" 1>&6
7487 with_tiff=no
7488 fi
7489  }
7490   test -z "$with_tiff" && { 
7491 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7492 echo "configure:7493: checking for TIFFClientOpen in -ltiff" >&5
7493 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7494
7495 xe_check_libs=" -ltiff "
7496 cat > conftest.$ac_ext <<EOF
7497 #line 7498 "configure"
7498 #include "confdefs.h"
7499 /* Override any gcc2 internal prototype to avoid an error.  */
7500 /* We use char because int might match the return type of a gcc2
7501     builtin and then its argument prototype would still apply.  */
7502 char TIFFClientOpen();
7503
7504 int main() {
7505 TIFFClientOpen()
7506 ; return 0; }
7507 EOF
7508 if { (eval echo configure:7509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7509   rm -rf conftest*
7510   eval "ac_cv_lib_$ac_lib_var=yes"
7511 else
7512   echo "configure: failed program was:" >&5
7513   cat conftest.$ac_ext >&5
7514   rm -rf conftest*
7515   eval "ac_cv_lib_$ac_lib_var=no"
7516 fi
7517 rm -f conftest*
7518 xe_check_libs=""
7519
7520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7521   echo "$ac_t""yes" 1>&6
7522   :
7523 else
7524   echo "$ac_t""no" 1>&6
7525 with_tiff=no
7526 fi
7527
7528  }
7529   test -z "$with_tiff" && with_tiff=yes
7530   if test "$with_tiff" = "yes"; then
7531     { test "$extra_verbose" = "yes" && cat << \EOF
7532     Defining HAVE_TIFF
7533 EOF
7534 cat >> confdefs.h <<\EOF
7535 #define HAVE_TIFF 1
7536 EOF
7537 }
7538
7539     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7540   fi
7541 fi
7542
7543
7544 if test "$with_x11" = "yes"; then
7545
7546   echo "checking for X11 graphics libraries" 1>&6
7547 echo "configure:7548: checking for X11 graphics libraries" >&5
7548
7549     
7550 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7551 echo "configure:7552: checking for XawScrollbarSetThumb in -lXaw" >&5
7552 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7553
7554 xe_check_libs=" -lXaw "
7555 cat > conftest.$ac_ext <<EOF
7556 #line 7557 "configure"
7557 #include "confdefs.h"
7558 /* Override any gcc2 internal prototype to avoid an error.  */
7559 /* We use char because int might match the return type of a gcc2
7560     builtin and then its argument prototype would still apply.  */
7561 char XawScrollbarSetThumb();
7562
7563 int main() {
7564 XawScrollbarSetThumb()
7565 ; return 0; }
7566 EOF
7567 if { (eval echo configure:7568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7568   rm -rf conftest*
7569   eval "ac_cv_lib_$ac_lib_var=yes"
7570 else
7571   echo "configure: failed program was:" >&5
7572   cat conftest.$ac_ext >&5
7573   rm -rf conftest*
7574   eval "ac_cv_lib_$ac_lib_var=no"
7575 fi
7576 rm -f conftest*
7577 xe_check_libs=""
7578
7579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7580   echo "$ac_t""yes" 1>&6
7581   have_xaw=yes
7582 else
7583   echo "$ac_t""no" 1>&6
7584 have_xaw=no
7585 fi
7586
7587
7588                     
7589     
7590 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw3d""... $ac_c" 1>&6
7591 echo "configure:7592: checking for XawScrollbarSetThumb in -lXaw3d" >&5
7592 ac_lib_var=`echo Xaw3d'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7593
7594 xe_check_libs=" -lXaw3d "
7595 cat > conftest.$ac_ext <<EOF
7596 #line 7597 "configure"
7597 #include "confdefs.h"
7598 /* Override any gcc2 internal prototype to avoid an error.  */
7599 /* We use char because int might match the return type of a gcc2
7600     builtin and then its argument prototype would still apply.  */
7601 char XawScrollbarSetThumb();
7602
7603 int main() {
7604 XawScrollbarSetThumb()
7605 ; return 0; }
7606 EOF
7607 if { (eval echo configure:7608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7608   rm -rf conftest*
7609   eval "ac_cv_lib_$ac_lib_var=yes"
7610 else
7611   echo "configure: failed program was:" >&5
7612   cat conftest.$ac_ext >&5
7613   rm -rf conftest*
7614   eval "ac_cv_lib_$ac_lib_var=no"
7615 fi
7616 rm -f conftest*
7617 xe_check_libs=""
7618
7619 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7620   echo "$ac_t""yes" 1>&6
7621   have_xaw3d=yes
7622 else
7623   echo "$ac_t""no" 1>&6
7624 have_xaw3d=no
7625 fi
7626
7627
7628
7629     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7630 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7631 echo "configure:7632: checking for Xm/Xm.h" >&5
7632
7633 cat > conftest.$ac_ext <<EOF
7634 #line 7635 "configure"
7635 #include "confdefs.h"
7636 #include <Xm/Xm.h>
7637 EOF
7638 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7639 { (eval echo configure:7640: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7640 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7641 if test -z "$ac_err"; then
7642   rm -rf conftest*
7643   eval "ac_cv_header_$ac_safe=yes"
7644 else
7645   echo "$ac_err" >&5
7646   echo "configure: failed program was:" >&5
7647   cat conftest.$ac_ext >&5
7648   rm -rf conftest*
7649   eval "ac_cv_header_$ac_safe=no"
7650 fi
7651 rm -f conftest*
7652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7653   echo "$ac_t""yes" 1>&6
7654   
7655 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7656 echo "configure:7657: checking for XmStringFree in -lXm" >&5
7657 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7658
7659 xe_check_libs=" -lXm "
7660 cat > conftest.$ac_ext <<EOF
7661 #line 7662 "configure"
7662 #include "confdefs.h"
7663 /* Override any gcc2 internal prototype to avoid an error.  */
7664 /* We use char because int might match the return type of a gcc2
7665     builtin and then its argument prototype would still apply.  */
7666 char XmStringFree();
7667
7668 int main() {
7669 XmStringFree()
7670 ; return 0; }
7671 EOF
7672 if { (eval echo configure:7673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7673   rm -rf conftest*
7674   eval "ac_cv_lib_$ac_lib_var=yes"
7675 else
7676   echo "configure: failed program was:" >&5
7677   cat conftest.$ac_ext >&5
7678   rm -rf conftest*
7679   eval "ac_cv_lib_$ac_lib_var=no"
7680 fi
7681 rm -f conftest*
7682 xe_check_libs=""
7683
7684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7685   echo "$ac_t""yes" 1>&6
7686   have_motif=yes
7687 else
7688   echo "$ac_t""no" 1>&6
7689 have_motif=no
7690 fi
7691
7692
7693 else
7694   echo "$ac_t""no" 1>&6
7695 have_motif=no
7696 fi
7697
7698
7699   if test "$have_motif" = "yes"; then
7700         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7701 echo "configure:7702: checking for Lesstif" >&5
7702     cat > conftest.$ac_ext <<EOF
7703 #line 7704 "configure"
7704 #include "confdefs.h"
7705 #include <Xm/Xm.h>
7706 #ifdef LESSTIF_VERSION
7707 yes
7708 #endif
7709
7710 EOF
7711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7712   egrep "yes" >/dev/null 2>&1; then
7713   rm -rf conftest*
7714   have_lesstif=yes
7715 else
7716   rm -rf conftest*
7717   have_lesstif=no
7718 fi
7719 rm -f conftest*
7720
7721   echo "$ac_t""$have_lesstif" 1>&6
7722   fi
7723
7724 fi 
7725
7726 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7727   with_menubars="lucid" ;;
7728 esac
7729 case "$with_dialogs" in "" | "yes" | "lucid" )
7730   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7731   elif test "$have_xaw3d" = "yes"; then with_dialogs="athena3d"
7732   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7733   else with_dialogs=no
7734   fi ;;
7735 esac
7736 case "$with_scrollbars" in "" | "yes" )
7737   with_scrollbars="lucid" ;;
7738 esac
7739 case "$with_widgets" in "" | "yes" | "lucid")
7740   if   test "$have_motif" = "yes"; then with_widgets="motif"
7741   elif test "$have_xaw3d" = "yes"; then with_widgets="athena3d"
7742   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
7743   else with_widgets=no
7744   fi ;;
7745 esac
7746
7747 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
7748
7749 case "$all_widgets" in
7750  *athena*3d )
7751   { test "$extra_verbose" = "yes" && cat << \EOF
7752     Defining LWLIB_USES_ATHENA
7753 EOF
7754 cat >> confdefs.h <<\EOF
7755 #define LWLIB_USES_ATHENA 1
7756 EOF
7757 }
7758
7759   { test "$extra_verbose" = "yes" && cat << \EOF
7760     Defining NEED_ATHENA
7761 EOF
7762 cat >> confdefs.h <<\EOF
7763 #define NEED_ATHENA 1
7764 EOF
7765 }
7766
7767   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7768   if test "$have_xaw3d"; then
7769     libs_x="-lXaw3d $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw3d\" to \$libs_x"; fi
7770   else
7771     libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi
7772   fi ;;
7773  *athena* )
7774   { test "$extra_verbose" = "yes" && cat << \EOF
7775     Defining LWLIB_USES_ATHENA
7776 EOF
7777 cat >> confdefs.h <<\EOF
7778 #define LWLIB_USES_ATHENA 1
7779 EOF
7780 }
7781
7782   { test "$extra_verbose" = "yes" && cat << \EOF
7783     Defining NEED_ATHENA
7784 EOF
7785 cat >> confdefs.h <<\EOF
7786 #define NEED_ATHENA 1
7787 EOF
7788 }
7789
7790   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7791   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7792 esac
7793
7794 case "$all_widgets" in *motif* )
7795   { test "$extra_verbose" = "yes" && cat << \EOF
7796     Defining LWLIB_USES_MOTIF
7797 EOF
7798 cat >> confdefs.h <<\EOF
7799 #define LWLIB_USES_MOTIF 1
7800 EOF
7801 }
7802
7803   { test "$extra_verbose" = "yes" && cat << \EOF
7804     Defining NEED_MOTIF
7805 EOF
7806 cat >> confdefs.h <<\EOF
7807 #define NEED_MOTIF 1
7808 EOF
7809 }
7810
7811   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7812   need_motif=yes ;;
7813 esac
7814
7815 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7816 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7817 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7818 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
7819         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
7820 case "$with_widgets" in athena* )
7821         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;;
7822 esac
7823 case "$all_widgets" in *lucid* )
7824   { test "$extra_verbose" = "yes" && cat << \EOF
7825     Defining NEED_LUCID
7826 EOF
7827 cat >> confdefs.h <<\EOF
7828 #define NEED_LUCID 1
7829 EOF
7830 }
7831
7832   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7833 esac
7834
7835
7836
7837 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7838     Defining LWLIB_SCROLLBARS_ATHENA
7839 EOF
7840 cat >> confdefs.h <<\EOF
7841 #define LWLIB_SCROLLBARS_ATHENA 1
7842 EOF
7843 }
7844 ;; esac
7845 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7846     Defining LWLIB_DIALOGS_ATHENA
7847 EOF
7848 cat >> confdefs.h <<\EOF
7849 #define LWLIB_DIALOGS_ATHENA 1
7850 EOF
7851 }
7852    ;; esac
7853 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7854     Defining LWLIB_SCROLLBARS_ATHENA3D
7855 EOF
7856 cat >> confdefs.h <<\EOF
7857 #define LWLIB_SCROLLBARS_ATHENA3D 1
7858 EOF
7859 }
7860
7861 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7862     Defining LWLIB_DIALOGS_ATHENA3D
7863 EOF
7864 cat >> confdefs.h <<\EOF
7865 #define LWLIB_DIALOGS_ATHENA3D 1
7866 EOF
7867 }
7868
7869 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7870     Defining LWLIB_WIDGETS_ATHENA
7871 EOF
7872 cat >> confdefs.h <<\EOF
7873 #define LWLIB_WIDGETS_ATHENA 1
7874 EOF
7875 }
7876 ;; esac
7877 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
7878         { test "$extra_verbose" = "yes" && cat << \EOF
7879     Defining LWLIB_TABS_LUCID
7880 EOF
7881 cat >> confdefs.h <<\EOF
7882 #define LWLIB_TABS_LUCID 1
7883 EOF
7884 }
7885
7886
7887 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7888     Defining HAVE_MENUBARS
7889 EOF
7890 cat >> confdefs.h <<\EOF
7891 #define HAVE_MENUBARS 1
7892 EOF
7893 }
7894
7895 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7896     Defining HAVE_SCROLLBARS
7897 EOF
7898 cat >> confdefs.h <<\EOF
7899 #define HAVE_SCROLLBARS 1
7900 EOF
7901 }
7902
7903 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7904     Defining HAVE_DIALOGS
7905 EOF
7906 cat >> confdefs.h <<\EOF
7907 #define HAVE_DIALOGS 1
7908 EOF
7909 }
7910
7911 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7912     Defining HAVE_TOOLBARS
7913 EOF
7914 cat >> confdefs.h <<\EOF
7915 #define HAVE_TOOLBARS 1
7916 EOF
7917 }
7918
7919 test "$with_widgets"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7920     Defining HAVE_WIDGETS
7921 EOF
7922 cat >> confdefs.h <<\EOF
7923 #define HAVE_WIDGETS 1
7924 EOF
7925 }
7926
7927
7928 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7929     Defining LWLIB_MENUBARS_LUCID
7930 EOF
7931 cat >> confdefs.h <<\EOF
7932 #define LWLIB_MENUBARS_LUCID 1
7933 EOF
7934 }
7935
7936 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7937     Defining LWLIB_SCROLLBARS_LUCID
7938 EOF
7939 cat >> confdefs.h <<\EOF
7940 #define LWLIB_SCROLLBARS_LUCID 1
7941 EOF
7942 }
7943
7944
7945 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7946     Defining LWLIB_MENUBARS_MOTIF
7947 EOF
7948 cat >> confdefs.h <<\EOF
7949 #define LWLIB_MENUBARS_MOTIF 1
7950 EOF
7951 }
7952
7953 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7954     Defining LWLIB_SCROLLBARS_MOTIF
7955 EOF
7956 cat >> confdefs.h <<\EOF
7957 #define LWLIB_SCROLLBARS_MOTIF 1
7958 EOF
7959 }
7960
7961 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7962     Defining LWLIB_DIALOGS_MOTIF
7963 EOF
7964 cat >> confdefs.h <<\EOF
7965 #define LWLIB_DIALOGS_MOTIF 1
7966 EOF
7967 }
7968
7969 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7970     Defining LWLIB_WIDGETS_MOTIF
7971 EOF
7972 cat >> confdefs.h <<\EOF
7973 #define LWLIB_WIDGETS_MOTIF 1
7974 EOF
7975 }
7976
7977
7978 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7979    echo "    xemacs will be linked with \"menubar.o\""
7980  fi
7981 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7982    echo "    xemacs will be linked with \"scrollbar.o\""
7983  fi
7984 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7985    echo "    xemacs will be linked with \"dialog.o\""
7986  fi
7987 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7988    echo "    xemacs will be linked with \"toolbar.o\""
7989  fi
7990
7991 if test "$with_x11" = "yes"; then
7992   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7993    echo "    xemacs will be linked with \"menubar-x.o\""
7994  fi
7995   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7996    echo "    xemacs will be linked with \"scrollbar-x.o\""
7997  fi
7998   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7999    echo "    xemacs will be linked with \"dialog-x.o\""
8000  fi
8001   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8002    echo "    xemacs will be linked with \"toolbar-x.o\""
8003  fi
8004   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8005    echo "    xemacs will be linked with \"gui-x.o\""
8006  fi
8007 else
8008   if test "$with_nas_sound" = "nas"; then
8009     echo "Attempt to Build NAS sound without X"
8010     echo "Please remove NAS configuration or build with X"
8011     exit 1
8012   fi
8013 fi
8014
8015
8016 test -z "$with_mule" && with_mule=no
8017 test -z "$with_file_coding" && with_file_coding=no
8018
8019
8020 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8021   { test "$extra_verbose" = "yes" && cat << \EOF
8022     Defining FILE_CODING
8023 EOF
8024 cat >> confdefs.h <<\EOF
8025 #define FILE_CODING 1
8026 EOF
8027 }
8028
8029   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8030    echo "    xemacs will be linked with \"file-coding.o\""
8031  fi
8032 fi
8033
8034 if test "$with_mule" = "yes" ; then
8035   echo "checking for Mule-related features" 1>&6
8036 echo "configure:8037: checking for Mule-related features" >&5
8037   { test "$extra_verbose" = "yes" && cat << \EOF
8038     Defining MULE
8039 EOF
8040 cat >> confdefs.h <<\EOF
8041 #define MULE 1
8042 EOF
8043 }
8044
8045   { test "$extra_verbose" = "yes" && cat << \EOF
8046     Defining FILE_CODING
8047 EOF
8048 cat >> confdefs.h <<\EOF
8049 #define FILE_CODING 1
8050 EOF
8051 }
8052
8053   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8054    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8055  fi
8056
8057     for ac_hdr in libintl.h
8058 do
8059 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8060 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8061 echo "configure:8062: checking for $ac_hdr" >&5
8062
8063 cat > conftest.$ac_ext <<EOF
8064 #line 8065 "configure"
8065 #include "confdefs.h"
8066 #include <$ac_hdr>
8067 EOF
8068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8069 { (eval echo configure:8070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8071 if test -z "$ac_err"; then
8072   rm -rf conftest*
8073   eval "ac_cv_header_$ac_safe=yes"
8074 else
8075   echo "$ac_err" >&5
8076   echo "configure: failed program was:" >&5
8077   cat conftest.$ac_ext >&5
8078   rm -rf conftest*
8079   eval "ac_cv_header_$ac_safe=no"
8080 fi
8081 rm -f conftest*
8082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8083   echo "$ac_t""yes" 1>&6
8084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8085   { test "$extra_verbose" = "yes" && cat << EOF
8086     Defining $ac_tr_hdr
8087 EOF
8088 cat >> confdefs.h <<EOF
8089 #define $ac_tr_hdr 1
8090 EOF
8091 }
8092  
8093 else
8094   echo "$ac_t""no" 1>&6
8095 fi
8096 done
8097
8098   
8099 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8100 echo "configure:8101: checking for strerror in -lintl" >&5
8101 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8102
8103 xe_check_libs=" -lintl "
8104 cat > conftest.$ac_ext <<EOF
8105 #line 8106 "configure"
8106 #include "confdefs.h"
8107 /* Override any gcc2 internal prototype to avoid an error.  */
8108 /* We use char because int might match the return type of a gcc2
8109     builtin and then its argument prototype would still apply.  */
8110 char strerror();
8111
8112 int main() {
8113 strerror()
8114 ; return 0; }
8115 EOF
8116 if { (eval echo configure:8117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=yes"
8119 else
8120   echo "configure: failed program was:" >&5
8121   cat conftest.$ac_ext >&5
8122   rm -rf conftest*
8123   eval "ac_cv_lib_$ac_lib_var=no"
8124 fi
8125 rm -f conftest*
8126 xe_check_libs=""
8127
8128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8129   echo "$ac_t""yes" 1>&6
8130     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8131     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8132   { test "$extra_verbose" = "yes" && cat << EOF
8133     Defining $ac_tr_lib
8134 EOF
8135 cat >> confdefs.h <<EOF
8136 #define $ac_tr_lib 1
8137 EOF
8138 }
8139
8140   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8141
8142 else
8143   echo "$ac_t""no" 1>&6
8144 fi
8145
8146
8147
8148   echo "checking for Mule input methods" 1>&6
8149 echo "configure:8150: checking for Mule input methods" >&5
8150         case "$with_xim" in "" | "yes" )
8151     echo "checking for XIM" 1>&6
8152 echo "configure:8153: checking for XIM" >&5
8153     
8154 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8155 echo "configure:8156: checking for XOpenIM in -lX11" >&5
8156 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8157
8158 xe_check_libs=" -lX11 "
8159 cat > conftest.$ac_ext <<EOF
8160 #line 8161 "configure"
8161 #include "confdefs.h"
8162 /* Override any gcc2 internal prototype to avoid an error.  */
8163 /* We use char because int might match the return type of a gcc2
8164     builtin and then its argument prototype would still apply.  */
8165 char XOpenIM();
8166
8167 int main() {
8168 XOpenIM()
8169 ; return 0; }
8170 EOF
8171 if { (eval echo configure:8172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8172   rm -rf conftest*
8173   eval "ac_cv_lib_$ac_lib_var=yes"
8174 else
8175   echo "configure: failed program was:" >&5
8176   cat conftest.$ac_ext >&5
8177   rm -rf conftest*
8178   eval "ac_cv_lib_$ac_lib_var=no"
8179 fi
8180 rm -f conftest*
8181 xe_check_libs=""
8182
8183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8184   echo "$ac_t""yes" 1>&6
8185   with_xim=xlib
8186 else
8187   echo "$ac_t""no" 1>&6
8188 with_xim=no
8189 fi
8190
8191
8192         if test "$have_motif $have_lesstif" = "yes no"; then
8193       
8194 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8195 echo "configure:8196: checking for XmImMbLookupString in -lXm" >&5
8196 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8197
8198 xe_check_libs=" -lXm "
8199 cat > conftest.$ac_ext <<EOF
8200 #line 8201 "configure"
8201 #include "confdefs.h"
8202 /* Override any gcc2 internal prototype to avoid an error.  */
8203 /* We use char because int might match the return type of a gcc2
8204     builtin and then its argument prototype would still apply.  */
8205 char XmImMbLookupString();
8206
8207 int main() {
8208 XmImMbLookupString()
8209 ; return 0; }
8210 EOF
8211 if { (eval echo configure:8212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8212   rm -rf conftest*
8213   eval "ac_cv_lib_$ac_lib_var=yes"
8214 else
8215   echo "configure: failed program was:" >&5
8216   cat conftest.$ac_ext >&5
8217   rm -rf conftest*
8218   eval "ac_cv_lib_$ac_lib_var=no"
8219 fi
8220 rm -f conftest*
8221 xe_check_libs=""
8222
8223 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8224   echo "$ac_t""yes" 1>&6
8225   with_xim=motif
8226 else
8227   echo "$ac_t""no" 1>&6
8228 fi
8229
8230
8231     fi ;;
8232   esac
8233   if test "$with_xim" != "no"; then
8234     { test "$extra_verbose" = "yes" && cat << \EOF
8235     Defining HAVE_XIM
8236 EOF
8237 cat >> confdefs.h <<\EOF
8238 #define HAVE_XIM 1
8239 EOF
8240 }
8241
8242     if test "$with_xim" = "xlib"; then
8243       { test "$extra_verbose" = "yes" && cat << \EOF
8244     Defining XIM_XLIB
8245 EOF
8246 cat >> confdefs.h <<\EOF
8247 #define XIM_XLIB 1
8248 EOF
8249 }
8250
8251       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8252    echo "    xemacs will be linked with \"input-method-xlib.o\""
8253  fi
8254     fi
8255     if test "$with_xim" = "motif"; then
8256       { test "$extra_verbose" = "yes" && cat << \EOF
8257     Defining XIM_MOTIF
8258 EOF
8259 cat >> confdefs.h <<\EOF
8260 #define XIM_MOTIF 1
8261 EOF
8262 }
8263
8264       need_motif=yes
8265       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8266    echo "    xemacs will be linked with \"input-method-motif.o\""
8267  fi
8268     fi
8269     if test "$with_xim" = "motif"; then
8270       with_xfs=no
8271     fi
8272   fi
8273
8274     if test "$with_xfs" = "yes" ; then
8275     echo "checking for XFontSet" 1>&6
8276 echo "configure:8277: checking for XFontSet" >&5
8277     
8278 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8279 echo "configure:8280: checking for XmbDrawString in -lX11" >&5
8280 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8281
8282 xe_check_libs=" -lX11 "
8283 cat > conftest.$ac_ext <<EOF
8284 #line 8285 "configure"
8285 #include "confdefs.h"
8286 /* Override any gcc2 internal prototype to avoid an error.  */
8287 /* We use char because int might match the return type of a gcc2
8288     builtin and then its argument prototype would still apply.  */
8289 char XmbDrawString();
8290
8291 int main() {
8292 XmbDrawString()
8293 ; return 0; }
8294 EOF
8295 if { (eval echo configure:8296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8296   rm -rf conftest*
8297   eval "ac_cv_lib_$ac_lib_var=yes"
8298 else
8299   echo "configure: failed program was:" >&5
8300   cat conftest.$ac_ext >&5
8301   rm -rf conftest*
8302   eval "ac_cv_lib_$ac_lib_var=no"
8303 fi
8304 rm -f conftest*
8305 xe_check_libs=""
8306
8307 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8308   echo "$ac_t""yes" 1>&6
8309   :
8310 else
8311   echo "$ac_t""no" 1>&6
8312 with_xfs=no
8313 fi
8314
8315
8316     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8317       { test "$extra_verbose" = "yes" && cat << \EOF
8318     Defining USE_XFONTSET
8319 EOF
8320 cat >> confdefs.h <<\EOF
8321 #define USE_XFONTSET 1
8322 EOF
8323 }
8324
8325       if test "$with_xim" = "no" ; then
8326         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8327    echo "    xemacs will be linked with \"input-method-xfs.o\""
8328  fi
8329       fi
8330     fi
8331   fi 
8332     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8333   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8334 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8335 echo "configure:8336: checking for wnn/jllib.h" >&5
8336
8337 cat > conftest.$ac_ext <<EOF
8338 #line 8339 "configure"
8339 #include "confdefs.h"
8340 #include <wnn/jllib.h>
8341 EOF
8342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8343 { (eval echo configure:8344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8345 if test -z "$ac_err"; then
8346   rm -rf conftest*
8347   eval "ac_cv_header_$ac_safe=yes"
8348 else
8349   echo "$ac_err" >&5
8350   echo "configure: failed program was:" >&5
8351   cat conftest.$ac_ext >&5
8352   rm -rf conftest*
8353   eval "ac_cv_header_$ac_safe=no"
8354 fi
8355 rm -f conftest*
8356 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8357   echo "$ac_t""yes" 1>&6
8358   :
8359 else
8360   echo "$ac_t""no" 1>&6
8361 with_wnn=no
8362 fi
8363  }
8364     if test "$with_wnn" != "no"; then
8365     for ac_func in crypt
8366 do
8367 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8368 echo "configure:8369: checking for $ac_func" >&5
8369
8370 cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373 /* System header to define __stub macros and hopefully few prototypes,
8374     which can conflict with char $ac_func(); below.  */
8375 #include <assert.h>
8376 /* Override any gcc2 internal prototype to avoid an error.  */
8377 /* We use char because int might match the return type of a gcc2
8378     builtin and then its argument prototype would still apply.  */
8379 char $ac_func();
8380
8381 int main() {
8382
8383 /* The GNU C library defines this for functions which it implements
8384     to always fail with ENOSYS.  Some functions are actually named
8385     something starting with __ and the normal name is an alias.  */
8386 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8387 choke me
8388 #else
8389 $ac_func();
8390 #endif
8391
8392 ; return 0; }
8393 EOF
8394 if { (eval echo configure:8395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8395   rm -rf conftest*
8396   eval "ac_cv_func_$ac_func=yes"
8397 else
8398   echo "configure: failed program was:" >&5
8399   cat conftest.$ac_ext >&5
8400   rm -rf conftest*
8401   eval "ac_cv_func_$ac_func=no"
8402 fi
8403 rm -f conftest*
8404
8405 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8406   echo "$ac_t""yes" 1>&6
8407     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8408   { test "$extra_verbose" = "yes" && cat << EOF
8409     Defining $ac_tr_func
8410 EOF
8411 cat >> confdefs.h <<EOF
8412 #define $ac_tr_func 1
8413 EOF
8414 }
8415  
8416 else
8417   echo "$ac_t""no" 1>&6
8418 fi
8419 done
8420
8421     test "$ac_cv_func_crypt" != "yes" && { 
8422 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
8423 echo "configure:8424: checking for crypt in -lcrypt" >&5
8424 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
8425
8426 xe_check_libs=" -lcrypt "
8427 cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 /* Override any gcc2 internal prototype to avoid an error.  */
8431 /* We use char because int might match the return type of a gcc2
8432     builtin and then its argument prototype would still apply.  */
8433 char crypt();
8434
8435 int main() {
8436 crypt()
8437 ; return 0; }
8438 EOF
8439 if { (eval echo configure:8440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8440   rm -rf conftest*
8441   eval "ac_cv_lib_$ac_lib_var=yes"
8442 else
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -rf conftest*
8446   eval "ac_cv_lib_$ac_lib_var=no"
8447 fi
8448 rm -f conftest*
8449 xe_check_libs=""
8450
8451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8452   echo "$ac_t""yes" 1>&6
8453     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8454     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8455   { test "$extra_verbose" = "yes" && cat << EOF
8456     Defining $ac_tr_lib
8457 EOF
8458 cat >> confdefs.h <<EOF
8459 #define $ac_tr_lib 1
8460 EOF
8461 }
8462
8463   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
8464
8465 else
8466   echo "$ac_t""no" 1>&6
8467 fi
8468
8469  }
8470   fi
8471     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
8472     
8473 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
8474 echo "configure:8475: checking for jl_dic_list_e in -lwnn" >&5
8475 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8476
8477 xe_check_libs=" -lwnn "
8478 cat > conftest.$ac_ext <<EOF
8479 #line 8480 "configure"
8480 #include "confdefs.h"
8481 /* Override any gcc2 internal prototype to avoid an error.  */
8482 /* We use char because int might match the return type of a gcc2
8483     builtin and then its argument prototype would still apply.  */
8484 char jl_dic_list_e();
8485
8486 int main() {
8487 jl_dic_list_e()
8488 ; return 0; }
8489 EOF
8490 if { (eval echo configure:8491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8491   rm -rf conftest*
8492   eval "ac_cv_lib_$ac_lib_var=yes"
8493 else
8494   echo "configure: failed program was:" >&5
8495   cat conftest.$ac_ext >&5
8496   rm -rf conftest*
8497   eval "ac_cv_lib_$ac_lib_var=no"
8498 fi
8499 rm -f conftest*
8500 xe_check_libs=""
8501
8502 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8503   echo "$ac_t""yes" 1>&6
8504   libwnn=wnn
8505 else
8506   echo "$ac_t""no" 1>&6
8507 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
8508 echo "configure:8509: checking for jl_dic_list_e in -lwnn4" >&5
8509 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8510
8511 xe_check_libs=" -lwnn4 "
8512 cat > conftest.$ac_ext <<EOF
8513 #line 8514 "configure"
8514 #include "confdefs.h"
8515 /* Override any gcc2 internal prototype to avoid an error.  */
8516 /* We use char because int might match the return type of a gcc2
8517     builtin and then its argument prototype would still apply.  */
8518 char jl_dic_list_e();
8519
8520 int main() {
8521 jl_dic_list_e()
8522 ; return 0; }
8523 EOF
8524 if { (eval echo configure:8525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8525   rm -rf conftest*
8526   eval "ac_cv_lib_$ac_lib_var=yes"
8527 else
8528   echo "configure: failed program was:" >&5
8529   cat conftest.$ac_ext >&5
8530   rm -rf conftest*
8531   eval "ac_cv_lib_$ac_lib_var=no"
8532 fi
8533 rm -f conftest*
8534 xe_check_libs=""
8535
8536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8537   echo "$ac_t""yes" 1>&6
8538   libwnn=wnn4
8539 else
8540   echo "$ac_t""no" 1>&6
8541 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8542 echo "configure:8543: checking for jl_dic_list_e in -lwnn6" >&5
8543 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8544
8545 xe_check_libs=" -lwnn6 "
8546 cat > conftest.$ac_ext <<EOF
8547 #line 8548 "configure"
8548 #include "confdefs.h"
8549 /* Override any gcc2 internal prototype to avoid an error.  */
8550 /* We use char because int might match the return type of a gcc2
8551     builtin and then its argument prototype would still apply.  */
8552 char jl_dic_list_e();
8553
8554 int main() {
8555 jl_dic_list_e()
8556 ; return 0; }
8557 EOF
8558 if { (eval echo configure:8559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8559   rm -rf conftest*
8560   eval "ac_cv_lib_$ac_lib_var=yes"
8561 else
8562   echo "configure: failed program was:" >&5
8563   cat conftest.$ac_ext >&5
8564   rm -rf conftest*
8565   eval "ac_cv_lib_$ac_lib_var=no"
8566 fi
8567 rm -f conftest*
8568 xe_check_libs=""
8569
8570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8571   echo "$ac_t""yes" 1>&6
8572   libwnn=wnn6
8573 else
8574   echo "$ac_t""no" 1>&6
8575 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8576 echo "configure:8577: checking for dic_list_e in -lwnn6_fromsrc" >&5
8577 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8578
8579 xe_check_libs=" -lwnn6_fromsrc "
8580 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8583 /* Override any gcc2 internal prototype to avoid an error.  */
8584 /* We use char because int might match the return type of a gcc2
8585     builtin and then its argument prototype would still apply.  */
8586 char dic_list_e();
8587
8588 int main() {
8589 dic_list_e()
8590 ; return 0; }
8591 EOF
8592 if { (eval echo configure:8593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8593   rm -rf conftest*
8594   eval "ac_cv_lib_$ac_lib_var=yes"
8595 else
8596   echo "configure: failed program was:" >&5
8597   cat conftest.$ac_ext >&5
8598   rm -rf conftest*
8599   eval "ac_cv_lib_$ac_lib_var=no"
8600 fi
8601 rm -f conftest*
8602 xe_check_libs=""
8603
8604 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8605   echo "$ac_t""yes" 1>&6
8606   libwnn=wnn6_fromsrc
8607 else
8608   echo "$ac_t""no" 1>&6
8609 with_wnn=no
8610 fi
8611
8612
8613 fi
8614
8615
8616 fi
8617
8618
8619 fi
8620
8621
8622   fi
8623   test -z "$with_wnn" && with_wnn=yes
8624   if test "$with_wnn" = "yes"; then
8625     { test "$extra_verbose" = "yes" && cat << \EOF
8626     Defining HAVE_WNN
8627 EOF
8628 cat >> confdefs.h <<\EOF
8629 #define HAVE_WNN 1
8630 EOF
8631 }
8632
8633     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8634     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8635    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8636  fi
8637     if test "$with_wnn6" != "no"; then
8638       
8639 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8640 echo "configure:8641: checking for jl_fi_dic_list in -l$libwnn" >&5
8641 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8642
8643 xe_check_libs=" -l$libwnn "
8644 cat > conftest.$ac_ext <<EOF
8645 #line 8646 "configure"
8646 #include "confdefs.h"
8647 /* Override any gcc2 internal prototype to avoid an error.  */
8648 /* We use char because int might match the return type of a gcc2
8649     builtin and then its argument prototype would still apply.  */
8650 char jl_fi_dic_list();
8651
8652 int main() {
8653 jl_fi_dic_list()
8654 ; return 0; }
8655 EOF
8656 if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8657   rm -rf conftest*
8658   eval "ac_cv_lib_$ac_lib_var=yes"
8659 else
8660   echo "configure: failed program was:" >&5
8661   cat conftest.$ac_ext >&5
8662   rm -rf conftest*
8663   eval "ac_cv_lib_$ac_lib_var=no"
8664 fi
8665 rm -f conftest*
8666 xe_check_libs=""
8667
8668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8669   echo "$ac_t""yes" 1>&6
8670   with_wnn6=yes
8671 else
8672   echo "$ac_t""no" 1>&6
8673 fi
8674
8675
8676       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8677     Defining WNN6
8678 EOF
8679 cat >> confdefs.h <<\EOF
8680 #define WNN6 1
8681 EOF
8682 }
8683
8684     fi
8685   fi
8686
8687     canna_includes_found=no
8688   if test "$with_canna" != "no"; then
8689     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8690 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8691 echo "configure:8692: checking for canna/jrkanji.h" >&5
8692
8693 cat > conftest.$ac_ext <<EOF
8694 #line 8695 "configure"
8695 #include "confdefs.h"
8696 #include <canna/jrkanji.h>
8697 EOF
8698 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8699 { (eval echo configure:8700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8700 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8701 if test -z "$ac_err"; then
8702   rm -rf conftest*
8703   eval "ac_cv_header_$ac_safe=yes"
8704 else
8705   echo "$ac_err" >&5
8706   echo "configure: failed program was:" >&5
8707   cat conftest.$ac_ext >&5
8708   rm -rf conftest*
8709   eval "ac_cv_header_$ac_safe=no"
8710 fi
8711 rm -f conftest*
8712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8713   echo "$ac_t""yes" 1>&6
8714   canna_includes_found=yes
8715 else
8716   echo "$ac_t""no" 1>&6
8717 fi
8718
8719   fi
8720   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8721       -d "/usr/local/canna/include"; then
8722     save_c_switch_site="$c_switch_site"
8723     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8724     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8725 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8726 echo "configure:8727: checking for canna/jrkanji.h" >&5
8727
8728 cat > conftest.$ac_ext <<EOF
8729 #line 8730 "configure"
8730 #include "confdefs.h"
8731 #include <canna/jrkanji.h>
8732 EOF
8733 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8734 { (eval echo configure:8735: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8735 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8736 if test -z "$ac_err"; then
8737   rm -rf conftest*
8738   eval "ac_cv_header_$ac_safe=yes"
8739 else
8740   echo "$ac_err" >&5
8741   echo "configure: failed program was:" >&5
8742   cat conftest.$ac_ext >&5
8743   rm -rf conftest*
8744   eval "ac_cv_header_$ac_safe=no"
8745 fi
8746 rm -f conftest*
8747 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8748   echo "$ac_t""yes" 1>&6
8749   canna_includes_found=yes
8750 else
8751   echo "$ac_t""no" 1>&6
8752 fi
8753
8754     if test "$canna_includes_found" != "yes"; then
8755       c_switch_site="$save_c_switch_site"
8756       with_canna="no"
8757     fi
8758   fi
8759
8760   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8761 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8762 echo "configure:8763: checking for canna/RK.h" >&5
8763
8764 cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <canna/RK.h>
8768 EOF
8769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8770 { (eval echo configure:8771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8772 if test -z "$ac_err"; then
8773   rm -rf conftest*
8774   eval "ac_cv_header_$ac_safe=yes"
8775 else
8776   echo "$ac_err" >&5
8777   echo "configure: failed program was:" >&5
8778   cat conftest.$ac_ext >&5
8779   rm -rf conftest*
8780   eval "ac_cv_header_$ac_safe=no"
8781 fi
8782 rm -f conftest*
8783 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8784   echo "$ac_t""yes" 1>&6
8785   :
8786 else
8787   echo "$ac_t""no" 1>&6
8788 with_canna=no
8789 fi
8790  }
8791   test -z "$with_canna" && { 
8792 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8793 echo "configure:8794: checking for RkBgnBun in -lRKC" >&5
8794 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8795
8796 xe_check_libs=" -lRKC "
8797 cat > conftest.$ac_ext <<EOF
8798 #line 8799 "configure"
8799 #include "confdefs.h"
8800 /* Override any gcc2 internal prototype to avoid an error.  */
8801 /* We use char because int might match the return type of a gcc2
8802     builtin and then its argument prototype would still apply.  */
8803 char RkBgnBun();
8804
8805 int main() {
8806 RkBgnBun()
8807 ; return 0; }
8808 EOF
8809 if { (eval echo configure:8810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8810   rm -rf conftest*
8811   eval "ac_cv_lib_$ac_lib_var=yes"
8812 else
8813   echo "configure: failed program was:" >&5
8814   cat conftest.$ac_ext >&5
8815   rm -rf conftest*
8816   eval "ac_cv_lib_$ac_lib_var=no"
8817 fi
8818 rm -f conftest*
8819 xe_check_libs=""
8820
8821 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8822   echo "$ac_t""yes" 1>&6
8823   :
8824 else
8825   echo "$ac_t""no" 1>&6
8826 with_canna=no
8827 fi
8828
8829  }
8830   test -z "$with_canna" && { 
8831 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8832 echo "configure:8833: checking for jrKanjiControl in -lcanna" >&5
8833 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8834
8835 xe_check_libs=" -lcanna "
8836 cat > conftest.$ac_ext <<EOF
8837 #line 8838 "configure"
8838 #include "confdefs.h"
8839 /* Override any gcc2 internal prototype to avoid an error.  */
8840 /* We use char because int might match the return type of a gcc2
8841     builtin and then its argument prototype would still apply.  */
8842 char jrKanjiControl();
8843
8844 int main() {
8845 jrKanjiControl()
8846 ; return 0; }
8847 EOF
8848 if { (eval echo configure:8849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8849   rm -rf conftest*
8850   eval "ac_cv_lib_$ac_lib_var=yes"
8851 else
8852   echo "configure: failed program was:" >&5
8853   cat conftest.$ac_ext >&5
8854   rm -rf conftest*
8855   eval "ac_cv_lib_$ac_lib_var=no"
8856 fi
8857 rm -f conftest*
8858 xe_check_libs=""
8859
8860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8861   echo "$ac_t""yes" 1>&6
8862   :
8863 else
8864   echo "$ac_t""no" 1>&6
8865 with_canna=no
8866 fi
8867
8868  }
8869   test -z "$with_canna" && with_canna=yes
8870   if test "$with_canna" = "yes"; then
8871     { test "$extra_verbose" = "yes" && cat << \EOF
8872     Defining HAVE_CANNA
8873 EOF
8874 cat >> confdefs.h <<\EOF
8875 #define HAVE_CANNA 1
8876 EOF
8877 }
8878
8879     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8880     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8881    echo "    xemacs will be linked with \"mule-canna.o\""
8882  fi
8883   fi
8884
8885 else   for feature in xim canna wnn; do
8886     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8887       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8888     fi
8889     eval "with_${feature}=no"
8890   done
8891 fi 
8892
8893 if test "$need_motif" = "yes" ; then
8894   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8895     
8896 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8897 echo "configure:8898: checking for layout_object_getvalue in -li18n" >&5
8898 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8899
8900 xe_check_libs=" -li18n "
8901 cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 /* Override any gcc2 internal prototype to avoid an error.  */
8905 /* We use char because int might match the return type of a gcc2
8906     builtin and then its argument prototype would still apply.  */
8907 char layout_object_getvalue();
8908
8909 int main() {
8910 layout_object_getvalue()
8911 ; return 0; }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8914   rm -rf conftest*
8915   eval "ac_cv_lib_$ac_lib_var=yes"
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_lib_$ac_lib_var=no"
8921 fi
8922 rm -f conftest*
8923 xe_check_libs=""
8924
8925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8926   echo "$ac_t""yes" 1>&6
8927   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8928 else
8929   echo "$ac_t""no" 1>&6
8930 fi
8931
8932
8933   
8934 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8935     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8936   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8937   
8938         runpath="" runpath_dirs=""
8939   if test -n "$LD_RUN_PATH"; then
8940     runpath="$LD_RUN_PATH"
8941   elif test "$GCC" = "yes"; then
8942         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8943     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8944     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8945     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8946       case "$arg" in P,* | -L* | -R* )
8947         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8948           {
8949 xe_runpath_dir="$dir"
8950   test "$xe_runpath_dir" != "/lib"     -a \
8951         "$xe_runpath_dir" != "/usr/lib" -a \
8952         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8953   eval "$xe_add_unique_runpath_dir"
8954 }
8955         done ;;
8956       esac
8957     done
8958     ld_switch_run="$ld_switch_run_save"
8959     rm -f conftest*
8960   else
8961         for arg in $ld_switch_site $ld_switch_x_site; do
8962       case "$arg" in -L*) {
8963 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8964   test "$xe_runpath_dir" != "/lib"     -a \
8965         "$xe_runpath_dir" != "/usr/lib" -a \
8966         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8967   eval "$xe_add_unique_runpath_dir"
8968 };; esac
8969     done
8970         if test "$opsys $need_motif" = "sol2 yes"; then
8971       xe_runpath_dir="/opt/SUNWdt/lib";
8972       eval "$xe_add_unique_runpath_dir";
8973     fi
8974   fi 
8975   if test -n "$runpath"; then
8976     ld_switch_run="${dash_r}${runpath}"
8977     
8978 if test "$GCC" = "yes"; then
8979   set x $ld_switch_run; shift; ld_switch_run=""
8980   while test -n "$1"; do
8981     case $1 in
8982       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8983       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8984       -Xlinker* ) ;;
8985       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8986     esac
8987     shift
8988   done
8989 fi
8990     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8991   fi
8992 fi
8993
8994 fi
8995
8996 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
8997 do
8998 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8999 echo "configure:9000: checking for $ac_func" >&5
9000
9001 cat > conftest.$ac_ext <<EOF
9002 #line 9003 "configure"
9003 #include "confdefs.h"
9004 /* System header to define __stub macros and hopefully few prototypes,
9005     which can conflict with char $ac_func(); below.  */
9006 #include <assert.h>
9007 /* Override any gcc2 internal prototype to avoid an error.  */
9008 /* We use char because int might match the return type of a gcc2
9009     builtin and then its argument prototype would still apply.  */
9010 char $ac_func();
9011
9012 int main() {
9013
9014 /* The GNU C library defines this for functions which it implements
9015     to always fail with ENOSYS.  Some functions are actually named
9016     something starting with __ and the normal name is an alias.  */
9017 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9018 choke me
9019 #else
9020 $ac_func();
9021 #endif
9022
9023 ; return 0; }
9024 EOF
9025 if { (eval echo configure:9026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9026   rm -rf conftest*
9027   eval "ac_cv_func_$ac_func=yes"
9028 else
9029   echo "configure: failed program was:" >&5
9030   cat conftest.$ac_ext >&5
9031   rm -rf conftest*
9032   eval "ac_cv_func_$ac_func=no"
9033 fi
9034 rm -f conftest*
9035
9036 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9037   echo "$ac_t""yes" 1>&6
9038     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9039   { test "$extra_verbose" = "yes" && cat << EOF
9040     Defining $ac_tr_func
9041 EOF
9042 cat >> confdefs.h <<EOF
9043 #define $ac_tr_func 1
9044 EOF
9045 }
9046  
9047 else
9048   echo "$ac_t""no" 1>&6
9049 fi
9050 done
9051
9052
9053
9054 case "$opsys" in
9055   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9056    echo "    xemacs will be linked with \"realpath.o\""
9057  fi ;;
9058   * )
9059     case "$canonical" in
9060       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9061    echo "    xemacs will be linked with \"realpath.o\""
9062  fi ;;
9063       * ) for ac_func in realpath
9064 do
9065 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9066 echo "configure:9067: checking for $ac_func" >&5
9067
9068 cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071 /* System header to define __stub macros and hopefully few prototypes,
9072     which can conflict with char $ac_func(); below.  */
9073 #include <assert.h>
9074 /* Override any gcc2 internal prototype to avoid an error.  */
9075 /* We use char because int might match the return type of a gcc2
9076     builtin and then its argument prototype would still apply.  */
9077 char $ac_func();
9078
9079 int main() {
9080
9081 /* The GNU C library defines this for functions which it implements
9082     to always fail with ENOSYS.  Some functions are actually named
9083     something starting with __ and the normal name is an alias.  */
9084 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9085 choke me
9086 #else
9087 $ac_func();
9088 #endif
9089
9090 ; return 0; }
9091 EOF
9092 if { (eval echo configure:9093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9093   rm -rf conftest*
9094   eval "ac_cv_func_$ac_func=yes"
9095 else
9096   echo "configure: failed program was:" >&5
9097   cat conftest.$ac_ext >&5
9098   rm -rf conftest*
9099   eval "ac_cv_func_$ac_func=no"
9100 fi
9101 rm -f conftest*
9102
9103 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9104   echo "$ac_t""yes" 1>&6
9105     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9106   { test "$extra_verbose" = "yes" && cat << EOF
9107     Defining $ac_tr_func
9108 EOF
9109 cat >> confdefs.h <<EOF
9110 #define $ac_tr_func 1
9111 EOF
9112 }
9113  
9114 else
9115   echo "$ac_t""no" 1>&6
9116 fi
9117 done
9118
9119           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9120    echo "    xemacs will be linked with \"realpath.o\""
9121  fi ;;
9122     esac ;;
9123 esac
9124
9125 for ac_func in getloadavg
9126 do
9127 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9128 echo "configure:9129: checking for $ac_func" >&5
9129
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9133 /* System header to define __stub macros and hopefully few prototypes,
9134     which can conflict with char $ac_func(); below.  */
9135 #include <assert.h>
9136 /* Override any gcc2 internal prototype to avoid an error.  */
9137 /* We use char because int might match the return type of a gcc2
9138     builtin and then its argument prototype would still apply.  */
9139 char $ac_func();
9140
9141 int main() {
9142
9143 /* The GNU C library defines this for functions which it implements
9144     to always fail with ENOSYS.  Some functions are actually named
9145     something starting with __ and the normal name is an alias.  */
9146 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9147 choke me
9148 #else
9149 $ac_func();
9150 #endif
9151
9152 ; return 0; }
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9155   rm -rf conftest*
9156   eval "ac_cv_func_$ac_func=yes"
9157 else
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_func_$ac_func=no"
9162 fi
9163 rm -f conftest*
9164
9165 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9166   echo "$ac_t""yes" 1>&6
9167     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9168   { test "$extra_verbose" = "yes" && cat << EOF
9169     Defining $ac_tr_func
9170 EOF
9171 cat >> confdefs.h <<EOF
9172 #define $ac_tr_func 1
9173 EOF
9174 }
9175  
9176 else
9177   echo "$ac_t""no" 1>&6
9178 fi
9179 done
9180
9181
9182 if test "$ac_cv_func_getloadavg" != "yes"
9183 then
9184   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9185    echo "    xemacs will be linked with \"getloadavg.o\""
9186  fi
9187
9188     
9189 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9190 echo "configure:9191: checking for kstat_open in -lkstat" >&5
9191 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9192
9193 xe_check_libs=" -lkstat "
9194 cat > conftest.$ac_ext <<EOF
9195 #line 9196 "configure"
9196 #include "confdefs.h"
9197 /* Override any gcc2 internal prototype to avoid an error.  */
9198 /* We use char because int might match the return type of a gcc2
9199     builtin and then its argument prototype would still apply.  */
9200 char kstat_open();
9201
9202 int main() {
9203 kstat_open()
9204 ; return 0; }
9205 EOF
9206 if { (eval echo configure:9207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=yes"
9209 else
9210   echo "configure: failed program was:" >&5
9211   cat conftest.$ac_ext >&5
9212   rm -rf conftest*
9213   eval "ac_cv_lib_$ac_lib_var=no"
9214 fi
9215 rm -f conftest*
9216 xe_check_libs=""
9217
9218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9219   echo "$ac_t""yes" 1>&6
9220     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9221     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9222   { test "$extra_verbose" = "yes" && cat << EOF
9223     Defining $ac_tr_lib
9224 EOF
9225 cat >> confdefs.h <<EOF
9226 #define $ac_tr_lib 1
9227 EOF
9228 }
9229
9230   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9231
9232 else
9233   echo "$ac_t""no" 1>&6
9234 fi
9235
9236
9237
9238     
9239 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9240 echo "configure:9241: checking for kvm_read in -lkvm" >&5
9241 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9242
9243 xe_check_libs=" -lkvm "
9244 cat > conftest.$ac_ext <<EOF
9245 #line 9246 "configure"
9246 #include "confdefs.h"
9247 /* Override any gcc2 internal prototype to avoid an error.  */
9248 /* We use char because int might match the return type of a gcc2
9249     builtin and then its argument prototype would still apply.  */
9250 char kvm_read();
9251
9252 int main() {
9253 kvm_read()
9254 ; return 0; }
9255 EOF
9256 if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9257   rm -rf conftest*
9258   eval "ac_cv_lib_$ac_lib_var=yes"
9259 else
9260   echo "configure: failed program was:" >&5
9261   cat conftest.$ac_ext >&5
9262   rm -rf conftest*
9263   eval "ac_cv_lib_$ac_lib_var=no"
9264 fi
9265 rm -f conftest*
9266 xe_check_libs=""
9267
9268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9269   echo "$ac_t""yes" 1>&6
9270     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9271     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9272   { test "$extra_verbose" = "yes" && cat << EOF
9273     Defining $ac_tr_lib
9274 EOF
9275 cat >> confdefs.h <<EOF
9276 #define $ac_tr_lib 1
9277 EOF
9278 }
9279
9280   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9281
9282 else
9283   echo "$ac_t""no" 1>&6
9284 fi
9285
9286
9287 fi
9288
9289 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9290 echo "configure:9291: checking whether netdb declares h_errno" >&5
9291 cat > conftest.$ac_ext <<EOF
9292 #line 9293 "configure"
9293 #include "confdefs.h"
9294 #include <netdb.h>
9295 int main() {
9296 return h_errno;
9297 ; return 0; }
9298 EOF
9299 if { (eval echo configure:9300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9300   rm -rf conftest*
9301   echo "$ac_t""yes" 1>&6
9302    { test "$extra_verbose" = "yes" && cat << \EOF
9303     Defining HAVE_H_ERRNO
9304 EOF
9305 cat >> confdefs.h <<\EOF
9306 #define HAVE_H_ERRNO 1
9307 EOF
9308 }
9309
9310 else
9311   echo "configure: failed program was:" >&5
9312   cat conftest.$ac_ext >&5
9313   rm -rf conftest*
9314   echo "$ac_t""no" 1>&6
9315 fi
9316 rm -f conftest*
9317
9318 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9319 echo "configure:9320: checking for sigsetjmp" >&5
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323 #include <setjmp.h>
9324 int main() {
9325 sigjmp_buf bar; sigsetjmp (bar, 0);
9326 ; return 0; }
9327 EOF
9328 if { (eval echo configure:9329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9329   rm -rf conftest*
9330   echo "$ac_t""yes" 1>&6
9331    { test "$extra_verbose" = "yes" && cat << \EOF
9332     Defining HAVE_SIGSETJMP
9333 EOF
9334 cat >> confdefs.h <<\EOF
9335 #define HAVE_SIGSETJMP 1
9336 EOF
9337 }
9338
9339 else
9340   echo "configure: failed program was:" >&5
9341   cat conftest.$ac_ext >&5
9342   rm -rf conftest*
9343   echo "$ac_t""no" 1>&6
9344 fi
9345 rm -f conftest*
9346
9347 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9348 echo "configure:9349: checking whether localtime caches TZ" >&5
9349
9350 if test "$ac_cv_func_tzset" = "yes"; then
9351 cat > conftest.$ac_ext <<EOF
9352 #line 9353 "configure"
9353 #include "confdefs.h"
9354 #include <time.h>
9355 #if STDC_HEADERS
9356 # include <stdlib.h>
9357 #endif
9358 extern char **environ;
9359 unset_TZ ()
9360 {
9361   char **from, **to;
9362   for (to = from = environ; (*to = *from); from++)
9363     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9364       to++;
9365 }
9366 char TZ_GMT0[] = "TZ=GMT0";
9367 char TZ_PST8[] = "TZ=PST8";
9368 main()
9369 {
9370   time_t now = time ((time_t *) 0);
9371   int hour_GMT0, hour_unset;
9372   if (putenv (TZ_GMT0) != 0)
9373     exit (1);
9374   hour_GMT0 = localtime (&now)->tm_hour;
9375   unset_TZ ();
9376   hour_unset = localtime (&now)->tm_hour;
9377   if (putenv (TZ_PST8) != 0)
9378     exit (1);
9379   if (localtime (&now)->tm_hour == hour_GMT0)
9380     exit (1);
9381   unset_TZ ();
9382   if (localtime (&now)->tm_hour != hour_unset)
9383     exit (1);
9384   exit (0);
9385 }
9386 EOF
9387 if { (eval echo configure:9388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9388 then
9389   emacs_cv_localtime_cache=no
9390 else
9391   conftest_rc="$?"
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -fr conftest*
9395   emacs_cv_localtime_cache=yes
9396 fi
9397 rm -fr conftest*
9398 else
9399         # If we lack tzset, report that localtime does not cache TZ,
9400         # since we can't invalidate the cache if we don't have tzset.
9401         emacs_cv_localtime_cache=no
9402 fi
9403 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9404 if test $emacs_cv_localtime_cache = yes; then
9405   { test "$extra_verbose" = "yes" && cat << \EOF
9406     Defining LOCALTIME_CACHE
9407 EOF
9408 cat >> confdefs.h <<\EOF
9409 #define LOCALTIME_CACHE 1
9410 EOF
9411 }
9412
9413 fi
9414
9415 if test "$HAVE_TIMEVAL" = "yes"; then
9416 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
9417 echo "configure:9418: checking whether gettimeofday accepts one or two arguments" >&5
9418 cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421
9422 #ifdef TIME_WITH_SYS_TIME
9423 #include <sys/time.h>
9424 #include <time.h>
9425 #else
9426 #ifdef HAVE_SYS_TIME_H
9427 #include <sys/time.h>
9428 #else
9429 #include <time.h>
9430 #endif
9431 #endif
9432   
9433 int main() {
9434
9435   struct timeval time;
9436   struct timezone dummy;
9437   gettimeofday (&time, &dummy);
9438
9439 ; return 0; }
9440 EOF
9441 if { (eval echo configure:9442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9442   rm -rf conftest*
9443   echo "$ac_t""two" 1>&6
9444 else
9445   echo "configure: failed program was:" >&5
9446   cat conftest.$ac_ext >&5
9447   rm -rf conftest*
9448   echo "$ac_t""one" 1>&6
9449    { test "$extra_verbose" = "yes" && cat << \EOF
9450     Defining GETTIMEOFDAY_ONE_ARGUMENT
9451 EOF
9452 cat >> confdefs.h <<\EOF
9453 #define GETTIMEOFDAY_ONE_ARGUMENT 1
9454 EOF
9455 }
9456
9457 fi
9458 rm -f conftest*
9459 fi
9460
9461
9462 echo $ac_n "checking for inline""... $ac_c" 1>&6
9463 echo "configure:9464: checking for inline" >&5
9464
9465 ac_cv_c_inline=no
9466 for ac_kw in inline __inline__ __inline; do
9467   cat > conftest.$ac_ext <<EOF
9468 #line 9469 "configure"
9469 #include "confdefs.h"
9470
9471 int main() {
9472 } $ac_kw foo() {
9473 ; return 0; }
9474 EOF
9475 if { (eval echo configure:9476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9476   rm -rf conftest*
9477   ac_cv_c_inline=$ac_kw; break
9478 else
9479   echo "configure: failed program was:" >&5
9480   cat conftest.$ac_ext >&5
9481 fi
9482 rm -f conftest*
9483 done
9484
9485
9486 echo "$ac_t""$ac_cv_c_inline" 1>&6
9487 case "$ac_cv_c_inline" in
9488   inline | yes) ;;
9489   no) { test "$extra_verbose" = "yes" && cat << \EOF
9490     Defining inline = 
9491 EOF
9492 cat >> confdefs.h <<\EOF
9493 #define inline 
9494 EOF
9495 }
9496  ;;
9497   *)  { test "$extra_verbose" = "yes" && cat << EOF
9498     Defining inline = $ac_cv_c_inline
9499 EOF
9500 cat >> confdefs.h <<EOF
9501 #define inline $ac_cv_c_inline
9502 EOF
9503 }
9504  ;;
9505 esac
9506
9507 if test "$ac_cv_c_inline" != "no"; then
9508   { test "$extra_verbose" = "yes" && cat << \EOF
9509     Defining HAVE_INLINE
9510 EOF
9511 cat >> confdefs.h <<\EOF
9512 #define HAVE_INLINE 1
9513 EOF
9514 }
9515
9516   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
9517    echo "    xemacs will be linked with \"inline.o\""
9518  fi
9519 fi
9520
9521
9522 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
9523 # for constant arguments.  Useless!
9524 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
9525 echo "configure:9526: checking for working alloca.h" >&5
9526
9527 cat > conftest.$ac_ext <<EOF
9528 #line 9529 "configure"
9529 #include "confdefs.h"
9530 #include <alloca.h>
9531 int main() {
9532 char *p = alloca(2 * sizeof(int));
9533 ; return 0; }
9534 EOF
9535 if { (eval echo configure:9536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9536   rm -rf conftest*
9537   ac_cv_header_alloca_h=yes
9538 else
9539   echo "configure: failed program was:" >&5
9540   cat conftest.$ac_ext >&5
9541   rm -rf conftest*
9542   ac_cv_header_alloca_h=no
9543 fi
9544 rm -f conftest*
9545
9546 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
9547 if test $ac_cv_header_alloca_h = yes; then
9548   { test "$extra_verbose" = "yes" && cat << \EOF
9549     Defining HAVE_ALLOCA_H
9550 EOF
9551 cat >> confdefs.h <<\EOF
9552 #define HAVE_ALLOCA_H 1
9553 EOF
9554 }
9555
9556 fi
9557
9558 echo $ac_n "checking for alloca""... $ac_c" 1>&6
9559 echo "configure:9560: checking for alloca" >&5
9560
9561 cat > conftest.$ac_ext <<EOF
9562 #line 9563 "configure"
9563 #include "confdefs.h"
9564
9565 #ifdef __GNUC__
9566 # define alloca __builtin_alloca
9567 #else
9568 # ifdef _MSC_VER
9569 #  include <malloc.h>
9570 #  define alloca _alloca
9571 # else
9572 #  if HAVE_ALLOCA_H
9573 #   include <alloca.h>
9574 #  else
9575 #   ifdef _AIX
9576  #pragma alloca
9577 #   else
9578 #    ifndef alloca /* predefined by HP cc +Olibcalls */
9579 char *alloca ();
9580 #    endif
9581 #   endif
9582 #  endif
9583 # endif
9584 #endif
9585
9586 int main() {
9587 char *p = (char *) alloca(1);
9588 ; return 0; }
9589 EOF
9590 if { (eval echo configure:9591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9591   rm -rf conftest*
9592   ac_cv_func_alloca_works=yes
9593 else
9594   echo "configure: failed program was:" >&5
9595   cat conftest.$ac_ext >&5
9596   rm -rf conftest*
9597   ac_cv_func_alloca_works=no
9598 fi
9599 rm -f conftest*
9600
9601 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
9602 if test $ac_cv_func_alloca_works = yes; then
9603   { test "$extra_verbose" = "yes" && cat << \EOF
9604     Defining HAVE_ALLOCA
9605 EOF
9606 cat >> confdefs.h <<\EOF
9607 #define HAVE_ALLOCA 1
9608 EOF
9609 }
9610
9611 fi
9612
9613 if test $ac_cv_func_alloca_works = no; then
9614   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
9615   # that cause trouble.  Some versions do not even contain alloca or
9616   # contain a buggy version.  If you still want to use their alloca,
9617   # use ar to extract alloca.o from them instead of compiling alloca.c.
9618   ALLOCA=alloca.${ac_objext}
9619   { test "$extra_verbose" = "yes" && cat << \EOF
9620     Defining C_ALLOCA
9621 EOF
9622 cat >> confdefs.h <<\EOF
9623 #define C_ALLOCA 1
9624 EOF
9625 }
9626
9627
9628 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
9629 echo "configure:9630: checking whether alloca needs Cray hooks" >&5
9630
9631 cat > conftest.$ac_ext <<EOF
9632 #line 9633 "configure"
9633 #include "confdefs.h"
9634 #if defined(CRAY) && ! defined(CRAY2)
9635 webecray
9636 #else
9637 wenotbecray
9638 #endif
9639
9640 EOF
9641 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9642   egrep "webecray" >/dev/null 2>&1; then
9643   rm -rf conftest*
9644   ac_cv_os_cray=yes
9645 else
9646   rm -rf conftest*
9647   ac_cv_os_cray=no
9648 fi
9649 rm -f conftest*
9650
9651
9652 echo "$ac_t""$ac_cv_os_cray" 1>&6
9653 if test $ac_cv_os_cray = yes; then
9654 for ac_func in _getb67 GETB67 getb67; do
9655   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9656 echo "configure:9657: checking for $ac_func" >&5
9657
9658 cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661 /* System header to define __stub macros and hopefully few prototypes,
9662     which can conflict with char $ac_func(); below.  */
9663 #include <assert.h>
9664 /* Override any gcc2 internal prototype to avoid an error.  */
9665 /* We use char because int might match the return type of a gcc2
9666     builtin and then its argument prototype would still apply.  */
9667 char $ac_func();
9668
9669 int main() {
9670
9671 /* The GNU C library defines this for functions which it implements
9672     to always fail with ENOSYS.  Some functions are actually named
9673     something starting with __ and the normal name is an alias.  */
9674 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9675 choke me
9676 #else
9677 $ac_func();
9678 #endif
9679
9680 ; return 0; }
9681 EOF
9682 if { (eval echo configure:9683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9683   rm -rf conftest*
9684   eval "ac_cv_func_$ac_func=yes"
9685 else
9686   echo "configure: failed program was:" >&5
9687   cat conftest.$ac_ext >&5
9688   rm -rf conftest*
9689   eval "ac_cv_func_$ac_func=no"
9690 fi
9691 rm -f conftest*
9692
9693 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9694   echo "$ac_t""yes" 1>&6
9695   { test "$extra_verbose" = "yes" && cat << EOF
9696     Defining CRAY_STACKSEG_END = $ac_func
9697 EOF
9698 cat >> confdefs.h <<EOF
9699 #define CRAY_STACKSEG_END $ac_func
9700 EOF
9701 }
9702
9703   break
9704 else
9705   echo "$ac_t""no" 1>&6
9706 fi
9707
9708 done
9709 fi
9710
9711 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9712 echo "configure:9713: checking stack direction for C alloca" >&5
9713
9714 cat > conftest.$ac_ext <<EOF
9715 #line 9716 "configure"
9716 #include "confdefs.h"
9717 find_stack_direction ()
9718 {
9719   static char *addr = 0;
9720   auto char dummy;
9721   if (addr == 0)
9722     {
9723       addr = &dummy;
9724       return find_stack_direction ();
9725     }
9726   else
9727     return (&dummy > addr) ? 1 : -1;
9728 }
9729 main ()
9730 {
9731   exit (find_stack_direction() < 0);
9732 }
9733 EOF
9734 if { (eval echo configure:9735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9735 then
9736   ac_cv_c_stack_direction=1
9737 else
9738   conftest_rc="$?"
9739   echo "configure: failed program was:" >&5
9740   cat conftest.$ac_ext >&5
9741   rm -fr conftest*
9742   ac_cv_c_stack_direction=-1
9743 fi
9744 rm -fr conftest*
9745
9746 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9747 { test "$extra_verbose" = "yes" && cat << EOF
9748     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9749 EOF
9750 cat >> confdefs.h <<EOF
9751 #define STACK_DIRECTION $ac_cv_c_stack_direction
9752 EOF
9753 }
9754
9755 fi
9756
9757 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9758    echo "    xemacs will be linked with \"$ALLOCA\""
9759  fi
9760
9761 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9762 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9763 echo "configure:9764: checking for vfork.h" >&5
9764
9765 cat > conftest.$ac_ext <<EOF
9766 #line 9767 "configure"
9767 #include "confdefs.h"
9768 #include <vfork.h>
9769 EOF
9770 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9771 { (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9772 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9773 if test -z "$ac_err"; then
9774   rm -rf conftest*
9775   eval "ac_cv_header_$ac_safe=yes"
9776 else
9777   echo "$ac_err" >&5
9778   echo "configure: failed program was:" >&5
9779   cat conftest.$ac_ext >&5
9780   rm -rf conftest*
9781   eval "ac_cv_header_$ac_safe=no"
9782 fi
9783 rm -f conftest*
9784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786   { test "$extra_verbose" = "yes" && cat << \EOF
9787     Defining HAVE_VFORK_H
9788 EOF
9789 cat >> confdefs.h <<\EOF
9790 #define HAVE_VFORK_H 1
9791 EOF
9792 }
9793
9794 else
9795   echo "$ac_t""no" 1>&6
9796 fi
9797
9798 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9799 echo "configure:9800: checking for working vfork" >&5
9800
9801 cat > conftest.$ac_ext <<EOF
9802 #line 9803 "configure"
9803 #include "confdefs.h"
9804 /* Thanks to Paul Eggert for this test.  */
9805 #include <stdio.h>
9806 #include <sys/types.h>
9807 #include <sys/stat.h>
9808 #ifdef HAVE_UNISTD_H
9809 #include <unistd.h>
9810 #endif
9811 #ifdef HAVE_VFORK_H
9812 #include <vfork.h>
9813 #endif
9814 /* On some sparc systems, changes by the child to local and incoming
9815    argument registers are propagated back to the parent.
9816    The compiler is told about this with #include <vfork.h>,
9817    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9818    Test for this by using a static variable whose address
9819    is put into a register that is clobbered by the vfork.  */
9820 static
9821 #ifdef __cplusplus
9822 sparc_address_test (int arg)
9823 #else
9824 sparc_address_test (arg) int arg;
9825 #endif
9826 {
9827   static pid_t child;
9828   if (!child) {
9829     child = vfork ();
9830     if (child < 0) {
9831       perror ("vfork");
9832       _exit(2);
9833     }
9834     if (!child) {
9835       arg = getpid();
9836       write(-1, "", 0);
9837       _exit (arg);
9838     }
9839   }
9840 }
9841 main() {
9842   pid_t parent = getpid ();
9843   pid_t child;
9844
9845   sparc_address_test ();
9846
9847   child = vfork ();
9848
9849   if (child == 0) {
9850     /* Here is another test for sparc vfork register problems.
9851        This test uses lots of local variables, at least
9852        as many local variables as main has allocated so far
9853        including compiler temporaries.  4 locals are enough for
9854        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9855        A buggy compiler should reuse the register of parent
9856        for one of the local variables, since it will think that
9857        parent can't possibly be used any more in this routine.
9858        Assigning to the local variable will thus munge parent
9859        in the parent process.  */
9860     pid_t
9861       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9862       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9863     /* Convince the compiler that p..p7 are live; otherwise, it might
9864        use the same hardware register for all 8 local variables.  */
9865     if (p != p1 || p != p2 || p != p3 || p != p4
9866         || p != p5 || p != p6 || p != p7)
9867       _exit(1);
9868
9869     /* On some systems (e.g. IRIX 3.3),
9870        vfork doesn't separate parent from child file descriptors.
9871        If the child closes a descriptor before it execs or exits,
9872        this munges the parent's descriptor as well.
9873        Test for this by closing stdout in the child.  */
9874     _exit(close(fileno(stdout)) != 0);
9875   } else {
9876     int status;
9877     struct stat st;
9878
9879     while (wait(&status) != child)
9880       ;
9881     exit(
9882          /* Was there some problem with vforking?  */
9883          child < 0
9884
9885          /* Did the child fail?  (This shouldn't happen.)  */
9886          || status
9887
9888          /* Did the vfork/compiler bug occur?  */
9889          || parent != getpid()
9890
9891          /* Did the file descriptor bug occur?  */
9892          || fstat(fileno(stdout), &st) != 0
9893          );
9894   }
9895 }
9896 EOF
9897 if { (eval echo configure:9898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9898 then
9899   ac_cv_func_vfork_works=yes
9900 else
9901   conftest_rc="$?"
9902   echo "configure: failed program was:" >&5
9903   cat conftest.$ac_ext >&5
9904   rm -fr conftest*
9905   ac_cv_func_vfork_works=no
9906 fi
9907 rm -fr conftest*
9908
9909 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9910 if test $ac_cv_func_vfork_works = no; then
9911   { test "$extra_verbose" = "yes" && cat << \EOF
9912     Defining vfork = fork
9913 EOF
9914 cat >> confdefs.h <<\EOF
9915 #define vfork fork
9916 EOF
9917 }
9918
9919 fi
9920
9921
9922 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9923 echo "configure:9924: checking for working strcoll" >&5
9924
9925 cat > conftest.$ac_ext <<EOF
9926 #line 9927 "configure"
9927 #include "confdefs.h"
9928 #include <string.h>
9929 main ()
9930 {
9931   exit (strcoll ("abc", "def") >= 0 ||
9932         strcoll ("ABC", "DEF") >= 0 ||
9933         strcoll ("123", "456") >= 0);
9934 }
9935 EOF
9936 if { (eval echo configure:9937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9937 then
9938   ac_cv_func_strcoll_works=yes
9939 else
9940   conftest_rc="$?"
9941   echo "configure: failed program was:" >&5
9942   cat conftest.$ac_ext >&5
9943   rm -fr conftest*
9944   ac_cv_func_strcoll_works=no
9945 fi
9946 rm -fr conftest*
9947
9948 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9949 if test $ac_cv_func_strcoll_works = yes; then
9950   { test "$extra_verbose" = "yes" && cat << \EOF
9951     Defining HAVE_STRCOLL
9952 EOF
9953 cat >> confdefs.h <<\EOF
9954 #define HAVE_STRCOLL 1
9955 EOF
9956 }
9957
9958 fi
9959
9960
9961 for ac_func in getpgrp
9962 do
9963 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9964 echo "configure:9965: checking for $ac_func" >&5
9965
9966 cat > conftest.$ac_ext <<EOF
9967 #line 9968 "configure"
9968 #include "confdefs.h"
9969 /* System header to define __stub macros and hopefully few prototypes,
9970     which can conflict with char $ac_func(); below.  */
9971 #include <assert.h>
9972 /* Override any gcc2 internal prototype to avoid an error.  */
9973 /* We use char because int might match the return type of a gcc2
9974     builtin and then its argument prototype would still apply.  */
9975 char $ac_func();
9976
9977 int main() {
9978
9979 /* The GNU C library defines this for functions which it implements
9980     to always fail with ENOSYS.  Some functions are actually named
9981     something starting with __ and the normal name is an alias.  */
9982 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9983 choke me
9984 #else
9985 $ac_func();
9986 #endif
9987
9988 ; return 0; }
9989 EOF
9990 if { (eval echo configure:9991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9991   rm -rf conftest*
9992   eval "ac_cv_func_$ac_func=yes"
9993 else
9994   echo "configure: failed program was:" >&5
9995   cat conftest.$ac_ext >&5
9996   rm -rf conftest*
9997   eval "ac_cv_func_$ac_func=no"
9998 fi
9999 rm -f conftest*
10000
10001 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10002   echo "$ac_t""yes" 1>&6
10003     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10004   { test "$extra_verbose" = "yes" && cat << EOF
10005     Defining $ac_tr_func
10006 EOF
10007 cat >> confdefs.h <<EOF
10008 #define $ac_tr_func 1
10009 EOF
10010 }
10011  
10012 else
10013   echo "$ac_t""no" 1>&6
10014 fi
10015 done
10016
10017 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10018 echo "configure:10019: checking whether getpgrp takes no argument" >&5
10019
10020 cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023
10024 /*
10025  * If this system has a BSD-style getpgrp(),
10026  * which takes a pid argument, exit unsuccessfully.
10027  *
10028  * Snarfed from Chet Ramey's bash pgrp.c test program
10029  */
10030 #include <stdio.h>
10031 #include <sys/types.h>
10032
10033 int     pid;
10034 int     pg1, pg2, pg3, pg4;
10035 int     ng, np, s, child;
10036
10037 main()
10038 {
10039         pid = getpid();
10040         pg1 = getpgrp(0);
10041         pg2 = getpgrp();
10042         pg3 = getpgrp(pid);
10043         pg4 = getpgrp(1);
10044
10045         /*
10046          * If all of these values are the same, it's pretty sure that
10047          * we're on a system that ignores getpgrp's first argument.
10048          */
10049         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10050                 exit(0);
10051
10052         child = fork();
10053         if (child < 0)
10054                 exit(1);
10055         else if (child == 0) {
10056                 np = getpid();
10057                 /*
10058                  * If this is Sys V, this will not work; pgrp will be
10059                  * set to np because setpgrp just changes a pgrp to be
10060                  * the same as the pid.
10061                  */
10062                 setpgrp(np, pg1);
10063                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10064                 if (ng == pg1) {
10065                         exit(1);
10066                 } else {
10067                         exit(0);
10068                 }
10069         } else {
10070                 wait(&s);
10071                 exit(s>>8);
10072         }
10073 }
10074
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10077 then
10078   ac_cv_func_getpgrp_void=yes
10079 else
10080   conftest_rc="$?"
10081   echo "configure: failed program was:" >&5
10082   cat conftest.$ac_ext >&5
10083   rm -fr conftest*
10084   ac_cv_func_getpgrp_void=no
10085 fi
10086 rm -fr conftest*
10087
10088
10089 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10090 if test $ac_cv_func_getpgrp_void = yes; then
10091   { test "$extra_verbose" = "yes" && cat << \EOF
10092     Defining GETPGRP_VOID
10093 EOF
10094 cat >> confdefs.h <<\EOF
10095 #define GETPGRP_VOID 1
10096 EOF
10097 }
10098
10099 fi
10100
10101
10102 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10103 echo "configure:10104: checking for working mmap" >&5
10104 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10105 cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108 #include <stdio.h>
10109 #include <unistd.h>
10110 #include <fcntl.h>
10111 #include <sys/mman.h>
10112
10113 #ifndef MAP_VARIABLE
10114 #define MAP_VARIABLE 0
10115 #endif
10116
10117 #ifndef MAP_FAILED
10118 #define MAP_FAILED -1
10119 #endif
10120
10121 int main (int argc, char *argv[])
10122 {
10123   int fd = -1;
10124   caddr_t p;
10125 #ifndef MAP_ANONYMOUS
10126   fd = open ("/dev/zero", O_RDWR);
10127   if (fd < 0)
10128     return 1;
10129 #define MAP_ANONYMOUS 0
10130 #endif
10131   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10132            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10133            fd, 0) != (void *) MAP_FAILED)
10134     return 0;
10135   perror ("conftest: mmap failed");
10136   return 1;
10137 }
10138 EOF
10139 if { (eval echo configure:10140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10140 then
10141   have_mmap=yes
10142 else
10143   conftest_rc="$?"
10144   echo "configure: failed program was:" >&5
10145   cat conftest.$ac_ext >&5
10146   rm -fr conftest*
10147   have_mmap=no
10148 fi
10149 rm -fr conftest* ;;
10150 esac
10151 echo "$ac_t""$have_mmap" 1>&6
10152 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10153     Defining HAVE_MMAP
10154 EOF
10155 cat >> confdefs.h <<\EOF
10156 #define HAVE_MMAP 1
10157 EOF
10158 }
10159
10160
10161 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
10162 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
10163 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10164     Defining REL_ALLOC
10165 EOF
10166 cat >> confdefs.h <<\EOF
10167 #define REL_ALLOC 1
10168 EOF
10169 }
10170
10171
10172 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10173 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10174 echo "configure:10175: checking for termios.h" >&5
10175
10176 cat > conftest.$ac_ext <<EOF
10177 #line 10178 "configure"
10178 #include "confdefs.h"
10179 #include <termios.h>
10180 EOF
10181 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10182 { (eval echo configure:10183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10183 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10184 if test -z "$ac_err"; then
10185   rm -rf conftest*
10186   eval "ac_cv_header_$ac_safe=yes"
10187 else
10188   echo "$ac_err" >&5
10189   echo "configure: failed program was:" >&5
10190   cat conftest.$ac_ext >&5
10191   rm -rf conftest*
10192   eval "ac_cv_header_$ac_safe=no"
10193 fi
10194 rm -f conftest*
10195 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10196   echo "$ac_t""yes" 1>&6
10197   { test "$extra_verbose" = "yes" && cat << \EOF
10198     Defining HAVE_TERMIOS
10199 EOF
10200 cat >> confdefs.h <<\EOF
10201 #define HAVE_TERMIOS 1
10202 EOF
10203 }
10204
10205   { test "$extra_verbose" = "yes" && cat << \EOF
10206     Defining SIGNALS_VIA_CHARACTERS
10207 EOF
10208 cat >> confdefs.h <<\EOF
10209 #define SIGNALS_VIA_CHARACTERS 1
10210 EOF
10211 }
10212
10213   { test "$extra_verbose" = "yes" && cat << \EOF
10214     Defining NO_TERMIO
10215 EOF
10216 cat >> confdefs.h <<\EOF
10217 #define NO_TERMIO 1
10218 EOF
10219 }
10220
10221 else
10222   echo "$ac_t""no" 1>&6
10223 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10224 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10225 echo "configure:10226: checking for termio.h" >&5
10226
10227 cat > conftest.$ac_ext <<EOF
10228 #line 10229 "configure"
10229 #include "confdefs.h"
10230 #include <termio.h>
10231 EOF
10232 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10233 { (eval echo configure:10234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10234 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10235 if test -z "$ac_err"; then
10236   rm -rf conftest*
10237   eval "ac_cv_header_$ac_safe=yes"
10238 else
10239   echo "$ac_err" >&5
10240   echo "configure: failed program was:" >&5
10241   cat conftest.$ac_ext >&5
10242   rm -rf conftest*
10243   eval "ac_cv_header_$ac_safe=no"
10244 fi
10245 rm -f conftest*
10246 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10247   echo "$ac_t""yes" 1>&6
10248   { test "$extra_verbose" = "yes" && cat << \EOF
10249     Defining HAVE_TERMIO
10250 EOF
10251 cat >> confdefs.h <<\EOF
10252 #define HAVE_TERMIO 1
10253 EOF
10254 }
10255
10256 else
10257   echo "$ac_t""no" 1>&6
10258 fi
10259
10260 fi
10261
10262
10263
10264 echo $ac_n "checking for socket""... $ac_c" 1>&6
10265 echo "configure:10266: checking for socket" >&5
10266
10267 cat > conftest.$ac_ext <<EOF
10268 #line 10269 "configure"
10269 #include "confdefs.h"
10270 /* System header to define __stub macros and hopefully few prototypes,
10271     which can conflict with char socket(); below.  */
10272 #include <assert.h>
10273 /* Override any gcc2 internal prototype to avoid an error.  */
10274 /* We use char because int might match the return type of a gcc2
10275     builtin and then its argument prototype would still apply.  */
10276 char socket();
10277
10278 int main() {
10279
10280 /* The GNU C library defines this for functions which it implements
10281     to always fail with ENOSYS.  Some functions are actually named
10282     something starting with __ and the normal name is an alias.  */
10283 #if defined (__stub_socket) || defined (__stub___socket)
10284 choke me
10285 #else
10286 socket();
10287 #endif
10288
10289 ; return 0; }
10290 EOF
10291 if { (eval echo configure:10292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10292   rm -rf conftest*
10293   eval "ac_cv_func_socket=yes"
10294 else
10295   echo "configure: failed program was:" >&5
10296   cat conftest.$ac_ext >&5
10297   rm -rf conftest*
10298   eval "ac_cv_func_socket=no"
10299 fi
10300 rm -f conftest*
10301
10302 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10303   echo "$ac_t""yes" 1>&6
10304   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10305 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10306 echo "configure:10307: checking for netinet/in.h" >&5
10307
10308 cat > conftest.$ac_ext <<EOF
10309 #line 10310 "configure"
10310 #include "confdefs.h"
10311 #include <netinet/in.h>
10312 EOF
10313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10314 { (eval echo configure:10315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10316 if test -z "$ac_err"; then
10317   rm -rf conftest*
10318   eval "ac_cv_header_$ac_safe=yes"
10319 else
10320   echo "$ac_err" >&5
10321   echo "configure: failed program was:" >&5
10322   cat conftest.$ac_ext >&5
10323   rm -rf conftest*
10324   eval "ac_cv_header_$ac_safe=no"
10325 fi
10326 rm -f conftest*
10327 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10328   echo "$ac_t""yes" 1>&6
10329   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10330 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10331 echo "configure:10332: checking for arpa/inet.h" >&5
10332
10333 cat > conftest.$ac_ext <<EOF
10334 #line 10335 "configure"
10335 #include "confdefs.h"
10336 #include <arpa/inet.h>
10337 EOF
10338 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10339 { (eval echo configure:10340: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10340 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10341 if test -z "$ac_err"; then
10342   rm -rf conftest*
10343   eval "ac_cv_header_$ac_safe=yes"
10344 else
10345   echo "$ac_err" >&5
10346   echo "configure: failed program was:" >&5
10347   cat conftest.$ac_ext >&5
10348   rm -rf conftest*
10349   eval "ac_cv_header_$ac_safe=no"
10350 fi
10351 rm -f conftest*
10352 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10353   echo "$ac_t""yes" 1>&6
10354   
10355   { test "$extra_verbose" = "yes" && cat << \EOF
10356     Defining HAVE_SOCKETS
10357 EOF
10358 cat >> confdefs.h <<\EOF
10359 #define HAVE_SOCKETS 1
10360 EOF
10361 }
10362
10363       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10364 echo "configure:10365: checking "for sun_len member in struct sockaddr_un"" >&5
10365       cat > conftest.$ac_ext <<EOF
10366 #line 10367 "configure"
10367 #include "confdefs.h"
10368
10369 #include <sys/types.h>
10370 #include <sys/socket.h>
10371 #include <sys/un.h>
10372       
10373 int main() {
10374 static struct sockaddr_un x; x.sun_len = 1;
10375 ; return 0; }
10376 EOF
10377 if { (eval echo configure:10378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10378   rm -rf conftest*
10379   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10380     Defining HAVE_SOCKADDR_SUN_LEN
10381 EOF
10382 cat >> confdefs.h <<\EOF
10383 #define HAVE_SOCKADDR_SUN_LEN 1
10384 EOF
10385 }
10386
10387 else
10388   echo "configure: failed program was:" >&5
10389   cat conftest.$ac_ext >&5
10390   rm -rf conftest*
10391   echo "$ac_t""no" 1>&6
10392 fi
10393 rm -f conftest*
10394       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
10395 echo "configure:10396: checking "for ip_mreq struct in netinet/in.h"" >&5
10396       cat > conftest.$ac_ext <<EOF
10397 #line 10398 "configure"
10398 #include "confdefs.h"
10399
10400 #include <sys/types.h>
10401 #include <netinet/in.h>
10402       
10403 int main() {
10404 static struct ip_mreq x;
10405 ; return 0; }
10406 EOF
10407 if { (eval echo configure:10408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10408   rm -rf conftest*
10409   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10410     Defining HAVE_MULTICAST
10411 EOF
10412 cat >> confdefs.h <<\EOF
10413 #define HAVE_MULTICAST 1
10414 EOF
10415 }
10416
10417 else
10418   echo "configure: failed program was:" >&5
10419   cat conftest.$ac_ext >&5
10420   rm -rf conftest*
10421   echo "$ac_t""no" 1>&6
10422 fi
10423 rm -f conftest*
10424 else
10425   echo "$ac_t""no" 1>&6
10426 fi
10427
10428 else
10429   echo "$ac_t""no" 1>&6
10430 fi
10431
10432 else
10433   echo "$ac_t""no" 1>&6
10434 fi
10435
10436
10437 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10438 echo "configure:10439: checking for msgget" >&5
10439
10440 cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 /* System header to define __stub macros and hopefully few prototypes,
10444     which can conflict with char msgget(); below.  */
10445 #include <assert.h>
10446 /* Override any gcc2 internal prototype to avoid an error.  */
10447 /* We use char because int might match the return type of a gcc2
10448     builtin and then its argument prototype would still apply.  */
10449 char msgget();
10450
10451 int main() {
10452
10453 /* The GNU C library defines this for functions which it implements
10454     to always fail with ENOSYS.  Some functions are actually named
10455     something starting with __ and the normal name is an alias.  */
10456 #if defined (__stub_msgget) || defined (__stub___msgget)
10457 choke me
10458 #else
10459 msgget();
10460 #endif
10461
10462 ; return 0; }
10463 EOF
10464 if { (eval echo configure:10465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10465   rm -rf conftest*
10466   eval "ac_cv_func_msgget=yes"
10467 else
10468   echo "configure: failed program was:" >&5
10469   cat conftest.$ac_ext >&5
10470   rm -rf conftest*
10471   eval "ac_cv_func_msgget=no"
10472 fi
10473 rm -f conftest*
10474
10475 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10476   echo "$ac_t""yes" 1>&6
10477   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10478 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10479 echo "configure:10480: checking for sys/ipc.h" >&5
10480
10481 cat > conftest.$ac_ext <<EOF
10482 #line 10483 "configure"
10483 #include "confdefs.h"
10484 #include <sys/ipc.h>
10485 EOF
10486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10487 { (eval echo configure:10488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10489 if test -z "$ac_err"; then
10490   rm -rf conftest*
10491   eval "ac_cv_header_$ac_safe=yes"
10492 else
10493   echo "$ac_err" >&5
10494   echo "configure: failed program was:" >&5
10495   cat conftest.$ac_ext >&5
10496   rm -rf conftest*
10497   eval "ac_cv_header_$ac_safe=no"
10498 fi
10499 rm -f conftest*
10500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10501   echo "$ac_t""yes" 1>&6
10502   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10503 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10504 echo "configure:10505: checking for sys/msg.h" >&5
10505
10506 cat > conftest.$ac_ext <<EOF
10507 #line 10508 "configure"
10508 #include "confdefs.h"
10509 #include <sys/msg.h>
10510 EOF
10511 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10512 { (eval echo configure:10513: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10513 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10514 if test -z "$ac_err"; then
10515   rm -rf conftest*
10516   eval "ac_cv_header_$ac_safe=yes"
10517 else
10518   echo "$ac_err" >&5
10519   echo "configure: failed program was:" >&5
10520   cat conftest.$ac_ext >&5
10521   rm -rf conftest*
10522   eval "ac_cv_header_$ac_safe=no"
10523 fi
10524 rm -f conftest*
10525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527   { test "$extra_verbose" = "yes" && cat << \EOF
10528     Defining HAVE_SYSVIPC
10529 EOF
10530 cat >> confdefs.h <<\EOF
10531 #define HAVE_SYSVIPC 1
10532 EOF
10533 }
10534
10535 else
10536   echo "$ac_t""no" 1>&6
10537 fi
10538
10539 else
10540   echo "$ac_t""no" 1>&6
10541 fi
10542
10543 else
10544   echo "$ac_t""no" 1>&6
10545 fi
10546
10547
10548 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10549 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10550 echo "configure:10551: checking for dirent.h" >&5
10551
10552 cat > conftest.$ac_ext <<EOF
10553 #line 10554 "configure"
10554 #include "confdefs.h"
10555 #include <dirent.h>
10556 EOF
10557 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10558 { (eval echo configure:10559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10559 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10560 if test -z "$ac_err"; then
10561   rm -rf conftest*
10562   eval "ac_cv_header_$ac_safe=yes"
10563 else
10564   echo "$ac_err" >&5
10565   echo "configure: failed program was:" >&5
10566   cat conftest.$ac_ext >&5
10567   rm -rf conftest*
10568   eval "ac_cv_header_$ac_safe=no"
10569 fi
10570 rm -f conftest*
10571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10572   echo "$ac_t""yes" 1>&6
10573   { test "$extra_verbose" = "yes" && cat << \EOF
10574     Defining SYSV_SYSTEM_DIR
10575 EOF
10576 cat >> confdefs.h <<\EOF
10577 #define SYSV_SYSTEM_DIR 1
10578 EOF
10579 }
10580
10581 else
10582   echo "$ac_t""no" 1>&6
10583 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10584 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10585 echo "configure:10586: checking for sys/dir.h" >&5
10586
10587 cat > conftest.$ac_ext <<EOF
10588 #line 10589 "configure"
10589 #include "confdefs.h"
10590 #include <sys/dir.h>
10591 EOF
10592 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10593 { (eval echo configure:10594: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10594 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10595 if test -z "$ac_err"; then
10596   rm -rf conftest*
10597   eval "ac_cv_header_$ac_safe=yes"
10598 else
10599   echo "$ac_err" >&5
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_header_$ac_safe=no"
10604 fi
10605 rm -f conftest*
10606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10607   echo "$ac_t""yes" 1>&6
10608   :
10609 else
10610   echo "$ac_t""no" 1>&6
10611 { test "$extra_verbose" = "yes" && cat << \EOF
10612     Defining NONSYSTEM_DIR_LIBRARY
10613 EOF
10614 cat >> confdefs.h <<\EOF
10615 #define NONSYSTEM_DIR_LIBRARY 1
10616 EOF
10617 }
10618
10619 fi
10620
10621 fi
10622
10623
10624 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10625 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10626 echo "configure:10627: checking for nlist.h" >&5
10627
10628 cat > conftest.$ac_ext <<EOF
10629 #line 10630 "configure"
10630 #include "confdefs.h"
10631 #include <nlist.h>
10632 EOF
10633 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10634 { (eval echo configure:10635: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10635 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10636 if test -z "$ac_err"; then
10637   rm -rf conftest*
10638   eval "ac_cv_header_$ac_safe=yes"
10639 else
10640   echo "$ac_err" >&5
10641   echo "configure: failed program was:" >&5
10642   cat conftest.$ac_ext >&5
10643   rm -rf conftest*
10644   eval "ac_cv_header_$ac_safe=no"
10645 fi
10646 rm -f conftest*
10647 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10648   echo "$ac_t""yes" 1>&6
10649   { test "$extra_verbose" = "yes" && cat << \EOF
10650     Defining NLIST_STRUCT
10651 EOF
10652 cat >> confdefs.h <<\EOF
10653 #define NLIST_STRUCT 1
10654 EOF
10655 }
10656
10657 else
10658   echo "$ac_t""no" 1>&6
10659 fi
10660
10661
10662
10663 echo "checking "for sound support"" 1>&6
10664 echo "configure:10665: checking "for sound support"" >&5
10665 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10666
10667 if test "$with_native_sound" != "no"; then
10668     if test -n "$native_sound_lib"; then
10669     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10670 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10671 echo "configure:10672: checking for multimedia/audio_device.h" >&5
10672
10673 cat > conftest.$ac_ext <<EOF
10674 #line 10675 "configure"
10675 #include "confdefs.h"
10676 #include <multimedia/audio_device.h>
10677 EOF
10678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10679 { (eval echo configure:10680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10681 if test -z "$ac_err"; then
10682   rm -rf conftest*
10683   eval "ac_cv_header_$ac_safe=yes"
10684 else
10685   echo "$ac_err" >&5
10686   echo "configure: failed program was:" >&5
10687   cat conftest.$ac_ext >&5
10688   rm -rf conftest*
10689   eval "ac_cv_header_$ac_safe=no"
10690 fi
10691 rm -f conftest*
10692 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10693   echo "$ac_t""yes" 1>&6
10694   sound_found=yes sound_cflags=""
10695       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10696    echo "    xemacs will be linked with \"sunplay.o\""
10697  fi
10698 else
10699   echo "$ac_t""no" 1>&6
10700 fi
10701
10702   fi
10703
10704     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10705     sound_found=yes
10706     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10707    echo "    xemacs will be linked with \"sunplay.o\""
10708  fi
10709     if test -d "/usr/demo/SOUND/include"
10710       then sound_cflags="-I/usr/demo/SOUND/include"
10711       else sound_cflags="-I/usr/demo/SOUND"
10712     fi
10713     if test -z "$native_sound_lib" ; then
10714       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10715         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10716         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10717       fi
10718     fi
10719   fi
10720
10721     if test -z "$sound_found"; then
10722     case "$canonical" in
10723     *-sgi-* )
10724       if test -z "$native_sound_lib"; then
10725         
10726 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10727 echo "configure:10728: checking for ALopenport in -laudio" >&5
10728 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10729
10730 xe_check_libs=" -laudio "
10731 cat > conftest.$ac_ext <<EOF
10732 #line 10733 "configure"
10733 #include "confdefs.h"
10734 /* Override any gcc2 internal prototype to avoid an error.  */
10735 /* We use char because int might match the return type of a gcc2
10736     builtin and then its argument prototype would still apply.  */
10737 char ALopenport();
10738
10739 int main() {
10740 ALopenport()
10741 ; return 0; }
10742 EOF
10743 if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10744   rm -rf conftest*
10745   eval "ac_cv_lib_$ac_lib_var=yes"
10746 else
10747   echo "configure: failed program was:" >&5
10748   cat conftest.$ac_ext >&5
10749   rm -rf conftest*
10750   eval "ac_cv_lib_$ac_lib_var=no"
10751 fi
10752 rm -f conftest*
10753 xe_check_libs=""
10754
10755 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10756   echo "$ac_t""yes" 1>&6
10757   native_sound_lib="-laudio"
10758 else
10759   echo "$ac_t""no" 1>&6
10760 fi
10761
10762
10763       fi
10764       if test -n "$native_sound_lib"; then
10765         sound_found=yes sound_cflags=""
10766         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10767    echo "    xemacs will be linked with \"sgiplay.o\""
10768  fi
10769       fi ;;
10770     hppa*-hp-hpux* )
10771       if test -z "$native_sound_lib"; then
10772         
10773 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10774 echo "configure:10775: checking for AOpenAudio in -lAlib" >&5
10775 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10776
10777 xe_check_libs=" -lAlib "
10778 cat > conftest.$ac_ext <<EOF
10779 #line 10780 "configure"
10780 #include "confdefs.h"
10781 /* Override any gcc2 internal prototype to avoid an error.  */
10782 /* We use char because int might match the return type of a gcc2
10783     builtin and then its argument prototype would still apply.  */
10784 char AOpenAudio();
10785
10786 int main() {
10787 AOpenAudio()
10788 ; return 0; }
10789 EOF
10790 if { (eval echo configure:10791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10791   rm -rf conftest*
10792   eval "ac_cv_lib_$ac_lib_var=yes"
10793 else
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_lib_$ac_lib_var=no"
10798 fi
10799 rm -f conftest*
10800 xe_check_libs=""
10801
10802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10803   echo "$ac_t""yes" 1>&6
10804   native_sound_lib="-lAlib"
10805 else
10806   echo "$ac_t""no" 1>&6
10807 fi
10808
10809
10810       fi
10811       if test -n "$native_sound_lib"; then
10812         sound_found=yes
10813         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10814    echo "    xemacs will be linked with \"hpplay.o\""
10815  fi
10816         if test "$GCC" = "yes" # Kludge city
10817           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10818           else sound_cflags="+e -I/usr/audio/examples"
10819         fi
10820       fi ;;
10821     esac
10822   fi
10823
10824     if test -z "$sound_found"; then
10825     for dir in "machine" "sys" "linux"; do
10826       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10827 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10828 echo "configure:10829: checking for ${dir}/soundcard.h" >&5
10829
10830 cat > conftest.$ac_ext <<EOF
10831 #line 10832 "configure"
10832 #include "confdefs.h"
10833 #include <${dir}/soundcard.h>
10834 EOF
10835 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10836 { (eval echo configure:10837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10837 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10838 if test -z "$ac_err"; then
10839   rm -rf conftest*
10840   eval "ac_cv_header_$ac_safe=yes"
10841 else
10842   echo "$ac_err" >&5
10843   echo "configure: failed program was:" >&5
10844   cat conftest.$ac_ext >&5
10845   rm -rf conftest*
10846   eval "ac_cv_header_$ac_safe=no"
10847 fi
10848 rm -f conftest*
10849 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10850   echo "$ac_t""yes" 1>&6
10851   sound_found=yes
10852        need_miscplay=yes
10853         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10854    echo "    xemacs will be linked with \"linuxplay.o\""
10855  fi
10856         { test "$extra_verbose" = "yes" && cat << EOF
10857     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10858 EOF
10859 cat >> confdefs.h <<EOF
10860 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10861 EOF
10862 }
10863
10864         break
10865 else
10866   echo "$ac_t""no" 1>&6
10867 fi
10868
10869     done
10870   fi
10871
10872   test "$sound_found" = "yes" && with_native_sound=yes
10873 fi
10874
10875 if test "$with_native_sound" = "yes"; then
10876   { test "$extra_verbose" = "yes" && cat << \EOF
10877     Defining HAVE_NATIVE_SOUND
10878 EOF
10879 cat >> confdefs.h <<\EOF
10880 #define HAVE_NATIVE_SOUND 1
10881 EOF
10882 }
10883
10884   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10885 fi
10886
10887 if test "$with_nas_sound" = "yes"; then
10888   { test "$extra_verbose" = "yes" && cat << \EOF
10889     Defining HAVE_NAS_SOUND
10890 EOF
10891 cat >> confdefs.h <<\EOF
10892 #define HAVE_NAS_SOUND 1
10893 EOF
10894 }
10895
10896   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10897    echo "    xemacs will be linked with \"nas.o\""
10898  fi
10899   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10900       cat > conftest.$ac_ext <<EOF
10901 #line 10902 "configure"
10902 #include "confdefs.h"
10903 #include <audio/Xtutil.h>
10904 EOF
10905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10906   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10907   :
10908 else
10909   rm -rf conftest*
10910   { test "$extra_verbose" = "yes" && cat << \EOF
10911     Defining NAS_NO_ERROR_JUMP
10912 EOF
10913 cat >> confdefs.h <<\EOF
10914 #define NAS_NO_ERROR_JUMP 1
10915 EOF
10916 }
10917
10918 fi
10919 rm -f conftest*
10920
10921 fi
10922
10923 # Extract the first word of "esd-config", so it can be a program name with args.
10924 set dummy esd-config; ac_word=$2
10925 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
10926 echo "configure:10927: checking for $ac_word" >&5
10927
10928 if test -n "$have_esd_config"; then
10929   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
10930 else
10931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
10932   ac_dummy="$PATH"
10933   for ac_dir in $ac_dummy; do
10934     test -z "$ac_dir" && ac_dir=.
10935     if test -f $ac_dir/$ac_word; then
10936       ac_cv_prog_have_esd_config="yes"
10937       break
10938     fi
10939   done
10940   IFS="$ac_save_ifs"
10941   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
10942 fi
10943 have_esd_config="$ac_cv_prog_have_esd_config"
10944 if test -n "$have_esd_config"; then
10945   echo "$ac_t""$have_esd_config" 1>&6
10946 else
10947   echo "$ac_t""no" 1>&6
10948 fi
10949
10950 if test -z "$with_esd"; then
10951   with_esd=$have_esd_config
10952 fi
10953
10954 if test "$with_esd" = "yes"; then
10955   if test "$have_esd_config" = "no"; then
10956     echo "*** esd-config was not found in your PATH. Disabling esd support."
10957     with_esd=no
10958   else
10959     { test "$extra_verbose" = "yes" && cat << \EOF
10960     Defining HAVE_ESD_SOUND
10961 EOF
10962 cat >> confdefs.h <<\EOF
10963 #define HAVE_ESD_SOUND 1
10964 EOF
10965 }
10966
10967     need_miscplay=yes
10968     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
10969    echo "    xemacs will be linked with \"esd.o\""
10970  fi
10971     libs_x="`esd-config --libs` $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$libs_x"; fi
10972   fi
10973 fi
10974
10975 if test "$need_miscplay" = "yes"; then
10976   extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
10977    echo "    xemacs will be linked with \"miscplay.o\""
10978  fi
10979 fi
10980
10981
10982 test -z "$with_tty" && with_tty=yes
10983
10984 if test "$with_tty" = "yes"  ; then
10985   echo "checking for TTY-related features" 1>&6
10986 echo "configure:10987: checking for TTY-related features" >&5
10987   { test "$extra_verbose" = "yes" && cat << \EOF
10988     Defining HAVE_TTY
10989 EOF
10990 cat >> confdefs.h <<\EOF
10991 #define HAVE_TTY 1
10992 EOF
10993 }
10994
10995   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
10996    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\""
10997  fi
10998
10999     if test -z "$with_ncurses"; then
11000     
11001 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11002 echo "configure:11003: checking for tgetent in -lncurses" >&5
11003 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11004
11005 xe_check_libs=" -lncurses "
11006 cat > conftest.$ac_ext <<EOF
11007 #line 11008 "configure"
11008 #include "confdefs.h"
11009 /* Override any gcc2 internal prototype to avoid an error.  */
11010 /* We use char because int might match the return type of a gcc2
11011     builtin and then its argument prototype would still apply.  */
11012 char tgetent();
11013
11014 int main() {
11015 tgetent()
11016 ; return 0; }
11017 EOF
11018 if { (eval echo configure:11019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11019   rm -rf conftest*
11020   eval "ac_cv_lib_$ac_lib_var=yes"
11021 else
11022   echo "configure: failed program was:" >&5
11023   cat conftest.$ac_ext >&5
11024   rm -rf conftest*
11025   eval "ac_cv_lib_$ac_lib_var=no"
11026 fi
11027 rm -f conftest*
11028 xe_check_libs=""
11029
11030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11031   echo "$ac_t""yes" 1>&6
11032   with_ncurses=yes
11033 else
11034   echo "$ac_t""no" 1>&6
11035 with_ncurses=no
11036 fi
11037
11038
11039   fi
11040   if test "$with_ncurses" = "yes"; then
11041     { test "$extra_verbose" = "yes" && cat << \EOF
11042     Defining HAVE_NCURSES
11043 EOF
11044 cat >> confdefs.h <<\EOF
11045 #define HAVE_NCURSES 1
11046 EOF
11047 }
11048
11049     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11050 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11051 echo "configure:11052: checking for ncurses/curses.h" >&5
11052
11053 cat > conftest.$ac_ext <<EOF
11054 #line 11055 "configure"
11055 #include "confdefs.h"
11056 #include <ncurses/curses.h>
11057 EOF
11058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11059 { (eval echo configure:11060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11061 if test -z "$ac_err"; then
11062   rm -rf conftest*
11063   eval "ac_cv_header_$ac_safe=yes"
11064 else
11065   echo "$ac_err" >&5
11066   echo "configure: failed program was:" >&5
11067   cat conftest.$ac_ext >&5
11068   rm -rf conftest*
11069   eval "ac_cv_header_$ac_safe=no"
11070 fi
11071 rm -f conftest*
11072 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11073   echo "$ac_t""yes" 1>&6
11074   curses_h_path=ncurses/curses.h
11075 else
11076   echo "$ac_t""no" 1>&6
11077 fi
11078
11079     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11080 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11081 echo "configure:11082: checking for ncurses/term.h" >&5
11082
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 #include <ncurses/term.h>
11087 EOF
11088 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11089 { (eval echo configure:11090: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11090 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11091 if test -z "$ac_err"; then
11092   rm -rf conftest*
11093   eval "ac_cv_header_$ac_safe=yes"
11094 else
11095   echo "$ac_err" >&5
11096   echo "configure: failed program was:" >&5
11097   cat conftest.$ac_ext >&5
11098   rm -rf conftest*
11099   eval "ac_cv_header_$ac_safe=no"
11100 fi
11101 rm -f conftest*
11102 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11103   echo "$ac_t""yes" 1>&6
11104   term_h_path=ncurses/term.h
11105 else
11106   echo "$ac_t""no" 1>&6
11107 fi
11108
11109     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11110    echo "    xemacs will be linked with \"terminfo.o\""
11111  fi
11112     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11113
11114     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11115                         save_c_switch_site="$c_switch_site"
11116       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11117       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11118 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11119 echo "configure:11120: checking for ncurses/curses.h" >&5
11120
11121 cat > conftest.$ac_ext <<EOF
11122 #line 11123 "configure"
11123 #include "confdefs.h"
11124 #include <ncurses/curses.h>
11125 EOF
11126 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11127 { (eval echo configure:11128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11128 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11129 if test -z "$ac_err"; then
11130   rm -rf conftest*
11131   eval "ac_cv_header_$ac_safe=yes"
11132 else
11133   echo "$ac_err" >&5
11134   echo "configure: failed program was:" >&5
11135   cat conftest.$ac_ext >&5
11136   rm -rf conftest*
11137   eval "ac_cv_header_$ac_safe=no"
11138 fi
11139 rm -f conftest*
11140 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142   curses_h_path=ncurses/curses.h
11143 else
11144   echo "$ac_t""no" 1>&6
11145 fi
11146
11147       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11148         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11149         else c_switch_site="$save_c_switch_site"
11150       fi
11151     fi
11152   else         if test "$have_terminfo" = "yes"; then
11153       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11154    echo "    xemacs will be linked with \"terminfo.o\""
11155  fi
11156       if test -n "$libs_termcap"; then
11157         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11158       else
11159         for lib in curses termlib termcap; do
11160           
11161 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11162 echo "configure:11163: checking for tgetent in -l$lib" >&5
11163 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11164
11165 xe_check_libs=" -l$lib "
11166 cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169 /* Override any gcc2 internal prototype to avoid an error.  */
11170 /* We use char because int might match the return type of a gcc2
11171     builtin and then its argument prototype would still apply.  */
11172 char tgetent();
11173
11174 int main() {
11175 tgetent()
11176 ; return 0; }
11177 EOF
11178 if { (eval echo configure:11179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11179   rm -rf conftest*
11180   eval "ac_cv_lib_$ac_lib_var=yes"
11181 else
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_lib_$ac_lib_var=no"
11186 fi
11187 rm -f conftest*
11188 xe_check_libs=""
11189
11190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11191   echo "$ac_t""yes" 1>&6
11192   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11193 else
11194   echo "$ac_t""no" 1>&6
11195 fi
11196
11197
11198         done
11199       fi
11200     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11201    echo "    xemacs will be linked with \"tparam.o\""
11202  fi
11203                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11204       if test -n "$libs_termcap"; then
11205         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11206       else
11207         
11208 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11209 echo "configure:11210: checking for tgetent in -lcurses" >&5
11210 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11211
11212 xe_check_libs=" -lcurses "
11213 cat > conftest.$ac_ext <<EOF
11214 #line 11215 "configure"
11215 #include "confdefs.h"
11216 /* Override any gcc2 internal prototype to avoid an error.  */
11217 /* We use char because int might match the return type of a gcc2
11218     builtin and then its argument prototype would still apply.  */
11219 char tgetent();
11220
11221 int main() {
11222 tgetent()
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11226   rm -rf conftest*
11227   eval "ac_cv_lib_$ac_lib_var=yes"
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   eval "ac_cv_lib_$ac_lib_var=no"
11233 fi
11234 rm -f conftest*
11235 xe_check_libs=""
11236
11237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11238   echo "$ac_t""yes" 1>&6
11239   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11240 else
11241   echo "$ac_t""no" 1>&6
11242 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11243 echo "configure:11244: checking for tgetent in -ltermcap" >&5
11244 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11245
11246 xe_check_libs=" -ltermcap "
11247 cat > conftest.$ac_ext <<EOF
11248 #line 11249 "configure"
11249 #include "confdefs.h"
11250 /* Override any gcc2 internal prototype to avoid an error.  */
11251 /* We use char because int might match the return type of a gcc2
11252     builtin and then its argument prototype would still apply.  */
11253 char tgetent();
11254
11255 int main() {
11256 tgetent()
11257 ; return 0; }
11258 EOF
11259 if { (eval echo configure:11260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11260   rm -rf conftest*
11261   eval "ac_cv_lib_$ac_lib_var=yes"
11262 else
11263   echo "configure: failed program was:" >&5
11264   cat conftest.$ac_ext >&5
11265   rm -rf conftest*
11266   eval "ac_cv_lib_$ac_lib_var=no"
11267 fi
11268 rm -f conftest*
11269 xe_check_libs=""
11270
11271 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11272   echo "$ac_t""yes" 1>&6
11273   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
11274 else
11275   echo "$ac_t""no" 1>&6
11276 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
11277    echo "    xemacs will be linked with \"termcap.o\""
11278  fi
11279 fi
11280
11281
11282 fi
11283
11284
11285       fi
11286     fi
11287   fi
11288   { test "$extra_verbose" = "yes" && cat << EOF
11289     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
11290 EOF
11291 cat >> confdefs.h <<EOF
11292 #define CURSES_H_PATH "${curses_h_path-curses.h}"
11293 EOF
11294 }
11295
11296   { test "$extra_verbose" = "yes" && cat << EOF
11297     Defining TERM_H_PATH = "${term_h_path-term.h}"
11298 EOF
11299 cat >> confdefs.h <<EOF
11300 #define TERM_H_PATH "${term_h_path-term.h}"
11301 EOF
11302 }
11303
11304
11305     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
11306 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
11307 echo "configure:11308: checking for gpm.h" >&5
11308
11309 cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312 #include <gpm.h>
11313 EOF
11314 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11315 { (eval echo configure:11316: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11316 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11317 if test -z "$ac_err"; then
11318   rm -rf conftest*
11319   eval "ac_cv_header_$ac_safe=yes"
11320 else
11321   echo "$ac_err" >&5
11322   echo "configure: failed program was:" >&5
11323   cat conftest.$ac_ext >&5
11324   rm -rf conftest*
11325   eval "ac_cv_header_$ac_safe=no"
11326 fi
11327 rm -f conftest*
11328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11329   echo "$ac_t""yes" 1>&6
11330   :
11331 else
11332   echo "$ac_t""no" 1>&6
11333 with_gpm=no
11334 fi
11335  }
11336   test -z "$with_gpm" && { 
11337 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
11338 echo "configure:11339: checking for Gpm_Open in -lgpm" >&5
11339 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
11340
11341 xe_check_libs=" -lgpm "
11342 cat > conftest.$ac_ext <<EOF
11343 #line 11344 "configure"
11344 #include "confdefs.h"
11345 /* Override any gcc2 internal prototype to avoid an error.  */
11346 /* We use char because int might match the return type of a gcc2
11347     builtin and then its argument prototype would still apply.  */
11348 char Gpm_Open();
11349
11350 int main() {
11351 Gpm_Open()
11352 ; return 0; }
11353 EOF
11354 if { (eval echo configure:11355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11355   rm -rf conftest*
11356   eval "ac_cv_lib_$ac_lib_var=yes"
11357 else
11358   echo "configure: failed program was:" >&5
11359   cat conftest.$ac_ext >&5
11360   rm -rf conftest*
11361   eval "ac_cv_lib_$ac_lib_var=no"
11362 fi
11363 rm -f conftest*
11364 xe_check_libs=""
11365
11366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11367   echo "$ac_t""yes" 1>&6
11368   with_gpm=yes
11369 else
11370   echo "$ac_t""no" 1>&6
11371 with_gpm=no
11372 fi
11373
11374  }
11375   if test "$with_gpm" = "yes"; then
11376     { test "$extra_verbose" = "yes" && cat << \EOF
11377     Defining HAVE_GPM
11378 EOF
11379 cat >> confdefs.h <<\EOF
11380 #define HAVE_GPM 1
11381 EOF
11382 }
11383
11384     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
11385    echo "    xemacs will be linked with \"gpmevent.o\""
11386  fi
11387     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
11388   fi
11389
11390 else   for feature in ncurses gpm; do
11391     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
11392       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
11393     fi
11394     eval "with_${feature}=no"
11395   done
11396 fi 
11397 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
11398    echo "    xemacs will be linked with \"event-unixoid.o\""
11399  fi
11400
11401
11402 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11403   != "no no no" && echo "checking for database support" 1>&6
11404 echo "configure:11405: checking for database support" >&5
11405
11406 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
11407   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
11408 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
11409 echo "configure:11410: checking for ndbm.h" >&5
11410
11411 cat > conftest.$ac_ext <<EOF
11412 #line 11413 "configure"
11413 #include "confdefs.h"
11414 #include <ndbm.h>
11415 EOF
11416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11417 { (eval echo configure:11418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11418 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11419 if test -z "$ac_err"; then
11420   rm -rf conftest*
11421   eval "ac_cv_header_$ac_safe=yes"
11422 else
11423   echo "$ac_err" >&5
11424   echo "configure: failed program was:" >&5
11425   cat conftest.$ac_ext >&5
11426   rm -rf conftest*
11427   eval "ac_cv_header_$ac_safe=no"
11428 fi
11429 rm -f conftest*
11430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11431   echo "$ac_t""yes" 1>&6
11432   :
11433 else
11434   echo "$ac_t""no" 1>&6
11435
11436     test "$with_database_gdbm" = "yes" -o \
11437          "$with_database_dbm"  = "yes" && \
11438       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11439     with_database_gdbm=no with_database_dbm=no
11440 fi
11441
11442 fi
11443
11444 if test "$with_database_gdbm" != "no"; then
11445   
11446 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
11447 echo "configure:11448: checking for dbm_open in -lgdbm" >&5
11448 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
11449
11450 xe_check_libs=" -lgdbm "
11451 cat > conftest.$ac_ext <<EOF
11452 #line 11453 "configure"
11453 #include "confdefs.h"
11454 /* Override any gcc2 internal prototype to avoid an error.  */
11455 /* We use char because int might match the return type of a gcc2
11456     builtin and then its argument prototype would still apply.  */
11457 char dbm_open();
11458
11459 int main() {
11460 dbm_open()
11461 ; return 0; }
11462 EOF
11463 if { (eval echo configure:11464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11464   rm -rf conftest*
11465   eval "ac_cv_lib_$ac_lib_var=yes"
11466 else
11467   echo "configure: failed program was:" >&5
11468   cat conftest.$ac_ext >&5
11469   rm -rf conftest*
11470   eval "ac_cv_lib_$ac_lib_var=no"
11471 fi
11472 rm -f conftest*
11473 xe_check_libs=""
11474
11475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11476   echo "$ac_t""yes" 1>&6
11477   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
11478 else
11479   echo "$ac_t""no" 1>&6
11480 if test "$with_database_gdbm" = "yes"; then
11481      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11482    fi
11483    with_database_gdbm=no
11484 fi
11485
11486
11487 fi
11488
11489 if test "$with_database_dbm" != "no"; then
11490   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11491 echo "configure:11492: checking for dbm_open" >&5
11492
11493 cat > conftest.$ac_ext <<EOF
11494 #line 11495 "configure"
11495 #include "confdefs.h"
11496 /* System header to define __stub macros and hopefully few prototypes,
11497     which can conflict with char dbm_open(); below.  */
11498 #include <assert.h>
11499 /* Override any gcc2 internal prototype to avoid an error.  */
11500 /* We use char because int might match the return type of a gcc2
11501     builtin and then its argument prototype would still apply.  */
11502 char dbm_open();
11503
11504 int main() {
11505
11506 /* The GNU C library defines this for functions which it implements
11507     to always fail with ENOSYS.  Some functions are actually named
11508     something starting with __ and the normal name is an alias.  */
11509 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11510 choke me
11511 #else
11512 dbm_open();
11513 #endif
11514
11515 ; return 0; }
11516 EOF
11517 if { (eval echo configure:11518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11518   rm -rf conftest*
11519   eval "ac_cv_func_dbm_open=yes"
11520 else
11521   echo "configure: failed program was:" >&5
11522   cat conftest.$ac_ext >&5
11523   rm -rf conftest*
11524   eval "ac_cv_func_dbm_open=no"
11525 fi
11526 rm -f conftest*
11527
11528 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530   with_database_dbm=yes libdbm=
11531 else
11532   echo "$ac_t""no" 1>&6
11533
11534     
11535 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11536 echo "configure:11537: checking for dbm_open in -ldbm" >&5
11537 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11538
11539 xe_check_libs=" -ldbm "
11540 cat > conftest.$ac_ext <<EOF
11541 #line 11542 "configure"
11542 #include "confdefs.h"
11543 /* Override any gcc2 internal prototype to avoid an error.  */
11544 /* We use char because int might match the return type of a gcc2
11545     builtin and then its argument prototype would still apply.  */
11546 char dbm_open();
11547
11548 int main() {
11549 dbm_open()
11550 ; return 0; }
11551 EOF
11552 if { (eval echo configure:11553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11553   rm -rf conftest*
11554   eval "ac_cv_lib_$ac_lib_var=yes"
11555 else
11556   echo "configure: failed program was:" >&5
11557   cat conftest.$ac_ext >&5
11558   rm -rf conftest*
11559   eval "ac_cv_lib_$ac_lib_var=no"
11560 fi
11561 rm -f conftest*
11562 xe_check_libs=""
11563
11564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11565   echo "$ac_t""yes" 1>&6
11566   with_database_dbm=yes libdbm=-ldbm
11567 else
11568   echo "$ac_t""no" 1>&6
11569 test "$with_database_dbm" = "yes" && \
11570         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11571       with_database_dbm=no
11572 fi
11573
11574
11575 fi
11576
11577 fi
11578
11579 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11580 test "$with_database_gdbm" = "yes" -o \
11581      "$with_database_dbm"  = "yes" && \
11582   { test "$extra_verbose" = "yes" && cat << \EOF
11583     Defining HAVE_DBM
11584 EOF
11585 cat >> confdefs.h <<\EOF
11586 #define HAVE_DBM 1
11587 EOF
11588 }
11589
11590
11591 if test "$with_database_berkdb" != "no"; then
11592   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11593 echo "configure:11594: checking for Berkeley db.h" >&5
11594   for path in "db/db.h" "db.h"; do
11595     cat > conftest.$ac_ext <<EOF
11596 #line 11597 "configure"
11597 #include "confdefs.h"
11598 #ifdef HAVE_INTTYPES_H
11599 #define __BIT_TYPES_DEFINED__
11600 #include <inttypes.h>
11601 typedef uint8_t  u_int8_t;
11602 typedef uint16_t u_int16_t;
11603 typedef uint32_t u_int32_t;
11604 #ifdef WE_DONT_NEED_QUADS
11605 typedef uint64_t u_int64_t;
11606 #endif
11607 #endif
11608 #include <$path>
11609
11610 int main() {
11611
11612 ; return 0; }
11613 EOF
11614 if { (eval echo configure:11615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11615   rm -rf conftest*
11616   db_h_path="$path"; break
11617 else
11618   echo "configure: failed program was:" >&5
11619   cat conftest.$ac_ext >&5
11620 fi
11621 rm -f conftest*
11622   done
11623   if test -z "$db_h_path"
11624   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11625   else echo "$ac_t""$db_h_path" 1>&6
11626   fi
11627
11628   if test "$with_database_berkdb" != "no"; then
11629     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11630 echo "configure:11631: checking for Berkeley DB version" >&5
11631     cat > conftest.$ac_ext <<EOF
11632 #line 11633 "configure"
11633 #include "confdefs.h"
11634 #include <$db_h_path>
11635 #if DB_VERSION_MAJOR > 1
11636 yes
11637 #endif
11638
11639 EOF
11640 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11641   egrep "yes" >/dev/null 2>&1; then
11642   rm -rf conftest*
11643   echo "$ac_t""2" 1>&6; dbfunc=db_open
11644 else
11645   rm -rf conftest*
11646   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11647 fi
11648 rm -f conftest*
11649
11650     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11651 echo "configure:11652: checking for $dbfunc" >&5
11652
11653 cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 /* System header to define __stub macros and hopefully few prototypes,
11657     which can conflict with char $dbfunc(); below.  */
11658 #include <assert.h>
11659 /* Override any gcc2 internal prototype to avoid an error.  */
11660 /* We use char because int might match the return type of a gcc2
11661     builtin and then its argument prototype would still apply.  */
11662 char $dbfunc();
11663
11664 int main() {
11665
11666 /* The GNU C library defines this for functions which it implements
11667     to always fail with ENOSYS.  Some functions are actually named
11668     something starting with __ and the normal name is an alias.  */
11669 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11670 choke me
11671 #else
11672 $dbfunc();
11673 #endif
11674
11675 ; return 0; }
11676 EOF
11677 if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11678   rm -rf conftest*
11679   eval "ac_cv_func_$dbfunc=yes"
11680 else
11681   echo "configure: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   rm -rf conftest*
11684   eval "ac_cv_func_$dbfunc=no"
11685 fi
11686 rm -f conftest*
11687
11688 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11689   echo "$ac_t""yes" 1>&6
11690   with_database_berkdb=yes need_libdb=no
11691 else
11692   echo "$ac_t""no" 1>&6
11693
11694     
11695 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11696 echo "configure:11697: checking for $dbfunc in -ldb" >&5
11697 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11698
11699 xe_check_libs=" -ldb "
11700 cat > conftest.$ac_ext <<EOF
11701 #line 11702 "configure"
11702 #include "confdefs.h"
11703 /* Override any gcc2 internal prototype to avoid an error.  */
11704 /* We use char because int might match the return type of a gcc2
11705     builtin and then its argument prototype would still apply.  */
11706 char $dbfunc();
11707
11708 int main() {
11709 $dbfunc()
11710 ; return 0; }
11711 EOF
11712 if { (eval echo configure:11713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11713   rm -rf conftest*
11714   eval "ac_cv_lib_$ac_lib_var=yes"
11715 else
11716   echo "configure: failed program was:" >&5
11717   cat conftest.$ac_ext >&5
11718   rm -rf conftest*
11719   eval "ac_cv_lib_$ac_lib_var=no"
11720 fi
11721 rm -f conftest*
11722 xe_check_libs=""
11723
11724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11725   echo "$ac_t""yes" 1>&6
11726   with_database_berkdb=yes need_libdb=yes
11727 else
11728   echo "$ac_t""no" 1>&6
11729 fi
11730
11731
11732 fi
11733
11734   fi
11735
11736   if test "$with_database_berkdb" = "yes"; then
11737     { test "$extra_verbose" = "yes" && cat << EOF
11738     Defining DB_H_PATH = "$db_h_path"
11739 EOF
11740 cat >> confdefs.h <<EOF
11741 #define DB_H_PATH "$db_h_path"
11742 EOF
11743 }
11744
11745     { test "$extra_verbose" = "yes" && cat << \EOF
11746     Defining HAVE_BERKELEY_DB
11747 EOF
11748 cat >> confdefs.h <<\EOF
11749 #define HAVE_BERKELEY_DB 1
11750 EOF
11751 }
11752
11753     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11754   else with_database_berkdb=no
11755   fi
11756 fi
11757
11758 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
11759      != "no no no"; then
11760   { test "$extra_verbose" = "yes" && cat << \EOF
11761     Defining HAVE_DATABASE
11762 EOF
11763 cat >> confdefs.h <<\EOF
11764 #define HAVE_DATABASE 1
11765 EOF
11766 }
11767
11768   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11769    echo "    xemacs will be linked with \"database.o\""
11770  fi
11771 fi
11772
11773 if test "$with_socks" = "yes"; then
11774   
11775 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11776 echo "configure:11777: checking for SOCKSinit in -lsocks" >&5
11777 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11778
11779 xe_check_libs=" -lsocks "
11780 cat > conftest.$ac_ext <<EOF
11781 #line 11782 "configure"
11782 #include "confdefs.h"
11783 /* Override any gcc2 internal prototype to avoid an error.  */
11784 /* We use char because int might match the return type of a gcc2
11785     builtin and then its argument prototype would still apply.  */
11786 char SOCKSinit();
11787
11788 int main() {
11789 SOCKSinit()
11790 ; return 0; }
11791 EOF
11792 if { (eval echo configure:11793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11793   rm -rf conftest*
11794   eval "ac_cv_lib_$ac_lib_var=yes"
11795 else
11796   echo "configure: failed program was:" >&5
11797   cat conftest.$ac_ext >&5
11798   rm -rf conftest*
11799   eval "ac_cv_lib_$ac_lib_var=no"
11800 fi
11801 rm -f conftest*
11802 xe_check_libs=""
11803
11804 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11805   echo "$ac_t""yes" 1>&6
11806     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11807     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11808   { test "$extra_verbose" = "yes" && cat << EOF
11809     Defining $ac_tr_lib
11810 EOF
11811 cat >> confdefs.h <<EOF
11812 #define $ac_tr_lib 1
11813 EOF
11814 }
11815
11816   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11817
11818 else
11819   echo "$ac_t""no" 1>&6
11820 fi
11821
11822
11823   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11824     Defining HAVE_SOCKS
11825 EOF
11826 cat >> confdefs.h <<\EOF
11827 #define HAVE_SOCKS 1
11828 EOF
11829 }
11830
11831 fi
11832
11833 if test "$usage_tracking" = "yes"; then
11834   { test "$extra_verbose" = "yes" && cat << \EOF
11835     Defining USAGE_TRACKING
11836 EOF
11837 cat >> confdefs.h <<\EOF
11838 #define USAGE_TRACKING 1
11839 EOF
11840 }
11841
11842   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11843 fi
11844
11845 if test "$with_modules" != "no"; then
11846   echo "checking for module support" 1>&6
11847 echo "configure:11848: checking for module support" >&5
11848
11849     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
11850 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
11851 echo "configure:11852: checking for dlfcn.h" >&5
11852
11853 cat > conftest.$ac_ext <<EOF
11854 #line 11855 "configure"
11855 #include "confdefs.h"
11856 #include <dlfcn.h>
11857 EOF
11858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11859 { (eval echo configure:11860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11861 if test -z "$ac_err"; then
11862   rm -rf conftest*
11863   eval "ac_cv_header_$ac_safe=yes"
11864 else
11865   echo "$ac_err" >&5
11866   echo "configure: failed program was:" >&5
11867   cat conftest.$ac_ext >&5
11868   rm -rf conftest*
11869   eval "ac_cv_header_$ac_safe=no"
11870 fi
11871 rm -f conftest*
11872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11873   echo "$ac_t""yes" 1>&6
11874   
11875     
11876 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11877 echo "configure:11878: checking for dlopen in -ldl" >&5
11878 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11879
11880 xe_check_libs=" -ldl "
11881 cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884 /* Override any gcc2 internal prototype to avoid an error.  */
11885 /* We use char because int might match the return type of a gcc2
11886     builtin and then its argument prototype would still apply.  */
11887 char dlopen();
11888
11889 int main() {
11890 dlopen()
11891 ; return 0; }
11892 EOF
11893 if { (eval echo configure:11894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11894   rm -rf conftest*
11895   eval "ac_cv_lib_$ac_lib_var=yes"
11896 else
11897   echo "configure: failed program was:" >&5
11898   cat conftest.$ac_ext >&5
11899   rm -rf conftest*
11900   eval "ac_cv_lib_$ac_lib_var=no"
11901 fi
11902 rm -f conftest*
11903 xe_check_libs=""
11904
11905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11906   echo "$ac_t""yes" 1>&6
11907   have_dl=yes libdl=dl
11908 else
11909   echo "$ac_t""no" 1>&6
11910
11911 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11912 echo "configure:11913: checking for dlopen in -lc" >&5
11913 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11914
11915 xe_check_libs=" -lc "
11916 cat > conftest.$ac_ext <<EOF
11917 #line 11918 "configure"
11918 #include "confdefs.h"
11919 /* Override any gcc2 internal prototype to avoid an error.  */
11920 /* We use char because int might match the return type of a gcc2
11921     builtin and then its argument prototype would still apply.  */
11922 char dlopen();
11923
11924 int main() {
11925 dlopen()
11926 ; return 0; }
11927 EOF
11928 if { (eval echo configure:11929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11929   rm -rf conftest*
11930   eval "ac_cv_lib_$ac_lib_var=yes"
11931 else
11932   echo "configure: failed program was:" >&5
11933   cat conftest.$ac_ext >&5
11934   rm -rf conftest*
11935   eval "ac_cv_lib_$ac_lib_var=no"
11936 fi
11937 rm -f conftest*
11938 xe_check_libs=""
11939
11940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11941   echo "$ac_t""yes" 1>&6
11942   have_dl=yes 
11943 else
11944   echo "$ac_t""no" 1>&6
11945 fi
11946
11947
11948 fi
11949
11950
11951 else
11952   echo "$ac_t""no" 1>&6
11953 fi
11954
11955   if test -n "$have_dl"; then
11956     { test "$extra_verbose" = "yes" && cat << \EOF
11957     Defining HAVE_DLOPEN
11958 EOF
11959 cat >> confdefs.h <<\EOF
11960 #define HAVE_DLOPEN 1
11961 EOF
11962 }
11963
11964   else
11965     
11966 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11967 echo "configure:11968: checking for shl_load in -ldld" >&5
11968 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11969
11970 xe_check_libs=" -ldld "
11971 cat > conftest.$ac_ext <<EOF
11972 #line 11973 "configure"
11973 #include "confdefs.h"
11974 /* Override any gcc2 internal prototype to avoid an error.  */
11975 /* We use char because int might match the return type of a gcc2
11976     builtin and then its argument prototype would still apply.  */
11977 char shl_load();
11978
11979 int main() {
11980 shl_load()
11981 ; return 0; }
11982 EOF
11983 if { (eval echo configure:11984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11984   rm -rf conftest*
11985   eval "ac_cv_lib_$ac_lib_var=yes"
11986 else
11987   echo "configure: failed program was:" >&5
11988   cat conftest.$ac_ext >&5
11989   rm -rf conftest*
11990   eval "ac_cv_lib_$ac_lib_var=no"
11991 fi
11992 rm -f conftest*
11993 xe_check_libs=""
11994
11995 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11996   echo "$ac_t""yes" 1>&6
11997   libdl=dld have_dl=yes;
11998       { test "$extra_verbose" = "yes" && cat << \EOF
11999     Defining HAVE_SHL_LOAD
12000 EOF
12001 cat >> confdefs.h <<\EOF
12002 #define HAVE_SHL_LOAD 1
12003 EOF
12004 }
12005
12006 else
12007   echo "$ac_t""no" 1>&6
12008
12009 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12010 echo "configure:12011: checking for dld_init in -ldld" >&5
12011 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12012
12013 xe_check_libs=" -ldld "
12014 cat > conftest.$ac_ext <<EOF
12015 #line 12016 "configure"
12016 #include "confdefs.h"
12017 /* Override any gcc2 internal prototype to avoid an error.  */
12018 /* We use char because int might match the return type of a gcc2
12019     builtin and then its argument prototype would still apply.  */
12020 char dld_init();
12021
12022 int main() {
12023 dld_init()
12024 ; return 0; }
12025 EOF
12026 if { (eval echo configure:12027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12027   rm -rf conftest*
12028   eval "ac_cv_lib_$ac_lib_var=yes"
12029 else
12030   echo "configure: failed program was:" >&5
12031   cat conftest.$ac_ext >&5
12032   rm -rf conftest*
12033   eval "ac_cv_lib_$ac_lib_var=no"
12034 fi
12035 rm -f conftest*
12036 xe_check_libs=""
12037
12038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12039   echo "$ac_t""yes" 1>&6
12040   libdl=dld have_dl=yes;
12041       { test "$extra_verbose" = "yes" && cat << \EOF
12042     Defining HAVE_DLD_INIT
12043 EOF
12044 cat >> confdefs.h <<\EOF
12045 #define HAVE_DLD_INIT 1
12046 EOF
12047 }
12048
12049 else
12050   echo "$ac_t""no" 1>&6
12051 fi
12052
12053
12054 fi
12055
12056
12057   fi
12058
12059   if test -n "$have_dl"; then
12060         
12061 dll_ld=
12062 dll_ldflags=
12063 dll_cflags=
12064 dll_post=
12065 dll_ldo="-o"
12066 ld_dynamic_link_flags=
12067 xehost=$canonical
12068 xealias=$internal_configuration
12069
12070 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12071 echo "configure:12072: checking how to build dynamic libraries for ${xehost}" >&5
12072 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12073 case "$xehost" in
12074 *-*-linux-gnu*) ;;
12075 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12076 esac
12077
12078 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12079 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12080 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12081
12082 case "$xehost_os" in
12083 aix3*)
12084   # AIX sometimes has problems with the GCC collect2 program.  For some
12085   # reason, if we set the COLLECT_NAMES environment variable, the problems
12086   # vanish in a puff of smoke.
12087   if test "${COLLECT_NAMES+set}" != set; then
12088     COLLECT_NAMES=
12089     export COLLECT_NAMES
12090   fi
12091   ;;
12092 esac
12093
12094 # Now see if the compiler is really GCC.
12095 if test "$GCC" = "yes"; then
12096   XEGCC=yes
12097 else
12098   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12099 echo "configure:12100: checking checking whether we are using GNU C" >&5
12100   cat > conftest.$ac_ext <<EOF
12101 #line 12102 "configure"
12102 #include "confdefs.h"
12103
12104 #ifdef __GNUC__
12105   yes;
12106 #endif
12107
12108 EOF
12109 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12110   egrep "yes" >/dev/null 2>&1; then
12111   rm -rf conftest*
12112   XEGCC=yes
12113 else
12114   rm -rf conftest*
12115   XEGCC=no
12116 fi
12117 rm -f conftest*
12118
12119   echo "$ac_t""${XEGCC}" 1>&6
12120 fi
12121
12122 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12123 echo "configure:12124: checking how to produce PIC code" >&5
12124 wl=
12125
12126 can_build_shared=yes
12127 if test "$XEGCC" = yes; then
12128   wl='-Wl,'
12129
12130   case "$xehost_os" in
12131   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12132     # PIC is the default for these OSes.
12133     ;;
12134
12135   os2*)
12136     # We can build DLLs from non-PIC.
12137     ;;
12138   amigaos*)
12139     # FIXME: we need at least 68020 code to build shared libraries, but
12140     # adding the `-m68020' flag to GCC prevents building anything better,
12141     # like `-m68040'.
12142     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12143     ;;
12144   *)
12145     dll_cflags='-fPIC'
12146     ;;
12147   esac
12148 else
12149   # PORTME Check for PIC flags for the system compiler.
12150   case "$xehost_os" in
12151   hpux9* | hpux1[0-9]*)
12152     # Is there a better link_static_flag that works with the bundled CC?
12153     wl='-Wl,'
12154     dll_cflags='+Z'
12155     ;;
12156
12157   irix5* | irix6*)
12158     wl='-Wl,'
12159     # PIC (with -KPIC) is the default.
12160     ;;
12161
12162   os2*)
12163     # We can build DLLs from non-PIC.
12164     ;;
12165
12166   osf3* | osf4*)
12167     # All OSF/1 code is PIC.
12168     wl='-Wl,'
12169     ;;
12170
12171   sco3.2v5*)
12172     dll_cflags='-belf -Kpic'
12173     wl='-Wl,'
12174     ;;
12175
12176   unixware*)
12177     dll_cflags="-KPIC"
12178     wl="-Wl,"
12179     ;;
12180
12181   sysv4*)
12182     dll_cflags="-KPIC"
12183     wl="-Wl,"
12184     ;;
12185
12186   sysv5*)
12187     dll_cflags="-KPIC"
12188     wl="-Wl,"
12189     ;;
12190
12191   solaris2*)
12192     dll_cflags='-KPIC'
12193     wl='-Wl,'
12194     ;;
12195
12196   sunos4*)
12197     dll_cflags='-PIC'
12198     wl='-Qoption ld '
12199     ;;
12200
12201   uts4*)
12202     dll_cflags='-pic'
12203     ;;
12204
12205   *)
12206     can_build_shared=no
12207     ;;
12208   esac
12209 fi
12210
12211 if test -n "$dll_cflags"; then
12212   echo "$ac_t""${dll_cflags}" 1>&6
12213   
12214   # Check to make sure the dll_cflags actually works.
12215   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12216 echo "configure:12217: checking if PIC flag ${dll_cflags} really works" >&5
12217   save_CFLAGS="$CFLAGS"
12218   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12219   cat > conftest.$ac_ext <<EOF
12220 #line 12221 "configure"
12221 #include "confdefs.h"
12222
12223 int main() {
12224 int x=0;
12225 ; return 0; }
12226 EOF
12227 if { (eval echo configure:12228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12228   rm -rf conftest*
12229   
12230     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12231     # reports no error.  So, we need to grep stderr for (Bundled).
12232     if grep '(Bundled)' config.log >/dev/null; then
12233       echo "$ac_t""no" 1>&6
12234       can_build_shared=no
12235       dll_cflags=
12236     else
12237       echo "$ac_t""yes" 1>&6
12238     fi
12239 else
12240   echo "configure: failed program was:" >&5
12241   cat conftest.$ac_ext >&5
12242   rm -rf conftest*
12243   echo "$ac_t""no" 1>&6
12244     can_build_shared=no
12245     dll_cflags=
12246 fi
12247 rm -f conftest*
12248   CFLAGS="$save_CFLAGS"
12249 else
12250   echo "$ac_t""none" 1>&6
12251 fi
12252
12253 if test "$can_build_shared" = "yes"; then
12254 cc_produces_so=no
12255 xldf=
12256 xcldf=
12257 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
12258 echo "configure:12259: checking if C compiler can produce shared libraries" >&5
12259 if test "$XEGCC" = yes; then
12260   xcldf="-shared"
12261   xldf="-shared"
12262 else # Not using GCC
12263   case "$xehost_os" in
12264     aix3* | aix4*)
12265       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
12266       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
12267       ;;
12268
12269     freebsd2* | netbsd* | openbsd*)
12270       xldf="-Bshareable"
12271       xcldf="${wl}-Bshareable"
12272       ;;
12273
12274     freebsd3*)
12275       xcldf="-shared"
12276       ;;
12277
12278     hpux*)
12279       xldf="-b +s"
12280       xcldf="${wl}-b ${wl}+s"
12281       ;;
12282
12283     irix5* | irix6* | osf3* | osf4*)
12284       xcldf="${wl}-shared"
12285       xldf="-shared"
12286       ;;
12287
12288     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
12289       xcldf="-G"
12290       xldf="-G"
12291       ;;
12292
12293     sunos4*)
12294       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
12295       xldf="-assert pure-text -Bstatic"
12296       ;;
12297   esac
12298 fi # End if if we are using gcc
12299
12300 if test -n "$xcldf"; then
12301   save_LDFLAGS=$LDFLAGS
12302   save_LIBS=$LIBS
12303   save_xe_libs=$xe_libs
12304   LDFLAGS="$xcldf $LDFLAGS"
12305   LIBS=
12306   xe_libs=
12307   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12308   cat > conftest.$ac_ext <<EOF
12309 #line 12310 "configure"
12310 #include "confdefs.h"
12311
12312 int main() {
12313 int x=0;
12314 ; return 0; }
12315 EOF
12316 if { (eval echo configure:12317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12317   rm -rf conftest*
12318   cc_produces_so=yes
12319 else
12320   echo "configure: failed program was:" >&5
12321   cat conftest.$ac_ext >&5
12322   rm -rf conftest*
12323   cc_produces_so=no
12324 fi
12325 rm -f conftest*
12326   LDFLAGS=$save_LDFLAGS
12327   LIBS=$save_LIBS
12328   xe_libs=$save_xe_libs
12329   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
12330 else
12331   cc_produces_so=no
12332 fi
12333 echo "$ac_t""${cc_produces_so}" 1>&6
12334
12335 LTLD=$LD
12336 if test -z "$LTLD"; then
12337   ac_prog=ld
12338   if test "$XEGCC" = yes; then
12339     # Check if gcc -print-prog-name=ld gives a path.
12340     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
12341 echo "configure:12342: checking for ld used by GCC" >&5
12342     ac_prog=`($CC -print-prog-name=ld) 2>&5`
12343     case "$ac_prog" in
12344     # Accept absolute paths.
12345     /*)
12346       if test -z "$LTLD"; then
12347         case "$ac_prog" in
12348           *gcc-lib*) LTLD="$CC"
12349                      ;;
12350           *)         LTLD="$ac_prog"
12351                      ;;
12352         esac
12353       fi
12354       ;;
12355     "")
12356       # If it fails, then pretend we aren't using GCC.
12357       ac_prog=ld
12358       ;;
12359     *)
12360       # If it is relative, then search for the first ld in PATH.
12361       with_gnu_ld=unknown
12362       ;;
12363     esac
12364   else
12365     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
12366 echo "configure:12367: checking for GNU ld" >&5
12367   fi
12368
12369   if test -z "$LTLD"; then
12370     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12371     for ac_dir in $PATH; do
12372       test -z "$ac_dir" && ac_dir=.
12373       if test -f "$ac_dir/$ac_prog"; then
12374         LTLD="$ac_dir/$ac_prog"
12375         # Check to see if the program is GNU ld.  I'd rather use --version,
12376         # but apparently some GNU ld's only accept -v.
12377         # Break only if it was the GNU/non-GNU ld that we prefer.
12378         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
12379           xe_gnu_ld=yes
12380         else
12381           xe_gnu_ld=no
12382         fi
12383       fi
12384     done
12385     IFS="$ac_save_ifs"
12386   fi
12387
12388   if test -n "$LTLD"; then
12389     echo "$ac_t""${LTLD}" 1>&6
12390   else
12391     echo "$ac_t""no" 1>&6
12392   fi
12393
12394   if test -z "$LTLD" -a "$cc_produces_so" = no; then
12395     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
12396     exit 1
12397   fi
12398 fi
12399
12400 ld_dynamic_link_flags=
12401
12402 # Check to see if it really is or isn't GNU ld.
12403 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
12404 echo "configure:12405: checking if the linker is GNU ld" >&5
12405 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
12406 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
12407   xe_gnu_ld=yes
12408 else
12409   xe_gnu_ld=no
12410 fi
12411 echo "$ac_t""${xe_gnu_ld}" 1>&6
12412
12413 case "$xehost_os" in
12414   amigaos* | sunos4*)
12415     # On these operating systems, we should treat GNU ld like the system ld.
12416     gnu_ld_acts_native=yes
12417     ;;
12418   *)
12419     gnu_ld_acts_native=no
12420     ;;
12421 esac
12422
12423 if test "$cc_produces_so" = "yes"; then
12424   dll_ld=$CC
12425   dll_ldflags=$xcldf
12426   can_build_shared=yes
12427 else
12428   # OK - only NOW do we futz about with ld.
12429   # See if the linker supports building shared libraries.
12430   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
12431 echo "configure:12432: checking whether the linker supports shared libraries" >&5
12432   dll_ld=$CC
12433   dll_ldflags=$LDFLAGS
12434   ld_shlibs=yes
12435   can_build_shared=yes
12436   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
12437     # See if GNU ld supports shared libraries.
12438     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
12439       dll_ld=$CC
12440       dll_ldflags="-shared"
12441       ld_shlibs=yes
12442     else
12443       ld_shlibs=no
12444     fi
12445   else
12446     # PORTME fill in a description of your system's linker (not GNU ld)
12447     case "$xehost_os" in
12448     aix3*)
12449       dll_ld=$LTLD
12450       dll_ldflags=$xldf
12451       ;;
12452
12453     aix4*)
12454       dll_ldflags=$xcldf
12455       ;;
12456
12457     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
12458     # support.  Future versions do this automatically, but an explicit c++rt0.o
12459     # doesn't break anything, and helps significantly (at the cost of a little
12460     # extra space).
12461     freebsd2.2*)
12462       dll_ld=$LTLD
12463       dll_ldflags=$xldf
12464       dll_post="/usr/lib/c++rt0.o"
12465       ;;
12466
12467     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
12468     freebsd2*)
12469       dll_ld=$LTLD
12470       dll_ldflags="-Bshareable"
12471       ;;
12472
12473     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
12474     freebsd3*)
12475       dll_ldflags="-shared"
12476       ;;
12477
12478     hpux*)
12479       dll_ld=$LTLD
12480       dll_ldflags=$xldf
12481       ;;
12482
12483     irix5* | irix6*)
12484       dll_ld=$LTLD
12485       dll_ldflags=$xldf
12486       ;;
12487
12488     netbsd*)
12489       # Tested with NetBSD 1.2 ld
12490       dll_ld=$LTLD
12491       dll_ldflags=$xldf
12492       ;;
12493
12494     openbsd*)
12495       dll_ld=$LTLD
12496       dll_ldflags=$xldf
12497       ;;
12498
12499     osf3* | osf4*)
12500       dll_ld=$LTLD
12501       dll_ldflags=$xldf
12502       ;;
12503
12504     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
12505     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
12506       dll_ld=$LTLD
12507       case "$dll_ld" in
12508         *gcc*) dll_ldflags="-shared"
12509                dll_ld=$CC
12510                ;;
12511         *)     dll_ldflags="-G"
12512                ;;
12513       esac
12514       ;;
12515
12516     sunos4*)
12517       if test "$XEGCC" = yes; then
12518         dll_ld=$CC
12519       else
12520         dll_ld=$LTLD
12521       fi
12522       dll_ldflags=$xldf
12523       ;;
12524
12525     uts4*)
12526       dll_ld=$LTLD
12527       dll_ldflags="-G"
12528       ;;
12529
12530     bsdi*)
12531       dll_ldflags="-r"
12532       dll_ld="shlicc2"
12533       ;;
12534
12535     *)
12536       ld_shlibs=no
12537       can_build_shared=no
12538       ;;
12539     esac
12540   fi
12541   echo "$ac_t""${ld_shlibs}" 1>&6
12542   if test "$ld_shlibs" = "no"; then
12543     can_build_shared=no
12544   fi
12545 fi # End of if cc_produces_so = no
12546
12547
12548 if test "$xe_gnu_ld" = yes; then
12549   if test "$ld_shlibs" = yes; then
12550     ld_dynamic_link_flags="${wl}-export-dynamic"
12551   fi
12552 fi
12553
12554 if test -z "$ld_dynamic_link_flags"; then
12555   case "$xehost_os" in
12556   aix3*)
12557     ld_dynamic_link_flags=
12558     ;;
12559
12560   aix4*)
12561     ld_dynamic_link_flags=
12562     ;;
12563
12564   freebsd2.2*)
12565     ld_dynamic_link_flags=
12566     ;;
12567
12568   freebsd2*)
12569     ld_dynamic_link_flags=
12570     ;;
12571
12572   freebsd3*)
12573     ld_dynamic_link_flags=
12574     ;;
12575
12576   hpux*)
12577     ld_dynamic_link_flags="${wl}-E"
12578     ;;
12579
12580   irix5* | irix6*)
12581     ld_dynamic_link_flags=
12582     ;;
12583
12584   netbsd*)
12585     ld_dynamic_link_flags=
12586     ;;
12587
12588   openbsd*)
12589     ld_dynamic_link_flags=
12590     ;;
12591
12592   osf3* | osf4*)
12593     ld_dynamic_link_flags=
12594     ;;
12595
12596   solaris2* | solaris7*)
12597     ld_dynamic_link_flags=
12598     ;;
12599
12600   sco3.2v5* | unixware* | sysv5* | sysv4*)
12601     ld_dynamic_link_flags="${wl}-Bexport"
12602     ;;
12603
12604   sunos4*)
12605     ld_dynamic_link_flags=
12606     ;;
12607
12608   uts4*)
12609     ld_dynamic_link_flags=
12610     ;;
12611
12612   bsdi*)
12613     ld_dynamic_link_flags=
12614     ;;
12615
12616   esac
12617 fi # End of if -z ld_dynamic_link_flags
12618 fi # End of if test "$can_build_shared" = "yes"
12619
12620
12621
12622
12623
12624
12625
12626
12627   fi
12628
12629   if test "$can_build_shared" = "yes"; then
12630     { test "$extra_verbose" = "yes" && cat << \EOF
12631     Defining HAVE_SHLIB
12632 EOF
12633 cat >> confdefs.h <<\EOF
12634 #define HAVE_SHLIB 1
12635 EOF
12636 }
12637
12638     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
12639    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
12640  fi
12641     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
12642     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
12643     for ac_func in dlerror _dlerror
12644 do
12645 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
12646 echo "configure:12647: checking for $ac_func" >&5
12647
12648 cat > conftest.$ac_ext <<EOF
12649 #line 12650 "configure"
12650 #include "confdefs.h"
12651 /* System header to define __stub macros and hopefully few prototypes,
12652     which can conflict with char $ac_func(); below.  */
12653 #include <assert.h>
12654 /* Override any gcc2 internal prototype to avoid an error.  */
12655 /* We use char because int might match the return type of a gcc2
12656     builtin and then its argument prototype would still apply.  */
12657 char $ac_func();
12658
12659 int main() {
12660
12661 /* The GNU C library defines this for functions which it implements
12662     to always fail with ENOSYS.  Some functions are actually named
12663     something starting with __ and the normal name is an alias.  */
12664 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12665 choke me
12666 #else
12667 $ac_func();
12668 #endif
12669
12670 ; return 0; }
12671 EOF
12672 if { (eval echo configure:12673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12673   rm -rf conftest*
12674   eval "ac_cv_func_$ac_func=yes"
12675 else
12676   echo "configure: failed program was:" >&5
12677   cat conftest.$ac_ext >&5
12678   rm -rf conftest*
12679   eval "ac_cv_func_$ac_func=no"
12680 fi
12681 rm -f conftest*
12682
12683 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
12684   echo "$ac_t""yes" 1>&6
12685     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
12686   { test "$extra_verbose" = "yes" && cat << EOF
12687     Defining $ac_tr_func
12688 EOF
12689 cat >> confdefs.h <<EOF
12690 #define $ac_tr_func 1
12691 EOF
12692 }
12693  
12694 else
12695   echo "$ac_t""no" 1>&6
12696 fi
12697 done
12698
12699     with_modules=yes
12700   else
12701     if test "$with_modules" = "yes"; then
12702       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
12703     else
12704       echo "configure: warning: "Module support cannot be provided."" 1>&2
12705     fi
12706     with_modules=no
12707   fi
12708 fi
12709
12710 cat > conftest.$ac_ext <<EOF
12711 #line 12712 "configure"
12712 #include "confdefs.h"
12713 int main(int c,char *v[]){return 0;}
12714 EOF
12715 if { (eval echo configure:12716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
12716 then
12717   :
12718 else
12719   conftest_rc="$?"
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -fr conftest*
12723   
12724   echo ""
12725   echo "*** PANIC *** The C compiler can no longer build working executables."
12726   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
12727   echo "*** PANIC *** The most likely reason for this problem is that configure"
12728   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
12729   echo "*** PANIC *** found at run time."
12730   echo "*** PANIC ***"
12731   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
12732   echo "*** PANIC *** On other systems, try telling configure where to find the"
12733   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
12734   echo "*** PANIC ***"
12735   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
12736   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
12737   echo "*** PANIC *** on your system.  Don't do that."
12738   exit 1
12739 fi
12740 rm -fr conftest*
12741
12742 if test "$win32_processes" = "yes"; then
12743   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
12744    echo "    xemacs will be linked with \"process-nt.o\""
12745  fi
12746 else
12747   { test "$extra_verbose" = "yes" && cat << \EOF
12748     Defining HAVE_UNIX_PROCESSES
12749 EOF
12750 cat >> confdefs.h <<\EOF
12751 #define HAVE_UNIX_PROCESSES 1
12752 EOF
12753 }
12754
12755   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
12756    echo "    xemacs will be linked with \"process-unix.o\""
12757  fi
12758 fi
12759
12760
12761
12762 T=""
12763 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12764 CFLAGS="$T"
12765
12766
12767 T=""
12768 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12769 extra_objs="$T"
12770
12771
12772 T=""
12773 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
12774 c_switch_general="$T"
12775
12776
12777 T=""
12778 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12779 c_switch_window_system="$T"
12780
12781
12782 T=""
12783 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12784 c_switch_all="$T"
12785
12786
12787 T=""
12788 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
12789 ld_switch_general="$T"
12790
12791
12792 T=""
12793 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12794 ld_switch_window_system="$T"
12795
12796
12797 T=""
12798 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12799 ld_switch_all="$T"
12800
12801
12802 T=""
12803 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12804 ld_libs_general="$T"
12805
12806
12807 T=""
12808 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
12809 ld_libs_window_system="$T"
12810
12811
12812 T=""
12813 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12814 ld_libs_all="$T"
12815
12816
12817
12818 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
12819 internal_makefile_list="Makefile.in"
12820 SUBDIR_MAKEFILES=''
12821 test -d lock || mkdir lock
12822 for dir in $MAKE_SUBDIR; do
12823   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
12824         test -d "$d" || mkdir "$d"; cd "$d"
12825       done ) ;;
12826    * ) test -d "$dir" || mkdir "$dir" ;;
12827   esac
12828   
12829 T=""
12830 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12831 SUBDIR_MAKEFILES="$T"
12832
12833   
12834 T=""
12835 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12836 internal_makefile_list="$T"
12837
12838 done
12839
12840
12841
12842
12843 for dir in src/s src/m; do
12844   if test ! -d "$dir" ; then
12845     echo Making symbolic link to "$srcdir/$dir"
12846     ${LN_S} "$srcdir/$dir" "$dir"
12847   fi
12848 done
12849
12850 if test "$extra_verbose" = "yes"; then
12851   echo ""
12852   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
12853   echo ""
12854 fi
12855
12856 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
12857   echo "creating src/gdbinit"; echo ""
12858   echo "source $srcdir/src/gdbinit" > src/gdbinit
12859 fi
12860
12861 if test "$__SUNPRO_C" = "yes"; then
12862   echo "creating .sbinit"; echo ""
12863   ( echo "# For use with Sun WorkShop's Source browser."
12864     echo "# See sbquery(1) and sbinit(4) for more information"
12865     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
12866   ) > .sbinit
12867 fi
12868
12869 rm -f core
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889 PREFIX=$prefix
12890 while true; do
12891   case "$PREFIX" in
12892     *\$* ) eval "PREFIX=$PREFIX" ;;
12893     *) break ;;
12894   esac
12895 done
12896
12897
12898
12899
12900 EXEC_PREFIX=$exec_prefix
12901 while true; do
12902   case "$EXEC_PREFIX" in
12903     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12904     *) break ;;
12905   esac
12906 done
12907
12908
12909
12910
12911 INFODIR=$infodir
12912 while true; do
12913   case "$INFODIR" in
12914     *\$* ) eval "INFODIR=$INFODIR" ;;
12915     *) break ;;
12916   esac
12917 done
12918
12919
12920
12921
12922 INFOPATH=$infopath
12923 while true; do
12924   case "$INFOPATH" in
12925     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12926     *) break ;;
12927   esac
12928 done
12929
12930
12931
12932
12933 PACKAGE_PATH=$package_path
12934 while true; do
12935   case "$PACKAGE_PATH" in
12936     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12937     *) break ;;
12938   esac
12939 done
12940
12941
12942
12943
12944 LISPDIR=$lispdir
12945 while true; do
12946   case "$LISPDIR" in
12947     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12948     *) break ;;
12949   esac
12950 done
12951
12952
12953
12954
12955 MODULEDIR=$moduledir
12956 while true; do
12957   case "$MODULEDIR" in
12958     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
12959     *) break ;;
12960   esac
12961 done
12962
12963
12964
12965
12966 SITELISPDIR=$sitelispdir
12967 while true; do
12968   case "$SITELISPDIR" in
12969     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
12970     *) break ;;
12971   esac
12972 done
12973
12974
12975
12976
12977 SITEMODULEDIR=$sitemoduledir
12978 while true; do
12979   case "$SITEMODULEDIR" in
12980     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
12981     *) break ;;
12982   esac
12983 done
12984
12985
12986
12987
12988 ETCDIR=$etcdir
12989 while true; do
12990   case "$ETCDIR" in
12991     *\$* ) eval "ETCDIR=$ETCDIR" ;;
12992     *) break ;;
12993   esac
12994 done
12995
12996
12997
12998
12999 LOCKDIR=$lockdir
13000 while true; do
13001   case "$LOCKDIR" in
13002     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13003     *) break ;;
13004   esac
13005 done
13006
13007
13008
13009
13010 DOCDIR=$docdir
13011 while true; do
13012   case "$DOCDIR" in
13013     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13014     *) break ;;
13015   esac
13016 done
13017
13018
13019
13020
13021 ARCHLIBDIR=$archlibdir
13022 while true; do
13023   case "$ARCHLIBDIR" in
13024     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13025     *) break ;;
13026   esac
13027 done
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13049
13050
13051
13052
13053
13054
13055
13056 : ${XEMACS_CC:=$CC}
13057
13058
13059 if test "$with_prefix" = "yes"; then
13060   { test "$extra_verbose" = "yes" && cat << \EOF
13061     Defining PREFIX_USER_DEFINED
13062 EOF
13063 cat >> confdefs.h <<\EOF
13064 #define PREFIX_USER_DEFINED 1
13065 EOF
13066 }
13067
13068 fi
13069
13070 if test "$with_site_lisp" = "no"; then
13071   { test "$extra_verbose" = "yes" && cat << \EOF
13072     Defining INHIBIT_SITE_LISP
13073 EOF
13074 cat >> confdefs.h <<\EOF
13075 #define INHIBIT_SITE_LISP 1
13076 EOF
13077 }
13078
13079 fi
13080 if test "$with_site_modules" = "no"; then
13081   { test "$extra_verbose" = "yes" && cat << \EOF
13082     Defining INHIBIT_SITE_MODULES
13083 EOF
13084 cat >> confdefs.h <<\EOF
13085 #define INHIBIT_SITE_MODULES 1
13086 EOF
13087 }
13088
13089 fi
13090
13091
13092 T=""
13093 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13094 ac_configure_args="$T"
13095
13096 { test "$extra_verbose" = "yes" && cat << EOF
13097     Defining EMACS_CONFIGURATION = "$configuration"
13098 EOF
13099 cat >> confdefs.h <<EOF
13100 #define EMACS_CONFIGURATION "$configuration"
13101 EOF
13102 }
13103
13104 { test "$extra_verbose" = "yes" && cat << EOF
13105     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13106 EOF
13107 cat >> confdefs.h <<EOF
13108 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13109 EOF
13110 }
13111
13112 { test "$extra_verbose" = "yes" && cat << EOF
13113     Defining config_machfile = "$machfile"
13114 EOF
13115 cat >> confdefs.h <<EOF
13116 #define config_machfile "$machfile"
13117 EOF
13118 }
13119
13120 { test "$extra_verbose" = "yes" && cat << EOF
13121     Defining config_opsysfile = "$opsysfile"
13122 EOF
13123 cat >> confdefs.h <<EOF
13124 #define config_opsysfile "$opsysfile"
13125 EOF
13126 }
13127
13128
13129
13130 null_string=""
13131 { test "$extra_verbose" = "yes" && cat << EOF
13132     Defining LD_SWITCH_X_SITE = $null_string
13133 EOF
13134 cat >> confdefs.h <<EOF
13135 #define LD_SWITCH_X_SITE $null_string
13136 EOF
13137 }
13138
13139 { test "$extra_verbose" = "yes" && cat << EOF
13140     Defining LD_SWITCH_X_SITE_AUX = $null_string
13141 EOF
13142 cat >> confdefs.h <<EOF
13143 #define LD_SWITCH_X_SITE_AUX $null_string
13144 EOF
13145 }
13146
13147 { test "$extra_verbose" = "yes" && cat << EOF
13148     Defining C_SWITCH_X_SITE = $null_string
13149 EOF
13150 cat >> confdefs.h <<EOF
13151 #define C_SWITCH_X_SITE $null_string
13152 EOF
13153 }
13154
13155 { test "$extra_verbose" = "yes" && cat << EOF
13156     Defining LD_SWITCH_SITE = $null_string
13157 EOF
13158 cat >> confdefs.h <<EOF
13159 #define LD_SWITCH_SITE $null_string
13160 EOF
13161 }
13162
13163 { test "$extra_verbose" = "yes" && cat << EOF
13164     Defining C_SWITCH_SITE = $null_string
13165 EOF
13166 cat >> confdefs.h <<EOF
13167 #define C_SWITCH_SITE $null_string
13168 EOF
13169 }
13170
13171
13172
13173 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13174     Defining GNU_MALLOC
13175 EOF
13176 cat >> confdefs.h <<\EOF
13177 #define GNU_MALLOC 1
13178 EOF
13179 }
13180
13181 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13182     Defining USE_SYSTEM_MALLOC
13183 EOF
13184 cat >> confdefs.h <<\EOF
13185 #define USE_SYSTEM_MALLOC 1
13186 EOF
13187 }
13188
13189 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13190     Defining USE_DEBUG_MALLOC
13191 EOF
13192 cat >> confdefs.h <<\EOF
13193 #define USE_DEBUG_MALLOC 1
13194 EOF
13195 }
13196
13197                                               { test "$extra_verbose" = "yes" && cat << \EOF
13198     Defining USE_SYSTEM_MALLOC
13199 EOF
13200 cat >> confdefs.h <<\EOF
13201 #define USE_SYSTEM_MALLOC 1
13202 EOF
13203 }
13204
13205 fi
13206 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13207     Defining I18N3
13208 EOF
13209 cat >> confdefs.h <<\EOF
13210 #define I18N3 1
13211 EOF
13212 }
13213
13214 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13215     Defining USE_GCC
13216 EOF
13217 cat >> confdefs.h <<\EOF
13218 #define USE_GCC 1
13219 EOF
13220 }
13221
13222 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13223     Defining EXTERNAL_WIDGET
13224 EOF
13225 cat >> confdefs.h <<\EOF
13226 #define EXTERNAL_WIDGET 1
13227 EOF
13228 }
13229
13230 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13231     Defining NO_DOC_FILE
13232 EOF
13233 cat >> confdefs.h <<\EOF
13234 #define NO_DOC_FILE 1
13235 EOF
13236 }
13237
13238 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13239     Defining PURIFY
13240 EOF
13241 cat >> confdefs.h <<\EOF
13242 #define PURIFY 1
13243 EOF
13244 }
13245
13246 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13247     Defining QUANTIFY
13248 EOF
13249 cat >> confdefs.h <<\EOF
13250 #define QUANTIFY 1
13251 EOF
13252 }
13253
13254 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13255     Defining MAIL_USE_POP
13256 EOF
13257 cat >> confdefs.h <<\EOF
13258 #define MAIL_USE_POP 1
13259 EOF
13260 }
13261
13262 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13263     Defining KERBEROS
13264 EOF
13265 cat >> confdefs.h <<\EOF
13266 #define KERBEROS 1
13267 EOF
13268 }
13269
13270 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13271     Defining HESIOD
13272 EOF
13273 cat >> confdefs.h <<\EOF
13274 #define HESIOD 1
13275 EOF
13276 }
13277
13278 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13279     Defining USE_UNION_TYPE
13280 EOF
13281 cat >> confdefs.h <<\EOF
13282 #define USE_UNION_TYPE 1
13283 EOF
13284 }
13285
13286 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13287     Defining PDUMP
13288 EOF
13289 cat >> confdefs.h <<\EOF
13290 #define PDUMP 1
13291 EOF
13292 }
13293
13294
13295
13296 (
13297 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
13298 else
13299   echo "uname -a: `uname -a`"
13300 fi
13301 echo ""
13302 echo "$0 $quoted_arguments"
13303 ) > Installation
13304
13305 if test ! -z ${emacs_beta_version} ; then
13306   if test -z "${emacs_is_beta}" ; then
13307         xemacs_betaname=".${emacs_beta_version}"
13308   else
13309         xemacs_betaname="-b${emacs_beta_version}"
13310   fi
13311 else
13312   xemacs_betaname=""
13313 fi
13314
13315 (
13316 echo "
13317
13318 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
13319
13320   Where should the build process find the source code?    $srcdir
13321   What installation prefix should install use?            $prefix
13322   What operating system and machine description files should XEmacs use?
13323         \`$opsysfile' and \`$machfile'
13324   What compiler should XEmacs be built with?              $CC $CFLAGS
13325   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
13326   Should XEmacs use the relocating allocator for buffers? $rel_alloc
13327   What window system should XEmacs use?                   ${window_system}"
13328 if test "$with_x11" = "yes"; then
13329   echo "  Where do we find X Windows header files?                $x_includes"
13330   echo "  Where do we find X Windows libraries?                   $x_libraries"
13331 fi
13332 if test -n "$site_includes"; then
13333   echo "  Additional header files:                                $site_includes"
13334 fi
13335 if test -n "$site_libraries"; then
13336   echo "  Additional libraries:                                   $site_libraries"
13337 fi
13338 if test -n "$site_prefixes"; then
13339   echo "  Additional prefixes:                                    $site_prefixes"
13340 fi
13341 if test -n "$runpath"; then
13342   echo "  Runtime library search path:                            $runpath"
13343 fi
13344 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
13345 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
13346 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
13347 if test "$with_xmu" != yes -a "$with_x11" = yes; then
13348   echo "  No Xmu; substituting equivalent routines."
13349 fi
13350
13351 if test "$with_xpm" = yes; then
13352   echo "  Compiling in support for XPM images."
13353 elif test "$with_x11" = yes; then
13354   echo "  --------------------------------------------------------------------"
13355   echo "  WARNING: Compiling without XPM support."
13356   if test "$xpm_problem" != ""; then
13357     echo "  Reason: $xpm_problem"
13358   fi
13359   echo "  WARNING: You should strongly consider installing XPM."
13360   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
13361   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13362   echo "  --------------------------------------------------------------------"
13363 fi
13364 if test "$with_png" = yes; then
13365   echo "  Compiling in support for PNG image handling."
13366 elif test "$window_system" != "none"; then
13367   echo "  --------------------------------------------------------------------"
13368   echo "  WARNING: Compiling without PNG image support."
13369   if test "$png_problem" != ""; then
13370     echo "  Reason: $png_problem"
13371   fi
13372   echo "  WARNING: You should strongly consider installing the PNG libraries."
13373   echo "  WARNING: Otherwise certain images and glyphs may not display."
13374   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
13375   echo "  --------------------------------------------------------------------"
13376 fi
13377 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
13378 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
13379 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
13380 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
13381 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
13382 test "$with_nas_sound" = yes && echo "  Compiling in network sound (NAS) support."
13383 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
13384 test "$with_esd" = yes && echo "  Compiling in support for Enlightened Sound Daemon."
13385
13386 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
13387 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
13388 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
13389
13390 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
13391
13392 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
13393 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
13394
13395 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
13396 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
13397 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
13398 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
13399 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
13400 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
13401 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
13402 if test "$with_wnn" = yes; then
13403   echo "  Compiling in support for the WNN input method on Mule."
13404   test "$with_wnn6" = yes && echo "    Using WNN version 6."
13405 fi
13406 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
13407
13408 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
13409 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
13410 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
13411 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
13412 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
13413 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
13414 case "$with_menubars" in
13415   lucid ) echo "  Using Lucid menubars." ;;
13416   motif ) echo "  Using Motif menubars."
13417           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
13418           echo "             We recommend using the Lucid menubar instead."
13419           echo "             Re-run configure with --with-menubars='lucid'." ;;
13420   msw ) echo "  Using MS-Windows menubars." ;;
13421 esac
13422 case "$with_scrollbars" in
13423   lucid    ) echo "  Using Lucid scrollbars."     ;;
13424   motif    ) echo "  Using Motif scrollbars."     ;;
13425   athena   ) echo "  Using Athena scrollbars."    ;;
13426   athena3d ) echo "  Using Athena-3d scrollbars." ;;
13427   msw ) echo "  Using MS-Windows scrollbars." ;;
13428 esac
13429 case "$with_widgets" in
13430   motif    ) echo "  Using Motif native widgets."     ;;
13431   athena   ) echo "  Using Athena native widgets."    ;;
13432   athena3d ) echo "  Using Athena-3d native widgets." ;;
13433   msw ) echo "  Using MS-Windows native widgets." ;;
13434 esac
13435 case "$with_dialogs" in
13436   motif    )
13437     echo "  Using Motif dialog boxes."
13438     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
13439       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
13440       echo "             We recommend using the Athena dialog boxes instead."
13441       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
13442       echo "             Read the PROBLEMS file for more information."
13443     fi; fi
13444     ;;
13445   athena   ) echo "  Using Athena dialog boxes."    ;;
13446   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
13447   msw ) echo "  Using MS-Windows dialog boxes." ;;
13448 esac
13449 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
13450 test "$with_clash_detection" = yes && \
13451   echo "  Clash detection will use \"$lockdir\" for locking files."
13452 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
13453 test "$with_pop"        = yes && echo "  Using POP for mail access."
13454 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
13455 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
13456 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
13457 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
13458 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
13459 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
13460 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
13461   != "no no no no no"; then
13462   echo "  WARNING: ---------------------------------------------------------"
13463   echo "  WARNING: Compiling in support for runtime error checking."
13464   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
13465   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
13466   echo "  WARNING: ---------------------------------------------------------"
13467 fi
13468 echo ""
13469 ) | tee -a Installation
13470 echo ""
13471
13472
13473 # Remove any trailing slashes in these variables.
13474 test -n "$prefix" &&
13475   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13476 test -n "$exec_prefix" &&
13477   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
13478
13479
13480 for file in $internal_makefile_list; do
13481   test "$file" = src/Makefile.in && \
13482     file="src/Makefile.in:src/Makefile.in.in:src/depend"
13483   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
13484 done
13485 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
13486 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
13487
13488 trap '' 1 2 15
13489
13490 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
13491
13492 test "x$prefix" = xNONE && prefix=$ac_default_prefix
13493 # Let make expand exec_prefix.
13494 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
13495
13496 # Any assignment to VPATH causes Sun make to only execute
13497 # the first set of double-colon rules, so remove it if not needed.
13498 # If there is a colon in the path, we need to keep it.
13499 if test "x$srcdir" = x.; then
13500   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
13501 fi
13502
13503 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
13504
13505 DEFS=-DHAVE_CONFIG_H
13506
13507 # Without the "./", some shells look in PATH for config.status.
13508 : ${CONFIG_STATUS=./config.status}
13509
13510 echo creating $CONFIG_STATUS
13511 rm -f $CONFIG_STATUS
13512 cat > $CONFIG_STATUS <<EOF
13513 #! /bin/sh
13514 # Generated automatically by configure.
13515 # Run this file to recreate the current configuration.
13516 # This directory was configured as follows,
13517 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
13518 #
13519 # $0 $ac_configure_args
13520 #
13521 # Compiler output produced by configure, useful for debugging
13522 # configure, is in ./config.log if it exists.
13523
13524 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
13525 for ac_option
13526 do
13527   case "\$ac_option" in
13528   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
13529     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
13530     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
13531   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
13532     echo "$CONFIG_STATUS generated by autoconf version 2.13"
13533     exit 0 ;;
13534   -help | --help | --hel | --he | --h)
13535     echo "\$ac_cs_usage"; exit 0 ;;
13536   *) echo "\$ac_cs_usage"; exit 1 ;;
13537   esac
13538 done
13539
13540 ac_given_srcdir=$srcdir
13541 ac_given_INSTALL="$INSTALL"
13542
13543 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
13544 EOF
13545 cat >> $CONFIG_STATUS <<EOF
13546
13547 # Protect against being on the right side of a sed subst in config.status.
13548 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
13549  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
13550 $ac_vpsub
13551 $extrasub
13552 s%@SHELL@%$SHELL%g
13553 s%@CFLAGS@%$CFLAGS%g
13554 s%@CPPFLAGS@%$CPPFLAGS%g
13555 s%@CXXFLAGS@%$CXXFLAGS%g
13556 s%@FFLAGS@%$FFLAGS%g
13557 s%@DEFS@%$DEFS%g
13558 s%@LDFLAGS@%$LDFLAGS%g
13559 s%@LIBS@%$LIBS%g
13560 s%@exec_prefix@%$exec_prefix%g
13561 s%@prefix@%$prefix%g
13562 s%@program_transform_name@%$program_transform_name%g
13563 s%@bindir@%$bindir%g
13564 s%@sbindir@%$sbindir%g
13565 s%@libexecdir@%$libexecdir%g
13566 s%@datadir@%$datadir%g
13567 s%@sysconfdir@%$sysconfdir%g
13568 s%@sharedstatedir@%$sharedstatedir%g
13569 s%@localstatedir@%$localstatedir%g
13570 s%@libdir@%$libdir%g
13571 s%@includedir@%$includedir%g
13572 s%@oldincludedir@%$oldincludedir%g
13573 s%@infodir@%$infodir%g
13574 s%@mandir@%$mandir%g
13575 s%@LN_S@%$LN_S%g
13576 s%@blddir@%$blddir%g
13577 s%@CC@%$CC%g
13578 s%@CPP@%$CPP%g
13579 s%@start_flags@%$start_flags%g
13580 s%@ld_switch_shared@%$ld_switch_shared%g
13581 s%@start_files@%$start_files%g
13582 s%@ld@%$ld%g
13583 s%@lib_gcc@%$lib_gcc%g
13584 s%@RANLIB@%$RANLIB%g
13585 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
13586 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
13587 s%@INSTALL_DATA@%$INSTALL_DATA%g
13588 s%@YACC@%$YACC%g
13589 s%@SET_MAKE@%$SET_MAKE%g
13590 s%@X_CFLAGS@%$X_CFLAGS%g
13591 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
13592 s%@X_LIBS@%$X_LIBS%g
13593 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
13594 s%@install_pp@%$install_pp%g
13595 s%@libs_xauth@%$libs_xauth%g
13596 s%@dnd_objs@%$dnd_objs%g
13597 s%@lwlib_objs@%$lwlib_objs%g
13598 s%@ALLOCA@%$ALLOCA%g
13599 s%@have_esd_config@%$have_esd_config%g
13600 s%@dll_ld@%$dll_ld%g
13601 s%@dll_cflags@%$dll_cflags%g
13602 s%@dll_ldflags@%$dll_ldflags%g
13603 s%@dll_post@%$dll_post%g
13604 s%@dll_ldo@%$dll_ldo%g
13605 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
13606 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
13607 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
13608 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
13609 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
13610 s%@PROGNAME@%$PROGNAME%g
13611 s%@version@%$version%g
13612 s%@configuration@%$configuration%g
13613 s%@canonical@%$canonical%g
13614 s%@inststaticdir@%$inststaticdir%g
13615 s%@instvardir@%$instvardir%g
13616 s%@srcdir@%$srcdir%g
13617 s%@pkgdir@%$pkgdir%g
13618 s%@statedir@%$statedir%g
13619 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
13620 s%@PREFIX@%$PREFIX%g
13621 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
13622 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
13623 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
13624 s%@INFODIR@%$INFODIR%g
13625 s%@infopath@%$infopath%g
13626 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
13627 s%@INFOPATH@%$INFOPATH%g
13628 s%@package_path@%$package_path%g
13629 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
13630 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
13631 s%@lispdir@%$lispdir%g
13632 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
13633 s%@LISPDIR@%$LISPDIR%g
13634 s%@moduledir@%$moduledir%g
13635 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
13636 s%@MODULEDIR@%$MODULEDIR%g
13637 s%@sitelispdir@%$sitelispdir%g
13638 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
13639 s%@SITELISPDIR@%$SITELISPDIR%g
13640 s%@sitemoduledir@%$sitemoduledir%g
13641 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
13642 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
13643 s%@etcdir@%$etcdir%g
13644 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
13645 s%@ETCDIR@%$ETCDIR%g
13646 s%@lockdir@%$lockdir%g
13647 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
13648 s%@LOCKDIR@%$LOCKDIR%g
13649 s%@docdir@%$docdir%g
13650 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
13651 s%@DOCDIR@%$DOCDIR%g
13652 s%@archlibdir@%$archlibdir%g
13653 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
13654 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
13655 s%@bitmapdir@%$bitmapdir%g
13656 s%@extra_objs@%$extra_objs%g
13657 s%@machfile@%$machfile%g
13658 s%@opsysfile@%$opsysfile%g
13659 s%@c_switch_general@%$c_switch_general%g
13660 s%@c_switch_window_system@%$c_switch_window_system%g
13661 s%@c_switch_all@%$c_switch_all%g
13662 s%@ld_switch_general@%$ld_switch_general%g
13663 s%@ld_switch_window_system@%$ld_switch_window_system%g
13664 s%@ld_switch_all@%$ld_switch_all%g
13665 s%@ld_libs_general@%$ld_libs_general%g
13666 s%@ld_libs_window_system@%$ld_libs_window_system%g
13667 s%@ld_libs_all@%$ld_libs_all%g
13668 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
13669 s%@native_sound_lib@%$native_sound_lib%g
13670 s%@sound_cflags@%$sound_cflags%g
13671 s%@dynodump_arch@%$dynodump_arch%g
13672 s%@XEMACS_CC@%$XEMACS_CC%g
13673 s%@internal_makefile_list@%$internal_makefile_list%g
13674
13675 CEOF
13676 EOF
13677
13678 cat >> $CONFIG_STATUS <<\EOF
13679
13680 # Split the substitutions into bite-sized pieces for seds with
13681 # small command number limits, like on Digital OSF/1 and HP-UX.
13682 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
13683 ac_file=1 # Number of current file.
13684 ac_beg=1 # First line for current file.
13685 ac_end=$ac_max_sed_cmds # Line after last line for current file.
13686 ac_more_lines=:
13687 ac_sed_cmds=""
13688 while $ac_more_lines; do
13689   if test $ac_beg -gt 1; then
13690     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
13691   else
13692     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
13693   fi
13694   if test ! -s conftest.s$ac_file; then
13695     ac_more_lines=false
13696     rm -f conftest.s$ac_file
13697   else
13698     if test -z "$ac_sed_cmds"; then
13699       ac_sed_cmds="sed -f conftest.s$ac_file"
13700     else
13701       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
13702     fi
13703     ac_file=`expr $ac_file + 1`
13704     ac_beg=$ac_end
13705     ac_end=`expr $ac_end + $ac_max_sed_cmds`
13706   fi
13707 done
13708 if test -z "$ac_sed_cmds"; then
13709   ac_sed_cmds=cat
13710 fi
13711 EOF
13712
13713 cat >> $CONFIG_STATUS <<EOF
13714
13715 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
13716 EOF
13717 cat >> $CONFIG_STATUS <<\EOF
13718 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
13719   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13720   case "$ac_file" in
13721   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13722        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13723   *) ac_file_in="${ac_file}.in" ;;
13724   esac
13725
13726   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
13727
13728   # Remove last slash and all that follows it.  Not all systems have dirname.
13729   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13730   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13731     # The file is in a subdirectory.
13732     test ! -d "$ac_dir" && mkdir "$ac_dir"
13733     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
13734     # A "../" for each directory in $ac_dir_suffix.
13735     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
13736   else
13737     ac_dir_suffix= ac_dots=
13738   fi
13739
13740   case "$ac_given_srcdir" in
13741   .)  srcdir=.
13742       if test -z "$ac_dots"; then top_srcdir=.
13743       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
13744   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
13745   *) # Relative path.
13746     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
13747     top_srcdir="$ac_dots$ac_given_srcdir" ;;
13748   esac
13749
13750   case "$ac_given_INSTALL" in
13751   [/$]*) INSTALL="$ac_given_INSTALL" ;;
13752   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
13753   esac
13754
13755   echo creating "$ac_file"
13756   rm -f "$ac_file"
13757   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
13758   case "$ac_file" in
13759   *Makefile*) ac_comsub="1i\\
13760 # $configure_input" ;;
13761   *) ac_comsub= ;;
13762   esac
13763
13764   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13765   sed -e "$ac_comsub
13766 s%@configure_input@%$configure_input%g
13767 s%@srcdir@%$srcdir%g
13768 s%@top_srcdir@%$top_srcdir%g
13769 s%@INSTALL@%$INSTALL%g
13770 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
13771 fi; done
13772 rm -f conftest.s*
13773
13774 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
13775 # NAME is the cpp macro being defined and VALUE is the value it is being given.
13776 #
13777 # ac_d sets the value in "#define NAME VALUE" lines.
13778 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
13779 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
13780 ac_dC='\3'
13781 ac_dD='%g'
13782 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
13783 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13784 ac_uB='\([      ]\)%\1#\2define\3'
13785 ac_uC=' '
13786 ac_uD='\4%g'
13787 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
13788 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
13789 ac_eB='$%\1#\2define\3'
13790 ac_eC=' '
13791 ac_eD='%g'
13792
13793 if test "${CONFIG_HEADERS+set}" != set; then
13794 EOF
13795 cat >> $CONFIG_STATUS <<EOF
13796   CONFIG_HEADERS="src/config.h lwlib/config.h"
13797 EOF
13798 cat >> $CONFIG_STATUS <<\EOF
13799 fi
13800 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
13801   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
13802   case "$ac_file" in
13803   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
13804        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
13805   *) ac_file_in="${ac_file}.in" ;;
13806   esac
13807
13808   echo creating $ac_file
13809
13810   rm -f conftest.frag conftest.in conftest.out
13811   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
13812   cat $ac_file_inputs > conftest.in
13813
13814 EOF
13815
13816 # Transform confdefs.h into a sed script conftest.vals that substitutes
13817 # the proper values into config.h.in to produce config.h.  And first:
13818 # Protect against being on the right side of a sed subst in config.status.
13819 # Protect against being in an unquoted here document in config.status.
13820 rm -f conftest.vals
13821 cat > conftest.hdr <<\EOF
13822 s/[\\&%]/\\&/g
13823 s%[\\$`]%\\&%g
13824 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
13825 s%ac_d%ac_u%gp
13826 s%ac_u%ac_e%gp
13827 EOF
13828 sed -n -f conftest.hdr confdefs.h > conftest.vals
13829 rm -f conftest.hdr
13830
13831 # This sed command replaces #undef with comments.  This is necessary, for
13832 # example, in the case of _POSIX_SOURCE, which is predefined and required
13833 # on some systems where configure will not decide to define it.
13834 cat >> conftest.vals <<\EOF
13835 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
13836 EOF
13837
13838 # Break up conftest.vals because some shells have a limit on
13839 # the size of here documents, and old seds have small limits too.
13840
13841 rm -f conftest.tail
13842 while :
13843 do
13844   ac_lines=`grep -c . conftest.vals`
13845   # grep -c gives empty output for an empty file on some AIX systems.
13846   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
13847   # Write a limited-size here document to conftest.frag.
13848   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
13849   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
13850   echo 'CEOF
13851   sed -f conftest.frag conftest.in > conftest.out
13852   rm -f conftest.in
13853   mv conftest.out conftest.in
13854 ' >> $CONFIG_STATUS
13855   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
13856   rm -f conftest.vals
13857   mv conftest.tail conftest.vals
13858 done
13859 rm -f conftest.vals
13860
13861 cat >> $CONFIG_STATUS <<\EOF
13862   rm -f conftest.frag conftest.h
13863   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
13864   cat conftest.in >> conftest.h
13865   rm -f conftest.in
13866   if cmp -s $ac_file conftest.h 2>/dev/null; then
13867     echo "$ac_file is unchanged"
13868     rm -f conftest.h
13869   else
13870     # Remove last slash and all that follows it.  Not all systems have dirname.
13871       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
13872       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
13873       # The file is in a subdirectory.
13874       test ! -d "$ac_dir" && mkdir "$ac_dir"
13875     fi
13876     rm -f $ac_file
13877     mv conftest.h $ac_file
13878   fi
13879 fi; done
13880
13881 EOF
13882 cat >> $CONFIG_STATUS <<EOF
13883 CPP="$CPP"
13884  top_srcdir="$srcdir"
13885  MAKE_SUBDIR="$MAKE_SUBDIR"
13886
13887 EOF
13888 cat >> $CONFIG_STATUS <<\EOF
13889 for dir in . $MAKE_SUBDIR; do
13890   (
13891     cd $dir
13892     rm -f junk.c
13893     < Makefile.in \
13894       sed -e '/^# Generated/d' \
13895           -e 's%/\*\*/#.*%%' \
13896           -e 's/^ *# */#/' \
13897           -e '/^##/d' \
13898           -e '/^#/ {
13899 p
13900 d
13901 }'        \
13902           -e '/./ {
13903 s/\([\"]\)/\\\1/g
13904 s/^/"/
13905 s/$/"/
13906 }'  > junk.c;
13907
13908
13909
13910     echo creating $dir/Makefile
13911 $CPP -I. -I${top_srcdir}/src  junk.c \
13912   | sed -e 's/^\#.*//'          \
13913         -e 's/^[        ][      ]*$//'\
13914         -e 's/^ /       /'              \
13915   | sed -n -e '/^..*$/p'        \
13916   | sed '/^\"/ {
13917         s/\\\([\"]\)/\1/g
13918         s/^[    ]*\"//
13919         s/\"[   ]*$//
13920 }' > Makefile.new
13921     chmod 444 Makefile.new
13922     mv -f Makefile.new Makefile
13923
13924     echo creating $dir/GNUmakefile
13925 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
13926   | sed -e 's/^\#.*//'          \
13927         -e 's/^[        ][      ]*$//'\
13928         -e 's/^ /       /'              \
13929   | sed -n -e '/^..*$/p'        \
13930   | sed '/^\"/ {
13931         s/\\\([\"]\)/\1/g
13932         s/^[    ]*\"//
13933         s/\"[   ]*$//
13934 }' > Makefile.new
13935     chmod 444 Makefile.new
13936     mv -f Makefile.new GNUmakefile
13937
13938     rm -f junk.c
13939   )
13940 done
13941
13942 sed < config.status >> lib-src/config.values \
13943   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
13944   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
13945   -e 's/^\([^ ]*\) $/\1 ""/' \
13946   -e 's/ 1$/ t/'
13947
13948
13949 exit 0
13950 EOF
13951 chmod +x $CONFIG_STATUS
13952 rm -fr confdefs* $ac_clean_files
13953 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1