XEmacs 21.2.30 "Hygeia".
[chise/xemacs-chise.git.1] / configure
1 #! /bin/sh
2
3 #### Configuration script for XEmacs.  Largely divergent from FSF.
4 #### Guess values for system-dependent variables and create Makefiles.
5 #### Generated automatically using autoconf version 2.13 
6 #### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 #### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
8 #### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
9 #### Copyright (C) 1995, 1996 Ben Wing.
10 #### Copyright (C) 1998, 1999 J. Kean Johnston.
11
12 ### Don't edit this script!
13 ### This script was automatically generated by the `autoconf' program
14 ### from the file `./configure.in'.
15 ### To rebuild it, execute the command
16 ###     autoconf
17 ### in the this directory.  You must have autoconf version 2.13 or later.
18
19 ### This file is part of XEmacs.
20
21 ### XEmacs is free software; you can redistribute it and/or modify it
22 ### under the terms of the GNU General Public License as published by
23 ### the Free Software Foundation; either version 2, or (at your
24 ### option) any later version.
25
26 ### XEmacs is distributed in the hope that it will be useful, but
27 ### WITHOUT ANY WARRANTY; without even the implied warranty of
28 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
29 ### General Public License for more details.
30
31 ### You should have received a copy of the GNU General Public License
32 ### along with XEmacs; see the file COPYING.  If not, write to the Free
33 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
34 ### 02111-1307, USA.
35
36 ### For usage, run `./configure --help'
37 ### For more detailed information on building and installing XEmacs,
38 ### read the file `INSTALL'.
39 ###
40 ### If configure succeeds, it leaves its status in config.status.
41 ### A log of configuration tests can be found in config.log.
42 ### If configure fails after disturbing the status quo,
43 ###     config.status is removed.
44
45 ac_help="$ac_help
46   --with-x                use the X Window System"
47
48
49
50 if test -n "$ZSH_VERSION"; then
51     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
52   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
53   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
54   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
55       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
56 elif test -n "$BASH_VERSION"; then
57     set -o posix
58   unset CDPATH
59 else
60   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
61 fi
62
63 exec_prefix=NONE
64 host=NONE
65 no_create=
66 nonopt=NONE
67 no_recursion=
68 prefix=NONE
69 program_prefix=NONE
70 program_suffix=NONE
71 program_transform_name=s,x,x,
72 silent=
73 site=
74 srcdir=
75 target=NONE
76 verbose=
77 x_includes=NONE
78 x_libraries=NONE
79
80 bindir='${exec_prefix}/bin'
81 sbindir='${exec_prefix}/sbin'
82 libexecdir='${exec_prefix}/libexec'
83 datadir='${prefix}/share'
84 sysconfdir='${prefix}/etc'
85 sharedstatedir='${prefix}/com'
86 localstatedir='${prefix}/var'
87 libdir='${{exec_prefix}}/lib'
88 includedir='${prefix}/include'
89 oldincludedir='/usr/include'
90 infodir='${prefix}/info'
91 mandir='${prefix}/man'
92
93 subdirs=
94 MFLAGS= MAKEFLAGS=
95 ac_max_here_lines=12
96
97 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
98
99 # File descriptor usage:
100 # 0 standard input
101 # 1 file creation
102 # 2 errors and warnings
103 # 3 some systems may open it to /dev/tty
104 # 4 used on the Kubota Titan
105 # 6 checking for... messages and results
106 # 5 compiler messages saved in config.log
107 if test "$silent" = yes; then
108   exec 6>/dev/null
109 else
110   exec 6>&1
111 fi
112 exec 5>./config.log
113
114 echo "\
115 This file contains any messages produced by compilers while
116 running configure, to aid debugging if configure makes a mistake.
117 " 1>&5
118
119 # Strip out --no-create and --no-recursion so they do not pile up.
120 # Also quote any args containing shell metacharacters.
121 ac_configure_args=
122 for ac_arg
123 do
124   case "$ac_arg" in
125   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
126   | --no-cr | --no-c) ;;
127   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
128   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
129   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
130   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
131   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
132   esac
133 done
134
135 # NLS nuisances.
136 # Only set these to C if already set.  These must not be set unconditionally
137 # because not all systems understand e.g. LANG=C (notably SCO).
138 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
139 # Non-C LC_CTYPE values break the ctype check.
140 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
141 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
142 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
143 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
144
145 # confdefs.h avoids OS command line length limits that DEFS can exceed.
146 rm -rf conftest* confdefs.h
147 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
148 echo > confdefs.h
149
150 # A filename unique to this package, relative to the directory that
151 # configure is in, which we can look for to find out if srcdir is correct.
152 ac_unique_file=src/lisp.h
153
154 # Find the source files, if location was not specified.
155 if test -z "$srcdir"; then
156   ac_srcdir_defaulted=yes
157   # Try the directory containing this script, then its parent.
158   ac_prog=$0
159   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
160   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
161   srcdir=$ac_confdir
162   if test ! -r $srcdir/$ac_unique_file; then
163     srcdir=..
164   fi
165 else
166   ac_srcdir_defaulted=no
167 fi
168 if test ! -r $srcdir/$ac_unique_file; then
169   if test "$ac_srcdir_defaulted" = yes; then
170     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
171   else
172     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
173   fi
174 fi
175 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
176
177 # Prefer explicitly selected file to automatically selected ones.
178 if test -z "$CONFIG_SITE"; then
179   if test "x$prefix" != xNONE; then
180     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
181   else
182     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
183   fi
184 fi
185 for ac_site_file in $CONFIG_SITE; do
186   if test -r "$ac_site_file"; then
187     echo "loading site script $ac_site_file"
188     . "$ac_site_file"
189   fi
190 done
191
192
193 ac_ext=c
194 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
195 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
196 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
197 ac_cpp='$CPP '"$xe_cppflags"
198 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
199 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
200 cross_compiling=no
201
202 ac_exeext=
203 ac_objext=o
204 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
205   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
206   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
207     ac_n= ac_c='
208 ' ac_t='        '
209   else
210     ac_n=-n ac_c= ac_t=
211   fi
212 else
213   ac_n= ac_c='\c' ac_t=
214 fi
215
216
217 progname="`echo $0 | sed 's:^\./\./:\./:'`"
218
219
220 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
221 INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
222
223 prefix='/usr/local'
224 exec_prefix='${prefix}'
225 bindir='${exec_prefix}/bin'
226 datadir='${prefix}/lib'
227 statedir='${prefix}/lib'
228 libdir='${exec_prefix}/lib'
229 mandir='${prefix}/man/man1'
230 inststaticdir='${PROGNAME}'
231 instvardir='${PROGNAME}-${version}'
232 infodir='${datadir}/${instvardir}/info'
233 infopath=''
234 install_pp=''
235 lispdir='${datadir}/${instvardir}/lisp'
236 moduledir='${datadir}/${instvardir}/${configuration}/modules'
237 sitelispdir='${datadir}/${inststaticdir}/site-lisp'
238 sitemoduledir='${datadir}/${inststaticdir}/site-modules'
239 pkgdir='${datadir}/${instvardir}/lisp'
240 package_path=''
241 etcdir='${datadir}/${instvardir}/etc'
242 lockdir='${statedir}/${inststaticdir}/lock'
243 archlibdir='${datadir}/${instvardir}/${configuration}'
244 docdir='${archlibdir}'
245 with_prefix='yes'
246 with_site_lisp='no'
247 with_site_modules='yes'
248 with_menubars=''
249 with_scrollbars=''
250 with_widgets=''
251 with_dialogs=''
252 with_file_coding=''
253 cpp='' cppflags='' libs='' ldflags=''
254 dynamic=''
255 with_x11=''
256 with_msw=''
257 rel_alloc='default'
258 with_system_malloc='default'
259 with_dlmalloc='default'
260 native_sound_lib=''
261 use_assertions="yes"
262 with_toolbars=""
263 with_tty=""
264 use_union_type="no"
265 with_dnet=""
266 pdump="no"
267 with_dragndrop="no"
268
269
270
271
272 arguments="$@"
273
274 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
275 quoted_arguments=
276 for i in "$@"; do
277    case "$i" in
278    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
279    | --no-cr | --no-c) ;;
280    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
281    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
282    *)
283    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
284    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
285    esac
286 done
287
288 while test $# != 0; do
289   arg="$1"; shift
290   case "$arg" in
291     --no-create|--no-recursion) ;;
292         -* )
293             case "$arg" in
294         -*=*)
295           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
296           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
297           valomitted=no
298         ;;
299                                                                           -*)
300                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
301           val="yes" valomitted=yes
302         ;;
303       esac
304
305             optname="$opt"
306       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
307
308             case "${valomitted}-${opt}" in yes-without_* )
309         opt=`echo $opt | sed 's/without/with/'`
310         valomitted="no" val="no" ;;
311       esac
312
313             case "$opt" in
314
315         with_site_lisp  | \
316         with_prefix     | \
317         with_site_modules | \
318         with_x          | \
319         with_x11        | \
320         with_msw        | \
321         with_gcc        | \
322         dynamic         | \
323         with_ncurses    | \
324         with_dnet       | \
325         with_socks      | \
326         with_dragndrop  | \
327         with_cde        | \
328         with_offix      | \
329         with_gpm        | \
330         with_xpm        | \
331         with_xface      | \
332         with_gif        | \
333         with_jpeg       | \
334         with_png        | \
335         with_tiff       | \
336         with_wmcommand  | \
337         with_xmu        | \
338         with_purify     | \
339         with_quantify   | \
340         with_toolbars   | \
341         with_tty        | \
342         with_xfs        | \
343         with_i18n3      | \
344         with_mule       | \
345         with_file_coding| \
346         with_canna      | \
347         with_wnn        | \
348         with_wnn6       | \
349         with_workshop   | \
350         with_sparcworks | \
351         with_tooltalk   | \
352         with_ldap       | \
353         with_pop        | \
354         with_kerberos   | \
355         with_hesiod     | \
356         with_dnet       | \
357         with_infodock   | \
358         external_widget | \
359         verbose         | \
360         extra_verbose   | \
361         usage_tracking  | \
362         use_union_type  | \
363         pdump           | \
364         debug           | \
365         use_assertions  | \
366         memory_usage_stats | \
367         with_clash_detection | \
368         with_modules | \
369         no_doc_file )
370                   case "$val" in
371             y | ye | yes )      val=yes ;;
372             n | no )            val=no  ;;
373             * ) (echo "$progname: Usage error:"
374 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
375 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
376           esac
377           eval "$opt=\"$val\"" ;;
378
379
380                         srcdir          | \
381         compiler        | \
382         cflags          | \
383         cpp             | \
384         cppflags        | \
385         libs            | \
386         ldflags         | \
387         cache_file      | \
388         native_sound_lib| \
389         site_lisp       | \
390         x_includes      | \
391         x_libraries     | \
392         site_includes   | \
393         site_libraries  | \
394         site_prefixes   | \
395         site_runtime_libraries )
396                   if test "$valomitted" = "yes" ; then
397                     if test "$#" = 0 ; then
398               (echo "$progname: Usage error:"
399 echo " " "The \`--$optname' option requires a value."
400 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
401             fi
402             val="$1"; shift
403           fi
404           eval "$opt=\"$val\""
405         ;;
406
407                 rel_alloc | \
408         with_dlmalloc | \
409         with_debug_malloc  | use_debug_malloc | \
410         with_system_malloc | use_system_malloc )
411           case "$val" in
412             y | ye | yes )      val=yes ;;
413             n | no )            val=no  ;;
414             d | de | def | defa | defau | defaul | default ) val=default ;;
415             * ) (echo "$progname: Usage error:"
416 echo " " "The \`--$optname' option requires one of these values:
417   \`yes', \`no', or \`default'."
418 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
419           esac
420           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
421           eval "$opt=\"$val\""
422         ;;
423
424                 "with_database" )
425           with_database_berkdb=no
426           with_database_dbm=no
427           with_database_gdbm=no
428           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
429             case "$x" in
430               no ) ;;
431               b | be | ber | berk | berkd | berkdb )       with_database_berkdb=yes ;;
432               d | db | dbm )                               with_database_dbm=yes    ;;
433               g | gn | gnu | gnud | gnudb | gnudbm | gdbm) with_database_gdbm=yes   ;;
434               * ) (echo "$progname: Usage error:"
435 echo " " "The \`--$optname' option value
436   must be either \`no' or a comma-separated list
437   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
438 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
439             esac
440           done
441           if test "$with_database_dbm"  = "yes" -a \
442                   "$with_database_gdbm" = "yes"; then
443           (echo "$progname: Usage error:"
444 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
445   with the \`--$optname' option."
446 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
447           fi
448         ;;
449
450                 "with_sound" )
451                           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
452             case "$x" in
453                       n | no | non | none ) new_sdefault=no ;;
454               a | al | all | both ) new_sdefault=yes ;;
455
456               native )       with_native_sound=yes ;;
457               nonative )     with_native_sound=no ;;
458
459               nas )          with_nas_sound=yes ;;
460               nonas )        with_nas_sound=no ;;
461
462               esd )          with_esd_sound=yes ;;
463               noesd )        with_esd_sound=no ;;
464
465               * ) bogus_sound=yes ;;
466             esac
467             if test "$bogus_sound" -o \
468                  \( -n "$new_sdefault" -a -n "$sound_notfirst" \) ; then
469                 types="\`all', \`none', \`(no)native', \`no(nas)', \`(no)esd'."
470                 (echo "$progname: Usage error:"
471 echo " " "Valid types for the \`--$optname' option are:
472   $types.
473 The default is to autodetect all sound support."
474 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
475             elif test -n "$new_sdefault" ; then
476                 with_native_sound=$new_sdefault
477                 with_nas_sound=$new_sdefault
478                 with_esd_sound=$new_sdefault
479                 new_sdefault=   # reset this
480             fi
481             sound_notfirst=true
482           done
483         ;;
484
485                         "with_athena" )
486           case "$val" in
487             xa | xaw )                    val=xaw    ;;
488             3 | 3d | xaw3d )              val=3d     ;;
489                         ne | nex | next | naxtaw)     val=next   ;;
490                         9 | 95 | xaw95 )              val=95     ;;
491             xp | xpm | xawxpm )           val=xpm    ;;
492             * ) (echo "$progname: Usage error:"
493 echo " " "The \`--$optname' option must have one of these values:
494   \`xaw', \`3d', \`next', \`95', or \`xpm'."
495 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
496           esac
497           eval "$opt=\"$val\""
498         ;;
499
500                 "with_xim" )
501           case "$val" in
502             y | ye | yes )                val=yes   ;;
503             n | no | non | none )         val=no    ;;
504             x | xl | xli | xlib )         val=xlib  ;;
505             m | mo | mot | moti | motif ) val=motif ;;
506             * ) (echo "$progname: Usage error:"
507 echo " " "The \`--$optname' option must have one of these values:
508   \`motif', \`xlib', \`yes', or \`no'."
509 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
510           esac
511           eval "$opt=\"$val\""
512         ;;
513
514                 "mail_locking" )
515           case "$val" in
516             lockf )     val=lockf ;;
517             flock )     val=flock ;;
518             file | dot ) val=file  ;;
519             locking )   val=locking  ;;
520             * ) (echo "$progname: Usage error:"
521 echo " " "The \`--$optname' option must have one of these values:
522   \`lockf', \`flock', \`file', \`locking', or \`mmdf'."
523 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
524           esac
525           eval "$opt=\"$val\""
526         ;;
527
528                 "error_checking" )
529                           
530           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
531             case "$x" in
532                       n | no | non | none ) new_default=no ;;
533               a | al | all )        new_default=yes ;;
534
535               extents )       error_check_extents=yes ;;
536               noextents )     error_check_extents=no ;;
537
538               typecheck )     error_check_typecheck=yes ;;
539               notypecheck )   error_check_typecheck=no ;;
540
541               bufpos )        error_check_bufpos=yes ;;
542               nobufpos )      error_check_bufpos=no ;;
543
544               gc )            error_check_gc=yes ;;
545               nogc )          error_check_gc=no ;;
546
547               malloc )        error_check_malloc=yes ;;
548               nomalloc )      error_check_malloc=no ;;
549
550               byte_code )     error_check_byte_code=yes ;;
551               nobyte_code )   error_check_byte_code=no ;;
552
553               * ) bogus_error_check=yes ;;
554             esac
555             if test "$bogus_error_check" -o \
556                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
557                 if test "$error_check_default" = yes ; then
558                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', \`nomalloc', and \`nobyte-code'."
559                 else
560                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', \`malloc', and \`byte-code'."
561                 fi
562                 (echo "$progname: Usage error:"
563 echo " " "Valid types for the \`--$optname' option are:
564   $types."
565 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
566             elif test -n "$new_default" ; then
567                 error_check_extents=$new_default
568                 error_check_typecheck=$new_default
569                 error_check_bufpos=$new_default
570                 error_check_gc=$new_default
571                 error_check_malloc=$new_default
572                 error_check_byte_code=$new_default
573                 new_default=    # reset this
574             fi
575             echeck_notfirst=true
576           done
577         ;;
578
579                                 
580                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
581         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
582         archlibdir | docdir | package_path )
583                    if test "$valomitted" = "yes"; then
584              if test "$#" = 0; then
585                  (echo "$progname: Usage error:"
586 echo " " "The \`--$optname' option requires a value."
587 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
588              fi
589              val="$1"; shift
590            fi
591            eval "$opt=\"$val\""
592
593                            case "$opt" in
594                      exec_prefix ) { test "$extra_verbose" = "yes" && cat << \EOF
595     Defining EXEC_PREFIX_USER_DEFINED
596 EOF
597 cat >> confdefs.h <<\EOF
598 #define EXEC_PREFIX_USER_DEFINED 1
599 EOF
600 }
601  ;;
602              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
603     Defining LISPDIR_USER_DEFINED
604 EOF
605 cat >> confdefs.h <<\EOF
606 #define LISPDIR_USER_DEFINED 1
607 EOF
608 }
609  ;;
610              sitelispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
611     Defining SITELISPDIR_USER_DEFINED
612 EOF
613 cat >> confdefs.h <<\EOF
614 #define SITELISPDIR_USER_DEFINED 1
615 EOF
616 }
617  ;;
618              moduledir ) { test "$extra_verbose" = "yes" && cat << \EOF
619     Defining MODULEDIR_USER_DEFINED
620 EOF
621 cat >> confdefs.h <<\EOF
622 #define MODULEDIR_USER_DEFINED 1
623 EOF
624 }
625  ;;
626              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
627     Defining ETCDIR_USER_DEFINED
628 EOF
629 cat >> confdefs.h <<\EOF
630 #define ETCDIR_USER_DEFINED 1
631 EOF
632 }
633  ;;
634              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
635     Defining INFODIR_USER_DEFINED
636 EOF
637 cat >> confdefs.h <<\EOF
638 #define INFODIR_USER_DEFINED 1
639 EOF
640 }
641  ;;
642              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
643     Defining INFOPATH_USER_DEFINED
644 EOF
645 cat >> confdefs.h <<\EOF
646 #define INFOPATH_USER_DEFINED 1
647 EOF
648 }
649  ;;
650              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
651     Defining PACKAGE_PATH_USER_DEFINED
652 EOF
653 cat >> confdefs.h <<\EOF
654 #define PACKAGE_PATH_USER_DEFINED 1
655 EOF
656 }
657  ;;
658              datadir )
659                 { test "$extra_verbose" = "yes" && cat << \EOF
660     Defining INFODIR_USER_DEFINED
661 EOF
662 cat >> confdefs.h <<\EOF
663 #define INFODIR_USER_DEFINED 1
664 EOF
665 }
666
667                 { test "$extra_verbose" = "yes" && cat << \EOF
668     Defining LISPDIR_USER_DEFINED
669 EOF
670 cat >> confdefs.h <<\EOF
671 #define LISPDIR_USER_DEFINED 1
672 EOF
673 }
674
675             { test "$extra_verbose" = "yes" && cat << \EOF
676     Defining MODULEDIR_USER_DEFINED
677 EOF
678 cat >> confdefs.h <<\EOF
679 #define MODULEDIR_USER_DEFINED 1
680 EOF
681 }
682
683                 { test "$extra_verbose" = "yes" && cat << \EOF
684     Defining ETCDIR_USER_DEFINED
685 EOF
686 cat >> confdefs.h <<\EOF
687 #define ETCDIR_USER_DEFINED 1
688 EOF
689 }
690  ;;
691              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
692     Defining LOCKDIR_USER_DEFINED
693 EOF
694 cat >> confdefs.h <<\EOF
695 #define LOCKDIR_USER_DEFINED 1
696 EOF
697 }
698  ;;
699              docdir ) { test "$extra_verbose" = "yes" && cat << \EOF
700     Defining DOCDIR_USER_DEFINED
701 EOF
702 cat >> confdefs.h <<\EOF
703 #define DOCDIR_USER_DEFINED 1
704 EOF
705 }
706  ;;
707              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
708     Defining ARCHLIBDIR_USER_DEFINED
709 EOF
710 cat >> confdefs.h <<\EOF
711 #define ARCHLIBDIR_USER_DEFINED 1
712 EOF
713 }
714  ;;
715            esac
716         ;;
717
718                 "no_create" ) ;;
719
720                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
721
722                 "with_menubars"   | \
723         "with_scrollbars" | \
724         "with_dialogs" | \
725         "with_widgets" )
726           case "$val" in
727             l | lu | luc | luci | lucid )               val=lucid  ;;
728             m | mo | mot | moti | motif )               val=motif  ;;
729             a | at | ath | athe | athen | athena )      val=athena ;;
730             n | no | non | none )                       val=no ;;
731             * ) (echo "$progname: Usage error:"
732 echo " " "The \`--$optname' option must have one of these values:
733   \`lucid', \`motif', \`athena', or \`no'."
734 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
735           esac
736           eval "$opt=\"$val\""
737         ;;
738
739                 "use_minimal_tagbits" | \
740         "use_indexed_lrecord_implementation" | \
741         "run_in_place"  | \
742         "const_is_losing" | \
743         "with_gnu_make" )
744           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
745         ;;
746
747                 * ) (echo "$progname: Usage error:"
748 echo " " "Unrecognized option: $arg"
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
750
751       esac
752     ;;
753
754         *-*-*) configuration="$arg" ;;
755
756         *) (echo "$progname: Usage error:"
757 echo " " "Unrecognized argument: $arg"
758 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
759
760   esac
761 done
762
763
764 test -n "$cpp"      && CPP="$cpp"
765 test -n "$cppflags" && CPPFLAGS="$cppflags"
766 test -n "$libs"     && LIBS="$libs"
767 test -n "$ldflags"  && LDFLAGS="$ldflags"
768
769 eval set x "$quoted_arguments"; shift
770
771 test "$extra_verbose" = "yes" && verbose=yes
772
773 test -n "$with_x" && with_x11="$with_x"
774
775 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
776   test "$with_system_malloc" = "default" && with_system_malloc=yes
777 fi
778
779
780
781 if test "$with_cde $with_tooltalk" = "yes no"; then
782   (echo "$progname: Usage error:"
783 echo " " "--with-cde requires --with-tooltalk"
784 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
785 elif test "$with_tooltalk" = "no" ; then with_cde=no
786 elif test "$with_cde" = "yes"; then with_tooltalk=yes
787 fi
788
789
790 case "$srcdir" in
791
792     "" )
793     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
794       if test -f "$dir/src/lisp.h" -a \
795               -f "$dir/lisp/version.el" ; then
796         srcdir="$dir"
797         break
798       fi
799     done
800     if test -z "$srcdir" ; then
801       (echo "$progname: Usage error:"
802 echo " " "Neither the current directory nor its parent seem to
803   contain the XEmacs sources.  If you do not want to build XEmacs in its
804   source tree, you should run \`$progname' in the directory in which
805   you wish to build XEmacs, using the \`--srcdir' option to say where the
806   sources may be found."
807 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
808     fi
809   ;;
810
811     * )
812     if test ! -f "$srcdir/src/lisp.h" -o \
813             ! -f "$srcdir/lisp/version.el" ; then
814       (echo "$progname: Usage error:"
815 echo " " "The directory specified with the \`--srcdir' option,
816   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
817   either run the \`$progname' script at the top of the XEmacs source
818   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
819 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
820     fi
821   ;;
822 esac
823
824 if test -z "$configuration"; then
825     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
826   if test -z "$configuration"; then
827     (echo "$progname: Usage error:"
828 echo " " "XEmacs has not been ported to this host type.
829 Try explicitly specifying the CONFIGURATION when rerunning configure."
830 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
831   fi
832 fi
833
834 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
835 echo "configure:836: checking whether ln -s works" >&5
836
837 rm -f conftestdata
838 if ln -s X conftestdata 2>/dev/null
839 then
840   rm -f conftestdata
841   ac_cv_prog_LN_S="ln -s"
842 else
843   ac_cv_prog_LN_S=ln
844 fi
845 LN_S="$ac_cv_prog_LN_S"
846 if test "$ac_cv_prog_LN_S" = "ln -s"; then
847   echo "$ac_t""yes" 1>&6
848 else
849   echo "$ac_t""no" 1>&6
850 fi
851
852
853 for dir in lisp etc man info tests; do
854   if test ! -d "$dir" ; then
855     echo Making symbolic link to "$srcdir/$dir"
856     ${LN_S} "$srcdir/$dir" "$dir"
857   fi
858 done
859
860
861 absolute_pwd="`pwd`";
862 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
863 then blddir="$PWD"
864 else blddir="$absolute_pwd"; if test -d "/net"; then
865   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
866   blddir=`echo "$blddir" | \
867    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
868 fi
869 fi
870
871
872 case "$srcdir" in
873   /* ) ;;
874   .  ) srcdir="$blddir" ;;
875   *  ) srcdir="`cd $srcdir && pwd`"; if test -d "/net"; then
876   if test -d "/tmp_mnt/net"; then tdir="tmp_mnt/net"; else tdir="tmp_mnt"; fi
877   srcdir=`echo "$srcdir" | \
878    sed -e "s|^${tdir}/|/net/|" -e "s|^/a/|/net/|" -e "s|^/amd/|/net/|"`
879 fi ;;
880 esac
881
882 if test `pwd` != `sh -c cd $srcdir && pwd`  \
883    && test -f "$srcdir/src/config.h"; then
884   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
885    echo "   as a build directory right now; it has been configured in its own"
886    echo "   right.  To configure in another directory as well, you MUST"
887    echo "   use GNU make.  If you do not have GNU make, then you must"
888    echo "   now do \`make distclean' in $srcdir,"
889    echo "   and then run $progname again.") >&2
890   extrasub='/^VPATH[     ]*=/c\
891 vpath %.c $(srcdir)\
892 vpath %.h $(srcdir)\
893 vpath %.y $(srcdir)\
894 vpath %.l $(srcdir)\
895 vpath %.s $(srcdir)\
896 vpath %.in $(srcdir)'
897 fi
898
899 . "$srcdir/version.sh" || exit 1;
900 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
901 : "${extra_verbose=$beta}"
902 version="${emacs_major_version}.${emacs_minor_version}"
903 { test "$extra_verbose" = "yes" && cat << EOF
904     Defining EMACS_MAJOR_VERSION = $emacs_major_version
905 EOF
906 cat >> confdefs.h <<EOF
907 #define EMACS_MAJOR_VERSION $emacs_major_version
908 EOF
909 }
910
911 { test "$extra_verbose" = "yes" && cat << EOF
912     Defining EMACS_MINOR_VERSION = $emacs_minor_version
913 EOF
914 cat >> confdefs.h <<EOF
915 #define EMACS_MINOR_VERSION $emacs_minor_version
916 EOF
917 }
918
919 if test -n "$emacs_beta_version" ; then
920   if test "$beta" = "yes"; then
921         version="${version}-b${emacs_beta_version}"
922         { test "$extra_verbose" = "yes" && cat << EOF
923     Defining EMACS_BETA_VERSION = $emacs_beta_version
924 EOF
925 cat >> confdefs.h <<EOF
926 #define EMACS_BETA_VERSION $emacs_beta_version
927 EOF
928 }
929
930   else
931         version="${version}.${emacs_beta_version}"
932         { test "$extra_verbose" = "yes" && cat << EOF
933     Defining EMACS_PATCH_LEVEL = $emacs_beta_version
934 EOF
935 cat >> confdefs.h <<EOF
936 #define EMACS_PATCH_LEVEL $emacs_beta_version
937 EOF
938 }
939
940   fi
941 fi
942 { test "$extra_verbose" = "yes" && cat << EOF
943     Defining XEMACS_CODENAME = "$xemacs_codename"
944 EOF
945 cat >> confdefs.h <<EOF
946 #define XEMACS_CODENAME "$xemacs_codename"
947 EOF
948 }
949
950 { test "$extra_verbose" = "yes" && cat << EOF
951     Defining EMACS_VERSION = "$version"
952 EOF
953 cat >> confdefs.h <<EOF
954 #define EMACS_VERSION "$version"
955 EOF
956 }
957
958
959 if test "$with_infodock" = "yes"; then
960   if test ! -f ../../ID-INSTALL; then
961     echo "Cannot build InfoDock without InfoDock sources"
962     with_infodock=no
963   fi
964 fi
965
966 if test "$with_infodock" = "yes"; then
967       { test "$extra_verbose" = "yes" && cat << EOF
968     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
969 EOF
970 cat >> confdefs.h <<EOF
971 #define INFODOCK_MAJOR_VERSION $infodock_major_version
972 EOF
973 }
974
975   { test "$extra_verbose" = "yes" && cat << EOF
976     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
977 EOF
978 cat >> confdefs.h <<EOF
979 #define INFODOCK_MINOR_VERSION $infodock_minor_version
980 EOF
981 }
982
983   { test "$extra_verbose" = "yes" && cat << EOF
984     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
985 EOF
986 cat >> confdefs.h <<EOF
987 #define INFODOCK_BUILD_VERSION $infodock_build_version
988 EOF
989 }
990
991   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
992   PROGNAME=infodock
993   CPPFLAGS="$CPPFLAGS -DINFODOCK"
994 else
995   PROGNAME=xemacs
996 fi
997
998 if test -n "$emacs_is_beta"; then beta=yes; else beta=no; fi
999 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1000     Defining ERROR_CHECK_EXTENTS
1001 EOF
1002 cat >> confdefs.h <<\EOF
1003 #define ERROR_CHECK_EXTENTS 1
1004 EOF
1005 }
1006
1007 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1008     Defining ERROR_CHECK_TYPECHECK
1009 EOF
1010 cat >> confdefs.h <<\EOF
1011 #define ERROR_CHECK_TYPECHECK 1
1012 EOF
1013 }
1014
1015 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1016     Defining ERROR_CHECK_BUFPOS
1017 EOF
1018 cat >> confdefs.h <<\EOF
1019 #define ERROR_CHECK_BUFPOS 1
1020 EOF
1021 }
1022
1023 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1024     Defining ERROR_CHECK_GC
1025 EOF
1026 cat >> confdefs.h <<\EOF
1027 #define ERROR_CHECK_GC 1
1028 EOF
1029 }
1030
1031 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1032     Defining ERROR_CHECK_MALLOC
1033 EOF
1034 cat >> confdefs.h <<\EOF
1035 #define ERROR_CHECK_MALLOC 1
1036 EOF
1037 }
1038
1039 test "${error_check_byte_code=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
1040     Defining ERROR_CHECK_BYTE_CODE
1041 EOF
1042 cat >> confdefs.h <<\EOF
1043 #define ERROR_CHECK_BYTE_CODE 1
1044 EOF
1045 }
1046
1047 if test "${debug:=$beta}" = "yes"; then
1048   use_assertions=yes memory_usage_stats=yes
1049   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
1050    echo "    xemacs will be linked with \"debug.o\""
1051  fi
1052   extra_objs="$extra_objs tests.o" &&  if test "$extra_verbose" = "yes"; then
1053    echo "    xemacs will be linked with \"tests.o\""
1054  fi
1055   { test "$extra_verbose" = "yes" && cat << \EOF
1056     Defining DEBUG_XEMACS
1057 EOF
1058 cat >> confdefs.h <<\EOF
1059 #define DEBUG_XEMACS 1
1060 EOF
1061 }
1062
1063 fi
1064 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1065     Defining USE_ASSERTIONS
1066 EOF
1067 cat >> confdefs.h <<\EOF
1068 #define USE_ASSERTIONS 1
1069 EOF
1070 }
1071
1072 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
1073     Defining MEMORY_USAGE_STATS
1074 EOF
1075 cat >> confdefs.h <<\EOF
1076 #define MEMORY_USAGE_STATS 1
1077 EOF
1078 }
1079
1080
1081
1082 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
1083 echo "configure:1084: checking "host system type"" >&5
1084 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
1085 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
1086 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1087 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
1088 echo "$ac_t""$configuration" 1>&6
1089
1090
1091
1092
1093
1094 machine='' opsys=''
1095
1096 case "$canonical" in
1097   sparc-*-*        ) machine=sparc ;;
1098   alpha*-*-*       ) machine=alpha ;;
1099   vax-*-*          ) machine=vax ;;
1100   mips-dec-*       ) machine=pmax ;;
1101   mips-sgi-irix6*  ) machine=iris6d ;;
1102   mips-sgi-*       ) machine=iris4d ;;
1103   mips*-linux      ) machine=mips ;;
1104   romp-ibm-*       ) machine=ibmrt ;;
1105   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
1106   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
1107   powerpc*-*       ) machine=powerpc ;;
1108   hppa-*-*         ) machine=hp800 ;;
1109   m88k-dg-*        ) machine=aviion ;;
1110   m68*-sony-*      ) machine=news ;;
1111   mips-sony-*      ) machine=news-risc ;;
1112   clipper-*        ) machine=clipper ;;
1113   arm*             ) machine=arm ;;
1114   ns32k-*          ) machine=ns32000 ;;
1115 esac
1116
1117 case "$canonical" in
1118   *-*-linux*    ) opsys=linux ;;
1119   *-*-netbsd*   ) opsys=netbsd ;;
1120   *-*-openbsd*  ) opsys=openbsd ;;
1121   *-*-nextstep* ) opsys=nextstep ;;
1122   *-*-vms       ) opsys=vms ;;
1123
1124     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1125   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1126   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1127   *-dec-osf3*                ) opsys=decosf3-1 ;;
1128   *-dec-osf4*                ) opsys=decosf4-0 ;;
1129
1130     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1131   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1132   *-*-ultrix* )         opsys=ultrix4-3 ;;
1133
1134     *-*-aix3.1*  ) opsys=aix3-1 ;;
1135   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1136   *-*-aix3*    ) opsys=aix3-2   ;;
1137   *-*-aix4.0*  ) opsys=aix4     ;;
1138   *-*-aix4.1*  ) opsys=aix4-1   ;;
1139   *-*-aix4*    ) opsys=aix4-2   ;;
1140
1141     *-gnu* )                    opsys=gnu    ;;
1142   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1143   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1144   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1145   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1146   *-*-aos*   )                  opsys=bsd4-3 ;;
1147   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1148   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1149   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1150   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1151   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1152   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1153         if test -z "$NON_GNU_CPP" ; then
1154           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1155             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1156           done
1157         fi
1158         opsys=usg5-4-2 ;;
1159     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1160     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1161 esac
1162
1163 case "$canonical" in
1164
1165     *-*-netbsd* )
1166     case "$canonical" in
1167       i[3-9]86-*-netbsd*) machine=intel386 ;;
1168       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1169                                             machine=hp9000s300 ;;
1170       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1171       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1172     esac
1173   ;;
1174
1175     *-*-openbsd* )
1176     case "${canonical}" in
1177       i386-*-openbsd*)          machine=intel386 ;;
1178       m68k-*-openbsd*)          machine=hp9000s300 ;;
1179       mipsel-*-openbsd*)        machine=pmax ;;
1180      esac
1181    ;;
1182
1183     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1184   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1185
1186     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1187   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1188
1189     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1190
1191     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1192
1193     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1194
1195     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1196
1197     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1198
1199     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1200   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1201   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1202
1203   
1204     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1205
1206     *-convex-bsd* | *-convex-convexos* )
1207     machine=convex opsys=bsd4-3
1208     NON_GNU_CPP="cc -E -P"
1209   ;;
1210
1211     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1212
1213     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1214   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1215   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1216   m88k-dg-dgux*                           ) opsys=dgux     ;;
1217
1218     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1219   m88k-motorola-sysv4* )
1220                     machine=delta88k opsys=usg5-4-2
1221   ;;
1222   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1223
1224     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1225   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1226
1227     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1228
1229     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1230   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1231   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1232
1233       m88k-harris-cxux* )
1234         case "`uname -r`" in
1235        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1236        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1237     esac
1238     NON_GNU_CPP="/lib/cpp"
1239   ;;
1240     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1241     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1242
1243     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1244
1245     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1246
1247     *-hp-hpux* )
1248         case "$canonical" in
1249       m68*  ) machine=hp9000s300 ;;
1250       hppa* ) machine=hp800      ;;
1251     esac
1252
1253     case "$canonical" in
1254       *-hp-hpux7*  )  opsys=hpux   ;;
1255       *-hp-hpux8*  )  opsys=hpux8  ;;
1256       *-hp-hpux9*  )  opsys=hpux9  ;;
1257       *-hp-hpux10* )  opsys=hpux10 ;;
1258       *-hp-hpux11* )  opsys=hpux11 ;;
1259       *            )  opsys=hpux   ;;
1260     esac
1261
1262         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1263    echo "    xemacs will be linked with \"strcat.o\""
1264  fi ;; esac
1265
1266     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1267         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1268     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1269
1270     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1271   ;;
1272
1273     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1274   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1275
1276     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1277   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1278   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1279   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1280   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1281   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1282
1283     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1284   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1285
1286     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1287
1288     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1289
1290     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1291
1292     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1293
1294       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1295
1296     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1297
1298     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1299
1300     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1301
1302     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1303
1304         mips-mips-usg* ) machine=mips4 ;;
1305   mips-mips-riscos4 )
1306     machine=mips4
1307     NON_GNU_CC="cc -systype bsd43"
1308     NON_GNU_CPP="cc -systype bsd43 -E"
1309     case "$canonical" in
1310       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1311       mips-mips-riscos5* ) opsys=riscos5 ;;
1312     esac
1313   ;;
1314   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1315   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1316
1317     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1318
1319     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1320
1321     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1322   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1323
1324     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1325
1326     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1327
1328     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1329
1330     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1331
1332     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1333   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1334
1335     mips-siemens-sysv* | mips-sni-sysv*)
1336     machine=mips-siemens opsys=usg5-4
1337     NON_GNU_CC=/usr/ccs/bin/cc
1338     NON_GNU_CPP=/usr/ccs/lib/cpp
1339   ;;
1340
1341     mips-nec-sysv*)
1342     machine=mips-nec
1343     NON_GNU_CC=/usr/ccs/bin/cc
1344     NON_GNU_CPP=/usr/ccs/lib/cpp
1345   ;;
1346
1347       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1348   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1349     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1350   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1351   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1352   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1353   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1354   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1355   mips-sgi-irix*      ) opsys=irix5-0 ;;
1356
1357     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1358   *-sony-news* ) opsys=newsos5 ;;
1359
1360     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1361
1362     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1363         case "$canonical" in
1364       m68*-sunos1* )             machine=sun1     ;;
1365       m68*-sunos2* )             machine=sun2     ;;
1366       m68* )                     machine=sun3     ;;
1367       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1368       i*86-*-* )                 machine=intel386 ;;
1369       rs6000* )                  machine=rs6000   ;;
1370     esac
1371
1372         case "$canonical" in *-sunos5*)
1373       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1374     esac
1375
1376                     case "$canonical" in
1377       *-sunos4* )
1378         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1379         : ;;
1380       *-solaris2* )
1381         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1382         RANLIB=':' ;;
1383     esac
1384
1385     case "$canonical" in
1386       *-solaris*          )
1387         opsys=sol2
1388         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1389         { test "$extra_verbose" = "yes" && cat << EOF
1390     Defining OS_RELEASE = $os_release
1391 EOF
1392 cat >> confdefs.h <<EOF
1393 #define OS_RELEASE $os_release
1394 EOF
1395 }
1396  ;;
1397
1398             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1399       *-sunos4.0*         ) opsys=sunos4-0      ;;
1400       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1401       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1402       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1403       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1404       *-mach*             ) opsys=mach-bsd4-3   ;;
1405       *                   ) opsys=bsd4-2        ;;
1406     esac
1407
1408     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1409
1410         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1411   ;;
1412
1413     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1414
1415     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1416   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1417
1418     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1419
1420     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1421
1422     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1423       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1424
1425     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1426
1427     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1428
1429     vax-dec-* )
1430     case "$canonical" in
1431       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1432       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1433       *-mach* )                         opsys=mach-bsd4-3 ;;
1434     esac
1435   ;;
1436
1437     ns16k-whitechapel-* ) machine=mg1 ;;
1438
1439     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1440
1441     i[3-9]86-*-* )
1442     machine=intel386
1443     case "$canonical" in
1444       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1445       *-isc2.2* )               opsys=isc2-2 ;;
1446       *-isc4.0* )               opsys=isc4-0 ;;
1447       *-isc4.* )                opsys=isc4-1
1448                                 GCC_TEST_OPTIONS=-posix
1449                                 NON_GCC_TEST_OPTIONS=-Xp
1450                                 ;;
1451       *-isc* )                  opsys=isc3-0 ;;
1452       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1453       *-esix* )                 opsys=esix ;;
1454       *-mach* )                 opsys=mach-bsd4-3 ;;
1455       *-xenix* )                opsys=xenix ;;
1456       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1457       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1458       *-bsdi4* )                opsys=bsdos4 ;;
1459       *-bsdi3* )                opsys=bsdos3 ;;
1460       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1461       *-bsdi2* )                opsys=bsdos2 ;;
1462       *-sco3.2v5* )             opsys=sco5 ;
1463                                                         if test "$dynamic" = "yes" ; then
1464                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1465         else
1466                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1467         fi ;;
1468       *-sysv5* )                opsys=sco7 ;;
1469       *-386bsd* )               opsys=386bsd ;;
1470       *-freebsd* )              opsys=freebsd ;;
1471       *-nextstep* )             opsys=nextstep ;;
1472       *-pc-cygwin* )            opsys=cygwin32 ;;
1473       *-pc-mingw* )             opsys=mingw32 ;
1474                                 test -z "$with_tty" && with_tty="no";;
1475           esac
1476   ;;
1477
1478     m68k-*-linux* ) machine=m68k opsys=linux ;;
1479
1480 esac
1481
1482 if test -z "$machine" -o -z "$opsys"; then
1483   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1484    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1485   ) >&2
1486   exit 1
1487 fi
1488
1489 if test -z "$dynamic"; then
1490   case "$opsys" in
1491     hpux* | sunos4* ) dynamic=no ;;
1492     *) dynamic=yes ;;
1493   esac
1494 fi
1495 if test "$dynamic" = "yes"; then
1496   case "$opsys" in
1497     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1498     decosf* ) ld_call_shared="-call_shared" ;;
1499   esac
1500 else   case "$opsys" in
1501     sol2 )
1502       echo "Static linking is not supported on Solaris 2."
1503       echo "Rerun configure without specifying --dynamic=no."
1504       exit 1 ;;
1505     linux   ) ld_call_shared="-Bstatic" ;;
1506     decosf* ) ld_call_shared="-non_shared" ;;
1507   esac
1508 fi
1509
1510 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1511
1512 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1513 { test "$extra_verbose" = "yes" && cat << EOF
1514     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1515 EOF
1516 cat >> confdefs.h <<EOF
1517 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1518 EOF
1519 }
1520
1521
1522 machfile="m/${machine}.h"
1523 opsysfile="s/${opsys}.h"
1524
1525
1526 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1527 if test "$with_workshop $with_tooltalk" = "yes no"; then
1528   (echo "$progname: Usage error:"
1529 echo " " "--with-workshop requires --with-tooltalk"
1530 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1531 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1532 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1533 fi
1534
1535 if test "$with_workshop" = "yes"; then
1536   { test "$extra_verbose" = "yes" && cat << \EOF
1537     Defining SUNPRO
1538 EOF
1539 cat >> confdefs.h <<\EOF
1540 #define SUNPRO 1
1541 EOF
1542 }
1543
1544   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1545    echo "    xemacs will be linked with \"sunpro.o\""
1546  fi
1547 fi
1548
1549 if test "$with_clash_detection" = "yes"; then
1550   { test "$extra_verbose" = "yes" && cat << \EOF
1551     Defining CLASH_DETECTION
1552 EOF
1553 cat >> confdefs.h <<\EOF
1554 #define CLASH_DETECTION 1
1555 EOF
1556 }
1557
1558   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1559    echo "    xemacs will be linked with \"filelock.o\""
1560  fi
1561 fi
1562
1563 test -n "$compiler" && CC="$compiler"
1564 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1565 fi
1566
1567 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1568 if test "${CFLAGS-unset}" != unset
1569   then cflags_specified=yes;
1570   else cflags_specified=no;
1571 fi
1572
1573 xe_save_CFLAGS="$CFLAGS"
1574
1575 # Extract the first word of "gcc", so it can be a program name with args.
1576 set dummy gcc; ac_word=$2
1577 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1578 echo "configure:1579: checking for $ac_word" >&5
1579
1580 if test -n "$CC"; then
1581   ac_cv_prog_CC="$CC" # Let the user override the test.
1582 else
1583   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1584   ac_dummy="$PATH"
1585   for ac_dir in $ac_dummy; do
1586     test -z "$ac_dir" && ac_dir=.
1587     if test -f $ac_dir/$ac_word; then
1588       ac_cv_prog_CC="gcc"
1589       break
1590     fi
1591   done
1592   IFS="$ac_save_ifs"
1593 fi
1594 CC="$ac_cv_prog_CC"
1595 if test -n "$CC"; then
1596   echo "$ac_t""$CC" 1>&6
1597 else
1598   echo "$ac_t""no" 1>&6
1599 fi
1600
1601 if test -z "$CC"; then
1602   # Extract the first word of "cc", so it can be a program name with args.
1603 set dummy cc; ac_word=$2
1604 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1605 echo "configure:1606: checking for $ac_word" >&5
1606
1607 if test -n "$CC"; then
1608   ac_cv_prog_CC="$CC" # Let the user override the test.
1609 else
1610   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1611   ac_prog_rejected=no
1612   ac_dummy="$PATH"
1613   for ac_dir in $ac_dummy; do
1614     test -z "$ac_dir" && ac_dir=.
1615     if test -f $ac_dir/$ac_word; then
1616       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1617         ac_prog_rejected=yes
1618         continue
1619       fi
1620       ac_cv_prog_CC="cc"
1621       break
1622     fi
1623   done
1624   IFS="$ac_save_ifs"
1625 if test $ac_prog_rejected = yes; then
1626   # We found a bogon in the path, so make sure we never use it.
1627   set dummy $ac_cv_prog_CC
1628   shift
1629   if test $# -gt 0; then
1630     # We chose a different compiler from the bogus one.
1631     # However, it has the same basename, so the bogon will be chosen
1632     # first if we set CC to just the basename; use the full file name.
1633     shift
1634     set dummy "$ac_dir/$ac_word" "$@"
1635     shift
1636     ac_cv_prog_CC="$@"
1637   fi
1638 fi
1639 fi
1640 CC="$ac_cv_prog_CC"
1641 if test -n "$CC"; then
1642   echo "$ac_t""$CC" 1>&6
1643 else
1644   echo "$ac_t""no" 1>&6
1645 fi
1646
1647   if test -z "$CC"; then
1648     case "`uname -s`" in
1649     *win32* | *WIN32*)
1650       # Extract the first word of "cl", so it can be a program name with args.
1651 set dummy cl; ac_word=$2
1652 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1653 echo "configure:1654: checking for $ac_word" >&5
1654
1655 if test -n "$CC"; then
1656   ac_cv_prog_CC="$CC" # Let the user override the test.
1657 else
1658   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1659   ac_dummy="$PATH"
1660   for ac_dir in $ac_dummy; do
1661     test -z "$ac_dir" && ac_dir=.
1662     if test -f $ac_dir/$ac_word; then
1663       ac_cv_prog_CC="cl"
1664       break
1665     fi
1666   done
1667   IFS="$ac_save_ifs"
1668 fi
1669 CC="$ac_cv_prog_CC"
1670 if test -n "$CC"; then
1671   echo "$ac_t""$CC" 1>&6
1672 else
1673   echo "$ac_t""no" 1>&6
1674 fi
1675  ;;
1676     esac
1677   fi
1678   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1679 fi
1680
1681 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1682 echo "configure:1683: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1683
1684 ac_ext=c
1685 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1686 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1687 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1688 ac_cpp='$CPP '"$xe_cppflags"
1689 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1690 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1691 cross_compiling=no
1692
1693 cat > conftest.$ac_ext << EOF
1694
1695 #line 1696 "configure"
1696 #include "confdefs.h"
1697
1698 main(){return(0);}
1699 EOF
1700 if { (eval echo configure:1701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1701   ac_cv_prog_cc_works=yes
1702   # If we can't run a trivial program, we are probably using a cross compiler.
1703   if (./conftest; exit) 2>/dev/null; then
1704     ac_cv_prog_cc_cross=no
1705   else
1706     ac_cv_prog_cc_cross=yes
1707   fi
1708 else
1709   echo "configure: failed program was:" >&5
1710   cat conftest.$ac_ext >&5
1711   ac_cv_prog_cc_works=no
1712 fi
1713 rm -fr conftest*
1714 ac_ext=c
1715 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1716 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1717 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1718 ac_cpp='$CPP '"$xe_cppflags"
1719 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1720 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1721 cross_compiling=no
1722
1723 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1724 if test $ac_cv_prog_cc_works = no; then
1725   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1726 fi
1727 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1728 echo "configure:1729: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1729 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1730 cross_compiling=$ac_cv_prog_cc_cross
1731
1732 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1733 echo "configure:1734: checking whether we are using GNU C" >&5
1734
1735 cat > conftest.c <<EOF
1736 #ifdef __GNUC__
1737   yes;
1738 #endif
1739 EOF
1740 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1741   ac_cv_prog_gcc=yes
1742 else
1743   ac_cv_prog_gcc=no
1744 fi
1745
1746 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1747
1748 if test $ac_cv_prog_gcc = yes; then
1749   GCC=yes
1750 else
1751   GCC=
1752 fi
1753
1754 ac_test_CFLAGS="${CFLAGS+set}"
1755 ac_save_CFLAGS="$CFLAGS"
1756 CFLAGS=
1757 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1758 echo "configure:1759: checking whether ${CC-cc} accepts -g" >&5
1759
1760 echo 'void f(){}' > conftest.c
1761 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1762   ac_cv_prog_cc_g=yes
1763 else
1764   ac_cv_prog_cc_g=no
1765 fi
1766 rm -f conftest*
1767
1768
1769 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1770 if test "$ac_test_CFLAGS" = set; then
1771   CFLAGS="$ac_save_CFLAGS"
1772 elif test $ac_cv_prog_cc_g = yes; then
1773   if test "$GCC" = yes; then
1774     CFLAGS="-g -O2"
1775   else
1776     CFLAGS="-g"
1777   fi
1778 else
1779   if test "$GCC" = yes; then
1780     CFLAGS="-O2"
1781   else
1782     CFLAGS=
1783   fi
1784 fi
1785  
1786 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1787   CC=${NON_GNU_CC-cc}
1788   # Extract the first word of "gcc", so it can be a program name with args.
1789 set dummy gcc; ac_word=$2
1790 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1791 echo "configure:1792: checking for $ac_word" >&5
1792
1793 if test -n "$CC"; then
1794   ac_cv_prog_CC="$CC" # Let the user override the test.
1795 else
1796   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1797   ac_dummy="$PATH"
1798   for ac_dir in $ac_dummy; do
1799     test -z "$ac_dir" && ac_dir=.
1800     if test -f $ac_dir/$ac_word; then
1801       ac_cv_prog_CC="gcc"
1802       break
1803     fi
1804   done
1805   IFS="$ac_save_ifs"
1806 fi
1807 CC="$ac_cv_prog_CC"
1808 if test -n "$CC"; then
1809   echo "$ac_t""$CC" 1>&6
1810 else
1811   echo "$ac_t""no" 1>&6
1812 fi
1813
1814 if test -z "$CC"; then
1815   # Extract the first word of "cc", so it can be a program name with args.
1816 set dummy cc; ac_word=$2
1817 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1818 echo "configure:1819: checking for $ac_word" >&5
1819
1820 if test -n "$CC"; then
1821   ac_cv_prog_CC="$CC" # Let the user override the test.
1822 else
1823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1824   ac_prog_rejected=no
1825   ac_dummy="$PATH"
1826   for ac_dir in $ac_dummy; do
1827     test -z "$ac_dir" && ac_dir=.
1828     if test -f $ac_dir/$ac_word; then
1829       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1830         ac_prog_rejected=yes
1831         continue
1832       fi
1833       ac_cv_prog_CC="cc"
1834       break
1835     fi
1836   done
1837   IFS="$ac_save_ifs"
1838 if test $ac_prog_rejected = yes; then
1839   # We found a bogon in the path, so make sure we never use it.
1840   set dummy $ac_cv_prog_CC
1841   shift
1842   if test $# -gt 0; then
1843     # We chose a different compiler from the bogus one.
1844     # However, it has the same basename, so the bogon will be chosen
1845     # first if we set CC to just the basename; use the full file name.
1846     shift
1847     set dummy "$ac_dir/$ac_word" "$@"
1848     shift
1849     ac_cv_prog_CC="$@"
1850   fi
1851 fi
1852 fi
1853 CC="$ac_cv_prog_CC"
1854 if test -n "$CC"; then
1855   echo "$ac_t""$CC" 1>&6
1856 else
1857   echo "$ac_t""no" 1>&6
1858 fi
1859
1860   if test -z "$CC"; then
1861     case "`uname -s`" in
1862     *win32* | *WIN32*)
1863       # Extract the first word of "cl", so it can be a program name with args.
1864 set dummy cl; ac_word=$2
1865 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1866 echo "configure:1867: checking for $ac_word" >&5
1867
1868 if test -n "$CC"; then
1869   ac_cv_prog_CC="$CC" # Let the user override the test.
1870 else
1871   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1872   ac_dummy="$PATH"
1873   for ac_dir in $ac_dummy; do
1874     test -z "$ac_dir" && ac_dir=.
1875     if test -f $ac_dir/$ac_word; then
1876       ac_cv_prog_CC="cl"
1877       break
1878     fi
1879   done
1880   IFS="$ac_save_ifs"
1881 fi
1882 CC="$ac_cv_prog_CC"
1883 if test -n "$CC"; then
1884   echo "$ac_t""$CC" 1>&6
1885 else
1886   echo "$ac_t""no" 1>&6
1887 fi
1888  ;;
1889     esac
1890   fi
1891   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1892 fi
1893
1894 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1895 echo "configure:1896: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1896
1897 ac_ext=c
1898 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1899 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1900 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1901 ac_cpp='$CPP '"$xe_cppflags"
1902 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1903 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1904 cross_compiling=no
1905
1906 cat > conftest.$ac_ext << EOF
1907
1908 #line 1909 "configure"
1909 #include "confdefs.h"
1910
1911 main(){return(0);}
1912 EOF
1913 if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1914   ac_cv_prog_cc_works=yes
1915   # If we can't run a trivial program, we are probably using a cross compiler.
1916   if (./conftest; exit) 2>/dev/null; then
1917     ac_cv_prog_cc_cross=no
1918   else
1919     ac_cv_prog_cc_cross=yes
1920   fi
1921 else
1922   echo "configure: failed program was:" >&5
1923   cat conftest.$ac_ext >&5
1924   ac_cv_prog_cc_works=no
1925 fi
1926 rm -fr conftest*
1927 ac_ext=c
1928 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1929 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1930 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1931 ac_cpp='$CPP '"$xe_cppflags"
1932 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1933 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1934 cross_compiling=no
1935
1936 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1937 if test $ac_cv_prog_cc_works = no; then
1938   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1939 fi
1940 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1941 echo "configure:1942: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1942 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1943 cross_compiling=$ac_cv_prog_cc_cross
1944
1945 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1946 echo "configure:1947: checking whether we are using GNU C" >&5
1947
1948 cat > conftest.c <<EOF
1949 #ifdef __GNUC__
1950   yes;
1951 #endif
1952 EOF
1953 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1954   ac_cv_prog_gcc=yes
1955 else
1956   ac_cv_prog_gcc=no
1957 fi
1958
1959 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1960
1961 if test $ac_cv_prog_gcc = yes; then
1962   GCC=yes
1963 else
1964   GCC=
1965 fi
1966
1967 ac_test_CFLAGS="${CFLAGS+set}"
1968 ac_save_CFLAGS="$CFLAGS"
1969 CFLAGS=
1970 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1971 echo "configure:1972: checking whether ${CC-cc} accepts -g" >&5
1972
1973 echo 'void f(){}' > conftest.c
1974 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1975   ac_cv_prog_cc_g=yes
1976 else
1977   ac_cv_prog_cc_g=no
1978 fi
1979 rm -f conftest*
1980
1981
1982 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1983 if test "$ac_test_CFLAGS" = set; then
1984   CFLAGS="$ac_save_CFLAGS"
1985 elif test $ac_cv_prog_cc_g = yes; then
1986   if test "$GCC" = yes; then
1987     CFLAGS="-g -O2"
1988   else
1989     CFLAGS="-g"
1990   fi
1991 else
1992   if test "$GCC" = yes; then
1993     CFLAGS="-O2"
1994   else
1995     CFLAGS=
1996   fi
1997 fi
1998
1999 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
2000   CC=gcc
2001   # Extract the first word of "gcc", so it can be a program name with args.
2002 set dummy gcc; ac_word=$2
2003 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2004 echo "configure:2005: checking for $ac_word" >&5
2005
2006 if test -n "$CC"; then
2007   ac_cv_prog_CC="$CC" # Let the user override the test.
2008 else
2009   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2010   ac_dummy="$PATH"
2011   for ac_dir in $ac_dummy; do
2012     test -z "$ac_dir" && ac_dir=.
2013     if test -f $ac_dir/$ac_word; then
2014       ac_cv_prog_CC="gcc"
2015       break
2016     fi
2017   done
2018   IFS="$ac_save_ifs"
2019 fi
2020 CC="$ac_cv_prog_CC"
2021 if test -n "$CC"; then
2022   echo "$ac_t""$CC" 1>&6
2023 else
2024   echo "$ac_t""no" 1>&6
2025 fi
2026
2027 if test -z "$CC"; then
2028   # Extract the first word of "cc", so it can be a program name with args.
2029 set dummy cc; ac_word=$2
2030 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2031 echo "configure:2032: checking for $ac_word" >&5
2032
2033 if test -n "$CC"; then
2034   ac_cv_prog_CC="$CC" # Let the user override the test.
2035 else
2036   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2037   ac_prog_rejected=no
2038   ac_dummy="$PATH"
2039   for ac_dir in $ac_dummy; do
2040     test -z "$ac_dir" && ac_dir=.
2041     if test -f $ac_dir/$ac_word; then
2042       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2043         ac_prog_rejected=yes
2044         continue
2045       fi
2046       ac_cv_prog_CC="cc"
2047       break
2048     fi
2049   done
2050   IFS="$ac_save_ifs"
2051 if test $ac_prog_rejected = yes; then
2052   # We found a bogon in the path, so make sure we never use it.
2053   set dummy $ac_cv_prog_CC
2054   shift
2055   if test $# -gt 0; then
2056     # We chose a different compiler from the bogus one.
2057     # However, it has the same basename, so the bogon will be chosen
2058     # first if we set CC to just the basename; use the full file name.
2059     shift
2060     set dummy "$ac_dir/$ac_word" "$@"
2061     shift
2062     ac_cv_prog_CC="$@"
2063   fi
2064 fi
2065 fi
2066 CC="$ac_cv_prog_CC"
2067 if test -n "$CC"; then
2068   echo "$ac_t""$CC" 1>&6
2069 else
2070   echo "$ac_t""no" 1>&6
2071 fi
2072
2073   if test -z "$CC"; then
2074     case "`uname -s`" in
2075     *win32* | *WIN32*)
2076       # Extract the first word of "cl", so it can be a program name with args.
2077 set dummy cl; ac_word=$2
2078 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2079 echo "configure:2080: checking for $ac_word" >&5
2080
2081 if test -n "$CC"; then
2082   ac_cv_prog_CC="$CC" # Let the user override the test.
2083 else
2084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2085   ac_dummy="$PATH"
2086   for ac_dir in $ac_dummy; do
2087     test -z "$ac_dir" && ac_dir=.
2088     if test -f $ac_dir/$ac_word; then
2089       ac_cv_prog_CC="cl"
2090       break
2091     fi
2092   done
2093   IFS="$ac_save_ifs"
2094 fi
2095 CC="$ac_cv_prog_CC"
2096 if test -n "$CC"; then
2097   echo "$ac_t""$CC" 1>&6
2098 else
2099   echo "$ac_t""no" 1>&6
2100 fi
2101  ;;
2102     esac
2103   fi
2104   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
2105 fi
2106
2107 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
2108 echo "configure:2109: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
2109
2110 ac_ext=c
2111 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2112 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2113 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2114 ac_cpp='$CPP '"$xe_cppflags"
2115 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2116 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2117 cross_compiling=no
2118
2119 cat > conftest.$ac_ext << EOF
2120
2121 #line 2122 "configure"
2122 #include "confdefs.h"
2123
2124 main(){return(0);}
2125 EOF
2126 if { (eval echo configure:2127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2127   ac_cv_prog_cc_works=yes
2128   # If we can't run a trivial program, we are probably using a cross compiler.
2129   if (./conftest; exit) 2>/dev/null; then
2130     ac_cv_prog_cc_cross=no
2131   else
2132     ac_cv_prog_cc_cross=yes
2133   fi
2134 else
2135   echo "configure: failed program was:" >&5
2136   cat conftest.$ac_ext >&5
2137   ac_cv_prog_cc_works=no
2138 fi
2139 rm -fr conftest*
2140 ac_ext=c
2141 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
2142 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
2143 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
2144 ac_cpp='$CPP '"$xe_cppflags"
2145 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
2146 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
2147 cross_compiling=no
2148
2149 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
2150 if test $ac_cv_prog_cc_works = no; then
2151   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
2152 fi
2153 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
2154 echo "configure:2155: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
2155 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
2156 cross_compiling=$ac_cv_prog_cc_cross
2157
2158 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
2159 echo "configure:2160: checking whether we are using GNU C" >&5
2160
2161 cat > conftest.c <<EOF
2162 #ifdef __GNUC__
2163   yes;
2164 #endif
2165 EOF
2166 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2167: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
2167   ac_cv_prog_gcc=yes
2168 else
2169   ac_cv_prog_gcc=no
2170 fi
2171
2172 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
2173
2174 if test $ac_cv_prog_gcc = yes; then
2175   GCC=yes
2176 else
2177   GCC=
2178 fi
2179
2180 ac_test_CFLAGS="${CFLAGS+set}"
2181 ac_save_CFLAGS="$CFLAGS"
2182 CFLAGS=
2183 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
2184 echo "configure:2185: checking whether ${CC-cc} accepts -g" >&5
2185
2186 echo 'void f(){}' > conftest.c
2187 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
2188   ac_cv_prog_cc_g=yes
2189 else
2190   ac_cv_prog_cc_g=no
2191 fi
2192 rm -f conftest*
2193
2194
2195 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
2196 if test "$ac_test_CFLAGS" = set; then
2197   CFLAGS="$ac_save_CFLAGS"
2198 elif test $ac_cv_prog_cc_g = yes; then
2199   if test "$GCC" = yes; then
2200     CFLAGS="-g -O2"
2201   else
2202     CFLAGS="-g"
2203   fi
2204 else
2205   if test "$GCC" = yes; then
2206     CFLAGS="-O2"
2207   else
2208     CFLAGS=
2209   fi
2210 fi
2211
2212 fi
2213 CFLAGS="$xe_save_CFLAGS"
2214
2215
2216 test -n "$CPP" -a -d "$CPP" && CPP=
2217
2218 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
2219
2220 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2221 echo "configure:2222: checking how to run the C preprocessor" >&5
2222 # On Suns, sometimes $CPP names a directory.
2223 if test -n "$CPP" && test -d "$CPP"; then
2224   CPP=
2225 fi
2226 if test -z "$CPP"; then
2227
2228   # This must be in double quotes, not single quotes, because CPP may get
2229   # substituted into the Makefile and "${CC-cc}" will confuse make.
2230   CPP="${CC-cc} -E"
2231   # On the NeXT, cc -E runs the code through the compiler's parser,
2232   # not just through cpp.
2233   cat > conftest.$ac_ext <<EOF
2234 #line 2235 "configure"
2235 #include "confdefs.h"
2236 #include <assert.h>
2237 Syntax Error
2238 EOF
2239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2240 { (eval echo configure:2241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2242 if test -z "$ac_err"; then
2243   :
2244 else
2245   echo "$ac_err" >&5
2246   echo "configure: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   rm -rf conftest*
2249   CPP="${CC-cc} -E -traditional-cpp"
2250   cat > conftest.$ac_ext <<EOF
2251 #line 2252 "configure"
2252 #include "confdefs.h"
2253 #include <assert.h>
2254 Syntax Error
2255 EOF
2256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2257 { (eval echo configure:2258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2259 if test -z "$ac_err"; then
2260   :
2261 else
2262   echo "$ac_err" >&5
2263   echo "configure: failed program was:" >&5
2264   cat conftest.$ac_ext >&5
2265   rm -rf conftest*
2266   CPP="${CC-cc} -nologo -E"
2267   cat > conftest.$ac_ext <<EOF
2268 #line 2269 "configure"
2269 #include "confdefs.h"
2270 #include <assert.h>
2271 Syntax Error
2272 EOF
2273 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2274 { (eval echo configure:2275: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2275 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2276 if test -z "$ac_err"; then
2277   :
2278 else
2279   echo "$ac_err" >&5
2280   echo "configure: failed program was:" >&5
2281   cat conftest.$ac_ext >&5
2282   rm -rf conftest*
2283   CPP=/lib/cpp
2284 fi
2285 rm -f conftest*
2286 fi
2287 rm -f conftest*
2288 fi
2289 rm -f conftest*
2290   ac_cv_prog_CPP="$CPP"
2291   CPP="$ac_cv_prog_CPP"
2292 else
2293   ac_cv_prog_CPP="$CPP"
2294 fi
2295 echo "$ac_t""$CPP" 1>&6
2296
2297
2298
2299
2300 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2301 echo "configure:2302: checking for AIX" >&5
2302 cat > conftest.$ac_ext <<EOF
2303 #line 2304 "configure"
2304 #include "confdefs.h"
2305 #ifdef _AIX
2306   yes
2307 #endif
2308
2309 EOF
2310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2311   egrep "yes" >/dev/null 2>&1; then
2312   rm -rf conftest*
2313   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2314     Defining _ALL_SOURCE
2315 EOF
2316 cat >> confdefs.h <<\EOF
2317 #define _ALL_SOURCE 1
2318 EOF
2319 }
2320
2321 else
2322   rm -rf conftest*
2323   echo "$ac_t""no" 1>&6
2324 fi
2325 rm -f conftest*
2326
2327  
2328 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2329 echo "configure:2330: checking for GNU libc" >&5
2330 cat > conftest.$ac_ext <<EOF
2331 #line 2332 "configure"
2332 #include "confdefs.h"
2333 #include <features.h>
2334 int main() {
2335
2336 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2337 #error Not a GNU libc system :-(
2338 ******* ======= ******** &&&&&&&&
2339 #endif
2340
2341 ; return 0; }
2342 EOF
2343 if { (eval echo configure:2344: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2344   rm -rf conftest*
2345   have_glibc=yes
2346 else
2347   echo "configure: failed program was:" >&5
2348   cat conftest.$ac_ext >&5
2349   rm -rf conftest*
2350   have_glibc=no
2351 fi
2352 rm -f conftest*
2353 echo "$ac_t""$have_glibc" 1>&6
2354 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2355     Defining _GNU_SOURCE
2356 EOF
2357 cat >> confdefs.h <<\EOF
2358 #define _GNU_SOURCE 1
2359 EOF
2360 }
2361
2362
2363 case "$opsys" in
2364   sol2) 
2365    { test "$extra_verbose" = "yes" && cat << \EOF
2366     Defining __EXTENSIONS__
2367 EOF
2368 cat >> confdefs.h <<\EOF
2369 #define __EXTENSIONS__ 1
2370 EOF
2371 }
2372
2373       if test "$os_release" -ge 55; then
2374      { test "$extra_verbose" = "yes" && cat << \EOF
2375     Defining _XOPEN_SOURCE = 500
2376 EOF
2377 cat >> confdefs.h <<\EOF
2378 #define _XOPEN_SOURCE 500
2379 EOF
2380 }
2381
2382      { test "$extra_verbose" = "yes" && cat << \EOF
2383     Defining _XOPEN_SOURCE_EXTENDED
2384 EOF
2385 cat >> confdefs.h <<\EOF
2386 #define _XOPEN_SOURCE_EXTENDED 1
2387 EOF
2388 }
2389
2390    fi ;;
2391   linux)
2392     { test "$extra_verbose" = "yes" && cat << \EOF
2393     Defining _POSIX_C_SOURCE = 199506L
2394 EOF
2395 cat >> confdefs.h <<\EOF
2396 #define _POSIX_C_SOURCE 199506L
2397 EOF
2398 }
2399
2400     { test "$extra_verbose" = "yes" && cat << \EOF
2401     Defining _XOPEN_SOURCE = 500
2402 EOF
2403 cat >> confdefs.h <<\EOF
2404 #define _XOPEN_SOURCE 500
2405 EOF
2406 }
2407
2408     { test "$extra_verbose" = "yes" && cat << \EOF
2409     Defining _XOPEN_SOURCE_EXTENDED
2410 EOF
2411 cat >> confdefs.h <<\EOF
2412 #define _XOPEN_SOURCE_EXTENDED 1
2413 EOF
2414 }
2415
2416     ;;
2417 esac
2418
2419 cat > conftest.$ac_ext <<EOF
2420 #line 2421 "configure"
2421 #include "confdefs.h"
2422 int main () {
2423 #if defined __SUNPRO_C
2424 return 11;
2425 #elif defined __DECC
2426 return 12;
2427 #else
2428 return 0;
2429 #endif
2430 }
2431 EOF
2432 if { (eval echo configure:2433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2433 then
2434   :
2435 else
2436   conftest_rc="$?"
2437   echo "configure: failed program was:" >&5
2438   cat conftest.$ac_ext >&5
2439   rm -fr conftest*
2440   case "$conftest_rc" in
2441   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2442   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2443 esac
2444 fi
2445 rm -fr conftest*
2446
2447
2448
2449
2450 echo "Extracting information from the machine- and system-dependent headers..."
2451
2452 tempcname="conftest.c"
2453
2454
2455
2456 cat > $tempcname <<EOF
2457 #define NOT_C_CODE
2458 #define C_SWITCH_SITE
2459 #define C_SWITCH_X_SITE
2460 #define LD_SWITCH_SITE
2461 #define LD_SWITCH_X_SITE
2462 #define LD_SWITCH_X_SITE_AUX
2463 #define OS_RELEASE $os_release
2464 #include "$srcdir/src/$opsysfile"
2465 #include "$srcdir/src/$machfile"
2466
2467 #ifndef LIBS_MACHINE
2468 #define LIBS_MACHINE
2469 #endif
2470 configure___ libs_machine=LIBS_MACHINE
2471
2472 #ifndef LIBS_SYSTEM
2473 #define LIBS_SYSTEM
2474 #endif
2475 configure___ libs_system=LIBS_SYSTEM
2476
2477 #ifndef LIBS_TERMCAP
2478 #define LIBS_TERMCAP
2479 #endif
2480 configure___ libs_termcap=LIBS_TERMCAP
2481
2482 #ifndef LIB_STANDARD
2483 #define LIB_STANDARD
2484 #endif
2485 configure___ libs_standard=LIB_STANDARD
2486
2487
2488 #ifndef OBJECTS_MACHINE
2489 #define OBJECTS_MACHINE
2490 #endif
2491 configure___ objects_machine=OBJECTS_MACHINE
2492
2493 #ifndef OBJECTS_SYSTEM
2494 #define OBJECTS_SYSTEM
2495 #endif
2496 configure___ objects_system=OBJECTS_SYSTEM
2497
2498
2499 #ifndef C_SWITCH_MACHINE
2500 #define C_SWITCH_MACHINE
2501 #endif
2502 configure___ c_switch_machine=C_SWITCH_MACHINE
2503
2504 #ifndef C_SWITCH_SYSTEM
2505 #define C_SWITCH_SYSTEM
2506 #endif
2507 configure___ c_switch_system=C_SWITCH_SYSTEM
2508
2509
2510 #ifndef LD_SWITCH_MACHINE
2511 #define LD_SWITCH_MACHINE
2512 #endif
2513 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2514
2515 #ifndef LD_SWITCH_SYSTEM
2516 #define LD_SWITCH_SYSTEM
2517 #endif
2518 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2519
2520
2521 #ifndef UNEXEC
2522 #define UNEXEC "unexec.o"
2523 #endif
2524 configure___ unexec=UNEXEC
2525
2526
2527 #ifndef LD_SWITCH_SHARED
2528 #define LD_SWITCH_SHARED "-c"
2529 #endif
2530 configure___ ld_switch_shared=LD_SWITCH_SHARED
2531
2532
2533 #ifdef ORDINARY_LINK
2534 #define LD "\$(CC) \$(CFLAGS)"
2535 #else /* no ORDINARY LINK */
2536 #ifdef COFF_ENCAPSULATE
2537 #define LD "\$(CC) -nostdlib"
2538 #else /* not COFF_ENCAPSULATE */
2539 #ifdef LINKER
2540 #define LD LINKER
2541 #else /* ! defined (LINKER) */
2542 #define LD "ld"
2543 #endif /* ! defined (LINKER) */
2544 #endif /* ! defined (COFF_ENCAPSULATE) */
2545 #endif /* not ORDINARY_LINK */
2546 configure___ ld=LD
2547
2548 #ifndef LIB_GCC
2549 #define LIB_GCC
2550 #endif
2551 configure___ lib_gcc=LIB_GCC
2552
2553 #ifndef LD_TEXT_START_ADDR
2554 #define LD_TEXT_START_ADDR
2555 #endif
2556 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2557
2558
2559 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2560 #ifdef NO_REMAP
2561 #ifdef COFF_ENCAPSULATE
2562 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2563 #else /* ! defined (COFF_ENCAPSULATE) */
2564 #define START_FILES "pre-crt0.o /lib/crt0.o"
2565 #endif /* ! defined (COFF_ENCAPSULATE) */
2566 #else /* ! defined (NO_REMAP) */
2567 #define START_FILES "ecrt0.o"
2568 #endif /* ! defined (NO_REMAP) */
2569 #endif /* no ORDINARY_LINK */
2570 #ifndef START_FILES
2571 #define START_FILES
2572 #endif
2573 configure___ start_files=START_FILES
2574
2575 #ifdef ORDINARY_LINK
2576 configure___ ordinary_link=yes
2577 #else
2578 configure___ ordinary_link=no
2579 #endif
2580
2581 #ifdef SYSTEM_MALLOC
2582 configure___ system_malloc=yes
2583 #else
2584 configure___ system_malloc=no
2585 #endif
2586
2587 #ifdef TERMINFO
2588 configure___ have_terminfo=yes
2589 #else
2590 configure___ have_terminfo=no
2591 #endif
2592
2593 #ifdef MAIL_USE_FLOCK
2594 configure___ mail_use_flock=yes
2595 #else
2596 configure___ mail_use_flock=no
2597 #endif
2598
2599 #ifdef MAIL_USE_LOCKF
2600 configure___ mail_use_lockf=yes
2601 #else
2602 configure___ mail_use_lockf=no
2603 #endif
2604
2605 #ifdef MAIL_USE_LOCKING
2606 configure___ mail_use_locking=yes
2607 #else
2608 configure___ mail_use_locking=no
2609 #endif
2610
2611 #ifdef HAVE_WIN32_PROCESSES
2612 configure___ win32_processes=yes
2613 #else
2614 configure___ win32_processes=no
2615 #endif
2616
2617 EOF
2618
2619 CPP=`eval "echo $CPP $CPPFLAGS"`
2620 eval `$CPP -Isrc $tempcname \
2621         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2622
2623 rm $tempcname
2624
2625 test "$extra_verbose" = "yes" && \
2626   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 ""
2627
2628 case "$opsys" in mingw*) mingw_include=`eval "gcc -print-file-name=libc.a"` ;
2629         mingw_include=`eval "dirname $mingw_include"` ;
2630         mingw_include="-I$mingw_include/../include/mingw32" ;
2631         c_switch_system="$c_switch_system $mingw_include" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$mingw_include\" to \$c_switch_system"; fi ;;
2632 esac
2633
2634 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2635
2636 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2637
2638 if test "$cflags_specified" = "no"; then
2639       if   test "$GCC" = "yes"; then
2640     CFLAGS="-g -O3 -Wall -Wno-switch -Wpointer-arith -Winline -Wmissing-prototypes -Wshadow"
2641               elif test "$__SUNPRO_C" = "yes"; then
2642     case "$opsys" in
2643       sol2    ) CFLAGS="-v -xO4" ;;
2644       sunos4* ) CFLAGS="-xO2";;
2645     esac
2646   elif test "$__DECC" = "yes"; then
2647     CFLAGS="-O3"
2648   elif test "$CC" = "xlc"; then
2649     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2650     else
2651     CFLAGS="-O" ;  fi
2652 fi
2653
2654 if test "$GCC" = "yes"; then
2655 echo $ac_n "checking for buggy gcc versions""... $ac_c" 1>&6
2656 echo "configure:2657: checking for buggy gcc versions" >&5
2657 GCC_VERSION=`$CC --version`
2658 case `uname -s`:`uname -m`:$GCC_VERSION in
2659                     *:sun4*:2.8.1|*:sun4*:egcs-2.90.*)
2660                         case "$CFLAGS" in
2661             *-O2*|*-O3*)
2662                 case "$CFLAGS" in
2663                     *-fno-schedule-insns*) ;;
2664                     *)
2665                         echo "$ac_t""Yes" 1>&6
2666                         echo "configure: warning: Don't use -O2 with gcc 2.8.1 and egcs 1.0 under SPARC architectures" 1>&2
2667                         echo "configure: warning: without also using -fno-schedule-insns." 1>&2
2668                         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2669                         ;;
2670                 esac
2671                 ;;
2672         esac
2673         ;;
2674                     Linux:alpha:egcs-2.91.*)
2675         echo "$ac_t""Yes" 1>&6
2676         echo "configure: warning: There have been reports of egcs-1.1 not compiling XEmacs correctly on" 1>&2
2677         echo "configure: warning: Alpha Linux.  There have also been reports that egcs-1.0.3a is O.K." 1>&2
2678         { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2679         ;;
2680     *:i*86*:2.7.2*)
2681         case "$GCC_VERSION" in
2682             2.7.2)
2683                 case "$CFLAGS" in
2684                     *-O2*|*-O3*)
2685                         case "$CFLAGS" in
2686                             *-fno-strength-reduce*) ;;
2687                             *)
2688                                 echo "$ac_t""Yes" 1>&6
2689                                 echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2690                                 echo "configure: warning: -fno-strength-reduce." 1>&2
2691                                 { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2692                                 ;;
2693                         esac
2694                         ;;
2695                 esac
2696                 ;;
2697         esac
2698         case "$CFLAGS" in
2699          *-fno-caller-saves*) ;;
2700          *)
2701             echo "$ac_t""Yes" 1>&6
2702             echo "configure: warning: Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using" 1>&2
2703             echo "configure: warning: -fno-caller-saves." 1>&2
2704             { echo "configure: error: Aborting due to known problem" 1>&2; exit 1; }
2705             ;;
2706         esac
2707         ;;
2708 esac
2709 fi
2710 echo "$ac_t""No" 1>&6
2711
2712
2713 if test "$GCC" = "yes"; then
2714   set x $ld_switch_system; shift; ld_switch_system=""
2715   while test -n "$1"; do
2716     case $1 in
2717       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2718       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2719       -Xlinker* ) ;;
2720       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2721     esac
2722     shift
2723   done
2724 fi
2725
2726 if test "$GCC" = "yes"; then
2727   set x $ld_switch_machine; shift; ld_switch_machine=""
2728   while test -n "$1"; do
2729     case $1 in
2730       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2731       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2732       -Xlinker* ) ;;
2733       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2734     esac
2735     shift
2736   done
2737 fi
2738
2739 if test "$GCC" = "yes"; then
2740   set x $LDFLAGS; shift; LDFLAGS=""
2741   while test -n "$1"; do
2742     case $1 in
2743       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2744       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2745       -Xlinker* ) ;;
2746       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2747     esac
2748     shift
2749   done
2750 fi
2751
2752 if test "$GCC" = "yes"; then
2753   set x $ld_call_shared; shift; ld_call_shared=""
2754   while test -n "$1"; do
2755     case $1 in
2756       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2757       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2758       -Xlinker* ) ;;
2759       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2760     esac
2761     shift
2762   done
2763 fi
2764
2765 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2766    echo "    xemacs will be linked with \"$objects_machine\""
2767  fi
2768 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2769    echo "    xemacs will be linked with \"$objects_system\""
2770  fi
2771 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2772    echo "    xemacs will be linked with \"$unexec\""
2773  fi
2774
2775 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2776 echo "configure:2777: checking for dynodump" >&5
2777 if test "$unexec" != "unexsol2.o"; then
2778   echo "$ac_t""no" 1>&6
2779 else
2780   echo "$ac_t""yes" 1>&6
2781   { test "$extra_verbose" = "yes" && cat << \EOF
2782     Defining DYNODUMP
2783 EOF
2784 cat >> confdefs.h <<\EOF
2785 #define DYNODUMP 1
2786 EOF
2787 }
2788
2789   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2790   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2791   case "$machine" in
2792     sparc   ) dynodump_arch=sparc ;;
2793     *86*    ) dynodump_arch=i386  ;;
2794     powerpc ) dynodump_arch=ppc   ;;
2795   esac
2796     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
2797 fi
2798
2799
2800 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2801
2802 if test "$unexec" = "unexaix.o"; then
2803   if   test "$dynamic" = "no"; then
2804   start_flags="-Wl,-bnso,-bnodelcsect"
2805   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2806   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2807     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2808   done
2809   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2810     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2811   done
2812   
2813 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2814 echo "configure:2815: checking for terminateAndUnload in -lC" >&5
2815 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2816
2817 xe_check_libs=" -lC "
2818 cat > conftest.$ac_ext <<EOF
2819 #line 2820 "configure"
2820 #include "confdefs.h"
2821 /* Override any gcc2 internal prototype to avoid an error.  */
2822 /* We use char because int might match the return type of a gcc2
2823     builtin and then its argument prototype would still apply.  */
2824 char terminateAndUnload();
2825
2826 int main() {
2827 terminateAndUnload()
2828 ; return 0; }
2829 EOF
2830 if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2831   rm -rf conftest*
2832   eval "ac_cv_lib_$ac_lib_var=yes"
2833 else
2834   echo "configure: failed program was:" >&5
2835   cat conftest.$ac_ext >&5
2836   rm -rf conftest*
2837   eval "ac_cv_lib_$ac_lib_var=no"
2838 fi
2839 rm -f conftest*
2840 xe_check_libs=""
2841
2842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2843   echo "$ac_t""yes" 1>&6
2844   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2845 else
2846   echo "$ac_t""no" 1>&6
2847 fi
2848
2849
2850   fi
2851 elif test -n "$ld_text_start_addr"; then
2852   start_flags="-T $ld_text_start_addr -e __start"
2853 fi
2854
2855
2856
2857
2858 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2859  test -z "$linker" &&  linker='$(CC) -nostdlib'
2860  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2861 fi
2862 test "$GCC" != "yes" && lib_gcc=
2863
2864
2865
2866
2867
2868 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2869 if test -n "$site_libraries"; then
2870   for arg in $site_libraries; do
2871     case "$arg" in
2872      -* ) ;;
2873      * ) test -d "$arg" || \
2874            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2875        arg="-L${arg}" ;;
2876     esac
2877     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2878   done
2879 fi
2880
2881 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2882 if test -n "$site_includes"; then
2883   for arg in $site_includes; do
2884     case "$arg" in
2885       -* ) ;;
2886       * ) test -d "$arg" || \
2887            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2888       arg="-I${arg}" ;;
2889     esac
2890     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2891   done
2892 fi
2893
2894 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2895 if test -n "$site_prefixes"; then
2896   for dir in $site_prefixes; do
2897     lib_dir="${dir}/lib"
2898     inc_dir="${dir}/include"
2899     if test ! -d "$dir"; then
2900       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2901     elif test ! -d "$lib_dir"; then
2902       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2903     else
2904       if test -d "$inc_dir"; then
2905         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
2906       fi
2907       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
2908     fi
2909   done
2910 fi
2911
2912
2913 for dir in "/usr/ccs/lib"; do
2914   test -d "$dir" && ld_switch_system="$ld_switch_system -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_system"; fi
2915 done
2916
2917 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2918 if test -n "$site_runtime_libraries"; then
2919   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2920   export LD_RUN_PATH
2921 fi
2922
2923
2924
2925
2926
2927 if test -n "$add_runtime_path"; then :;
2928 elif test "$dynamic" = "no"; then add_runtime_path=no
2929 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2930 else case "$opsys" in
2931        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2932        * ) add_runtime_path=no ;;
2933      esac
2934 fi
2935
2936 if test "$add_runtime_path" = "yes"; then
2937       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2938 echo "configure:2939: checking "for runtime libraries flag"" >&5
2939   case "$opsys" in
2940     sol2 ) dash_r="-R" ;;
2941     decosf* | linux* | irix*) dash_r="-rpath " ;;
2942     *)
2943       dash_r=""
2944       for try_dash_r in "-R" "-R " "-rpath "; do
2945         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2946         
2947 if test "$GCC" = "yes"; then
2948   set x $xe_check_libs; shift; xe_check_libs=""
2949   while test -n "$1"; do
2950     case $1 in
2951       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2952       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2953       -Xlinker* ) ;;
2954       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2955     esac
2956     shift
2957   done
2958 fi
2959         cat > conftest.$ac_ext <<EOF
2960 #line 2961 "configure"
2961 #include "confdefs.h"
2962
2963 int main() {
2964
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2968   rm -rf conftest*
2969   dash_r="$try_dash_r"
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973 fi
2974 rm -f conftest*
2975         xe_check_libs=""
2976         test -n "$dash_r" && break
2977       done ;;
2978   esac
2979   if test -n "$dash_r";
2980     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2981     else echo "$ac_t""NONE" 1>&6
2982   fi
2983 fi
2984
2985 xe_add_unique_runpath_dir='
2986   xe_add_p=yes
2987   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2988   done
2989   if test "$xe_add_p" = "yes"; then
2990     test -n "$runpath" && runpath="${runpath}:"
2991     runpath="${runpath}${xe_runpath_dir}"
2992     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2993   fi'
2994
2995
2996
2997
2998 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2999     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3000   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
3001   
3002         runpath="" runpath_dirs=""
3003   if test -n "$LD_RUN_PATH"; then
3004     runpath="$LD_RUN_PATH"
3005   elif test "$GCC" = "yes"; then
3006         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
3007     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
3008     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
3009     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
3010       case "$arg" in P,* | -L* | -R* )
3011         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
3012           {
3013 xe_runpath_dir="$dir"
3014   test "$xe_runpath_dir" != "/lib"     -a \
3015         "$xe_runpath_dir" != "/usr/lib" -a \
3016         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3017   eval "$xe_add_unique_runpath_dir"
3018 }
3019         done ;;
3020       esac
3021     done
3022     ld_switch_run="$ld_switch_run_save"
3023     rm -f conftest*
3024   else
3025         for arg in $ld_switch_site $ld_switch_x_site; do
3026       case "$arg" in -L*) {
3027 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
3028   test "$xe_runpath_dir" != "/lib"     -a \
3029         "$xe_runpath_dir" != "/usr/lib" -a \
3030         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
3031   eval "$xe_add_unique_runpath_dir"
3032 };; esac
3033     done
3034         if test "$opsys $need_motif" = "sol2 yes"; then
3035       xe_runpath_dir="/opt/SUNWdt/lib";
3036       eval "$xe_add_unique_runpath_dir";
3037     fi
3038   fi 
3039   if test -n "$runpath"; then
3040     ld_switch_run="${dash_r}${runpath}"
3041     
3042 if test "$GCC" = "yes"; then
3043   set x $ld_switch_run; shift; ld_switch_run=""
3044   while test -n "$1"; do
3045     case $1 in
3046       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
3047       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
3048       -Xlinker* ) ;;
3049       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
3050     esac
3051     shift
3052   done
3053 fi
3054     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
3055   fi
3056 fi
3057
3058
3059
3060
3061 GNU_MALLOC=yes
3062 if test "$with_dlmalloc" != "no"; then
3063         doug_lea_malloc=yes
3064 else
3065         doug_lea_malloc=no
3066 fi
3067 after_morecore_hook_exists=yes
3068 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
3069 echo "configure:3070: checking for malloc_get_state" >&5
3070
3071 cat > conftest.$ac_ext <<EOF
3072 #line 3073 "configure"
3073 #include "confdefs.h"
3074 /* System header to define __stub macros and hopefully few prototypes,
3075     which can conflict with char malloc_get_state(); below.  */
3076 #include <assert.h>
3077 /* Override any gcc2 internal prototype to avoid an error.  */
3078 /* We use char because int might match the return type of a gcc2
3079     builtin and then its argument prototype would still apply.  */
3080 char malloc_get_state();
3081
3082 int main() {
3083
3084 /* The GNU C library defines this for functions which it implements
3085     to always fail with ENOSYS.  Some functions are actually named
3086     something starting with __ and the normal name is an alias.  */
3087 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
3088 choke me
3089 #else
3090 malloc_get_state();
3091 #endif
3092
3093 ; return 0; }
3094 EOF
3095 if { (eval echo configure:3096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3096   rm -rf conftest*
3097   eval "ac_cv_func_malloc_get_state=yes"
3098 else
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101   rm -rf conftest*
3102   eval "ac_cv_func_malloc_get_state=no"
3103 fi
3104 rm -f conftest*
3105
3106 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
3107   echo "$ac_t""yes" 1>&6
3108   :
3109 else
3110   echo "$ac_t""no" 1>&6
3111 doug_lea_malloc=no
3112 fi
3113
3114 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
3115 echo "configure:3116: checking for malloc_set_state" >&5
3116
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 /* System header to define __stub macros and hopefully few prototypes,
3121     which can conflict with char malloc_set_state(); below.  */
3122 #include <assert.h>
3123 /* Override any gcc2 internal prototype to avoid an error.  */
3124 /* We use char because int might match the return type of a gcc2
3125     builtin and then its argument prototype would still apply.  */
3126 char malloc_set_state();
3127
3128 int main() {
3129
3130 /* The GNU C library defines this for functions which it implements
3131     to always fail with ENOSYS.  Some functions are actually named
3132     something starting with __ and the normal name is an alias.  */
3133 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
3134 choke me
3135 #else
3136 malloc_set_state();
3137 #endif
3138
3139 ; return 0; }
3140 EOF
3141 if { (eval echo configure:3142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3142   rm -rf conftest*
3143   eval "ac_cv_func_malloc_set_state=yes"
3144 else
3145   echo "configure: failed program was:" >&5
3146   cat conftest.$ac_ext >&5
3147   rm -rf conftest*
3148   eval "ac_cv_func_malloc_set_state=no"
3149 fi
3150 rm -f conftest*
3151
3152 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
3153   echo "$ac_t""yes" 1>&6
3154   :
3155 else
3156   echo "$ac_t""no" 1>&6
3157 doug_lea_malloc=no
3158 fi
3159
3160 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
3161 echo "configure:3162: checking whether __after_morecore_hook exists" >&5
3162 cat > conftest.$ac_ext <<EOF
3163 #line 3164 "configure"
3164 #include "confdefs.h"
3165 extern void (* __after_morecore_hook)();
3166 int main() {
3167 __after_morecore_hook = 0
3168 ; return 0; }
3169 EOF
3170 if { (eval echo configure:3171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3171   rm -rf conftest*
3172   echo "$ac_t""yes" 1>&6
3173 else
3174   echo "configure: failed program was:" >&5
3175   cat conftest.$ac_ext >&5
3176   rm -rf conftest*
3177   echo "$ac_t""no" 1>&6
3178    after_morecore_hook_exists=no
3179 fi
3180 rm -f conftest*
3181 if test "$system_malloc" = "yes" ; then
3182   GNU_MALLOC=no
3183   GNU_MALLOC_reason="
3184   (The GNU allocators don't work with this system configuration)."
3185 elif test "$with_system_malloc" = "yes" ; then
3186   GNU_MALLOC=no
3187   GNU_MALLOC_reason="
3188   (User chose not to use GNU allocators)."
3189 elif test "$with_debug_malloc" = "yes" ; then
3190   GNU_MALLOC=no
3191   GNU_MALLOC_reason="
3192   (User chose to use Debugging Malloc)."
3193 fi
3194
3195 if test "$doug_lea_malloc" = "yes" ; then
3196   if test "$GNU_MALLOC" = yes ; then
3197     GNU_MALLOC_reason="
3198   (Using Doug Lea's new malloc from the GNU C Library.)"
3199   fi
3200   { test "$extra_verbose" = "yes" && cat << \EOF
3201     Defining DOUG_LEA_MALLOC
3202 EOF
3203 cat >> confdefs.h <<\EOF
3204 #define DOUG_LEA_MALLOC 1
3205 EOF
3206 }
3207
3208   if test "$after_morecore_hook_exists" = "no" ; then
3209     GNU_MALLOC_reason="
3210   (Using Doug Lea's new malloc from the Linux C Library.)"
3211     { test "$extra_verbose" = "yes" && cat << \EOF
3212     Defining _NO_MALLOC_WARNING_
3213 EOF
3214 cat >> confdefs.h <<\EOF
3215 #define _NO_MALLOC_WARNING_ 1
3216 EOF
3217 }
3218
3219   fi
3220   use_minimal_tagbits=yes
3221 fi
3222
3223
3224
3225
3226 # Extract the first word of "ranlib", so it can be a program name with args.
3227 set dummy ranlib; ac_word=$2
3228 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3229 echo "configure:3230: checking for $ac_word" >&5
3230
3231 if test -n "$RANLIB"; then
3232   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3233 else
3234   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3235   ac_dummy="$PATH"
3236   for ac_dir in $ac_dummy; do
3237     test -z "$ac_dir" && ac_dir=.
3238     if test -f $ac_dir/$ac_word; then
3239       ac_cv_prog_RANLIB="ranlib"
3240       break
3241     fi
3242   done
3243   IFS="$ac_save_ifs"
3244   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
3245 fi
3246 RANLIB="$ac_cv_prog_RANLIB"
3247 if test -n "$RANLIB"; then
3248   echo "$ac_t""$RANLIB" 1>&6
3249 else
3250   echo "$ac_t""no" 1>&6
3251 fi
3252
3253 ac_aux_dir=
3254 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3255   if test -f $ac_dir/install-sh; then
3256     ac_aux_dir=$ac_dir
3257     ac_install_sh="$ac_aux_dir/install-sh -c"
3258     break
3259   elif test -f $ac_dir/install.sh; then
3260     ac_aux_dir=$ac_dir
3261     ac_install_sh="$ac_aux_dir/install.sh -c"
3262     break
3263   fi
3264 done
3265 if test -z "$ac_aux_dir"; then
3266   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
3267 fi
3268 ac_config_guess=$ac_aux_dir/config.guess
3269 ac_config_sub=$ac_aux_dir/config.sub
3270 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
3271
3272 # Find a good install program.  We prefer a C program (faster),
3273 # so one script is as good as another.  But avoid the broken or
3274 # incompatible versions:
3275 # SysV /etc/install, /usr/sbin/install
3276 # SunOS /usr/etc/install
3277 # IRIX /sbin/install
3278 # AIX /bin/install
3279 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3280 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3281 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3282 # ./install, which can be erroneously created by make from ./install.sh.
3283 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
3284 echo "configure:3285: checking for a BSD compatible install" >&5
3285 if test -z "$INSTALL"; then
3286
3287   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS=":"
3288   for ac_dir in $PATH; do
3289     # Account for people who put trailing slashes in PATH elements.
3290     case "$ac_dir/" in
3291     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
3292     *)
3293       # OSF1 and SCO ODT 3.0 have their own names for install.
3294       # Don't use installbsd from OSF since it installs stuff as root
3295       # by default.
3296       for ac_prog in ginstall scoinst install; do
3297         if test -f $ac_dir/$ac_prog; then
3298           if test $ac_prog = install &&
3299             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
3300             # AIX install.  It has an incompatible calling convention.
3301             :
3302           else
3303             ac_cv_path_install="$ac_dir/$ac_prog -c"
3304             break 2
3305           fi
3306         fi
3307       done
3308       ;;
3309     esac
3310   done
3311   IFS="$ac_save_IFS"
3312
3313   if test "${ac_cv_path_install+set}" = set; then
3314     INSTALL="$ac_cv_path_install"
3315   else
3316     # As a last resort, use the slow shell script.  We don't cache a
3317     # path for INSTALL within a source directory, because that will
3318     # break other packages using the cache if that directory is
3319     # removed, or if the path is relative.
3320     INSTALL="$ac_install_sh"
3321   fi
3322 fi
3323 echo "$ac_t""$INSTALL" 1>&6
3324
3325 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3326 # It thinks the first close brace ends the variable substitution.
3327 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3328
3329 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
3330
3331 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3332
3333 for ac_prog in 'bison -y' byacc
3334 do
3335 # Extract the first word of "$ac_prog", so it can be a program name with args.
3336 set dummy $ac_prog; ac_word=$2
3337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3338 echo "configure:3339: checking for $ac_word" >&5
3339
3340 if test -n "$YACC"; then
3341   ac_cv_prog_YACC="$YACC" # Let the user override the test.
3342 else
3343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3344   ac_dummy="$PATH"
3345   for ac_dir in $ac_dummy; do
3346     test -z "$ac_dir" && ac_dir=.
3347     if test -f $ac_dir/$ac_word; then
3348       ac_cv_prog_YACC="$ac_prog"
3349       break
3350     fi
3351   done
3352   IFS="$ac_save_ifs"
3353 fi
3354 YACC="$ac_cv_prog_YACC"
3355 if test -n "$YACC"; then
3356   echo "$ac_t""$YACC" 1>&6
3357 else
3358   echo "$ac_t""no" 1>&6
3359 fi
3360
3361 test -n "$YACC" && break
3362 done
3363 test -n "$YACC" || YACC="yacc"
3364
3365
3366 for ac_hdr in   a.out.h   cygwin/version.h   fcntl.h   inttypes.h   libgen.h   locale.h   mach/mach.h   sys/param.h   sys/pstat.h   sys/stropts.h   sys/time.h   sys/timeb.h   sys/un.h   kstat.h   ulimit.h   unistd.h   utime.h 
3367 do
3368 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3369 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $ac_hdr" >&5
3371
3372 cat > conftest.$ac_ext <<EOF
3373 #line 3374 "configure"
3374 #include "confdefs.h"
3375 #include <$ac_hdr>
3376 EOF
3377 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3378 { (eval echo configure:3379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3379 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3380 if test -z "$ac_err"; then
3381   rm -rf conftest*
3382   eval "ac_cv_header_$ac_safe=yes"
3383 else
3384   echo "$ac_err" >&5
3385   echo "configure: failed program was:" >&5
3386   cat conftest.$ac_ext >&5
3387   rm -rf conftest*
3388   eval "ac_cv_header_$ac_safe=no"
3389 fi
3390 rm -f conftest*
3391 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3392   echo "$ac_t""yes" 1>&6
3393     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3394   { test "$extra_verbose" = "yes" && cat << EOF
3395     Defining $ac_tr_hdr
3396 EOF
3397 cat >> confdefs.h <<EOF
3398 #define $ac_tr_hdr 1
3399 EOF
3400 }
3401  
3402 else
3403   echo "$ac_t""no" 1>&6
3404 fi
3405 done
3406
3407 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3408 echo "configure:3409: checking for sys/wait.h that is POSIX.1 compatible" >&5
3409
3410 cat > conftest.$ac_ext <<EOF
3411 #line 3412 "configure"
3412 #include "confdefs.h"
3413 #include <sys/types.h>
3414 #include <sys/wait.h>
3415 #ifndef WEXITSTATUS
3416 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3417 #endif
3418 #ifndef WIFEXITED
3419 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3420 #endif
3421 int main() {
3422 int s;
3423 wait (&s);
3424 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3425 ; return 0; }
3426 EOF
3427 if { (eval echo configure:3428: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3428   rm -rf conftest*
3429   ac_cv_header_sys_wait_h=yes
3430 else
3431   echo "configure: failed program was:" >&5
3432   cat conftest.$ac_ext >&5
3433   rm -rf conftest*
3434   ac_cv_header_sys_wait_h=no
3435 fi
3436 rm -f conftest*
3437
3438 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3439 if test $ac_cv_header_sys_wait_h = yes; then
3440   { test "$extra_verbose" = "yes" && cat << \EOF
3441     Defining HAVE_SYS_WAIT_H
3442 EOF
3443 cat >> confdefs.h <<\EOF
3444 #define HAVE_SYS_WAIT_H 1
3445 EOF
3446 }
3447
3448 fi
3449
3450 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3451 echo "configure:3452: checking for ANSI C header files" >&5
3452
3453 cat > conftest.$ac_ext <<EOF
3454 #line 3455 "configure"
3455 #include "confdefs.h"
3456 #include <stdlib.h>
3457 #include <stdarg.h>
3458 #include <string.h>
3459 #include <float.h>
3460 EOF
3461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3462 { (eval echo configure:3463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3464 if test -z "$ac_err"; then
3465   rm -rf conftest*
3466   ac_cv_header_stdc=yes
3467 else
3468   echo "$ac_err" >&5
3469   echo "configure: failed program was:" >&5
3470   cat conftest.$ac_ext >&5
3471   rm -rf conftest*
3472   ac_cv_header_stdc=no
3473 fi
3474 rm -f conftest*
3475
3476 if test $ac_cv_header_stdc = yes; then
3477   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3478 cat > conftest.$ac_ext <<EOF
3479 #line 3480 "configure"
3480 #include "confdefs.h"
3481 #include <string.h>
3482 EOF
3483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3484   egrep "memchr" >/dev/null 2>&1; then
3485   :
3486 else
3487   rm -rf conftest*
3488   ac_cv_header_stdc=no
3489 fi
3490 rm -f conftest*
3491
3492 fi
3493
3494 if test $ac_cv_header_stdc = yes; then
3495   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3496 cat > conftest.$ac_ext <<EOF
3497 #line 3498 "configure"
3498 #include "confdefs.h"
3499 #include <stdlib.h>
3500 EOF
3501 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3502   egrep "free" >/dev/null 2>&1; then
3503   :
3504 else
3505   rm -rf conftest*
3506   ac_cv_header_stdc=no
3507 fi
3508 rm -f conftest*
3509
3510 fi
3511
3512 if test $ac_cv_header_stdc = yes; then
3513   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3514 cat > conftest.$ac_ext <<EOF
3515 #line 3516 "configure"
3516 #include "confdefs.h"
3517 #include <ctype.h>
3518 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3519 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3520 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3521 int main () { int i; for (i = 0; i < 256; i++)
3522 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3523 exit (0); }
3524
3525 EOF
3526 if { (eval echo configure:3527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3527 then
3528   :
3529 else
3530   conftest_rc="$?"
3531   echo "configure: failed program was:" >&5
3532   cat conftest.$ac_ext >&5
3533   rm -fr conftest*
3534   ac_cv_header_stdc=no
3535 fi
3536 rm -fr conftest*
3537 fi
3538
3539 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3540 if test $ac_cv_header_stdc = yes; then
3541   { test "$extra_verbose" = "yes" && cat << \EOF
3542     Defining STDC_HEADERS
3543 EOF
3544 cat >> confdefs.h <<\EOF
3545 #define STDC_HEADERS 1
3546 EOF
3547 }
3548
3549 fi
3550
3551 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3552 echo "configure:3553: checking whether time.h and sys/time.h may both be included" >&5
3553
3554 cat > conftest.$ac_ext <<EOF
3555 #line 3556 "configure"
3556 #include "confdefs.h"
3557 #include <sys/types.h>
3558 #include <sys/time.h>
3559 #include <time.h>
3560 int main() {
3561 struct tm *tp;
3562 ; return 0; }
3563 EOF
3564 if { (eval echo configure:3565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565   rm -rf conftest*
3566   ac_cv_header_time=yes
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   ac_cv_header_time=no
3572 fi
3573 rm -f conftest*
3574
3575 echo "$ac_t""$ac_cv_header_time" 1>&6
3576 if test $ac_cv_header_time = yes; then
3577   { test "$extra_verbose" = "yes" && cat << \EOF
3578     Defining TIME_WITH_SYS_TIME
3579 EOF
3580 cat >> confdefs.h <<\EOF
3581 #define TIME_WITH_SYS_TIME 1
3582 EOF
3583 }
3584
3585 fi
3586
3587 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3588 echo "configure:3589: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3589
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3593 #include <sys/types.h>
3594 #include <signal.h>
3595 /* NetBSD declares sys_siglist in unistd.h.  */
3596 #ifdef HAVE_UNISTD_H
3597 #include <unistd.h>
3598 #endif
3599 int main() {
3600 char *msg = *(sys_siglist + 1);
3601 ; return 0; }
3602 EOF
3603 if { (eval echo configure:3604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3604   rm -rf conftest*
3605   ac_cv_decl_sys_siglist=yes
3606 else
3607   echo "configure: failed program was:" >&5
3608   cat conftest.$ac_ext >&5
3609   rm -rf conftest*
3610   ac_cv_decl_sys_siglist=no
3611 fi
3612 rm -f conftest*
3613
3614 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3615 if test $ac_cv_decl_sys_siglist = yes; then
3616   { test "$extra_verbose" = "yes" && cat << \EOF
3617     Defining SYS_SIGLIST_DECLARED
3618 EOF
3619 cat >> confdefs.h <<\EOF
3620 #define SYS_SIGLIST_DECLARED 1
3621 EOF
3622 }
3623
3624 fi
3625
3626
3627 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3628 echo "configure:3629: checking for struct utimbuf" >&5
3629 cat > conftest.$ac_ext <<EOF
3630 #line 3631 "configure"
3631 #include "confdefs.h"
3632 #ifdef TIME_WITH_SYS_TIME
3633 #include <sys/time.h>
3634 #include <time.h>
3635 #else
3636 #ifdef HAVE_SYS_TIME_H
3637 #include <sys/time.h>
3638 #else
3639 #include <time.h>
3640 #endif
3641 #endif
3642 #ifdef HAVE_UTIME_H
3643 #include <utime.h>
3644 #endif
3645 int main() {
3646 static struct utimbuf x; x.actime = x.modtime;
3647 ; return 0; }
3648 EOF
3649 if { (eval echo configure:3650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3650   rm -rf conftest*
3651   echo "$ac_t""yes" 1>&6
3652    { test "$extra_verbose" = "yes" && cat << \EOF
3653     Defining HAVE_STRUCT_UTIMBUF
3654 EOF
3655 cat >> confdefs.h <<\EOF
3656 #define HAVE_STRUCT_UTIMBUF 1
3657 EOF
3658 }
3659
3660 else
3661   echo "configure: failed program was:" >&5
3662   cat conftest.$ac_ext >&5
3663   rm -rf conftest*
3664   echo "$ac_t""no" 1>&6
3665 fi
3666 rm -f conftest*
3667
3668 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3669 echo "configure:3670: checking return type of signal handlers" >&5
3670
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 #include <sys/types.h>
3675 #include <signal.h>
3676 #ifdef signal
3677 #undef signal
3678 #endif
3679 #ifdef __cplusplus
3680 extern "C" void (*signal (int, void (*)(int)))(int);
3681 #else
3682 void (*signal ()) ();
3683 #endif
3684
3685 int main() {
3686 int i;
3687 ; return 0; }
3688 EOF
3689 if { (eval echo configure:3690: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3690   rm -rf conftest*
3691   ac_cv_type_signal=void
3692 else
3693   echo "configure: failed program was:" >&5
3694   cat conftest.$ac_ext >&5
3695   rm -rf conftest*
3696   ac_cv_type_signal=int
3697 fi
3698 rm -f conftest*
3699
3700 echo "$ac_t""$ac_cv_type_signal" 1>&6
3701 { test "$extra_verbose" = "yes" && cat << EOF
3702     Defining RETSIGTYPE = $ac_cv_type_signal
3703 EOF
3704 cat >> confdefs.h <<EOF
3705 #define RETSIGTYPE $ac_cv_type_signal
3706 EOF
3707 }
3708
3709
3710 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3711 echo "configure:3712: checking for size_t" >&5
3712
3713 cat > conftest.$ac_ext <<EOF
3714 #line 3715 "configure"
3715 #include "confdefs.h"
3716 #include <sys/types.h>
3717 #if STDC_HEADERS
3718 #include <stdlib.h>
3719 #include <stddef.h>
3720 #endif
3721 EOF
3722 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3723   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3724   rm -rf conftest*
3725   ac_cv_type_size_t=yes
3726 else
3727   rm -rf conftest*
3728   ac_cv_type_size_t=no
3729 fi
3730 rm -f conftest*
3731
3732 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3733 if test $ac_cv_type_size_t = no; then
3734   { test "$extra_verbose" = "yes" && cat << \EOF
3735     Defining size_t = unsigned
3736 EOF
3737 cat >> confdefs.h <<\EOF
3738 #define size_t unsigned
3739 EOF
3740 }
3741
3742 fi
3743
3744 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3745 echo "configure:3746: checking for pid_t" >&5
3746
3747 cat > conftest.$ac_ext <<EOF
3748 #line 3749 "configure"
3749 #include "confdefs.h"
3750 #include <sys/types.h>
3751 #if STDC_HEADERS
3752 #include <stdlib.h>
3753 #include <stddef.h>
3754 #endif
3755 EOF
3756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3757   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3758   rm -rf conftest*
3759   ac_cv_type_pid_t=yes
3760 else
3761   rm -rf conftest*
3762   ac_cv_type_pid_t=no
3763 fi
3764 rm -f conftest*
3765
3766 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3767 if test $ac_cv_type_pid_t = no; then
3768   { test "$extra_verbose" = "yes" && cat << \EOF
3769     Defining pid_t = int
3770 EOF
3771 cat >> confdefs.h <<\EOF
3772 #define pid_t int
3773 EOF
3774 }
3775
3776 fi
3777
3778 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3779 echo "configure:3780: checking for uid_t in sys/types.h" >&5
3780
3781 cat > conftest.$ac_ext <<EOF
3782 #line 3783 "configure"
3783 #include "confdefs.h"
3784 #include <sys/types.h>
3785 EOF
3786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3787   egrep "uid_t" >/dev/null 2>&1; then
3788   rm -rf conftest*
3789   ac_cv_type_uid_t=yes
3790 else
3791   rm -rf conftest*
3792   ac_cv_type_uid_t=no
3793 fi
3794 rm -f conftest*
3795
3796
3797 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3798 if test $ac_cv_type_uid_t = no; then
3799   { test "$extra_verbose" = "yes" && cat << \EOF
3800     Defining uid_t = int
3801 EOF
3802 cat >> confdefs.h <<\EOF
3803 #define uid_t int
3804 EOF
3805 }
3806
3807   { test "$extra_verbose" = "yes" && cat << \EOF
3808     Defining gid_t = int
3809 EOF
3810 cat >> confdefs.h <<\EOF
3811 #define gid_t int
3812 EOF
3813 }
3814
3815 fi
3816
3817 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3818 echo "configure:3819: checking for mode_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])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3831   rm -rf conftest*
3832   ac_cv_type_mode_t=yes
3833 else
3834   rm -rf conftest*
3835   ac_cv_type_mode_t=no
3836 fi
3837 rm -f conftest*
3838
3839 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3840 if test $ac_cv_type_mode_t = no; then
3841   { test "$extra_verbose" = "yes" && cat << \EOF
3842     Defining mode_t = int
3843 EOF
3844 cat >> confdefs.h <<\EOF
3845 #define mode_t int
3846 EOF
3847 }
3848
3849 fi
3850
3851 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3852 echo "configure:3853: checking for off_t" >&5
3853
3854 cat > conftest.$ac_ext <<EOF
3855 #line 3856 "configure"
3856 #include "confdefs.h"
3857 #include <sys/types.h>
3858 #if STDC_HEADERS
3859 #include <stdlib.h>
3860 #include <stddef.h>
3861 #endif
3862 EOF
3863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3864   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3865   rm -rf conftest*
3866   ac_cv_type_off_t=yes
3867 else
3868   rm -rf conftest*
3869   ac_cv_type_off_t=no
3870 fi
3871 rm -f conftest*
3872
3873 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3874 if test $ac_cv_type_off_t = no; then
3875   { test "$extra_verbose" = "yes" && cat << \EOF
3876     Defining off_t = long
3877 EOF
3878 cat >> confdefs.h <<\EOF
3879 #define off_t long
3880 EOF
3881 }
3882
3883 fi
3884
3885 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
3886 echo "configure:3887: checking for ssize_t" >&5
3887
3888 cat > conftest.$ac_ext <<EOF
3889 #line 3890 "configure"
3890 #include "confdefs.h"
3891 #include <sys/types.h>
3892 #if STDC_HEADERS
3893 #include <stdlib.h>
3894 #include <stddef.h>
3895 #endif
3896 EOF
3897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3898   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3899   rm -rf conftest*
3900   ac_cv_type_ssize_t=yes
3901 else
3902   rm -rf conftest*
3903   ac_cv_type_ssize_t=no
3904 fi
3905 rm -f conftest*
3906
3907 echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
3908 if test $ac_cv_type_ssize_t = no; then
3909   { test "$extra_verbose" = "yes" && cat << \EOF
3910     Defining ssize_t = int
3911 EOF
3912 cat >> confdefs.h <<\EOF
3913 #define ssize_t int
3914 EOF
3915 }
3916
3917 fi
3918
3919
3920 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3921 echo "configure:3922: checking for struct timeval" >&5
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 #ifdef TIME_WITH_SYS_TIME
3926 #include <sys/time.h>
3927 #include <time.h>
3928 #else
3929 #ifdef HAVE_SYS_TIME_H
3930 #include <sys/time.h>
3931 #else
3932 #include <time.h>
3933 #endif
3934 #endif
3935 int main() {
3936 static struct timeval x; x.tv_sec = x.tv_usec;
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   echo "$ac_t""yes" 1>&6
3942   HAVE_TIMEVAL=yes
3943   { test "$extra_verbose" = "yes" && cat << \EOF
3944     Defining HAVE_TIMEVAL
3945 EOF
3946 cat >> confdefs.h <<\EOF
3947 #define HAVE_TIMEVAL 1
3948 EOF
3949 }
3950
3951 else
3952   echo "configure: failed program was:" >&5
3953   cat conftest.$ac_ext >&5
3954   rm -rf conftest*
3955   echo "$ac_t""no" 1>&6
3956    HAVE_TIMEVAL=no
3957 fi
3958 rm -f conftest*
3959
3960 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3961 echo "configure:3962: checking whether struct tm is in sys/time.h or time.h" >&5
3962
3963 cat > conftest.$ac_ext <<EOF
3964 #line 3965 "configure"
3965 #include "confdefs.h"
3966 #include <sys/types.h>
3967 #include <time.h>
3968 int main() {
3969 struct tm *tp; tp->tm_sec;
3970 ; return 0; }
3971 EOF
3972 if { (eval echo configure:3973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3973   rm -rf conftest*
3974   ac_cv_struct_tm=time.h
3975 else
3976   echo "configure: failed program was:" >&5
3977   cat conftest.$ac_ext >&5
3978   rm -rf conftest*
3979   ac_cv_struct_tm=sys/time.h
3980 fi
3981 rm -f conftest*
3982
3983 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3984 if test $ac_cv_struct_tm = sys/time.h; then
3985   { test "$extra_verbose" = "yes" && cat << \EOF
3986     Defining TM_IN_SYS_TIME
3987 EOF
3988 cat >> confdefs.h <<\EOF
3989 #define TM_IN_SYS_TIME 1
3990 EOF
3991 }
3992
3993 fi
3994
3995 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3996 echo "configure:3997: checking for tm_zone in struct tm" >&5
3997
3998 cat > conftest.$ac_ext <<EOF
3999 #line 4000 "configure"
4000 #include "confdefs.h"
4001 #include <sys/types.h>
4002 #include <$ac_cv_struct_tm>
4003 int main() {
4004 struct tm tm; tm.tm_zone;
4005 ; return 0; }
4006 EOF
4007 if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4008   rm -rf conftest*
4009   ac_cv_struct_tm_zone=yes
4010 else
4011   echo "configure: failed program was:" >&5
4012   cat conftest.$ac_ext >&5
4013   rm -rf conftest*
4014   ac_cv_struct_tm_zone=no
4015 fi
4016 rm -f conftest*
4017
4018 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
4019 if test "$ac_cv_struct_tm_zone" = yes; then
4020   { test "$extra_verbose" = "yes" && cat << \EOF
4021     Defining HAVE_TM_ZONE
4022 EOF
4023 cat >> confdefs.h <<\EOF
4024 #define HAVE_TM_ZONE 1
4025 EOF
4026 }
4027
4028 else
4029   echo $ac_n "checking for tzname""... $ac_c" 1>&6
4030 echo "configure:4031: checking for tzname" >&5
4031
4032 cat > conftest.$ac_ext <<EOF
4033 #line 4034 "configure"
4034 #include "confdefs.h"
4035 #include <time.h>
4036 #ifndef tzname /* For SGI.  */
4037 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
4038 #endif
4039 int main() {
4040 atoi(*tzname);
4041 ; return 0; }
4042 EOF
4043 if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4044   rm -rf conftest*
4045   ac_cv_var_tzname=yes
4046 else
4047   echo "configure: failed program was:" >&5
4048   cat conftest.$ac_ext >&5
4049   rm -rf conftest*
4050   ac_cv_var_tzname=no
4051 fi
4052 rm -f conftest*
4053
4054 echo "$ac_t""$ac_cv_var_tzname" 1>&6
4055   if test $ac_cv_var_tzname = yes; then
4056     { test "$extra_verbose" = "yes" && cat << \EOF
4057     Defining HAVE_TZNAME
4058 EOF
4059 cat >> confdefs.h <<\EOF
4060 #define HAVE_TZNAME 1
4061 EOF
4062 }
4063
4064   fi
4065 fi
4066
4067
4068 echo $ac_n "checking for working const""... $ac_c" 1>&6
4069 echo "configure:4070: checking for working const" >&5
4070
4071 cat > conftest.$ac_ext <<EOF
4072 #line 4073 "configure"
4073 #include "confdefs.h"
4074
4075 int main() {
4076
4077 /* Ultrix mips cc rejects this.  */
4078 typedef int charset[2]; const charset x;
4079 /* SunOS 4.1.1 cc rejects this.  */
4080 char const *const *ccp;
4081 char **p;
4082 /* NEC SVR4.0.2 mips cc rejects this.  */
4083 struct point {int x, y;};
4084 static struct point const zero = {0,0};
4085 /* AIX XL C 1.02.0.0 rejects this.
4086    It does not let you subtract one const X* pointer from another in an arm
4087    of an if-expression whose if-part is not a constant expression */
4088 const char *g = "string";
4089 ccp = &g + (g ? g-g : 0);
4090 /* HPUX 7.0 cc rejects these. */
4091 ++ccp;
4092 p = (char**) ccp;
4093 ccp = (char const *const *) p;
4094 { /* SCO 3.2v4 cc rejects this.  */
4095   char *t;
4096   char const *s = 0 ? (char *) 0 : (char const *) 0;
4097
4098   *t++ = 0;
4099 }
4100 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
4101   int x[] = {25, 17};
4102   const int *foo = &x[0];
4103   ++foo;
4104 }
4105 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4106   typedef const int *iptr;
4107   iptr p = 0;
4108   ++p;
4109 }
4110 { /* AIX XL C 1.02.0.0 rejects this saying
4111      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4112   struct s { int j; const int *ap[3]; };
4113   struct s *b; b->j = 5;
4114 }
4115 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4116   const int foo = 10;
4117 }
4118
4119 ; return 0; }
4120 EOF
4121 if { (eval echo configure:4122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4122   rm -rf conftest*
4123   ac_cv_c_const=yes
4124 else
4125   echo "configure: failed program was:" >&5
4126   cat conftest.$ac_ext >&5
4127   rm -rf conftest*
4128   ac_cv_c_const=no
4129 fi
4130 rm -f conftest*
4131
4132 echo "$ac_t""$ac_cv_c_const" 1>&6
4133 if test $ac_cv_c_const = no; then
4134   { test "$extra_verbose" = "yes" && cat << \EOF
4135     Defining const = 
4136 EOF
4137 cat >> confdefs.h <<\EOF
4138 #define const 
4139 EOF
4140 }
4141
4142 fi
4143
4144
4145 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
4146 echo "configure:4147: checking whether ${MAKE-make} sets \${MAKE}" >&5
4147 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
4148
4149 cat > conftestmake <<\EOF
4150 all:
4151         @echo 'ac_maketemp="${MAKE}"'
4152 EOF
4153 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4154 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
4155 if test -n "$ac_maketemp"; then
4156   eval ac_cv_prog_make_${ac_make}_set=yes
4157 else
4158   eval ac_cv_prog_make_${ac_make}_set=no
4159 fi
4160 rm -f conftestmake
4161 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4162   echo "$ac_t""yes" 1>&6
4163   SET_MAKE=
4164 else
4165   echo "$ac_t""no" 1>&6
4166   SET_MAKE="MAKE=${MAKE-make}"
4167 fi
4168
4169
4170 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
4171 echo "configure:4172: checking whether byte ordering is bigendian" >&5
4172
4173 ac_cv_c_bigendian=unknown
4174 # See if sys/param.h defines the BYTE_ORDER macro.
4175 cat > conftest.$ac_ext <<EOF
4176 #line 4177 "configure"
4177 #include "confdefs.h"
4178 #include <sys/types.h>
4179 #include <sys/param.h>
4180 int main() {
4181
4182 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
4183  bogus endian macros
4184 #endif
4185 ; return 0; }
4186 EOF
4187 if { (eval echo configure:4188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4188   rm -rf conftest*
4189   # It does; now see whether it defined to BIG_ENDIAN or not.
4190 cat > conftest.$ac_ext <<EOF
4191 #line 4192 "configure"
4192 #include "confdefs.h"
4193 #include <sys/types.h>
4194 #include <sys/param.h>
4195 int main() {
4196
4197 #if BYTE_ORDER != BIG_ENDIAN
4198  not big endian
4199 #endif
4200 ; return 0; }
4201 EOF
4202 if { (eval echo configure:4203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4203   rm -rf conftest*
4204   ac_cv_c_bigendian=yes
4205 else
4206   echo "configure: failed program was:" >&5
4207   cat conftest.$ac_ext >&5
4208   rm -rf conftest*
4209   ac_cv_c_bigendian=no
4210 fi
4211 rm -f conftest*
4212 else
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215 fi
4216 rm -f conftest*
4217 if test $ac_cv_c_bigendian = unknown; then
4218 cat > conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4220 #include "confdefs.h"
4221 main () {
4222   /* Are we little or big endian?  From Harbison&Steele.  */
4223   union
4224   {
4225     long l;
4226     char c[sizeof (long)];
4227   } u;
4228   u.l = 1;
4229   exit (u.c[sizeof (long) - 1] == 1);
4230 }
4231 EOF
4232 if { (eval echo configure:4233: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4233 then
4234   ac_cv_c_bigendian=no
4235 else
4236   conftest_rc="$?"
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -fr conftest*
4240   ac_cv_c_bigendian=yes
4241 fi
4242 rm -fr conftest*
4243 fi
4244
4245 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
4246 if test $ac_cv_c_bigendian = yes; then
4247   { test "$extra_verbose" = "yes" && cat << \EOF
4248     Defining WORDS_BIGENDIAN
4249 EOF
4250 cat >> confdefs.h <<\EOF
4251 #define WORDS_BIGENDIAN 1
4252 EOF
4253 }
4254
4255 fi
4256
4257
4258 echo $ac_n "checking size of short""... $ac_c" 1>&6
4259 echo "configure:4260: checking size of short" >&5
4260
4261 cat > conftest.$ac_ext <<EOF
4262 #line 4263 "configure"
4263 #include "confdefs.h"
4264 #include <stdio.h>
4265 main()
4266 {
4267   FILE *f=fopen("conftestval", "w");
4268   if (!f) exit(1);
4269   fprintf(f, "%d\n", sizeof(short));
4270   exit(0);
4271 }
4272 EOF
4273 if { (eval echo configure:4274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4274 then
4275   ac_cv_sizeof_short=`cat conftestval`
4276 else
4277   conftest_rc="$?"
4278   echo "configure: failed program was:" >&5
4279   cat conftest.$ac_ext >&5
4280   rm -fr conftest*
4281   ac_cv_sizeof_short=0
4282 fi
4283 rm -fr conftest*
4284 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
4285 { test "$extra_verbose" = "yes" && cat << EOF
4286     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
4287 EOF
4288 cat >> confdefs.h <<EOF
4289 #define SIZEOF_SHORT $ac_cv_sizeof_short
4290 EOF
4291 }
4292
4293
4294 if test "$ac_cv_sizeof_short" = 0; then
4295   echo ""
4296   echo "*** PANIC *** Configure tests are not working - compiler is broken."
4297   echo "*** PANIC *** Please examine config.log for compilation errors."
4298   exit 1
4299 fi
4300 echo $ac_n "checking size of int""... $ac_c" 1>&6
4301 echo "configure:4302: checking size of int" >&5
4302
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4306 #include <stdio.h>
4307 main()
4308 {
4309   FILE *f=fopen("conftestval", "w");
4310   if (!f) exit(1);
4311   fprintf(f, "%d\n", sizeof(int));
4312   exit(0);
4313 }
4314 EOF
4315 if { (eval echo configure:4316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4316 then
4317   ac_cv_sizeof_int=`cat conftestval`
4318 else
4319   conftest_rc="$?"
4320   echo "configure: failed program was:" >&5
4321   cat conftest.$ac_ext >&5
4322   rm -fr conftest*
4323   ac_cv_sizeof_int=0
4324 fi
4325 rm -fr conftest*
4326 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
4327 { test "$extra_verbose" = "yes" && cat << EOF
4328     Defining SIZEOF_INT = $ac_cv_sizeof_int
4329 EOF
4330 cat >> confdefs.h <<EOF
4331 #define SIZEOF_INT $ac_cv_sizeof_int
4332 EOF
4333 }
4334
4335
4336 echo $ac_n "checking size of long""... $ac_c" 1>&6
4337 echo "configure:4338: checking size of long" >&5
4338
4339 cat > conftest.$ac_ext <<EOF
4340 #line 4341 "configure"
4341 #include "confdefs.h"
4342 #include <stdio.h>
4343 main()
4344 {
4345   FILE *f=fopen("conftestval", "w");
4346   if (!f) exit(1);
4347   fprintf(f, "%d\n", sizeof(long));
4348   exit(0);
4349 }
4350 EOF
4351 if { (eval echo configure:4352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4352 then
4353   ac_cv_sizeof_long=`cat conftestval`
4354 else
4355   conftest_rc="$?"
4356   echo "configure: failed program was:" >&5
4357   cat conftest.$ac_ext >&5
4358   rm -fr conftest*
4359   ac_cv_sizeof_long=0
4360 fi
4361 rm -fr conftest*
4362 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
4363 { test "$extra_verbose" = "yes" && cat << EOF
4364     Defining SIZEOF_LONG = $ac_cv_sizeof_long
4365 EOF
4366 cat >> confdefs.h <<EOF
4367 #define SIZEOF_LONG $ac_cv_sizeof_long
4368 EOF
4369 }
4370
4371
4372 echo $ac_n "checking size of long long""... $ac_c" 1>&6
4373 echo "configure:4374: checking size of long long" >&5
4374
4375 cat > conftest.$ac_ext <<EOF
4376 #line 4377 "configure"
4377 #include "confdefs.h"
4378 #include <stdio.h>
4379 main()
4380 {
4381   FILE *f=fopen("conftestval", "w");
4382   if (!f) exit(1);
4383   fprintf(f, "%d\n", sizeof(long long));
4384   exit(0);
4385 }
4386 EOF
4387 if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4388 then
4389   ac_cv_sizeof_long_long=`cat conftestval`
4390 else
4391   conftest_rc="$?"
4392   echo "configure: failed program was:" >&5
4393   cat conftest.$ac_ext >&5
4394   rm -fr conftest*
4395   ac_cv_sizeof_long_long=0
4396 fi
4397 rm -fr conftest*
4398 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4399 { test "$extra_verbose" = "yes" && cat << EOF
4400     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4401 EOF
4402 cat >> confdefs.h <<EOF
4403 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4404 EOF
4405 }
4406
4407
4408 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4409 echo "configure:4410: checking size of void *" >&5
4410
4411 cat > conftest.$ac_ext <<EOF
4412 #line 4413 "configure"
4413 #include "confdefs.h"
4414 #include <stdio.h>
4415 main()
4416 {
4417   FILE *f=fopen("conftestval", "w");
4418   if (!f) exit(1);
4419   fprintf(f, "%d\n", sizeof(void *));
4420   exit(0);
4421 }
4422 EOF
4423 if { (eval echo configure:4424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4424 then
4425   ac_cv_sizeof_void_p=`cat conftestval`
4426 else
4427   conftest_rc="$?"
4428   echo "configure: failed program was:" >&5
4429   cat conftest.$ac_ext >&5
4430   rm -fr conftest*
4431   ac_cv_sizeof_void_p=0
4432 fi
4433 rm -fr conftest*
4434 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4435 { test "$extra_verbose" = "yes" && cat << EOF
4436     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4437 EOF
4438 cat >> confdefs.h <<EOF
4439 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4440 EOF
4441 }
4442
4443
4444
4445 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4446 echo "configure:4447: checking for long file names" >&5
4447
4448 ac_cv_sys_long_file_names=yes
4449 # Test for long file names in all the places we know might matter:
4450 #      .                the current directory, where building will happen
4451 #      $prefix/lib      where we will be installing things
4452 #      $exec_prefix/lib likewise
4453 # eval it to expand exec_prefix.
4454 #      $TMPDIR          if set, where it might want to write temporary files
4455 # if $TMPDIR is not set:
4456 #      /tmp             where it might want to write temporary files
4457 #      /var/tmp         likewise
4458 #      /usr/tmp         likewise
4459 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4460   ac_tmpdirs="$TMPDIR"
4461 else
4462   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4463 fi
4464 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4465   test -d $ac_dir || continue
4466   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4467   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4468   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4469   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4470   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4471     ac_cv_sys_long_file_names=no
4472     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4473     break
4474   fi
4475   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4476 done
4477
4478 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4479 if test $ac_cv_sys_long_file_names = yes; then
4480   { test "$extra_verbose" = "yes" && cat << \EOF
4481     Defining HAVE_LONG_FILE_NAMES
4482 EOF
4483 cat >> confdefs.h <<\EOF
4484 #define HAVE_LONG_FILE_NAMES 1
4485 EOF
4486 }
4487
4488 fi
4489
4490
4491 echo $ac_n "checking for sin""... $ac_c" 1>&6
4492 echo "configure:4493: checking for sin" >&5
4493
4494 cat > conftest.$ac_ext <<EOF
4495 #line 4496 "configure"
4496 #include "confdefs.h"
4497 /* System header to define __stub macros and hopefully few prototypes,
4498     which can conflict with char sin(); below.  */
4499 #include <assert.h>
4500 /* Override any gcc2 internal prototype to avoid an error.  */
4501 /* We use char because int might match the return type of a gcc2
4502     builtin and then its argument prototype would still apply.  */
4503 char sin();
4504
4505 int main() {
4506
4507 /* The GNU C library defines this for functions which it implements
4508     to always fail with ENOSYS.  Some functions are actually named
4509     something starting with __ and the normal name is an alias.  */
4510 #if defined (__stub_sin) || defined (__stub___sin)
4511 choke me
4512 #else
4513 sin();
4514 #endif
4515
4516 ; return 0; }
4517 EOF
4518 if { (eval echo configure:4519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4519   rm -rf conftest*
4520   eval "ac_cv_func_sin=yes"
4521 else
4522   echo "configure: failed program was:" >&5
4523   cat conftest.$ac_ext >&5
4524   rm -rf conftest*
4525   eval "ac_cv_func_sin=no"
4526 fi
4527 rm -f conftest*
4528
4529 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
4530   echo "$ac_t""yes" 1>&6
4531   :
4532 else
4533   echo "$ac_t""no" 1>&6
4534
4535 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4536 echo "configure:4537: checking for sin in -lm" >&5
4537 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4538
4539 xe_check_libs=" -lm "
4540 cat > conftest.$ac_ext <<EOF
4541 #line 4542 "configure"
4542 #include "confdefs.h"
4543 /* Override any gcc2 internal prototype to avoid an error.  */
4544 /* We use char because int might match the return type of a gcc2
4545     builtin and then its argument prototype would still apply.  */
4546 char sin();
4547
4548 int main() {
4549 sin()
4550 ; return 0; }
4551 EOF
4552 if { (eval echo configure:4553: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4553   rm -rf conftest*
4554   eval "ac_cv_lib_$ac_lib_var=yes"
4555 else
4556   echo "configure: failed program was:" >&5
4557   cat conftest.$ac_ext >&5
4558   rm -rf conftest*
4559   eval "ac_cv_lib_$ac_lib_var=no"
4560 fi
4561 rm -f conftest*
4562 xe_check_libs=""
4563
4564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4565   echo "$ac_t""yes" 1>&6
4566     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/^a-zA-Z0-9_/_/g' \
4567     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4568   { test "$extra_verbose" = "yes" && cat << EOF
4569     Defining $ac_tr_lib
4570 EOF
4571 cat >> confdefs.h <<EOF
4572 #define $ac_tr_lib 1
4573 EOF
4574 }
4575
4576   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4577
4578 else
4579   echo "$ac_t""no" 1>&6
4580 fi
4581
4582
4583 fi
4584
4585
4586 { test "$extra_verbose" = "yes" && cat << \EOF
4587     Defining LISP_FLOAT_TYPE
4588 EOF
4589 cat >> confdefs.h <<\EOF
4590 #define LISP_FLOAT_TYPE 1
4591 EOF
4592 }
4593
4594
4595 cat > conftest.$ac_ext <<EOF
4596 #line 4597 "configure"
4597 #include "confdefs.h"
4598 #include <math.h>
4599 int main() {
4600 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4601 ; return 0; }
4602 EOF
4603 if { (eval echo configure:4604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4604   rm -rf conftest*
4605   { test "$extra_verbose" = "yes" && cat << \EOF
4606     Defining HAVE_INVERSE_HYPERBOLIC
4607 EOF
4608 cat >> confdefs.h <<\EOF
4609 #define HAVE_INVERSE_HYPERBOLIC 1
4610 EOF
4611 }
4612
4613 else
4614   echo "configure: failed program was:" >&5
4615   cat conftest.$ac_ext >&5
4616 fi
4617 rm -f conftest*
4618
4619 echo "checking type of mail spool file locking" 1>&6
4620 echo "configure:4621: checking type of mail spool file locking" >&5
4621 for ac_func in lockf flock
4622 do
4623 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4624 echo "configure:4625: checking for $ac_func" >&5
4625
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 /* System header to define __stub macros and hopefully few prototypes,
4630     which can conflict with char $ac_func(); below.  */
4631 #include <assert.h>
4632 /* Override any gcc2 internal prototype to avoid an error.  */
4633 /* We use char because int might match the return type of a gcc2
4634     builtin and then its argument prototype would still apply.  */
4635 char $ac_func();
4636
4637 int main() {
4638
4639 /* The GNU C library defines this for functions which it implements
4640     to always fail with ENOSYS.  Some functions are actually named
4641     something starting with __ and the normal name is an alias.  */
4642 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4643 choke me
4644 #else
4645 $ac_func();
4646 #endif
4647
4648 ; return 0; }
4649 EOF
4650 if { (eval echo configure:4651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4651   rm -rf conftest*
4652   eval "ac_cv_func_$ac_func=yes"
4653 else
4654   echo "configure: failed program was:" >&5
4655   cat conftest.$ac_ext >&5
4656   rm -rf conftest*
4657   eval "ac_cv_func_$ac_func=no"
4658 fi
4659 rm -f conftest*
4660
4661 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4662   echo "$ac_t""yes" 1>&6
4663     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4664   { test "$extra_verbose" = "yes" && cat << EOF
4665     Defining $ac_tr_func
4666 EOF
4667 cat >> confdefs.h <<EOF
4668 #define $ac_tr_func 1
4669 EOF
4670 }
4671  
4672 else
4673   echo "$ac_t""no" 1>&6
4674 fi
4675 done
4676
4677 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4678 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4679 test -z "$mail_locking" -a "$mail_use_locking" = "yes" && mail_locking=locking
4680 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4681     Defining MAIL_LOCK_LOCKF
4682 EOF
4683 cat >> confdefs.h <<\EOF
4684 #define MAIL_LOCK_LOCKF 1
4685 EOF
4686 }
4687
4688 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4689     Defining MAIL_LOCK_FLOCK
4690 EOF
4691 cat >> confdefs.h <<\EOF
4692 #define MAIL_LOCK_FLOCK 1
4693 EOF
4694 }
4695
4696 elif test "$mail_locking" = "locking"; then { test "$extra_verbose" = "yes" && cat << \EOF
4697     Defining MAIL_LOCK_LOCKING
4698 EOF
4699 cat >> confdefs.h <<\EOF
4700 #define MAIL_LOCK_LOCKING 1
4701 EOF
4702 }
4703
4704 else mail_locking="dot-locking"; { test "$extra_verbose" = "yes" && cat << \EOF
4705     Defining MAIL_LOCK_DOT
4706 EOF
4707 cat >> confdefs.h <<\EOF
4708 #define MAIL_LOCK_DOT 1
4709 EOF
4710 }
4711
4712 fi
4713 test "$mail_locking" = "lockf" -a "$ac_cv_func_lockf" != "yes" && \
4714   { echo "Error:" "lockf mail locking requested but not available." >&2; exit 1; }
4715 test "$mail_locking" = "flock" -a "$ac_cv_func_flock" != "yes" && \
4716   { echo "Error:" "flock mail locking requested but not available." >&2; exit 1; }
4717 test "$mail_locking" = "locking" -a "$ac_cv_func_locking" != "yes" && \
4718   { echo "Error:" "locking mail locking requested but not available." >&2; exit 1; }
4719
4720 case "$opsys" in decosf*)
4721   
4722 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4723 echo "configure:4724: checking for cma_open in -lpthreads" >&5
4724 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4725
4726 xe_check_libs=" -lpthreads "
4727 cat > conftest.$ac_ext <<EOF
4728 #line 4729 "configure"
4729 #include "confdefs.h"
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 /* We use char because int might match the return type of a gcc2
4732     builtin and then its argument prototype would still apply.  */
4733 char cma_open();
4734
4735 int main() {
4736 cma_open()
4737 ; return 0; }
4738 EOF
4739 if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4740   rm -rf conftest*
4741   eval "ac_cv_lib_$ac_lib_var=yes"
4742 else
4743   echo "configure: failed program was:" >&5
4744   cat conftest.$ac_ext >&5
4745   rm -rf conftest*
4746   eval "ac_cv_lib_$ac_lib_var=no"
4747 fi
4748 rm -f conftest*
4749 xe_check_libs=""
4750
4751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4752   echo "$ac_t""yes" 1>&6
4753     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4754     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4755   { test "$extra_verbose" = "yes" && cat << EOF
4756     Defining $ac_tr_lib
4757 EOF
4758 cat >> confdefs.h <<EOF
4759 #define $ac_tr_lib 1
4760 EOF
4761 }
4762
4763   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4764
4765 else
4766   echo "$ac_t""no" 1>&6
4767 fi
4768
4769
4770   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4771     c_switch_site="$c_switch_site -threads" ;;
4772 esac
4773
4774 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4775 echo "configure:4776: checking whether the -xildoff compiler flag is required" >&5
4776 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4777   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4778     then echo "$ac_t""no" 1>&6;
4779     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
4780   fi
4781   else echo "$ac_t""no" 1>&6
4782 fi
4783
4784 if test "$opsys" = "sol2"; then
4785   if test "$os_release" -ge 56; then
4786     echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4787 echo "configure:4788: checking for \"-z ignore\" linker flag" >&5
4788     case "`ld -h 2>&1`" in
4789       *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4790         ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4791       *) echo "$ac_t""no" 1>&6 ;;
4792     esac
4793   fi
4794 fi
4795
4796
4797 echo "checking "for specified window system"" 1>&6
4798 echo "configure:4799: checking "for specified window system"" >&5
4799
4800 if test "$with_x11" != "no"; then
4801     test "$x_includes $x_libraries" != "NONE NONE" && \
4802    window_system=x11 with_x11=yes
4803
4804         
4805       if test "$x_includes $x_libraries" = "NONE NONE" \
4806     -a -n "$OPENWINHOME" \
4807     -a "$OPENWINHOME" != "/usr/openwin" \
4808     -a -d "$OPENWINHOME"; then
4809       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4810       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4811       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4812   fi
4813
4814   if test "$x_includes" = "NONE"; then
4815                     for dir in "/usr/X11" "/usr/X11R6"; do
4816       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4817     done
4818   fi
4819
4820   if test "$x_libraries" = "NONE"; then
4821     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4822       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4823     done
4824   fi
4825
4826   # If we find X, set shell vars x_includes and x_libraries to the
4827 # paths, otherwise set no_x=yes.
4828 # Uses ac_ vars as temps to allow command line to override cache and checks.
4829 # --without-x overrides everything else, but does not touch the cache.
4830 echo $ac_n "checking for X""... $ac_c" 1>&6
4831 echo "configure:4832: checking for X" >&5
4832
4833 # Check whether --with-x or --without-x was given.
4834 if test "${with_x+set}" = set; then
4835   withval="$with_x"
4836   :
4837 fi
4838
4839 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4840 if test "x$with_x" = xno; then
4841   # The user explicitly disabled X.
4842   have_x=disabled
4843 else
4844   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4845     # Both variables are already set.
4846     have_x=yes
4847   else
4848
4849 # One or both of the vars are not set, and there is no cached value.
4850 ac_x_includes=NO ac_x_libraries=NO
4851 rm -fr conftestdir
4852 if mkdir conftestdir; then
4853   cd conftestdir
4854   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4855   cat > Imakefile <<'EOF'
4856 acfindx:
4857         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4858 EOF
4859   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4860     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4861     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4862     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4863     for ac_extension in a so sl; do
4864       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4865         test -f $ac_im_libdir/libX11.$ac_extension; then
4866         ac_im_usrlibdir=$ac_im_libdir; break
4867       fi
4868     done
4869     # Screen out bogus values from the imake configuration.  They are
4870     # bogus both because they are the default anyway, and because
4871     # using them would break gcc on systems where it needs fixed includes.
4872     case "$ac_im_incroot" in
4873         /usr/include) ;;
4874         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4875     esac
4876     case "$ac_im_usrlibdir" in
4877         /usr/lib | /lib) ;;
4878         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4879     esac
4880   fi
4881   cd ..
4882   rm -fr conftestdir
4883 fi
4884
4885 if test "$ac_x_includes" = NO; then
4886   # Guess where to find include files, by looking for this one X11 .h file.
4887   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4888
4889   # First, try using that file with no special directory specified.
4890 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 #include <$x_direct_test_include>
4894 EOF
4895 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4896 { (eval echo configure:4897: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4897 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4898 if test -z "$ac_err"; then
4899   rm -rf conftest*
4900   # We can compile using X headers with no special include directory.
4901 ac_x_includes=
4902 else
4903   echo "$ac_err" >&5
4904   echo "configure: failed program was:" >&5
4905   cat conftest.$ac_ext >&5
4906   rm -rf conftest*
4907   # Look for the header file in a standard set of common directories.
4908 # Check X11 before X11Rn because it is often a symlink to the current release.
4909   for ac_dir in               \
4910     /usr/X11/include          \
4911     /usr/X11R6/include        \
4912     /usr/X11R5/include        \
4913     /usr/X11R4/include        \
4914                               \
4915     /usr/include/X11          \
4916     /usr/include/X11R6        \
4917     /usr/include/X11R5        \
4918     /usr/include/X11R4        \
4919                               \
4920     /usr/local/X11/include    \
4921     /usr/local/X11R6/include  \
4922     /usr/local/X11R5/include  \
4923     /usr/local/X11R4/include  \
4924                               \
4925     /usr/local/include/X11    \
4926     /usr/local/include/X11R6  \
4927     /usr/local/include/X11R5  \
4928     /usr/local/include/X11R4  \
4929                               \
4930     /usr/X386/include         \
4931     /usr/x386/include         \
4932     /usr/XFree86/include/X11  \
4933                               \
4934     /usr/include              \
4935     /usr/local/include        \
4936     /usr/unsupported/include  \
4937     /usr/athena/include       \
4938     /usr/local/x11r5/include  \
4939     /usr/lpp/Xamples/include  \
4940                               \
4941     /usr/openwin/include      \
4942     /usr/openwin/share/include \
4943     ; \
4944   do
4945     if test -r "$ac_dir/$x_direct_test_include"; then
4946       ac_x_includes=$ac_dir
4947       break
4948     fi
4949   done
4950 fi
4951 rm -f conftest*
4952 fi # $ac_x_includes = NO
4953
4954 if test "$ac_x_libraries" = NO; then
4955   # Check for the libraries.
4956
4957   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4958   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4959
4960   # See if we find them without any special options.
4961   # Don't add to $LIBS permanently.
4962   ac_save_LIBS="$LIBS"
4963   LIBS="-l$x_direct_test_library $LIBS"
4964 cat > conftest.$ac_ext <<EOF
4965 #line 4966 "configure"
4966 #include "confdefs.h"
4967
4968 int main() {
4969 ${x_direct_test_function}()
4970 ; return 0; }
4971 EOF
4972 if { (eval echo configure:4973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4973   rm -rf conftest*
4974   LIBS="$ac_save_LIBS"
4975 # We can link X programs with no special library path.
4976 ac_x_libraries=
4977 else
4978   echo "configure: failed program was:" >&5
4979   cat conftest.$ac_ext >&5
4980   rm -rf conftest*
4981   LIBS="$ac_save_LIBS"
4982 # First see if replacing the include by lib works.
4983 # Check X11 before X11Rn because it is often a symlink to the current release.
4984 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4985     /usr/X11/lib          \
4986     /usr/X11R6/lib        \
4987     /usr/X11R5/lib        \
4988     /usr/X11R4/lib        \
4989                           \
4990     /usr/lib/X11          \
4991     /usr/lib/X11R6        \
4992     /usr/lib/X11R5        \
4993     /usr/lib/X11R4        \
4994                           \
4995     /usr/local/X11/lib    \
4996     /usr/local/X11R6/lib  \
4997     /usr/local/X11R5/lib  \
4998     /usr/local/X11R4/lib  \
4999                           \
5000     /usr/local/lib/X11    \
5001     /usr/local/lib/X11R6  \
5002     /usr/local/lib/X11R5  \
5003     /usr/local/lib/X11R4  \
5004                           \
5005     /usr/X386/lib         \
5006     /usr/x386/lib         \
5007     /usr/XFree86/lib/X11  \
5008                           \
5009     /usr/lib              \
5010     /usr/local/lib        \
5011     /usr/unsupported/lib  \
5012     /usr/athena/lib       \
5013     /usr/local/x11r5/lib  \
5014     /usr/lpp/Xamples/lib  \
5015     /lib/usr/lib/X11      \
5016                           \
5017     /usr/openwin/lib      \
5018     /usr/openwin/share/lib \
5019     ; \
5020 do
5021   for ac_extension in a so sl; do
5022     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
5023       ac_x_libraries=$ac_dir
5024       break 2
5025     fi
5026   done
5027 done
5028 fi
5029 rm -f conftest*
5030 fi # $ac_x_libraries = NO
5031
5032 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
5033   # Didn't find X anywhere.  Cache the known absence of X.
5034   ac_cv_have_x="have_x=no"
5035 else
5036   # Record where we found X for the cache.
5037   ac_cv_have_x="have_x=yes \
5038                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
5039 fi
5040   fi
5041   eval "$ac_cv_have_x"
5042 fi # $with_x != no
5043
5044 if test "$have_x" != yes; then
5045   echo "$ac_t""$have_x" 1>&6
5046   no_x=yes
5047 else
5048   # If each of the values was on the command line, it overrides each guess.
5049   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
5050   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
5051   # Update the cache value to reflect the command line values.
5052   ac_cv_have_x="have_x=yes \
5053                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
5054   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
5055 fi
5056
5057 if test "$no_x" = yes; then
5058   # Not all programs may use this symbol, but it does not hurt to define it.
5059   { test "$extra_verbose" = "yes" && cat << \EOF
5060     Defining X_DISPLAY_MISSING
5061 EOF
5062 cat >> confdefs.h <<\EOF
5063 #define X_DISPLAY_MISSING 1
5064 EOF
5065 }
5066
5067   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5068 else
5069   if test -n "$x_includes"; then
5070     X_CFLAGS="$X_CFLAGS -I$x_includes"
5071   fi
5072
5073   # It would also be nice to do this for all -L options, not just this one.
5074   if test -n "$x_libraries"; then
5075     X_LIBS="$X_LIBS -L$x_libraries"
5076     # For Solaris; some versions of Sun CC require a space after -R and
5077     # others require no space.  Words are not sufficient . . . .
5078     case "`(uname -sr) 2>/dev/null`" in
5079     "SunOS 5"*)
5080       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5081 echo "configure:5082: checking whether -R must be followed by a space" >&5
5082       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5083       cat > conftest.$ac_ext <<EOF
5084 #line 5085 "configure"
5085 #include "confdefs.h"
5086
5087 int main() {
5088
5089 ; return 0; }
5090 EOF
5091 if { (eval echo configure:5092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5092   rm -rf conftest*
5093   ac_R_nospace=yes
5094 else
5095   echo "configure: failed program was:" >&5
5096   cat conftest.$ac_ext >&5
5097   rm -rf conftest*
5098   ac_R_nospace=no
5099 fi
5100 rm -f conftest*
5101       if test $ac_R_nospace = yes; then
5102         echo "$ac_t""no" 1>&6
5103         X_LIBS="$X_LIBS -R$x_libraries"
5104       else
5105         LIBS="$ac_xsave_LIBS -R $x_libraries"
5106         cat > conftest.$ac_ext <<EOF
5107 #line 5108 "configure"
5108 #include "confdefs.h"
5109
5110 int main() {
5111
5112 ; return 0; }
5113 EOF
5114 if { (eval echo configure:5115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5115   rm -rf conftest*
5116   ac_R_space=yes
5117 else
5118   echo "configure: failed program was:" >&5
5119   cat conftest.$ac_ext >&5
5120   rm -rf conftest*
5121   ac_R_space=no
5122 fi
5123 rm -f conftest*
5124         if test $ac_R_space = yes; then
5125           echo "$ac_t""yes" 1>&6
5126           X_LIBS="$X_LIBS -R $x_libraries"
5127         else
5128           echo "$ac_t""neither works" 1>&6
5129         fi
5130       fi
5131       LIBS="$ac_xsave_LIBS"
5132     esac
5133   fi
5134
5135   # Check for system-dependent libraries X programs must link with.
5136   # Do this before checking for the system-independent R6 libraries
5137   # (-lICE), since we may need -lsocket or whatever for X linking.
5138
5139   if test "$ISC" = yes; then
5140     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5141   else
5142     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5143     # libraries were built with DECnet support.  And karl@cs.umb.edu says
5144     # the Alpha needs dnet_stub (dnet does not exist).
5145     if test "$with_dnet" = "no" ; then
5146 ac_cv_lib_dnet_dnet_ntoa=no
5147 else
5148
5149 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5150 echo "configure:5151: checking for dnet_ntoa in -ldnet" >&5
5151 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5152
5153 xe_check_libs=" -ldnet "
5154 cat > conftest.$ac_ext <<EOF
5155 #line 5156 "configure"
5156 #include "confdefs.h"
5157 /* Override any gcc2 internal prototype to avoid an error.  */
5158 /* We use char because int might match the return type of a gcc2
5159     builtin and then its argument prototype would still apply.  */
5160 char dnet_ntoa();
5161
5162 int main() {
5163 dnet_ntoa()
5164 ; return 0; }
5165 EOF
5166 if { (eval echo configure:5167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5167   rm -rf conftest*
5168   eval "ac_cv_lib_$ac_lib_var=yes"
5169 else
5170   echo "configure: failed program was:" >&5
5171   cat conftest.$ac_ext >&5
5172   rm -rf conftest*
5173   eval "ac_cv_lib_$ac_lib_var=no"
5174 fi
5175 rm -f conftest*
5176 xe_check_libs=""
5177
5178 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5179   echo "$ac_t""yes" 1>&6
5180   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5181 else
5182   echo "$ac_t""no" 1>&6
5183 fi
5184
5185 fi
5186
5187     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5188       
5189 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5190 echo "configure:5191: checking for dnet_ntoa in -ldnet_stub" >&5
5191 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5192
5193 xe_check_libs=" -ldnet_stub "
5194 cat > conftest.$ac_ext <<EOF
5195 #line 5196 "configure"
5196 #include "confdefs.h"
5197 /* Override any gcc2 internal prototype to avoid an error.  */
5198 /* We use char because int might match the return type of a gcc2
5199     builtin and then its argument prototype would still apply.  */
5200 char dnet_ntoa();
5201
5202 int main() {
5203 dnet_ntoa()
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_lib_$ac_lib_var=yes"
5209 else
5210   echo "configure: failed program was:" >&5
5211   cat conftest.$ac_ext >&5
5212   rm -rf conftest*
5213   eval "ac_cv_lib_$ac_lib_var=no"
5214 fi
5215 rm -f conftest*
5216 xe_check_libs=""
5217
5218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5219   echo "$ac_t""yes" 1>&6
5220   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5221 else
5222   echo "$ac_t""no" 1>&6
5223 fi
5224
5225
5226     fi
5227
5228     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5229     # to get the SysV transport functions.
5230     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5231     # needs -lnsl.
5232     # The nsl library prevents programs from opening the X display
5233     # on Irix 5.2, according to dickey@clark.net.
5234     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5235 echo "configure:5236: checking for gethostbyname" >&5
5236
5237 cat > conftest.$ac_ext <<EOF
5238 #line 5239 "configure"
5239 #include "confdefs.h"
5240 /* System header to define __stub macros and hopefully few prototypes,
5241     which can conflict with char gethostbyname(); below.  */
5242 #include <assert.h>
5243 /* Override any gcc2 internal prototype to avoid an error.  */
5244 /* We use char because int might match the return type of a gcc2
5245     builtin and then its argument prototype would still apply.  */
5246 char gethostbyname();
5247
5248 int main() {
5249
5250 /* The GNU C library defines this for functions which it implements
5251     to always fail with ENOSYS.  Some functions are actually named
5252     something starting with __ and the normal name is an alias.  */
5253 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5254 choke me
5255 #else
5256 gethostbyname();
5257 #endif
5258
5259 ; return 0; }
5260 EOF
5261 if { (eval echo configure:5262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262   rm -rf conftest*
5263   eval "ac_cv_func_gethostbyname=yes"
5264 else
5265   echo "configure: failed program was:" >&5
5266   cat conftest.$ac_ext >&5
5267   rm -rf conftest*
5268   eval "ac_cv_func_gethostbyname=no"
5269 fi
5270 rm -f conftest*
5271
5272 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5273   echo "$ac_t""yes" 1>&6
5274   :
5275 else
5276   echo "$ac_t""no" 1>&6
5277 fi
5278
5279     if test $ac_cv_func_gethostbyname = no; then
5280       
5281 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5282 echo "configure:5283: checking for gethostbyname in -lnsl" >&5
5283 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5284
5285 xe_check_libs=" -lnsl "
5286 cat > conftest.$ac_ext <<EOF
5287 #line 5288 "configure"
5288 #include "confdefs.h"
5289 /* Override any gcc2 internal prototype to avoid an error.  */
5290 /* We use char because int might match the return type of a gcc2
5291     builtin and then its argument prototype would still apply.  */
5292 char gethostbyname();
5293
5294 int main() {
5295 gethostbyname()
5296 ; return 0; }
5297 EOF
5298 if { (eval echo configure:5299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5299   rm -rf conftest*
5300   eval "ac_cv_lib_$ac_lib_var=yes"
5301 else
5302   echo "configure: failed program was:" >&5
5303   cat conftest.$ac_ext >&5
5304   rm -rf conftest*
5305   eval "ac_cv_lib_$ac_lib_var=no"
5306 fi
5307 rm -f conftest*
5308 xe_check_libs=""
5309
5310 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5311   echo "$ac_t""yes" 1>&6
5312   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5313 else
5314   echo "$ac_t""no" 1>&6
5315 fi
5316
5317
5318     fi
5319
5320     # lieder@skyler.mavd.honeywell.com says without -lsocket,
5321     # socket/setsockopt and other routines are undefined under SCO ODT
5322     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
5323     # on later versions), says simon@lia.di.epfl.ch: it contains
5324     # gethostby* variants that don't use the nameserver (or something).
5325     # -lsocket must be given before -lnsl if both are needed.
5326     # We assume that if connect needs -lnsl, so does gethostbyname.
5327     echo $ac_n "checking for connect""... $ac_c" 1>&6
5328 echo "configure:5329: checking for connect" >&5
5329
5330 cat > conftest.$ac_ext <<EOF
5331 #line 5332 "configure"
5332 #include "confdefs.h"
5333 /* System header to define __stub macros and hopefully few prototypes,
5334     which can conflict with char connect(); below.  */
5335 #include <assert.h>
5336 /* Override any gcc2 internal prototype to avoid an error.  */
5337 /* We use char because int might match the return type of a gcc2
5338     builtin and then its argument prototype would still apply.  */
5339 char connect();
5340
5341 int main() {
5342
5343 /* The GNU C library defines this for functions which it implements
5344     to always fail with ENOSYS.  Some functions are actually named
5345     something starting with __ and the normal name is an alias.  */
5346 #if defined (__stub_connect) || defined (__stub___connect)
5347 choke me
5348 #else
5349 connect();
5350 #endif
5351
5352 ; return 0; }
5353 EOF
5354 if { (eval echo configure:5355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5355   rm -rf conftest*
5356   eval "ac_cv_func_connect=yes"
5357 else
5358   echo "configure: failed program was:" >&5
5359   cat conftest.$ac_ext >&5
5360   rm -rf conftest*
5361   eval "ac_cv_func_connect=no"
5362 fi
5363 rm -f conftest*
5364
5365 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5366   echo "$ac_t""yes" 1>&6
5367   :
5368 else
5369   echo "$ac_t""no" 1>&6
5370 fi
5371
5372     if test $ac_cv_func_connect = no; then
5373       
5374 xe_msg_checking="for connect in -lsocket"
5375 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5376 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5377 echo "configure:5378: checking "$xe_msg_checking"" >&5
5378 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5379
5380 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
5381 cat > conftest.$ac_ext <<EOF
5382 #line 5383 "configure"
5383 #include "confdefs.h"
5384 /* Override any gcc2 internal prototype to avoid an error.  */
5385 /* We use char because int might match the return type of a gcc2
5386     builtin and then its argument prototype would still apply.  */
5387 char connect();
5388
5389 int main() {
5390 connect()
5391 ; return 0; }
5392 EOF
5393 if { (eval echo configure:5394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5394   rm -rf conftest*
5395   eval "ac_cv_lib_$ac_lib_var=yes"
5396 else
5397   echo "configure: failed program was:" >&5
5398   cat conftest.$ac_ext >&5
5399   rm -rf conftest*
5400   eval "ac_cv_lib_$ac_lib_var=no"
5401 fi
5402 rm -f conftest*
5403 xe_check_libs=""
5404
5405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5406   echo "$ac_t""yes" 1>&6
5407   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5408 else
5409   echo "$ac_t""no" 1>&6
5410 fi
5411
5412
5413     fi
5414
5415     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5416     echo $ac_n "checking for remove""... $ac_c" 1>&6
5417 echo "configure:5418: checking for remove" >&5
5418
5419 cat > conftest.$ac_ext <<EOF
5420 #line 5421 "configure"
5421 #include "confdefs.h"
5422 /* System header to define __stub macros and hopefully few prototypes,
5423     which can conflict with char remove(); below.  */
5424 #include <assert.h>
5425 /* Override any gcc2 internal prototype to avoid an error.  */
5426 /* We use char because int might match the return type of a gcc2
5427     builtin and then its argument prototype would still apply.  */
5428 char remove();
5429
5430 int main() {
5431
5432 /* The GNU C library defines this for functions which it implements
5433     to always fail with ENOSYS.  Some functions are actually named
5434     something starting with __ and the normal name is an alias.  */
5435 #if defined (__stub_remove) || defined (__stub___remove)
5436 choke me
5437 #else
5438 remove();
5439 #endif
5440
5441 ; return 0; }
5442 EOF
5443 if { (eval echo configure:5444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5444   rm -rf conftest*
5445   eval "ac_cv_func_remove=yes"
5446 else
5447   echo "configure: failed program was:" >&5
5448   cat conftest.$ac_ext >&5
5449   rm -rf conftest*
5450   eval "ac_cv_func_remove=no"
5451 fi
5452 rm -f conftest*
5453
5454 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5455   echo "$ac_t""yes" 1>&6
5456   :
5457 else
5458   echo "$ac_t""no" 1>&6
5459 fi
5460
5461     if test $ac_cv_func_remove = no; then
5462       
5463 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5464 echo "configure:5465: checking for remove in -lposix" >&5
5465 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5466
5467 xe_check_libs=" -lposix "
5468 cat > conftest.$ac_ext <<EOF
5469 #line 5470 "configure"
5470 #include "confdefs.h"
5471 /* Override any gcc2 internal prototype to avoid an error.  */
5472 /* We use char because int might match the return type of a gcc2
5473     builtin and then its argument prototype would still apply.  */
5474 char remove();
5475
5476 int main() {
5477 remove()
5478 ; return 0; }
5479 EOF
5480 if { (eval echo configure:5481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5481   rm -rf conftest*
5482   eval "ac_cv_lib_$ac_lib_var=yes"
5483 else
5484   echo "configure: failed program was:" >&5
5485   cat conftest.$ac_ext >&5
5486   rm -rf conftest*
5487   eval "ac_cv_lib_$ac_lib_var=no"
5488 fi
5489 rm -f conftest*
5490 xe_check_libs=""
5491
5492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5493   echo "$ac_t""yes" 1>&6
5494   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5495 else
5496   echo "$ac_t""no" 1>&6
5497 fi
5498
5499
5500     fi
5501
5502     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5503     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5504 echo "configure:5505: checking for shmat" >&5
5505
5506 cat > conftest.$ac_ext <<EOF
5507 #line 5508 "configure"
5508 #include "confdefs.h"
5509 /* System header to define __stub macros and hopefully few prototypes,
5510     which can conflict with char shmat(); below.  */
5511 #include <assert.h>
5512 /* Override any gcc2 internal prototype to avoid an error.  */
5513 /* We use char because int might match the return type of a gcc2
5514     builtin and then its argument prototype would still apply.  */
5515 char shmat();
5516
5517 int main() {
5518
5519 /* The GNU C library defines this for functions which it implements
5520     to always fail with ENOSYS.  Some functions are actually named
5521     something starting with __ and the normal name is an alias.  */
5522 #if defined (__stub_shmat) || defined (__stub___shmat)
5523 choke me
5524 #else
5525 shmat();
5526 #endif
5527
5528 ; return 0; }
5529 EOF
5530 if { (eval echo configure:5531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5531   rm -rf conftest*
5532   eval "ac_cv_func_shmat=yes"
5533 else
5534   echo "configure: failed program was:" >&5
5535   cat conftest.$ac_ext >&5
5536   rm -rf conftest*
5537   eval "ac_cv_func_shmat=no"
5538 fi
5539 rm -f conftest*
5540
5541 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5542   echo "$ac_t""yes" 1>&6
5543   :
5544 else
5545   echo "$ac_t""no" 1>&6
5546 fi
5547
5548     if test $ac_cv_func_shmat = no; then
5549       
5550 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5551 echo "configure:5552: checking for shmat in -lipc" >&5
5552 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5553
5554 xe_check_libs=" -lipc "
5555 cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 /* Override any gcc2 internal prototype to avoid an error.  */
5559 /* We use char because int might match the return type of a gcc2
5560     builtin and then its argument prototype would still apply.  */
5561 char shmat();
5562
5563 int main() {
5564 shmat()
5565 ; return 0; }
5566 EOF
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5568   rm -rf conftest*
5569   eval "ac_cv_lib_$ac_lib_var=yes"
5570 else
5571   echo "configure: failed program was:" >&5
5572   cat conftest.$ac_ext >&5
5573   rm -rf conftest*
5574   eval "ac_cv_lib_$ac_lib_var=no"
5575 fi
5576 rm -f conftest*
5577 xe_check_libs=""
5578
5579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5580   echo "$ac_t""yes" 1>&6
5581   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5582 else
5583   echo "$ac_t""no" 1>&6
5584 fi
5585
5586
5587     fi
5588   fi
5589
5590   # Check for libraries that X11R6 Xt/Xaw programs need.
5591   ac_save_LDFLAGS="$LDFLAGS"
5592   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5593   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5594   # check for ICE first), but we must link in the order -lSM -lICE or
5595   # we get undefined symbols.  So assume we have SM if we have ICE.
5596   # These have to be linked with before -lX11, unlike the other
5597   # libraries we check for below, so use a different variable.
5598   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5599   
5600 xe_msg_checking="for IceConnectionNumber in -lICE"
5601 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
5602 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5603 echo "configure:5604: checking "$xe_msg_checking"" >&5
5604 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5605
5606 xe_check_libs=" -lICE $X_EXTRA_LIBS"
5607 cat > conftest.$ac_ext <<EOF
5608 #line 5609 "configure"
5609 #include "confdefs.h"
5610 /* Override any gcc2 internal prototype to avoid an error.  */
5611 /* We use char because int might match the return type of a gcc2
5612     builtin and then its argument prototype would still apply.  */
5613 char IceConnectionNumber();
5614
5615 int main() {
5616 IceConnectionNumber()
5617 ; return 0; }
5618 EOF
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5620   rm -rf conftest*
5621   eval "ac_cv_lib_$ac_lib_var=yes"
5622 else
5623   echo "configure: failed program was:" >&5
5624   cat conftest.$ac_ext >&5
5625   rm -rf conftest*
5626   eval "ac_cv_lib_$ac_lib_var=no"
5627 fi
5628 rm -f conftest*
5629 xe_check_libs=""
5630
5631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5632   echo "$ac_t""yes" 1>&6
5633   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5634 else
5635   echo "$ac_t""no" 1>&6
5636 fi
5637
5638
5639   LDFLAGS="$ac_save_LDFLAGS"
5640
5641 fi
5642  # Autoconf claims to find X library and include dirs for us.
5643   if test "$no_x" = "yes"
5644   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5645   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5646   fi
5647 fi
5648
5649 case "$with_x11" in
5650   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5651   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5652 esac
5653
5654 if test "$with_x11" = "yes"; then
5655   { test "$extra_verbose" = "yes" && cat << \EOF
5656     Defining HAVE_X_WINDOWS
5657 EOF
5658 cat >> confdefs.h <<\EOF
5659 #define HAVE_X_WINDOWS 1
5660 EOF
5661 }
5662
5663   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5664   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5665
5666       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5667     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5668     if test -d "$lib_dir" -a -d "$inc_dir"; then
5669       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5670         x_libraries="$lib_dir $x_libraries"
5671         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5672       esac
5673       case "$x_includes" in "$inc_dir"* ) ;; *)
5674         x_includes="$inc_dir $x_includes"
5675         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5676       esac
5677       break;       fi
5678   done
5679
5680     for rel in "X11R6" "X11R5" "X11R4"; do
5681     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5682     if test -d "$lib_dir" -a -d "$inc_dir"; then
5683       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5684         x_libraries="$x_libraries $lib_dir"
5685         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5686       esac
5687       case "$x_includes" in "$inc_dir"* ) ;; *)
5688         x_includes="$x_includes $inc_dir"
5689         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5690       esac
5691       break;     fi
5692   done
5693
5694     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
5695
5696   ld_switch_x_site="$X_LIBS"
5697
5698   
5699 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5700     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5701   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5702   
5703         runpath="" runpath_dirs=""
5704   if test -n "$LD_RUN_PATH"; then
5705     runpath="$LD_RUN_PATH"
5706   elif test "$GCC" = "yes"; then
5707         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5708     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5709     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5710     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5711       case "$arg" in P,* | -L* | -R* )
5712         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5713           {
5714 xe_runpath_dir="$dir"
5715   test "$xe_runpath_dir" != "/lib"     -a \
5716         "$xe_runpath_dir" != "/usr/lib" -a \
5717         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5718   eval "$xe_add_unique_runpath_dir"
5719 }
5720         done ;;
5721       esac
5722     done
5723     ld_switch_run="$ld_switch_run_save"
5724     rm -f conftest*
5725   else
5726         for arg in $ld_switch_site $ld_switch_x_site; do
5727       case "$arg" in -L*) {
5728 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5729   test "$xe_runpath_dir" != "/lib"     -a \
5730         "$xe_runpath_dir" != "/usr/lib" -a \
5731         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5732   eval "$xe_add_unique_runpath_dir"
5733 };; esac
5734     done
5735         if test "$opsys $need_motif" = "sol2 yes"; then
5736       xe_runpath_dir="/opt/SUNWdt/lib";
5737       eval "$xe_add_unique_runpath_dir";
5738     fi
5739   fi 
5740   if test -n "$runpath"; then
5741     ld_switch_run="${dash_r}${runpath}"
5742     
5743 if test "$GCC" = "yes"; then
5744   set x $ld_switch_run; shift; ld_switch_run=""
5745   while test -n "$1"; do
5746     case $1 in
5747       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5748       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5749       -Xlinker* ) ;;
5750       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5751     esac
5752     shift
5753   done
5754 fi
5755     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5756   fi
5757 fi
5758
5759
5760   if test "$extra_verbose" = "yes"; then
5761     echo; echo "X11 compilation variables:"
5762     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5763     echo
5764   fi
5765
5766             bitmapdirs=
5767   if test "$x_includes" != NONE; then
5768     for i in $x_includes; do
5769       if test -d "$i/bitmaps"; then
5770         bitmapdirs="$i/bitmaps:$bitmapdirs"
5771       fi
5772       if test -d "$i/X11/bitmaps"; then
5773         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5774       fi
5775     done
5776     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5777   fi
5778   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5779     Defining BITMAPDIR = "$bitmapdirs"
5780 EOF
5781 cat >> confdefs.h <<EOF
5782 #define BITMAPDIR "$bitmapdirs"
5783 EOF
5784 }
5785
5786
5787     echo "checking for X defines extracted by xmkmf" 1>&6
5788 echo "configure:5789: checking for X defines extracted by xmkmf" >&5
5789   rm -fr conftestdir
5790   if mkdir conftestdir; then
5791     cd conftestdir
5792     cat > Imakefile <<'EOF'
5793 xetest:
5794         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5795 EOF
5796     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5797       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5798       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5799     fi
5800     cd ..
5801     rm -fr conftestdir
5802     for word in $xmkmf_defines; do
5803       case "$word" in
5804         -D*=* ) ;;
5805         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5806               { test "$extra_verbose" = "yes" && cat << EOF
5807     Defining $word
5808 EOF
5809 cat >> confdefs.h <<EOF
5810 #define $word 1
5811 EOF
5812 }
5813  ;;
5814       esac
5815     done
5816   fi
5817
5818     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5819 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5820 echo "configure:5821: checking for X11/Intrinsic.h" >&5
5821
5822 cat > conftest.$ac_ext <<EOF
5823 #line 5824 "configure"
5824 #include "confdefs.h"
5825 #include <X11/Intrinsic.h>
5826 EOF
5827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5828 { (eval echo configure:5829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5830 if test -z "$ac_err"; then
5831   rm -rf conftest*
5832   eval "ac_cv_header_$ac_safe=yes"
5833 else
5834   echo "$ac_err" >&5
5835   echo "configure: failed program was:" >&5
5836   cat conftest.$ac_ext >&5
5837   rm -rf conftest*
5838   eval "ac_cv_header_$ac_safe=no"
5839 fi
5840 rm -f conftest*
5841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5842   echo "$ac_t""yes" 1>&6
5843   :
5844 else
5845   echo "$ac_t""no" 1>&6
5846 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5847 fi
5848
5849
5850       
5851 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5852 echo "configure:5853: checking for XOpenDisplay in -lX11" >&5
5853 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5854
5855 xe_check_libs=" -lX11 "
5856 cat > conftest.$ac_ext <<EOF
5857 #line 5858 "configure"
5858 #include "confdefs.h"
5859 /* Override any gcc2 internal prototype to avoid an error.  */
5860 /* We use char because int might match the return type of a gcc2
5861     builtin and then its argument prototype would still apply.  */
5862 char XOpenDisplay();
5863
5864 int main() {
5865 XOpenDisplay()
5866 ; return 0; }
5867 EOF
5868 if { (eval echo configure:5869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5869   rm -rf conftest*
5870   eval "ac_cv_lib_$ac_lib_var=yes"
5871 else
5872   echo "configure: failed program was:" >&5
5873   cat conftest.$ac_ext >&5
5874   rm -rf conftest*
5875   eval "ac_cv_lib_$ac_lib_var=no"
5876 fi
5877 rm -f conftest*
5878 xe_check_libs=""
5879
5880 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5881   echo "$ac_t""yes" 1>&6
5882   have_lib_x11=yes
5883 else
5884   echo "$ac_t""no" 1>&6
5885 fi
5886
5887
5888   if test "$have_lib_x11" != "yes"; then
5889     
5890 xe_msg_checking="for XGetFontProperty in -lX11"
5891 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5892 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5893 echo "configure:5894: checking "$xe_msg_checking"" >&5
5894 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5895
5896 xe_check_libs=" -lX11 -b i486-linuxaout"
5897 cat > conftest.$ac_ext <<EOF
5898 #line 5899 "configure"
5899 #include "confdefs.h"
5900 /* Override any gcc2 internal prototype to avoid an error.  */
5901 /* We use char because int might match the return type of a gcc2
5902     builtin and then its argument prototype would still apply.  */
5903 char XGetFontProperty();
5904
5905 int main() {
5906 XGetFontProperty()
5907 ; return 0; }
5908 EOF
5909 if { (eval echo configure:5910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5910   rm -rf conftest*
5911   eval "ac_cv_lib_$ac_lib_var=yes"
5912 else
5913   echo "configure: failed program was:" >&5
5914   cat conftest.$ac_ext >&5
5915   rm -rf conftest*
5916   eval "ac_cv_lib_$ac_lib_var=no"
5917 fi
5918 rm -f conftest*
5919 xe_check_libs=""
5920
5921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5922   echo "$ac_t""yes" 1>&6
5923   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5924 else
5925   echo "$ac_t""no" 1>&6
5926 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5927 fi
5928
5929
5930   fi
5931   libs_x="-lX11"
5932   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5933
5934     
5935 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5936 echo "configure:5937: checking for XShapeSelectInput in -lXext" >&5
5937 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5938
5939 xe_check_libs=" -lXext "
5940 cat > conftest.$ac_ext <<EOF
5941 #line 5942 "configure"
5942 #include "confdefs.h"
5943 /* Override any gcc2 internal prototype to avoid an error.  */
5944 /* We use char because int might match the return type of a gcc2
5945     builtin and then its argument prototype would still apply.  */
5946 char XShapeSelectInput();
5947
5948 int main() {
5949 XShapeSelectInput()
5950 ; return 0; }
5951 EOF
5952 if { (eval echo configure:5953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953   rm -rf conftest*
5954   eval "ac_cv_lib_$ac_lib_var=yes"
5955 else
5956   echo "configure: failed program was:" >&5
5957   cat conftest.$ac_ext >&5
5958   rm -rf conftest*
5959   eval "ac_cv_lib_$ac_lib_var=no"
5960 fi
5961 rm -f conftest*
5962 xe_check_libs=""
5963
5964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5965   echo "$ac_t""yes" 1>&6
5966   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5967 else
5968   echo "$ac_t""no" 1>&6
5969 fi
5970
5971
5972
5973     
5974 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5975 echo "configure:5976: checking for XtOpenDisplay in -lXt" >&5
5976 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5977
5978 xe_check_libs=" -lXt "
5979 cat > conftest.$ac_ext <<EOF
5980 #line 5981 "configure"
5981 #include "confdefs.h"
5982 /* Override any gcc2 internal prototype to avoid an error.  */
5983 /* We use char because int might match the return type of a gcc2
5984     builtin and then its argument prototype would still apply.  */
5985 char XtOpenDisplay();
5986
5987 int main() {
5988 XtOpenDisplay()
5989 ; return 0; }
5990 EOF
5991 if { (eval echo configure:5992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992   rm -rf conftest*
5993   eval "ac_cv_lib_$ac_lib_var=yes"
5994 else
5995   echo "configure: failed program was:" >&5
5996   cat conftest.$ac_ext >&5
5997   rm -rf conftest*
5998   eval "ac_cv_lib_$ac_lib_var=no"
5999 fi
6000 rm -f conftest*
6001 xe_check_libs=""
6002
6003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6004   echo "$ac_t""yes" 1>&6
6005   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
6006 else
6007   echo "$ac_t""no" 1>&6
6008 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
6009 fi
6010
6011
6012
6013   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
6014 echo "configure:6015: checking the version of X11 being used" >&5
6015   cat > conftest.$ac_ext <<EOF
6016 #line 6017 "configure"
6017 #include "confdefs.h"
6018 #include <X11/Intrinsic.h>
6019     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
6020 EOF
6021 if { (eval echo configure:6022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6022 then
6023   ./conftest foobar; x11_release=$?
6024 else
6025   conftest_rc="$?"
6026   echo "configure: failed program was:" >&5
6027   cat conftest.$ac_ext >&5
6028   rm -fr conftest*
6029   x11_release=4
6030 fi
6031 rm -fr conftest*
6032   echo "$ac_t""R${x11_release}" 1>&6
6033   { test "$extra_verbose" = "yes" && cat << EOF
6034     Defining THIS_IS_X11R${x11_release}
6035 EOF
6036 cat >> confdefs.h <<EOF
6037 #define THIS_IS_X11R${x11_release} 1
6038 EOF
6039 }
6040
6041
6042   for ac_func in XConvertCase
6043 do
6044 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6045 echo "configure:6046: checking for $ac_func" >&5
6046
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* System header to define __stub macros and hopefully few prototypes,
6051     which can conflict with char $ac_func(); below.  */
6052 #include <assert.h>
6053 /* Override any gcc2 internal prototype to avoid an error.  */
6054 /* We use char because int might match the return type of a gcc2
6055     builtin and then its argument prototype would still apply.  */
6056 char $ac_func();
6057
6058 int main() {
6059
6060 /* The GNU C library defines this for functions which it implements
6061     to always fail with ENOSYS.  Some functions are actually named
6062     something starting with __ and the normal name is an alias.  */
6063 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6064 choke me
6065 #else
6066 $ac_func();
6067 #endif
6068
6069 ; return 0; }
6070 EOF
6071 if { (eval echo configure:6072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6072   rm -rf conftest*
6073   eval "ac_cv_func_$ac_func=yes"
6074 else
6075   echo "configure: failed program was:" >&5
6076   cat conftest.$ac_ext >&5
6077   rm -rf conftest*
6078   eval "ac_cv_func_$ac_func=no"
6079 fi
6080 rm -f conftest*
6081
6082 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6083   echo "$ac_t""yes" 1>&6
6084     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6085   { test "$extra_verbose" = "yes" && cat << EOF
6086     Defining $ac_tr_func
6087 EOF
6088 cat >> confdefs.h <<EOF
6089 #define $ac_tr_func 1
6090 EOF
6091 }
6092  
6093 else
6094   echo "$ac_t""no" 1>&6
6095 fi
6096 done
6097
6098
6099   for ac_hdr in X11/Xlocale.h
6100 do
6101 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6102 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6103 echo "configure:6104: checking for $ac_hdr" >&5
6104
6105 cat > conftest.$ac_ext <<EOF
6106 #line 6107 "configure"
6107 #include "confdefs.h"
6108 #include <$ac_hdr>
6109 EOF
6110 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6111 { (eval echo configure:6112: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6112 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6113 if test -z "$ac_err"; then
6114   rm -rf conftest*
6115   eval "ac_cv_header_$ac_safe=yes"
6116 else
6117   echo "$ac_err" >&5
6118   echo "configure: failed program was:" >&5
6119   cat conftest.$ac_ext >&5
6120   rm -rf conftest*
6121   eval "ac_cv_header_$ac_safe=no"
6122 fi
6123 rm -f conftest*
6124 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6125   echo "$ac_t""yes" 1>&6
6126     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6127   { test "$extra_verbose" = "yes" && cat << EOF
6128     Defining $ac_tr_hdr
6129 EOF
6130 cat >> confdefs.h <<EOF
6131 #define $ac_tr_hdr 1
6132 EOF
6133 }
6134  
6135 else
6136   echo "$ac_t""no" 1>&6
6137 fi
6138 done
6139
6140
6141     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
6142 echo "configure:6143: checking for XFree86" >&5
6143   if test -d "/usr/X386/include" -o \
6144           -f "/etc/XF86Config"    -o \
6145           -f "/etc/X11/XF86Config" -o \
6146           -f "/usr/X11R6/lib/X11/XF86Config"; then
6147     echo "$ac_t""yes" 1>&6
6148     { test "$extra_verbose" = "yes" && cat << \EOF
6149     Defining HAVE_XFREE386
6150 EOF
6151 cat >> confdefs.h <<\EOF
6152 #define HAVE_XFREE386 1
6153 EOF
6154 }
6155
6156   else
6157     echo "$ac_t""no" 1>&6
6158   fi
6159
6160     test -z "$with_xmu" && { 
6161 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
6162 echo "configure:6163: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
6163 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
6164
6165 xe_check_libs=" -lXmu "
6166 cat > conftest.$ac_ext <<EOF
6167 #line 6168 "configure"
6168 #include "confdefs.h"
6169 /* Override any gcc2 internal prototype to avoid an error.  */
6170 /* We use char because int might match the return type of a gcc2
6171     builtin and then its argument prototype would still apply.  */
6172 char XmuReadBitmapDataFromFile();
6173
6174 int main() {
6175 XmuReadBitmapDataFromFile()
6176 ; return 0; }
6177 EOF
6178 if { (eval echo configure:6179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6179   rm -rf conftest*
6180   eval "ac_cv_lib_$ac_lib_var=yes"
6181 else
6182   echo "configure: failed program was:" >&5
6183   cat conftest.$ac_ext >&5
6184   rm -rf conftest*
6185   eval "ac_cv_lib_$ac_lib_var=no"
6186 fi
6187 rm -f conftest*
6188 xe_check_libs=""
6189
6190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6191   echo "$ac_t""yes" 1>&6
6192   with_xmu=yes
6193 else
6194   echo "$ac_t""no" 1>&6
6195 with_xmu=no
6196 fi
6197
6198  }
6199   if test "$with_xmu" = "no"; then
6200     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
6201    echo "    xemacs will be linked with \"xmu.o\""
6202  fi
6203   else
6204     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
6205     { test "$extra_verbose" = "yes" && cat << \EOF
6206     Defining HAVE_XMU
6207 EOF
6208 cat >> confdefs.h <<\EOF
6209 #define HAVE_XMU 1
6210 EOF
6211 }
6212
6213   fi
6214
6215       
6216 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
6217 echo "configure:6218: checking for main in -lXbsd" >&5
6218 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
6219
6220 xe_check_libs=" -lXbsd "
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224
6225 int main() {
6226 main()
6227 ; return 0; }
6228 EOF
6229 if { (eval echo configure:6230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6230   rm -rf conftest*
6231   eval "ac_cv_lib_$ac_lib_var=yes"
6232 else
6233   echo "configure: failed program was:" >&5
6234   cat conftest.$ac_ext >&5
6235   rm -rf conftest*
6236   eval "ac_cv_lib_$ac_lib_var=no"
6237 fi
6238 rm -f conftest*
6239 xe_check_libs=""
6240
6241 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6242   echo "$ac_t""yes" 1>&6
6243   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
6244 else
6245   echo "$ac_t""no" 1>&6
6246 fi
6247
6248
6249
6250     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
6251         if test "$GCC" = "yes"; then
6252       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
6253       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
6254     else
6255       case "$CC" in
6256         "xlc" ) CC="xlc_r" ;;
6257         "xlC" ) CC="xlC_r" ;;
6258         "cc"  ) CC="cc_r" ;;
6259       esac
6260     fi
6261   fi
6262
6263 fi 
6264 if test "$with_msw" != "no"; then
6265   echo "checking for MS-Windows" 1>&6
6266 echo "configure:6267: checking for MS-Windows" >&5
6267   
6268 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
6269 echo "configure:6270: checking for main in -lgdi32" >&5
6270 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
6271
6272 xe_check_libs=" -lgdi32 "
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276
6277 int main() {
6278 main()
6279 ; return 0; }
6280 EOF
6281 if { (eval echo configure:6282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6282   rm -rf conftest*
6283   eval "ac_cv_lib_$ac_lib_var=yes"
6284 else
6285   echo "configure: failed program was:" >&5
6286   cat conftest.$ac_ext >&5
6287   rm -rf conftest*
6288   eval "ac_cv_lib_$ac_lib_var=no"
6289 fi
6290 rm -f conftest*
6291 xe_check_libs=""
6292
6293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6294   echo "$ac_t""yes" 1>&6
6295   with_msw=yes
6296 else
6297   echo "$ac_t""no" 1>&6
6298 fi
6299
6300
6301   if test "$with_msw" = "yes"; then
6302     { test "$extra_verbose" = "yes" && cat << \EOF
6303     Defining HAVE_MS_WINDOWS
6304 EOF
6305 cat >> confdefs.h <<\EOF
6306 #define HAVE_MS_WINDOWS 1
6307 EOF
6308 }
6309
6310     install_pp="$blddir/lib-src/installexe.sh"
6311     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32 -lwinspool\" to \$libs_system"; fi
6312     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
6313     if test "$window_system" != x11; then
6314         window_system=msw
6315         test "$with_scrollbars" != "no" && with_scrollbars=msw \
6316             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6317    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6318  fi
6319         test "$with_menubars"   != "no" && with_menubars=msw \
6320             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6321    echo "    xemacs will be linked with \"menubar-msw.o\""
6322  fi
6323         test "$with_toolbars"   != "no" && with_toolbars=msw \
6324             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6325    echo "    xemacs will be linked with \"toolbar-msw.o\""
6326  fi
6327         test "$with_dialogs"   != "no" && with_dialogs=msw \
6328             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6329    echo "    xemacs will be linked with \"dialog-msw.o\""
6330  fi
6331         test "$with_widgets"   != "no" && with_widgets=msw
6332     else
6333         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6334    echo "    xemacs will be linked with \"scrollbar-msw.o\""
6335  fi
6336         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6337    echo "    xemacs will be linked with \"menubar-msw.o\""
6338  fi
6339         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
6340    echo "    xemacs will be linked with \"toolbar-msw.o\""
6341  fi
6342         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
6343    echo "    xemacs will be linked with \"dialog-msw.o\""
6344  fi
6345     fi
6346         cat > conftest.$ac_ext <<EOF
6347 #line 6348 "configure"
6348 #include "confdefs.h"
6349 #include <fcntl.h>
6350     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
6351 EOF
6352 if { (eval echo configure:6353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6353 then
6354   { test "$extra_verbose" = "yes" && cat << \EOF
6355     Defining HAVE_MSG_SELECT
6356 EOF
6357 cat >> confdefs.h <<\EOF
6358 #define HAVE_MSG_SELECT 1
6359 EOF
6360 }
6361
6362 else
6363   conftest_rc="$?"
6364   echo "configure: failed program was:" >&5
6365   cat conftest.$ac_ext >&5
6366 fi
6367 rm -fr conftest*
6368     with_file_coding=yes
6369     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
6370    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\""
6371  fi
6372   fi
6373 fi
6374
6375
6376
6377 test -z "$window_system" && window_system="none"
6378
6379 if test "$window_system" = "none"; then
6380   for feature in menubars scrollbars toolbars dialogs dragndrop xface
6381   do
6382     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6383        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
6384     fi
6385     eval "with_${feature}=no"
6386   done
6387 else
6388   test -z "$with_toolbars" && with_toolbars=yes
6389 fi
6390
6391 if test "$with_msw" != "yes"; then
6392   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
6393   do
6394     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6395        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
6396     fi
6397     eval "with_${feature}=no"
6398   done
6399 else
6400   :
6401 fi
6402
6403 if test "$with_x11" != "yes"; then
6404             for feature in tooltalk cde offix wmcommand xim xmu nas_sound
6405   do
6406     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
6407        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
6408     fi
6409     eval "with_${feature}=no"
6410   done
6411 fi
6412
6413 bitmapdir=
6414
6415 case "$window_system" in
6416   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
6417   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
6418   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
6419 esac
6420
6421 case "$x_libraries" in *X11R4* )
6422   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
6423   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
6424 esac
6425
6426 echo "checking for WM_COMMAND option" 1>&6
6427 echo "configure:6428: checking for WM_COMMAND option" >&5;
6428 if test "$with_wmcommand" != "no"; then
6429   { test "$extra_verbose" = "yes" && cat << \EOF
6430     Defining HAVE_WMCOMMAND
6431 EOF
6432 cat >> confdefs.h <<\EOF
6433 #define HAVE_WMCOMMAND 1
6434 EOF
6435 }
6436
6437 fi
6438
6439 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
6440 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
6441 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
6442 echo "configure:6443: checking for X11/Xauth.h" >&5
6443
6444 cat > conftest.$ac_ext <<EOF
6445 #line 6446 "configure"
6446 #include "confdefs.h"
6447 #include <X11/Xauth.h>
6448 EOF
6449 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6450 { (eval echo configure:6451: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6451 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6452 if test -z "$ac_err"; then
6453   rm -rf conftest*
6454   eval "ac_cv_header_$ac_safe=yes"
6455 else
6456   echo "$ac_err" >&5
6457   echo "configure: failed program was:" >&5
6458   cat conftest.$ac_ext >&5
6459   rm -rf conftest*
6460   eval "ac_cv_header_$ac_safe=no"
6461 fi
6462 rm -f conftest*
6463 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6464   echo "$ac_t""yes" 1>&6
6465   :
6466 else
6467   echo "$ac_t""no" 1>&6
6468 with_xauth=no
6469 fi
6470  }
6471 test -z "$with_xauth" && { 
6472 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6473 echo "configure:6474: checking for XauGetAuthByAddr in -lXau" >&5
6474 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6475
6476 xe_check_libs=" -lXau "
6477 cat > conftest.$ac_ext <<EOF
6478 #line 6479 "configure"
6479 #include "confdefs.h"
6480 /* Override any gcc2 internal prototype to avoid an error.  */
6481 /* We use char because int might match the return type of a gcc2
6482     builtin and then its argument prototype would still apply.  */
6483 char XauGetAuthByAddr();
6484
6485 int main() {
6486 XauGetAuthByAddr()
6487 ; return 0; }
6488 EOF
6489 if { (eval echo configure:6490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6490   rm -rf conftest*
6491   eval "ac_cv_lib_$ac_lib_var=yes"
6492 else
6493   echo "configure: failed program was:" >&5
6494   cat conftest.$ac_ext >&5
6495   rm -rf conftest*
6496   eval "ac_cv_lib_$ac_lib_var=no"
6497 fi
6498 rm -f conftest*
6499 xe_check_libs=""
6500
6501 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6502   echo "$ac_t""yes" 1>&6
6503   :
6504 else
6505   echo "$ac_t""no" 1>&6
6506 with_xauth=no
6507 fi
6508
6509  }
6510 test -z "$with_xauth" && with_xauth=yes
6511 if test "$with_xauth" = "yes"; then
6512   { test "$extra_verbose" = "yes" && cat << \EOF
6513     Defining HAVE_XAUTH
6514 EOF
6515 cat >> confdefs.h <<\EOF
6516 #define HAVE_XAUTH 1
6517 EOF
6518 }
6519
6520   
6521 T=""
6522 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
6523 libs_xauth="$T"
6524
6525 fi
6526
6527
6528
6529
6530 if test "$with_tooltalk" != "no" ; then
6531       for dir in "" "Tt/" "desktop/" ; do
6532     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6533 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6534 echo "configure:6535: checking for ${dir}tt_c.h" >&5
6535
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539 #include <${dir}tt_c.h>
6540 EOF
6541 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6542 { (eval echo configure:6543: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6543 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6544 if test -z "$ac_err"; then
6545   rm -rf conftest*
6546   eval "ac_cv_header_$ac_safe=yes"
6547 else
6548   echo "$ac_err" >&5
6549   echo "configure: failed program was:" >&5
6550   cat conftest.$ac_ext >&5
6551   rm -rf conftest*
6552   eval "ac_cv_header_$ac_safe=no"
6553 fi
6554 rm -f conftest*
6555 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6556   echo "$ac_t""yes" 1>&6
6557   tt_c_h_path="${dir}tt_c.h"; break
6558 else
6559   echo "$ac_t""no" 1>&6
6560 fi
6561
6562   done
6563   if test -z "$tt_c_h_path"; then
6564     if test "$with_tooltalk" = "yes"; then
6565       (echo "$progname: Usage error:"
6566 echo " " "Unable to find required tooltalk header files."
6567 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6568     fi
6569     with_tooltalk=no
6570   fi
6571 fi
6572 if test "$with_tooltalk" != "no" ; then
6573   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6574     
6575 xe_msg_checking="for tt_message_create in -ltt"
6576 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6577 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6578 echo "configure:6579: checking "$xe_msg_checking"" >&5
6579 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6580
6581 xe_check_libs=" -ltt $extra_libs"
6582 cat > conftest.$ac_ext <<EOF
6583 #line 6584 "configure"
6584 #include "confdefs.h"
6585 /* Override any gcc2 internal prototype to avoid an error.  */
6586 /* We use char because int might match the return type of a gcc2
6587     builtin and then its argument prototype would still apply.  */
6588 char tt_message_create();
6589
6590 int main() {
6591 tt_message_create()
6592 ; return 0; }
6593 EOF
6594 if { (eval echo configure:6595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6595   rm -rf conftest*
6596   eval "ac_cv_lib_$ac_lib_var=yes"
6597 else
6598   echo "configure: failed program was:" >&5
6599   cat conftest.$ac_ext >&5
6600   rm -rf conftest*
6601   eval "ac_cv_lib_$ac_lib_var=no"
6602 fi
6603 rm -f conftest*
6604 xe_check_libs=""
6605
6606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6607   echo "$ac_t""yes" 1>&6
6608   tt_libs="-ltt $extra_libs"; break
6609 else
6610   echo "$ac_t""no" 1>&6
6611 :
6612 fi
6613
6614
6615   done
6616   if test -z "$tt_libs"; then
6617     if test "$with_tooltalk" = "yes"; then
6618       (echo "$progname: Usage error:"
6619 echo " " "Unable to find required tooltalk libraries."
6620 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6621     fi
6622     with_tooltalk=no
6623   fi
6624 fi
6625 test -z "$with_tooltalk" && with_tooltalk=yes
6626 if test "$with_tooltalk" = "yes"; then
6627   { test "$extra_verbose" = "yes" && cat << \EOF
6628     Defining TOOLTALK
6629 EOF
6630 cat >> confdefs.h <<\EOF
6631 #define TOOLTALK 1
6632 EOF
6633 }
6634
6635   { test "$extra_verbose" = "yes" && cat << EOF
6636     Defining TT_C_H_PATH = "$tt_c_h_path"
6637 EOF
6638 cat >> confdefs.h <<EOF
6639 #define TT_C_H_PATH "$tt_c_h_path"
6640 EOF
6641 }
6642
6643   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6644   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6645    echo "    xemacs will be linked with \"tooltalk.o\""
6646  fi
6647 fi
6648
6649 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6650 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6651 echo "configure:6652: checking for Dt/Dt.h" >&5
6652
6653 cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 #include <Dt/Dt.h>
6657 EOF
6658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6659 { (eval echo configure:6660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6661 if test -z "$ac_err"; then
6662   rm -rf conftest*
6663   eval "ac_cv_header_$ac_safe=yes"
6664 else
6665   echo "$ac_err" >&5
6666   echo "configure: failed program was:" >&5
6667   cat conftest.$ac_ext >&5
6668   rm -rf conftest*
6669   eval "ac_cv_header_$ac_safe=no"
6670 fi
6671 rm -f conftest*
6672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6673   echo "$ac_t""yes" 1>&6
6674   :
6675 else
6676   echo "$ac_t""no" 1>&6
6677 with_cde=no
6678 fi
6679  }
6680 test -z "$with_cde" && { 
6681 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6682 echo "configure:6683: checking for DtDndDragStart in -lDtSvc" >&5
6683 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6684
6685 xe_check_libs=" -lDtSvc "
6686 cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 /* We use char because int might match the return type of a gcc2
6691     builtin and then its argument prototype would still apply.  */
6692 char DtDndDragStart();
6693
6694 int main() {
6695 DtDndDragStart()
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=no"
6706 fi
6707 rm -f conftest*
6708 xe_check_libs=""
6709
6710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6711   echo "$ac_t""yes" 1>&6
6712   :
6713 else
6714   echo "$ac_t""no" 1>&6
6715 with_cde=no
6716 fi
6717
6718  }
6719 test -z "$with_cde" && with_cde=yes
6720 if test "$with_dragndrop" = no; then
6721   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6722   with_cde=no
6723 fi
6724 if test "$with_cde" = "yes" ; then
6725   { test "$extra_verbose" = "yes" && cat << \EOF
6726     Defining HAVE_CDE
6727 EOF
6728 cat >> confdefs.h <<\EOF
6729 #define HAVE_CDE 1
6730 EOF
6731 }
6732
6733   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6734   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6735   with_tooltalk=yes # CDE requires Tooltalk
6736   need_motif=yes    # CDE requires Motif
6737 fi
6738
6739 test "$window_system" != "x11" && with_offix=no
6740 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6741   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6742   with_offix=no
6743 fi
6744 if test "$with_dragndrop" = no; then
6745   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6746   with_offix=no
6747 fi
6748 if test "$with_cde" = yes; then
6749   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6750   with_offix=no
6751 fi
6752 test -z "$with_offix" && with_offix=no
6753 if test "$with_offix" = "yes"; then
6754   { test "$extra_verbose" = "yes" && cat << \EOF
6755     Defining HAVE_OFFIX_DND
6756 EOF
6757 cat >> confdefs.h <<\EOF
6758 #define HAVE_OFFIX_DND 1
6759 EOF
6760 }
6761
6762   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6763   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6764 fi
6765
6766 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6767 echo "configure:6768: checking if drag and drop API is needed" >&5
6768 if test "$with_dragndrop" != "no" ; then
6769   if test -n "$dragndrop_proto" ; then
6770     with_dragndrop=yes
6771     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6772     { test "$extra_verbose" = "yes" && cat << \EOF
6773     Defining HAVE_DRAGNDROP
6774 EOF
6775 cat >> confdefs.h <<\EOF
6776 #define HAVE_DRAGNDROP 1
6777 EOF
6778 }
6779
6780     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6781   else
6782     with_dragndrop=no
6783     echo "$ac_t""no" 1>&6
6784   fi
6785 fi
6786
6787 echo "checking for LDAP" 1>&6
6788 echo "configure:6789: checking for LDAP" >&5
6789 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6790 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6791 echo "configure:6792: checking for ldap.h" >&5
6792
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 #include <ldap.h>
6797 EOF
6798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6799 { (eval echo configure:6800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6801 if test -z "$ac_err"; then
6802   rm -rf conftest*
6803   eval "ac_cv_header_$ac_safe=yes"
6804 else
6805   echo "$ac_err" >&5
6806   echo "configure: failed program was:" >&5
6807   cat conftest.$ac_ext >&5
6808   rm -rf conftest*
6809   eval "ac_cv_header_$ac_safe=no"
6810 fi
6811 rm -f conftest*
6812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6813   echo "$ac_t""yes" 1>&6
6814   :
6815 else
6816   echo "$ac_t""no" 1>&6
6817 with_ldap=no
6818 fi
6819  }
6820 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6821 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6822 echo "configure:6823: checking for lber.h" >&5
6823
6824 cat > conftest.$ac_ext <<EOF
6825 #line 6826 "configure"
6826 #include "confdefs.h"
6827 #include <lber.h>
6828 EOF
6829 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6830 { (eval echo configure:6831: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6831 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6832 if test -z "$ac_err"; then
6833   rm -rf conftest*
6834   eval "ac_cv_header_$ac_safe=yes"
6835 else
6836   echo "$ac_err" >&5
6837   echo "configure: failed program was:" >&5
6838   cat conftest.$ac_ext >&5
6839   rm -rf conftest*
6840   eval "ac_cv_header_$ac_safe=no"
6841 fi
6842 rm -f conftest*
6843 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6844   echo "$ac_t""yes" 1>&6
6845   :
6846 else
6847   echo "$ac_t""no" 1>&6
6848 with_ldap=no
6849 fi
6850  }
6851 if test "$with_ldap" != "no"; then
6852   
6853 echo $ac_n "checking for ldap_search in -lldap""... $ac_c" 1>&6
6854 echo "configure:6855: checking for ldap_search in -lldap" >&5
6855 ac_lib_var=`echo ldap'_'ldap_search | sed 'y%./+-%__p_%'`
6856
6857 xe_check_libs=" -lldap "
6858 cat > conftest.$ac_ext <<EOF
6859 #line 6860 "configure"
6860 #include "confdefs.h"
6861 /* Override any gcc2 internal prototype to avoid an error.  */
6862 /* We use char because int might match the return type of a gcc2
6863     builtin and then its argument prototype would still apply.  */
6864 char ldap_search();
6865
6866 int main() {
6867 ldap_search()
6868 ; return 0; }
6869 EOF
6870 if { (eval echo configure:6871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6871   rm -rf conftest*
6872   eval "ac_cv_lib_$ac_lib_var=yes"
6873 else
6874   echo "configure: failed program was:" >&5
6875   cat conftest.$ac_ext >&5
6876   rm -rf conftest*
6877   eval "ac_cv_lib_$ac_lib_var=no"
6878 fi
6879 rm -f conftest*
6880 xe_check_libs=""
6881
6882 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6883   echo "$ac_t""yes" 1>&6
6884   with_ldap_nolber=yes
6885 else
6886   echo "$ac_t""no" 1>&6
6887 with_ldap_nolber=no
6888 fi
6889
6890
6891   test "$with_ldap_nolber" = "no" && { 
6892 xe_msg_checking="for ldap_open in -lldap"
6893 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6894 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6895 echo "configure:6896: checking "$xe_msg_checking"" >&5
6896 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6897
6898 xe_check_libs=" -lldap -llber"
6899 cat > conftest.$ac_ext <<EOF
6900 #line 6901 "configure"
6901 #include "confdefs.h"
6902 /* Override any gcc2 internal prototype to avoid an error.  */
6903 /* We use char because int might match the return type of a gcc2
6904     builtin and then its argument prototype would still apply.  */
6905 char ldap_open();
6906
6907 int main() {
6908 ldap_open()
6909 ; return 0; }
6910 EOF
6911 if { (eval echo configure:6912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6912   rm -rf conftest*
6913   eval "ac_cv_lib_$ac_lib_var=yes"
6914 else
6915   echo "configure: failed program was:" >&5
6916   cat conftest.$ac_ext >&5
6917   rm -rf conftest*
6918   eval "ac_cv_lib_$ac_lib_var=no"
6919 fi
6920 rm -f conftest*
6921 xe_check_libs=""
6922
6923 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6924   echo "$ac_t""yes" 1>&6
6925   with_ldap_lber=yes
6926 else
6927   echo "$ac_t""no" 1>&6
6928 with_ldap_lber=no
6929 fi
6930
6931  }
6932   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" && { 
6933 xe_msg_checking="for ldap_open in -lldap"
6934 test -n "-llber -lkrb" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb"
6935 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6936 echo "configure:6937: checking "$xe_msg_checking"" >&5
6937 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6938
6939 xe_check_libs=" -lldap -llber -lkrb"
6940 cat > conftest.$ac_ext <<EOF
6941 #line 6942 "configure"
6942 #include "confdefs.h"
6943 /* Override any gcc2 internal prototype to avoid an error.  */
6944 /* We use char because int might match the return type of a gcc2
6945     builtin and then its argument prototype would still apply.  */
6946 char ldap_open();
6947
6948 int main() {
6949 ldap_open()
6950 ; return 0; }
6951 EOF
6952 if { (eval echo configure:6953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6953   rm -rf conftest*
6954   eval "ac_cv_lib_$ac_lib_var=yes"
6955 else
6956   echo "configure: failed program was:" >&5
6957   cat conftest.$ac_ext >&5
6958   rm -rf conftest*
6959   eval "ac_cv_lib_$ac_lib_var=no"
6960 fi
6961 rm -f conftest*
6962 xe_check_libs=""
6963
6964 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6965   echo "$ac_t""yes" 1>&6
6966   with_ldap_krb=yes
6967 else
6968   echo "$ac_t""no" 1>&6
6969 with_ldap_krb=no
6970 fi
6971
6972  }
6973   test "$with_ldap_nolber" = "no" -a "$with_ldap_lber" = "no" -a "$with_ldap_krb" = "no" && { 
6974 xe_msg_checking="for ldap_open in -lldap"
6975 test -n "-llber -lkrb -ldes" && xe_msg_checking="$xe_msg_checking using extra libs -llber -lkrb -ldes"
6976 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6977 echo "configure:6978: checking "$xe_msg_checking"" >&5
6978 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6979
6980 xe_check_libs=" -lldap -llber -lkrb -ldes"
6981 cat > conftest.$ac_ext <<EOF
6982 #line 6983 "configure"
6983 #include "confdefs.h"
6984 /* Override any gcc2 internal prototype to avoid an error.  */
6985 /* We use char because int might match the return type of a gcc2
6986     builtin and then its argument prototype would still apply.  */
6987 char ldap_open();
6988
6989 int main() {
6990 ldap_open()
6991 ; return 0; }
6992 EOF
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6994   rm -rf conftest*
6995   eval "ac_cv_lib_$ac_lib_var=yes"
6996 else
6997   echo "configure: failed program was:" >&5
6998   cat conftest.$ac_ext >&5
6999   rm -rf conftest*
7000   eval "ac_cv_lib_$ac_lib_var=no"
7001 fi
7002 rm -f conftest*
7003 xe_check_libs=""
7004
7005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7006   echo "$ac_t""yes" 1>&6
7007   with_ldap_krbdes=yes
7008 else
7009   echo "$ac_t""no" 1>&6
7010 with_ldap_krbdes=no
7011 fi
7012
7013  }
7014   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
7015 fi
7016 if test "$with_ldap" = "yes"; then
7017   { test "$extra_verbose" = "yes" && cat << \EOF
7018     Defining HAVE_LDAP
7019 EOF
7020 cat >> confdefs.h <<\EOF
7021 #define HAVE_LDAP 1
7022 EOF
7023 }
7024
7025   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
7026    echo "    xemacs will be linked with \"eldap.o\""
7027  fi
7028   if test "$with_ldap_nolber" = "yes" ; then
7029     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7030   else
7031     if test "$with_ldap_krb" = "yes" ; then
7032       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7033     fi
7034     if test "$with_ldap_krbdes" = "yes" ; then
7035       LIBS="-ldes $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldes\" to \$LIBS"; fi
7036       LIBS="-lkrb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkrb\" to \$LIBS"; fi
7037     fi
7038     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
7039     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
7040   fi
7041   for ac_func in ldap_set_option ldap_get_lderrno ldap_result2error ldap_parse_result
7042 do
7043 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7044 echo "configure:7045: checking for $ac_func" >&5
7045
7046 cat > conftest.$ac_ext <<EOF
7047 #line 7048 "configure"
7048 #include "confdefs.h"
7049 /* System header to define __stub macros and hopefully few prototypes,
7050     which can conflict with char $ac_func(); below.  */
7051 #include <assert.h>
7052 /* Override any gcc2 internal prototype to avoid an error.  */
7053 /* We use char because int might match the return type of a gcc2
7054     builtin and then its argument prototype would still apply.  */
7055 char $ac_func();
7056
7057 int main() {
7058
7059 /* The GNU C library defines this for functions which it implements
7060     to always fail with ENOSYS.  Some functions are actually named
7061     something starting with __ and the normal name is an alias.  */
7062 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7063 choke me
7064 #else
7065 $ac_func();
7066 #endif
7067
7068 ; return 0; }
7069 EOF
7070 if { (eval echo configure:7071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7071   rm -rf conftest*
7072   eval "ac_cv_func_$ac_func=yes"
7073 else
7074   echo "configure: failed program was:" >&5
7075   cat conftest.$ac_ext >&5
7076   rm -rf conftest*
7077   eval "ac_cv_func_$ac_func=no"
7078 fi
7079 rm -f conftest*
7080
7081 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7082   echo "$ac_t""yes" 1>&6
7083     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7084   { test "$extra_verbose" = "yes" && cat << EOF
7085     Defining $ac_tr_func
7086 EOF
7087 cat >> confdefs.h <<EOF
7088 #define $ac_tr_func 1
7089 EOF
7090 }
7091  
7092 else
7093   echo "$ac_t""no" 1>&6
7094 fi
7095 done
7096
7097 fi
7098
7099
7100 if test "$window_system" != "none"; then
7101   echo "checking for graphics libraries" 1>&6
7102 echo "configure:7103: checking for graphics libraries" >&5
7103
7104     xpm_problem=""
7105   if test -z "$with_xpm"; then
7106     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
7107 echo "configure:7108: checking for Xpm - no older than 3.4f" >&5
7108     xe_check_libs=-lXpm
7109     cat > conftest.$ac_ext <<EOF
7110 #line 7111 "configure"
7111 #include "confdefs.h"
7112 #define XPM_NUMBERS
7113 #include <X11/xpm.h>
7114     int main(int c, char **v) {
7115     return c == 1 ? 0 :
7116       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
7117       XpmIncludeVersion < 30406 ? 2 : 0 ;}
7118 EOF
7119 if { (eval echo configure:7120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7120 then
7121   ./conftest dummy_arg; xpm_status=$?;
7122       if test "$xpm_status" = "0"; then
7123         with_xpm=yes;
7124       else
7125         with_xpm=no;
7126         if test "$xpm_status" = "1"; then
7127           xpm_problem="Xpm library version and header file version don't match!"
7128         elif test "$xpm_status" = "2"; then
7129           xpm_problem="Xpm library version is too old!"
7130         else
7131           xpm_problem="Internal xpm detection logic error!"
7132         fi
7133         echo "
7134 *** WARNING *** $xpm_problem
7135   I'm not touching that with a 10-foot pole!
7136   If you really want to use the installed version of Xpm, rerun
7137   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
7138     fi
7139 else
7140   conftest_rc="$?"
7141   echo "configure: failed program was:" >&5
7142   cat conftest.$ac_ext >&5
7143   rm -fr conftest*
7144   with_xpm=no
7145 fi
7146 rm -fr conftest*
7147     xe_check_libs=
7148     echo "$ac_t""$with_xpm" 1>&6
7149   fi
7150   if test "$with_xpm" = "yes"; then
7151     { test "$extra_verbose" = "yes" && cat << \EOF
7152     Defining HAVE_XPM
7153 EOF
7154 cat >> confdefs.h <<\EOF
7155 #define HAVE_XPM 1
7156 EOF
7157 }
7158
7159     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
7160     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
7161 echo "configure:7162: checking for \"FOR_MSW\" xpm" >&5
7162     xe_check_libs=-lXpm
7163     cat > conftest.$ac_ext <<EOF
7164 #line 7165 "configure"
7165 #include "confdefs.h"
7166
7167 int main() {
7168 XpmCreatePixmapFromData()
7169 ; return 0; }
7170 EOF
7171 if { (eval echo configure:7172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7172   rm -rf conftest*
7173   xpm_for_msw=no
7174 else
7175   echo "configure: failed program was:" >&5
7176   cat conftest.$ac_ext >&5
7177   rm -rf conftest*
7178   xpm_for_msw=yes
7179 fi
7180 rm -f conftest*
7181     xe_check_libs=
7182     echo "$ac_t""$xpm_for_msw" 1>&6
7183     if test "$xpm_for_msw" = "yes"; then
7184       { test "$extra_verbose" = "yes" && cat << \EOF
7185     Defining FOR_MSW
7186 EOF
7187 cat >> confdefs.h <<\EOF
7188 #define FOR_MSW 1
7189 EOF
7190 }
7191
7192     fi
7193   fi
7194
7195     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7196 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7197 echo "configure:7198: checking for compface.h" >&5
7198
7199 cat > conftest.$ac_ext <<EOF
7200 #line 7201 "configure"
7201 #include "confdefs.h"
7202 #include <compface.h>
7203 EOF
7204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7205 { (eval echo configure:7206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7207 if test -z "$ac_err"; then
7208   rm -rf conftest*
7209   eval "ac_cv_header_$ac_safe=yes"
7210 else
7211   echo "$ac_err" >&5
7212   echo "configure: failed program was:" >&5
7213   cat conftest.$ac_ext >&5
7214   rm -rf conftest*
7215   eval "ac_cv_header_$ac_safe=no"
7216 fi
7217 rm -f conftest*
7218 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7219   echo "$ac_t""yes" 1>&6
7220   :
7221 else
7222   echo "$ac_t""no" 1>&6
7223 with_xface=no
7224 fi
7225  }
7226   test -z "$with_xface" && { 
7227 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7228 echo "configure:7229: checking for UnGenFace in -lcompface" >&5
7229 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7230
7231 xe_check_libs=" -lcompface "
7232 cat > conftest.$ac_ext <<EOF
7233 #line 7234 "configure"
7234 #include "confdefs.h"
7235 /* Override any gcc2 internal prototype to avoid an error.  */
7236 /* We use char because int might match the return type of a gcc2
7237     builtin and then its argument prototype would still apply.  */
7238 char UnGenFace();
7239
7240 int main() {
7241 UnGenFace()
7242 ; return 0; }
7243 EOF
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7245   rm -rf conftest*
7246   eval "ac_cv_lib_$ac_lib_var=yes"
7247 else
7248   echo "configure: failed program was:" >&5
7249   cat conftest.$ac_ext >&5
7250   rm -rf conftest*
7251   eval "ac_cv_lib_$ac_lib_var=no"
7252 fi
7253 rm -f conftest*
7254 xe_check_libs=""
7255
7256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7257   echo "$ac_t""yes" 1>&6
7258   : 
7259 else
7260   echo "$ac_t""no" 1>&6
7261 with_xface=no
7262 fi
7263
7264  }
7265   test -z "$with_xface" && with_xface=yes
7266   if test "$with_xface" = "yes"; then
7267     { test "$extra_verbose" = "yes" && cat << \EOF
7268     Defining HAVE_XFACE
7269 EOF
7270 cat >> confdefs.h <<\EOF
7271 #define HAVE_XFACE 1
7272 EOF
7273 }
7274
7275     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7276   fi
7277
7278         if test "$with_gif" != "no"; then
7279     with_gif="yes"
7280     { test "$extra_verbose" = "yes" && cat << \EOF
7281     Defining HAVE_GIF
7282 EOF
7283 cat >> confdefs.h <<\EOF
7284 #define HAVE_GIF 1
7285 EOF
7286 }
7287
7288     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
7289    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
7290  fi
7291   fi
7292
7293       if test "$with_png $with_tiff" != "no no"; then
7294     
7295 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
7296 echo "configure:7297: checking for inflate in -lc" >&5
7297 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
7298
7299 xe_check_libs=" -lc "
7300 cat > conftest.$ac_ext <<EOF
7301 #line 7302 "configure"
7302 #include "confdefs.h"
7303 /* Override any gcc2 internal prototype to avoid an error.  */
7304 /* We use char because int might match the return type of a gcc2
7305     builtin and then its argument prototype would still apply.  */
7306 char inflate();
7307
7308 int main() {
7309 inflate()
7310 ; return 0; }
7311 EOF
7312 if { (eval echo configure:7313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7313   rm -rf conftest*
7314   eval "ac_cv_lib_$ac_lib_var=yes"
7315 else
7316   echo "configure: failed program was:" >&5
7317   cat conftest.$ac_ext >&5
7318   rm -rf conftest*
7319   eval "ac_cv_lib_$ac_lib_var=no"
7320 fi
7321 rm -f conftest*
7322 xe_check_libs=""
7323
7324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7325   echo "$ac_t""yes" 1>&6
7326   :
7327 else
7328   echo "$ac_t""no" 1>&6
7329
7330 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
7331 echo "configure:7332: checking for inflate in -lz" >&5
7332 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
7333
7334 xe_check_libs=" -lz "
7335 cat > conftest.$ac_ext <<EOF
7336 #line 7337 "configure"
7337 #include "confdefs.h"
7338 /* Override any gcc2 internal prototype to avoid an error.  */
7339 /* We use char because int might match the return type of a gcc2
7340     builtin and then its argument prototype would still apply.  */
7341 char inflate();
7342
7343 int main() {
7344 inflate()
7345 ; return 0; }
7346 EOF
7347 if { (eval echo configure:7348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7348   rm -rf conftest*
7349   eval "ac_cv_lib_$ac_lib_var=yes"
7350 else
7351   echo "configure: failed program was:" >&5
7352   cat conftest.$ac_ext >&5
7353   rm -rf conftest*
7354   eval "ac_cv_lib_$ac_lib_var=no"
7355 fi
7356 rm -f conftest*
7357 xe_check_libs=""
7358
7359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7360   echo "$ac_t""yes" 1>&6
7361   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
7362 else
7363   echo "$ac_t""no" 1>&6
7364
7365 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
7366 echo "configure:7367: checking for inflate in -lgz" >&5
7367 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
7368
7369 xe_check_libs=" -lgz "
7370 cat > conftest.$ac_ext <<EOF
7371 #line 7372 "configure"
7372 #include "confdefs.h"
7373 /* Override any gcc2 internal prototype to avoid an error.  */
7374 /* We use char because int might match the return type of a gcc2
7375     builtin and then its argument prototype would still apply.  */
7376 char inflate();
7377
7378 int main() {
7379 inflate()
7380 ; return 0; }
7381 EOF
7382 if { (eval echo configure:7383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7383   rm -rf conftest*
7384   eval "ac_cv_lib_$ac_lib_var=yes"
7385 else
7386   echo "configure: failed program was:" >&5
7387   cat conftest.$ac_ext >&5
7388   rm -rf conftest*
7389   eval "ac_cv_lib_$ac_lib_var=no"
7390 fi
7391 rm -f conftest*
7392 xe_check_libs=""
7393
7394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7395   echo "$ac_t""yes" 1>&6
7396   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
7397 else
7398   echo "$ac_t""no" 1>&6
7399 fi
7400
7401
7402 fi
7403
7404
7405 fi
7406
7407
7408   fi
7409
7410     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
7411 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
7412 echo "configure:7413: checking for jpeglib.h" >&5
7413
7414 cat > conftest.$ac_ext <<EOF
7415 #line 7416 "configure"
7416 #include "confdefs.h"
7417 #include <jpeglib.h>
7418 EOF
7419 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7420 { (eval echo configure:7421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7421 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7422 if test -z "$ac_err"; then
7423   rm -rf conftest*
7424   eval "ac_cv_header_$ac_safe=yes"
7425 else
7426   echo "$ac_err" >&5
7427   echo "configure: failed program was:" >&5
7428   cat conftest.$ac_ext >&5
7429   rm -rf conftest*
7430   eval "ac_cv_header_$ac_safe=no"
7431 fi
7432 rm -f conftest*
7433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7434   echo "$ac_t""yes" 1>&6
7435   :
7436 else
7437   echo "$ac_t""no" 1>&6
7438 with_jpeg=no
7439 fi
7440  }
7441   test -z "$with_jpeg" && { 
7442 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
7443 echo "configure:7444: checking for jpeg_destroy_decompress in -ljpeg" >&5
7444 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
7445
7446 xe_check_libs=" -ljpeg "
7447 cat > conftest.$ac_ext <<EOF
7448 #line 7449 "configure"
7449 #include "confdefs.h"
7450 /* Override any gcc2 internal prototype to avoid an error.  */
7451 /* We use char because int might match the return type of a gcc2
7452     builtin and then its argument prototype would still apply.  */
7453 char jpeg_destroy_decompress();
7454
7455 int main() {
7456 jpeg_destroy_decompress()
7457 ; return 0; }
7458 EOF
7459 if { (eval echo configure:7460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7460   rm -rf conftest*
7461   eval "ac_cv_lib_$ac_lib_var=yes"
7462 else
7463   echo "configure: failed program was:" >&5
7464   cat conftest.$ac_ext >&5
7465   rm -rf conftest*
7466   eval "ac_cv_lib_$ac_lib_var=no"
7467 fi
7468 rm -f conftest*
7469 xe_check_libs=""
7470
7471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7472   echo "$ac_t""yes" 1>&6
7473   :
7474 else
7475   echo "$ac_t""no" 1>&6
7476 with_jpeg=no
7477 fi
7478
7479  }
7480   test -z "$with_jpeg" && with_jpeg=yes
7481   if test "$with_jpeg" = "yes"; then
7482     { test "$extra_verbose" = "yes" && cat << \EOF
7483     Defining HAVE_JPEG
7484 EOF
7485 cat >> confdefs.h <<\EOF
7486 #define HAVE_JPEG 1
7487 EOF
7488 }
7489
7490     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
7491   fi
7492
7493     png_problem=""
7494   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
7495 echo "configure:7496: checking for pow" >&5
7496
7497 cat > conftest.$ac_ext <<EOF
7498 #line 7499 "configure"
7499 #include "confdefs.h"
7500 /* System header to define __stub macros and hopefully few prototypes,
7501     which can conflict with char pow(); below.  */
7502 #include <assert.h>
7503 /* Override any gcc2 internal prototype to avoid an error.  */
7504 /* We use char because int might match the return type of a gcc2
7505     builtin and then its argument prototype would still apply.  */
7506 char pow();
7507
7508 int main() {
7509
7510 /* The GNU C library defines this for functions which it implements
7511     to always fail with ENOSYS.  Some functions are actually named
7512     something starting with __ and the normal name is an alias.  */
7513 #if defined (__stub_pow) || defined (__stub___pow)
7514 choke me
7515 #else
7516 pow();
7517 #endif
7518
7519 ; return 0; }
7520 EOF
7521 if { (eval echo configure:7522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7522   rm -rf conftest*
7523   eval "ac_cv_func_pow=yes"
7524 else
7525   echo "configure: failed program was:" >&5
7526   cat conftest.$ac_ext >&5
7527   rm -rf conftest*
7528   eval "ac_cv_func_pow=no"
7529 fi
7530 rm -f conftest*
7531
7532 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
7533   echo "$ac_t""yes" 1>&6
7534   :
7535 else
7536   echo "$ac_t""no" 1>&6
7537 with_png=no
7538 fi
7539  }
7540   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
7541 echo $ac_n "checking for png.h""... $ac_c" 1>&6
7542 echo "configure:7543: checking for png.h" >&5
7543
7544 cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 #include <png.h>
7548 EOF
7549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7550 { (eval echo configure:7551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7552 if test -z "$ac_err"; then
7553   rm -rf conftest*
7554   eval "ac_cv_header_$ac_safe=yes"
7555 else
7556   echo "$ac_err" >&5
7557   echo "configure: failed program was:" >&5
7558   cat conftest.$ac_ext >&5
7559   rm -rf conftest*
7560   eval "ac_cv_header_$ac_safe=no"
7561 fi
7562 rm -f conftest*
7563 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7564   echo "$ac_t""yes" 1>&6
7565   :
7566 else
7567   echo "$ac_t""no" 1>&6
7568 with_png=no
7569 fi
7570  }
7571   test -z "$with_png" && { 
7572 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
7573 echo "configure:7574: checking for png_read_image in -lpng" >&5
7574 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
7575
7576 xe_check_libs=" -lpng "
7577 cat > conftest.$ac_ext <<EOF
7578 #line 7579 "configure"
7579 #include "confdefs.h"
7580 /* Override any gcc2 internal prototype to avoid an error.  */
7581 /* We use char because int might match the return type of a gcc2
7582     builtin and then its argument prototype would still apply.  */
7583 char png_read_image();
7584
7585 int main() {
7586 png_read_image()
7587 ; return 0; }
7588 EOF
7589 if { (eval echo configure:7590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7590   rm -rf conftest*
7591   eval "ac_cv_lib_$ac_lib_var=yes"
7592 else
7593   echo "configure: failed program was:" >&5
7594   cat conftest.$ac_ext >&5
7595   rm -rf conftest*
7596   eval "ac_cv_lib_$ac_lib_var=no"
7597 fi
7598 rm -f conftest*
7599 xe_check_libs=""
7600
7601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7602   echo "$ac_t""yes" 1>&6
7603   :
7604 else
7605   echo "$ac_t""no" 1>&6
7606 with_png=no
7607 fi
7608
7609  }
7610   if test -z "$with_png"; then
7611     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
7612 echo "configure:7613: checking for workable png version information" >&5
7613     xe_check_libs="-lpng -lz"
7614     cat > conftest.$ac_ext <<EOF
7615 #line 7616 "configure"
7616 #include "confdefs.h"
7617 #include <png.h>
7618     int main(int c, char **v) {
7619     if (c == 1) return 0;
7620     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
7621     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
7622 EOF
7623 if { (eval echo configure:7624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
7624 then
7625   ./conftest dummy_arg; png_status=$?;
7626       if test "$png_status" = "0"; then
7627         with_png=yes;
7628       else
7629         with_png=no;
7630         if test "$png_status" = "1"; then
7631           png_problem="PNG library version and header file don't match!"
7632         elif test "$png_status" = "2"; then
7633           png_problem="PNG library version too old (pre 1.0.2)!"
7634         fi
7635         echo "
7636 *** WARNING *** $png_problem
7637   I'm not touching that with a 10-foot pole!
7638   If you really want to use the installed version of libPNG, rerun
7639   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
7640     fi
7641 else
7642   conftest_rc="$?"
7643   echo "configure: failed program was:" >&5
7644   cat conftest.$ac_ext >&5
7645   rm -fr conftest*
7646   with_png=no
7647 fi
7648 rm -fr conftest*
7649     xe_check_libs=
7650     echo "$ac_t""$with_png" 1>&6
7651   fi
7652   if test "$with_png" = "yes"; then
7653     { test "$extra_verbose" = "yes" && cat << \EOF
7654     Defining HAVE_PNG
7655 EOF
7656 cat >> confdefs.h <<\EOF
7657 #define HAVE_PNG 1
7658 EOF
7659 }
7660
7661     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
7662   fi
7663
7664     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
7665 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
7666 echo "configure:7667: checking for tiffio.h" >&5
7667
7668 cat > conftest.$ac_ext <<EOF
7669 #line 7670 "configure"
7670 #include "confdefs.h"
7671 #include <tiffio.h>
7672 EOF
7673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7674 { (eval echo configure:7675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7676 if test -z "$ac_err"; then
7677   rm -rf conftest*
7678   eval "ac_cv_header_$ac_safe=yes"
7679 else
7680   echo "$ac_err" >&5
7681   echo "configure: failed program was:" >&5
7682   cat conftest.$ac_ext >&5
7683   rm -rf conftest*
7684   eval "ac_cv_header_$ac_safe=no"
7685 fi
7686 rm -f conftest*
7687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7688   echo "$ac_t""yes" 1>&6
7689   :
7690 else
7691   echo "$ac_t""no" 1>&6
7692 with_tiff=no
7693 fi
7694  }
7695   test -z "$with_tiff" && { 
7696 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7697 echo "configure:7698: checking for TIFFClientOpen in -ltiff" >&5
7698 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7699
7700 xe_check_libs=" -ltiff "
7701 cat > conftest.$ac_ext <<EOF
7702 #line 7703 "configure"
7703 #include "confdefs.h"
7704 /* Override any gcc2 internal prototype to avoid an error.  */
7705 /* We use char because int might match the return type of a gcc2
7706     builtin and then its argument prototype would still apply.  */
7707 char TIFFClientOpen();
7708
7709 int main() {
7710 TIFFClientOpen()
7711 ; return 0; }
7712 EOF
7713 if { (eval echo configure:7714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7714   rm -rf conftest*
7715   eval "ac_cv_lib_$ac_lib_var=yes"
7716 else
7717   echo "configure: failed program was:" >&5
7718   cat conftest.$ac_ext >&5
7719   rm -rf conftest*
7720   eval "ac_cv_lib_$ac_lib_var=no"
7721 fi
7722 rm -f conftest*
7723 xe_check_libs=""
7724
7725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7726   echo "$ac_t""yes" 1>&6
7727   :
7728 else
7729   echo "$ac_t""no" 1>&6
7730 with_tiff=no
7731 fi
7732
7733  }
7734   test -z "$with_tiff" && with_tiff=yes
7735   if test "$with_tiff" = "yes"; then
7736     { test "$extra_verbose" = "yes" && cat << \EOF
7737     Defining HAVE_TIFF
7738 EOF
7739 cat >> confdefs.h <<\EOF
7740 #define HAVE_TIFF 1
7741 EOF
7742 }
7743
7744     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7745   fi
7746 fi
7747
7748
7749 if test "$with_x11" = "yes"; then
7750
7751   echo "checking for X11 graphics libraries" 1>&6
7752 echo "configure:7753: checking for X11 graphics libraries" >&5
7753
7754   echo "checking for the Athena widgets" 1>&6
7755 echo "configure:7756: checking for the Athena widgets" >&5
7756
7757     case "$with_athena" in
7758         "xaw" | "")     athena_variant=Xaw      athena_3d=no  ;;
7759     "3d")       athena_variant=Xaw3d    athena_3d=yes ;;
7760     "next")     athena_variant=neXtaw   athena_3d=yes ;;
7761     "95")       athena_variant=Xaw95    athena_3d=yes ;;
7762     "xpm")      athena_variant=XawXpm   athena_3d=yes ;;
7763     *)          { echo "Error:" "Unknown Athena widget set \`$with_athena'. This should not happen." >&2; exit 1; } ;;
7764   esac
7765
7766     if test "$athena_3d" = "no"; then
7767     
7768 echo $ac_n "checking for XawScrollbarSetThumb in -l$athena_variant""... $ac_c" 1>&6
7769 echo "configure:7770: checking for XawScrollbarSetThumb in -l$athena_variant" >&5
7770 ac_lib_var=`echo $athena_variant'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7771
7772 xe_check_libs=" -l$athena_variant "
7773 cat > conftest.$ac_ext <<EOF
7774 #line 7775 "configure"
7775 #include "confdefs.h"
7776 /* Override any gcc2 internal prototype to avoid an error.  */
7777 /* We use char because int might match the return type of a gcc2
7778     builtin and then its argument prototype would still apply.  */
7779 char XawScrollbarSetThumb();
7780
7781 int main() {
7782 XawScrollbarSetThumb()
7783 ; return 0; }
7784 EOF
7785 if { (eval echo configure:7786: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7786   rm -rf conftest*
7787   eval "ac_cv_lib_$ac_lib_var=yes"
7788 else
7789   echo "configure: failed program was:" >&5
7790   cat conftest.$ac_ext >&5
7791   rm -rf conftest*
7792   eval "ac_cv_lib_$ac_lib_var=no"
7793 fi
7794 rm -f conftest*
7795 xe_check_libs=""
7796
7797 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7798   echo "$ac_t""yes" 1>&6
7799           
7800 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7801 echo "configure:7802: checking for threeDClassRec in -l$athena_variant" >&5
7802 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7803
7804 xe_check_libs=" -l$athena_variant "
7805 cat > conftest.$ac_ext <<EOF
7806 #line 7807 "configure"
7807 #include "confdefs.h"
7808 /* Override any gcc2 internal prototype to avoid an error.  */
7809 /* We use char because int might match the return type of a gcc2
7810     builtin and then its argument prototype would still apply.  */
7811 char threeDClassRec();
7812
7813 int main() {
7814 threeDClassRec()
7815 ; return 0; }
7816 EOF
7817 if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7818   rm -rf conftest*
7819   eval "ac_cv_lib_$ac_lib_var=yes"
7820 else
7821   echo "configure: failed program was:" >&5
7822   cat conftest.$ac_ext >&5
7823   rm -rf conftest*
7824   eval "ac_cv_lib_$ac_lib_var=no"
7825 fi
7826 rm -f conftest*
7827 xe_check_libs=""
7828
7829 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7830   echo "$ac_t""yes" 1>&6
7831   echo "configure: warning: "Could not find a non-3d Athena widget library."" 1>&2
7832 else
7833   echo "$ac_t""no" 1>&6
7834 athena_lib=$athena_variant
7835 fi
7836
7837
7838       
7839 else
7840   echo "$ac_t""no" 1>&6
7841 echo "configure: warning: "Could not find an Athena widget library."" 1>&2
7842 fi
7843
7844
7845   else
7846         
7847 echo $ac_n "checking for threeDClassRec in -l$athena_variant""... $ac_c" 1>&6
7848 echo "configure:7849: checking for threeDClassRec in -l$athena_variant" >&5
7849 ac_lib_var=`echo $athena_variant'_'threeDClassRec | sed 'y%./+-%__p_%'`
7850
7851 xe_check_libs=" -l$athena_variant "
7852 cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 /* Override any gcc2 internal prototype to avoid an error.  */
7856 /* We use char because int might match the return type of a gcc2
7857     builtin and then its argument prototype would still apply.  */
7858 char threeDClassRec();
7859
7860 int main() {
7861 threeDClassRec()
7862 ; return 0; }
7863 EOF
7864 if { (eval echo configure:7865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7865   rm -rf conftest*
7866   eval "ac_cv_lib_$ac_lib_var=yes"
7867 else
7868   echo "configure: failed program was:" >&5
7869   cat conftest.$ac_ext >&5
7870   rm -rf conftest*
7871   eval "ac_cv_lib_$ac_lib_var=no"
7872 fi
7873 rm -f conftest*
7874 xe_check_libs=""
7875
7876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7877   echo "$ac_t""yes" 1>&6
7878   athena_lib=$athena_variant
7879 else
7880   echo "$ac_t""no" 1>&6
7881 echo $ac_n "checking for threeDClassRec in -lXaw""... $ac_c" 1>&6
7882 echo "configure:7883: checking for threeDClassRec in -lXaw" >&5
7883 ac_lib_var=`echo Xaw'_'threeDClassRec | sed 'y%./+-%__p_%'`
7884
7885 xe_check_libs=" -lXaw "
7886 cat > conftest.$ac_ext <<EOF
7887 #line 7888 "configure"
7888 #include "confdefs.h"
7889 /* Override any gcc2 internal prototype to avoid an error.  */
7890 /* We use char because int might match the return type of a gcc2
7891     builtin and then its argument prototype would still apply.  */
7892 char threeDClassRec();
7893
7894 int main() {
7895 threeDClassRec()
7896 ; return 0; }
7897 EOF
7898 if { (eval echo configure:7899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7899   rm -rf conftest*
7900   eval "ac_cv_lib_$ac_lib_var=yes"
7901 else
7902   echo "configure: failed program was:" >&5
7903   cat conftest.$ac_ext >&5
7904   rm -rf conftest*
7905   eval "ac_cv_lib_$ac_lib_var=no"
7906 fi
7907 rm -f conftest*
7908 xe_check_libs=""
7909
7910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7911   echo "$ac_t""yes" 1>&6
7912   athena_lib=Xaw;
7913           echo "configure: warning: "Assuming that libXaw is actually $athena_variant."" 1>&2;
7914         
7915 else
7916   echo "$ac_t""no" 1>&6
7917 echo "configure: warning: "Could not find a 3d Athena widget library that looked like $athena_variant."" 1>&2
7918 fi
7919
7920
7921 fi
7922
7923
7924   fi
7925
7926     if test "$athena_3d" = "no"; then
7927     ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
7928 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
7929 echo "configure:7930: checking for X11/Xaw/ThreeD.h" >&5
7930
7931 cat > conftest.$ac_ext <<EOF
7932 #line 7933 "configure"
7933 #include "confdefs.h"
7934 #include <X11/Xaw/ThreeD.h>
7935 EOF
7936 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7937 { (eval echo configure:7938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7938 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7939 if test -z "$ac_err"; then
7940   rm -rf conftest*
7941   eval "ac_cv_header_$ac_safe=yes"
7942 else
7943   echo "$ac_err" >&5
7944   echo "configure: failed program was:" >&5
7945   cat conftest.$ac_ext >&5
7946   rm -rf conftest*
7947   eval "ac_cv_header_$ac_safe=no"
7948 fi
7949 rm -f conftest*
7950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7951   echo "$ac_t""yes" 1>&6
7952   echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7953 else
7954   echo "$ac_t""no" 1>&6
7955 ac_safe=`echo "X11/Xaw/XawInit.h" | sed 'y%./+-%__p_%'`
7956 echo $ac_n "checking for X11/Xaw/XawInit.h""... $ac_c" 1>&6
7957 echo "configure:7958: checking for X11/Xaw/XawInit.h" >&5
7958
7959 cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962 #include <X11/Xaw/XawInit.h>
7963 EOF
7964 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7965 { (eval echo configure:7966: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7966 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7967 if test -z "$ac_err"; then
7968   rm -rf conftest*
7969   eval "ac_cv_header_$ac_safe=yes"
7970 else
7971   echo "$ac_err" >&5
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   eval "ac_cv_header_$ac_safe=no"
7976 fi
7977 rm -f conftest*
7978 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7979   echo "$ac_t""yes" 1>&6
7980   athena_h_path=X11/Xaw
7981 else
7982   echo "$ac_t""no" 1>&6
7983 echo "configure: warning: "Could not find a non-3d Athena header set."" 1>&2
7984 fi
7985
7986 fi
7987
7988   else
7989             ac_safe=`echo "X11/$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
7990 echo $ac_n "checking for X11/$athena_variant/XawInit.h""... $ac_c" 1>&6
7991 echo "configure:7992: checking for X11/$athena_variant/XawInit.h" >&5
7992
7993 cat > conftest.$ac_ext <<EOF
7994 #line 7995 "configure"
7995 #include "confdefs.h"
7996 #include <X11/$athena_variant/XawInit.h>
7997 EOF
7998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7999 { (eval echo configure:8000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8001 if test -z "$ac_err"; then
8002   rm -rf conftest*
8003   eval "ac_cv_header_$ac_safe=yes"
8004 else
8005   echo "$ac_err" >&5
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   eval "ac_cv_header_$ac_safe=no"
8010 fi
8011 rm -f conftest*
8012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8013   echo "$ac_t""yes" 1>&6
8014   ac_safe=`echo "X11/$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8015 echo $ac_n "checking for X11/$athena_variant/ThreeD.h""... $ac_c" 1>&6
8016 echo "configure:8017: checking for X11/$athena_variant/ThreeD.h" >&5
8017
8018 cat > conftest.$ac_ext <<EOF
8019 #line 8020 "configure"
8020 #include "confdefs.h"
8021 #include <X11/$athena_variant/ThreeD.h>
8022 EOF
8023 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8024 { (eval echo configure:8025: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8025 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8026 if test -z "$ac_err"; then
8027   rm -rf conftest*
8028   eval "ac_cv_header_$ac_safe=yes"
8029 else
8030   echo "$ac_err" >&5
8031   echo "configure: failed program was:" >&5
8032   cat conftest.$ac_ext >&5
8033   rm -rf conftest*
8034   eval "ac_cv_header_$ac_safe=no"
8035 fi
8036 rm -f conftest*
8037 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8038   echo "$ac_t""yes" 1>&6
8039   athena_h_path=X11/$athena_variant
8040 else
8041   echo "$ac_t""no" 1>&6
8042 fi
8043
8044 else
8045   echo "$ac_t""no" 1>&6
8046 fi
8047
8048
8049         if test -z "$athena_h_path"; then
8050       ac_safe=`echo "$athena_variant/XawInit.h" | sed 'y%./+-%__p_%'`
8051 echo $ac_n "checking for $athena_variant/XawInit.h""... $ac_c" 1>&6
8052 echo "configure:8053: checking for $athena_variant/XawInit.h" >&5
8053
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 #include <$athena_variant/XawInit.h>
8058 EOF
8059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8060 { (eval echo configure:8061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8062 if test -z "$ac_err"; then
8063   rm -rf conftest*
8064   eval "ac_cv_header_$ac_safe=yes"
8065 else
8066   echo "$ac_err" >&5
8067   echo "configure: failed program was:" >&5
8068   cat conftest.$ac_ext >&5
8069   rm -rf conftest*
8070   eval "ac_cv_header_$ac_safe=no"
8071 fi
8072 rm -f conftest*
8073 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8074   echo "$ac_t""yes" 1>&6
8075   ac_safe=`echo "$athena_variant/ThreeD.h" | sed 'y%./+-%__p_%'`
8076 echo $ac_n "checking for $athena_variant/ThreeD.h""... $ac_c" 1>&6
8077 echo "configure:8078: checking for $athena_variant/ThreeD.h" >&5
8078
8079 cat > conftest.$ac_ext <<EOF
8080 #line 8081 "configure"
8081 #include "confdefs.h"
8082 #include <$athena_variant/ThreeD.h>
8083 EOF
8084 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8085 { (eval echo configure:8086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8086 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8087 if test -z "$ac_err"; then
8088   rm -rf conftest*
8089   eval "ac_cv_header_$ac_safe=yes"
8090 else
8091   echo "$ac_err" >&5
8092   echo "configure: failed program was:" >&5
8093   cat conftest.$ac_ext >&5
8094   rm -rf conftest*
8095   eval "ac_cv_header_$ac_safe=no"
8096 fi
8097 rm -f conftest*
8098 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8099   echo "$ac_t""yes" 1>&6
8100   athena_h_path=$athena_variant
8101 else
8102   echo "$ac_t""no" 1>&6
8103 fi
8104
8105 else
8106   echo "$ac_t""no" 1>&6
8107 fi
8108
8109     fi
8110
8111         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8112       ac_safe=`echo "X11/Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8113 echo $ac_n "checking for X11/Xaw3d/XawInit.h""... $ac_c" 1>&6
8114 echo "configure:8115: checking for X11/Xaw3d/XawInit.h" >&5
8115
8116 cat > conftest.$ac_ext <<EOF
8117 #line 8118 "configure"
8118 #include "confdefs.h"
8119 #include <X11/Xaw3d/XawInit.h>
8120 EOF
8121 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8122 { (eval echo configure:8123: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8123 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8124 if test -z "$ac_err"; then
8125   rm -rf conftest*
8126   eval "ac_cv_header_$ac_safe=yes"
8127 else
8128   echo "$ac_err" >&5
8129   echo "configure: failed program was:" >&5
8130   cat conftest.$ac_ext >&5
8131   rm -rf conftest*
8132   eval "ac_cv_header_$ac_safe=no"
8133 fi
8134 rm -f conftest*
8135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8136   echo "$ac_t""yes" 1>&6
8137   ac_safe=`echo "X11/Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8138 echo $ac_n "checking for X11/Xaw3d/ThreeD.h""... $ac_c" 1>&6
8139 echo "configure:8140: checking for X11/Xaw3d/ThreeD.h" >&5
8140
8141 cat > conftest.$ac_ext <<EOF
8142 #line 8143 "configure"
8143 #include "confdefs.h"
8144 #include <X11/Xaw3d/ThreeD.h>
8145 EOF
8146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8147 { (eval echo configure:8148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8149 if test -z "$ac_err"; then
8150   rm -rf conftest*
8151   eval "ac_cv_header_$ac_safe=yes"
8152 else
8153   echo "$ac_err" >&5
8154   echo "configure: failed program was:" >&5
8155   cat conftest.$ac_ext >&5
8156   rm -rf conftest*
8157   eval "ac_cv_header_$ac_safe=no"
8158 fi
8159 rm -f conftest*
8160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8161   echo "$ac_t""yes" 1>&6
8162   
8163             echo "configure: warning: "Assuming that X11/Xaw3d headers are suitable for $athena_variant."" 1>&2
8164             athena_h_path=X11/Xaw3d
8165           
8166 else
8167   echo "$ac_t""no" 1>&6
8168 fi
8169
8170 else
8171   echo "$ac_t""no" 1>&6
8172 fi
8173
8174     fi
8175
8176         if test -z "$athena_h_path" -a "$athena_variant" != "Xaw3d"; then
8177       ac_safe=`echo "Xaw3d/XawInit.h" | sed 'y%./+-%__p_%'`
8178 echo $ac_n "checking for Xaw3d/XawInit.h""... $ac_c" 1>&6
8179 echo "configure:8180: checking for Xaw3d/XawInit.h" >&5
8180
8181 cat > conftest.$ac_ext <<EOF
8182 #line 8183 "configure"
8183 #include "confdefs.h"
8184 #include <Xaw3d/XawInit.h>
8185 EOF
8186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8187 { (eval echo configure:8188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8189 if test -z "$ac_err"; then
8190   rm -rf conftest*
8191   eval "ac_cv_header_$ac_safe=yes"
8192 else
8193   echo "$ac_err" >&5
8194   echo "configure: failed program was:" >&5
8195   cat conftest.$ac_ext >&5
8196   rm -rf conftest*
8197   eval "ac_cv_header_$ac_safe=no"
8198 fi
8199 rm -f conftest*
8200 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8201   echo "$ac_t""yes" 1>&6
8202   ac_safe=`echo "Xaw3d/ThreeD.h" | sed 'y%./+-%__p_%'`
8203 echo $ac_n "checking for Xaw3d/ThreeD.h""... $ac_c" 1>&6
8204 echo "configure:8205: checking for Xaw3d/ThreeD.h" >&5
8205
8206 cat > conftest.$ac_ext <<EOF
8207 #line 8208 "configure"
8208 #include "confdefs.h"
8209 #include <Xaw3d/ThreeD.h>
8210 EOF
8211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8212 { (eval echo configure:8213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8214 if test -z "$ac_err"; then
8215   rm -rf conftest*
8216   eval "ac_cv_header_$ac_safe=yes"
8217 else
8218   echo "$ac_err" >&5
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221   rm -rf conftest*
8222   eval "ac_cv_header_$ac_safe=no"
8223 fi
8224 rm -f conftest*
8225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8226   echo "$ac_t""yes" 1>&6
8227   
8228             echo "configure: warning: "Assuming that Xaw3d headers are suitable for $athena_variant."" 1>&2
8229             athena_h_path=Xaw3d
8230           
8231 else
8232   echo "$ac_t""no" 1>&6
8233 fi
8234
8235 else
8236   echo "$ac_t""no" 1>&6
8237 fi
8238
8239     fi
8240
8241             if test -z "$athena_h_path"; then
8242       ac_safe=`echo "X11/Xaw/ThreeD.h" | sed 'y%./+-%__p_%'`
8243 echo $ac_n "checking for X11/Xaw/ThreeD.h""... $ac_c" 1>&6
8244 echo "configure:8245: checking for X11/Xaw/ThreeD.h" >&5
8245
8246 cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 #include <X11/Xaw/ThreeD.h>
8250 EOF
8251 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8252 { (eval echo configure:8253: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8253 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8254 if test -z "$ac_err"; then
8255   rm -rf conftest*
8256   eval "ac_cv_header_$ac_safe=yes"
8257 else
8258   echo "$ac_err" >&5
8259   echo "configure: failed program was:" >&5
8260   cat conftest.$ac_ext >&5
8261   rm -rf conftest*
8262   eval "ac_cv_header_$ac_safe=no"
8263 fi
8264 rm -f conftest*
8265 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8266   echo "$ac_t""yes" 1>&6
8267   
8268           echo "configure: warning: "Assuming that X11/Xaw headers are suitable for $athena_variant."" 1>&2
8269           athena_h_path=X11/Xaw
8270         
8271 else
8272   echo "$ac_t""no" 1>&6
8273 echo "configure: warning: "Could not find a suitable 3d Athena header set."" 1>&2
8274 fi
8275
8276     fi
8277   fi
8278
8279     if test -n "$athena_lib" -a -n "$athena_h_path"; then
8280     have_xaw=yes
8281   else
8282     have_xaw=no
8283   fi
8284
8285     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
8286 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
8287 echo "configure:8288: checking for Xm/Xm.h" >&5
8288
8289 cat > conftest.$ac_ext <<EOF
8290 #line 8291 "configure"
8291 #include "confdefs.h"
8292 #include <Xm/Xm.h>
8293 EOF
8294 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8295 { (eval echo configure:8296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8296 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8297 if test -z "$ac_err"; then
8298   rm -rf conftest*
8299   eval "ac_cv_header_$ac_safe=yes"
8300 else
8301   echo "$ac_err" >&5
8302   echo "configure: failed program was:" >&5
8303   cat conftest.$ac_ext >&5
8304   rm -rf conftest*
8305   eval "ac_cv_header_$ac_safe=no"
8306 fi
8307 rm -f conftest*
8308 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8309   echo "$ac_t""yes" 1>&6
8310   
8311 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
8312 echo "configure:8313: checking for XmStringFree in -lXm" >&5
8313 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
8314
8315 xe_check_libs=" -lXm "
8316 cat > conftest.$ac_ext <<EOF
8317 #line 8318 "configure"
8318 #include "confdefs.h"
8319 /* Override any gcc2 internal prototype to avoid an error.  */
8320 /* We use char because int might match the return type of a gcc2
8321     builtin and then its argument prototype would still apply.  */
8322 char XmStringFree();
8323
8324 int main() {
8325 XmStringFree()
8326 ; return 0; }
8327 EOF
8328 if { (eval echo configure:8329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8329   rm -rf conftest*
8330   eval "ac_cv_lib_$ac_lib_var=yes"
8331 else
8332   echo "configure: failed program was:" >&5
8333   cat conftest.$ac_ext >&5
8334   rm -rf conftest*
8335   eval "ac_cv_lib_$ac_lib_var=no"
8336 fi
8337 rm -f conftest*
8338 xe_check_libs=""
8339
8340 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8341   echo "$ac_t""yes" 1>&6
8342   have_motif=yes
8343 else
8344   echo "$ac_t""no" 1>&6
8345 have_motif=no
8346 fi
8347
8348
8349 else
8350   echo "$ac_t""no" 1>&6
8351 have_motif=no
8352 fi
8353
8354
8355   if test "$have_motif" = "yes"; then
8356         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
8357 echo "configure:8358: checking for Lesstif" >&5
8358     cat > conftest.$ac_ext <<EOF
8359 #line 8360 "configure"
8360 #include "confdefs.h"
8361 #include <Xm/Xm.h>
8362 #ifdef LESSTIF_VERSION
8363 yes
8364 #endif
8365
8366 EOF
8367 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8368   egrep "yes" >/dev/null 2>&1; then
8369   rm -rf conftest*
8370   have_lesstif=yes
8371 else
8372   rm -rf conftest*
8373   have_lesstif=no
8374 fi
8375 rm -f conftest*
8376
8377   echo "$ac_t""$have_lesstif" 1>&6
8378   fi
8379
8380 fi 
8381
8382 case "$with_menubars" in "" | "yes" | "athena" )
8383   with_menubars="lucid" ;;
8384 esac
8385 case "$with_dialogs" in "" | "yes" | "lucid" )
8386   if   test "$have_motif"     = "yes"; then with_dialogs="motif"
8387   elif test "$have_xaw"       = "yes"; then with_dialogs="athena"
8388   else with_dialogs=no
8389   fi ;;
8390 esac
8391 case "$with_scrollbars" in "" | "yes" )
8392   with_scrollbars="lucid" ;;
8393 esac
8394 case "$with_widgets" in "" | "yes" | "lucid")
8395   if   test "$have_motif" = "yes"; then with_widgets="motif"
8396   elif test "$have_xaw"   = "yes"; then with_widgets="athena"
8397   else with_widgets=no
8398   fi ;;
8399 esac
8400
8401 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars $with_widgets"
8402
8403 case "$all_widgets" in
8404   *athena* )
8405     if test "$have_xaw" != "yes"; then
8406       { echo "Error:" "Could not find a suitable Athena library to build with." >&2; exit 1; }
8407     fi
8408
8409         lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
8410
8411         libs_x="-l$athena_lib $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$athena_lib\" to \$libs_x"; fi
8412
8413             { test "$extra_verbose" = "yes" && cat << EOF
8414     Defining ATHENA_H_PATH = $athena_h_path
8415 EOF
8416 cat >> confdefs.h <<EOF
8417 #define ATHENA_H_PATH $athena_h_path
8418 EOF
8419 }
8420
8421
8422     { test "$extra_verbose" = "yes" && cat << \EOF
8423     Defining LWLIB_USES_ATHENA
8424 EOF
8425 cat >> confdefs.h <<\EOF
8426 #define LWLIB_USES_ATHENA 1
8427 EOF
8428 }
8429
8430     { test "$extra_verbose" = "yes" && cat << \EOF
8431     Defining NEED_ATHENA
8432 EOF
8433 cat >> confdefs.h <<\EOF
8434 #define NEED_ATHENA 1
8435 EOF
8436 }
8437
8438
8439     if test "$athena_3d" = "yes"; then
8440       { test "$extra_verbose" = "yes" && cat << \EOF
8441     Defining HAVE_ATHENA_3D
8442 EOF
8443 cat >> confdefs.h <<\EOF
8444 #define HAVE_ATHENA_3D 1
8445 EOF
8446 }
8447
8448     fi
8449   ;;
8450 esac
8451
8452 case "$all_widgets" in *motif* )
8453   { test "$extra_verbose" = "yes" && cat << \EOF
8454     Defining LWLIB_USES_MOTIF
8455 EOF
8456 cat >> confdefs.h <<\EOF
8457 #define LWLIB_USES_MOTIF 1
8458 EOF
8459 }
8460
8461   { test "$extra_verbose" = "yes" && cat << \EOF
8462     Defining NEED_MOTIF
8463 EOF
8464 cat >> confdefs.h <<\EOF
8465 #define NEED_MOTIF 1
8466 EOF
8467 }
8468
8469   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
8470   need_motif=yes ;;
8471 esac
8472
8473 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8474 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
8475 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
8476 test "$with_widgets"   != "no" && test "$with_widgets" != "msw" && \
8477         lwlib_objs="$lwlib_objs xlwtabs.o xlwgcs.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwtabs.o xlwgcs.o\" to \$lwlib_objs"; fi
8478 case "$with_widgets" in athena* )
8479         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;;
8480 esac
8481 case "$all_widgets" in *lucid* )
8482   { test "$extra_verbose" = "yes" && cat << \EOF
8483     Defining NEED_LUCID
8484 EOF
8485 cat >> confdefs.h <<\EOF
8486 #define NEED_LUCID 1
8487 EOF
8488 }
8489
8490   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
8491 esac
8492
8493
8494
8495 test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8496     Defining LWLIB_SCROLLBARS_ATHENA
8497 EOF
8498 cat >> confdefs.h <<\EOF
8499 #define LWLIB_SCROLLBARS_ATHENA 1
8500 EOF
8501 }
8502
8503 test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8504     Defining LWLIB_DIALOGS_ATHENA
8505 EOF
8506 cat >> confdefs.h <<\EOF
8507 #define LWLIB_DIALOGS_ATHENA 1
8508 EOF
8509 }
8510
8511
8512 if test "$athena_3d" = "yes"; then
8513   test "$with_scrollbars" = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8514     Defining LWLIB_SCROLLBARS_ATHENA3D
8515 EOF
8516 cat >> confdefs.h <<\EOF
8517 #define LWLIB_SCROLLBARS_ATHENA3D 1
8518 EOF
8519 }
8520
8521   test "$with_dialogs"    = "athena" && { test "$extra_verbose" = "yes" && cat << \EOF
8522     Defining LWLIB_DIALOGS_ATHENA3D
8523 EOF
8524 cat >> confdefs.h <<\EOF
8525 #define LWLIB_DIALOGS_ATHENA3D 1
8526 EOF
8527 }
8528
8529 fi
8530
8531 case "$with_widgets" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
8532     Defining LWLIB_WIDGETS_ATHENA
8533 EOF
8534 cat >> confdefs.h <<\EOF
8535 #define LWLIB_WIDGETS_ATHENA 1
8536 EOF
8537 }
8538 ;; esac
8539 test "$with_widgets" != "no" && test "$with_widgets" != "msw" && \
8540         { test "$extra_verbose" = "yes" && cat << \EOF
8541     Defining LWLIB_TABS_LUCID
8542 EOF
8543 cat >> confdefs.h <<\EOF
8544 #define LWLIB_TABS_LUCID 1
8545 EOF
8546 }
8547
8548
8549 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8550     Defining HAVE_MENUBARS
8551 EOF
8552 cat >> confdefs.h <<\EOF
8553 #define HAVE_MENUBARS 1
8554 EOF
8555 }
8556
8557 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8558     Defining HAVE_SCROLLBARS
8559 EOF
8560 cat >> confdefs.h <<\EOF
8561 #define HAVE_SCROLLBARS 1
8562 EOF
8563 }
8564
8565 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8566     Defining HAVE_DIALOGS
8567 EOF
8568 cat >> confdefs.h <<\EOF
8569 #define HAVE_DIALOGS 1
8570 EOF
8571 }
8572
8573 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8574     Defining HAVE_TOOLBARS
8575 EOF
8576 cat >> confdefs.h <<\EOF
8577 #define HAVE_TOOLBARS 1
8578 EOF
8579 }
8580
8581 test "$with_widgets"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
8582     Defining HAVE_WIDGETS
8583 EOF
8584 cat >> confdefs.h <<\EOF
8585 #define HAVE_WIDGETS 1
8586 EOF
8587 }
8588
8589
8590 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8591     Defining LWLIB_MENUBARS_LUCID
8592 EOF
8593 cat >> confdefs.h <<\EOF
8594 #define LWLIB_MENUBARS_LUCID 1
8595 EOF
8596 }
8597
8598 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
8599     Defining LWLIB_SCROLLBARS_LUCID
8600 EOF
8601 cat >> confdefs.h <<\EOF
8602 #define LWLIB_SCROLLBARS_LUCID 1
8603 EOF
8604 }
8605
8606
8607 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8608     Defining LWLIB_MENUBARS_MOTIF
8609 EOF
8610 cat >> confdefs.h <<\EOF
8611 #define LWLIB_MENUBARS_MOTIF 1
8612 EOF
8613 }
8614
8615 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8616     Defining LWLIB_SCROLLBARS_MOTIF
8617 EOF
8618 cat >> confdefs.h <<\EOF
8619 #define LWLIB_SCROLLBARS_MOTIF 1
8620 EOF
8621 }
8622
8623 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8624     Defining LWLIB_DIALOGS_MOTIF
8625 EOF
8626 cat >> confdefs.h <<\EOF
8627 #define LWLIB_DIALOGS_MOTIF 1
8628 EOF
8629 }
8630
8631 test "$with_widgets"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
8632     Defining LWLIB_WIDGETS_MOTIF
8633 EOF
8634 cat >> confdefs.h <<\EOF
8635 #define LWLIB_WIDGETS_MOTIF 1
8636 EOF
8637 }
8638
8639
8640 test "$with_menubars"   != "no"    && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
8641    echo "    xemacs will be linked with \"menubar.o\""
8642  fi
8643 test "$with_scrollbars" != "no"    && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
8644    echo "    xemacs will be linked with \"scrollbar.o\""
8645  fi
8646 test "$with_dialogs"    != "no"    && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
8647    echo "    xemacs will be linked with \"dialog.o\""
8648  fi
8649 test "$with_toolbars"   != "no"    && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
8650    echo "    xemacs will be linked with \"toolbar.o\""
8651  fi
8652
8653 if test "$with_x11" = "yes"; then
8654   test "$with_menubars"   != "no"  && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
8655    echo "    xemacs will be linked with \"menubar-x.o\""
8656  fi
8657   test "$with_scrollbars" != "no"  && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8658    echo "    xemacs will be linked with \"scrollbar-x.o\""
8659  fi
8660   test "$with_dialogs"    != "no"  && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
8661    echo "    xemacs will be linked with \"dialog-x.o\""
8662  fi
8663   test "$with_toolbars"   != "no"  && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
8664    echo "    xemacs will be linked with \"toolbar-x.o\""
8665  fi
8666   test "$all_widgets" != "no no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
8667    echo "    xemacs will be linked with \"gui-x.o\""
8668  fi
8669 fi
8670
8671
8672 test -z "$with_mule" && with_mule=no
8673 test -z "$with_file_coding" && with_file_coding=no
8674
8675
8676 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
8677   { test "$extra_verbose" = "yes" && cat << \EOF
8678     Defining FILE_CODING
8679 EOF
8680 cat >> confdefs.h <<\EOF
8681 #define FILE_CODING 1
8682 EOF
8683 }
8684
8685   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8686    echo "    xemacs will be linked with \"file-coding.o\""
8687  fi
8688 fi
8689
8690 if test "$with_mule" = "yes" ; then
8691   echo "checking for Mule-related features" 1>&6
8692 echo "configure:8693: checking for Mule-related features" >&5
8693   { test "$extra_verbose" = "yes" && cat << \EOF
8694     Defining MULE
8695 EOF
8696 cat >> confdefs.h <<\EOF
8697 #define MULE 1
8698 EOF
8699 }
8700
8701   { test "$extra_verbose" = "yes" && cat << \EOF
8702     Defining FILE_CODING
8703 EOF
8704 cat >> confdefs.h <<\EOF
8705 #define FILE_CODING 1
8706 EOF
8707 }
8708
8709   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
8710    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o file-coding.o\""
8711  fi
8712
8713     for ac_hdr in libintl.h
8714 do
8715 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8716 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8717 echo "configure:8718: checking for $ac_hdr" >&5
8718
8719 cat > conftest.$ac_ext <<EOF
8720 #line 8721 "configure"
8721 #include "confdefs.h"
8722 #include <$ac_hdr>
8723 EOF
8724 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8725 { (eval echo configure:8726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8726 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8727 if test -z "$ac_err"; then
8728   rm -rf conftest*
8729   eval "ac_cv_header_$ac_safe=yes"
8730 else
8731   echo "$ac_err" >&5
8732   echo "configure: failed program was:" >&5
8733   cat conftest.$ac_ext >&5
8734   rm -rf conftest*
8735   eval "ac_cv_header_$ac_safe=no"
8736 fi
8737 rm -f conftest*
8738 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8739   echo "$ac_t""yes" 1>&6
8740     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8741   { test "$extra_verbose" = "yes" && cat << EOF
8742     Defining $ac_tr_hdr
8743 EOF
8744 cat >> confdefs.h <<EOF
8745 #define $ac_tr_hdr 1
8746 EOF
8747 }
8748  
8749 else
8750   echo "$ac_t""no" 1>&6
8751 fi
8752 done
8753
8754   
8755 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
8756 echo "configure:8757: checking for strerror in -lintl" >&5
8757 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
8758
8759 xe_check_libs=" -lintl "
8760 cat > conftest.$ac_ext <<EOF
8761 #line 8762 "configure"
8762 #include "confdefs.h"
8763 /* Override any gcc2 internal prototype to avoid an error.  */
8764 /* We use char because int might match the return type of a gcc2
8765     builtin and then its argument prototype would still apply.  */
8766 char strerror();
8767
8768 int main() {
8769 strerror()
8770 ; return 0; }
8771 EOF
8772 if { (eval echo configure:8773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8773   rm -rf conftest*
8774   eval "ac_cv_lib_$ac_lib_var=yes"
8775 else
8776   echo "configure: failed program was:" >&5
8777   cat conftest.$ac_ext >&5
8778   rm -rf conftest*
8779   eval "ac_cv_lib_$ac_lib_var=no"
8780 fi
8781 rm -f conftest*
8782 xe_check_libs=""
8783
8784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8785   echo "$ac_t""yes" 1>&6
8786     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8788   { test "$extra_verbose" = "yes" && cat << EOF
8789     Defining $ac_tr_lib
8790 EOF
8791 cat >> confdefs.h <<EOF
8792 #define $ac_tr_lib 1
8793 EOF
8794 }
8795
8796   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
8797
8798 else
8799   echo "$ac_t""no" 1>&6
8800 fi
8801
8802
8803
8804   echo "checking for Mule input methods" 1>&6
8805 echo "configure:8806: checking for Mule input methods" >&5
8806         case "$with_xim" in "" | "yes" )
8807     echo "checking for XIM" 1>&6
8808 echo "configure:8809: checking for XIM" >&5
8809     
8810 echo $ac_n "checking for XOpenIM in -lX11""... $ac_c" 1>&6
8811 echo "configure:8812: checking for XOpenIM in -lX11" >&5
8812 ac_lib_var=`echo X11'_'XOpenIM | sed 'y%./+-%__p_%'`
8813
8814 xe_check_libs=" -lX11 "
8815 cat > conftest.$ac_ext <<EOF
8816 #line 8817 "configure"
8817 #include "confdefs.h"
8818 /* Override any gcc2 internal prototype to avoid an error.  */
8819 /* We use char because int might match the return type of a gcc2
8820     builtin and then its argument prototype would still apply.  */
8821 char XOpenIM();
8822
8823 int main() {
8824 XOpenIM()
8825 ; return 0; }
8826 EOF
8827 if { (eval echo configure:8828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8828   rm -rf conftest*
8829   eval "ac_cv_lib_$ac_lib_var=yes"
8830 else
8831   echo "configure: failed program was:" >&5
8832   cat conftest.$ac_ext >&5
8833   rm -rf conftest*
8834   eval "ac_cv_lib_$ac_lib_var=no"
8835 fi
8836 rm -f conftest*
8837 xe_check_libs=""
8838
8839 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8840   echo "$ac_t""yes" 1>&6
8841   with_xim=xlib
8842 else
8843   echo "$ac_t""no" 1>&6
8844 with_xim=no
8845 fi
8846
8847
8848         if test "$have_motif $have_lesstif" = "yes no"; then
8849       
8850 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
8851 echo "configure:8852: checking for XmImMbLookupString in -lXm" >&5
8852 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
8853
8854 xe_check_libs=" -lXm "
8855 cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 /* Override any gcc2 internal prototype to avoid an error.  */
8859 /* We use char because int might match the return type of a gcc2
8860     builtin and then its argument prototype would still apply.  */
8861 char XmImMbLookupString();
8862
8863 int main() {
8864 XmImMbLookupString()
8865 ; return 0; }
8866 EOF
8867 if { (eval echo configure:8868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8868   rm -rf conftest*
8869   eval "ac_cv_lib_$ac_lib_var=yes"
8870 else
8871   echo "configure: failed program was:" >&5
8872   cat conftest.$ac_ext >&5
8873   rm -rf conftest*
8874   eval "ac_cv_lib_$ac_lib_var=no"
8875 fi
8876 rm -f conftest*
8877 xe_check_libs=""
8878
8879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8880   echo "$ac_t""yes" 1>&6
8881   with_xim=motif
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885
8886
8887     fi ;;
8888   esac
8889   if test "$with_xim" != "no"; then
8890     { test "$extra_verbose" = "yes" && cat << \EOF
8891     Defining HAVE_XIM
8892 EOF
8893 cat >> confdefs.h <<\EOF
8894 #define HAVE_XIM 1
8895 EOF
8896 }
8897
8898     if test "$with_xim" = "xlib"; then
8899       { test "$extra_verbose" = "yes" && cat << \EOF
8900     Defining XIM_XLIB
8901 EOF
8902 cat >> confdefs.h <<\EOF
8903 #define XIM_XLIB 1
8904 EOF
8905 }
8906
8907       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
8908    echo "    xemacs will be linked with \"input-method-xlib.o\""
8909  fi
8910     fi
8911     if test "$with_xim" = "motif"; then
8912       { test "$extra_verbose" = "yes" && cat << \EOF
8913     Defining XIM_MOTIF
8914 EOF
8915 cat >> confdefs.h <<\EOF
8916 #define XIM_MOTIF 1
8917 EOF
8918 }
8919
8920       need_motif=yes
8921       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
8922    echo "    xemacs will be linked with \"input-method-motif.o\""
8923  fi
8924     fi
8925     if test "$with_xim" = "motif"; then
8926       with_xfs=no
8927     fi
8928   fi
8929
8930     if test "$with_xfs" = "yes" ; then
8931     echo "checking for XFontSet" 1>&6
8932 echo "configure:8933: checking for XFontSet" >&5
8933     
8934 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
8935 echo "configure:8936: checking for XmbDrawString in -lX11" >&5
8936 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
8937
8938 xe_check_libs=" -lX11 "
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942 /* Override any gcc2 internal prototype to avoid an error.  */
8943 /* We use char because int might match the return type of a gcc2
8944     builtin and then its argument prototype would still apply.  */
8945 char XmbDrawString();
8946
8947 int main() {
8948 XmbDrawString()
8949 ; return 0; }
8950 EOF
8951 if { (eval echo configure:8952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8952   rm -rf conftest*
8953   eval "ac_cv_lib_$ac_lib_var=yes"
8954 else
8955   echo "configure: failed program was:" >&5
8956   cat conftest.$ac_ext >&5
8957   rm -rf conftest*
8958   eval "ac_cv_lib_$ac_lib_var=no"
8959 fi
8960 rm -f conftest*
8961 xe_check_libs=""
8962
8963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8964   echo "$ac_t""yes" 1>&6
8965   :
8966 else
8967   echo "$ac_t""no" 1>&6
8968 with_xfs=no
8969 fi
8970
8971
8972     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
8973       { test "$extra_verbose" = "yes" && cat << \EOF
8974     Defining USE_XFONTSET
8975 EOF
8976 cat >> confdefs.h <<\EOF
8977 #define USE_XFONTSET 1
8978 EOF
8979 }
8980
8981       if test "$with_xim" = "no" ; then
8982         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
8983    echo "    xemacs will be linked with \"input-method-xfs.o\""
8984  fi
8985       fi
8986     fi
8987   fi 
8988     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
8989   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
8990 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
8991 echo "configure:8992: checking for wnn/jllib.h" >&5
8992
8993 cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 #include <wnn/jllib.h>
8997 EOF
8998 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8999 { (eval echo configure:9000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9000 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9001 if test -z "$ac_err"; then
9002   rm -rf conftest*
9003   eval "ac_cv_header_$ac_safe=yes"
9004 else
9005   echo "$ac_err" >&5
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   eval "ac_cv_header_$ac_safe=no"
9010 fi
9011 rm -f conftest*
9012 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9013   echo "$ac_t""yes" 1>&6
9014   :
9015 else
9016   echo "$ac_t""no" 1>&6
9017 with_wnn=no
9018 fi
9019  }
9020     if test "$with_wnn" != "no"; then
9021     for ac_func in crypt
9022 do
9023 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9024 echo "configure:9025: checking for $ac_func" >&5
9025
9026 cat > conftest.$ac_ext <<EOF
9027 #line 9028 "configure"
9028 #include "confdefs.h"
9029 /* System header to define __stub macros and hopefully few prototypes,
9030     which can conflict with char $ac_func(); below.  */
9031 #include <assert.h>
9032 /* Override any gcc2 internal prototype to avoid an error.  */
9033 /* We use char because int might match the return type of a gcc2
9034     builtin and then its argument prototype would still apply.  */
9035 char $ac_func();
9036
9037 int main() {
9038
9039 /* The GNU C library defines this for functions which it implements
9040     to always fail with ENOSYS.  Some functions are actually named
9041     something starting with __ and the normal name is an alias.  */
9042 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9043 choke me
9044 #else
9045 $ac_func();
9046 #endif
9047
9048 ; return 0; }
9049 EOF
9050 if { (eval echo configure:9051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9051   rm -rf conftest*
9052   eval "ac_cv_func_$ac_func=yes"
9053 else
9054   echo "configure: failed program was:" >&5
9055   cat conftest.$ac_ext >&5
9056   rm -rf conftest*
9057   eval "ac_cv_func_$ac_func=no"
9058 fi
9059 rm -f conftest*
9060
9061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9062   echo "$ac_t""yes" 1>&6
9063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9064   { test "$extra_verbose" = "yes" && cat << EOF
9065     Defining $ac_tr_func
9066 EOF
9067 cat >> confdefs.h <<EOF
9068 #define $ac_tr_func 1
9069 EOF
9070 }
9071  
9072 else
9073   echo "$ac_t""no" 1>&6
9074 fi
9075 done
9076
9077     test "$ac_cv_func_crypt" != "yes" && { 
9078 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
9079 echo "configure:9080: checking for crypt in -lcrypt" >&5
9080 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
9081
9082 xe_check_libs=" -lcrypt "
9083 cat > conftest.$ac_ext <<EOF
9084 #line 9085 "configure"
9085 #include "confdefs.h"
9086 /* Override any gcc2 internal prototype to avoid an error.  */
9087 /* We use char because int might match the return type of a gcc2
9088     builtin and then its argument prototype would still apply.  */
9089 char crypt();
9090
9091 int main() {
9092 crypt()
9093 ; return 0; }
9094 EOF
9095 if { (eval echo configure:9096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9096   rm -rf conftest*
9097   eval "ac_cv_lib_$ac_lib_var=yes"
9098 else
9099   echo "configure: failed program was:" >&5
9100   cat conftest.$ac_ext >&5
9101   rm -rf conftest*
9102   eval "ac_cv_lib_$ac_lib_var=no"
9103 fi
9104 rm -f conftest*
9105 xe_check_libs=""
9106
9107 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9108   echo "$ac_t""yes" 1>&6
9109     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9110     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9111   { test "$extra_verbose" = "yes" && cat << EOF
9112     Defining $ac_tr_lib
9113 EOF
9114 cat >> confdefs.h <<EOF
9115 #define $ac_tr_lib 1
9116 EOF
9117 }
9118
9119   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
9120
9121 else
9122   echo "$ac_t""no" 1>&6
9123 fi
9124
9125  }
9126   fi
9127     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
9128     
9129 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
9130 echo "configure:9131: checking for jl_dic_list_e in -lwnn" >&5
9131 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9132
9133 xe_check_libs=" -lwnn "
9134 cat > conftest.$ac_ext <<EOF
9135 #line 9136 "configure"
9136 #include "confdefs.h"
9137 /* Override any gcc2 internal prototype to avoid an error.  */
9138 /* We use char because int might match the return type of a gcc2
9139     builtin and then its argument prototype would still apply.  */
9140 char jl_dic_list_e();
9141
9142 int main() {
9143 jl_dic_list_e()
9144 ; return 0; }
9145 EOF
9146 if { (eval echo configure:9147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9147   rm -rf conftest*
9148   eval "ac_cv_lib_$ac_lib_var=yes"
9149 else
9150   echo "configure: failed program was:" >&5
9151   cat conftest.$ac_ext >&5
9152   rm -rf conftest*
9153   eval "ac_cv_lib_$ac_lib_var=no"
9154 fi
9155 rm -f conftest*
9156 xe_check_libs=""
9157
9158 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9159   echo "$ac_t""yes" 1>&6
9160   libwnn=wnn
9161 else
9162   echo "$ac_t""no" 1>&6
9163 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
9164 echo "configure:9165: checking for jl_dic_list_e in -lwnn4" >&5
9165 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9166
9167 xe_check_libs=" -lwnn4 "
9168 cat > conftest.$ac_ext <<EOF
9169 #line 9170 "configure"
9170 #include "confdefs.h"
9171 /* Override any gcc2 internal prototype to avoid an error.  */
9172 /* We use char because int might match the return type of a gcc2
9173     builtin and then its argument prototype would still apply.  */
9174 char jl_dic_list_e();
9175
9176 int main() {
9177 jl_dic_list_e()
9178 ; return 0; }
9179 EOF
9180 if { (eval echo configure:9181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9181   rm -rf conftest*
9182   eval "ac_cv_lib_$ac_lib_var=yes"
9183 else
9184   echo "configure: failed program was:" >&5
9185   cat conftest.$ac_ext >&5
9186   rm -rf conftest*
9187   eval "ac_cv_lib_$ac_lib_var=no"
9188 fi
9189 rm -f conftest*
9190 xe_check_libs=""
9191
9192 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9193   echo "$ac_t""yes" 1>&6
9194   libwnn=wnn4
9195 else
9196   echo "$ac_t""no" 1>&6
9197 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
9198 echo "configure:9199: checking for jl_dic_list_e in -lwnn6" >&5
9199 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
9200
9201 xe_check_libs=" -lwnn6 "
9202 cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* Override any gcc2 internal prototype to avoid an error.  */
9206 /* We use char because int might match the return type of a gcc2
9207     builtin and then its argument prototype would still apply.  */
9208 char jl_dic_list_e();
9209
9210 int main() {
9211 jl_dic_list_e()
9212 ; return 0; }
9213 EOF
9214 if { (eval echo configure:9215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=yes"
9217 else
9218   echo "configure: failed program was:" >&5
9219   cat conftest.$ac_ext >&5
9220   rm -rf conftest*
9221   eval "ac_cv_lib_$ac_lib_var=no"
9222 fi
9223 rm -f conftest*
9224 xe_check_libs=""
9225
9226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9227   echo "$ac_t""yes" 1>&6
9228   libwnn=wnn6
9229 else
9230   echo "$ac_t""no" 1>&6
9231 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
9232 echo "configure:9233: checking for dic_list_e in -lwnn6_fromsrc" >&5
9233 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
9234
9235 xe_check_libs=" -lwnn6_fromsrc "
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239 /* Override any gcc2 internal prototype to avoid an error.  */
9240 /* We use char because int might match the return type of a gcc2
9241     builtin and then its argument prototype would still apply.  */
9242 char dic_list_e();
9243
9244 int main() {
9245 dic_list_e()
9246 ; return 0; }
9247 EOF
9248 if { (eval echo configure:9249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=yes"
9251 else
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=no"
9256 fi
9257 rm -f conftest*
9258 xe_check_libs=""
9259
9260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9261   echo "$ac_t""yes" 1>&6
9262   libwnn=wnn6_fromsrc
9263 else
9264   echo "$ac_t""no" 1>&6
9265 with_wnn=no
9266 fi
9267
9268
9269 fi
9270
9271
9272 fi
9273
9274
9275 fi
9276
9277
9278   fi
9279   test -z "$with_wnn" && with_wnn=yes
9280   if test "$with_wnn" = "yes"; then
9281     { test "$extra_verbose" = "yes" && cat << \EOF
9282     Defining HAVE_WNN
9283 EOF
9284 cat >> confdefs.h <<\EOF
9285 #define HAVE_WNN 1
9286 EOF
9287 }
9288
9289     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
9290     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
9291    echo "    xemacs will be linked with \"mule-wnnfns.o\""
9292  fi
9293     if test "$with_wnn6" != "no"; then
9294       
9295 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
9296 echo "configure:9297: checking for jl_fi_dic_list in -l$libwnn" >&5
9297 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
9298
9299 xe_check_libs=" -l$libwnn "
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9303 /* Override any gcc2 internal prototype to avoid an error.  */
9304 /* We use char because int might match the return type of a gcc2
9305     builtin and then its argument prototype would still apply.  */
9306 char jl_fi_dic_list();
9307
9308 int main() {
9309 jl_fi_dic_list()
9310 ; return 0; }
9311 EOF
9312 if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9313   rm -rf conftest*
9314   eval "ac_cv_lib_$ac_lib_var=yes"
9315 else
9316   echo "configure: failed program was:" >&5
9317   cat conftest.$ac_ext >&5
9318   rm -rf conftest*
9319   eval "ac_cv_lib_$ac_lib_var=no"
9320 fi
9321 rm -f conftest*
9322 xe_check_libs=""
9323
9324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9325   echo "$ac_t""yes" 1>&6
9326   with_wnn6=yes
9327 else
9328   echo "$ac_t""no" 1>&6
9329 fi
9330
9331
9332       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9333     Defining WNN6
9334 EOF
9335 cat >> confdefs.h <<\EOF
9336 #define WNN6 1
9337 EOF
9338 }
9339
9340     fi
9341   fi
9342
9343     canna_includes_found=no
9344   if test "$with_canna" != "no"; then
9345     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9346 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9347 echo "configure:9348: checking for canna/jrkanji.h" >&5
9348
9349 cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <canna/jrkanji.h>
9353 EOF
9354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9355 { (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9357 if test -z "$ac_err"; then
9358   rm -rf conftest*
9359   eval "ac_cv_header_$ac_safe=yes"
9360 else
9361   echo "$ac_err" >&5
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   eval "ac_cv_header_$ac_safe=no"
9366 fi
9367 rm -f conftest*
9368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9369   echo "$ac_t""yes" 1>&6
9370   canna_includes_found=yes
9371 else
9372   echo "$ac_t""no" 1>&6
9373 fi
9374
9375   fi
9376   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
9377       -d "/usr/local/canna/include"; then
9378     save_c_switch_site="$c_switch_site"
9379     c_switch_site="$c_switch_site -I/usr/local/canna/include"
9380     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
9381 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
9382 echo "configure:9383: checking for canna/jrkanji.h" >&5
9383
9384 cat > conftest.$ac_ext <<EOF
9385 #line 9386 "configure"
9386 #include "confdefs.h"
9387 #include <canna/jrkanji.h>
9388 EOF
9389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9390 { (eval echo configure:9391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9392 if test -z "$ac_err"; then
9393   rm -rf conftest*
9394   eval "ac_cv_header_$ac_safe=yes"
9395 else
9396   echo "$ac_err" >&5
9397   echo "configure: failed program was:" >&5
9398   cat conftest.$ac_ext >&5
9399   rm -rf conftest*
9400   eval "ac_cv_header_$ac_safe=no"
9401 fi
9402 rm -f conftest*
9403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9404   echo "$ac_t""yes" 1>&6
9405   canna_includes_found=yes
9406 else
9407   echo "$ac_t""no" 1>&6
9408 fi
9409
9410     if test "$canna_includes_found" != "yes"; then
9411       c_switch_site="$save_c_switch_site"
9412       with_canna="no"
9413     fi
9414   fi
9415
9416   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
9417 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
9418 echo "configure:9419: checking for canna/RK.h" >&5
9419
9420 cat > conftest.$ac_ext <<EOF
9421 #line 9422 "configure"
9422 #include "confdefs.h"
9423 #include <canna/RK.h>
9424 EOF
9425 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9426 { (eval echo configure:9427: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9427 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9428 if test -z "$ac_err"; then
9429   rm -rf conftest*
9430   eval "ac_cv_header_$ac_safe=yes"
9431 else
9432   echo "$ac_err" >&5
9433   echo "configure: failed program was:" >&5
9434   cat conftest.$ac_ext >&5
9435   rm -rf conftest*
9436   eval "ac_cv_header_$ac_safe=no"
9437 fi
9438 rm -f conftest*
9439 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9440   echo "$ac_t""yes" 1>&6
9441   :
9442 else
9443   echo "$ac_t""no" 1>&6
9444 with_canna=no
9445 fi
9446  }
9447   test -z "$with_canna" && { 
9448 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
9449 echo "configure:9450: checking for RkBgnBun in -lRKC" >&5
9450 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
9451
9452 xe_check_libs=" -lRKC "
9453 cat > conftest.$ac_ext <<EOF
9454 #line 9455 "configure"
9455 #include "confdefs.h"
9456 /* Override any gcc2 internal prototype to avoid an error.  */
9457 /* We use char because int might match the return type of a gcc2
9458     builtin and then its argument prototype would still apply.  */
9459 char RkBgnBun();
9460
9461 int main() {
9462 RkBgnBun()
9463 ; return 0; }
9464 EOF
9465 if { (eval echo configure:9466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9466   rm -rf conftest*
9467   eval "ac_cv_lib_$ac_lib_var=yes"
9468 else
9469   echo "configure: failed program was:" >&5
9470   cat conftest.$ac_ext >&5
9471   rm -rf conftest*
9472   eval "ac_cv_lib_$ac_lib_var=no"
9473 fi
9474 rm -f conftest*
9475 xe_check_libs=""
9476
9477 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9478   echo "$ac_t""yes" 1>&6
9479   :
9480 else
9481   echo "$ac_t""no" 1>&6
9482 with_canna=no
9483 fi
9484
9485  }
9486   test -z "$with_canna" && { 
9487 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
9488 echo "configure:9489: checking for jrKanjiControl in -lcanna" >&5
9489 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
9490
9491 xe_check_libs=" -lcanna "
9492 cat > conftest.$ac_ext <<EOF
9493 #line 9494 "configure"
9494 #include "confdefs.h"
9495 /* Override any gcc2 internal prototype to avoid an error.  */
9496 /* We use char because int might match the return type of a gcc2
9497     builtin and then its argument prototype would still apply.  */
9498 char jrKanjiControl();
9499
9500 int main() {
9501 jrKanjiControl()
9502 ; return 0; }
9503 EOF
9504 if { (eval echo configure:9505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9505   rm -rf conftest*
9506   eval "ac_cv_lib_$ac_lib_var=yes"
9507 else
9508   echo "configure: failed program was:" >&5
9509   cat conftest.$ac_ext >&5
9510   rm -rf conftest*
9511   eval "ac_cv_lib_$ac_lib_var=no"
9512 fi
9513 rm -f conftest*
9514 xe_check_libs=""
9515
9516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9517   echo "$ac_t""yes" 1>&6
9518   :
9519 else
9520   echo "$ac_t""no" 1>&6
9521 with_canna=no
9522 fi
9523
9524  }
9525   test -z "$with_canna" && with_canna=yes
9526   if test "$with_canna" = "yes"; then
9527     { test "$extra_verbose" = "yes" && cat << \EOF
9528     Defining HAVE_CANNA
9529 EOF
9530 cat >> confdefs.h <<\EOF
9531 #define HAVE_CANNA 1
9532 EOF
9533 }
9534
9535     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
9536     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
9537    echo "    xemacs will be linked with \"mule-canna.o\""
9538  fi
9539   fi
9540
9541 else   for feature in xim canna wnn; do
9542     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
9543       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
9544     fi
9545     eval "with_${feature}=no"
9546   done
9547 fi 
9548
9549 if test "$need_motif" = "yes" ; then
9550   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
9551     
9552 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
9553 echo "configure:9554: checking for layout_object_getvalue in -li18n" >&5
9554 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
9555
9556 xe_check_libs=" -li18n "
9557 cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* Override any gcc2 internal prototype to avoid an error.  */
9561 /* We use char because int might match the return type of a gcc2
9562     builtin and then its argument prototype would still apply.  */
9563 char layout_object_getvalue();
9564
9565 int main() {
9566 layout_object_getvalue()
9567 ; return 0; }
9568 EOF
9569 if { (eval echo configure:9570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9570   rm -rf conftest*
9571   eval "ac_cv_lib_$ac_lib_var=yes"
9572 else
9573   echo "configure: failed program was:" >&5
9574   cat conftest.$ac_ext >&5
9575   rm -rf conftest*
9576   eval "ac_cv_lib_$ac_lib_var=no"
9577 fi
9578 rm -f conftest*
9579 xe_check_libs=""
9580
9581 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9582   echo "$ac_t""yes" 1>&6
9583   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
9584 else
9585   echo "$ac_t""no" 1>&6
9586 fi
9587
9588
9589   
9590 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
9591     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9592   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
9593   
9594         runpath="" runpath_dirs=""
9595   if test -n "$LD_RUN_PATH"; then
9596     runpath="$LD_RUN_PATH"
9597   elif test "$GCC" = "yes"; then
9598         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
9599     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
9600     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
9601     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
9602       case "$arg" in P,* | -L* | -R* )
9603         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
9604           {
9605 xe_runpath_dir="$dir"
9606   test "$xe_runpath_dir" != "/lib"     -a \
9607         "$xe_runpath_dir" != "/usr/lib" -a \
9608         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9609   eval "$xe_add_unique_runpath_dir"
9610 }
9611         done ;;
9612       esac
9613     done
9614     ld_switch_run="$ld_switch_run_save"
9615     rm -f conftest*
9616   else
9617         for arg in $ld_switch_site $ld_switch_x_site; do
9618       case "$arg" in -L*) {
9619 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
9620   test "$xe_runpath_dir" != "/lib"     -a \
9621         "$xe_runpath_dir" != "/usr/lib" -a \
9622         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
9623   eval "$xe_add_unique_runpath_dir"
9624 };; esac
9625     done
9626         if test "$opsys $need_motif" = "sol2 yes"; then
9627       xe_runpath_dir="/opt/SUNWdt/lib";
9628       eval "$xe_add_unique_runpath_dir";
9629     fi
9630   fi 
9631   if test -n "$runpath"; then
9632     ld_switch_run="${dash_r}${runpath}"
9633     
9634 if test "$GCC" = "yes"; then
9635   set x $ld_switch_run; shift; ld_switch_run=""
9636   while test -n "$1"; do
9637     case $1 in
9638       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
9639       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
9640       -Xlinker* ) ;;
9641       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
9642     esac
9643     shift
9644   done
9645 fi
9646     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
9647   fi
9648 fi
9649
9650 fi
9651
9652 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime getaddrinfo gethostname getnameinfo getpagesize gettimeofday getcwd getpt getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf stpcpy strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf fsync ftruncate umask
9653 do
9654 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9655 echo "configure:9656: checking for $ac_func" >&5
9656
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 /* System header to define __stub macros and hopefully few prototypes,
9661     which can conflict with char $ac_func(); below.  */
9662 #include <assert.h>
9663 /* Override any gcc2 internal prototype to avoid an error.  */
9664 /* We use char because int might match the return type of a gcc2
9665     builtin and then its argument prototype would still apply.  */
9666 char $ac_func();
9667
9668 int main() {
9669
9670 /* The GNU C library defines this for functions which it implements
9671     to always fail with ENOSYS.  Some functions are actually named
9672     something starting with __ and the normal name is an alias.  */
9673 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9674 choke me
9675 #else
9676 $ac_func();
9677 #endif
9678
9679 ; return 0; }
9680 EOF
9681 if { (eval echo configure:9682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9682   rm -rf conftest*
9683   eval "ac_cv_func_$ac_func=yes"
9684 else
9685   echo "configure: failed program was:" >&5
9686   cat conftest.$ac_ext >&5
9687   rm -rf conftest*
9688   eval "ac_cv_func_$ac_func=no"
9689 fi
9690 rm -f conftest*
9691
9692 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9693   echo "$ac_t""yes" 1>&6
9694     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9695   { test "$extra_verbose" = "yes" && cat << EOF
9696     Defining $ac_tr_func
9697 EOF
9698 cat >> confdefs.h <<EOF
9699 #define $ac_tr_func 1
9700 EOF
9701 }
9702  
9703 else
9704   echo "$ac_t""no" 1>&6
9705 fi
9706 done
9707
9708
9709 extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
9710    echo "    xemacs will be linked with \"realpath.o\""
9711  fi
9712
9713 for ac_func in getloadavg
9714 do
9715 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9716 echo "configure:9717: checking for $ac_func" >&5
9717
9718 cat > conftest.$ac_ext <<EOF
9719 #line 9720 "configure"
9720 #include "confdefs.h"
9721 /* System header to define __stub macros and hopefully few prototypes,
9722     which can conflict with char $ac_func(); below.  */
9723 #include <assert.h>
9724 /* Override any gcc2 internal prototype to avoid an error.  */
9725 /* We use char because int might match the return type of a gcc2
9726     builtin and then its argument prototype would still apply.  */
9727 char $ac_func();
9728
9729 int main() {
9730
9731 /* The GNU C library defines this for functions which it implements
9732     to always fail with ENOSYS.  Some functions are actually named
9733     something starting with __ and the normal name is an alias.  */
9734 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9735 choke me
9736 #else
9737 $ac_func();
9738 #endif
9739
9740 ; return 0; }
9741 EOF
9742 if { (eval echo configure:9743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9743   rm -rf conftest*
9744   eval "ac_cv_func_$ac_func=yes"
9745 else
9746   echo "configure: failed program was:" >&5
9747   cat conftest.$ac_ext >&5
9748   rm -rf conftest*
9749   eval "ac_cv_func_$ac_func=no"
9750 fi
9751 rm -f conftest*
9752
9753 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9754   echo "$ac_t""yes" 1>&6
9755     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9756   { test "$extra_verbose" = "yes" && cat << EOF
9757     Defining $ac_tr_func
9758 EOF
9759 cat >> confdefs.h <<EOF
9760 #define $ac_tr_func 1
9761 EOF
9762 }
9763  
9764 else
9765   echo "$ac_t""no" 1>&6
9766 fi
9767 done
9768
9769
9770 if test "$ac_cv_func_getloadavg" != "yes"
9771 then
9772   extra_objs="$extra_objs getloadavg.o" &&  if test "$extra_verbose" = "yes"; then
9773    echo "    xemacs will be linked with \"getloadavg.o\""
9774  fi
9775
9776     
9777 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
9778 echo "configure:9779: checking for kstat_open in -lkstat" >&5
9779 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
9780
9781 xe_check_libs=" -lkstat "
9782 cat > conftest.$ac_ext <<EOF
9783 #line 9784 "configure"
9784 #include "confdefs.h"
9785 /* Override any gcc2 internal prototype to avoid an error.  */
9786 /* We use char because int might match the return type of a gcc2
9787     builtin and then its argument prototype would still apply.  */
9788 char kstat_open();
9789
9790 int main() {
9791 kstat_open()
9792 ; return 0; }
9793 EOF
9794 if { (eval echo configure:9795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9795   rm -rf conftest*
9796   eval "ac_cv_lib_$ac_lib_var=yes"
9797 else
9798   echo "configure: failed program was:" >&5
9799   cat conftest.$ac_ext >&5
9800   rm -rf conftest*
9801   eval "ac_cv_lib_$ac_lib_var=no"
9802 fi
9803 rm -f conftest*
9804 xe_check_libs=""
9805
9806 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9807   echo "$ac_t""yes" 1>&6
9808     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9809     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9810   { test "$extra_verbose" = "yes" && cat << EOF
9811     Defining $ac_tr_lib
9812 EOF
9813 cat >> confdefs.h <<EOF
9814 #define $ac_tr_lib 1
9815 EOF
9816 }
9817
9818   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
9819
9820 else
9821   echo "$ac_t""no" 1>&6
9822 fi
9823
9824
9825
9826     
9827 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
9828 echo "configure:9829: checking for kvm_read in -lkvm" >&5
9829 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
9830
9831 xe_check_libs=" -lkvm "
9832 cat > conftest.$ac_ext <<EOF
9833 #line 9834 "configure"
9834 #include "confdefs.h"
9835 /* Override any gcc2 internal prototype to avoid an error.  */
9836 /* We use char because int might match the return type of a gcc2
9837     builtin and then its argument prototype would still apply.  */
9838 char kvm_read();
9839
9840 int main() {
9841 kvm_read()
9842 ; return 0; }
9843 EOF
9844 if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9845   rm -rf conftest*
9846   eval "ac_cv_lib_$ac_lib_var=yes"
9847 else
9848   echo "configure: failed program was:" >&5
9849   cat conftest.$ac_ext >&5
9850   rm -rf conftest*
9851   eval "ac_cv_lib_$ac_lib_var=no"
9852 fi
9853 rm -f conftest*
9854 xe_check_libs=""
9855
9856 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
9857   echo "$ac_t""yes" 1>&6
9858     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9859     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9860   { test "$extra_verbose" = "yes" && cat << EOF
9861     Defining $ac_tr_lib
9862 EOF
9863 cat >> confdefs.h <<EOF
9864 #define $ac_tr_lib 1
9865 EOF
9866 }
9867
9868   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
9869
9870 else
9871   echo "$ac_t""no" 1>&6
9872 fi
9873
9874
9875 fi
9876
9877 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
9878 echo "configure:9879: checking whether netdb declares h_errno" >&5
9879 cat > conftest.$ac_ext <<EOF
9880 #line 9881 "configure"
9881 #include "confdefs.h"
9882 #include <netdb.h>
9883 int main() {
9884 return h_errno;
9885 ; return 0; }
9886 EOF
9887 if { (eval echo configure:9888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9888   rm -rf conftest*
9889   echo "$ac_t""yes" 1>&6
9890    { test "$extra_verbose" = "yes" && cat << \EOF
9891     Defining HAVE_H_ERRNO
9892 EOF
9893 cat >> confdefs.h <<\EOF
9894 #define HAVE_H_ERRNO 1
9895 EOF
9896 }
9897
9898 else
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   echo "$ac_t""no" 1>&6
9903 fi
9904 rm -f conftest*
9905
9906 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
9907 echo "configure:9908: checking for sigsetjmp" >&5
9908 cat > conftest.$ac_ext <<EOF
9909 #line 9910 "configure"
9910 #include "confdefs.h"
9911 #include <setjmp.h>
9912 int main() {
9913 sigjmp_buf bar; sigsetjmp (bar, 0);
9914 ; return 0; }
9915 EOF
9916 if { (eval echo configure:9917: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9917   rm -rf conftest*
9918   echo "$ac_t""yes" 1>&6
9919    { test "$extra_verbose" = "yes" && cat << \EOF
9920     Defining HAVE_SIGSETJMP
9921 EOF
9922 cat >> confdefs.h <<\EOF
9923 #define HAVE_SIGSETJMP 1
9924 EOF
9925 }
9926
9927 else
9928   echo "configure: failed program was:" >&5
9929   cat conftest.$ac_ext >&5
9930   rm -rf conftest*
9931   echo "$ac_t""no" 1>&6
9932 fi
9933 rm -f conftest*
9934
9935 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
9936 echo "configure:9937: checking whether localtime caches TZ" >&5
9937
9938 if test "$ac_cv_func_tzset" = "yes"; then
9939 cat > conftest.$ac_ext <<EOF
9940 #line 9941 "configure"
9941 #include "confdefs.h"
9942 #include <time.h>
9943 #if STDC_HEADERS
9944 # include <stdlib.h>
9945 #endif
9946 extern char **environ;
9947 unset_TZ ()
9948 {
9949   char **from, **to;
9950   for (to = from = environ; (*to = *from); from++)
9951     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
9952       to++;
9953 }
9954 char TZ_GMT0[] = "TZ=GMT0";
9955 char TZ_PST8[] = "TZ=PST8";
9956 main()
9957 {
9958   time_t now = time ((time_t *) 0);
9959   int hour_GMT0, hour_unset;
9960   if (putenv (TZ_GMT0) != 0)
9961     exit (1);
9962   hour_GMT0 = localtime (&now)->tm_hour;
9963   unset_TZ ();
9964   hour_unset = localtime (&now)->tm_hour;
9965   if (putenv (TZ_PST8) != 0)
9966     exit (1);
9967   if (localtime (&now)->tm_hour == hour_GMT0)
9968     exit (1);
9969   unset_TZ ();
9970   if (localtime (&now)->tm_hour != hour_unset)
9971     exit (1);
9972   exit (0);
9973 }
9974 EOF
9975 if { (eval echo configure:9976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9976 then
9977   emacs_cv_localtime_cache=no
9978 else
9979   conftest_rc="$?"
9980   echo "configure: failed program was:" >&5
9981   cat conftest.$ac_ext >&5
9982   rm -fr conftest*
9983   emacs_cv_localtime_cache=yes
9984 fi
9985 rm -fr conftest*
9986 else
9987         # If we lack tzset, report that localtime does not cache TZ,
9988         # since we can't invalidate the cache if we don't have tzset.
9989         emacs_cv_localtime_cache=no
9990 fi
9991 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
9992 if test $emacs_cv_localtime_cache = yes; then
9993   { test "$extra_verbose" = "yes" && cat << \EOF
9994     Defining LOCALTIME_CACHE
9995 EOF
9996 cat >> confdefs.h <<\EOF
9997 #define LOCALTIME_CACHE 1
9998 EOF
9999 }
10000
10001 fi
10002
10003 if test "$HAVE_TIMEVAL" = "yes"; then
10004 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
10005 echo "configure:10006: checking whether gettimeofday accepts one or two arguments" >&5
10006 cat > conftest.$ac_ext <<EOF
10007 #line 10008 "configure"
10008 #include "confdefs.h"
10009
10010 #ifdef TIME_WITH_SYS_TIME
10011 #include <sys/time.h>
10012 #include <time.h>
10013 #else
10014 #ifdef HAVE_SYS_TIME_H
10015 #include <sys/time.h>
10016 #else
10017 #include <time.h>
10018 #endif
10019 #endif
10020   
10021 int main() {
10022
10023   struct timeval time;
10024   gettimeofday (&time, 0);
10025
10026 ; return 0; }
10027 EOF
10028 if { (eval echo configure:10029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10029   rm -rf conftest*
10030   echo "$ac_t""two" 1>&6
10031 else
10032   echo "configure: failed program was:" >&5
10033   cat conftest.$ac_ext >&5
10034   rm -rf conftest*
10035   echo "$ac_t""one" 1>&6
10036    { test "$extra_verbose" = "yes" && cat << \EOF
10037     Defining GETTIMEOFDAY_ONE_ARGUMENT
10038 EOF
10039 cat >> confdefs.h <<\EOF
10040 #define GETTIMEOFDAY_ONE_ARGUMENT 1
10041 EOF
10042 }
10043
10044 fi
10045 rm -f conftest*
10046 fi
10047
10048
10049 echo $ac_n "checking for inline""... $ac_c" 1>&6
10050 echo "configure:10051: checking for inline" >&5
10051
10052 ac_cv_c_inline=no
10053 for ac_kw in inline __inline__ __inline; do
10054   cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057
10058 int main() {
10059 } $ac_kw foo() {
10060 ; return 0; }
10061 EOF
10062 if { (eval echo configure:10063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10063   rm -rf conftest*
10064   ac_cv_c_inline=$ac_kw; break
10065 else
10066   echo "configure: failed program was:" >&5
10067   cat conftest.$ac_ext >&5
10068 fi
10069 rm -f conftest*
10070 done
10071
10072
10073 echo "$ac_t""$ac_cv_c_inline" 1>&6
10074 case "$ac_cv_c_inline" in
10075   inline | yes) ;;
10076   no) { test "$extra_verbose" = "yes" && cat << \EOF
10077     Defining inline = 
10078 EOF
10079 cat >> confdefs.h <<\EOF
10080 #define inline 
10081 EOF
10082 }
10083  ;;
10084   *)  { test "$extra_verbose" = "yes" && cat << EOF
10085     Defining inline = $ac_cv_c_inline
10086 EOF
10087 cat >> confdefs.h <<EOF
10088 #define inline $ac_cv_c_inline
10089 EOF
10090 }
10091  ;;
10092 esac
10093
10094 if test "$ac_cv_c_inline" != "no"; then
10095   { test "$extra_verbose" = "yes" && cat << \EOF
10096     Defining HAVE_INLINE
10097 EOF
10098 cat >> confdefs.h <<\EOF
10099 #define HAVE_INLINE 1
10100 EOF
10101 }
10102
10103   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
10104    echo "    xemacs will be linked with \"inline.o\""
10105  fi
10106 fi
10107
10108
10109 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
10110 # for constant arguments.  Useless!
10111 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
10112 echo "configure:10113: checking for working alloca.h" >&5
10113
10114 cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 #include <alloca.h>
10118 int main() {
10119 char *p = alloca(2 * sizeof(int));
10120 ; return 0; }
10121 EOF
10122 if { (eval echo configure:10123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10123   rm -rf conftest*
10124   ac_cv_header_alloca_h=yes
10125 else
10126   echo "configure: failed program was:" >&5
10127   cat conftest.$ac_ext >&5
10128   rm -rf conftest*
10129   ac_cv_header_alloca_h=no
10130 fi
10131 rm -f conftest*
10132
10133 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
10134 if test $ac_cv_header_alloca_h = yes; then
10135   { test "$extra_verbose" = "yes" && cat << \EOF
10136     Defining HAVE_ALLOCA_H
10137 EOF
10138 cat >> confdefs.h <<\EOF
10139 #define HAVE_ALLOCA_H 1
10140 EOF
10141 }
10142
10143 fi
10144
10145 echo $ac_n "checking for alloca""... $ac_c" 1>&6
10146 echo "configure:10147: checking for alloca" >&5
10147
10148 cat > conftest.$ac_ext <<EOF
10149 #line 10150 "configure"
10150 #include "confdefs.h"
10151
10152 #ifdef __GNUC__
10153 # define alloca __builtin_alloca
10154 #else
10155 # ifdef _MSC_VER
10156 #  include <malloc.h>
10157 #  define alloca _alloca
10158 # else
10159 #  if HAVE_ALLOCA_H
10160 #   include <alloca.h>
10161 #  else
10162 #   ifdef _AIX
10163  #pragma alloca
10164 #   else
10165 #    ifndef alloca /* predefined by HP cc +Olibcalls */
10166 char *alloca ();
10167 #    endif
10168 #   endif
10169 #  endif
10170 # endif
10171 #endif
10172
10173 int main() {
10174 char *p = (char *) alloca(1);
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   ac_cv_func_alloca_works=yes
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   ac_cv_func_alloca_works=no
10185 fi
10186 rm -f conftest*
10187
10188 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
10189 if test $ac_cv_func_alloca_works = yes; then
10190   { test "$extra_verbose" = "yes" && cat << \EOF
10191     Defining HAVE_ALLOCA
10192 EOF
10193 cat >> confdefs.h <<\EOF
10194 #define HAVE_ALLOCA 1
10195 EOF
10196 }
10197
10198 fi
10199
10200 if test $ac_cv_func_alloca_works = no; then
10201   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
10202   # that cause trouble.  Some versions do not even contain alloca or
10203   # contain a buggy version.  If you still want to use their alloca,
10204   # use ar to extract alloca.o from them instead of compiling alloca.c.
10205   ALLOCA=alloca.${ac_objext}
10206   { test "$extra_verbose" = "yes" && cat << \EOF
10207     Defining C_ALLOCA
10208 EOF
10209 cat >> confdefs.h <<\EOF
10210 #define C_ALLOCA 1
10211 EOF
10212 }
10213
10214
10215 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
10216 echo "configure:10217: checking whether alloca needs Cray hooks" >&5
10217
10218 cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 #if defined(CRAY) && ! defined(CRAY2)
10222 webecray
10223 #else
10224 wenotbecray
10225 #endif
10226
10227 EOF
10228 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10229   egrep "webecray" >/dev/null 2>&1; then
10230   rm -rf conftest*
10231   ac_cv_os_cray=yes
10232 else
10233   rm -rf conftest*
10234   ac_cv_os_cray=no
10235 fi
10236 rm -f conftest*
10237
10238
10239 echo "$ac_t""$ac_cv_os_cray" 1>&6
10240 if test $ac_cv_os_cray = yes; then
10241 for ac_func in _getb67 GETB67 getb67; do
10242   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10243 echo "configure:10244: checking for $ac_func" >&5
10244
10245 cat > conftest.$ac_ext <<EOF
10246 #line 10247 "configure"
10247 #include "confdefs.h"
10248 /* System header to define __stub macros and hopefully few prototypes,
10249     which can conflict with char $ac_func(); below.  */
10250 #include <assert.h>
10251 /* Override any gcc2 internal prototype to avoid an error.  */
10252 /* We use char because int might match the return type of a gcc2
10253     builtin and then its argument prototype would still apply.  */
10254 char $ac_func();
10255
10256 int main() {
10257
10258 /* The GNU C library defines this for functions which it implements
10259     to always fail with ENOSYS.  Some functions are actually named
10260     something starting with __ and the normal name is an alias.  */
10261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10262 choke me
10263 #else
10264 $ac_func();
10265 #endif
10266
10267 ; return 0; }
10268 EOF
10269 if { (eval echo configure:10270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10270   rm -rf conftest*
10271   eval "ac_cv_func_$ac_func=yes"
10272 else
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_func_$ac_func=no"
10277 fi
10278 rm -f conftest*
10279
10280 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10281   echo "$ac_t""yes" 1>&6
10282   { test "$extra_verbose" = "yes" && cat << EOF
10283     Defining CRAY_STACKSEG_END = $ac_func
10284 EOF
10285 cat >> confdefs.h <<EOF
10286 #define CRAY_STACKSEG_END $ac_func
10287 EOF
10288 }
10289
10290   break
10291 else
10292   echo "$ac_t""no" 1>&6
10293 fi
10294
10295 done
10296 fi
10297
10298 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
10299 echo "configure:10300: checking stack direction for C alloca" >&5
10300
10301 cat > conftest.$ac_ext <<EOF
10302 #line 10303 "configure"
10303 #include "confdefs.h"
10304 find_stack_direction ()
10305 {
10306   static char *addr = 0;
10307   auto char dummy;
10308   if (addr == 0)
10309     {
10310       addr = &dummy;
10311       return find_stack_direction ();
10312     }
10313   else
10314     return (&dummy > addr) ? 1 : -1;
10315 }
10316 main ()
10317 {
10318   exit (find_stack_direction() < 0);
10319 }
10320 EOF
10321 if { (eval echo configure:10322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10322 then
10323   ac_cv_c_stack_direction=1
10324 else
10325   conftest_rc="$?"
10326   echo "configure: failed program was:" >&5
10327   cat conftest.$ac_ext >&5
10328   rm -fr conftest*
10329   ac_cv_c_stack_direction=-1
10330 fi
10331 rm -fr conftest*
10332
10333 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
10334 { test "$extra_verbose" = "yes" && cat << EOF
10335     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
10336 EOF
10337 cat >> confdefs.h <<EOF
10338 #define STACK_DIRECTION $ac_cv_c_stack_direction
10339 EOF
10340 }
10341
10342 fi
10343
10344 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
10345    echo "    xemacs will be linked with \"$ALLOCA\""
10346  fi
10347
10348 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
10349 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
10350 echo "configure:10351: checking for vfork.h" >&5
10351
10352 cat > conftest.$ac_ext <<EOF
10353 #line 10354 "configure"
10354 #include "confdefs.h"
10355 #include <vfork.h>
10356 EOF
10357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10358 { (eval echo configure:10359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10360 if test -z "$ac_err"; then
10361   rm -rf conftest*
10362   eval "ac_cv_header_$ac_safe=yes"
10363 else
10364   echo "$ac_err" >&5
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_header_$ac_safe=no"
10369 fi
10370 rm -f conftest*
10371 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10372   echo "$ac_t""yes" 1>&6
10373   { test "$extra_verbose" = "yes" && cat << \EOF
10374     Defining HAVE_VFORK_H
10375 EOF
10376 cat >> confdefs.h <<\EOF
10377 #define HAVE_VFORK_H 1
10378 EOF
10379 }
10380
10381 else
10382   echo "$ac_t""no" 1>&6
10383 fi
10384
10385 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
10386 echo "configure:10387: checking for working vfork" >&5
10387
10388 cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 /* Thanks to Paul Eggert for this test.  */
10392 #include <stdio.h>
10393 #include <sys/types.h>
10394 #include <sys/stat.h>
10395 #ifdef HAVE_UNISTD_H
10396 #include <unistd.h>
10397 #endif
10398 #ifdef HAVE_VFORK_H
10399 #include <vfork.h>
10400 #endif
10401 /* On some sparc systems, changes by the child to local and incoming
10402    argument registers are propagated back to the parent.
10403    The compiler is told about this with #include <vfork.h>,
10404    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
10405    Test for this by using a static variable whose address
10406    is put into a register that is clobbered by the vfork.  */
10407 static
10408 #ifdef __cplusplus
10409 sparc_address_test (int arg)
10410 #else
10411 sparc_address_test (arg) int arg;
10412 #endif
10413 {
10414   static pid_t child;
10415   if (!child) {
10416     child = vfork ();
10417     if (child < 0) {
10418       perror ("vfork");
10419       _exit(2);
10420     }
10421     if (!child) {
10422       arg = getpid();
10423       write(-1, "", 0);
10424       _exit (arg);
10425     }
10426   }
10427 }
10428 main() {
10429   pid_t parent = getpid ();
10430   pid_t child;
10431
10432   sparc_address_test ();
10433
10434   child = vfork ();
10435
10436   if (child == 0) {
10437     /* Here is another test for sparc vfork register problems.
10438        This test uses lots of local variables, at least
10439        as many local variables as main has allocated so far
10440        including compiler temporaries.  4 locals are enough for
10441        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
10442        A buggy compiler should reuse the register of parent
10443        for one of the local variables, since it will think that
10444        parent can't possibly be used any more in this routine.
10445        Assigning to the local variable will thus munge parent
10446        in the parent process.  */
10447     pid_t
10448       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
10449       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
10450     /* Convince the compiler that p..p7 are live; otherwise, it might
10451        use the same hardware register for all 8 local variables.  */
10452     if (p != p1 || p != p2 || p != p3 || p != p4
10453         || p != p5 || p != p6 || p != p7)
10454       _exit(1);
10455
10456     /* On some systems (e.g. IRIX 3.3),
10457        vfork doesn't separate parent from child file descriptors.
10458        If the child closes a descriptor before it execs or exits,
10459        this munges the parent's descriptor as well.
10460        Test for this by closing stdout in the child.  */
10461     _exit(close(fileno(stdout)) != 0);
10462   } else {
10463     int status;
10464     struct stat st;
10465
10466     while (wait(&status) != child)
10467       ;
10468     exit(
10469          /* Was there some problem with vforking?  */
10470          child < 0
10471
10472          /* Did the child fail?  (This shouldn't happen.)  */
10473          || status
10474
10475          /* Did the vfork/compiler bug occur?  */
10476          || parent != getpid()
10477
10478          /* Did the file descriptor bug occur?  */
10479          || fstat(fileno(stdout), &st) != 0
10480          );
10481   }
10482 }
10483 EOF
10484 if { (eval echo configure:10485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10485 then
10486   ac_cv_func_vfork_works=yes
10487 else
10488   conftest_rc="$?"
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -fr conftest*
10492   ac_cv_func_vfork_works=no
10493 fi
10494 rm -fr conftest*
10495
10496 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
10497 if test $ac_cv_func_vfork_works = no; then
10498   { test "$extra_verbose" = "yes" && cat << \EOF
10499     Defining vfork = fork
10500 EOF
10501 cat >> confdefs.h <<\EOF
10502 #define vfork fork
10503 EOF
10504 }
10505
10506 fi
10507
10508
10509 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
10510 echo "configure:10511: checking for working strcoll" >&5
10511
10512 cat > conftest.$ac_ext <<EOF
10513 #line 10514 "configure"
10514 #include "confdefs.h"
10515 #include <string.h>
10516 main ()
10517 {
10518   exit (strcoll ("abc", "def") >= 0 ||
10519         strcoll ("ABC", "DEF") >= 0 ||
10520         strcoll ("123", "456") >= 0);
10521 }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10524 then
10525   ac_cv_func_strcoll_works=yes
10526 else
10527   conftest_rc="$?"
10528   echo "configure: failed program was:" >&5
10529   cat conftest.$ac_ext >&5
10530   rm -fr conftest*
10531   ac_cv_func_strcoll_works=no
10532 fi
10533 rm -fr conftest*
10534
10535 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
10536 if test $ac_cv_func_strcoll_works = yes; then
10537   { test "$extra_verbose" = "yes" && cat << \EOF
10538     Defining HAVE_STRCOLL
10539 EOF
10540 cat >> confdefs.h <<\EOF
10541 #define HAVE_STRCOLL 1
10542 EOF
10543 }
10544
10545 fi
10546
10547
10548 for ac_func in getpgrp
10549 do
10550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10551 echo "configure:10552: checking for $ac_func" >&5
10552
10553 cat > conftest.$ac_ext <<EOF
10554 #line 10555 "configure"
10555 #include "confdefs.h"
10556 /* System header to define __stub macros and hopefully few prototypes,
10557     which can conflict with char $ac_func(); below.  */
10558 #include <assert.h>
10559 /* Override any gcc2 internal prototype to avoid an error.  */
10560 /* We use char because int might match the return type of a gcc2
10561     builtin and then its argument prototype would still apply.  */
10562 char $ac_func();
10563
10564 int main() {
10565
10566 /* The GNU C library defines this for functions which it implements
10567     to always fail with ENOSYS.  Some functions are actually named
10568     something starting with __ and the normal name is an alias.  */
10569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10570 choke me
10571 #else
10572 $ac_func();
10573 #endif
10574
10575 ; return 0; }
10576 EOF
10577 if { (eval echo configure:10578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10578   rm -rf conftest*
10579   eval "ac_cv_func_$ac_func=yes"
10580 else
10581   echo "configure: failed program was:" >&5
10582   cat conftest.$ac_ext >&5
10583   rm -rf conftest*
10584   eval "ac_cv_func_$ac_func=no"
10585 fi
10586 rm -f conftest*
10587
10588 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10589   echo "$ac_t""yes" 1>&6
10590     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10591   { test "$extra_verbose" = "yes" && cat << EOF
10592     Defining $ac_tr_func
10593 EOF
10594 cat >> confdefs.h <<EOF
10595 #define $ac_tr_func 1
10596 EOF
10597 }
10598  
10599 else
10600   echo "$ac_t""no" 1>&6
10601 fi
10602 done
10603
10604 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
10605 echo "configure:10606: checking whether getpgrp takes no argument" >&5
10606
10607 cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610
10611 /*
10612  * If this system has a BSD-style getpgrp(),
10613  * which takes a pid argument, exit unsuccessfully.
10614  *
10615  * Snarfed from Chet Ramey's bash pgrp.c test program
10616  */
10617 #include <stdio.h>
10618 #include <sys/types.h>
10619
10620 int     pid;
10621 int     pg1, pg2, pg3, pg4;
10622 int     ng, np, s, child;
10623
10624 main()
10625 {
10626         pid = getpid();
10627         pg1 = getpgrp(0);
10628         pg2 = getpgrp();
10629         pg3 = getpgrp(pid);
10630         pg4 = getpgrp(1);
10631
10632         /*
10633          * If all of these values are the same, it's pretty sure that
10634          * we're on a system that ignores getpgrp's first argument.
10635          */
10636         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
10637                 exit(0);
10638
10639         child = fork();
10640         if (child < 0)
10641                 exit(1);
10642         else if (child == 0) {
10643                 np = getpid();
10644                 /*
10645                  * If this is Sys V, this will not work; pgrp will be
10646                  * set to np because setpgrp just changes a pgrp to be
10647                  * the same as the pid.
10648                  */
10649                 setpgrp(np, pg1);
10650                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
10651                 if (ng == pg1) {
10652                         exit(1);
10653                 } else {
10654                         exit(0);
10655                 }
10656         } else {
10657                 wait(&s);
10658                 exit(s>>8);
10659         }
10660 }
10661
10662 EOF
10663 if { (eval echo configure:10664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10664 then
10665   ac_cv_func_getpgrp_void=yes
10666 else
10667   conftest_rc="$?"
10668   echo "configure: failed program was:" >&5
10669   cat conftest.$ac_ext >&5
10670   rm -fr conftest*
10671   ac_cv_func_getpgrp_void=no
10672 fi
10673 rm -fr conftest*
10674
10675
10676 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
10677 if test $ac_cv_func_getpgrp_void = yes; then
10678   { test "$extra_verbose" = "yes" && cat << \EOF
10679     Defining GETPGRP_VOID
10680 EOF
10681 cat >> confdefs.h <<\EOF
10682 #define GETPGRP_VOID 1
10683 EOF
10684 }
10685
10686 fi
10687
10688
10689 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
10690 echo "configure:10691: checking for working mmap" >&5
10691 case "$opsys" in ultrix* ) have_mmap=no ;; *)
10692 cat > conftest.$ac_ext <<EOF
10693 #line 10694 "configure"
10694 #include "confdefs.h"
10695 #include <stdio.h>
10696 #include <unistd.h>
10697 #include <fcntl.h>
10698 #include <sys/mman.h>
10699
10700 #ifndef MAP_VARIABLE
10701 #define MAP_VARIABLE 0
10702 #endif
10703
10704 #ifndef MAP_FAILED
10705 #define MAP_FAILED -1
10706 #endif
10707
10708 int main (int argc, char *argv[])
10709 {
10710   int fd = -1;
10711   caddr_t p;
10712 #ifndef MAP_ANONYMOUS
10713   fd = open ("/dev/zero", O_RDWR);
10714   if (fd < 0)
10715     return 1;
10716 #define MAP_ANONYMOUS 0
10717 #endif
10718   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
10719            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
10720            fd, 0) != (void *) MAP_FAILED)
10721     return 0;
10722   perror ("conftest: mmap failed");
10723   return 1;
10724 }
10725 EOF
10726 if { (eval echo configure:10727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
10727 then
10728   have_mmap=yes
10729 else
10730   conftest_rc="$?"
10731   echo "configure: failed program was:" >&5
10732   cat conftest.$ac_ext >&5
10733   rm -fr conftest*
10734   have_mmap=no
10735 fi
10736 rm -fr conftest* ;;
10737 esac
10738 echo "$ac_t""$have_mmap" 1>&6
10739 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10740     Defining HAVE_MMAP
10741 EOF
10742 cat >> confdefs.h <<\EOF
10743 #define HAVE_MMAP 1
10744 EOF
10745 }
10746
10747
10748 test "$GNU_MALLOC" != "yes" -a "$have_mmap" != "yes" && rel_alloc=no
10749 if test "$rel_alloc $have_mmap" = "default yes"; then
10750   if test "$doug_lea_malloc" = "yes"; then
10751         echo $ac_n "checking for M_MMAP_THRESHOLD""... $ac_c" 1>&6
10752 echo "configure:10753: checking for M_MMAP_THRESHOLD" >&5
10753     cat > conftest.$ac_ext <<EOF
10754 #line 10755 "configure"
10755 #include "confdefs.h"
10756 #include <malloc.h>
10757 int main() {
10758
10759 #ifndef M_MMAP_THRESHOLD
10760 #error No M_MMAP_THRESHOLD :-(
10761 !@+$%^&*_)(_ - unlikely to compile...
10762 #endif
10763
10764 ; return 0; }
10765 EOF
10766 if { (eval echo configure:10767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10767   rm -rf conftest*
10768   rel_alloc=no; echo "$ac_t""yes" 1>&6;
10769 else
10770   echo "configure: failed program was:" >&5
10771   cat conftest.$ac_ext >&5
10772   rm -rf conftest*
10773   rel_alloc=yes; echo "$ac_t""no" 1>&6;
10774 fi
10775 rm -f conftest*
10776   else
10777     rel_alloc=yes
10778   fi
10779 fi
10780 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
10781     Defining REL_ALLOC
10782 EOF
10783 cat >> confdefs.h <<\EOF
10784 #define REL_ALLOC 1
10785 EOF
10786 }
10787
10788
10789 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
10790 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
10791 echo "configure:10792: checking for termios.h" >&5
10792
10793 cat > conftest.$ac_ext <<EOF
10794 #line 10795 "configure"
10795 #include "confdefs.h"
10796 #include <termios.h>
10797 EOF
10798 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10799 { (eval echo configure:10800: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10800 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10801 if test -z "$ac_err"; then
10802   rm -rf conftest*
10803   eval "ac_cv_header_$ac_safe=yes"
10804 else
10805   echo "$ac_err" >&5
10806   echo "configure: failed program was:" >&5
10807   cat conftest.$ac_ext >&5
10808   rm -rf conftest*
10809   eval "ac_cv_header_$ac_safe=no"
10810 fi
10811 rm -f conftest*
10812 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10813   echo "$ac_t""yes" 1>&6
10814   { test "$extra_verbose" = "yes" && cat << \EOF
10815     Defining HAVE_TERMIOS
10816 EOF
10817 cat >> confdefs.h <<\EOF
10818 #define HAVE_TERMIOS 1
10819 EOF
10820 }
10821
10822   { test "$extra_verbose" = "yes" && cat << \EOF
10823     Defining SIGNALS_VIA_CHARACTERS
10824 EOF
10825 cat >> confdefs.h <<\EOF
10826 #define SIGNALS_VIA_CHARACTERS 1
10827 EOF
10828 }
10829
10830   { test "$extra_verbose" = "yes" && cat << \EOF
10831     Defining NO_TERMIO
10832 EOF
10833 cat >> confdefs.h <<\EOF
10834 #define NO_TERMIO 1
10835 EOF
10836 }
10837
10838 else
10839   echo "$ac_t""no" 1>&6
10840 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
10841 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
10842 echo "configure:10843: checking for termio.h" >&5
10843
10844 cat > conftest.$ac_ext <<EOF
10845 #line 10846 "configure"
10846 #include "confdefs.h"
10847 #include <termio.h>
10848 EOF
10849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10850 { (eval echo configure:10851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10852 if test -z "$ac_err"; then
10853   rm -rf conftest*
10854   eval "ac_cv_header_$ac_safe=yes"
10855 else
10856   echo "$ac_err" >&5
10857   echo "configure: failed program was:" >&5
10858   cat conftest.$ac_ext >&5
10859   rm -rf conftest*
10860   eval "ac_cv_header_$ac_safe=no"
10861 fi
10862 rm -f conftest*
10863 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10864   echo "$ac_t""yes" 1>&6
10865   { test "$extra_verbose" = "yes" && cat << \EOF
10866     Defining HAVE_TERMIO
10867 EOF
10868 cat >> confdefs.h <<\EOF
10869 #define HAVE_TERMIO 1
10870 EOF
10871 }
10872
10873 else
10874   echo "$ac_t""no" 1>&6
10875 fi
10876
10877 fi
10878
10879
10880
10881 echo $ac_n "checking for socket""... $ac_c" 1>&6
10882 echo "configure:10883: checking for socket" >&5
10883
10884 cat > conftest.$ac_ext <<EOF
10885 #line 10886 "configure"
10886 #include "confdefs.h"
10887 /* System header to define __stub macros and hopefully few prototypes,
10888     which can conflict with char socket(); below.  */
10889 #include <assert.h>
10890 /* Override any gcc2 internal prototype to avoid an error.  */
10891 /* We use char because int might match the return type of a gcc2
10892     builtin and then its argument prototype would still apply.  */
10893 char socket();
10894
10895 int main() {
10896
10897 /* The GNU C library defines this for functions which it implements
10898     to always fail with ENOSYS.  Some functions are actually named
10899     something starting with __ and the normal name is an alias.  */
10900 #if defined (__stub_socket) || defined (__stub___socket)
10901 choke me
10902 #else
10903 socket();
10904 #endif
10905
10906 ; return 0; }
10907 EOF
10908 if { (eval echo configure:10909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10909   rm -rf conftest*
10910   eval "ac_cv_func_socket=yes"
10911 else
10912   echo "configure: failed program was:" >&5
10913   cat conftest.$ac_ext >&5
10914   rm -rf conftest*
10915   eval "ac_cv_func_socket=no"
10916 fi
10917 rm -f conftest*
10918
10919 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
10920   echo "$ac_t""yes" 1>&6
10921   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
10922 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
10923 echo "configure:10924: checking for netinet/in.h" >&5
10924
10925 cat > conftest.$ac_ext <<EOF
10926 #line 10927 "configure"
10927 #include "confdefs.h"
10928 #include <netinet/in.h>
10929 EOF
10930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10931 { (eval echo configure:10932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10933 if test -z "$ac_err"; then
10934   rm -rf conftest*
10935   eval "ac_cv_header_$ac_safe=yes"
10936 else
10937   echo "$ac_err" >&5
10938   echo "configure: failed program was:" >&5
10939   cat conftest.$ac_ext >&5
10940   rm -rf conftest*
10941   eval "ac_cv_header_$ac_safe=no"
10942 fi
10943 rm -f conftest*
10944 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10945   echo "$ac_t""yes" 1>&6
10946   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
10947 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
10948 echo "configure:10949: checking for arpa/inet.h" >&5
10949
10950 cat > conftest.$ac_ext <<EOF
10951 #line 10952 "configure"
10952 #include "confdefs.h"
10953 #include <arpa/inet.h>
10954 EOF
10955 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10956 { (eval echo configure:10957: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10957 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10958 if test -z "$ac_err"; then
10959   rm -rf conftest*
10960   eval "ac_cv_header_$ac_safe=yes"
10961 else
10962   echo "$ac_err" >&5
10963   echo "configure: failed program was:" >&5
10964   cat conftest.$ac_ext >&5
10965   rm -rf conftest*
10966   eval "ac_cv_header_$ac_safe=no"
10967 fi
10968 rm -f conftest*
10969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10970   echo "$ac_t""yes" 1>&6
10971   
10972   { test "$extra_verbose" = "yes" && cat << \EOF
10973     Defining HAVE_SOCKETS
10974 EOF
10975 cat >> confdefs.h <<\EOF
10976 #define HAVE_SOCKETS 1
10977 EOF
10978 }
10979
10980       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
10981 echo "configure:10982: checking "for sun_len member in struct sockaddr_un"" >&5
10982       cat > conftest.$ac_ext <<EOF
10983 #line 10984 "configure"
10984 #include "confdefs.h"
10985
10986 #include <sys/types.h>
10987 #include <sys/socket.h>
10988 #include <sys/un.h>
10989       
10990 int main() {
10991 static struct sockaddr_un x; x.sun_len = 1;
10992 ; return 0; }
10993 EOF
10994 if { (eval echo configure:10995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10995   rm -rf conftest*
10996   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
10997     Defining HAVE_SOCKADDR_SUN_LEN
10998 EOF
10999 cat >> confdefs.h <<\EOF
11000 #define HAVE_SOCKADDR_SUN_LEN 1
11001 EOF
11002 }
11003
11004 else
11005   echo "configure: failed program was:" >&5
11006   cat conftest.$ac_ext >&5
11007   rm -rf conftest*
11008   echo "$ac_t""no" 1>&6
11009 fi
11010 rm -f conftest*
11011       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
11012 echo "configure:11013: checking "for ip_mreq struct in netinet/in.h"" >&5
11013       cat > conftest.$ac_ext <<EOF
11014 #line 11015 "configure"
11015 #include "confdefs.h"
11016
11017 #include <sys/types.h>
11018 #include <netinet/in.h>
11019       
11020 int main() {
11021 static struct ip_mreq x;
11022 ; return 0; }
11023 EOF
11024 if { (eval echo configure:11025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11025   rm -rf conftest*
11026   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
11027     Defining HAVE_MULTICAST
11028 EOF
11029 cat >> confdefs.h <<\EOF
11030 #define HAVE_MULTICAST 1
11031 EOF
11032 }
11033
11034 else
11035   echo "configure: failed program was:" >&5
11036   cat conftest.$ac_ext >&5
11037   rm -rf conftest*
11038   echo "$ac_t""no" 1>&6
11039 fi
11040 rm -f conftest*
11041 else
11042   echo "$ac_t""no" 1>&6
11043 fi
11044
11045 else
11046   echo "$ac_t""no" 1>&6
11047 fi
11048
11049 else
11050   echo "$ac_t""no" 1>&6
11051 fi
11052
11053
11054 echo $ac_n "checking for msgget""... $ac_c" 1>&6
11055 echo "configure:11056: checking for msgget" >&5
11056
11057 cat > conftest.$ac_ext <<EOF
11058 #line 11059 "configure"
11059 #include "confdefs.h"
11060 /* System header to define __stub macros and hopefully few prototypes,
11061     which can conflict with char msgget(); below.  */
11062 #include <assert.h>
11063 /* Override any gcc2 internal prototype to avoid an error.  */
11064 /* We use char because int might match the return type of a gcc2
11065     builtin and then its argument prototype would still apply.  */
11066 char msgget();
11067
11068 int main() {
11069
11070 /* The GNU C library defines this for functions which it implements
11071     to always fail with ENOSYS.  Some functions are actually named
11072     something starting with __ and the normal name is an alias.  */
11073 #if defined (__stub_msgget) || defined (__stub___msgget)
11074 choke me
11075 #else
11076 msgget();
11077 #endif
11078
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_func_msgget=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_func_msgget=no"
11089 fi
11090 rm -f conftest*
11091
11092 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
11093   echo "$ac_t""yes" 1>&6
11094   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
11095 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
11096 echo "configure:11097: checking for sys/ipc.h" >&5
11097
11098 cat > conftest.$ac_ext <<EOF
11099 #line 11100 "configure"
11100 #include "confdefs.h"
11101 #include <sys/ipc.h>
11102 EOF
11103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11104 { (eval echo configure:11105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11106 if test -z "$ac_err"; then
11107   rm -rf conftest*
11108   eval "ac_cv_header_$ac_safe=yes"
11109 else
11110   echo "$ac_err" >&5
11111   echo "configure: failed program was:" >&5
11112   cat conftest.$ac_ext >&5
11113   rm -rf conftest*
11114   eval "ac_cv_header_$ac_safe=no"
11115 fi
11116 rm -f conftest*
11117 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11118   echo "$ac_t""yes" 1>&6
11119   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
11120 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
11121 echo "configure:11122: checking for sys/msg.h" >&5
11122
11123 cat > conftest.$ac_ext <<EOF
11124 #line 11125 "configure"
11125 #include "confdefs.h"
11126 #include <sys/msg.h>
11127 EOF
11128 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11129 { (eval echo configure:11130: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11130 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11131 if test -z "$ac_err"; then
11132   rm -rf conftest*
11133   eval "ac_cv_header_$ac_safe=yes"
11134 else
11135   echo "$ac_err" >&5
11136   echo "configure: failed program was:" >&5
11137   cat conftest.$ac_ext >&5
11138   rm -rf conftest*
11139   eval "ac_cv_header_$ac_safe=no"
11140 fi
11141 rm -f conftest*
11142 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11143   echo "$ac_t""yes" 1>&6
11144   { test "$extra_verbose" = "yes" && cat << \EOF
11145     Defining HAVE_SYSVIPC
11146 EOF
11147 cat >> confdefs.h <<\EOF
11148 #define HAVE_SYSVIPC 1
11149 EOF
11150 }
11151
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155
11156 else
11157   echo "$ac_t""no" 1>&6
11158 fi
11159
11160 else
11161   echo "$ac_t""no" 1>&6
11162 fi
11163
11164
11165 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
11166 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
11167 echo "configure:11168: checking for dirent.h" >&5
11168
11169 cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <dirent.h>
11173 EOF
11174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11175 { (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11177 if test -z "$ac_err"; then
11178   rm -rf conftest*
11179   eval "ac_cv_header_$ac_safe=yes"
11180 else
11181   echo "$ac_err" >&5
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=no"
11186 fi
11187 rm -f conftest*
11188 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11189   echo "$ac_t""yes" 1>&6
11190   { test "$extra_verbose" = "yes" && cat << \EOF
11191     Defining SYSV_SYSTEM_DIR
11192 EOF
11193 cat >> confdefs.h <<\EOF
11194 #define SYSV_SYSTEM_DIR 1
11195 EOF
11196 }
11197
11198 else
11199   echo "$ac_t""no" 1>&6
11200 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
11201 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
11202 echo "configure:11203: checking for sys/dir.h" >&5
11203
11204 cat > conftest.$ac_ext <<EOF
11205 #line 11206 "configure"
11206 #include "confdefs.h"
11207 #include <sys/dir.h>
11208 EOF
11209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11210 { (eval echo configure:11211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11212 if test -z "$ac_err"; then
11213   rm -rf conftest*
11214   eval "ac_cv_header_$ac_safe=yes"
11215 else
11216   echo "$ac_err" >&5
11217   echo "configure: failed program was:" >&5
11218   cat conftest.$ac_ext >&5
11219   rm -rf conftest*
11220   eval "ac_cv_header_$ac_safe=no"
11221 fi
11222 rm -f conftest*
11223 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11224   echo "$ac_t""yes" 1>&6
11225   :
11226 else
11227   echo "$ac_t""no" 1>&6
11228 { test "$extra_verbose" = "yes" && cat << \EOF
11229     Defining NONSYSTEM_DIR_LIBRARY
11230 EOF
11231 cat >> confdefs.h <<\EOF
11232 #define NONSYSTEM_DIR_LIBRARY 1
11233 EOF
11234 }
11235
11236 fi
11237
11238 fi
11239
11240
11241 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
11242 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
11243 echo "configure:11244: checking for nlist.h" >&5
11244
11245 cat > conftest.$ac_ext <<EOF
11246 #line 11247 "configure"
11247 #include "confdefs.h"
11248 #include <nlist.h>
11249 EOF
11250 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11251 { (eval echo configure:11252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11252 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11253 if test -z "$ac_err"; then
11254   rm -rf conftest*
11255   eval "ac_cv_header_$ac_safe=yes"
11256 else
11257   echo "$ac_err" >&5
11258   echo "configure: failed program was:" >&5
11259   cat conftest.$ac_ext >&5
11260   rm -rf conftest*
11261   eval "ac_cv_header_$ac_safe=no"
11262 fi
11263 rm -f conftest*
11264 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11265   echo "$ac_t""yes" 1>&6
11266   { test "$extra_verbose" = "yes" && cat << \EOF
11267     Defining NLIST_STRUCT
11268 EOF
11269 cat >> confdefs.h <<\EOF
11270 #define NLIST_STRUCT 1
11271 EOF
11272 }
11273
11274 else
11275   echo "$ac_t""no" 1>&6
11276 fi
11277
11278
11279
11280 echo "checking "for sound support"" 1>&6
11281 echo "configure:11282: checking "for sound support"" >&5
11282 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
11283
11284 if test "$with_native_sound" != "no"; then
11285     if test -n "$native_sound_lib"; then
11286     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
11287 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
11288 echo "configure:11289: checking for multimedia/audio_device.h" >&5
11289
11290 cat > conftest.$ac_ext <<EOF
11291 #line 11292 "configure"
11292 #include "confdefs.h"
11293 #include <multimedia/audio_device.h>
11294 EOF
11295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11296 { (eval echo configure:11297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11298 if test -z "$ac_err"; then
11299   rm -rf conftest*
11300   eval "ac_cv_header_$ac_safe=yes"
11301 else
11302   echo "$ac_err" >&5
11303   echo "configure: failed program was:" >&5
11304   cat conftest.$ac_ext >&5
11305   rm -rf conftest*
11306   eval "ac_cv_header_$ac_safe=no"
11307 fi
11308 rm -f conftest*
11309 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11310   echo "$ac_t""yes" 1>&6
11311   sound_found=yes sound_cflags=""
11312       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11313    echo "    xemacs will be linked with \"sunplay.o\""
11314  fi
11315 else
11316   echo "$ac_t""no" 1>&6
11317 fi
11318
11319   fi
11320
11321     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
11322     sound_found=yes
11323     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
11324    echo "    xemacs will be linked with \"sunplay.o\""
11325  fi
11326     if test -d "/usr/demo/SOUND/include"
11327       then sound_cflags="-I/usr/demo/SOUND/include"
11328       else sound_cflags="-I/usr/demo/SOUND"
11329     fi
11330     if test -z "$native_sound_lib" ; then
11331       if test -r "/usr/demo/SOUND/lib/libaudio.a"
11332         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
11333         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
11334       fi
11335     fi
11336   fi
11337
11338     if test -z "$sound_found"; then
11339     case "$canonical" in
11340     *-sgi-* )
11341       if test -z "$native_sound_lib"; then
11342         
11343 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
11344 echo "configure:11345: checking for ALopenport in -laudio" >&5
11345 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
11346
11347 xe_check_libs=" -laudio "
11348 cat > conftest.$ac_ext <<EOF
11349 #line 11350 "configure"
11350 #include "confdefs.h"
11351 /* Override any gcc2 internal prototype to avoid an error.  */
11352 /* We use char because int might match the return type of a gcc2
11353     builtin and then its argument prototype would still apply.  */
11354 char ALopenport();
11355
11356 int main() {
11357 ALopenport()
11358 ; return 0; }
11359 EOF
11360 if { (eval echo configure:11361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11361   rm -rf conftest*
11362   eval "ac_cv_lib_$ac_lib_var=yes"
11363 else
11364   echo "configure: failed program was:" >&5
11365   cat conftest.$ac_ext >&5
11366   rm -rf conftest*
11367   eval "ac_cv_lib_$ac_lib_var=no"
11368 fi
11369 rm -f conftest*
11370 xe_check_libs=""
11371
11372 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11373   echo "$ac_t""yes" 1>&6
11374   native_sound_lib="-laudio"
11375 else
11376   echo "$ac_t""no" 1>&6
11377 fi
11378
11379
11380       fi
11381       if test -n "$native_sound_lib"; then
11382         sound_found=yes sound_cflags=""
11383         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
11384    echo "    xemacs will be linked with \"sgiplay.o\""
11385  fi
11386       fi ;;
11387     hppa*-hp-hpux* )
11388       if test -z "$native_sound_lib"; then
11389         
11390 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
11391 echo "configure:11392: checking for AOpenAudio in -lAlib" >&5
11392 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
11393
11394 xe_check_libs=" -lAlib "
11395 cat > conftest.$ac_ext <<EOF
11396 #line 11397 "configure"
11397 #include "confdefs.h"
11398 /* Override any gcc2 internal prototype to avoid an error.  */
11399 /* We use char because int might match the return type of a gcc2
11400     builtin and then its argument prototype would still apply.  */
11401 char AOpenAudio();
11402
11403 int main() {
11404 AOpenAudio()
11405 ; return 0; }
11406 EOF
11407 if { (eval echo configure:11408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11408   rm -rf conftest*
11409   eval "ac_cv_lib_$ac_lib_var=yes"
11410 else
11411   echo "configure: failed program was:" >&5
11412   cat conftest.$ac_ext >&5
11413   rm -rf conftest*
11414   eval "ac_cv_lib_$ac_lib_var=no"
11415 fi
11416 rm -f conftest*
11417 xe_check_libs=""
11418
11419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11420   echo "$ac_t""yes" 1>&6
11421   native_sound_lib="-lAlib"
11422 else
11423   echo "$ac_t""no" 1>&6
11424 fi
11425
11426
11427       fi
11428       if test -n "$native_sound_lib"; then
11429         sound_found=yes
11430         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
11431    echo "    xemacs will be linked with \"hpplay.o\""
11432  fi
11433         if test "$GCC" = "yes" # Kludge city
11434           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
11435           else sound_cflags="+e -I/usr/audio/examples"
11436         fi
11437       fi ;;
11438     esac
11439   fi
11440
11441     if test -z "$sound_found"; then
11442     for dir in "machine" "sys" "linux"; do
11443       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
11444 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
11445 echo "configure:11446: checking for ${dir}/soundcard.h" >&5
11446
11447 cat > conftest.$ac_ext <<EOF
11448 #line 11449 "configure"
11449 #include "confdefs.h"
11450 #include <${dir}/soundcard.h>
11451 EOF
11452 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11453 { (eval echo configure:11454: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11454 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11455 if test -z "$ac_err"; then
11456   rm -rf conftest*
11457   eval "ac_cv_header_$ac_safe=yes"
11458 else
11459   echo "$ac_err" >&5
11460   echo "configure: failed program was:" >&5
11461   cat conftest.$ac_ext >&5
11462   rm -rf conftest*
11463   eval "ac_cv_header_$ac_safe=no"
11464 fi
11465 rm -f conftest*
11466 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11467   echo "$ac_t""yes" 1>&6
11468   sound_found=yes
11469        need_miscplay=yes
11470         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
11471    echo "    xemacs will be linked with \"linuxplay.o\""
11472  fi
11473         { test "$extra_verbose" = "yes" && cat << EOF
11474     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
11475 EOF
11476 cat >> confdefs.h <<EOF
11477 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
11478 EOF
11479 }
11480
11481         break
11482 else
11483   echo "$ac_t""no" 1>&6
11484 fi
11485
11486     done
11487   fi
11488
11489   test "$sound_found" = "yes" && with_native_sound=yes
11490 fi
11491
11492 if test "$with_native_sound" = "yes"; then
11493   { test "$extra_verbose" = "yes" && cat << \EOF
11494     Defining HAVE_NATIVE_SOUND
11495 EOF
11496 cat >> confdefs.h <<\EOF
11497 #define HAVE_NATIVE_SOUND 1
11498 EOF
11499 }
11500
11501   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
11502 fi
11503
11504 if test "$with_nas_sound" != "no"; then
11505   ac_safe=`echo "audio/audiolib.h" | sed 'y%./+-%__p_%'`
11506 echo $ac_n "checking for audio/audiolib.h""... $ac_c" 1>&6
11507 echo "configure:11508: checking for audio/audiolib.h" >&5
11508
11509 cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512 #include <audio/audiolib.h>
11513 EOF
11514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11515 { (eval echo configure:11516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11517 if test -z "$ac_err"; then
11518   rm -rf conftest*
11519   eval "ac_cv_header_$ac_safe=yes"
11520 else
11521   echo "$ac_err" >&5
11522   echo "configure: failed program was:" >&5
11523   cat conftest.$ac_ext >&5
11524   rm -rf conftest*
11525   eval "ac_cv_header_$ac_safe=no"
11526 fi
11527 rm -f conftest*
11528 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11529   echo "$ac_t""yes" 1>&6
11530   
11531     
11532 echo $ac_n "checking for AuOpenServer in -laudio""... $ac_c" 1>&6
11533 echo "configure:11534: checking for AuOpenServer in -laudio" >&5
11534 ac_lib_var=`echo audio'_'AuOpenServer | sed 'y%./+-%__p_%'`
11535
11536 xe_check_libs=" -laudio "
11537 cat > conftest.$ac_ext <<EOF
11538 #line 11539 "configure"
11539 #include "confdefs.h"
11540 /* Override any gcc2 internal prototype to avoid an error.  */
11541 /* We use char because int might match the return type of a gcc2
11542     builtin and then its argument prototype would still apply.  */
11543 char AuOpenServer();
11544
11545 int main() {
11546 AuOpenServer()
11547 ; return 0; }
11548 EOF
11549 if { (eval echo configure:11550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11550   rm -rf conftest*
11551   eval "ac_cv_lib_$ac_lib_var=yes"
11552 else
11553   echo "configure: failed program was:" >&5
11554   cat conftest.$ac_ext >&5
11555   rm -rf conftest*
11556   eval "ac_cv_lib_$ac_lib_var=no"
11557 fi
11558 rm -f conftest*
11559 xe_check_libs=""
11560
11561 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11562   echo "$ac_t""yes" 1>&6
11563   have_nas_sound=yes
11564 else
11565   echo "$ac_t""no" 1>&6
11566 fi
11567
11568
11569 else
11570   echo "$ac_t""no" 1>&6
11571 fi
11572
11573   if test "$have_nas_sound" = "yes"; then
11574     with_nas_sound=yes
11575     { test "$extra_verbose" = "yes" && cat << \EOF
11576     Defining HAVE_NAS_SOUND
11577 EOF
11578 cat >> confdefs.h <<\EOF
11579 #define HAVE_NAS_SOUND 1
11580 EOF
11581 }
11582
11583     extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
11584    echo "    xemacs will be linked with \"nas.o\""
11585  fi
11586     libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
11587             cat > conftest.$ac_ext <<EOF
11588 #line 11589 "configure"
11589 #include "confdefs.h"
11590 #include <audio/Xtutil.h>
11591 EOF
11592 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11593   egrep "AuXtErrorJump" >/dev/null 2>&1; then
11594   :
11595 else
11596   rm -rf conftest*
11597   old_nas=yes; { test "$extra_verbose" = "yes" && cat << \EOF
11598     Defining NAS_NO_ERROR_JUMP
11599 EOF
11600 cat >> confdefs.h <<\EOF
11601 #define NAS_NO_ERROR_JUMP 1
11602 EOF
11603 }
11604
11605 fi
11606 rm -f conftest*
11607
11608   else
11609     test "$with_nas_sound" = "yes" && \
11610       { echo "Error:" "Required NAS sound support cannot be provided." >&2; exit 1; }
11611     with_nas_sound=no
11612   fi
11613 fi
11614
11615 if test "$with_esd_sound" != "no"; then
11616   # Extract the first word of "esd-config", so it can be a program name with args.
11617 set dummy esd-config; ac_word=$2
11618 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
11619 echo "configure:11620: checking for $ac_word" >&5
11620
11621 if test -n "$have_esd_config"; then
11622   ac_cv_prog_have_esd_config="$have_esd_config" # Let the user override the test.
11623 else
11624   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
11625   ac_dummy="$PATH"
11626   for ac_dir in $ac_dummy; do
11627     test -z "$ac_dir" && ac_dir=.
11628     if test -f $ac_dir/$ac_word; then
11629       ac_cv_prog_have_esd_config="yes"
11630       break
11631     fi
11632   done
11633   IFS="$ac_save_ifs"
11634   test -z "$ac_cv_prog_have_esd_config" && ac_cv_prog_have_esd_config="no"
11635 fi
11636 have_esd_config="$ac_cv_prog_have_esd_config"
11637 if test -n "$have_esd_config"; then
11638   echo "$ac_t""$have_esd_config" 1>&6
11639 else
11640   echo "$ac_t""no" 1>&6
11641 fi
11642
11643   if test "$have_esd_config" = "yes"; then
11644     save_c_switch_site="$c_switch_site" save_LIBS="$LIBS"
11645     c_switch_site="$c_switch_site `esd-config --cflags`" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"`esd-config --cflags`\" to \$c_switch_site"; fi
11646     LIBS="`esd-config --libs` $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"`esd-config --libs`\" to \$LIBS"; fi
11647     echo $ac_n "checking for esd_play_stream""... $ac_c" 1>&6
11648 echo "configure:11649: checking for esd_play_stream" >&5
11649
11650 cat > conftest.$ac_ext <<EOF
11651 #line 11652 "configure"
11652 #include "confdefs.h"
11653 /* System header to define __stub macros and hopefully few prototypes,
11654     which can conflict with char esd_play_stream(); below.  */
11655 #include <assert.h>
11656 /* Override any gcc2 internal prototype to avoid an error.  */
11657 /* We use char because int might match the return type of a gcc2
11658     builtin and then its argument prototype would still apply.  */
11659 char esd_play_stream();
11660
11661 int main() {
11662
11663 /* The GNU C library defines this for functions which it implements
11664     to always fail with ENOSYS.  Some functions are actually named
11665     something starting with __ and the normal name is an alias.  */
11666 #if defined (__stub_esd_play_stream) || defined (__stub___esd_play_stream)
11667 choke me
11668 #else
11669 esd_play_stream();
11670 #endif
11671
11672 ; return 0; }
11673 EOF
11674 if { (eval echo configure:11675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11675   rm -rf conftest*
11676   eval "ac_cv_func_esd_play_stream=yes"
11677 else
11678   echo "configure: failed program was:" >&5
11679   cat conftest.$ac_ext >&5
11680   rm -rf conftest*
11681   eval "ac_cv_func_esd_play_stream=no"
11682 fi
11683 rm -f conftest*
11684
11685 if eval "test \"`echo '$ac_cv_func_'esd_play_stream`\" = yes"; then
11686   echo "$ac_t""yes" 1>&6
11687   have_esd_sound=yes
11688 else
11689   echo "$ac_t""no" 1>&6
11690 c_switch_site="$save_c_switch_site" LIBS="$save_LIBS"
11691 fi
11692
11693   fi
11694
11695   if test "$have_esd_sound" = "yes"; then
11696     with_esd_sound=yes
11697     need_miscplay=yes
11698     extra_objs="$extra_objs esd.o" &&  if test "$extra_verbose" = "yes"; then
11699    echo "    xemacs will be linked with \"esd.o\""
11700  fi
11701     { test "$extra_verbose" = "yes" && cat << \EOF
11702     Defining HAVE_ESD_SOUND
11703 EOF
11704 cat >> confdefs.h <<\EOF
11705 #define HAVE_ESD_SOUND 1
11706 EOF
11707 }
11708
11709   else
11710     test "$with_esd_sound" = "yes" && \
11711       { echo "Error:" "Required ESD sound support cannot be provided." >&2; exit 1; }
11712     with_esd_sound=no
11713   fi
11714 fi
11715
11716 test "$need_miscplay" = "yes" && extra_objs="$extra_objs miscplay.o" &&  if test "$extra_verbose" = "yes"; then
11717    echo "    xemacs will be linked with \"miscplay.o\""
11718  fi
11719
11720
11721 test -z "$with_tty" && with_tty=yes
11722
11723 if test "$with_tty" = "yes"  ; then
11724   echo "checking for TTY-related features" 1>&6
11725 echo "configure:11726: checking for TTY-related features" >&5
11726   { test "$extra_verbose" = "yes" && cat << \EOF
11727     Defining HAVE_TTY
11728 EOF
11729 cat >> confdefs.h <<\EOF
11730 #define HAVE_TTY 1
11731 EOF
11732 }
11733
11734   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
11735    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\""
11736  fi
11737
11738     if test -z "$with_ncurses"; then
11739     
11740 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
11741 echo "configure:11742: checking for tgetent in -lncurses" >&5
11742 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
11743
11744 xe_check_libs=" -lncurses "
11745 cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 /* Override any gcc2 internal prototype to avoid an error.  */
11749 /* We use char because int might match the return type of a gcc2
11750     builtin and then its argument prototype would still apply.  */
11751 char tgetent();
11752
11753 int main() {
11754 tgetent()
11755 ; return 0; }
11756 EOF
11757 if { (eval echo configure:11758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11758   rm -rf conftest*
11759   eval "ac_cv_lib_$ac_lib_var=yes"
11760 else
11761   echo "configure: failed program was:" >&5
11762   cat conftest.$ac_ext >&5
11763   rm -rf conftest*
11764   eval "ac_cv_lib_$ac_lib_var=no"
11765 fi
11766 rm -f conftest*
11767 xe_check_libs=""
11768
11769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11770   echo "$ac_t""yes" 1>&6
11771   with_ncurses=yes
11772 else
11773   echo "$ac_t""no" 1>&6
11774 with_ncurses=no
11775 fi
11776
11777
11778   fi
11779   if test "$with_ncurses" = "yes"; then
11780     { test "$extra_verbose" = "yes" && cat << \EOF
11781     Defining HAVE_NCURSES
11782 EOF
11783 cat >> confdefs.h <<\EOF
11784 #define HAVE_NCURSES 1
11785 EOF
11786 }
11787
11788     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11789 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11790 echo "configure:11791: checking for ncurses/curses.h" >&5
11791
11792 cat > conftest.$ac_ext <<EOF
11793 #line 11794 "configure"
11794 #include "confdefs.h"
11795 #include <ncurses/curses.h>
11796 EOF
11797 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11798 { (eval echo configure:11799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11799 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11800 if test -z "$ac_err"; then
11801   rm -rf conftest*
11802   eval "ac_cv_header_$ac_safe=yes"
11803 else
11804   echo "$ac_err" >&5
11805   echo "configure: failed program was:" >&5
11806   cat conftest.$ac_ext >&5
11807   rm -rf conftest*
11808   eval "ac_cv_header_$ac_safe=no"
11809 fi
11810 rm -f conftest*
11811 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11812   echo "$ac_t""yes" 1>&6
11813   curses_h_path=ncurses/curses.h
11814 else
11815   echo "$ac_t""no" 1>&6
11816 fi
11817
11818     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
11819 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
11820 echo "configure:11821: checking for ncurses/term.h" >&5
11821
11822 cat > conftest.$ac_ext <<EOF
11823 #line 11824 "configure"
11824 #include "confdefs.h"
11825 #include <ncurses/term.h>
11826 EOF
11827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11828 { (eval echo configure:11829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11830 if test -z "$ac_err"; then
11831   rm -rf conftest*
11832   eval "ac_cv_header_$ac_safe=yes"
11833 else
11834   echo "$ac_err" >&5
11835   echo "configure: failed program was:" >&5
11836   cat conftest.$ac_ext >&5
11837   rm -rf conftest*
11838   eval "ac_cv_header_$ac_safe=no"
11839 fi
11840 rm -f conftest*
11841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11842   echo "$ac_t""yes" 1>&6
11843   term_h_path=ncurses/term.h
11844 else
11845   echo "$ac_t""no" 1>&6
11846 fi
11847
11848     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11849    echo "    xemacs will be linked with \"terminfo.o\""
11850  fi
11851     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
11852
11853     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
11854                         save_c_switch_site="$c_switch_site"
11855       c_switch_site="$c_switch_site -I/usr/include/ncurses"
11856       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
11857 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
11858 echo "configure:11859: checking for ncurses/curses.h" >&5
11859
11860 cat > conftest.$ac_ext <<EOF
11861 #line 11862 "configure"
11862 #include "confdefs.h"
11863 #include <ncurses/curses.h>
11864 EOF
11865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11866 { (eval echo configure:11867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11868 if test -z "$ac_err"; then
11869   rm -rf conftest*
11870   eval "ac_cv_header_$ac_safe=yes"
11871 else
11872   echo "$ac_err" >&5
11873   echo "configure: failed program was:" >&5
11874   cat conftest.$ac_ext >&5
11875   rm -rf conftest*
11876   eval "ac_cv_header_$ac_safe=no"
11877 fi
11878 rm -f conftest*
11879 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11880   echo "$ac_t""yes" 1>&6
11881   curses_h_path=ncurses/curses.h
11882 else
11883   echo "$ac_t""no" 1>&6
11884 fi
11885
11886       if test "$ac_cv_header_ncurses_curses_h" = "yes"
11887         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
11888         else c_switch_site="$save_c_switch_site"
11889       fi
11890     fi
11891   else         if test "$have_terminfo" = "yes"; then
11892       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
11893    echo "    xemacs will be linked with \"terminfo.o\""
11894  fi
11895       if test -n "$libs_termcap"; then
11896         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11897       else
11898         for lib in curses termlib termcap; do
11899           
11900 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
11901 echo "configure:11902: checking for tgetent in -l$lib" >&5
11902 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
11903
11904 xe_check_libs=" -l$lib "
11905 cat > conftest.$ac_ext <<EOF
11906 #line 11907 "configure"
11907 #include "confdefs.h"
11908 /* Override any gcc2 internal prototype to avoid an error.  */
11909 /* We use char because int might match the return type of a gcc2
11910     builtin and then its argument prototype would still apply.  */
11911 char tgetent();
11912
11913 int main() {
11914 tgetent()
11915 ; return 0; }
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11918   rm -rf conftest*
11919   eval "ac_cv_lib_$ac_lib_var=yes"
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -rf conftest*
11924   eval "ac_cv_lib_$ac_lib_var=no"
11925 fi
11926 rm -f conftest*
11927 xe_check_libs=""
11928
11929 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11930   echo "$ac_t""yes" 1>&6
11931   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
11932 else
11933   echo "$ac_t""no" 1>&6
11934 fi
11935
11936
11937         done
11938       fi
11939     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
11940    echo "    xemacs will be linked with \"tparam.o\""
11941  fi
11942                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
11943       if test -n "$libs_termcap"; then
11944         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
11945       else
11946         
11947 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
11948 echo "configure:11949: checking for tgetent in -lcurses" >&5
11949 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
11950
11951 xe_check_libs=" -lcurses "
11952 cat > conftest.$ac_ext <<EOF
11953 #line 11954 "configure"
11954 #include "confdefs.h"
11955 /* Override any gcc2 internal prototype to avoid an error.  */
11956 /* We use char because int might match the return type of a gcc2
11957     builtin and then its argument prototype would still apply.  */
11958 char tgetent();
11959
11960 int main() {
11961 tgetent()
11962 ; return 0; }
11963 EOF
11964 if { (eval echo configure:11965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11965   rm -rf conftest*
11966   eval "ac_cv_lib_$ac_lib_var=yes"
11967 else
11968   echo "configure: failed program was:" >&5
11969   cat conftest.$ac_ext >&5
11970   rm -rf conftest*
11971   eval "ac_cv_lib_$ac_lib_var=no"
11972 fi
11973 rm -f conftest*
11974 xe_check_libs=""
11975
11976 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11977   echo "$ac_t""yes" 1>&6
11978   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
11979 else
11980   echo "$ac_t""no" 1>&6
11981 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
11982 echo "configure:11983: checking for tgetent in -ltermcap" >&5
11983 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
11984
11985 xe_check_libs=" -ltermcap "
11986 cat > conftest.$ac_ext <<EOF
11987 #line 11988 "configure"
11988 #include "confdefs.h"
11989 /* Override any gcc2 internal prototype to avoid an error.  */
11990 /* We use char because int might match the return type of a gcc2
11991     builtin and then its argument prototype would still apply.  */
11992 char tgetent();
11993
11994 int main() {
11995 tgetent()
11996 ; return 0; }
11997 EOF
11998 if { (eval echo configure:11999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11999   rm -rf conftest*
12000   eval "ac_cv_lib_$ac_lib_var=yes"
12001 else
12002   echo "configure: failed program was:" >&5
12003   cat conftest.$ac_ext >&5
12004   rm -rf conftest*
12005   eval "ac_cv_lib_$ac_lib_var=no"
12006 fi
12007 rm -f conftest*
12008 xe_check_libs=""
12009
12010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12011   echo "$ac_t""yes" 1>&6
12012   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
12013 else
12014   echo "$ac_t""no" 1>&6
12015 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
12016    echo "    xemacs will be linked with \"termcap.o\""
12017  fi
12018 fi
12019
12020
12021 fi
12022
12023
12024       fi
12025     fi
12026   fi
12027   { test "$extra_verbose" = "yes" && cat << EOF
12028     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
12029 EOF
12030 cat >> confdefs.h <<EOF
12031 #define CURSES_H_PATH "${curses_h_path-curses.h}"
12032 EOF
12033 }
12034
12035   { test "$extra_verbose" = "yes" && cat << EOF
12036     Defining TERM_H_PATH = "${term_h_path-term.h}"
12037 EOF
12038 cat >> confdefs.h <<EOF
12039 #define TERM_H_PATH "${term_h_path-term.h}"
12040 EOF
12041 }
12042
12043
12044     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
12045 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
12046 echo "configure:12047: checking for gpm.h" >&5
12047
12048 cat > conftest.$ac_ext <<EOF
12049 #line 12050 "configure"
12050 #include "confdefs.h"
12051 #include <gpm.h>
12052 EOF
12053 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12054 { (eval echo configure:12055: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12055 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12056 if test -z "$ac_err"; then
12057   rm -rf conftest*
12058   eval "ac_cv_header_$ac_safe=yes"
12059 else
12060   echo "$ac_err" >&5
12061   echo "configure: failed program was:" >&5
12062   cat conftest.$ac_ext >&5
12063   rm -rf conftest*
12064   eval "ac_cv_header_$ac_safe=no"
12065 fi
12066 rm -f conftest*
12067 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12068   echo "$ac_t""yes" 1>&6
12069   :
12070 else
12071   echo "$ac_t""no" 1>&6
12072 with_gpm=no
12073 fi
12074  }
12075   test -z "$with_gpm" && { 
12076 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
12077 echo "configure:12078: checking for Gpm_Open in -lgpm" >&5
12078 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
12079
12080 xe_check_libs=" -lgpm "
12081 cat > conftest.$ac_ext <<EOF
12082 #line 12083 "configure"
12083 #include "confdefs.h"
12084 /* Override any gcc2 internal prototype to avoid an error.  */
12085 /* We use char because int might match the return type of a gcc2
12086     builtin and then its argument prototype would still apply.  */
12087 char Gpm_Open();
12088
12089 int main() {
12090 Gpm_Open()
12091 ; return 0; }
12092 EOF
12093 if { (eval echo configure:12094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12094   rm -rf conftest*
12095   eval "ac_cv_lib_$ac_lib_var=yes"
12096 else
12097   echo "configure: failed program was:" >&5
12098   cat conftest.$ac_ext >&5
12099   rm -rf conftest*
12100   eval "ac_cv_lib_$ac_lib_var=no"
12101 fi
12102 rm -f conftest*
12103 xe_check_libs=""
12104
12105 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12106   echo "$ac_t""yes" 1>&6
12107   with_gpm=yes
12108 else
12109   echo "$ac_t""no" 1>&6
12110 with_gpm=no
12111 fi
12112
12113  }
12114   if test "$with_gpm" = "yes"; then
12115     { test "$extra_verbose" = "yes" && cat << \EOF
12116     Defining HAVE_GPM
12117 EOF
12118 cat >> confdefs.h <<\EOF
12119 #define HAVE_GPM 1
12120 EOF
12121 }
12122
12123     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
12124    echo "    xemacs will be linked with \"gpmevent.o\""
12125  fi
12126     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
12127   fi
12128
12129 else   for feature in ncurses gpm; do
12130     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
12131       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
12132     fi
12133     eval "with_${feature}=no"
12134   done
12135 fi 
12136 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
12137    echo "    xemacs will be linked with \"event-unixoid.o\""
12138  fi
12139
12140
12141 test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12142   != "no no no" && echo "checking for database support" 1>&6
12143 echo "configure:12144: checking for database support" >&5
12144
12145 if test "$with_database_gdbm $with_database_dbm" != "no no"; then
12146   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
12147 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
12148 echo "configure:12149: checking for ndbm.h" >&5
12149
12150 cat > conftest.$ac_ext <<EOF
12151 #line 12152 "configure"
12152 #include "confdefs.h"
12153 #include <ndbm.h>
12154 EOF
12155 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12156 { (eval echo configure:12157: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12157 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12158 if test -z "$ac_err"; then
12159   rm -rf conftest*
12160   eval "ac_cv_header_$ac_safe=yes"
12161 else
12162   echo "$ac_err" >&5
12163   echo "configure: failed program was:" >&5
12164   cat conftest.$ac_ext >&5
12165   rm -rf conftest*
12166   eval "ac_cv_header_$ac_safe=no"
12167 fi
12168 rm -f conftest*
12169 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12170   echo "$ac_t""yes" 1>&6
12171   :
12172 else
12173   echo "$ac_t""no" 1>&6
12174
12175     test "$with_database_gdbm" = "yes" -o \
12176          "$with_database_dbm"  = "yes" && \
12177       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12178     with_database_gdbm=no with_database_dbm=no
12179 fi
12180
12181 fi
12182
12183 if test "$with_database_gdbm" != "no"; then
12184   
12185 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
12186 echo "configure:12187: checking for dbm_open in -lgdbm" >&5
12187 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
12188
12189 xe_check_libs=" -lgdbm "
12190 cat > conftest.$ac_ext <<EOF
12191 #line 12192 "configure"
12192 #include "confdefs.h"
12193 /* Override any gcc2 internal prototype to avoid an error.  */
12194 /* We use char because int might match the return type of a gcc2
12195     builtin and then its argument prototype would still apply.  */
12196 char dbm_open();
12197
12198 int main() {
12199 dbm_open()
12200 ; return 0; }
12201 EOF
12202 if { (eval echo configure:12203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12203   rm -rf conftest*
12204   eval "ac_cv_lib_$ac_lib_var=yes"
12205 else
12206   echo "configure: failed program was:" >&5
12207   cat conftest.$ac_ext >&5
12208   rm -rf conftest*
12209   eval "ac_cv_lib_$ac_lib_var=no"
12210 fi
12211 rm -f conftest*
12212 xe_check_libs=""
12213
12214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12215   echo "$ac_t""yes" 1>&6
12216   with_database_gdbm=yes with_database_dbm=no libdbm=-lgdbm
12217 else
12218   echo "$ac_t""no" 1>&6
12219 if test "$with_database_gdbm" = "yes"; then
12220      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
12221    fi
12222    with_database_gdbm=no
12223 fi
12224
12225
12226 fi
12227
12228 if test "$with_database_dbm" != "no"; then
12229   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
12230 echo "configure:12231: checking for dbm_open" >&5
12231
12232 cat > conftest.$ac_ext <<EOF
12233 #line 12234 "configure"
12234 #include "confdefs.h"
12235 /* System header to define __stub macros and hopefully few prototypes,
12236     which can conflict with char dbm_open(); below.  */
12237 #include <assert.h>
12238 /* Override any gcc2 internal prototype to avoid an error.  */
12239 /* We use char because int might match the return type of a gcc2
12240     builtin and then its argument prototype would still apply.  */
12241 char dbm_open();
12242
12243 int main() {
12244
12245 /* The GNU C library defines this for functions which it implements
12246     to always fail with ENOSYS.  Some functions are actually named
12247     something starting with __ and the normal name is an alias.  */
12248 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
12249 choke me
12250 #else
12251 dbm_open();
12252 #endif
12253
12254 ; return 0; }
12255 EOF
12256 if { (eval echo configure:12257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12257   rm -rf conftest*
12258   eval "ac_cv_func_dbm_open=yes"
12259 else
12260   echo "configure: failed program was:" >&5
12261   cat conftest.$ac_ext >&5
12262   rm -rf conftest*
12263   eval "ac_cv_func_dbm_open=no"
12264 fi
12265 rm -f conftest*
12266
12267 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
12268   echo "$ac_t""yes" 1>&6
12269   with_database_dbm=yes libdbm=
12270 else
12271   echo "$ac_t""no" 1>&6
12272
12273     
12274 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
12275 echo "configure:12276: checking for dbm_open in -ldbm" >&5
12276 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
12277
12278 xe_check_libs=" -ldbm "
12279 cat > conftest.$ac_ext <<EOF
12280 #line 12281 "configure"
12281 #include "confdefs.h"
12282 /* Override any gcc2 internal prototype to avoid an error.  */
12283 /* We use char because int might match the return type of a gcc2
12284     builtin and then its argument prototype would still apply.  */
12285 char dbm_open();
12286
12287 int main() {
12288 dbm_open()
12289 ; return 0; }
12290 EOF
12291 if { (eval echo configure:12292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12292   rm -rf conftest*
12293   eval "ac_cv_lib_$ac_lib_var=yes"
12294 else
12295   echo "configure: failed program was:" >&5
12296   cat conftest.$ac_ext >&5
12297   rm -rf conftest*
12298   eval "ac_cv_lib_$ac_lib_var=no"
12299 fi
12300 rm -f conftest*
12301 xe_check_libs=""
12302
12303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12304   echo "$ac_t""yes" 1>&6
12305   with_database_dbm=yes libdbm=-ldbm
12306 else
12307   echo "$ac_t""no" 1>&6
12308 test "$with_database_dbm" = "yes" && \
12309         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
12310       with_database_dbm=no
12311 fi
12312
12313
12314 fi
12315
12316 fi
12317
12318 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
12319 test "$with_database_gdbm" = "yes" -o \
12320      "$with_database_dbm"  = "yes" && \
12321   { test "$extra_verbose" = "yes" && cat << \EOF
12322     Defining HAVE_DBM
12323 EOF
12324 cat >> confdefs.h <<\EOF
12325 #define HAVE_DBM 1
12326 EOF
12327 }
12328
12329
12330 if test "$with_database_berkdb" != "no"; then
12331   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
12332 echo "configure:12333: checking for Berkeley db.h" >&5
12333   for path in "db/db.h" "db.h"; do
12334     cat > conftest.$ac_ext <<EOF
12335 #line 12336 "configure"
12336 #include "confdefs.h"
12337
12338 #include <stdlib.h>
12339 #if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
12340 #ifdef HAVE_INTTYPES_H
12341 #define __BIT_TYPES_DEFINED__
12342 #include <inttypes.h>
12343 typedef uint8_t  u_int8_t;
12344 typedef uint16_t u_int16_t;
12345 typedef uint32_t u_int32_t;
12346 #ifdef WE_DONT_NEED_QUADS
12347 typedef uint64_t u_int64_t;
12348 #endif
12349 #endif
12350 #endif
12351 #include <$path>
12352
12353 int main() {
12354
12355 ; return 0; }
12356 EOF
12357 if { (eval echo configure:12358: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12358   rm -rf conftest*
12359   db_h_path="$path"; break
12360 else
12361   echo "configure: failed program was:" >&5
12362   cat conftest.$ac_ext >&5
12363 fi
12364 rm -f conftest*
12365   done
12366   if test -z "$db_h_path"
12367   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
12368   else echo "$ac_t""$db_h_path" 1>&6
12369   fi
12370
12371   if test "$with_database_berkdb" != "no"; then
12372     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
12373 echo "configure:12374: checking for Berkeley DB version" >&5
12374     cat > conftest.$ac_ext <<EOF
12375 #line 12376 "configure"
12376 #include "confdefs.h"
12377 #include <$db_h_path>
12378 #if DB_VERSION_MAJOR > 1
12379 yes
12380 #endif
12381
12382 EOF
12383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12384   egrep "yes" >/dev/null 2>&1; then
12385   rm -rf conftest*
12386   echo "$ac_t""2" 1>&6; dbfunc=db_open
12387 else
12388   rm -rf conftest*
12389   echo "$ac_t""1" 1>&6; dbfunc=dbopen
12390 fi
12391 rm -f conftest*
12392
12393     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
12394 echo "configure:12395: checking for $dbfunc" >&5
12395
12396 cat > conftest.$ac_ext <<EOF
12397 #line 12398 "configure"
12398 #include "confdefs.h"
12399 /* System header to define __stub macros and hopefully few prototypes,
12400     which can conflict with char $dbfunc(); below.  */
12401 #include <assert.h>
12402 /* Override any gcc2 internal prototype to avoid an error.  */
12403 /* We use char because int might match the return type of a gcc2
12404     builtin and then its argument prototype would still apply.  */
12405 char $dbfunc();
12406
12407 int main() {
12408
12409 /* The GNU C library defines this for functions which it implements
12410     to always fail with ENOSYS.  Some functions are actually named
12411     something starting with __ and the normal name is an alias.  */
12412 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
12413 choke me
12414 #else
12415 $dbfunc();
12416 #endif
12417
12418 ; return 0; }
12419 EOF
12420 if { (eval echo configure:12421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12421   rm -rf conftest*
12422   eval "ac_cv_func_$dbfunc=yes"
12423 else
12424   echo "configure: failed program was:" >&5
12425   cat conftest.$ac_ext >&5
12426   rm -rf conftest*
12427   eval "ac_cv_func_$dbfunc=no"
12428 fi
12429 rm -f conftest*
12430
12431 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
12432   echo "$ac_t""yes" 1>&6
12433   with_database_berkdb=yes need_libdb=no
12434 else
12435   echo "$ac_t""no" 1>&6
12436
12437     
12438 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
12439 echo "configure:12440: checking for $dbfunc in -ldb" >&5
12440 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
12441
12442 xe_check_libs=" -ldb "
12443 cat > conftest.$ac_ext <<EOF
12444 #line 12445 "configure"
12445 #include "confdefs.h"
12446 /* Override any gcc2 internal prototype to avoid an error.  */
12447 /* We use char because int might match the return type of a gcc2
12448     builtin and then its argument prototype would still apply.  */
12449 char $dbfunc();
12450
12451 int main() {
12452 $dbfunc()
12453 ; return 0; }
12454 EOF
12455 if { (eval echo configure:12456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12456   rm -rf conftest*
12457   eval "ac_cv_lib_$ac_lib_var=yes"
12458 else
12459   echo "configure: failed program was:" >&5
12460   cat conftest.$ac_ext >&5
12461   rm -rf conftest*
12462   eval "ac_cv_lib_$ac_lib_var=no"
12463 fi
12464 rm -f conftest*
12465 xe_check_libs=""
12466
12467 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12468   echo "$ac_t""yes" 1>&6
12469   with_database_berkdb=yes need_libdb=yes
12470 else
12471   echo "$ac_t""no" 1>&6
12472 fi
12473
12474
12475 fi
12476
12477   fi
12478
12479   if test "$with_database_berkdb" = "yes"; then
12480     { test "$extra_verbose" = "yes" && cat << EOF
12481     Defining DB_H_PATH = "$db_h_path"
12482 EOF
12483 cat >> confdefs.h <<EOF
12484 #define DB_H_PATH "$db_h_path"
12485 EOF
12486 }
12487
12488     { test "$extra_verbose" = "yes" && cat << \EOF
12489     Defining HAVE_BERKELEY_DB
12490 EOF
12491 cat >> confdefs.h <<\EOF
12492 #define HAVE_BERKELEY_DB 1
12493 EOF
12494 }
12495
12496     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
12497   else with_database_berkdb=no
12498   fi
12499 fi
12500
12501 if test "$with_database_gdbm $with_database_dbm $with_database_berkdb" \
12502      != "no no no"; then
12503   { test "$extra_verbose" = "yes" && cat << \EOF
12504     Defining HAVE_DATABASE
12505 EOF
12506 cat >> confdefs.h <<\EOF
12507 #define HAVE_DATABASE 1
12508 EOF
12509 }
12510
12511   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
12512    echo "    xemacs will be linked with \"database.o\""
12513  fi
12514 fi
12515
12516 if test "$with_socks" = "yes"; then
12517   
12518 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
12519 echo "configure:12520: checking for SOCKSinit in -lsocks" >&5
12520 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
12521
12522 xe_check_libs=" -lsocks "
12523 cat > conftest.$ac_ext <<EOF
12524 #line 12525 "configure"
12525 #include "confdefs.h"
12526 /* Override any gcc2 internal prototype to avoid an error.  */
12527 /* We use char because int might match the return type of a gcc2
12528     builtin and then its argument prototype would still apply.  */
12529 char SOCKSinit();
12530
12531 int main() {
12532 SOCKSinit()
12533 ; return 0; }
12534 EOF
12535 if { (eval echo configure:12536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12536   rm -rf conftest*
12537   eval "ac_cv_lib_$ac_lib_var=yes"
12538 else
12539   echo "configure: failed program was:" >&5
12540   cat conftest.$ac_ext >&5
12541   rm -rf conftest*
12542   eval "ac_cv_lib_$ac_lib_var=no"
12543 fi
12544 rm -f conftest*
12545 xe_check_libs=""
12546
12547 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12548   echo "$ac_t""yes" 1>&6
12549     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
12550     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
12551   { test "$extra_verbose" = "yes" && cat << EOF
12552     Defining $ac_tr_lib
12553 EOF
12554 cat >> confdefs.h <<EOF
12555 #define $ac_tr_lib 1
12556 EOF
12557 }
12558
12559   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
12560
12561 else
12562   echo "$ac_t""no" 1>&6
12563 fi
12564
12565
12566   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
12567     Defining HAVE_SOCKS
12568 EOF
12569 cat >> confdefs.h <<\EOF
12570 #define HAVE_SOCKS 1
12571 EOF
12572 }
12573
12574 fi
12575
12576 if test "$usage_tracking" = "yes"; then
12577   { test "$extra_verbose" = "yes" && cat << \EOF
12578     Defining USAGE_TRACKING
12579 EOF
12580 cat >> confdefs.h <<\EOF
12581 #define USAGE_TRACKING 1
12582 EOF
12583 }
12584
12585   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
12586 fi
12587
12588 if test "$with_modules" != "no"; then
12589   echo "checking for module support" 1>&6
12590 echo "configure:12591: checking for module support" >&5
12591
12592     ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
12593 echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
12594 echo "configure:12595: checking for dlfcn.h" >&5
12595
12596 cat > conftest.$ac_ext <<EOF
12597 #line 12598 "configure"
12598 #include "confdefs.h"
12599 #include <dlfcn.h>
12600 EOF
12601 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
12602 { (eval echo configure:12603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
12603 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
12604 if test -z "$ac_err"; then
12605   rm -rf conftest*
12606   eval "ac_cv_header_$ac_safe=yes"
12607 else
12608   echo "$ac_err" >&5
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -rf conftest*
12612   eval "ac_cv_header_$ac_safe=no"
12613 fi
12614 rm -f conftest*
12615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
12616   echo "$ac_t""yes" 1>&6
12617   
12618     
12619 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
12620 echo "configure:12621: checking for dlopen in -ldl" >&5
12621 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
12622
12623 xe_check_libs=" -ldl "
12624 cat > conftest.$ac_ext <<EOF
12625 #line 12626 "configure"
12626 #include "confdefs.h"
12627 /* Override any gcc2 internal prototype to avoid an error.  */
12628 /* We use char because int might match the return type of a gcc2
12629     builtin and then its argument prototype would still apply.  */
12630 char dlopen();
12631
12632 int main() {
12633 dlopen()
12634 ; return 0; }
12635 EOF
12636 if { (eval echo configure:12637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12637   rm -rf conftest*
12638   eval "ac_cv_lib_$ac_lib_var=yes"
12639 else
12640   echo "configure: failed program was:" >&5
12641   cat conftest.$ac_ext >&5
12642   rm -rf conftest*
12643   eval "ac_cv_lib_$ac_lib_var=no"
12644 fi
12645 rm -f conftest*
12646 xe_check_libs=""
12647
12648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12649   echo "$ac_t""yes" 1>&6
12650   have_dl=yes libdl=dl
12651 else
12652   echo "$ac_t""no" 1>&6
12653
12654 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
12655 echo "configure:12656: checking for dlopen in -lc" >&5
12656 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
12657
12658 xe_check_libs=" -lc "
12659 cat > conftest.$ac_ext <<EOF
12660 #line 12661 "configure"
12661 #include "confdefs.h"
12662 /* Override any gcc2 internal prototype to avoid an error.  */
12663 /* We use char because int might match the return type of a gcc2
12664     builtin and then its argument prototype would still apply.  */
12665 char dlopen();
12666
12667 int main() {
12668 dlopen()
12669 ; return 0; }
12670 EOF
12671 if { (eval echo configure:12672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12672   rm -rf conftest*
12673   eval "ac_cv_lib_$ac_lib_var=yes"
12674 else
12675   echo "configure: failed program was:" >&5
12676   cat conftest.$ac_ext >&5
12677   rm -rf conftest*
12678   eval "ac_cv_lib_$ac_lib_var=no"
12679 fi
12680 rm -f conftest*
12681 xe_check_libs=""
12682
12683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12684   echo "$ac_t""yes" 1>&6
12685   have_dl=yes 
12686 else
12687   echo "$ac_t""no" 1>&6
12688 fi
12689
12690
12691 fi
12692
12693
12694 else
12695   echo "$ac_t""no" 1>&6
12696 fi
12697
12698   if test -n "$have_dl"; then
12699     { test "$extra_verbose" = "yes" && cat << \EOF
12700     Defining HAVE_DLOPEN
12701 EOF
12702 cat >> confdefs.h <<\EOF
12703 #define HAVE_DLOPEN 1
12704 EOF
12705 }
12706
12707   else
12708     
12709 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
12710 echo "configure:12711: checking for shl_load in -ldld" >&5
12711 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
12712
12713 xe_check_libs=" -ldld "
12714 cat > conftest.$ac_ext <<EOF
12715 #line 12716 "configure"
12716 #include "confdefs.h"
12717 /* Override any gcc2 internal prototype to avoid an error.  */
12718 /* We use char because int might match the return type of a gcc2
12719     builtin and then its argument prototype would still apply.  */
12720 char shl_load();
12721
12722 int main() {
12723 shl_load()
12724 ; return 0; }
12725 EOF
12726 if { (eval echo configure:12727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12727   rm -rf conftest*
12728   eval "ac_cv_lib_$ac_lib_var=yes"
12729 else
12730   echo "configure: failed program was:" >&5
12731   cat conftest.$ac_ext >&5
12732   rm -rf conftest*
12733   eval "ac_cv_lib_$ac_lib_var=no"
12734 fi
12735 rm -f conftest*
12736 xe_check_libs=""
12737
12738 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12739   echo "$ac_t""yes" 1>&6
12740   libdl=dld have_dl=yes;
12741       { test "$extra_verbose" = "yes" && cat << \EOF
12742     Defining HAVE_SHL_LOAD
12743 EOF
12744 cat >> confdefs.h <<\EOF
12745 #define HAVE_SHL_LOAD 1
12746 EOF
12747 }
12748
12749 else
12750   echo "$ac_t""no" 1>&6
12751
12752 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
12753 echo "configure:12754: checking for dld_init in -ldld" >&5
12754 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
12755
12756 xe_check_libs=" -ldld "
12757 cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 /* Override any gcc2 internal prototype to avoid an error.  */
12761 /* We use char because int might match the return type of a gcc2
12762     builtin and then its argument prototype would still apply.  */
12763 char dld_init();
12764
12765 int main() {
12766 dld_init()
12767 ; return 0; }
12768 EOF
12769 if { (eval echo configure:12770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12770   rm -rf conftest*
12771   eval "ac_cv_lib_$ac_lib_var=yes"
12772 else
12773   echo "configure: failed program was:" >&5
12774   cat conftest.$ac_ext >&5
12775   rm -rf conftest*
12776   eval "ac_cv_lib_$ac_lib_var=no"
12777 fi
12778 rm -f conftest*
12779 xe_check_libs=""
12780
12781 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
12782   echo "$ac_t""yes" 1>&6
12783   libdl=dld have_dl=yes;
12784       { test "$extra_verbose" = "yes" && cat << \EOF
12785     Defining HAVE_DLD_INIT
12786 EOF
12787 cat >> confdefs.h <<\EOF
12788 #define HAVE_DLD_INIT 1
12789 EOF
12790 }
12791
12792 else
12793   echo "$ac_t""no" 1>&6
12794 fi
12795
12796
12797 fi
12798
12799
12800   fi
12801
12802   if test -n "$have_dl"; then
12803         
12804 dll_ld=
12805 dll_ldflags=
12806 dll_cflags=
12807 dll_post=
12808 dll_ldo="-o"
12809 ld_dynamic_link_flags=
12810 xehost=$canonical
12811 xealias=$internal_configuration
12812
12813 echo "checking how to build dynamic libraries for ${xehost}" 1>&6
12814 echo "configure:12815: checking how to build dynamic libraries for ${xehost}" >&5
12815 # Transform *-*-linux* to *-*-linux-gnu*, to support old configure scripts.
12816 case "$xehost" in
12817 *-*-linux-gnu*) ;;
12818 *-*-linux*) xehost=`echo $xehost | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
12819 esac
12820
12821 xehost_cpu=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
12822 xehost_vendor=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
12823 xehost_os=`echo $xehost | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
12824
12825 case "$xehost_os" in
12826 aix3*)
12827   # AIX sometimes has problems with the GCC collect2 program.  For some
12828   # reason, if we set the COLLECT_NAMES environment variable, the problems
12829   # vanish in a puff of smoke.
12830   if test "${COLLECT_NAMES+set}" != set; then
12831     COLLECT_NAMES=
12832     export COLLECT_NAMES
12833   fi
12834   ;;
12835 esac
12836
12837 # Now see if the compiler is really GCC.
12838 if test "$GCC" = "yes"; then
12839   XEGCC=yes
12840 else
12841   echo $ac_n "checking checking whether we are using GNU C""... $ac_c" 1>&6
12842 echo "configure:12843: checking checking whether we are using GNU C" >&5
12843   cat > conftest.$ac_ext <<EOF
12844 #line 12845 "configure"
12845 #include "confdefs.h"
12846
12847 #ifdef __GNUC__
12848   yes;
12849 #endif
12850
12851 EOF
12852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12853   egrep "yes" >/dev/null 2>&1; then
12854   rm -rf conftest*
12855   XEGCC=yes
12856 else
12857   rm -rf conftest*
12858   XEGCC=no
12859 fi
12860 rm -f conftest*
12861
12862   echo "$ac_t""${XEGCC}" 1>&6
12863 fi
12864
12865 echo $ac_n "checking how to produce PIC code""... $ac_c" 1>&6
12866 echo "configure:12867: checking how to produce PIC code" >&5
12867 wl=
12868
12869 can_build_shared=yes
12870 if test "$XEGCC" = yes; then
12871   wl='-Wl,'
12872
12873   case "$xehost_os" in
12874   aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
12875     # PIC is the default for these OSes.
12876     ;;
12877
12878   aix3* | aix4* | os2*)
12879     # We can build DLLs from non-PIC.
12880     ;;
12881   amigaos*)
12882     # FIXME: we need at least 68020 code to build shared libraries, but
12883     # adding the `-m68020' flag to GCC prevents building anything better,
12884     # like `-m68040'.
12885     dll_cflags='-m68020 -resident32 -malways-restore-a4'
12886     ;;
12887   *)
12888     dll_cflags='-fPIC'
12889     ;;
12890   esac
12891 else
12892   # PORTME Check for PIC flags for the system compiler.
12893   case "$xehost_os" in
12894   hpux9* | hpux1[0-9]*)
12895     # Is there a better link_static_flag that works with the bundled CC?
12896     wl='-Wl,'
12897     dll_cflags='+Z'
12898     ;;
12899
12900   irix5* | irix6*)
12901     wl='-Wl,'
12902     # PIC (with -KPIC) is the default.
12903     ;;
12904
12905   os2*)
12906     # We can build DLLs from non-PIC.
12907     ;;
12908
12909   osf3* | osf4*)
12910     # All OSF/1 code is PIC.
12911     wl='-Wl,'
12912     ;;
12913
12914   sco3.2v5*)
12915     dll_cflags='-belf -Kpic'
12916     wl='-Wl,'
12917     ;;
12918
12919   unixware*)
12920     dll_cflags="-KPIC"
12921     wl="-Wl,"
12922     ;;
12923
12924   sysv4*)
12925     dll_cflags="-KPIC"
12926     wl="-Wl,"
12927     ;;
12928
12929   sysv5*)
12930     dll_cflags="-KPIC"
12931     wl="-Wl,"
12932     ;;
12933
12934   solaris2*)
12935     dll_cflags='-KPIC'
12936     wl='-Wl,'
12937     ;;
12938
12939   sunos4*)
12940     dll_cflags='-PIC'
12941     wl='-Qoption ld '
12942     ;;
12943
12944   uts4*)
12945     dll_cflags='-pic'
12946     ;;
12947
12948   *)
12949     can_build_shared=no
12950     ;;
12951   esac
12952 fi
12953
12954 if test -n "$dll_cflags"; then
12955   echo "$ac_t""${dll_cflags}" 1>&6
12956   
12957   # Check to make sure the dll_cflags actually works.
12958   echo $ac_n "checking if PIC flag ${dll_cflags} really works""... $ac_c" 1>&6
12959 echo "configure:12960: checking if PIC flag ${dll_cflags} really works" >&5
12960   save_CFLAGS="$CFLAGS"
12961   CFLAGS="$CFLAGS $dll_cflags -DPIC"
12962   cat > conftest.$ac_ext <<EOF
12963 #line 12964 "configure"
12964 #include "confdefs.h"
12965
12966 int main() {
12967 int x=0;
12968 ; return 0; }
12969 EOF
12970 if { (eval echo configure:12971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
12971   rm -rf conftest*
12972   
12973     # On HP-UX, the stripped-down bundled CC doesn't accept +Z, but also
12974     # reports no error.  So, we need to grep stderr for (Bundled).
12975     if grep '(Bundled)' config.log >/dev/null; then
12976       echo "$ac_t""no" 1>&6
12977       can_build_shared=no
12978       dll_cflags=
12979     else
12980       echo "$ac_t""yes" 1>&6
12981     fi
12982 else
12983   echo "configure: failed program was:" >&5
12984   cat conftest.$ac_ext >&5
12985   rm -rf conftest*
12986   echo "$ac_t""no" 1>&6
12987     can_build_shared=no
12988     dll_cflags=
12989 fi
12990 rm -f conftest*
12991   CFLAGS="$save_CFLAGS"
12992 else
12993   echo "$ac_t""none" 1>&6
12994 fi
12995
12996 if test "$can_build_shared" = "yes"; then
12997 cc_produces_so=no
12998 xldf=
12999 xcldf=
13000 echo $ac_n "checking if C compiler can produce shared libraries""... $ac_c" 1>&6
13001 echo "configure:13002: checking if C compiler can produce shared libraries" >&5
13002 if test "$XEGCC" = yes; then
13003   xcldf="-shared"
13004   xldf="-shared"
13005 else # Not using GCC
13006   case "$xehost_os" in
13007     aix3* | aix4*)
13008       xldf="-bE:ELLSONAME.exp -H512 -T512 -bhalt:4 -bM:SRE -bnoentry -lc"
13009       xcldf="${wl}-bE:ELLSONAME.exp ${wl}-H512 ${wl}-T512 ${wl}-bhalt:4 ${wl}-bM:SRE ${wl}-bnoentry ${wl}-lc"
13010       ;;
13011
13012     freebsd2* | netbsd* | openbsd*)
13013       xldf="-Bshareable"
13014       xcldf="${wl}-Bshareable"
13015       ;;
13016
13017     freebsd3*)
13018       xcldf="-shared"
13019       ;;
13020
13021     hpux*)
13022       xldf="-b +s"
13023       xcldf="${wl}-b ${wl}+s"
13024       ;;
13025
13026     irix5* | irix6* | osf3* | osf4*)
13027       xcldf="${wl}-shared"
13028       xldf="-shared"
13029       ;;
13030
13031     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7* | uts4*)
13032       xcldf="-G"
13033       xldf="-G"
13034       ;;
13035
13036     sunos4*)
13037       xcldf="${wl}-assert ${wl}pure-text ${wl}-Bstatic"
13038       xldf="-assert pure-text -Bstatic"
13039       ;;
13040   esac
13041 fi # End if if we are using gcc
13042
13043 if test -n "$xcldf"; then
13044   save_LDFLAGS=$LDFLAGS
13045   save_LIBS=$LIBS
13046   save_xe_libs=$xe_libs
13047   LDFLAGS="$xcldf $LDFLAGS"
13048   LIBS=
13049   xe_libs=
13050   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13051   cat > conftest.$ac_ext <<EOF
13052 #line 13053 "configure"
13053 #include "confdefs.h"
13054
13055 int main() {
13056 int x=0;
13057 ; return 0; }
13058 EOF
13059 if { (eval echo configure:13060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13060   rm -rf conftest*
13061   cc_produces_so=yes
13062 else
13063   echo "configure: failed program was:" >&5
13064   cat conftest.$ac_ext >&5
13065   rm -rf conftest*
13066   cc_produces_so=no
13067 fi
13068 rm -f conftest*
13069   LDFLAGS=$save_LDFLAGS
13070   LIBS=$save_LIBS
13071   xe_libs=$save_xe_libs
13072   ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
13073 else
13074   cc_produces_so=no
13075 fi
13076 echo "$ac_t""${cc_produces_so}" 1>&6
13077
13078 LTLD=$LD
13079 if test -z "$LTLD"; then
13080   ac_prog=ld
13081   if test "$XEGCC" = yes; then
13082     # Check if gcc -print-prog-name=ld gives a path.
13083     echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
13084 echo "configure:13085: checking for ld used by GCC" >&5
13085     ac_prog=`($CC -print-prog-name=ld) 2>&5`
13086     case "$ac_prog" in
13087     # Accept absolute paths.
13088     /*)
13089       if test -z "$LTLD"; then
13090         case "$ac_prog" in
13091           *gcc-lib*) LTLD="$CC"
13092                      ;;
13093           *)         LTLD="$ac_prog"
13094                      ;;
13095         esac
13096       fi
13097       ;;
13098     "")
13099       # If it fails, then pretend we aren't using GCC.
13100       ac_prog=ld
13101       ;;
13102     *)
13103       # If it is relative, then search for the first ld in PATH.
13104       with_gnu_ld=unknown
13105       ;;
13106     esac
13107   else
13108     echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
13109 echo "configure:13110: checking for GNU ld" >&5
13110   fi
13111
13112   if test -z "$LTLD"; then
13113     IFS="${IFS=         }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
13114     for ac_dir in $PATH; do
13115       test -z "$ac_dir" && ac_dir=.
13116       if test -f "$ac_dir/$ac_prog"; then
13117         LTLD="$ac_dir/$ac_prog"
13118         # Check to see if the program is GNU ld.  I'd rather use --version,
13119         # but apparently some GNU ld's only accept -v.
13120         # Break only if it was the GNU/non-GNU ld that we prefer.
13121         if "$LTLD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
13122           xe_gnu_ld=yes
13123         else
13124           xe_gnu_ld=no
13125         fi
13126       fi
13127     done
13128     IFS="$ac_save_ifs"
13129   fi
13130
13131   if test -n "$LTLD"; then
13132     echo "$ac_t""${LTLD}" 1>&6
13133   else
13134     echo "$ac_t""no" 1>&6
13135   fi
13136
13137   if test -z "$LTLD" -a "$cc_produces_so" = no; then
13138     { echo "configure: error: no acceptable linker found in \$PATH" 1>&2; exit 1; }
13139     exit 1
13140   fi
13141 fi
13142
13143 ld_dynamic_link_flags=
13144
13145 # Check to see if it really is or isn't GNU ld.
13146 echo $ac_n "checking if the linker is GNU ld""... $ac_c" 1>&6
13147 echo "configure:13148: checking if the linker is GNU ld" >&5
13148 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
13149 if $LTLD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
13150   xe_gnu_ld=yes
13151 else
13152   xe_gnu_ld=no
13153 fi
13154 echo "$ac_t""${xe_gnu_ld}" 1>&6
13155
13156 case "$xehost_os" in
13157   amigaos* | sunos4*)
13158     # On these operating systems, we should treat GNU ld like the system ld.
13159     gnu_ld_acts_native=yes
13160     ;;
13161   *)
13162     gnu_ld_acts_native=no
13163     ;;
13164 esac
13165
13166 if test "$cc_produces_so" = "yes"; then
13167   dll_ld=$CC
13168   dll_ldflags=$xcldf
13169   can_build_shared=yes
13170 else
13171   # OK - only NOW do we futz about with ld.
13172   # See if the linker supports building shared libraries.
13173   echo $ac_n "checking whether the linker supports shared libraries""... $ac_c" 1>&6
13174 echo "configure:13175: checking whether the linker supports shared libraries" >&5
13175   dll_ld=$CC
13176   dll_ldflags=$LDFLAGS
13177   ld_shlibs=yes
13178   can_build_shared=yes
13179   if test "$xe_gnu_ld" = yes && test "$gnu_ld_acts_native" != yes; then
13180     # See if GNU ld supports shared libraries.
13181     if $LTLD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
13182       dll_ld=$CC
13183       dll_ldflags="-shared"
13184       ld_shlibs=yes
13185     else
13186       ld_shlibs=no
13187     fi
13188   else
13189     # PORTME fill in a description of your system's linker (not GNU ld)
13190     case "$xehost_os" in
13191     aix3*)
13192       dll_ld=$LTLD
13193       dll_ldflags=$xldf
13194       ;;
13195
13196     aix4*)
13197       dll_ldflags=$xcldf
13198       ;;
13199
13200     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
13201     # support.  Future versions do this automatically, but an explicit c++rt0.o
13202     # doesn't break anything, and helps significantly (at the cost of a little
13203     # extra space).
13204     freebsd2.2*)
13205       dll_ld=$LTLD
13206       dll_ldflags=$xldf
13207       dll_post="/usr/lib/c++rt0.o"
13208       ;;
13209
13210     # Unfortunately, older versions of FreeBSD 2 don't have this feature.
13211     freebsd2*)
13212       dll_ld=$LTLD
13213       dll_ldflags="-Bshareable"
13214       ;;
13215
13216     # FreeBSD 3, at last, uses gcc -shared to do shared libraries.
13217     freebsd3*)
13218       dll_ldflags="-shared"
13219       ;;
13220
13221     hpux*)
13222       dll_ld=$LTLD
13223       dll_ldflags=$xldf
13224       ;;
13225
13226     irix5* | irix6*)
13227       dll_ld=$LTLD
13228       dll_ldflags=$xldf
13229       ;;
13230
13231     netbsd*)
13232       # Tested with NetBSD 1.2 ld
13233       dll_ld=$LTLD
13234       dll_ldflags=$xldf
13235       ;;
13236
13237     openbsd*)
13238       dll_ld=$LTLD
13239       dll_ldflags=$xldf
13240       ;;
13241
13242     osf3* | osf4*)
13243       dll_ld=$LTLD
13244       dll_ldflags=$xldf
13245       ;;
13246
13247     # For both SCO and Solaris we MAY want to have LDFLAGS include -z text
13248     sco3.2v5* | unixware* | sysv5* | sysv4* | solaris2* | solaris7*)
13249       dll_ld=$LTLD
13250       case "$dll_ld" in
13251         *gcc*) dll_ldflags="-shared"
13252                dll_ld=$CC
13253                ;;
13254         *)     dll_ldflags="-G"
13255                ;;
13256       esac
13257       ;;
13258
13259     sunos4*)
13260       if test "$XEGCC" = yes; then
13261         dll_ld=$CC
13262       else
13263         dll_ld=$LTLD
13264       fi
13265       dll_ldflags=$xldf
13266       ;;
13267
13268     uts4*)
13269       dll_ld=$LTLD
13270       dll_ldflags="-G"
13271       ;;
13272
13273     bsdi*)
13274       dll_ldflags="-r"
13275       dll_ld="shlicc2"
13276       ;;
13277
13278     *)
13279       ld_shlibs=no
13280       can_build_shared=no
13281       ;;
13282     esac
13283   fi
13284   echo "$ac_t""${ld_shlibs}" 1>&6
13285   if test "$ld_shlibs" = "no"; then
13286     can_build_shared=no
13287   fi
13288 fi # End of if cc_produces_so = no
13289
13290
13291 if test "$xe_gnu_ld" = yes; then
13292   if test "$ld_shlibs" = yes; then
13293     ld_dynamic_link_flags="${wl}-export-dynamic"
13294   fi
13295 fi
13296
13297 if test -z "$ld_dynamic_link_flags"; then
13298   case "$xehost_os" in
13299   aix3*)
13300     ld_dynamic_link_flags=
13301     ;;
13302
13303   aix4*)
13304     ld_dynamic_link_flags=
13305     ;;
13306
13307   freebsd2.2*)
13308     ld_dynamic_link_flags=
13309     ;;
13310
13311   freebsd2*)
13312     ld_dynamic_link_flags=
13313     ;;
13314
13315   freebsd3*)
13316     ld_dynamic_link_flags=
13317     ;;
13318
13319   hpux*)
13320     ld_dynamic_link_flags="${wl}-E"
13321     ;;
13322
13323   irix5* | irix6*)
13324     ld_dynamic_link_flags=
13325     ;;
13326
13327   netbsd*)
13328     ld_dynamic_link_flags=
13329     ;;
13330
13331   openbsd*)
13332     ld_dynamic_link_flags=
13333     ;;
13334
13335   osf3* | osf4*)
13336     ld_dynamic_link_flags=
13337     ;;
13338
13339   solaris2* | solaris7*)
13340     ld_dynamic_link_flags=
13341     ;;
13342
13343   sco3.2v5* | unixware* | sysv5* | sysv4*)
13344     ld_dynamic_link_flags="${wl}-Bexport"
13345     ;;
13346
13347   sunos4*)
13348     ld_dynamic_link_flags=
13349     ;;
13350
13351   uts4*)
13352     ld_dynamic_link_flags=
13353     ;;
13354
13355   bsdi*)
13356     ld_dynamic_link_flags=
13357     ;;
13358
13359   esac
13360 fi # End of if -z ld_dynamic_link_flags
13361 fi # End of if test "$can_build_shared" = "yes"
13362
13363
13364
13365
13366
13367
13368
13369
13370   fi
13371
13372   if test "$can_build_shared" = "yes"; then
13373     { test "$extra_verbose" = "yes" && cat << \EOF
13374     Defining HAVE_SHLIB
13375 EOF
13376 cat >> confdefs.h <<\EOF
13377 #define HAVE_SHLIB 1
13378 EOF
13379 }
13380
13381     extra_objs="$extra_objs sysdll.o emodules.o" &&  if test "$extra_verbose" = "yes"; then
13382    echo "    xemacs will be linked with \"sysdll.o emodules.o\""
13383  fi
13384     INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
13385     test -n "$libdl" && LIBS="-l${libdl} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${libdl}\" to \$LIBS"; fi
13386     for ac_func in dlerror _dlerror
13387 do
13388 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
13389 echo "configure:13390: checking for $ac_func" >&5
13390
13391 cat > conftest.$ac_ext <<EOF
13392 #line 13393 "configure"
13393 #include "confdefs.h"
13394 /* System header to define __stub macros and hopefully few prototypes,
13395     which can conflict with char $ac_func(); below.  */
13396 #include <assert.h>
13397 /* Override any gcc2 internal prototype to avoid an error.  */
13398 /* We use char because int might match the return type of a gcc2
13399     builtin and then its argument prototype would still apply.  */
13400 char $ac_func();
13401
13402 int main() {
13403
13404 /* The GNU C library defines this for functions which it implements
13405     to always fail with ENOSYS.  Some functions are actually named
13406     something starting with __ and the normal name is an alias.  */
13407 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13408 choke me
13409 #else
13410 $ac_func();
13411 #endif
13412
13413 ; return 0; }
13414 EOF
13415 if { (eval echo configure:13416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13416   rm -rf conftest*
13417   eval "ac_cv_func_$ac_func=yes"
13418 else
13419   echo "configure: failed program was:" >&5
13420   cat conftest.$ac_ext >&5
13421   rm -rf conftest*
13422   eval "ac_cv_func_$ac_func=no"
13423 fi
13424 rm -f conftest*
13425
13426 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
13427   echo "$ac_t""yes" 1>&6
13428     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
13429   { test "$extra_verbose" = "yes" && cat << EOF
13430     Defining $ac_tr_func
13431 EOF
13432 cat >> confdefs.h <<EOF
13433 #define $ac_tr_func 1
13434 EOF
13435 }
13436  
13437 else
13438   echo "$ac_t""no" 1>&6
13439 fi
13440 done
13441
13442     with_modules=yes
13443   else
13444     if test "$with_modules" = "yes"; then
13445       { echo "Error:" "Required module support cannot be provided." >&2; exit 1; }
13446     else
13447       echo "configure: warning: "Module support cannot be provided."" 1>&2
13448     fi
13449     with_modules=no
13450   fi
13451 fi
13452
13453 cat > conftest.$ac_ext <<EOF
13454 #line 13455 "configure"
13455 #include "confdefs.h"
13456 int main(int c,char *v[]){return 0;}
13457 EOF
13458 if { (eval echo configure:13459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
13459 then
13460   :
13461 else
13462   conftest_rc="$?"
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -fr conftest*
13466   
13467   echo ""
13468   echo "*** PANIC *** The C compiler can no longer build working executables."
13469   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
13470   echo "*** PANIC *** The most likely reason for this problem is that configure"
13471   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
13472   echo "*** PANIC *** found at run time."
13473   echo "*** PANIC ***"
13474   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
13475   echo "*** PANIC *** On other systems, try telling configure where to find the"
13476   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
13477   echo "*** PANIC ***"
13478   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
13479   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
13480   echo "*** PANIC *** on your system.  Don't do that."
13481   exit 1
13482 fi
13483 rm -fr conftest*
13484
13485 if test "$win32_processes" = "yes"; then
13486   extra_objs="$extra_objs process-nt.o" &&  if test "$extra_verbose" = "yes"; then
13487    echo "    xemacs will be linked with \"process-nt.o\""
13488  fi
13489 else
13490   { test "$extra_verbose" = "yes" && cat << \EOF
13491     Defining HAVE_UNIX_PROCESSES
13492 EOF
13493 cat >> confdefs.h <<\EOF
13494 #define HAVE_UNIX_PROCESSES 1
13495 EOF
13496 }
13497
13498   extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
13499    echo "    xemacs will be linked with \"process-unix.o\""
13500  fi
13501 fi
13502
13503
13504
13505 T=""
13506 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13507 CFLAGS="$T"
13508
13509
13510 T=""
13511 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13512 extra_objs="$T"
13513
13514
13515 T=""
13516 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
13517 c_switch_general="$T"
13518
13519
13520 T=""
13521 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13522 c_switch_window_system="$T"
13523
13524
13525 T=""
13526 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13527 c_switch_all="$T"
13528
13529
13530 T=""
13531 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
13532 ld_switch_general="$T"
13533
13534
13535 T=""
13536 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13537 ld_switch_window_system="$T"
13538
13539
13540 T=""
13541 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13542 ld_switch_all="$T"
13543
13544
13545 T=""
13546 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13547 ld_libs_general="$T"
13548
13549
13550 T=""
13551 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
13552 ld_libs_window_system="$T"
13553
13554
13555 T=""
13556 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13557 ld_libs_all="$T"
13558
13559
13560
13561 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
13562 internal_makefile_list="Makefile.in"
13563 SUBDIR_MAKEFILES=''
13564 test -d lock || mkdir lock
13565 for dir in $MAKE_SUBDIR; do
13566   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
13567         test -d "$d" || mkdir "$d"; cd "$d"
13568       done ) ;;
13569    * ) test -d "$dir" || mkdir "$dir" ;;
13570   esac
13571   
13572 T=""
13573 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13574 SUBDIR_MAKEFILES="$T"
13575
13576   
13577 T=""
13578 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13579 internal_makefile_list="$T"
13580
13581 done
13582
13583
13584
13585
13586 for dir in src/s src/m; do
13587   if test ! -d "$dir" ; then
13588     echo Making symbolic link to "$srcdir/$dir"
13589     ${LN_S} "$srcdir/$dir" "$dir"
13590   fi
13591 done
13592
13593 if test "$extra_verbose" = "yes"; then
13594   echo ""
13595   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
13596   echo ""
13597 fi
13598
13599
13600 if test -f "$srcdir/src/.gdbinit" -a ! -f "src/.gdbinit"; then
13601   test "$extra_verbose" = "yes" && echo "creating src/.gdbinit"
13602   echo "source $srcdir/src/.gdbinit" > "src/.gdbinit"
13603 fi
13604
13605 if test -f "$srcdir/src/.dbxrc" -a ! -f "src/.dbxrc"; then
13606   test "$extra_verbose" = "yes" && echo "creating src/.dbxrc"
13607   echo ". $srcdir/src/.dbxrc" > "src/.dbxrc"
13608 fi
13609
13610 if test -f "$srcdir/TAGS" -a ! -f "TAGS"; then
13611   test "$extra_verbose" = "yes" && echo "creating TAGS"
13612   echo "\f
13613 $srcdir/TAGS,include" > "TAGS"
13614 fi
13615
13616 if test "$__SUNPRO_C" = "yes"; then
13617   test "$extra_verbose" = "yes" && echo "creating .sbinit"
13618   ( echo "# For use with Sun WorkShop's Source browser."
13619     echo "# See sbquery(1) and sbinit(4) for more information"
13620     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
13621   ) > .sbinit
13622 fi
13623
13624 rm -f core
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644 PREFIX=$prefix
13645 while true; do
13646   case "$PREFIX" in
13647     *\$* ) eval "PREFIX=$PREFIX" ;;
13648     *) break ;;
13649   esac
13650 done
13651
13652
13653
13654
13655 EXEC_PREFIX=$exec_prefix
13656 while true; do
13657   case "$EXEC_PREFIX" in
13658     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
13659     *) break ;;
13660   esac
13661 done
13662
13663
13664
13665
13666 INFODIR=$infodir
13667 while true; do
13668   case "$INFODIR" in
13669     *\$* ) eval "INFODIR=$INFODIR" ;;
13670     *) break ;;
13671   esac
13672 done
13673
13674
13675
13676
13677 INFOPATH=$infopath
13678 while true; do
13679   case "$INFOPATH" in
13680     *\$* ) eval "INFOPATH=$INFOPATH" ;;
13681     *) break ;;
13682   esac
13683 done
13684
13685
13686
13687
13688 PACKAGE_PATH=$package_path
13689 while true; do
13690   case "$PACKAGE_PATH" in
13691     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
13692     *) break ;;
13693   esac
13694 done
13695
13696
13697
13698
13699 LISPDIR=$lispdir
13700 while true; do
13701   case "$LISPDIR" in
13702     *\$* ) eval "LISPDIR=$LISPDIR" ;;
13703     *) break ;;
13704   esac
13705 done
13706
13707
13708
13709
13710 MODULEDIR=$moduledir
13711 while true; do
13712   case "$MODULEDIR" in
13713     *\$* ) eval "MODULEDIR=$MODULEDIR" ;;
13714     *) break ;;
13715   esac
13716 done
13717
13718
13719
13720
13721 SITELISPDIR=$sitelispdir
13722 while true; do
13723   case "$SITELISPDIR" in
13724     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
13725     *) break ;;
13726   esac
13727 done
13728
13729
13730
13731
13732 SITEMODULEDIR=$sitemoduledir
13733 while true; do
13734   case "$SITEMODULEDIR" in
13735     *\$* ) eval "SITEMODULEDIR=$SITEMODULEDIR" ;;
13736     *) break ;;
13737   esac
13738 done
13739
13740
13741
13742
13743 ETCDIR=$etcdir
13744 while true; do
13745   case "$ETCDIR" in
13746     *\$* ) eval "ETCDIR=$ETCDIR" ;;
13747     *) break ;;
13748   esac
13749 done
13750
13751
13752
13753
13754 LOCKDIR=$lockdir
13755 while true; do
13756   case "$LOCKDIR" in
13757     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
13758     *) break ;;
13759   esac
13760 done
13761
13762
13763
13764
13765 DOCDIR=$docdir
13766 while true; do
13767   case "$DOCDIR" in
13768     *\$* ) eval "DOCDIR=$DOCDIR" ;;
13769     *) break ;;
13770   esac
13771 done
13772
13773
13774
13775
13776 ARCHLIBDIR=$archlibdir
13777 while true; do
13778   case "$ARCHLIBDIR" in
13779     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
13780     *) break ;;
13781   esac
13782 done
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
13804
13805
13806
13807
13808
13809
13810
13811 : ${XEMACS_CC:=$CC}
13812
13813
13814 if test "$with_prefix" = "yes"; then
13815   { test "$extra_verbose" = "yes" && cat << \EOF
13816     Defining PREFIX_USER_DEFINED
13817 EOF
13818 cat >> confdefs.h <<\EOF
13819 #define PREFIX_USER_DEFINED 1
13820 EOF
13821 }
13822
13823 fi
13824
13825 if test "$with_site_lisp" = "no"; then
13826   { test "$extra_verbose" = "yes" && cat << \EOF
13827     Defining INHIBIT_SITE_LISP
13828 EOF
13829 cat >> confdefs.h <<\EOF
13830 #define INHIBIT_SITE_LISP 1
13831 EOF
13832 }
13833
13834 fi
13835 if test "$with_site_modules" = "no"; then
13836   { test "$extra_verbose" = "yes" && cat << \EOF
13837     Defining INHIBIT_SITE_MODULES
13838 EOF
13839 cat >> confdefs.h <<\EOF
13840 #define INHIBIT_SITE_MODULES 1
13841 EOF
13842 }
13843
13844 fi
13845
13846
13847 T=""
13848 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
13849 ac_configure_args="$T"
13850
13851 { test "$extra_verbose" = "yes" && cat << EOF
13852     Defining EMACS_CONFIGURATION = "$configuration"
13853 EOF
13854 cat >> confdefs.h <<EOF
13855 #define EMACS_CONFIGURATION "$configuration"
13856 EOF
13857 }
13858
13859 { test "$extra_verbose" = "yes" && cat << EOF
13860     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
13861 EOF
13862 cat >> confdefs.h <<EOF
13863 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
13864 EOF
13865 }
13866
13867 { test "$extra_verbose" = "yes" && cat << EOF
13868     Defining config_machfile = "$machfile"
13869 EOF
13870 cat >> confdefs.h <<EOF
13871 #define config_machfile "$machfile"
13872 EOF
13873 }
13874
13875 { test "$extra_verbose" = "yes" && cat << EOF
13876     Defining config_opsysfile = "$opsysfile"
13877 EOF
13878 cat >> confdefs.h <<EOF
13879 #define config_opsysfile "$opsysfile"
13880 EOF
13881 }
13882
13883
13884
13885 null_string=""
13886 { test "$extra_verbose" = "yes" && cat << EOF
13887     Defining LD_SWITCH_X_SITE = $null_string
13888 EOF
13889 cat >> confdefs.h <<EOF
13890 #define LD_SWITCH_X_SITE $null_string
13891 EOF
13892 }
13893
13894 { test "$extra_verbose" = "yes" && cat << EOF
13895     Defining LD_SWITCH_X_SITE_AUX = $null_string
13896 EOF
13897 cat >> confdefs.h <<EOF
13898 #define LD_SWITCH_X_SITE_AUX $null_string
13899 EOF
13900 }
13901
13902 { test "$extra_verbose" = "yes" && cat << EOF
13903     Defining C_SWITCH_X_SITE = $null_string
13904 EOF
13905 cat >> confdefs.h <<EOF
13906 #define C_SWITCH_X_SITE $null_string
13907 EOF
13908 }
13909
13910 { test "$extra_verbose" = "yes" && cat << EOF
13911     Defining LD_SWITCH_SITE = $null_string
13912 EOF
13913 cat >> confdefs.h <<EOF
13914 #define LD_SWITCH_SITE $null_string
13915 EOF
13916 }
13917
13918 { test "$extra_verbose" = "yes" && cat << EOF
13919     Defining C_SWITCH_SITE = $null_string
13920 EOF
13921 cat >> confdefs.h <<EOF
13922 #define C_SWITCH_SITE $null_string
13923 EOF
13924 }
13925
13926
13927
13928 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13929     Defining GNU_MALLOC
13930 EOF
13931 cat >> confdefs.h <<\EOF
13932 #define GNU_MALLOC 1
13933 EOF
13934 }
13935
13936 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13937     Defining USE_SYSTEM_MALLOC
13938 EOF
13939 cat >> confdefs.h <<\EOF
13940 #define USE_SYSTEM_MALLOC 1
13941 EOF
13942 }
13943
13944 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
13945     Defining USE_DEBUG_MALLOC
13946 EOF
13947 cat >> confdefs.h <<\EOF
13948 #define USE_DEBUG_MALLOC 1
13949 EOF
13950 }
13951
13952                                               { test "$extra_verbose" = "yes" && cat << \EOF
13953     Defining USE_SYSTEM_MALLOC
13954 EOF
13955 cat >> confdefs.h <<\EOF
13956 #define USE_SYSTEM_MALLOC 1
13957 EOF
13958 }
13959
13960 fi
13961 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13962     Defining I18N3
13963 EOF
13964 cat >> confdefs.h <<\EOF
13965 #define I18N3 1
13966 EOF
13967 }
13968
13969 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13970     Defining USE_GCC
13971 EOF
13972 cat >> confdefs.h <<\EOF
13973 #define USE_GCC 1
13974 EOF
13975 }
13976
13977 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13978     Defining EXTERNAL_WIDGET
13979 EOF
13980 cat >> confdefs.h <<\EOF
13981 #define EXTERNAL_WIDGET 1
13982 EOF
13983 }
13984
13985 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13986     Defining NO_DOC_FILE
13987 EOF
13988 cat >> confdefs.h <<\EOF
13989 #define NO_DOC_FILE 1
13990 EOF
13991 }
13992
13993 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
13994     Defining PURIFY
13995 EOF
13996 cat >> confdefs.h <<\EOF
13997 #define PURIFY 1
13998 EOF
13999 }
14000
14001 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14002     Defining QUANTIFY
14003 EOF
14004 cat >> confdefs.h <<\EOF
14005 #define QUANTIFY 1
14006 EOF
14007 }
14008
14009 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14010     Defining MAIL_USE_POP
14011 EOF
14012 cat >> confdefs.h <<\EOF
14013 #define MAIL_USE_POP 1
14014 EOF
14015 }
14016
14017 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14018     Defining KERBEROS
14019 EOF
14020 cat >> confdefs.h <<\EOF
14021 #define KERBEROS 1
14022 EOF
14023 }
14024
14025 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14026     Defining HESIOD
14027 EOF
14028 cat >> confdefs.h <<\EOF
14029 #define HESIOD 1
14030 EOF
14031 }
14032
14033 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14034     Defining USE_UNION_TYPE
14035 EOF
14036 cat >> confdefs.h <<\EOF
14037 #define USE_UNION_TYPE 1
14038 EOF
14039 }
14040
14041 test "$pdump"              = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
14042     Defining PDUMP
14043 EOF
14044 cat >> confdefs.h <<\EOF
14045 #define PDUMP 1
14046 EOF
14047 }
14048
14049
14050
14051 (
14052 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
14053 else
14054   echo "uname -a: `uname -a`"
14055 fi
14056 echo ""
14057 echo "$0 $quoted_arguments"
14058 ) > Installation
14059
14060 if test ! -z ${emacs_beta_version} ; then
14061   if test -z "${emacs_is_beta}" ; then
14062         xemacs_betaname=".${emacs_beta_version}"
14063   else
14064         xemacs_betaname="-b${emacs_beta_version}"
14065   fi
14066 else
14067   xemacs_betaname=""
14068 fi
14069
14070 (
14071 echo "
14072
14073 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
14074
14075   Where should the build process find the source code?    $srcdir
14076   What installation prefix should install use?            $prefix
14077   What operating system and machine description files should XEmacs use?
14078         \`$opsysfile' and \`$machfile'
14079   What compiler should XEmacs be built with?              $CC $CFLAGS
14080   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
14081   Should XEmacs use the relocating allocator for buffers? $rel_alloc
14082   What window system should XEmacs use?                   ${window_system}"
14083 if test "$with_x11" = "yes"; then
14084   echo "  Where do we find X Windows header files?                $x_includes"
14085   echo "  Where do we find X Windows libraries?                   $x_libraries"
14086 fi
14087 if test -n "$site_includes"; then
14088   echo "  Additional header files:                                $site_includes"
14089 fi
14090 if test -n "$site_libraries"; then
14091   echo "  Additional libraries:                                   $site_libraries"
14092 fi
14093 if test -n "$site_prefixes"; then
14094   echo "  Additional prefixes:                                    $site_prefixes"
14095 fi
14096 if test -n "$runpath"; then
14097   echo "  Runtime library search path:                            $runpath"
14098 fi
14099 if test "$have_xaw" = "yes"; then
14100   echo "  Athena library to link:                                 $athena_lib"
14101   echo "  Athena header include path:                             $athena_h_path"
14102 fi
14103 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
14104 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
14105 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
14106 if test "$with_xmu" != yes -a "$with_x11" = yes; then
14107   echo "  No Xmu; substituting equivalent routines."
14108 fi
14109
14110 if test "$with_xpm" = yes; then
14111   echo "  Compiling in support for XPM images."
14112 elif test "$with_x11" = yes; then
14113   echo "  --------------------------------------------------------------------"
14114   echo "  WARNING: Compiling without XPM support."
14115   if test "$xpm_problem" != ""; then
14116     echo "  Reason: $xpm_problem"
14117   fi
14118   echo "  WARNING: You should strongly consider installing XPM."
14119   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
14120   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14121   echo "  --------------------------------------------------------------------"
14122 fi
14123 if test "$with_png" = yes; then
14124   echo "  Compiling in support for PNG image handling."
14125 elif test "$window_system" != "none"; then
14126   echo "  --------------------------------------------------------------------"
14127   echo "  WARNING: Compiling without PNG image support."
14128   if test "$png_problem" != ""; then
14129     echo "  Reason: $png_problem"
14130   fi
14131   echo "  WARNING: You should strongly consider installing the PNG libraries."
14132   echo "  WARNING: Otherwise certain images and glyphs may not display."
14133   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
14134   echo "  --------------------------------------------------------------------"
14135 fi
14136 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
14137 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
14138 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
14139 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
14140
14141 test "$with_native_sound" = yes && echo "  Compiling in native sound support."
14142 test "$with_nas_sound"    = yes && echo "  Compiling in network sound (NAS) support."
14143 test "$old_nas"           = yes && echo "     nas library lacks error trapping, will play synchronously."
14144 test "$with_esd_sound"    = yes && echo "  Compiling in support for Enlightened Sound Daemon (ESD)."
14145
14146 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
14147 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
14148 test "$with_database_gdbm"   = yes && echo "  Compiling in support for GNU DBM."
14149
14150 test "$with_ldap"            = yes && echo "  Compiling in support for LDAP."
14151
14152 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
14153 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
14154
14155 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
14156 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
14157 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
14158 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
14159 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
14160 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
14161 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
14162 if test "$with_wnn" = yes; then
14163   echo "  Compiling in support for the WNN input method on Mule."
14164   test "$with_wnn6" = yes && echo "    Using WNN version 6."
14165 fi
14166 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
14167
14168 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
14169 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
14170 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
14171 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
14172 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
14173 test "$with_wmcommand"  != no && echo "  Compiling in support for proper WM_COMMAND handling."
14174 case "$with_menubars" in
14175   lucid ) echo "  Using Lucid menubars." ;;
14176   motif ) echo "  Using Motif menubars."
14177           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
14178           echo "             We recommend using the Lucid menubar instead."
14179           echo "             Re-run configure with --with-menubars='lucid'." ;;
14180   msw ) echo "  Using MS-Windows menubars." ;;
14181 esac
14182 case "$with_scrollbars" in
14183   lucid    ) echo "  Using Lucid scrollbars."     ;;
14184   motif    ) echo "  Using Motif scrollbars."     ;;
14185   athena   ) echo "  Using Athena scrollbars."    ;;
14186   msw ) echo "  Using MS-Windows scrollbars." ;;
14187 esac
14188 case "$with_widgets" in
14189   motif    ) echo "  Using Motif native widgets."     ;;
14190   athena   ) echo "  Using Athena native widgets."    ;;
14191   msw ) echo "  Using MS-Windows native widgets." ;;
14192 esac
14193 case "$with_dialogs" in
14194   motif    )
14195     echo "  Using Motif dialog boxes."
14196     if test "$unexec" = "unexaix.o"; then if test "`uname -v`" = 4 -a "`uname -r`" -ge 3; then
14197       echo "  *WARNING*  The Motif dialog boxes cause problems on AIX 4.3 and higher."
14198       echo "             We recommend using the Athena dialog boxes instead."
14199       echo "             Install libXaw and re-run configure with --with-dialogs='athena'."
14200       echo "             Read the PROBLEMS file for more information."
14201     fi; fi
14202     ;;
14203   athena   ) echo "  Using Athena dialog boxes."    ;;
14204   msw ) echo "  Using MS-Windows dialog boxes." ;;
14205 esac
14206 test "$with_modules" = "yes" && echo "  Compiling in dynamic shared object module support."
14207 test "$with_clash_detection" = yes && \
14208   echo "  Clash detection will use \"$lockdir\" for locking files."
14209 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
14210 test "$with_pop"        = yes && echo "  Using POP for mail access."
14211 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
14212 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
14213 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
14214 test "$pdump"           = yes && echo "  Using the new portable dumper (wishful thinking)."
14215 test "$debug"           = yes && echo "  Compiling in extra code for debugging."
14216 test "$usage_tracking"  = yes && echo "  Compiling with usage tracking active (Sun internal)."
14217 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
14218   != "no no no no no"; then
14219   echo "  WARNING: ---------------------------------------------------------"
14220   echo "  WARNING: Compiling in support for runtime error checking."
14221   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
14222   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
14223   echo "  WARNING: ---------------------------------------------------------"
14224 fi
14225 echo ""
14226 ) | tee -a Installation
14227 echo ""
14228
14229
14230 # Remove any trailing slashes in these variables.
14231 test -n "$prefix" &&
14232   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14233 test -n "$exec_prefix" &&
14234   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
14235
14236
14237 for file in $internal_makefile_list; do
14238   test "$file" = src/Makefile.in && \
14239     file="src/Makefile.in:src/Makefile.in.in:src/depend"
14240   ac_output_files="$ac_output_files $file" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$file\" to \$ac_output_files"; fi
14241 done
14242 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
14243 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
14244
14245 trap '' 1 2 15
14246
14247 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
14248
14249 test "x$prefix" = xNONE && prefix=$ac_default_prefix
14250 # Let make expand exec_prefix.
14251 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14252
14253 # Any assignment to VPATH causes Sun make to only execute
14254 # the first set of double-colon rules, so remove it if not needed.
14255 # If there is a colon in the path, we need to keep it.
14256 if test "x$srcdir" = x.; then
14257   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
14258 fi
14259
14260 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
14261
14262 DEFS=-DHAVE_CONFIG_H
14263
14264 # Without the "./", some shells look in PATH for config.status.
14265 : ${CONFIG_STATUS=./config.status}
14266
14267 echo creating $CONFIG_STATUS
14268 rm -f $CONFIG_STATUS
14269 cat > $CONFIG_STATUS <<EOF
14270 #! /bin/sh
14271 # Generated automatically by configure.
14272 # Run this file to recreate the current configuration.
14273 # This directory was configured as follows,
14274 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
14275 #
14276 # $0 $ac_configure_args
14277 #
14278 # Compiler output produced by configure, useful for debugging
14279 # configure, is in ./config.log if it exists.
14280
14281 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
14282 for ac_option
14283 do
14284   case "\$ac_option" in
14285   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14286     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
14287     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
14288   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
14289     echo "$CONFIG_STATUS generated by autoconf version 2.13"
14290     exit 0 ;;
14291   -help | --help | --hel | --he | --h)
14292     echo "\$ac_cs_usage"; exit 0 ;;
14293   *) echo "\$ac_cs_usage"; exit 1 ;;
14294   esac
14295 done
14296
14297 ac_given_srcdir=$srcdir
14298 ac_given_INSTALL="$INSTALL"
14299
14300 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
14301 EOF
14302 cat >> $CONFIG_STATUS <<EOF
14303
14304 # Protect against being on the right side of a sed subst in config.status.
14305 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
14306  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
14307 $ac_vpsub
14308 $extrasub
14309 s%@SHELL@%$SHELL%g
14310 s%@CFLAGS@%$CFLAGS%g
14311 s%@CPPFLAGS@%$CPPFLAGS%g
14312 s%@CXXFLAGS@%$CXXFLAGS%g
14313 s%@FFLAGS@%$FFLAGS%g
14314 s%@DEFS@%$DEFS%g
14315 s%@LDFLAGS@%$LDFLAGS%g
14316 s%@LIBS@%$LIBS%g
14317 s%@exec_prefix@%$exec_prefix%g
14318 s%@prefix@%$prefix%g
14319 s%@program_transform_name@%$program_transform_name%g
14320 s%@bindir@%$bindir%g
14321 s%@sbindir@%$sbindir%g
14322 s%@libexecdir@%$libexecdir%g
14323 s%@datadir@%$datadir%g
14324 s%@sysconfdir@%$sysconfdir%g
14325 s%@sharedstatedir@%$sharedstatedir%g
14326 s%@localstatedir@%$localstatedir%g
14327 s%@libdir@%$libdir%g
14328 s%@includedir@%$includedir%g
14329 s%@oldincludedir@%$oldincludedir%g
14330 s%@infodir@%$infodir%g
14331 s%@mandir@%$mandir%g
14332 s%@LN_S@%$LN_S%g
14333 s%@blddir@%$blddir%g
14334 s%@CC@%$CC%g
14335 s%@CPP@%$CPP%g
14336 s%@start_flags@%$start_flags%g
14337 s%@ld_switch_shared@%$ld_switch_shared%g
14338 s%@start_files@%$start_files%g
14339 s%@ld@%$ld%g
14340 s%@lib_gcc@%$lib_gcc%g
14341 s%@RANLIB@%$RANLIB%g
14342 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
14343 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
14344 s%@INSTALL_DATA@%$INSTALL_DATA%g
14345 s%@YACC@%$YACC%g
14346 s%@SET_MAKE@%$SET_MAKE%g
14347 s%@X_CFLAGS@%$X_CFLAGS%g
14348 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
14349 s%@X_LIBS@%$X_LIBS%g
14350 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
14351 s%@install_pp@%$install_pp%g
14352 s%@libs_xauth@%$libs_xauth%g
14353 s%@dnd_objs@%$dnd_objs%g
14354 s%@lwlib_objs@%$lwlib_objs%g
14355 s%@ALLOCA@%$ALLOCA%g
14356 s%@have_esd_config@%$have_esd_config%g
14357 s%@dll_ld@%$dll_ld%g
14358 s%@dll_cflags@%$dll_cflags%g
14359 s%@dll_ldflags@%$dll_ldflags%g
14360 s%@dll_post@%$dll_post%g
14361 s%@dll_ldo@%$dll_ldo%g
14362 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
14363 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
14364 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
14365 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
14366 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
14367 s%@PROGNAME@%$PROGNAME%g
14368 s%@version@%$version%g
14369 s%@configuration@%$configuration%g
14370 s%@canonical@%$canonical%g
14371 s%@inststaticdir@%$inststaticdir%g
14372 s%@instvardir@%$instvardir%g
14373 s%@srcdir@%$srcdir%g
14374 s%@pkgdir@%$pkgdir%g
14375 s%@statedir@%$statedir%g
14376 s%@PREFIX_USER_DEFINED@%$PREFIX_USER_DEFINED%g
14377 s%@PREFIX@%$PREFIX%g
14378 s%@EXEC_PREFIX_USER_DEFINED@%$EXEC_PREFIX_USER_DEFINED%g
14379 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
14380 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
14381 s%@INFODIR@%$INFODIR%g
14382 s%@infopath@%$infopath%g
14383 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
14384 s%@INFOPATH@%$INFOPATH%g
14385 s%@package_path@%$package_path%g
14386 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
14387 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
14388 s%@lispdir@%$lispdir%g
14389 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
14390 s%@LISPDIR@%$LISPDIR%g
14391 s%@moduledir@%$moduledir%g
14392 s%@MODULEDIR_USER_DEFINED@%$MODULEDIR_USER_DEFINED%g
14393 s%@MODULEDIR@%$MODULEDIR%g
14394 s%@sitelispdir@%$sitelispdir%g
14395 s%@SITELISPDIR_USER_DEFINED@%$SITELISPDIR_USER_DEFINED%g
14396 s%@SITELISPDIR@%$SITELISPDIR%g
14397 s%@sitemoduledir@%$sitemoduledir%g
14398 s%@SITEMODULEDIR_USER_DEFINED@%$SITEMODULEDIR_USER_DEFINED%g
14399 s%@SITEMODULEDIR@%$SITEMODULEDIR%g
14400 s%@etcdir@%$etcdir%g
14401 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
14402 s%@ETCDIR@%$ETCDIR%g
14403 s%@lockdir@%$lockdir%g
14404 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
14405 s%@LOCKDIR@%$LOCKDIR%g
14406 s%@docdir@%$docdir%g
14407 s%@DOCDIR_USER_DEFINED@%$DOCDIR_USER_DEFINED%g
14408 s%@DOCDIR@%$DOCDIR%g
14409 s%@archlibdir@%$archlibdir%g
14410 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
14411 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
14412 s%@bitmapdir@%$bitmapdir%g
14413 s%@extra_objs@%$extra_objs%g
14414 s%@machfile@%$machfile%g
14415 s%@opsysfile@%$opsysfile%g
14416 s%@c_switch_general@%$c_switch_general%g
14417 s%@c_switch_window_system@%$c_switch_window_system%g
14418 s%@c_switch_all@%$c_switch_all%g
14419 s%@ld_switch_general@%$ld_switch_general%g
14420 s%@ld_switch_window_system@%$ld_switch_window_system%g
14421 s%@ld_switch_all@%$ld_switch_all%g
14422 s%@ld_libs_general@%$ld_libs_general%g
14423 s%@ld_libs_window_system@%$ld_libs_window_system%g
14424 s%@ld_libs_all@%$ld_libs_all%g
14425 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
14426 s%@native_sound_lib@%$native_sound_lib%g
14427 s%@sound_cflags@%$sound_cflags%g
14428 s%@dynodump_arch@%$dynodump_arch%g
14429 s%@XEMACS_CC@%$XEMACS_CC%g
14430 s%@internal_makefile_list@%$internal_makefile_list%g
14431
14432 CEOF
14433 EOF
14434
14435 cat >> $CONFIG_STATUS <<\EOF
14436
14437 # Split the substitutions into bite-sized pieces for seds with
14438 # small command number limits, like on Digital OSF/1 and HP-UX.
14439 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
14440 ac_file=1 # Number of current file.
14441 ac_beg=1 # First line for current file.
14442 ac_end=$ac_max_sed_cmds # Line after last line for current file.
14443 ac_more_lines=:
14444 ac_sed_cmds=""
14445 while $ac_more_lines; do
14446   if test $ac_beg -gt 1; then
14447     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
14448   else
14449     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
14450   fi
14451   if test ! -s conftest.s$ac_file; then
14452     ac_more_lines=false
14453     rm -f conftest.s$ac_file
14454   else
14455     if test -z "$ac_sed_cmds"; then
14456       ac_sed_cmds="sed -f conftest.s$ac_file"
14457     else
14458       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
14459     fi
14460     ac_file=`expr $ac_file + 1`
14461     ac_beg=$ac_end
14462     ac_end=`expr $ac_end + $ac_max_sed_cmds`
14463   fi
14464 done
14465 if test -z "$ac_sed_cmds"; then
14466   ac_sed_cmds=cat
14467 fi
14468 EOF
14469
14470 cat >> $CONFIG_STATUS <<EOF
14471
14472 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
14473 EOF
14474 cat >> $CONFIG_STATUS <<\EOF
14475 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
14476   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14477   case "$ac_file" in
14478   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14479        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14480   *) ac_file_in="${ac_file}.in" ;;
14481   esac
14482
14483   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
14484
14485   # Remove last slash and all that follows it.  Not all systems have dirname.
14486   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14487   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14488     # The file is in a subdirectory.
14489     test ! -d "$ac_dir" && mkdir "$ac_dir"
14490     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
14491     # A "../" for each directory in $ac_dir_suffix.
14492     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
14493   else
14494     ac_dir_suffix= ac_dots=
14495   fi
14496
14497   case "$ac_given_srcdir" in
14498   .)  srcdir=.
14499       if test -z "$ac_dots"; then top_srcdir=.
14500       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
14501   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
14502   *) # Relative path.
14503     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
14504     top_srcdir="$ac_dots$ac_given_srcdir" ;;
14505   esac
14506
14507   case "$ac_given_INSTALL" in
14508   [/$]*) INSTALL="$ac_given_INSTALL" ;;
14509   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
14510   esac
14511
14512   echo creating "$ac_file"
14513   rm -f "$ac_file"
14514   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
14515   case "$ac_file" in
14516   *Makefile*) ac_comsub="1i\\
14517 # $configure_input" ;;
14518   *) ac_comsub= ;;
14519   esac
14520
14521   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14522   sed -e "$ac_comsub
14523 s%@configure_input@%$configure_input%g
14524 s%@srcdir@%$srcdir%g
14525 s%@top_srcdir@%$top_srcdir%g
14526 s%@INSTALL@%$INSTALL%g
14527 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
14528 fi; done
14529 rm -f conftest.s*
14530
14531 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
14532 # NAME is the cpp macro being defined and VALUE is the value it is being given.
14533 #
14534 # ac_d sets the value in "#define NAME VALUE" lines.
14535 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
14536 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
14537 ac_dC='\3'
14538 ac_dD='%g'
14539 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
14540 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14541 ac_uB='\([      ]\)%\1#\2define\3'
14542 ac_uC=' '
14543 ac_uD='\4%g'
14544 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
14545 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
14546 ac_eB='$%\1#\2define\3'
14547 ac_eC=' '
14548 ac_eD='%g'
14549
14550 if test "${CONFIG_HEADERS+set}" != set; then
14551 EOF
14552 cat >> $CONFIG_STATUS <<EOF
14553   CONFIG_HEADERS="src/config.h lwlib/config.h"
14554 EOF
14555 cat >> $CONFIG_STATUS <<\EOF
14556 fi
14557 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
14558   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
14559   case "$ac_file" in
14560   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
14561        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
14562   *) ac_file_in="${ac_file}.in" ;;
14563   esac
14564
14565   echo creating $ac_file
14566
14567   rm -f conftest.frag conftest.in conftest.out
14568   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
14569   cat $ac_file_inputs > conftest.in
14570
14571 EOF
14572
14573 # Transform confdefs.h into a sed script conftest.vals that substitutes
14574 # the proper values into config.h.in to produce config.h.  And first:
14575 # Protect against being on the right side of a sed subst in config.status.
14576 # Protect against being in an unquoted here document in config.status.
14577 rm -f conftest.vals
14578 cat > conftest.hdr <<\EOF
14579 s/[\\&%]/\\&/g
14580 s%[\\$`]%\\&%g
14581 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
14582 s%ac_d%ac_u%gp
14583 s%ac_u%ac_e%gp
14584 EOF
14585 sed -n -f conftest.hdr confdefs.h > conftest.vals
14586 rm -f conftest.hdr
14587
14588 # This sed command replaces #undef with comments.  This is necessary, for
14589 # example, in the case of _POSIX_SOURCE, which is predefined and required
14590 # on some systems where configure will not decide to define it.
14591 cat >> conftest.vals <<\EOF
14592 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
14593 EOF
14594
14595 # Break up conftest.vals because some shells have a limit on
14596 # the size of here documents, and old seds have small limits too.
14597
14598 rm -f conftest.tail
14599 while :
14600 do
14601   ac_lines=`grep -c . conftest.vals`
14602   # grep -c gives empty output for an empty file on some AIX systems.
14603   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
14604   # Write a limited-size here document to conftest.frag.
14605   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
14606   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
14607   echo 'CEOF
14608   sed -f conftest.frag conftest.in > conftest.out
14609   rm -f conftest.in
14610   mv conftest.out conftest.in
14611 ' >> $CONFIG_STATUS
14612   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
14613   rm -f conftest.vals
14614   mv conftest.tail conftest.vals
14615 done
14616 rm -f conftest.vals
14617
14618 cat >> $CONFIG_STATUS <<\EOF
14619   rm -f conftest.frag conftest.h
14620   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
14621   cat conftest.in >> conftest.h
14622   rm -f conftest.in
14623   if cmp -s $ac_file conftest.h 2>/dev/null; then
14624     echo "$ac_file is unchanged"
14625     rm -f conftest.h
14626   else
14627     # Remove last slash and all that follows it.  Not all systems have dirname.
14628       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
14629       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
14630       # The file is in a subdirectory.
14631       test ! -d "$ac_dir" && mkdir "$ac_dir"
14632     fi
14633     rm -f $ac_file
14634     mv conftest.h $ac_file
14635   fi
14636 fi; done
14637
14638 EOF
14639 cat >> $CONFIG_STATUS <<EOF
14640 CPP="$CPP"
14641  top_srcdir="$srcdir"
14642  MAKE_SUBDIR="$MAKE_SUBDIR"
14643
14644 EOF
14645 cat >> $CONFIG_STATUS <<\EOF
14646 for dir in . $MAKE_SUBDIR; do
14647   (
14648     cd $dir
14649     rm -f junk.c
14650     < Makefile.in \
14651       sed -e '/^# Generated/d' \
14652           -e 's%/\*\*/#.*%%' \
14653           -e 's/^ *# */#/' \
14654           -e '/^##/d' \
14655           -e '/^#/ {
14656 p
14657 d
14658 }'        \
14659           -e '/./ {
14660 s/\([\"]\)/\\\1/g
14661 s/^/"/
14662 s/$/"/
14663 }'  > junk.c;
14664
14665
14666
14667     echo creating $dir/Makefile
14668 $CPP -I. -I${top_srcdir}/src  junk.c \
14669   | sed -e 's/^\#.*//'          \
14670         -e 's/^[        ][      ]*$//'\
14671         -e 's/^ /       /'              \
14672   | sed -n -e '/^..*$/p'        \
14673   | sed '/^\"/ {
14674         s/\\\([\"]\)/\1/g
14675         s/^[    ]*\"//
14676         s/\"[   ]*$//
14677 }' > Makefile.new
14678     chmod 444 Makefile.new
14679     mv -f Makefile.new Makefile
14680
14681     echo creating $dir/GNUmakefile
14682 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
14683   | sed -e 's/^\#.*//'          \
14684         -e 's/^[        ][      ]*$//'\
14685         -e 's/^ /       /'              \
14686   | sed -n -e '/^..*$/p'        \
14687   | sed '/^\"/ {
14688         s/\\\([\"]\)/\1/g
14689         s/^[    ]*\"//
14690         s/\"[   ]*$//
14691 }' > Makefile.new
14692     chmod 444 Makefile.new
14693     mv -f Makefile.new GNUmakefile
14694
14695     rm -f junk.c
14696   )
14697 done
14698
14699 sed < config.status >> lib-src/config.values \
14700   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
14701   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
14702   -e 's/^\([^ ]*\) $/\1 ""/' \
14703   -e 's/ 1$/ t/'
14704
14705
14706 exit 0
14707 EOF
14708 chmod +x $CONFIG_STATUS
14709 rm -fr confdefs* $ac_clean_files
14710 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1