XEmacs 21.2.7
[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.12 
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
11 ### Don't edit this script!
12 ### This script was automatically generated by the `autoconf' program
13 ### from the file `./configure.in'.
14 ### To rebuild it, execute the command
15 ###     autoconf
16 ### in the this directory.  You must have autoconf version 2.12 or later.
17
18 ### This file is part of XEmacs.
19
20 ### XEmacs is free software; you can redistribute it and/or modify it
21 ### under the terms of the GNU General Public License as published by
22 ### the Free Software Foundation; either version 2, or (at your
23 ### option) any later version.
24
25 ### XEmacs is distributed in the hope that it will be useful, but
26 ### WITHOUT ANY WARRANTY; without even the implied warranty of
27 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
28 ### General Public License for more details.
29
30 ### You should have received a copy of the GNU General Public License
31 ### along with XEmacs; see the file COPYING.  If not, write to the Free
32 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
33 ### 02111-1307, USA.
34
35 ### For usage, run `./configure --help'
36 ### For more detailed information on building and installing XEmacs,
37 ### read the file `INSTALL'.
38 ###
39 ### If configure succeeds, it leaves its status in config.status.
40 ### A log of configuration tests can be found in config.log.
41 ### If configure fails after disturbing the status quo,
42 ###     config.status is removed.
43
44 ac_help="$ac_help
45   --with-x                use the X Window System"
46
47
48
49 if test -n "$ZSH_VERSION"; then
50     setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
51   setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
52   setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
53   setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
54       if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
55 elif test -n "$BASH_VERSION"; then
56     set -o posix
57   unset CDPATH
58 else
59   if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
60 fi
61
62 exec_prefix=NONE
63 host=NONE
64 no_create=
65 nonopt=NONE
66 no_recursion=
67 prefix=NONE
68 program_prefix=NONE
69 program_suffix=NONE
70 program_transform_name=s,x,x,
71 silent=
72 site=
73 srcdir=
74 target=NONE
75 verbose=
76 x_includes=NONE
77 x_libraries=NONE
78
79 bindir='${exec_prefix}/bin'
80 sbindir='${exec_prefix}/sbin'
81 libexecdir='${exec_prefix}/libexec'
82 datadir='${prefix}/share'
83 sysconfdir='${prefix}/etc'
84 sharedstatedir='${prefix}/com'
85 localstatedir='${prefix}/var'
86 libdir='${{exec_prefix}}/lib'
87 includedir='${prefix}/include'
88 oldincludedir='/usr/include'
89 infodir='${prefix}/info'
90 mandir='${prefix}/man'
91
92 subdirs=
93 MFLAGS= MAKEFLAGS=
94 ac_max_here_lines=12
95
96 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
97
98 # File descriptor usage:
99 # 0 standard input
100 # 1 file creation
101 # 2 errors and warnings
102 # 3 some systems may open it to /dev/tty
103 # 4 used on the Kubota Titan
104 # 6 checking for... messages and results
105 # 5 compiler messages saved in config.log
106 if test "$silent" = yes; then
107   exec 6>/dev/null
108 else
109   exec 6>&1
110 fi
111 exec 5>./config.log
112
113 echo "\
114 This file contains any messages produced by compilers while
115 running configure, to aid debugging if configure makes a mistake.
116 " 1>&5
117
118 # Strip out --no-create and --no-recursion so they do not pile up.
119 # Also quote any args containing shell metacharacters.
120 ac_configure_args=
121 for ac_arg
122 do
123   case "$ac_arg" in
124   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
125   | --no-cr | --no-c) ;;
126   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
127   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
128   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
129   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
130   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
131   esac
132 done
133
134 # NLS nuisances.
135 # Only set these to C if already set.  These must not be set unconditionally
136 # because not all systems understand e.g. LANG=C (notably SCO).
137 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
138 # Non-C LC_CTYPE values break the ctype check.
139 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
140 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
141 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
142 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
143
144 # confdefs.h avoids OS command line length limits that DEFS can exceed.
145 rm -rf conftest* confdefs.h
146 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
147 echo > confdefs.h
148
149 # A filename unique to this package, relative to the directory that
150 # configure is in, which we can look for to find out if srcdir is correct.
151 ac_unique_file=src/lisp.h
152
153 # Find the source files, if location was not specified.
154 if test -z "$srcdir"; then
155   ac_srcdir_defaulted=yes
156   # Try the directory containing this script, then its parent.
157   ac_prog=$0
158   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
159   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
160   srcdir=$ac_confdir
161   if test ! -r $srcdir/$ac_unique_file; then
162     srcdir=..
163   fi
164 else
165   ac_srcdir_defaulted=no
166 fi
167 if test ! -r $srcdir/$ac_unique_file; then
168   if test "$ac_srcdir_defaulted" = yes; then
169     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
170   else
171     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
172   fi
173 fi
174 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
175
176 # Prefer explicitly selected file to automatically selected ones.
177 if test -z "$CONFIG_SITE"; then
178   if test "x$prefix" != xNONE; then
179     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
180   else
181     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
182   fi
183 fi
184 for ac_site_file in $CONFIG_SITE; do
185   if test -r "$ac_site_file"; then
186     echo "loading site script $ac_site_file"
187     . "$ac_site_file"
188   fi
189 done
190
191
192 ac_ext=c
193 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
194 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
195 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
196 ac_cpp='$CPP '"$xe_cppflags"
197 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
198 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
199 cross_compiling=no
200
201 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
202   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
203   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
204     ac_n= ac_c='
205 ' ac_t='        '
206   else
207     ac_n=-n ac_c= ac_t=
208   fi
209 else
210   ac_n= ac_c='\c' ac_t=
211 fi
212
213
214 progname="`echo $0 | sed 's:^\./\./:\./:'`"
215
216
217 MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
218 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
219
220 prefix='/usr/local'
221 exec_prefix='${prefix}'
222 bindir='${exec_prefix}/bin'
223 datadir='${prefix}/lib'
224 statedir='${prefix}/lib'
225 libdir='${exec_prefix}/lib'
226 mandir='${prefix}/man/man1'
227 infodir='${datadir}/${PROGNAME}-${version}/info'
228 infopath=''
229 install_pp=''
230 lispdir='${datadir}/${PROGNAME}-${version}/lisp'
231 pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
232 package_path=''
233 etcdir='${datadir}/${PROGNAME}-${version}/etc'
234 lockdir='${statedir}/${PROGNAME}/lock'
235 archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
236 with_site_lisp='no'
237 with_menubars=''
238 with_scrollbars=''
239 with_dialogs=''
240 with_file_coding=''
241 puresize=''
242 cpp='' cppflags='' libs='' ldflags=''
243 dynamic=''
244 with_x11=''
245 with_msw=''
246 rel_alloc='default'
247 with_system_malloc='default'
248 with_dlmalloc='default'
249 native_sound_lib=''
250 use_assertions="yes"
251 with_toolbars=""
252 with_tty=""
253 use_union_type="no"
254 with_dnet=""
255
256
257
258
259 arguments="$@"
260
261 quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
262 quoted_arguments=
263 for i in "$@"; do
264    case "$i" in
265    -no-create | --no-create | --no-creat | --no-crea | --no-cre \
266    | --no-cr | --no-c) ;;
267    -no-recursion | --no-recursion | --no-recursio | --no-recursi \
268    | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
269    *)
270    quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
271    quoted_arguments="$quoted_arguments '$quoted_i'" ;;
272    esac
273 done
274
275 while test $# != 0; do
276   arg="$1"; shift
277   case "$arg" in
278     --no-create|--no-recursion) ;;
279         -* )
280             case "$arg" in
281         -*=*)
282           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
283           val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
284           valomitted=no
285         ;;
286                                                                           -*)
287                                           opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
288           val="yes" valomitted=yes
289         ;;
290       esac
291
292             optname="$opt"
293       opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
294
295             case "${valomitted}-${opt}" in yes-without_* )
296         opt=`echo $opt | sed 's/without/with/'`
297         valomitted="no" val="no" ;;
298       esac
299
300             case "$opt" in
301
302         with_site_lisp  | \
303         with_x          | \
304         with_x11        | \
305         with_msw        | \
306         with_gcc        | \
307         dynamic         | \
308         with_ncurses    | \
309         with_dnet       | \
310         with_socks      | \
311         with_dragndrop  | \
312         with_cde        | \
313         with_offix      | \
314         with_gpm        | \
315         with_xpm        | \
316         with_xface      | \
317         with_gif        | \
318         with_jpeg       | \
319         with_png        | \
320         with_tiff       | \
321         with_session    | \
322         with_xmu        | \
323         with_purify     | \
324         with_quantify   | \
325         with_toolbars   | \
326         with_tty        | \
327         with_xfs        | \
328         with_i18n3      | \
329         with_mule       | \
330         with_file_coding| \
331         with_canna      | \
332         with_wnn        | \
333         with_wnn6       | \
334         with_workshop   | \
335         with_sparcworks | \
336         with_tooltalk   | \
337         with_ldap       | \
338         with_pop        | \
339         with_kerberos   | \
340         with_hesiod     | \
341         with_dnet       | \
342         with_infodock   | \
343         external_widget | \
344         verbose         | \
345         extra_verbose   | \
346         const_is_losing | \
347         usage_tracking  | \
348         use_union_type  | \
349         debug           | \
350         use_assertions  | \
351         gung_ho         | \
352         use_minimal_tagbits                     | \
353         use_indexed_lrecord_implementation      | \
354         memory_usage_stats | \
355         with_clash_detection | \
356         with_shlib | \
357         no_doc_file )
358                   case "$val" in
359             y | ye | yes )      val=yes ;;
360             n | no )            val=no  ;;
361             * ) (echo "$progname: Usage error:"
362 echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
363 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
364           esac
365           eval "$opt=\"$val\"" ;;
366
367
368                         srcdir          | \
369         compiler        | \
370         cflags          | \
371         cpp             | \
372         cppflags        | \
373         libs            | \
374         ldflags         | \
375         puresize        | \
376         cache_file      | \
377         native_sound_lib| \
378         site_lisp       | \
379         x_includes      | \
380         x_libraries     | \
381         site_includes   | \
382         site_libraries  | \
383         site_prefixes   | \
384         site_runtime_libraries )
385                   if test "$valomitted" = "yes" ; then
386                     if test "$#" = 0 ; then
387               (echo "$progname: Usage error:"
388 echo " " "The \`--$optname' option requires a value."
389 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
390             fi
391             val="$1"; shift
392           fi
393           eval "$opt=\"$val\""
394         ;;
395
396                 rel_alloc | \
397         with_dlmalloc | \
398         with_debug_malloc  | use_debug_malloc | \
399         with_system_malloc | use_system_malloc )
400           case "$val" in
401             y | ye | yes )      val=yes ;;
402             n | no )            val=no  ;;
403             d | de | def | defa | defau | defaul | default ) val=default ;;
404             * ) (echo "$progname: Usage error:"
405 echo " " "The \`--$optname' option requires one of these values:
406   \`yes', \`no', or \`default'."
407 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
408           esac
409           case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
410           eval "$opt=\"$val\""
411         ;;
412
413                 "with_database" )
414           with_database_berkdb=no
415           with_database_dbm=no
416           with_database_gnudbm=no
417           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
418             case "$x" in
419                 no ) ;;
420                 b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
421                 d | db | dbm )                          with_database_dbm=yes    ;;
422                 g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
423                 * ) (echo "$progname: Usage error:"
424 echo " " "The \`--$optname' option value
425   must be either \`no' or a comma-separated list
426   of one or more of \`berkdb' and either \`dbm' or \`gnudbm'."
427 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
428             esac
429           done
430           if test "$with_database_dbm"    = "yes" -a \
431                   "$with_database_gnudbm" = "yes"; then
432           (echo "$progname: Usage error:"
433 echo " " "Only one of \`dbm' and \`gnudbm' may be specified
434   with the \`--$optname' option."
435 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
436           fi
437         ;;
438
439                 "with_sound" )
440                           case "$val" in
441             y | ye | yes )                      val=native ;;
442             n | no | non | none )               val=no;;
443             na | nat | nati | nativ | native )  val=native  ;;
444             ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
445             b | bo | bot | both )               val=both;;
446             * ) (echo "$progname: Usage error:"
447 echo " " "The \`--$optname' option must have one of these values:
448   \`native', \`nas', \`both', or \`none'."
449 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
450           esac
451           eval "$opt=\"$val\""
452         ;;
453
454                 "with_xim" )
455           case "$val" in
456             y | ye | yes )                val=yes   ;;
457             n | no | non | none )         val=no    ;;
458             x | xl | xli | xlib )         val=xlib  ;;
459             m | mo | mot | moti | motif ) val=motif ;;
460             * ) (echo "$progname: Usage error:"
461 echo " " "The \`--$optname' option must have one of these values:
462   \`motif', \`xlib', \`yes', or \`no'."
463 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
464           esac
465           eval "$opt=\"$val\""
466         ;;
467
468                 "mail_locking" )
469           case "$val" in
470             lockf )     val=lockf ;;
471             flock )     val=flock ;;
472             file )      val=file  ;;
473             * ) (echo "$progname: Usage error:"
474 echo " " "The \`--$optname' option must have one of these values:
475   \`lockf', \`flock', or \`file'."
476 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
477           esac
478           eval "$opt=\"$val\""
479         ;;
480
481                 "error_checking" )
482                           
483           for x in `echo "$val" | sed -e 's/,/ /g'` ; do
484             case "$x" in
485                       n | no | non | none ) new_default=no ;;
486               a | al | all )        new_default=yes ;;
487
488               extents )       error_check_extents=yes ;;
489               noextents )     error_check_extents=no ;;
490
491               typecheck )     error_check_typecheck=yes ;;
492               notypecheck )   error_check_typecheck=no ;;
493
494               bufpos )        error_check_bufpos=yes ;;
495               nobufpos )      error_check_bufpos=no ;;
496
497               gc )            error_check_gc=yes ;;
498               nogc )          error_check_gc=no ;;
499
500               malloc )        error_check_malloc=yes ;;
501               nomalloc )      error_check_malloc=no ;;
502
503               * ) bogus_error_check=yes ;;
504             esac
505             if test "$bogus_error_check" -o \
506                  \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
507                 if test "$error_check_default" = yes ; then
508                   types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
509                 else
510                   types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
511                 fi
512                 (echo "$progname: Usage error:"
513 echo " " "Valid types for the \`--$optname' option are:
514   $types."
515 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
516             elif test -n "$new_default" ; then
517                 error_check_extents=$new_default
518                 error_check_typecheck=$new_default
519                 error_check_bufpos=$new_default
520                 error_check_gc=$new_default
521                 error_check_malloc=$new_default
522                 new_default=    # reset this
523             fi
524             echeck_notfirst=true
525           done
526         ;;
527
528                                 
529                 prefix | exec_prefix | bindir | datadir | statedir | libdir | \
530         mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
531         archlibdir | docdir | package_path )
532                    if test "$valomitted" = "yes"; then
533              if test "$#" = 0; then
534                  (echo "$progname: Usage error:"
535 echo " " "The \`--$optname' option requires a value."
536 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
537              fi
538              val="$1"; shift
539            fi
540            eval "$opt=\"$val\""
541
542                            case "$opt" in
543              lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
544     Defining LISPDIR_USER_DEFINED
545 EOF
546 cat >> confdefs.h <<\EOF
547 #define LISPDIR_USER_DEFINED 1
548 EOF
549 }
550  ;;
551              etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
552     Defining ETCDIR_USER_DEFINED
553 EOF
554 cat >> confdefs.h <<\EOF
555 #define ETCDIR_USER_DEFINED 1
556 EOF
557 }
558  ;;
559              infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
560     Defining INFODIR_USER_DEFINED
561 EOF
562 cat >> confdefs.h <<\EOF
563 #define INFODIR_USER_DEFINED 1
564 EOF
565 }
566  ;;
567              infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
568     Defining INFOPATH_USER_DEFINED
569 EOF
570 cat >> confdefs.h <<\EOF
571 #define INFOPATH_USER_DEFINED 1
572 EOF
573 }
574  ;;
575              package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
576     Defining PACKAGE_PATH_USER_DEFINED
577 EOF
578 cat >> confdefs.h <<\EOF
579 #define PACKAGE_PATH_USER_DEFINED 1
580 EOF
581 }
582  ;;
583              datadir )
584                 { test "$extra_verbose" = "yes" && cat << \EOF
585     Defining INFODIR_USER_DEFINED
586 EOF
587 cat >> confdefs.h <<\EOF
588 #define INFODIR_USER_DEFINED 1
589 EOF
590 }
591
592                 { test "$extra_verbose" = "yes" && cat << \EOF
593     Defining LISPDIR_USER_DEFINED
594 EOF
595 cat >> confdefs.h <<\EOF
596 #define LISPDIR_USER_DEFINED 1
597 EOF
598 }
599
600                 { test "$extra_verbose" = "yes" && cat << \EOF
601     Defining ETCDIR_USER_DEFINED
602 EOF
603 cat >> confdefs.h <<\EOF
604 #define ETCDIR_USER_DEFINED 1
605 EOF
606 }
607  ;;
608              statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
609     Defining LOCKDIR_USER_DEFINED
610 EOF
611 cat >> confdefs.h <<\EOF
612 #define LOCKDIR_USER_DEFINED 1
613 EOF
614 }
615  ;;
616              exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
617     Defining ARCHLIBDIR_USER_DEFINED
618 EOF
619 cat >> confdefs.h <<\EOF
620 #define ARCHLIBDIR_USER_DEFINED 1
621 EOF
622 }
623  ;;
624            esac
625         ;;
626
627                 "no_create" ) ;;
628
629                 "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
630
631                 "with_menubars"   | \
632         "with_scrollbars" | \
633         "with_dialogs" )
634           case "$val" in
635             l | lu | luc | luci | lucid )               val=lucid  ;;
636             m | mo | mot | moti | motif )               val=motif  ;;
637             athena3d | athena-3d )                      val=athena3d ;;
638             a | at | ath | athe | athen | athena )      val=athena ;;
639             n | no | non | none )                       val=no ;;
640             * ) (echo "$progname: Usage error:"
641 echo " " "The \`--$optname' option must have one of these values:
642   \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
643 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
644           esac
645           eval "$opt=\"$val\""
646         ;;
647
648                 "run_in_place"  | \
649         "with_gnu_make" )
650           echo "configure: warning: Obsolete option \`--$optname' ignored." 1>&2
651         ;;
652
653                 * ) (echo "$progname: Usage error:"
654 echo " " "Unrecognized option: $arg"
655 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
656
657       esac
658     ;;
659
660         *-*-*) configuration="$arg" ;;
661
662         *) (echo "$progname: Usage error:"
663 echo " " "Unrecognized argument: $arg"
664 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
665
666   esac
667 done
668
669
670 test -n "$cpp"      && CPP="$cpp"
671 test -n "$cppflags" && CPPFLAGS="$cppflags"
672 test -n "$libs"     && LIBS="$libs"
673 test -n "$ldflags"  && LDFLAGS="$ldflags"
674
675 eval set x "$quoted_arguments"; shift
676
677 test "$extra_verbose" = "yes" && verbose=yes
678
679 test -n "$with_x" && with_x11="$with_x"
680
681 if test "$with_purify" = "yes" -o "$with_quantify" = "yes"; then
682   test "$with_system_malloc" = "default" && with_system_malloc=yes
683 fi
684
685 if test -n "$gung_ho"; then
686   test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
687   test -z "$use_indexed_lrecord_implementation" && \
688     use_indexed_lrecord_implementation="$gung_ho"
689 fi
690 if test "$use_minimal_tagbits" = "no"; then
691   test "$with_dlmalloc" = "yes" && \
692     (echo "$progname: Usage error:"
693 echo " " "--with-dlmalloc requires --use-minimal-tagbits"
694 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
695   with_dlmalloc=no
696 fi
697
698
699
700 if test "$with_cde $with_tooltalk" = "yes no"; then
701   (echo "$progname: Usage error:"
702 echo " " "--with-cde requires --with-tooltalk"
703 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
704 elif test "$with_tooltalk" = "no" ; then with_cde=no
705 elif test "$with_cde" = "yes"; then with_tooltalk=yes
706 fi
707
708
709 case "$srcdir" in
710
711     "" )
712     for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
713       if test -f "$dir/src/lisp.h" -a \
714               -f "$dir/lisp/version.el" ; then
715         srcdir="$dir"
716         break
717       fi
718     done
719     if test -z "$srcdir" ; then
720       (echo "$progname: Usage error:"
721 echo " " "Neither the current directory nor its parent seem to
722   contain the XEmacs sources.  If you do not want to build XEmacs in its
723   source tree, you should run \`$progname' in the directory in which
724   you wish to build XEmacs, using the \`--srcdir' option to say where the
725   sources may be found."
726 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
727     fi
728   ;;
729
730     * )
731     if test ! -f "$srcdir/src/lisp.h" -o \
732             ! -f "$srcdir/lisp/version.el" ; then
733       (echo "$progname: Usage error:"
734 echo " " "The directory specified with the \`--srcdir' option,
735   \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
736   either run the \`$progname' script at the top of the XEmacs source
737   tree, or use the \`--srcdir' option to specify the XEmacs source directory."
738 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
739     fi
740   ;;
741 esac
742
743 if test -z "$configuration"; then
744     configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess`
745   if test -z "$configuration"; then
746     (echo "$progname: Usage error:"
747 echo " " "XEmacs has not been ported to this host type.
748 Try explicitly specifying the CONFIGURATION when rerunning configure."
749 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
750   fi
751 fi
752
753 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
754 echo "configure:755: checking whether ln -s works" >&5
755
756 rm -f conftestdata
757 if ln -s X conftestdata 2>/dev/null
758 then
759   rm -f conftestdata
760   ac_cv_prog_LN_S="ln -s"
761 else
762   ac_cv_prog_LN_S=ln
763 fi
764 LN_S="$ac_cv_prog_LN_S"
765 if test "$ac_cv_prog_LN_S" = "ln -s"; then
766   echo "$ac_t""yes" 1>&6
767 else
768   echo "$ac_t""no" 1>&6
769 fi
770
771
772 for dir in lisp etc man info; do
773   if test ! -d "$dir" ; then
774     echo Making symbolic link to "$srcdir/$dir"
775     ${LN_S} "$srcdir/$dir" "$dir"
776   fi
777 done
778
779 absolute_pwd="`pwd`";
780 if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
781 then blddir="$PWD"
782 else blddir="$absolute_pwd"
783 fi
784
785
786 case "$srcdir" in
787   /* ) ;;
788   .  ) srcdir="$blddir" ;;
789   *  ) srcdir="`cd $srcdir && pwd`" ;;
790 esac
791
792 if test `pwd` != `sh -c cd $srcdir && pwd`  \
793    && test -f "$srcdir/src/config.h"; then
794   (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
795    echo "   as a build directory right now; it has been configured in its own"
796    echo "   right.  To configure in another directory as well, you MUST"
797    echo "   use GNU make.  If you do not have GNU make, then you must"
798    echo "   now do \`make distclean' in $srcdir,"
799    echo "   and then run $progname again.") >&2
800   extrasub='/^VPATH[     ]*=/c\
801 vpath %.c $(srcdir)\
802 vpath %.h $(srcdir)\
803 vpath %.y $(srcdir)\
804 vpath %.l $(srcdir)\
805 vpath %.s $(srcdir)\
806 vpath %.in $(srcdir)'
807 fi
808
809 . "$srcdir/version.sh" || exit 1;
810 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
811 : "${extra_verbose=$beta}"
812 version="${emacs_major_version}.${emacs_minor_version}"
813 { test "$extra_verbose" = "yes" && cat << EOF
814     Defining EMACS_MAJOR_VERSION = $emacs_major_version
815 EOF
816 cat >> confdefs.h <<EOF
817 #define EMACS_MAJOR_VERSION $emacs_major_version
818 EOF
819 }
820
821 { test "$extra_verbose" = "yes" && cat << EOF
822     Defining EMACS_MINOR_VERSION = $emacs_minor_version
823 EOF
824 cat >> confdefs.h <<EOF
825 #define EMACS_MINOR_VERSION $emacs_minor_version
826 EOF
827 }
828
829 if test -n "$emacs_beta_version"; then
830   version="${version}-b${emacs_beta_version}"
831   { test "$extra_verbose" = "yes" && cat << EOF
832     Defining EMACS_BETA_VERSION = $emacs_beta_version
833 EOF
834 cat >> confdefs.h <<EOF
835 #define EMACS_BETA_VERSION $emacs_beta_version
836 EOF
837 }
838
839 fi
840 { test "$extra_verbose" = "yes" && cat << EOF
841     Defining XEMACS_CODENAME = "$xemacs_codename"
842 EOF
843 cat >> confdefs.h <<EOF
844 #define XEMACS_CODENAME "$xemacs_codename"
845 EOF
846 }
847
848 { test "$extra_verbose" = "yes" && cat << EOF
849     Defining EMACS_VERSION = "$version"
850 EOF
851 cat >> confdefs.h <<EOF
852 #define EMACS_VERSION "$version"
853 EOF
854 }
855
856
857 if test "$with_infodock" = "yes"; then
858   if test ! -f ../ID-INSTALL; then
859     echo "Cannot build InfoDock without InfoDock sources"
860     with_infodock=no
861   fi
862 fi
863
864 if test "$with_infodock" = "yes"; then
865       { test "$extra_verbose" = "yes" && cat << EOF
866     Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
867 EOF
868 cat >> confdefs.h <<EOF
869 #define INFODOCK_MAJOR_VERSION $infodock_major_version
870 EOF
871 }
872
873   { test "$extra_verbose" = "yes" && cat << EOF
874     Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
875 EOF
876 cat >> confdefs.h <<EOF
877 #define INFODOCK_MINOR_VERSION $infodock_minor_version
878 EOF
879 }
880
881   { test "$extra_verbose" = "yes" && cat << EOF
882     Defining INFODOCK_BUILD_VERSION = $infodock_build_version
883 EOF
884 cat >> confdefs.h <<EOF
885 #define INFODOCK_BUILD_VERSION $infodock_build_version
886 EOF
887 }
888
889   version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
890   PROGNAME=infodock
891   CPPFLAGS="$CPPFLAGS -DINFODOCK"
892 else
893   PROGNAME=xemacs
894 fi
895
896 if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
897 test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
898     Defining ERROR_CHECK_EXTENTS
899 EOF
900 cat >> confdefs.h <<\EOF
901 #define ERROR_CHECK_EXTENTS 1
902 EOF
903 }
904
905 test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
906     Defining ERROR_CHECK_TYPECHECK
907 EOF
908 cat >> confdefs.h <<\EOF
909 #define ERROR_CHECK_TYPECHECK 1
910 EOF
911 }
912
913 test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
914     Defining ERROR_CHECK_BUFPOS
915 EOF
916 cat >> confdefs.h <<\EOF
917 #define ERROR_CHECK_BUFPOS 1
918 EOF
919 }
920
921 test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
922     Defining ERROR_CHECK_GC
923 EOF
924 cat >> confdefs.h <<\EOF
925 #define ERROR_CHECK_GC 1
926 EOF
927 }
928
929 test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
930     Defining ERROR_CHECK_MALLOC
931 EOF
932 cat >> confdefs.h <<\EOF
933 #define ERROR_CHECK_MALLOC 1
934 EOF
935 }
936
937 if test "${debug:=$beta}" = "yes"; then
938   use_assertions=yes memory_usage_stats=yes
939   extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
940    echo "    xemacs will be linked with \"debug.o\""
941  fi
942   { test "$extra_verbose" = "yes" && cat << \EOF
943     Defining DEBUG_XEMACS
944 EOF
945 cat >> confdefs.h <<\EOF
946 #define DEBUG_XEMACS 1
947 EOF
948 }
949
950 fi
951 test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
952     Defining USE_ASSERTIONS
953 EOF
954 cat >> confdefs.h <<\EOF
955 #define USE_ASSERTIONS 1
956 EOF
957 }
958
959 test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
960     Defining MEMORY_USAGE_STATS
961 EOF
962 cat >> confdefs.h <<\EOF
963 #define MEMORY_USAGE_STATS 1
964 EOF
965 }
966
967
968
969 echo $ac_n "checking "host system type"""... $ac_c" 1>&6
970 echo "configure:971: checking "host system type"" >&5
971 internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
972 canonical=`${CONFIG_SHELL-/bin/sh} $srcdir/config.sub "$internal_configuration"`
973 configuration=`echo "$configuration" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
974 canonical=`echo "$canonical" | sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'`
975 echo "$ac_t""$configuration" 1>&6
976
977
978
979
980
981 machine='' opsys=''
982
983 case "$canonical" in
984   sparc-*-*        ) machine=sparc ;;
985   alpha*-*-*       ) machine=alpha ;;
986   vax-*-*          ) machine=vax ;;
987   mips-dec-*       ) machine=pmax ;;
988   mips-sgi-*       ) machine=iris4d ;;
989   romp-ibm-*       ) machine=ibmrt ;;
990   rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
991   powerpc-ibm-aix* ) machine=ibmrs6000 ;;
992   powerpc*-*       ) machine=powerpc ;;
993   hppa-*-*         ) machine=hp800 ;;
994   m88k-dg-*        ) machine=aviion ;;
995   m68*-sony-*      ) machine=news ;;
996   mips-sony-*      ) machine=news-risc ;;
997   clipper-*        ) machine=clipper ;;
998   arm-*            ) machine=arm ;;
999   ns32k-*          ) machine=ns32000 ;;
1000 esac
1001
1002 case "$canonical" in
1003   *-*-linux*    ) opsys=linux ;;
1004   *-*-netbsd*   ) opsys=netbsd ;;
1005   *-*-openbsd*  ) opsys=openbsd ;;
1006   *-*-nextstep* ) opsys=nextstep ;;
1007   *-*-vms       ) opsys=vms ;;
1008
1009     *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
1010   *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
1011   *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
1012   *-dec-osf3*                ) opsys=decosf3-1 ;;
1013   *-dec-osf4*                ) opsys=decosf4-0 ;;
1014
1015     *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
1016   *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
1017   *-*-ultrix* )         opsys=ultrix4-3 ;;
1018
1019     *-*-aix3.1*  ) opsys=aix3-1 ;;
1020   *-*-aix3.2.5 ) opsys=aix3-2-5 ;;
1021   *-*-aix3*    ) opsys=aix3-2   ;;
1022   *-*-aix4.0*  ) opsys=aix4     ;;
1023   *-*-aix4.1*  ) opsys=aix4-1   ;;
1024   *-*-aix4*    ) opsys=aix4-2   ;;
1025
1026     *-gnu* )                    opsys=gnu    ;;
1027   *-*-bsd4.[01] )               opsys=bsd4-1 ;;
1028   *-*-bsd4.2 )                  opsys=bsd4-2 ;;
1029   *-*-bsd4.3 )                  opsys=bsd4-3 ;;
1030   *-*-aos4.2 )                  opsys=bsd4-2 ;;
1031   *-*-aos*   )                  opsys=bsd4-3 ;;
1032   *-*-sysv0    | *-*-sysvr0 )   opsys=usg5-0 ;;
1033   *-*-sysv2    | *-*-sysvr2 )   opsys=usg5-2 ;;
1034   *-*-sysv2.2  | *-*-sysvr2.2 ) opsys=usg5-2-2 ;;
1035   *-*-sysv3*   | *-*-sysvr3* )  opsys=usg5-3 ;;
1036   *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
1037   *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
1038         if test -z "$NON_GNU_CPP" ; then
1039           for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
1040             if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
1041           done
1042         fi
1043         opsys=usg5-4-2 ;;
1044     *-sysv4* | *-sysvr4* )      opsys=usg5-4 ;;
1045     *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
1046 esac
1047
1048 case "$canonical" in
1049
1050     *-*-netbsd* )
1051     case "$canonical" in
1052       i[3-9]86-*-netbsd*) machine=intel386 ;;
1053       hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
1054                                             machine=hp9000s300 ;;
1055       pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
1056       pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
1057     esac
1058   ;;
1059
1060     *-*-openbsd* )
1061     case "${canonical}" in
1062       i386-*-openbsd*)          machine=intel386 ;;
1063       m68k-*-openbsd*)          machine=hp9000s300 ;;
1064       mipsel-*-openbsd*)        machine=pmax ;;
1065      esac
1066    ;;
1067
1068     arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
1069   arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
1070
1071     fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
1072   i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
1073
1074     m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
1075
1076     580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
1077
1078     m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
1079
1080     we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
1081
1082     m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
1083
1084     rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
1085   m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
1086   m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
1087
1088   
1089     celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
1090
1091     *-convex-bsd* | *-convex-convexos* )
1092     machine=convex opsys=bsd4-3
1093     NON_GNU_CPP="cc -E -P"
1094   ;;
1095
1096     i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
1097
1098     i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
1099   m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
1100   m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
1101   m88k-dg-dgux*                           ) opsys=dgux     ;;
1102
1103     m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
1104   m88k-motorola-sysv4* )
1105                     machine=delta88k opsys=usg5-4-2
1106   ;;
1107   m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
1108
1109     m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
1110   m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
1111
1112     ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
1113
1114     pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
1115   pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
1116   np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
1117
1118       m88k-harris-cxux* )
1119         case "`uname -r`" in
1120        [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
1121        [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
1122     esac
1123     NON_GNU_CPP="/lib/cpp"
1124   ;;
1125     m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
1126     powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
1127
1128     xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
1129
1130     m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
1131
1132     *-hp-hpux* )
1133         case "$canonical" in
1134       m68*  ) machine=hp9000s300 ;;
1135       hppa* ) machine=hp800      ;;
1136     esac
1137
1138     case "$canonical" in
1139       *-hp-hpux7*  )  opsys=hpux   ;;
1140       *-hp-hpux8*  )  opsys=hpux8  ;;
1141       *-hp-hpux9*  )  opsys=hpux9  ;;
1142       *-hp-hpux10* )  opsys=hpux10 ;;
1143       *-hp-hpux11* )  opsys=hpux11 ;;
1144       *            )  opsys=hpux   ;;
1145     esac
1146
1147         case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
1148    echo "    xemacs will be linked with \"strcat.o\""
1149  fi ;; esac
1150
1151     if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
1152         ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
1153     NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
1154
1155     case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
1156   ;;
1157
1158     orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
1159   clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
1160
1161     i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
1162   i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
1163   i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
1164   romp-ibm-aos*    ) opsys=bsd4-3 ;;
1165   romp-ibm-bsd*    ) opsys=bsd4-3 ;;
1166   romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
1167
1168     m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
1169   m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
1170
1171     i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
1172
1173     i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
1174
1175     i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
1176
1177     i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
1178
1179       i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
1180
1181     i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
1182
1183     i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
1184
1185     m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
1186
1187     m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
1188
1189         mips-mips-usg* ) machine=mips4 ;;
1190   mips-mips-riscos4 )
1191     machine=mips4
1192     NON_GNU_CC="cc -systype bsd43"
1193     NON_GNU_CPP="cc -systype bsd43 -E"
1194     case "$canonical" in
1195       mips-mips-riscos4* ) opsys=bsd4-3  ;;
1196       mips-mips-riscos5* ) opsys=riscos5 ;;
1197     esac
1198   ;;
1199   mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
1200   mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
1201
1202     m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
1203
1204     ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
1205
1206     m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
1207   m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
1208
1209     m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
1210
1211     m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
1212
1213     m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
1214
1215     pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
1216
1217     ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
1218   ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
1219
1220     mips-siemens-sysv* | mips-sni-sysv*)
1221     machine=mips-siemens opsys=usg5-4
1222     NON_GNU_CC=/usr/ccs/bin/cc
1223     NON_GNU_CPP=/usr/ccs/lib/cpp
1224   ;;
1225
1226     mips-nec-sysv*)
1227     machine=mips-nec
1228     NON_GNU_CC=/usr/ccs/bin/cc
1229     NON_GNU_CPP=/usr/ccs/lib/cpp
1230   ;;
1231
1232       m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
1233   m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
1234     mips-sgi-irix3.*    ) opsys=irix3-3 ;;
1235   mips-sgi-irix4.*    ) opsys=irix4-0 ;;
1236   mips-sgi-irix6*     ) opsys=irix6-0 ;;
1237   mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
1238   mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
1239   mips-sgi-irix5.*    ) opsys=irix5-3 ;;
1240   mips-sgi-irix*      ) opsys=irix5-0 ;;
1241
1242     *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
1243   *-sony-news* ) opsys=newsos5 ;;
1244
1245     m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
1246
1247     *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
1248         case "$canonical" in
1249       m68*-sunos1* )             machine=sun1     ;;
1250       m68*-sunos2* )             machine=sun2     ;;
1251       m68* )                     machine=sun3     ;;
1252       i*86*-sun-sunos[34]* )   machine=sun386   ;;
1253       i*86-*-* )                 machine=intel386 ;;
1254       rs6000* )                  machine=rs6000   ;;
1255     esac
1256
1257         case "$canonical" in *-sunos5*)
1258       canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
1259     esac
1260
1261                     case "$canonical" in
1262       *-sunos4* )
1263         #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
1264         : ;;
1265       *-solaris2* )
1266         #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
1267         RANLIB=':' ;;
1268     esac
1269
1270     case "$canonical" in
1271       *-solaris*          )
1272         opsys=sol2
1273         os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
1274         { test "$extra_verbose" = "yes" && cat << EOF
1275     Defining OS_RELEASE = $os_release
1276 EOF
1277 cat >> confdefs.h <<EOF
1278 #define OS_RELEASE $os_release
1279 EOF
1280 }
1281  ;;
1282
1283             i*86-*-sunos4*      ) opsys=sunos4-0        ;;
1284       *-sunos4.0*         ) opsys=sunos4-0      ;;
1285       *-sunos4.1.2*       ) opsys=sunos4-1-2    ;;
1286       *-sunos4.1.3*       ) opsys=sunos4-1-3    ;;
1287       *-sunos4.1.[4-9]* ) opsys=sunos4-1-4      ;;
1288       *-sunos4* | *-sunos ) opsys=sunos4-1      ;;
1289       *-mach*             ) opsys=mach-bsd4-3   ;;
1290       *                   ) opsys=bsd4-2        ;;
1291     esac
1292
1293     case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
1294
1295         test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
1296   ;;
1297
1298     m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
1299
1300     tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
1301   tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
1302
1303     mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
1304
1305     m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
1306
1307     ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
1308       m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
1309
1310     titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
1311
1312     m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
1313
1314     vax-dec-* )
1315     case "$canonical" in
1316       *-sysv[01]* | *-sysvr[01]* )      opsys=usg5-0 ;;
1317       *-sysv2* | *-sysvr2* )            opsys=usg5-2 ;;
1318       *-mach* )                         opsys=mach-bsd4-3 ;;
1319     esac
1320   ;;
1321
1322     ns16k-whitechapel-* ) machine=mg1 ;;
1323
1324     m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
1325
1326     i[3-9]86-*-* )
1327     machine=intel386
1328     case "$canonical" in
1329       *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
1330       *-isc2.2* )               opsys=isc2-2 ;;
1331       *-isc4.0* )               opsys=isc4-0 ;;
1332       *-isc4.* )                opsys=isc4-1
1333                                 GCC_TEST_OPTIONS=-posix
1334                                 NON_GCC_TEST_OPTIONS=-Xp
1335                                 ;;
1336       *-isc* )                  opsys=isc3-0 ;;
1337       *-esix5* )                opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
1338       *-esix* )                 opsys=esix ;;
1339       *-mach* )                 opsys=mach-bsd4-3 ;;
1340       *-xenix* )                opsys=xenix ;;
1341       *-sco3.2v4* )             opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
1342       *-bsd386* | *-bsdi1* )    opsys=bsd386 ;;
1343       *-bsdi3* )                opsys=bsdos3 ;;
1344       *-bsdi2.1* )              opsys=bsdos2-1 ;;
1345       *-bsdi2* )                opsys=bsdos2 ;;
1346       *-sco3.2v5* )             opsys=sco5 ;
1347                                                         if test "$dynamic" = "yes" ; then
1348                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
1349         else
1350                 NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
1351         fi ;;
1352       *-386bsd* )               opsys=386bsd ;;
1353       *-freebsd* )              opsys=freebsd ;;
1354       *-nextstep* )             opsys=nextstep ;;
1355       *-pc-cygwin32 )           opsys=cygwin32 ;;
1356           esac
1357   ;;
1358
1359     m68k-*-linux* ) machine=m68k opsys=linux ;;
1360
1361 esac
1362
1363 if test -z "$machine" -o -z "$opsys"; then
1364   (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
1365    echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
1366   ) >&2
1367   exit 1
1368 fi
1369
1370 if test -z "$dynamic"; then
1371   case "$opsys" in
1372     hpux* | sunos4* | sco5 ) dynamic=no ;;
1373     *) dynamic=yes ;;
1374   esac
1375 fi
1376 if test "$dynamic" = "yes"; then
1377   case "$opsys" in
1378     hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
1379     decosf* ) ld_call_shared="-call_shared" ;;
1380   esac
1381 else   case "$opsys" in
1382     sol2 )
1383       echo "Static linking is not supported on Solaris 2."
1384       echo "Rerun configure without specifying --dynamic=no."
1385       exit 1 ;;
1386     linux   ) ld_call_shared="-Bstatic" ;;
1387     decosf* ) ld_call_shared="-non_shared" ;;
1388   esac
1389 fi
1390
1391 case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
1392
1393 stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
1394 { test "$extra_verbose" = "yes" && cat << EOF
1395     Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
1396 EOF
1397 cat >> confdefs.h <<EOF
1398 #define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
1399 EOF
1400 }
1401
1402
1403 machfile="m/${machine}.h"
1404 opsysfile="s/${opsys}.h"
1405
1406
1407 test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
1408 if test "$with_workshop $with_tooltalk" = "yes no"; then
1409   (echo "$progname: Usage error:"
1410 echo " " "--with-workshop requires --with-tooltalk"
1411 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
1412 elif test "$with_tooltalk" = "no" ; then with_workshop=no
1413 elif test "$with_workshop" = "yes"; then with_tooltalk=yes
1414 fi
1415
1416 if test "$with_workshop" = "yes"; then
1417   { test "$extra_verbose" = "yes" && cat << \EOF
1418     Defining SUNPRO
1419 EOF
1420 cat >> confdefs.h <<\EOF
1421 #define SUNPRO 1
1422 EOF
1423 }
1424
1425   extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
1426    echo "    xemacs will be linked with \"sunpro.o\""
1427  fi
1428 fi
1429
1430 if test "$with_clash_detection" = "yes"; then
1431   { test "$extra_verbose" = "yes" && cat << \EOF
1432     Defining CLASH_DETECTION
1433 EOF
1434 cat >> confdefs.h <<\EOF
1435 #define CLASH_DETECTION 1
1436 EOF
1437 }
1438
1439   extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
1440    echo "    xemacs will be linked with \"filelock.o\""
1441  fi
1442 fi
1443
1444 test -n "$compiler" && CC="$compiler"
1445 if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
1446 fi
1447
1448 test "${cflags-unset}" != unset && CFLAGS="$cflags"
1449 if test "${CFLAGS-unset}" != unset
1450   then cflags_specified=yes;
1451   else cflags_specified=no;
1452 fi
1453
1454 xe_save_CFLAGS="$CFLAGS"
1455
1456 # Extract the first word of "gcc", so it can be a program name with args.
1457 set dummy gcc; ac_word=$2
1458 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1459 echo "configure:1460: checking for $ac_word" >&5
1460
1461 if test -n "$CC"; then
1462   ac_cv_prog_CC="$CC" # Let the user override the test.
1463 else
1464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1465   for ac_dir in $PATH; do
1466     test -z "$ac_dir" && ac_dir=.
1467     if test -f $ac_dir/$ac_word; then
1468       ac_cv_prog_CC="gcc"
1469       break
1470     fi
1471   done
1472   IFS="$ac_save_ifs"
1473 fi
1474 CC="$ac_cv_prog_CC"
1475 if test -n "$CC"; then
1476   echo "$ac_t""$CC" 1>&6
1477 else
1478   echo "$ac_t""no" 1>&6
1479 fi
1480
1481 if test -z "$CC"; then
1482   # Extract the first word of "cc", so it can be a program name with args.
1483 set dummy cc; ac_word=$2
1484 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1485 echo "configure:1486: checking for $ac_word" >&5
1486
1487 if test -n "$CC"; then
1488   ac_cv_prog_CC="$CC" # Let the user override the test.
1489 else
1490   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1491   ac_prog_rejected=no
1492   for ac_dir in $PATH; do
1493     test -z "$ac_dir" && ac_dir=.
1494     if test -f $ac_dir/$ac_word; then
1495       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1496         ac_prog_rejected=yes
1497         continue
1498       fi
1499       ac_cv_prog_CC="cc"
1500       break
1501     fi
1502   done
1503   IFS="$ac_save_ifs"
1504 if test $ac_prog_rejected = yes; then
1505   # We found a bogon in the path, so make sure we never use it.
1506   set dummy $ac_cv_prog_CC
1507   shift
1508   if test $# -gt 0; then
1509     # We chose a different compiler from the bogus one.
1510     # However, it has the same basename, so the bogon will be chosen
1511     # first if we set CC to just the basename; use the full file name.
1512     shift
1513     set dummy "$ac_dir/$ac_word" "$@"
1514     shift
1515     ac_cv_prog_CC="$@"
1516   fi
1517 fi
1518 fi
1519 CC="$ac_cv_prog_CC"
1520 if test -n "$CC"; then
1521   echo "$ac_t""$CC" 1>&6
1522 else
1523   echo "$ac_t""no" 1>&6
1524 fi
1525
1526   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1527 fi
1528
1529 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1530 echo "configure:1531: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1531
1532 ac_ext=c
1533 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1534 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1535 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1536 ac_cpp='$CPP '"$xe_cppflags"
1537 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1538 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1539 cross_compiling=no
1540
1541 cat > conftest.$ac_ext <<EOF
1542 #line 1543 "configure"
1543 #include "confdefs.h"
1544 main(){return(0);}
1545 EOF
1546 if { (eval echo configure:1547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1547   ac_cv_prog_cc_works=yes
1548   # If we can't run a trivial program, we are probably using a cross compiler.
1549   if (./conftest; exit) 2>/dev/null; then
1550     ac_cv_prog_cc_cross=no
1551   else
1552     ac_cv_prog_cc_cross=yes
1553   fi
1554 else
1555   echo "configure: failed program was:" >&5
1556   cat conftest.$ac_ext >&5
1557   ac_cv_prog_cc_works=no
1558 fi
1559 rm -fr conftest*
1560
1561 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1562 if test $ac_cv_prog_cc_works = no; then
1563   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1564 fi
1565 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1566 echo "configure:1567: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1567 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1568 cross_compiling=$ac_cv_prog_cc_cross
1569
1570 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1571 echo "configure:1572: checking whether we are using GNU C" >&5
1572
1573 cat > conftest.c <<EOF
1574 #ifdef __GNUC__
1575   yes;
1576 #endif
1577 EOF
1578 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1579   ac_cv_prog_gcc=yes
1580 else
1581   ac_cv_prog_gcc=no
1582 fi
1583
1584 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1585
1586 if test $ac_cv_prog_gcc = yes; then
1587   GCC=yes
1588   ac_test_CFLAGS="${CFLAGS+set}"
1589   ac_save_CFLAGS="$CFLAGS"
1590   CFLAGS=
1591   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1592 echo "configure:1593: checking whether ${CC-cc} accepts -g" >&5
1593
1594 echo 'void f(){}' > conftest.c
1595 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1596   ac_cv_prog_cc_g=yes
1597 else
1598   ac_cv_prog_cc_g=no
1599 fi
1600 rm -f conftest*
1601
1602
1603 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1604   if test "$ac_test_CFLAGS" = set; then
1605     CFLAGS="$ac_save_CFLAGS"
1606   elif test $ac_cv_prog_cc_g = yes; then
1607     CFLAGS="-g -O2"
1608   else
1609     CFLAGS="-O2"
1610   fi
1611 else
1612   GCC=
1613   test "${CFLAGS+set}" = set || CFLAGS="-g"
1614 fi
1615  
1616 if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
1617   CC=${NON_GNU_CC-cc}
1618   # Extract the first word of "gcc", so it can be a program name with args.
1619 set dummy gcc; ac_word=$2
1620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1621 echo "configure:1622: checking for $ac_word" >&5
1622
1623 if test -n "$CC"; then
1624   ac_cv_prog_CC="$CC" # Let the user override the test.
1625 else
1626   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1627   for ac_dir in $PATH; do
1628     test -z "$ac_dir" && ac_dir=.
1629     if test -f $ac_dir/$ac_word; then
1630       ac_cv_prog_CC="gcc"
1631       break
1632     fi
1633   done
1634   IFS="$ac_save_ifs"
1635 fi
1636 CC="$ac_cv_prog_CC"
1637 if test -n "$CC"; then
1638   echo "$ac_t""$CC" 1>&6
1639 else
1640   echo "$ac_t""no" 1>&6
1641 fi
1642
1643 if test -z "$CC"; then
1644   # Extract the first word of "cc", so it can be a program name with args.
1645 set dummy cc; ac_word=$2
1646 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1647 echo "configure:1648: checking for $ac_word" >&5
1648
1649 if test -n "$CC"; then
1650   ac_cv_prog_CC="$CC" # Let the user override the test.
1651 else
1652   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1653   ac_prog_rejected=no
1654   for ac_dir in $PATH; do
1655     test -z "$ac_dir" && ac_dir=.
1656     if test -f $ac_dir/$ac_word; then
1657       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1658         ac_prog_rejected=yes
1659         continue
1660       fi
1661       ac_cv_prog_CC="cc"
1662       break
1663     fi
1664   done
1665   IFS="$ac_save_ifs"
1666 if test $ac_prog_rejected = yes; then
1667   # We found a bogon in the path, so make sure we never use it.
1668   set dummy $ac_cv_prog_CC
1669   shift
1670   if test $# -gt 0; then
1671     # We chose a different compiler from the bogus one.
1672     # However, it has the same basename, so the bogon will be chosen
1673     # first if we set CC to just the basename; use the full file name.
1674     shift
1675     set dummy "$ac_dir/$ac_word" "$@"
1676     shift
1677     ac_cv_prog_CC="$@"
1678   fi
1679 fi
1680 fi
1681 CC="$ac_cv_prog_CC"
1682 if test -n "$CC"; then
1683   echo "$ac_t""$CC" 1>&6
1684 else
1685   echo "$ac_t""no" 1>&6
1686 fi
1687
1688   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1689 fi
1690
1691 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1692 echo "configure:1693: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1693
1694 ac_ext=c
1695 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1696 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1697 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1698 ac_cpp='$CPP '"$xe_cppflags"
1699 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1700 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1701 cross_compiling=no
1702
1703 cat > conftest.$ac_ext <<EOF
1704 #line 1705 "configure"
1705 #include "confdefs.h"
1706 main(){return(0);}
1707 EOF
1708 if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1709   ac_cv_prog_cc_works=yes
1710   # If we can't run a trivial program, we are probably using a cross compiler.
1711   if (./conftest; exit) 2>/dev/null; then
1712     ac_cv_prog_cc_cross=no
1713   else
1714     ac_cv_prog_cc_cross=yes
1715   fi
1716 else
1717   echo "configure: failed program was:" >&5
1718   cat conftest.$ac_ext >&5
1719   ac_cv_prog_cc_works=no
1720 fi
1721 rm -fr conftest*
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   ac_test_CFLAGS="${CFLAGS+set}"
1751   ac_save_CFLAGS="$CFLAGS"
1752   CFLAGS=
1753   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1754 echo "configure:1755: checking whether ${CC-cc} accepts -g" >&5
1755
1756 echo 'void f(){}' > conftest.c
1757 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1758   ac_cv_prog_cc_g=yes
1759 else
1760   ac_cv_prog_cc_g=no
1761 fi
1762 rm -f conftest*
1763
1764
1765 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1766   if test "$ac_test_CFLAGS" = set; then
1767     CFLAGS="$ac_save_CFLAGS"
1768   elif test $ac_cv_prog_cc_g = yes; then
1769     CFLAGS="-g -O2"
1770   else
1771     CFLAGS="-O2"
1772   fi
1773 else
1774   GCC=
1775   test "${CFLAGS+set}" = set || CFLAGS="-g"
1776 fi
1777
1778 elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
1779   CC=gcc
1780   # Extract the first word of "gcc", so it can be a program name with args.
1781 set dummy gcc; ac_word=$2
1782 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1783 echo "configure:1784: checking for $ac_word" >&5
1784
1785 if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1789   for ac_dir in $PATH; do
1790     test -z "$ac_dir" && ac_dir=.
1791     if test -f $ac_dir/$ac_word; then
1792       ac_cv_prog_CC="gcc"
1793       break
1794     fi
1795   done
1796   IFS="$ac_save_ifs"
1797 fi
1798 CC="$ac_cv_prog_CC"
1799 if test -n "$CC"; then
1800   echo "$ac_t""$CC" 1>&6
1801 else
1802   echo "$ac_t""no" 1>&6
1803 fi
1804
1805 if test -z "$CC"; then
1806   # Extract the first word of "cc", so it can be a program name with args.
1807 set dummy cc; ac_word=$2
1808 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1809 echo "configure:1810: checking for $ac_word" >&5
1810
1811 if test -n "$CC"; then
1812   ac_cv_prog_CC="$CC" # Let the user override the test.
1813 else
1814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1815   ac_prog_rejected=no
1816   for ac_dir in $PATH; do
1817     test -z "$ac_dir" && ac_dir=.
1818     if test -f $ac_dir/$ac_word; then
1819       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1820         ac_prog_rejected=yes
1821         continue
1822       fi
1823       ac_cv_prog_CC="cc"
1824       break
1825     fi
1826   done
1827   IFS="$ac_save_ifs"
1828 if test $ac_prog_rejected = yes; then
1829   # We found a bogon in the path, so make sure we never use it.
1830   set dummy $ac_cv_prog_CC
1831   shift
1832   if test $# -gt 0; then
1833     # We chose a different compiler from the bogus one.
1834     # However, it has the same basename, so the bogon will be chosen
1835     # first if we set CC to just the basename; use the full file name.
1836     shift
1837     set dummy "$ac_dir/$ac_word" "$@"
1838     shift
1839     ac_cv_prog_CC="$@"
1840   fi
1841 fi
1842 fi
1843 CC="$ac_cv_prog_CC"
1844 if test -n "$CC"; then
1845   echo "$ac_t""$CC" 1>&6
1846 else
1847   echo "$ac_t""no" 1>&6
1848 fi
1849
1850   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
1851 fi
1852
1853 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1854 echo "configure:1855: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1855
1856 ac_ext=c
1857 xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
1858 xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
1859 xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
1860 ac_cpp='$CPP '"$xe_cppflags"
1861 ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
1862 ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
1863 cross_compiling=no
1864
1865 cat > conftest.$ac_ext <<EOF
1866 #line 1867 "configure"
1867 #include "confdefs.h"
1868 main(){return(0);}
1869 EOF
1870 if { (eval echo configure:1871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1871   ac_cv_prog_cc_works=yes
1872   # If we can't run a trivial program, we are probably using a cross compiler.
1873   if (./conftest; exit) 2>/dev/null; then
1874     ac_cv_prog_cc_cross=no
1875   else
1876     ac_cv_prog_cc_cross=yes
1877   fi
1878 else
1879   echo "configure: failed program was:" >&5
1880   cat conftest.$ac_ext >&5
1881   ac_cv_prog_cc_works=no
1882 fi
1883 rm -fr conftest*
1884
1885 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1886 if test $ac_cv_prog_cc_works = no; then
1887   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1888 fi
1889 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1890 echo "configure:1891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1891 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1892 cross_compiling=$ac_cv_prog_cc_cross
1893
1894 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1895 echo "configure:1896: checking whether we are using GNU C" >&5
1896
1897 cat > conftest.c <<EOF
1898 #ifdef __GNUC__
1899   yes;
1900 #endif
1901 EOF
1902 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1903   ac_cv_prog_gcc=yes
1904 else
1905   ac_cv_prog_gcc=no
1906 fi
1907
1908 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1909
1910 if test $ac_cv_prog_gcc = yes; then
1911   GCC=yes
1912   ac_test_CFLAGS="${CFLAGS+set}"
1913   ac_save_CFLAGS="$CFLAGS"
1914   CFLAGS=
1915   echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1916 echo "configure:1917: checking whether ${CC-cc} accepts -g" >&5
1917
1918 echo 'void f(){}' > conftest.c
1919 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1920   ac_cv_prog_cc_g=yes
1921 else
1922   ac_cv_prog_cc_g=no
1923 fi
1924 rm -f conftest*
1925
1926
1927 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1928   if test "$ac_test_CFLAGS" = set; then
1929     CFLAGS="$ac_save_CFLAGS"
1930   elif test $ac_cv_prog_cc_g = yes; then
1931     CFLAGS="-g -O2"
1932   else
1933     CFLAGS="-O2"
1934   fi
1935 else
1936   GCC=
1937   test "${CFLAGS+set}" = set || CFLAGS="-g"
1938 fi
1939
1940 fi
1941 CFLAGS="$xe_save_CFLAGS"
1942
1943
1944 test -n "$CPP" -a -d "$CPP" && CPP=
1945
1946 test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
1947
1948 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1949 echo "configure:1950: checking how to run the C preprocessor" >&5
1950 # On Suns, sometimes $CPP names a directory.
1951 if test -n "$CPP" && test -d "$CPP"; then
1952   CPP=
1953 fi
1954 if test -z "$CPP"; then
1955
1956   # This must be in double quotes, not single quotes, because CPP may get
1957   # substituted into the Makefile and "${CC-cc}" will confuse make.
1958   CPP="${CC-cc} -E"
1959   # On the NeXT, cc -E runs the code through the compiler's parser,
1960   # not just through cpp.
1961   cat > conftest.$ac_ext <<EOF
1962 #line 1963 "configure"
1963 #include "confdefs.h"
1964 #include <assert.h>
1965 Syntax Error
1966 EOF
1967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1968 { (eval echo configure:1969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1969 ac_err=`grep -v '^ *+' conftest.out`
1970 if test -z "$ac_err"; then
1971   :
1972 else
1973   echo "$ac_err" >&5
1974   echo "configure: failed program was:" >&5
1975   cat conftest.$ac_ext >&5
1976   rm -rf conftest*
1977   CPP="${CC-cc} -E -traditional-cpp"
1978   cat > conftest.$ac_ext <<EOF
1979 #line 1980 "configure"
1980 #include "confdefs.h"
1981 #include <assert.h>
1982 Syntax Error
1983 EOF
1984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1985 { (eval echo configure:1986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1986 ac_err=`grep -v '^ *+' conftest.out`
1987 if test -z "$ac_err"; then
1988   :
1989 else
1990   echo "$ac_err" >&5
1991   echo "configure: failed program was:" >&5
1992   cat conftest.$ac_ext >&5
1993   rm -rf conftest*
1994   CPP=/lib/cpp
1995 fi
1996 rm -f conftest*
1997 fi
1998 rm -f conftest*
1999   ac_cv_prog_CPP="$CPP"
2000   CPP="$ac_cv_prog_CPP"
2001 else
2002   ac_cv_prog_CPP="$CPP"
2003 fi
2004 echo "$ac_t""$CPP" 1>&6
2005
2006
2007 echo $ac_n "checking for AIX""... $ac_c" 1>&6
2008 echo "configure:2009: checking for AIX" >&5
2009 cat > conftest.$ac_ext <<EOF
2010 #line 2011 "configure"
2011 #include "confdefs.h"
2012 #ifdef _AIX
2013   yes
2014 #endif
2015
2016 EOF
2017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2018   egrep "yes" >/dev/null 2>&1; then
2019   rm -rf conftest*
2020   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
2021     Defining _ALL_SOURCE
2022 EOF
2023 cat >> confdefs.h <<\EOF
2024 #define _ALL_SOURCE 1
2025 EOF
2026 }
2027
2028 else
2029   rm -rf conftest*
2030   echo "$ac_t""no" 1>&6
2031 fi
2032 rm -f conftest*
2033
2034
2035
2036 echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
2037 echo "configure:2038: checking for GNU libc" >&5
2038 cat > conftest.$ac_ext <<EOF
2039 #line 2040 "configure"
2040 #include "confdefs.h"
2041 #include <features.h>
2042 int main() {
2043
2044 #if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
2045 #error Not a GNU libc system :-(
2046 ******* ======= ******** &&&&&&&&
2047 #endif
2048
2049 ; return 0; }
2050 EOF
2051 if { (eval echo configure:2052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2052   rm -rf conftest*
2053   have_glibc=yes
2054 else
2055   echo "configure: failed program was:" >&5
2056   cat conftest.$ac_ext >&5
2057   rm -rf conftest*
2058   have_glibc=no
2059 fi
2060 rm -f conftest*
2061 echo "$ac_t""$have_glibc" 1>&6
2062 test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
2063     Defining _GNU_SOURCE
2064 EOF
2065 cat >> confdefs.h <<\EOF
2066 #define _GNU_SOURCE 1
2067 EOF
2068 }
2069
2070
2071
2072 cat > conftest.$ac_ext <<EOF
2073 #line 2074 "configure"
2074 #include "confdefs.h"
2075 int main () {
2076 #if defined __SUNPRO_C
2077 return 11;
2078 #elif defined __DECC
2079 return 12;
2080 #else
2081 return 0;
2082 #endif
2083 }
2084 EOF
2085 if { (eval echo configure:2086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
2086 then
2087   :
2088 else
2089   conftest_rc="$?"
2090   echo "configure: failed program was:" >&5
2091   cat conftest.$ac_ext >&5
2092   rm -fr conftest*
2093   case "$conftest_rc" in
2094   11) echo "You appear to be using the SunPro C compiler."; __SUNPRO_C=yes ;;
2095   12) echo "You appear to be using the DEC C compiler."   ; __DECC=yes ;;
2096 esac
2097 fi
2098 rm -fr conftest*
2099
2100
2101
2102
2103 echo "Extracting information from the machine- and system-dependent headers..."
2104
2105 tempcname="conftest.c"
2106
2107
2108
2109 cat > $tempcname <<EOF
2110 #define NOT_C_CODE
2111 #define C_SWITCH_SITE
2112 #define C_SWITCH_X_SITE
2113 #define LD_SWITCH_SITE
2114 #define LD_SWITCH_X_SITE
2115 #define LD_SWITCH_X_SITE_AUX
2116 #define OS_RELEASE $os_release
2117 #include "$srcdir/src/$opsysfile"
2118 #include "$srcdir/src/$machfile"
2119
2120 #ifndef LIBS_MACHINE
2121 #define LIBS_MACHINE
2122 #endif
2123 configure___ libs_machine=LIBS_MACHINE
2124
2125 #ifndef LIBS_SYSTEM
2126 #define LIBS_SYSTEM
2127 #endif
2128 configure___ libs_system=LIBS_SYSTEM
2129
2130 #ifndef LIBS_TERMCAP
2131 #define LIBS_TERMCAP
2132 #endif
2133 configure___ libs_termcap=LIBS_TERMCAP
2134
2135 #ifndef LIB_STANDARD
2136 #define LIB_STANDARD
2137 #endif
2138 configure___ libs_standard=LIB_STANDARD
2139
2140
2141 #ifndef OBJECTS_MACHINE
2142 #define OBJECTS_MACHINE
2143 #endif
2144 configure___ objects_machine=OBJECTS_MACHINE
2145
2146 #ifndef OBJECTS_SYSTEM
2147 #define OBJECTS_SYSTEM
2148 #endif
2149 configure___ objects_system=OBJECTS_SYSTEM
2150
2151
2152 #ifndef C_SWITCH_MACHINE
2153 #define C_SWITCH_MACHINE
2154 #endif
2155 configure___ c_switch_machine=C_SWITCH_MACHINE
2156
2157 #ifndef C_SWITCH_SYSTEM
2158 #define C_SWITCH_SYSTEM
2159 #endif
2160 configure___ c_switch_system=C_SWITCH_SYSTEM
2161
2162
2163 #ifndef LD_SWITCH_MACHINE
2164 #define LD_SWITCH_MACHINE
2165 #endif
2166 configure___ ld_switch_machine=LD_SWITCH_MACHINE
2167
2168 #ifndef LD_SWITCH_SYSTEM
2169 #define LD_SWITCH_SYSTEM
2170 #endif
2171 configure___ ld_switch_system=LD_SWITCH_SYSTEM
2172
2173
2174 #ifndef UNEXEC
2175 #define UNEXEC "unexec.o"
2176 #endif
2177 configure___ unexec=UNEXEC
2178
2179
2180 #ifndef LD_SWITCH_SHARED
2181 #define LD_SWITCH_SHARED "-c"
2182 #endif
2183 configure___ ld_switch_shared=LD_SWITCH_SHARED
2184
2185
2186 #ifdef ORDINARY_LINK
2187 #define LD "\$(CC) \$(CFLAGS)"
2188 #else /* no ORDINARY LINK */
2189 #ifdef COFF_ENCAPSULATE
2190 #define LD "\$(CC) -nostdlib"
2191 #else /* not COFF_ENCAPSULATE */
2192 #ifdef LINKER
2193 #define LD LINKER
2194 #else /* ! defined (LINKER) */
2195 #define LD "ld"
2196 #endif /* ! defined (LINKER) */
2197 #endif /* ! defined (COFF_ENCAPSULATE) */
2198 #endif /* not ORDINARY_LINK */
2199 configure___ ld=LD
2200
2201 #ifndef LIB_GCC
2202 #define LIB_GCC
2203 #endif
2204 configure___ lib_gcc=LIB_GCC
2205
2206 #ifndef LD_TEXT_START_ADDR
2207 #define LD_TEXT_START_ADDR
2208 #endif
2209 configure___ ld_text_start_addr=LD_TEXT_START_ADDR
2210
2211
2212 #if ! defined (ORDINARY_LINK) && !defined (START_FILES)
2213 #ifdef NO_REMAP
2214 #ifdef COFF_ENCAPSULATE
2215 #define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
2216 #else /* ! defined (COFF_ENCAPSULATE) */
2217 #define START_FILES "pre-crt0.o /lib/crt0.o"
2218 #endif /* ! defined (COFF_ENCAPSULATE) */
2219 #else /* ! defined (NO_REMAP) */
2220 #define START_FILES "ecrt0.o"
2221 #endif /* ! defined (NO_REMAP) */
2222 #endif /* no ORDINARY_LINK */
2223 #ifndef START_FILES
2224 #define START_FILES
2225 #endif
2226 configure___ start_files=START_FILES
2227
2228 #ifdef ORDINARY_LINK
2229 configure___ ordinary_link=yes
2230 #else
2231 configure___ ordinary_link=no
2232 #endif
2233
2234 #ifdef SYSTEM_MALLOC
2235 configure___ system_malloc=yes
2236 #else
2237 configure___ system_malloc=no
2238 #endif
2239
2240 #ifdef TERMINFO
2241 configure___ have_terminfo=yes
2242 #else
2243 configure___ have_terminfo=no
2244 #endif
2245
2246 #ifdef MAIL_USE_FLOCK
2247 configure___ mail_use_flock=yes
2248 #else
2249 configure___ mail_use_flock=no
2250 #endif
2251
2252 #ifdef MAIL_USE_LOCKF
2253 configure___ mail_use_lockf=yes
2254 #else
2255 configure___ mail_use_lockf=no
2256 #endif
2257
2258 EOF
2259
2260 CPP=`eval "echo $CPP $CPPFLAGS"`
2261 eval `$CPP -Isrc $tempcname \
2262         | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
2263
2264 rm $tempcname
2265
2266 test "$extra_verbose" = "yes" && \
2267   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 ""
2268
2269 test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
2270
2271 test "$__DECC" = "yes" && c_switch_site="$c_switch_site -std" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-std\" to \$c_switch_site"; fi
2272
2273 if test "$cflags_specified" = "no"; then
2274       if   test "$GCC" = "yes"; then
2275     CFLAGS="-g -O3 -Wall -Wno-switch"
2276                     test "$opsys $machine" = "cygwin32 intel386" && \
2277       CFLAGS="-g -O2 -Wall -Wno-switch"
2278   elif test "$__SUNPRO_C" = "yes"; then
2279     case "$opsys" in
2280       sol2    ) CFLAGS="-v -xO4" ;;
2281       sunos4* ) CFLAGS="-xO2";;
2282     esac
2283   elif test "$__DECC" = "yes"; then
2284     CFLAGS="-O3"
2285   elif test "$CC" = "xlc"; then
2286     CFLAGS="-g -O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
2287     else
2288     CFLAGS="-O" ;  fi
2289 fi
2290
2291
2292 if test "$GCC" = "yes"; then
2293   set x $ld_switch_system; shift; ld_switch_system=""
2294   while test -n "$1"; do
2295     case $1 in
2296       -L  | -l  | -u               ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
2297       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_system="$ld_switch_system $1" ;;
2298       -Xlinker* ) ;;
2299       * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
2300     esac
2301     shift
2302   done
2303 fi
2304
2305 if test "$GCC" = "yes"; then
2306   set x $ld_switch_machine; shift; ld_switch_machine=""
2307   while test -n "$1"; do
2308     case $1 in
2309       -L  | -l  | -u               ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
2310       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_machine="$ld_switch_machine $1" ;;
2311       -Xlinker* ) ;;
2312       * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
2313     esac
2314     shift
2315   done
2316 fi
2317
2318 if test "$GCC" = "yes"; then
2319   set x $LDFLAGS; shift; LDFLAGS=""
2320   while test -n "$1"; do
2321     case $1 in
2322       -L  | -l  | -u               ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
2323       -L* | -l* | -u* | -Wl* | -pg ) LDFLAGS="$LDFLAGS $1" ;;
2324       -Xlinker* ) ;;
2325       * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
2326     esac
2327     shift
2328   done
2329 fi
2330
2331 if test "$GCC" = "yes"; then
2332   set x $ld_call_shared; shift; ld_call_shared=""
2333   while test -n "$1"; do
2334     case $1 in
2335       -L  | -l  | -u               ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
2336       -L* | -l* | -u* | -Wl* | -pg ) ld_call_shared="$ld_call_shared $1" ;;
2337       -Xlinker* ) ;;
2338       * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
2339     esac
2340     shift
2341   done
2342 fi
2343
2344 test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
2345    echo "    xemacs will be linked with \"$objects_machine\""
2346  fi
2347 test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
2348    echo "    xemacs will be linked with \"$objects_system\""
2349  fi
2350 test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
2351    echo "    xemacs will be linked with \"$unexec\""
2352  fi
2353
2354 echo $ac_n "checking for dynodump""... $ac_c" 1>&6
2355 echo "configure:2356: checking for dynodump" >&5
2356 if test "$unexec" != "unexsol2.o"; then
2357   echo "$ac_t""no" 1>&6
2358 else
2359   echo "$ac_t""yes" 1>&6
2360   { test "$extra_verbose" = "yes" && cat << \EOF
2361     Defining DYNODUMP
2362 EOF
2363 cat >> confdefs.h <<\EOF
2364 #define DYNODUMP 1
2365 EOF
2366 }
2367
2368   MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
2369   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
2370   case "$machine" in
2371     sparc   ) dynodump_arch=sparc ;;
2372     *86*    ) dynodump_arch=i386  ;;
2373     powerpc ) dynodump_arch=ppc   ;;
2374   esac
2375     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
2376 fi
2377
2378
2379 test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
2380
2381 if test "$unexec" = "unexaix.o"; then
2382   if   test "$dynamic" = "no"; then
2383   start_flags="-Wl,-bnso,-bnodelcsect"
2384   test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
2385   for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
2386     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
2387   done
2388   for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
2389     if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
2390   done
2391   
2392 echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
2393 echo "configure:2394: checking for terminateAndUnload in -lC" >&5
2394 ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
2395
2396 xe_check_libs=" -lC "
2397 cat > conftest.$ac_ext <<EOF
2398 #line 2399 "configure"
2399 #include "confdefs.h"
2400 /* Override any gcc2 internal prototype to avoid an error.  */
2401 /* We use char because int might match the return type of a gcc2
2402     builtin and then its argument prototype would still apply.  */
2403 char terminateAndUnload();
2404
2405 int main() {
2406 terminateAndUnload()
2407 ; return 0; }
2408 EOF
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2410   rm -rf conftest*
2411   eval "ac_cv_lib_$ac_lib_var=yes"
2412 else
2413   echo "configure: failed program was:" >&5
2414   cat conftest.$ac_ext >&5
2415   rm -rf conftest*
2416   eval "ac_cv_lib_$ac_lib_var=no"
2417 fi
2418 rm -f conftest*
2419 xe_check_libs=""
2420
2421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
2422   echo "$ac_t""yes" 1>&6
2423   libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
2424 else
2425   echo "$ac_t""no" 1>&6
2426 fi
2427
2428
2429   fi
2430 elif test -n "$ld_text_start_addr"; then
2431   start_flags="-T $ld_text_start_addr -e __start"
2432 fi
2433
2434
2435
2436
2437 if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
2438  test -z "$linker" &&  linker='$(CC) -nostdlib'
2439  test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
2440 fi
2441 test "$GCC" != "yes" && lib_gcc=
2442
2443
2444
2445
2446
2447 case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2448 if test -n "$site_libraries"; then
2449   for arg in $site_libraries; do
2450     case "$arg" in
2451      -* ) ;;
2452      * ) test -d "$arg" || \
2453            { echo "Error:" "Invalid site library \`$arg': no such directory" >&2; exit 1; }
2454        arg="-L${arg}" ;;
2455     esac
2456     ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
2457   done
2458 fi
2459
2460 case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2461 if test -n "$site_includes"; then
2462   for arg in $site_includes; do
2463     case "$arg" in
2464       -* ) ;;
2465       * ) test -d "$arg" || \
2466            { echo "Error:" "Invalid site include \`$arg': no such directory" >&2; exit 1; }
2467       arg="-I${arg}" ;;
2468     esac
2469     c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
2470   done
2471 fi
2472
2473 case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2474 if test -n "$site_prefixes"; then
2475   for dir in $site_prefixes; do
2476     inc_dir="${dir}/include"
2477     lib_dir="${dir}/lib"
2478     if test ! -d "$dir"; then
2479       { echo "Error:" "Invalid site prefix \`$dir': no such directory" >&2; exit 1; }
2480     elif test ! -d "$inc_dir"; then
2481       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$inc_dir'" >&2; exit 1; }
2482     elif test ! -d "$lib_dir"; then
2483       { echo "Error:" "Invalid site prefix \`$dir': no such directory \`$lib_dir'" >&2; exit 1; }
2484     else
2485       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
2486       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
2487     fi
2488   done
2489 fi
2490
2491
2492 for dir in "/usr/ccs/lib"; do
2493   test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
2494 done
2495
2496 case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
2497 if test -n "$site_runtime_libraries"; then
2498   LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
2499   export LD_RUN_PATH
2500 fi
2501
2502
2503 if   test "$dynamic" = "no"; then add_runtime_path=no
2504 elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
2505 else case "$opsys" in
2506        sol2 | irix* | *bsd* | decosf* ) add_runtime_path=yes ;;
2507        * ) add_runtime_path=no ;;
2508      esac
2509 fi
2510
2511 if test "$add_runtime_path" = "yes"; then
2512       echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
2513 echo "configure:2514: checking "for runtime libraries flag"" >&5
2514   case "$opsys" in
2515     sol2 ) dash_r="-R" ;;
2516     decosf* | linux* ) dash_r="-rpath " ;;
2517     *)
2518       dash_r=""
2519       for try_dash_r in "-R" "-R " "-rpath "; do
2520         xe_check_libs="${try_dash_r}/no/such/file-or-directory"
2521         
2522 if test "$GCC" = "yes"; then
2523   set x $xe_check_libs; shift; xe_check_libs=""
2524   while test -n "$1"; do
2525     case $1 in
2526       -L  | -l  | -u               ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
2527       -L* | -l* | -u* | -Wl* | -pg ) xe_check_libs="$xe_check_libs $1" ;;
2528       -Xlinker* ) ;;
2529       * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
2530     esac
2531     shift
2532   done
2533 fi
2534         cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537
2538 int main() {
2539
2540 ; return 0; }
2541 EOF
2542 if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2543   rm -rf conftest*
2544   dash_r="$try_dash_r"
2545 else
2546   echo "configure: failed program was:" >&5
2547   cat conftest.$ac_ext >&5
2548 fi
2549 rm -f conftest*
2550         xe_check_libs=""
2551         test -n "$dash_r" && break
2552       done ;;
2553   esac
2554   if test -n "$dash_r";
2555     then echo "$ac_t"""\"${dash_r}\""" 1>&6
2556     else echo "$ac_t""NONE" 1>&6
2557   fi
2558 fi
2559
2560 xe_add_unique_runpath_dir='
2561   xe_add_p=yes
2562   for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
2563   done
2564   if test "$xe_add_p" = "yes"; then
2565     test -n "$runpath" && runpath="${runpath}:"
2566     runpath="${runpath}${xe_runpath_dir}"
2567     runpath_dirs="$runpath_dirs $xe_runpath_dir"
2568   fi'
2569
2570
2571
2572
2573 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
2574     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2575   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
2576   
2577         runpath="" runpath_dirs=""
2578   if test -n "$LD_RUN_PATH"; then
2579     runpath="$LD_RUN_PATH"
2580   elif test "$GCC" = "yes"; then
2581         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
2582     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
2583     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
2584     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
2585       case "$arg" in P,* | -L* | -R* )
2586         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
2587           {
2588 xe_runpath_dir="$dir"
2589   test "$xe_runpath_dir" != "/lib"     -a \
2590         "$xe_runpath_dir" != "/usr/lib" -a \
2591         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2592   eval "$xe_add_unique_runpath_dir"
2593 }
2594         done ;;
2595       esac
2596     done
2597     ld_switch_run="$ld_switch_run_save"
2598     rm -f conftest*
2599   else
2600         for arg in $ld_switch_site $ld_switch_x_site; do
2601       case "$arg" in -L*) {
2602 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
2603   test "$xe_runpath_dir" != "/lib"     -a \
2604         "$xe_runpath_dir" != "/usr/lib" -a \
2605         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
2606   eval "$xe_add_unique_runpath_dir"
2607 };; esac
2608     done
2609         if test "$opsys $need_motif" = "sol2 yes"; then
2610       xe_runpath_dir="/opt/SUNWdt/lib";
2611       eval "$xe_add_unique_runpath_dir";
2612     fi
2613   fi 
2614   if test -n "$runpath"; then
2615     ld_switch_run="${dash_r}${runpath}"
2616     
2617 if test "$GCC" = "yes"; then
2618   set x $ld_switch_run; shift; ld_switch_run=""
2619   while test -n "$1"; do
2620     case $1 in
2621       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
2622       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
2623       -Xlinker* ) ;;
2624       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
2625     esac
2626     shift
2627   done
2628 fi
2629     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
2630   fi
2631 fi
2632
2633
2634
2635 GNU_MALLOC=yes
2636 if test "$with_dlmalloc" != "no"; then
2637         doug_lea_malloc=yes
2638 else
2639         doug_lea_malloc=no
2640 fi
2641 after_morecore_hook_exists=yes
2642 echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
2643 echo "configure:2644: checking for malloc_get_state" >&5
2644
2645 cat > conftest.$ac_ext <<EOF
2646 #line 2647 "configure"
2647 #include "confdefs.h"
2648 /* System header to define __stub macros and hopefully few prototypes,
2649     which can conflict with char malloc_get_state(); below.  */
2650 #include <assert.h>
2651 /* Override any gcc2 internal prototype to avoid an error.  */
2652 /* We use char because int might match the return type of a gcc2
2653     builtin and then its argument prototype would still apply.  */
2654 char malloc_get_state();
2655
2656 int main() {
2657
2658 /* The GNU C library defines this for functions which it implements
2659     to always fail with ENOSYS.  Some functions are actually named
2660     something starting with __ and the normal name is an alias.  */
2661 #if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
2662 choke me
2663 #else
2664 malloc_get_state();
2665 #endif
2666
2667 ; return 0; }
2668 EOF
2669 if { (eval echo configure:2670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2670   rm -rf conftest*
2671   eval "ac_cv_func_malloc_get_state=yes"
2672 else
2673   echo "configure: failed program was:" >&5
2674   cat conftest.$ac_ext >&5
2675   rm -rf conftest*
2676   eval "ac_cv_func_malloc_get_state=no"
2677 fi
2678 rm -f conftest*
2679
2680 if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
2681   echo "$ac_t""yes" 1>&6
2682   :
2683 else
2684   echo "$ac_t""no" 1>&6
2685 doug_lea_malloc=no
2686 fi
2687
2688 echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
2689 echo "configure:2690: checking for malloc_set_state" >&5
2690
2691 cat > conftest.$ac_ext <<EOF
2692 #line 2693 "configure"
2693 #include "confdefs.h"
2694 /* System header to define __stub macros and hopefully few prototypes,
2695     which can conflict with char malloc_set_state(); below.  */
2696 #include <assert.h>
2697 /* Override any gcc2 internal prototype to avoid an error.  */
2698 /* We use char because int might match the return type of a gcc2
2699     builtin and then its argument prototype would still apply.  */
2700 char malloc_set_state();
2701
2702 int main() {
2703
2704 /* The GNU C library defines this for functions which it implements
2705     to always fail with ENOSYS.  Some functions are actually named
2706     something starting with __ and the normal name is an alias.  */
2707 #if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
2708 choke me
2709 #else
2710 malloc_set_state();
2711 #endif
2712
2713 ; return 0; }
2714 EOF
2715 if { (eval echo configure:2716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2716   rm -rf conftest*
2717   eval "ac_cv_func_malloc_set_state=yes"
2718 else
2719   echo "configure: failed program was:" >&5
2720   cat conftest.$ac_ext >&5
2721   rm -rf conftest*
2722   eval "ac_cv_func_malloc_set_state=no"
2723 fi
2724 rm -f conftest*
2725
2726 if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
2727   echo "$ac_t""yes" 1>&6
2728   :
2729 else
2730   echo "$ac_t""no" 1>&6
2731 doug_lea_malloc=no
2732 fi
2733
2734 echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
2735 echo "configure:2736: checking whether __after_morecore_hook exists" >&5
2736 cat > conftest.$ac_ext <<EOF
2737 #line 2738 "configure"
2738 #include "confdefs.h"
2739 extern void (* __after_morecore_hook)();
2740 int main() {
2741 __after_morecore_hook = 0
2742 ; return 0; }
2743 EOF
2744 if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2745   rm -rf conftest*
2746   echo "$ac_t""yes" 1>&6
2747 else
2748   echo "configure: failed program was:" >&5
2749   cat conftest.$ac_ext >&5
2750   rm -rf conftest*
2751   echo "$ac_t""no" 1>&6
2752    after_morecore_hook_exists=no
2753 fi
2754 rm -f conftest*
2755 if test "$system_malloc" = "yes" ; then
2756   GNU_MALLOC=no
2757   GNU_MALLOC_reason="
2758   (The GNU allocators don't work with this system configuration)."
2759 elif test "$with_system_malloc" = "yes" ; then
2760   GNU_MALLOC=no
2761   GNU_MALLOC_reason="
2762   (User chose not to use GNU allocators)."
2763 elif test "$with_debug_malloc" = "yes" ; then
2764   GNU_MALLOC=no
2765   GNU_MALLOC_reason="
2766   (User chose to use Debugging Malloc)."
2767 fi
2768
2769 if test "$doug_lea_malloc" = "yes" ; then
2770   if test "$GNU_MALLOC" = yes ; then
2771     GNU_MALLOC_reason="
2772   (Using Doug Lea's new malloc from the GNU C Library.)"
2773   fi
2774   { test "$extra_verbose" = "yes" && cat << \EOF
2775     Defining DOUG_LEA_MALLOC
2776 EOF
2777 cat >> confdefs.h <<\EOF
2778 #define DOUG_LEA_MALLOC 1
2779 EOF
2780 }
2781
2782   if test "$after_morecore_hook_exists" = "no" ; then
2783     GNU_MALLOC_reason="
2784   (Using Doug Lea's new malloc from the Linux C Library.)"
2785     { test "$extra_verbose" = "yes" && cat << \EOF
2786     Defining _NO_MALLOC_WARNING_
2787 EOF
2788 cat >> confdefs.h <<\EOF
2789 #define _NO_MALLOC_WARNING_ 1
2790 EOF
2791 }
2792
2793   fi
2794   use_minimal_tagbits=yes
2795 fi
2796
2797
2798
2799
2800 # Extract the first word of "ranlib", so it can be a program name with args.
2801 set dummy ranlib; ac_word=$2
2802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2803 echo "configure:2804: checking for $ac_word" >&5
2804
2805 if test -n "$RANLIB"; then
2806   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2807 else
2808   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2809   for ac_dir in $PATH; do
2810     test -z "$ac_dir" && ac_dir=.
2811     if test -f $ac_dir/$ac_word; then
2812       ac_cv_prog_RANLIB="ranlib"
2813       break
2814     fi
2815   done
2816   IFS="$ac_save_ifs"
2817   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2818 fi
2819 RANLIB="$ac_cv_prog_RANLIB"
2820 if test -n "$RANLIB"; then
2821   echo "$ac_t""$RANLIB" 1>&6
2822 else
2823   echo "$ac_t""no" 1>&6
2824 fi
2825
2826 ac_aux_dir=
2827 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
2828   if test -f $ac_dir/install-sh; then
2829     ac_aux_dir=$ac_dir
2830     ac_install_sh="$ac_aux_dir/install-sh -c"
2831     break
2832   elif test -f $ac_dir/install.sh; then
2833     ac_aux_dir=$ac_dir
2834     ac_install_sh="$ac_aux_dir/install.sh -c"
2835     break
2836   fi
2837 done
2838 if test -z "$ac_aux_dir"; then
2839   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
2840 fi
2841 ac_config_guess=$ac_aux_dir/config.guess
2842 ac_config_sub=$ac_aux_dir/config.sub
2843 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
2844
2845 # Find a good install program.  We prefer a C program (faster),
2846 # so one script is as good as another.  But avoid the broken or
2847 # incompatible versions:
2848 # SysV /etc/install, /usr/sbin/install
2849 # SunOS /usr/etc/install
2850 # IRIX /sbin/install
2851 # AIX /bin/install
2852 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2853 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2854 # ./install, which can be erroneously created by make from ./install.sh.
2855 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2856 echo "configure:2857: checking for a BSD compatible install" >&5
2857 if test -z "$INSTALL"; then
2858
2859   IFS="${IFS=   }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
2860   for ac_dir in $PATH; do
2861     # Account for people who put trailing slashes in PATH elements.
2862     case "$ac_dir/" in
2863     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2864     *)
2865       # OSF1 and SCO ODT 3.0 have their own names for install.
2866       for ac_prog in ginstall installbsd scoinst install; do
2867         if test -f $ac_dir/$ac_prog; then
2868           if test $ac_prog = install &&
2869             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2870             # AIX install.  It has an incompatible calling convention.
2871             # OSF/1 installbsd also uses dspmsg, but is usable.
2872             :
2873           else
2874             ac_cv_path_install="$ac_dir/$ac_prog -c"
2875             break 2
2876           fi
2877         fi
2878       done
2879       ;;
2880     esac
2881   done
2882   IFS="$ac_save_IFS"
2883
2884   if test "${ac_cv_path_install+set}" = set; then
2885     INSTALL="$ac_cv_path_install"
2886   else
2887     # As a last resort, use the slow shell script.  We don't cache a
2888     # path for INSTALL within a source directory, because that will
2889     # break other packages using the cache if that directory is
2890     # removed, or if the path is relative.
2891     INSTALL="$ac_install_sh"
2892   fi
2893 fi
2894 echo "$ac_t""$INSTALL" 1>&6
2895
2896 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2897 # It thinks the first close brace ends the variable substitution.
2898 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2899
2900 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2901
2902 for ac_prog in 'bison -y' byacc
2903 do
2904 # Extract the first word of "$ac_prog", so it can be a program name with args.
2905 set dummy $ac_prog; ac_word=$2
2906 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2907 echo "configure:2908: checking for $ac_word" >&5
2908
2909 if test -n "$YACC"; then
2910   ac_cv_prog_YACC="$YACC" # Let the user override the test.
2911 else
2912   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2913   for ac_dir in $PATH; do
2914     test -z "$ac_dir" && ac_dir=.
2915     if test -f $ac_dir/$ac_word; then
2916       ac_cv_prog_YACC="$ac_prog"
2917       break
2918     fi
2919   done
2920   IFS="$ac_save_ifs"
2921 fi
2922 YACC="$ac_cv_prog_YACC"
2923 if test -n "$YACC"; then
2924   echo "$ac_t""$YACC" 1>&6
2925 else
2926   echo "$ac_t""no" 1>&6
2927 fi
2928
2929 test -n "$YACC" && break
2930 done
2931 test -n "$YACC" || YACC="yacc"
2932
2933
2934 for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
2935 do
2936 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2937 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2938 echo "configure:2939: checking for $ac_hdr" >&5
2939
2940 cat > conftest.$ac_ext <<EOF
2941 #line 2942 "configure"
2942 #include "confdefs.h"
2943 #include <$ac_hdr>
2944 EOF
2945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2946 { (eval echo configure:2947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2947 ac_err=`grep -v '^ *+' conftest.out`
2948 if test -z "$ac_err"; then
2949   rm -rf conftest*
2950   eval "ac_cv_header_$ac_safe=yes"
2951 else
2952   echo "$ac_err" >&5
2953   echo "configure: failed program was:" >&5
2954   cat conftest.$ac_ext >&5
2955   rm -rf conftest*
2956   eval "ac_cv_header_$ac_safe=no"
2957 fi
2958 rm -f conftest*
2959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2960   echo "$ac_t""yes" 1>&6
2961     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2962   { test "$extra_verbose" = "yes" && cat << EOF
2963     Defining $ac_tr_hdr
2964 EOF
2965 cat >> confdefs.h <<EOF
2966 #define $ac_tr_hdr 1
2967 EOF
2968 }
2969  
2970 else
2971   echo "$ac_t""no" 1>&6
2972 fi
2973 done
2974
2975 for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h cygwin/version.h
2976 do
2977 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2978 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_hdr" >&5
2980
2981 cat > conftest.$ac_ext <<EOF
2982 #line 2983 "configure"
2983 #include "confdefs.h"
2984 #include <$ac_hdr>
2985 EOF
2986 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2987 { (eval echo configure:2988: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2988 ac_err=`grep -v '^ *+' conftest.out`
2989 if test -z "$ac_err"; then
2990   rm -rf conftest*
2991   eval "ac_cv_header_$ac_safe=yes"
2992 else
2993   echo "$ac_err" >&5
2994   echo "configure: failed program was:" >&5
2995   cat conftest.$ac_ext >&5
2996   rm -rf conftest*
2997   eval "ac_cv_header_$ac_safe=no"
2998 fi
2999 rm -f conftest*
3000 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3001   echo "$ac_t""yes" 1>&6
3002     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3003   { test "$extra_verbose" = "yes" && cat << EOF
3004     Defining $ac_tr_hdr
3005 EOF
3006 cat >> confdefs.h <<EOF
3007 #define $ac_tr_hdr 1
3008 EOF
3009 }
3010  
3011 else
3012   echo "$ac_t""no" 1>&6
3013 fi
3014 done
3015
3016 for ac_hdr in kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
3017 do
3018 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3019 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3020 echo "configure:3021: checking for $ac_hdr" >&5
3021
3022 cat > conftest.$ac_ext <<EOF
3023 #line 3024 "configure"
3024 #include "confdefs.h"
3025 #include <$ac_hdr>
3026 EOF
3027 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3028 { (eval echo configure:3029: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3029 ac_err=`grep -v '^ *+' conftest.out`
3030 if test -z "$ac_err"; then
3031   rm -rf conftest*
3032   eval "ac_cv_header_$ac_safe=yes"
3033 else
3034   echo "$ac_err" >&5
3035   echo "configure: failed program was:" >&5
3036   cat conftest.$ac_ext >&5
3037   rm -rf conftest*
3038   eval "ac_cv_header_$ac_safe=no"
3039 fi
3040 rm -f conftest*
3041 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3042   echo "$ac_t""yes" 1>&6
3043     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3044   { test "$extra_verbose" = "yes" && cat << EOF
3045     Defining $ac_tr_hdr
3046 EOF
3047 cat >> confdefs.h <<EOF
3048 #define $ac_tr_hdr 1
3049 EOF
3050 }
3051  
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055 done
3056
3057 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
3058 echo "configure:3059: checking for sys/wait.h that is POSIX.1 compatible" >&5
3059
3060 cat > conftest.$ac_ext <<EOF
3061 #line 3062 "configure"
3062 #include "confdefs.h"
3063 #include <sys/types.h>
3064 #include <sys/wait.h>
3065 #ifndef WEXITSTATUS
3066 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
3067 #endif
3068 #ifndef WIFEXITED
3069 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
3070 #endif
3071 int main() {
3072 int s;
3073 wait (&s);
3074 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
3075 ; return 0; }
3076 EOF
3077 if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3078   rm -rf conftest*
3079   ac_cv_header_sys_wait_h=yes
3080 else
3081   echo "configure: failed program was:" >&5
3082   cat conftest.$ac_ext >&5
3083   rm -rf conftest*
3084   ac_cv_header_sys_wait_h=no
3085 fi
3086 rm -f conftest*
3087
3088 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
3089 if test $ac_cv_header_sys_wait_h = yes; then
3090   { test "$extra_verbose" = "yes" && cat << \EOF
3091     Defining HAVE_SYS_WAIT_H
3092 EOF
3093 cat >> confdefs.h <<\EOF
3094 #define HAVE_SYS_WAIT_H 1
3095 EOF
3096 }
3097
3098 fi
3099
3100 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3101 echo "configure:3102: checking for ANSI C header files" >&5
3102
3103 cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3106 #include <stdlib.h>
3107 #include <stdarg.h>
3108 #include <string.h>
3109 #include <float.h>
3110 EOF
3111 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3112 { (eval echo configure:3113: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3113 ac_err=`grep -v '^ *+' conftest.out`
3114 if test -z "$ac_err"; then
3115   rm -rf conftest*
3116   ac_cv_header_stdc=yes
3117 else
3118   echo "$ac_err" >&5
3119   echo "configure: failed program was:" >&5
3120   cat conftest.$ac_ext >&5
3121   rm -rf conftest*
3122   ac_cv_header_stdc=no
3123 fi
3124 rm -f conftest*
3125
3126 if test $ac_cv_header_stdc = yes; then
3127   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3128 cat > conftest.$ac_ext <<EOF
3129 #line 3130 "configure"
3130 #include "confdefs.h"
3131 #include <string.h>
3132 EOF
3133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3134   egrep "memchr" >/dev/null 2>&1; then
3135   :
3136 else
3137   rm -rf conftest*
3138   ac_cv_header_stdc=no
3139 fi
3140 rm -f conftest*
3141
3142 fi
3143
3144 if test $ac_cv_header_stdc = yes; then
3145   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3146 cat > conftest.$ac_ext <<EOF
3147 #line 3148 "configure"
3148 #include "confdefs.h"
3149 #include <stdlib.h>
3150 EOF
3151 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3152   egrep "free" >/dev/null 2>&1; then
3153   :
3154 else
3155   rm -rf conftest*
3156   ac_cv_header_stdc=no
3157 fi
3158 rm -f conftest*
3159
3160 fi
3161
3162 if test $ac_cv_header_stdc = yes; then
3163   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3164 cat > conftest.$ac_ext <<EOF
3165 #line 3166 "configure"
3166 #include "confdefs.h"
3167 #include <ctype.h>
3168 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3169 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3170 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3171 int main () { int i; for (i = 0; i < 256; i++)
3172 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3173 exit (0); }
3174
3175 EOF
3176 if { (eval echo configure:3177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3177 then
3178   :
3179 else
3180   conftest_rc="$?"
3181   echo "configure: failed program was:" >&5
3182   cat conftest.$ac_ext >&5
3183   rm -fr conftest*
3184   ac_cv_header_stdc=no
3185 fi
3186 rm -fr conftest*
3187 fi
3188
3189 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3190 if test $ac_cv_header_stdc = yes; then
3191   { test "$extra_verbose" = "yes" && cat << \EOF
3192     Defining STDC_HEADERS
3193 EOF
3194 cat >> confdefs.h <<\EOF
3195 #define STDC_HEADERS 1
3196 EOF
3197 }
3198
3199 fi
3200
3201 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3202 echo "configure:3203: checking whether time.h and sys/time.h may both be included" >&5
3203
3204 cat > conftest.$ac_ext <<EOF
3205 #line 3206 "configure"
3206 #include "confdefs.h"
3207 #include <sys/types.h>
3208 #include <sys/time.h>
3209 #include <time.h>
3210 int main() {
3211 struct tm *tp;
3212 ; return 0; }
3213 EOF
3214 if { (eval echo configure:3215: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3215   rm -rf conftest*
3216   ac_cv_header_time=yes
3217 else
3218   echo "configure: failed program was:" >&5
3219   cat conftest.$ac_ext >&5
3220   rm -rf conftest*
3221   ac_cv_header_time=no
3222 fi
3223 rm -f conftest*
3224
3225 echo "$ac_t""$ac_cv_header_time" 1>&6
3226 if test $ac_cv_header_time = yes; then
3227   { test "$extra_verbose" = "yes" && cat << \EOF
3228     Defining TIME_WITH_SYS_TIME
3229 EOF
3230 cat >> confdefs.h <<\EOF
3231 #define TIME_WITH_SYS_TIME 1
3232 EOF
3233 }
3234
3235 fi
3236
3237 echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
3238 echo "configure:3239: checking for sys_siglist declaration in signal.h or unistd.h" >&5
3239
3240 cat > conftest.$ac_ext <<EOF
3241 #line 3242 "configure"
3242 #include "confdefs.h"
3243 #include <sys/types.h>
3244 #include <signal.h>
3245 /* NetBSD declares sys_siglist in unistd.h.  */
3246 #ifdef HAVE_UNISTD_H
3247 #include <unistd.h>
3248 #endif
3249 int main() {
3250 char *msg = *(sys_siglist + 1);
3251 ; return 0; }
3252 EOF
3253 if { (eval echo configure:3254: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3254   rm -rf conftest*
3255   ac_cv_decl_sys_siglist=yes
3256 else
3257   echo "configure: failed program was:" >&5
3258   cat conftest.$ac_ext >&5
3259   rm -rf conftest*
3260   ac_cv_decl_sys_siglist=no
3261 fi
3262 rm -f conftest*
3263
3264 echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
3265 if test $ac_cv_decl_sys_siglist = yes; then
3266   { test "$extra_verbose" = "yes" && cat << \EOF
3267     Defining SYS_SIGLIST_DECLARED
3268 EOF
3269 cat >> confdefs.h <<\EOF
3270 #define SYS_SIGLIST_DECLARED 1
3271 EOF
3272 }
3273
3274 fi
3275
3276
3277 echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
3278 echo "configure:3279: checking for struct utimbuf" >&5
3279 cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #ifdef TIME_WITH_SYS_TIME
3283 #include <sys/time.h>
3284 #include <time.h>
3285 #else
3286 #ifdef HAVE_SYS_TIME_H
3287 #include <sys/time.h>
3288 #else
3289 #include <time.h>
3290 #endif
3291 #endif
3292 #ifdef HAVE_UTIME_H
3293 #include <utime.h>
3294 #endif
3295 int main() {
3296 static struct utimbuf x; x.actime = x.modtime;
3297 ; return 0; }
3298 EOF
3299 if { (eval echo configure:3300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3300   rm -rf conftest*
3301   echo "$ac_t""yes" 1>&6
3302    { test "$extra_verbose" = "yes" && cat << \EOF
3303     Defining HAVE_STRUCT_UTIMBUF
3304 EOF
3305 cat >> confdefs.h <<\EOF
3306 #define HAVE_STRUCT_UTIMBUF 1
3307 EOF
3308 }
3309
3310 else
3311   echo "configure: failed program was:" >&5
3312   cat conftest.$ac_ext >&5
3313   rm -rf conftest*
3314   echo "$ac_t""no" 1>&6
3315 fi
3316 rm -f conftest*
3317
3318 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3319 echo "configure:3320: checking return type of signal handlers" >&5
3320
3321 cat > conftest.$ac_ext <<EOF
3322 #line 3323 "configure"
3323 #include "confdefs.h"
3324 #include <sys/types.h>
3325 #include <signal.h>
3326 #ifdef signal
3327 #undef signal
3328 #endif
3329 #ifdef __cplusplus
3330 extern "C" void (*signal (int, void (*)(int)))(int);
3331 #else
3332 void (*signal ()) ();
3333 #endif
3334
3335 int main() {
3336 int i;
3337 ; return 0; }
3338 EOF
3339 if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3340   rm -rf conftest*
3341   ac_cv_type_signal=void
3342 else
3343   echo "configure: failed program was:" >&5
3344   cat conftest.$ac_ext >&5
3345   rm -rf conftest*
3346   ac_cv_type_signal=int
3347 fi
3348 rm -f conftest*
3349
3350 echo "$ac_t""$ac_cv_type_signal" 1>&6
3351 { test "$extra_verbose" = "yes" && cat << EOF
3352     Defining RETSIGTYPE = $ac_cv_type_signal
3353 EOF
3354 cat >> confdefs.h <<EOF
3355 #define RETSIGTYPE $ac_cv_type_signal
3356 EOF
3357 }
3358
3359
3360 echo $ac_n "checking for size_t""... $ac_c" 1>&6
3361 echo "configure:3362: checking for size_t" >&5
3362
3363 cat > conftest.$ac_ext <<EOF
3364 #line 3365 "configure"
3365 #include "confdefs.h"
3366 #include <sys/types.h>
3367 #if STDC_HEADERS
3368 #include <stdlib.h>
3369 #include <stddef.h>
3370 #endif
3371 EOF
3372 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3373   egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3374   rm -rf conftest*
3375   ac_cv_type_size_t=yes
3376 else
3377   rm -rf conftest*
3378   ac_cv_type_size_t=no
3379 fi
3380 rm -f conftest*
3381
3382 echo "$ac_t""$ac_cv_type_size_t" 1>&6
3383 if test $ac_cv_type_size_t = no; then
3384   { test "$extra_verbose" = "yes" && cat << \EOF
3385     Defining size_t = unsigned
3386 EOF
3387 cat >> confdefs.h <<\EOF
3388 #define size_t unsigned
3389 EOF
3390 }
3391
3392 fi
3393
3394 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
3395 echo "configure:3396: checking for pid_t" >&5
3396
3397 cat > conftest.$ac_ext <<EOF
3398 #line 3399 "configure"
3399 #include "confdefs.h"
3400 #include <sys/types.h>
3401 #if STDC_HEADERS
3402 #include <stdlib.h>
3403 #include <stddef.h>
3404 #endif
3405 EOF
3406 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3407   egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3408   rm -rf conftest*
3409   ac_cv_type_pid_t=yes
3410 else
3411   rm -rf conftest*
3412   ac_cv_type_pid_t=no
3413 fi
3414 rm -f conftest*
3415
3416 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
3417 if test $ac_cv_type_pid_t = no; then
3418   { test "$extra_verbose" = "yes" && cat << \EOF
3419     Defining pid_t = int
3420 EOF
3421 cat >> confdefs.h <<\EOF
3422 #define pid_t int
3423 EOF
3424 }
3425
3426 fi
3427
3428 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
3429 echo "configure:3430: checking for uid_t in sys/types.h" >&5
3430
3431 cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 #include <sys/types.h>
3435 EOF
3436 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3437   egrep "uid_t" >/dev/null 2>&1; then
3438   rm -rf conftest*
3439   ac_cv_type_uid_t=yes
3440 else
3441   rm -rf conftest*
3442   ac_cv_type_uid_t=no
3443 fi
3444 rm -f conftest*
3445
3446
3447 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
3448 if test $ac_cv_type_uid_t = no; then
3449   { test "$extra_verbose" = "yes" && cat << \EOF
3450     Defining uid_t = int
3451 EOF
3452 cat >> confdefs.h <<\EOF
3453 #define uid_t int
3454 EOF
3455 }
3456
3457   { test "$extra_verbose" = "yes" && cat << \EOF
3458     Defining gid_t = int
3459 EOF
3460 cat >> confdefs.h <<\EOF
3461 #define gid_t int
3462 EOF
3463 }
3464
3465 fi
3466
3467 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
3468 echo "configure:3469: checking for mode_t" >&5
3469
3470 cat > conftest.$ac_ext <<EOF
3471 #line 3472 "configure"
3472 #include "confdefs.h"
3473 #include <sys/types.h>
3474 #if STDC_HEADERS
3475 #include <stdlib.h>
3476 #include <stddef.h>
3477 #endif
3478 EOF
3479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3480   egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3481   rm -rf conftest*
3482   ac_cv_type_mode_t=yes
3483 else
3484   rm -rf conftest*
3485   ac_cv_type_mode_t=no
3486 fi
3487 rm -f conftest*
3488
3489 echo "$ac_t""$ac_cv_type_mode_t" 1>&6
3490 if test $ac_cv_type_mode_t = no; then
3491   { test "$extra_verbose" = "yes" && cat << \EOF
3492     Defining mode_t = int
3493 EOF
3494 cat >> confdefs.h <<\EOF
3495 #define mode_t int
3496 EOF
3497 }
3498
3499 fi
3500
3501 echo $ac_n "checking for off_t""... $ac_c" 1>&6
3502 echo "configure:3503: checking for off_t" >&5
3503
3504 cat > conftest.$ac_ext <<EOF
3505 #line 3506 "configure"
3506 #include "confdefs.h"
3507 #include <sys/types.h>
3508 #if STDC_HEADERS
3509 #include <stdlib.h>
3510 #include <stddef.h>
3511 #endif
3512 EOF
3513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3514   egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
3515   rm -rf conftest*
3516   ac_cv_type_off_t=yes
3517 else
3518   rm -rf conftest*
3519   ac_cv_type_off_t=no
3520 fi
3521 rm -f conftest*
3522
3523 echo "$ac_t""$ac_cv_type_off_t" 1>&6
3524 if test $ac_cv_type_off_t = no; then
3525   { test "$extra_verbose" = "yes" && cat << \EOF
3526     Defining off_t = long
3527 EOF
3528 cat >> confdefs.h <<\EOF
3529 #define off_t long
3530 EOF
3531 }
3532
3533 fi
3534
3535
3536 echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
3537 echo "configure:3538: checking for struct timeval" >&5
3538 cat > conftest.$ac_ext <<EOF
3539 #line 3540 "configure"
3540 #include "confdefs.h"
3541 #ifdef TIME_WITH_SYS_TIME
3542 #include <sys/time.h>
3543 #include <time.h>
3544 #else
3545 #ifdef HAVE_SYS_TIME_H
3546 #include <sys/time.h>
3547 #else
3548 #include <time.h>
3549 #endif
3550 #endif
3551 int main() {
3552 static struct timeval x; x.tv_sec = x.tv_usec;
3553 ; return 0; }
3554 EOF
3555 if { (eval echo configure:3556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3556   rm -rf conftest*
3557   echo "$ac_t""yes" 1>&6
3558   HAVE_TIMEVAL=yes
3559   { test "$extra_verbose" = "yes" && cat << \EOF
3560     Defining HAVE_TIMEVAL
3561 EOF
3562 cat >> confdefs.h <<\EOF
3563 #define HAVE_TIMEVAL 1
3564 EOF
3565 }
3566
3567 else
3568   echo "configure: failed program was:" >&5
3569   cat conftest.$ac_ext >&5
3570   rm -rf conftest*
3571   echo "$ac_t""no" 1>&6
3572    HAVE_TIMEVAL=no
3573 fi
3574 rm -f conftest*
3575
3576 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
3577 echo "configure:3578: checking whether struct tm is in sys/time.h or time.h" >&5
3578
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3582 #include <sys/types.h>
3583 #include <time.h>
3584 int main() {
3585 struct tm *tp; tp->tm_sec;
3586 ; return 0; }
3587 EOF
3588 if { (eval echo configure:3589: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3589   rm -rf conftest*
3590   ac_cv_struct_tm=time.h
3591 else
3592   echo "configure: failed program was:" >&5
3593   cat conftest.$ac_ext >&5
3594   rm -rf conftest*
3595   ac_cv_struct_tm=sys/time.h
3596 fi
3597 rm -f conftest*
3598
3599 echo "$ac_t""$ac_cv_struct_tm" 1>&6
3600 if test $ac_cv_struct_tm = sys/time.h; then
3601   { test "$extra_verbose" = "yes" && cat << \EOF
3602     Defining TM_IN_SYS_TIME
3603 EOF
3604 cat >> confdefs.h <<\EOF
3605 #define TM_IN_SYS_TIME 1
3606 EOF
3607 }
3608
3609 fi
3610
3611 echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
3612 echo "configure:3613: checking for tm_zone in struct tm" >&5
3613
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <sys/types.h>
3618 #include <$ac_cv_struct_tm>
3619 int main() {
3620 struct tm tm; tm.tm_zone;
3621 ; return 0; }
3622 EOF
3623 if { (eval echo configure:3624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3624   rm -rf conftest*
3625   ac_cv_struct_tm_zone=yes
3626 else
3627   echo "configure: failed program was:" >&5
3628   cat conftest.$ac_ext >&5
3629   rm -rf conftest*
3630   ac_cv_struct_tm_zone=no
3631 fi
3632 rm -f conftest*
3633
3634 echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
3635 if test "$ac_cv_struct_tm_zone" = yes; then
3636   { test "$extra_verbose" = "yes" && cat << \EOF
3637     Defining HAVE_TM_ZONE
3638 EOF
3639 cat >> confdefs.h <<\EOF
3640 #define HAVE_TM_ZONE 1
3641 EOF
3642 }
3643
3644 else
3645   echo $ac_n "checking for tzname""... $ac_c" 1>&6
3646 echo "configure:3647: checking for tzname" >&5
3647
3648 cat > conftest.$ac_ext <<EOF
3649 #line 3650 "configure"
3650 #include "confdefs.h"
3651 #include <time.h>
3652 #ifndef tzname /* For SGI.  */
3653 extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
3654 #endif
3655 int main() {
3656 atoi(*tzname);
3657 ; return 0; }
3658 EOF
3659 if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3660   rm -rf conftest*
3661   ac_cv_var_tzname=yes
3662 else
3663   echo "configure: failed program was:" >&5
3664   cat conftest.$ac_ext >&5
3665   rm -rf conftest*
3666   ac_cv_var_tzname=no
3667 fi
3668 rm -f conftest*
3669
3670 echo "$ac_t""$ac_cv_var_tzname" 1>&6
3671   if test $ac_cv_var_tzname = yes; then
3672     { test "$extra_verbose" = "yes" && cat << \EOF
3673     Defining HAVE_TZNAME
3674 EOF
3675 cat >> confdefs.h <<\EOF
3676 #define HAVE_TZNAME 1
3677 EOF
3678 }
3679
3680   fi
3681 fi
3682
3683
3684 echo $ac_n "checking for working const""... $ac_c" 1>&6
3685 echo "configure:3686: checking for working const" >&5
3686
3687 cat > conftest.$ac_ext <<EOF
3688 #line 3689 "configure"
3689 #include "confdefs.h"
3690
3691 int main() {
3692
3693 /* Ultrix mips cc rejects this.  */
3694 typedef int charset[2]; const charset x;
3695 /* SunOS 4.1.1 cc rejects this.  */
3696 char const *const *ccp;
3697 char **p;
3698 /* NEC SVR4.0.2 mips cc rejects this.  */
3699 struct point {int x, y;};
3700 static struct point const zero = {0,0};
3701 /* AIX XL C 1.02.0.0 rejects this.
3702    It does not let you subtract one const X* pointer from another in an arm
3703    of an if-expression whose if-part is not a constant expression */
3704 const char *g = "string";
3705 ccp = &g + (g ? g-g : 0);
3706 /* HPUX 7.0 cc rejects these. */
3707 ++ccp;
3708 p = (char**) ccp;
3709 ccp = (char const *const *) p;
3710 { /* SCO 3.2v4 cc rejects this.  */
3711   char *t;
3712   char const *s = 0 ? (char *) 0 : (char const *) 0;
3713
3714   *t++ = 0;
3715 }
3716 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
3717   int x[] = {25, 17};
3718   const int *foo = &x[0];
3719   ++foo;
3720 }
3721 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3722   typedef const int *iptr;
3723   iptr p = 0;
3724   ++p;
3725 }
3726 { /* AIX XL C 1.02.0.0 rejects this saying
3727      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3728   struct s { int j; const int *ap[3]; };
3729   struct s *b; b->j = 5;
3730 }
3731 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3732   const int foo = 10;
3733 }
3734
3735 ; return 0; }
3736 EOF
3737 if { (eval echo configure:3738: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3738   rm -rf conftest*
3739   ac_cv_c_const=yes
3740 else
3741   echo "configure: failed program was:" >&5
3742   cat conftest.$ac_ext >&5
3743   rm -rf conftest*
3744   ac_cv_c_const=no
3745 fi
3746 rm -f conftest*
3747
3748 echo "$ac_t""$ac_cv_c_const" 1>&6
3749 if test $ac_cv_c_const = no; then
3750   { test "$extra_verbose" = "yes" && cat << \EOF
3751     Defining const = 
3752 EOF
3753 cat >> confdefs.h <<\EOF
3754 #define const 
3755 EOF
3756 }
3757
3758 fi
3759
3760
3761 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
3762 echo "configure:3763: checking whether ${MAKE-make} sets \${MAKE}" >&5
3763 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
3764
3765 cat > conftestmake <<\EOF
3766 all:
3767         @echo 'ac_maketemp="${MAKE}"'
3768 EOF
3769 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3770 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
3771 if test -n "$ac_maketemp"; then
3772   eval ac_cv_prog_make_${ac_make}_set=yes
3773 else
3774   eval ac_cv_prog_make_${ac_make}_set=no
3775 fi
3776 rm -f conftestmake
3777 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3778   echo "$ac_t""yes" 1>&6
3779   SET_MAKE=
3780 else
3781   echo "$ac_t""no" 1>&6
3782   SET_MAKE="MAKE=${MAKE-make}"
3783 fi
3784
3785
3786 echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
3787 echo "configure:3788: checking whether byte ordering is bigendian" >&5
3788
3789 ac_cv_c_bigendian=unknown
3790 # See if sys/param.h defines the BYTE_ORDER macro.
3791 cat > conftest.$ac_ext <<EOF
3792 #line 3793 "configure"
3793 #include "confdefs.h"
3794 #include <sys/types.h>
3795 #include <sys/param.h>
3796 int main() {
3797
3798 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
3799  bogus endian macros
3800 #endif
3801 ; return 0; }
3802 EOF
3803 if { (eval echo configure:3804: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3804   rm -rf conftest*
3805   # It does; now see whether it defined to BIG_ENDIAN or not.
3806 cat > conftest.$ac_ext <<EOF
3807 #line 3808 "configure"
3808 #include "confdefs.h"
3809 #include <sys/types.h>
3810 #include <sys/param.h>
3811 int main() {
3812
3813 #if BYTE_ORDER != BIG_ENDIAN
3814  not big endian
3815 #endif
3816 ; return 0; }
3817 EOF
3818 if { (eval echo configure:3819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3819   rm -rf conftest*
3820   ac_cv_c_bigendian=yes
3821 else
3822   echo "configure: failed program was:" >&5
3823   cat conftest.$ac_ext >&5
3824   rm -rf conftest*
3825   ac_cv_c_bigendian=no
3826 fi
3827 rm -f conftest*
3828 else
3829   echo "configure: failed program was:" >&5
3830   cat conftest.$ac_ext >&5
3831 fi
3832 rm -f conftest*
3833 if test $ac_cv_c_bigendian = unknown; then
3834 cat > conftest.$ac_ext <<EOF
3835 #line 3836 "configure"
3836 #include "confdefs.h"
3837 main () {
3838   /* Are we little or big endian?  From Harbison&Steele.  */
3839   union
3840   {
3841     long l;
3842     char c[sizeof (long)];
3843   } u;
3844   u.l = 1;
3845   exit (u.c[sizeof (long) - 1] == 1);
3846 }
3847 EOF
3848 if { (eval echo configure:3849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3849 then
3850   ac_cv_c_bigendian=no
3851 else
3852   conftest_rc="$?"
3853   echo "configure: failed program was:" >&5
3854   cat conftest.$ac_ext >&5
3855   rm -fr conftest*
3856   ac_cv_c_bigendian=yes
3857 fi
3858 rm -fr conftest*
3859 fi
3860
3861 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
3862 if test $ac_cv_c_bigendian = yes; then
3863   { test "$extra_verbose" = "yes" && cat << \EOF
3864     Defining WORDS_BIGENDIAN
3865 EOF
3866 cat >> confdefs.h <<\EOF
3867 #define WORDS_BIGENDIAN 1
3868 EOF
3869 }
3870
3871 fi
3872
3873
3874 echo $ac_n "checking size of short""... $ac_c" 1>&6
3875 echo "configure:3876: checking size of short" >&5
3876
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3880 #include <stdio.h>
3881 main()
3882 {
3883   FILE *f=fopen("conftestval", "w");
3884   if (!f) exit(1);
3885   fprintf(f, "%d\n", sizeof(short));
3886   exit(0);
3887 }
3888 EOF
3889 if { (eval echo configure:3890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3890 then
3891   ac_cv_sizeof_short=`cat conftestval`
3892 else
3893   conftest_rc="$?"
3894   echo "configure: failed program was:" >&5
3895   cat conftest.$ac_ext >&5
3896   rm -fr conftest*
3897   ac_cv_sizeof_short=0
3898 fi
3899 rm -fr conftest*
3900 echo "$ac_t""$ac_cv_sizeof_short" 1>&6
3901 { test "$extra_verbose" = "yes" && cat << EOF
3902     Defining SIZEOF_SHORT = $ac_cv_sizeof_short
3903 EOF
3904 cat >> confdefs.h <<EOF
3905 #define SIZEOF_SHORT $ac_cv_sizeof_short
3906 EOF
3907 }
3908
3909
3910 if test "$ac_cv_sizeof_short" = 0; then
3911   echo ""
3912   echo "*** PANIC *** Configure tests are not working - compiler is broken."
3913   echo "*** PANIC *** Please examine config.log for compilation errors."
3914   exit 1
3915 fi
3916 echo $ac_n "checking size of int""... $ac_c" 1>&6
3917 echo "configure:3918: checking size of int" >&5
3918
3919 cat > conftest.$ac_ext <<EOF
3920 #line 3921 "configure"
3921 #include "confdefs.h"
3922 #include <stdio.h>
3923 main()
3924 {
3925   FILE *f=fopen("conftestval", "w");
3926   if (!f) exit(1);
3927   fprintf(f, "%d\n", sizeof(int));
3928   exit(0);
3929 }
3930 EOF
3931 if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3932 then
3933   ac_cv_sizeof_int=`cat conftestval`
3934 else
3935   conftest_rc="$?"
3936   echo "configure: failed program was:" >&5
3937   cat conftest.$ac_ext >&5
3938   rm -fr conftest*
3939   ac_cv_sizeof_int=0
3940 fi
3941 rm -fr conftest*
3942 echo "$ac_t""$ac_cv_sizeof_int" 1>&6
3943 { test "$extra_verbose" = "yes" && cat << EOF
3944     Defining SIZEOF_INT = $ac_cv_sizeof_int
3945 EOF
3946 cat >> confdefs.h <<EOF
3947 #define SIZEOF_INT $ac_cv_sizeof_int
3948 EOF
3949 }
3950
3951
3952 echo $ac_n "checking size of long""... $ac_c" 1>&6
3953 echo "configure:3954: checking size of long" >&5
3954
3955 cat > conftest.$ac_ext <<EOF
3956 #line 3957 "configure"
3957 #include "confdefs.h"
3958 #include <stdio.h>
3959 main()
3960 {
3961   FILE *f=fopen("conftestval", "w");
3962   if (!f) exit(1);
3963   fprintf(f, "%d\n", sizeof(long));
3964   exit(0);
3965 }
3966 EOF
3967 if { (eval echo configure:3968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
3968 then
3969   ac_cv_sizeof_long=`cat conftestval`
3970 else
3971   conftest_rc="$?"
3972   echo "configure: failed program was:" >&5
3973   cat conftest.$ac_ext >&5
3974   rm -fr conftest*
3975   ac_cv_sizeof_long=0
3976 fi
3977 rm -fr conftest*
3978 echo "$ac_t""$ac_cv_sizeof_long" 1>&6
3979 { test "$extra_verbose" = "yes" && cat << EOF
3980     Defining SIZEOF_LONG = $ac_cv_sizeof_long
3981 EOF
3982 cat >> confdefs.h <<EOF
3983 #define SIZEOF_LONG $ac_cv_sizeof_long
3984 EOF
3985 }
3986
3987
3988 echo $ac_n "checking size of long long""... $ac_c" 1>&6
3989 echo "configure:3990: checking size of long long" >&5
3990
3991 cat > conftest.$ac_ext <<EOF
3992 #line 3993 "configure"
3993 #include "confdefs.h"
3994 #include <stdio.h>
3995 main()
3996 {
3997   FILE *f=fopen("conftestval", "w");
3998   if (!f) exit(1);
3999   fprintf(f, "%d\n", sizeof(long long));
4000   exit(0);
4001 }
4002 EOF
4003 if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4004 then
4005   ac_cv_sizeof_long_long=`cat conftestval`
4006 else
4007   conftest_rc="$?"
4008   echo "configure: failed program was:" >&5
4009   cat conftest.$ac_ext >&5
4010   rm -fr conftest*
4011   ac_cv_sizeof_long_long=0
4012 fi
4013 rm -fr conftest*
4014 echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
4015 { test "$extra_verbose" = "yes" && cat << EOF
4016     Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
4017 EOF
4018 cat >> confdefs.h <<EOF
4019 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
4020 EOF
4021 }
4022
4023
4024 echo $ac_n "checking size of void *""... $ac_c" 1>&6
4025 echo "configure:4026: checking size of void *" >&5
4026
4027 cat > conftest.$ac_ext <<EOF
4028 #line 4029 "configure"
4029 #include "confdefs.h"
4030 #include <stdio.h>
4031 main()
4032 {
4033   FILE *f=fopen("conftestval", "w");
4034   if (!f) exit(1);
4035   fprintf(f, "%d\n", sizeof(void *));
4036   exit(0);
4037 }
4038 EOF
4039 if { (eval echo configure:4040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
4040 then
4041   ac_cv_sizeof_void_p=`cat conftestval`
4042 else
4043   conftest_rc="$?"
4044   echo "configure: failed program was:" >&5
4045   cat conftest.$ac_ext >&5
4046   rm -fr conftest*
4047   ac_cv_sizeof_void_p=0
4048 fi
4049 rm -fr conftest*
4050 echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
4051 { test "$extra_verbose" = "yes" && cat << EOF
4052     Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
4053 EOF
4054 cat >> confdefs.h <<EOF
4055 #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4056 EOF
4057 }
4058
4059
4060
4061 echo $ac_n "checking for long file names""... $ac_c" 1>&6
4062 echo "configure:4063: checking for long file names" >&5
4063
4064 ac_cv_sys_long_file_names=yes
4065 # Test for long file names in all the places we know might matter:
4066 #      .                the current directory, where building will happen
4067 #      $prefix/lib      where we will be installing things
4068 #      $exec_prefix/lib likewise
4069 # eval it to expand exec_prefix.
4070 #      $TMPDIR          if set, where it might want to write temporary files
4071 # if $TMPDIR is not set:
4072 #      /tmp             where it might want to write temporary files
4073 #      /var/tmp         likewise
4074 #      /usr/tmp         likewise
4075 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4076   ac_tmpdirs="$TMPDIR"
4077 else
4078   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4079 fi
4080 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
4081   test -d $ac_dir || continue
4082   test -w $ac_dir || continue # It is less confusing to not echo anything here.
4083   (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
4084   (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
4085   val=`cat $ac_dir/conftest9012345 2>/dev/null`
4086   if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
4087     ac_cv_sys_long_file_names=no
4088     rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4089     break
4090   fi
4091   rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
4092 done
4093
4094 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
4095 if test $ac_cv_sys_long_file_names = yes; then
4096   { test "$extra_verbose" = "yes" && cat << \EOF
4097     Defining HAVE_LONG_FILE_NAMES
4098 EOF
4099 cat >> confdefs.h <<\EOF
4100 #define HAVE_LONG_FILE_NAMES 1
4101 EOF
4102 }
4103
4104 fi
4105
4106
4107
4108 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
4109 echo "configure:4110: checking for sin in -lm" >&5
4110 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
4111
4112 xe_check_libs=" -lm "
4113 cat > conftest.$ac_ext <<EOF
4114 #line 4115 "configure"
4115 #include "confdefs.h"
4116 /* Override any gcc2 internal prototype to avoid an error.  */
4117 /* We use char because int might match the return type of a gcc2
4118     builtin and then its argument prototype would still apply.  */
4119 char sin();
4120
4121 int main() {
4122 sin()
4123 ; return 0; }
4124 EOF
4125 if { (eval echo configure:4126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4126   rm -rf conftest*
4127   eval "ac_cv_lib_$ac_lib_var=yes"
4128 else
4129   echo "configure: failed program was:" >&5
4130   cat conftest.$ac_ext >&5
4131   rm -rf conftest*
4132   eval "ac_cv_lib_$ac_lib_var=no"
4133 fi
4134 rm -f conftest*
4135 xe_check_libs=""
4136
4137 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4138   echo "$ac_t""yes" 1>&6
4139     ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4140     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4141   { test "$extra_verbose" = "yes" && cat << EOF
4142     Defining $ac_tr_lib
4143 EOF
4144 cat >> confdefs.h <<EOF
4145 #define $ac_tr_lib 1
4146 EOF
4147 }
4148
4149   LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
4150
4151 else
4152   echo "$ac_t""no" 1>&6
4153 fi
4154
4155
4156
4157 { test "$extra_verbose" = "yes" && cat << \EOF
4158     Defining LISP_FLOAT_TYPE
4159 EOF
4160 cat >> confdefs.h <<\EOF
4161 #define LISP_FLOAT_TYPE 1
4162 EOF
4163 }
4164
4165
4166 cat > conftest.$ac_ext <<EOF
4167 #line 4168 "configure"
4168 #include "confdefs.h"
4169 #include <math.h>
4170 int main() {
4171 return atanh(1.0) + asinh(1.0) + acosh(1.0); 
4172 ; return 0; }
4173 EOF
4174 if { (eval echo configure:4175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4175   rm -rf conftest*
4176   { test "$extra_verbose" = "yes" && cat << \EOF
4177     Defining HAVE_INVERSE_HYPERBOLIC
4178 EOF
4179 cat >> confdefs.h <<\EOF
4180 #define HAVE_INVERSE_HYPERBOLIC 1
4181 EOF
4182 }
4183
4184 else
4185   echo "configure: failed program was:" >&5
4186   cat conftest.$ac_ext >&5
4187 fi
4188 rm -f conftest*
4189
4190 echo "checking type of mail spool file locking" 1>&6
4191 echo "configure:4192: checking type of mail spool file locking" >&5
4192 test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
4193 test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
4194 if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
4195     Defining REAL_MAIL_USE_LOCKF
4196 EOF
4197 cat >> confdefs.h <<\EOF
4198 #define REAL_MAIL_USE_LOCKF 1
4199 EOF
4200 }
4201
4202 elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
4203     Defining REAL_MAIL_USE_FLOCK
4204 EOF
4205 cat >> confdefs.h <<\EOF
4206 #define REAL_MAIL_USE_FLOCK 1
4207 EOF
4208 }
4209
4210 else mail_locking="dot-locking"
4211 fi
4212
4213
4214 echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
4215 echo "configure:4216: checking for kstat_open in -lkstat" >&5
4216 ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
4217
4218 xe_check_libs=" -lkstat "
4219 cat > conftest.$ac_ext <<EOF
4220 #line 4221 "configure"
4221 #include "confdefs.h"
4222 /* Override any gcc2 internal prototype to avoid an error.  */
4223 /* We use char because int might match the return type of a gcc2
4224     builtin and then its argument prototype would still apply.  */
4225 char kstat_open();
4226
4227 int main() {
4228 kstat_open()
4229 ; return 0; }
4230 EOF
4231 if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4232   rm -rf conftest*
4233   eval "ac_cv_lib_$ac_lib_var=yes"
4234 else
4235   echo "configure: failed program was:" >&5
4236   cat conftest.$ac_ext >&5
4237   rm -rf conftest*
4238   eval "ac_cv_lib_$ac_lib_var=no"
4239 fi
4240 rm -f conftest*
4241 xe_check_libs=""
4242
4243 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4244   echo "$ac_t""yes" 1>&6
4245     ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4246     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4247   { test "$extra_verbose" = "yes" && cat << EOF
4248     Defining $ac_tr_lib
4249 EOF
4250 cat >> confdefs.h <<EOF
4251 #define $ac_tr_lib 1
4252 EOF
4253 }
4254
4255   LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
4256
4257 else
4258   echo "$ac_t""no" 1>&6
4259 fi
4260
4261
4262
4263
4264 echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
4265 echo "configure:4266: checking for kvm_read in -lkvm" >&5
4266 ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
4267
4268 xe_check_libs=" -lkvm "
4269 cat > conftest.$ac_ext <<EOF
4270 #line 4271 "configure"
4271 #include "confdefs.h"
4272 /* Override any gcc2 internal prototype to avoid an error.  */
4273 /* We use char because int might match the return type of a gcc2
4274     builtin and then its argument prototype would still apply.  */
4275 char kvm_read();
4276
4277 int main() {
4278 kvm_read()
4279 ; return 0; }
4280 EOF
4281 if { (eval echo configure:4282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4282   rm -rf conftest*
4283   eval "ac_cv_lib_$ac_lib_var=yes"
4284 else
4285   echo "configure: failed program was:" >&5
4286   cat conftest.$ac_ext >&5
4287   rm -rf conftest*
4288   eval "ac_cv_lib_$ac_lib_var=no"
4289 fi
4290 rm -f conftest*
4291 xe_check_libs=""
4292
4293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4294   echo "$ac_t""yes" 1>&6
4295     ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4296     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4297   { test "$extra_verbose" = "yes" && cat << EOF
4298     Defining $ac_tr_lib
4299 EOF
4300 cat >> confdefs.h <<EOF
4301 #define $ac_tr_lib 1
4302 EOF
4303 }
4304
4305   LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
4306
4307 else
4308   echo "$ac_t""no" 1>&6
4309 fi
4310
4311
4312
4313 case "$opsys" in decosf*)
4314   
4315 echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
4316 echo "configure:4317: checking for cma_open in -lpthreads" >&5
4317 ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
4318
4319 xe_check_libs=" -lpthreads "
4320 cat > conftest.$ac_ext <<EOF
4321 #line 4322 "configure"
4322 #include "confdefs.h"
4323 /* Override any gcc2 internal prototype to avoid an error.  */
4324 /* We use char because int might match the return type of a gcc2
4325     builtin and then its argument prototype would still apply.  */
4326 char cma_open();
4327
4328 int main() {
4329 cma_open()
4330 ; return 0; }
4331 EOF
4332 if { (eval echo configure:4333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4333   rm -rf conftest*
4334   eval "ac_cv_lib_$ac_lib_var=yes"
4335 else
4336   echo "configure: failed program was:" >&5
4337   cat conftest.$ac_ext >&5
4338   rm -rf conftest*
4339   eval "ac_cv_lib_$ac_lib_var=no"
4340 fi
4341 rm -f conftest*
4342 xe_check_libs=""
4343
4344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4345   echo "$ac_t""yes" 1>&6
4346     ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4347     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4348   { test "$extra_verbose" = "yes" && cat << EOF
4349     Defining $ac_tr_lib
4350 EOF
4351 cat >> confdefs.h <<EOF
4352 #define $ac_tr_lib 1
4353 EOF
4354 }
4355
4356   LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
4357
4358 else
4359   echo "$ac_t""no" 1>&6
4360 fi
4361
4362
4363   test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
4364     c_switch_site="$c_switch_site -threads" ;;
4365 esac
4366
4367 echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
4368 echo "configure:4369: checking whether the -xildoff compiler flag is required" >&5
4369 if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
4370   if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
4371     then echo "$ac_t""no" 1>&6;
4372     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
4373   fi
4374   else echo "$ac_t""no" 1>&6
4375 fi
4376
4377 if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
4378   echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
4379 echo "configure:4380: checking for \"-z ignore\" linker flag" >&5
4380   case "`ld -h 2>&1`" in
4381     *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
4382       ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
4383     *) echo "$ac_t""no" 1>&6 ;;
4384   esac
4385 fi
4386
4387
4388 echo "checking "for specified window system"" 1>&6
4389 echo "configure:4390: checking "for specified window system"" >&5
4390
4391 if test "$with_x11" != "no"; then
4392     test "$x_includes $x_libraries" != "NONE NONE" && \
4393    window_system=x11 with_x11=yes
4394
4395         
4396       if test "$x_includes $x_libraries" = "NONE NONE" \
4397     -a -n "$OPENWINHOME" \
4398     -a "$OPENWINHOME" != "/usr/openwin" \
4399     -a -d "$OPENWINHOME"; then
4400       test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
4401       test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
4402       test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
4403   fi
4404
4405   if test "$x_includes" = "NONE"; then
4406                     for dir in "/usr/X11" "/usr/X11R6"; do
4407       if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
4408     done
4409   fi
4410
4411   if test "$x_libraries" = "NONE"; then
4412     for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
4413       if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
4414     done
4415   fi
4416
4417   # If we find X, set shell vars x_includes and x_libraries to the
4418 # paths, otherwise set no_x=yes.
4419 # Uses ac_ vars as temps to allow command line to override cache and checks.
4420 # --without-x overrides everything else, but does not touch the cache.
4421 echo $ac_n "checking for X""... $ac_c" 1>&6
4422 echo "configure:4423: checking for X" >&5
4423
4424 # Check whether --with-x or --without-x was given.
4425 if test "${with_x+set}" = set; then
4426   withval="$with_x"
4427   :
4428 fi
4429
4430 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4431 if test "x$with_x" = xno; then
4432   # The user explicitly disabled X.
4433   have_x=disabled
4434 else
4435   if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4436     # Both variables are already set.
4437     have_x=yes
4438   else
4439
4440 # One or both of the vars are not set, and there is no cached value.
4441 ac_x_includes=NO ac_x_libraries=NO
4442 rm -fr conftestdir
4443 if mkdir conftestdir; then
4444   cd conftestdir
4445   # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4446   cat > Imakefile <<'EOF'
4447 acfindx:
4448         @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4449 EOF
4450   if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4451     # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4452     eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
4453     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4454     for ac_extension in a so sl; do
4455       if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
4456         test -f $ac_im_libdir/libX11.$ac_extension; then
4457         ac_im_usrlibdir=$ac_im_libdir; break
4458       fi
4459     done
4460     # Screen out bogus values from the imake configuration.  They are
4461     # bogus both because they are the default anyway, and because
4462     # using them would break gcc on systems where it needs fixed includes.
4463     case "$ac_im_incroot" in
4464         /usr/include) ;;
4465         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
4466     esac
4467     case "$ac_im_usrlibdir" in
4468         /usr/lib | /lib) ;;
4469         *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
4470     esac
4471   fi
4472   cd ..
4473   rm -fr conftestdir
4474 fi
4475
4476 if test "$ac_x_includes" = NO; then
4477   # Guess where to find include files, by looking for this one X11 .h file.
4478   test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
4479
4480   # First, try using that file with no special directory specified.
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 #include <$x_direct_test_include>
4485 EOF
4486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4487 { (eval echo configure:4488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4488 ac_err=`grep -v '^ *+' conftest.out`
4489 if test -z "$ac_err"; then
4490   rm -rf conftest*
4491   # We can compile using X headers with no special include directory.
4492 ac_x_includes=
4493 else
4494   echo "$ac_err" >&5
4495   echo "configure: failed program was:" >&5
4496   cat conftest.$ac_ext >&5
4497   rm -rf conftest*
4498   # Look for the header file in a standard set of common directories.
4499 # Check X11 before X11Rn because it is often a symlink to the current release.
4500   for ac_dir in               \
4501     /usr/X11/include          \
4502     /usr/X11R6/include        \
4503     /usr/X11R5/include        \
4504     /usr/X11R4/include        \
4505                               \
4506     /usr/include/X11          \
4507     /usr/include/X11R6        \
4508     /usr/include/X11R5        \
4509     /usr/include/X11R4        \
4510                               \
4511     /usr/local/X11/include    \
4512     /usr/local/X11R6/include  \
4513     /usr/local/X11R5/include  \
4514     /usr/local/X11R4/include  \
4515                               \
4516     /usr/local/include/X11    \
4517     /usr/local/include/X11R6  \
4518     /usr/local/include/X11R5  \
4519     /usr/local/include/X11R4  \
4520                               \
4521     /usr/X386/include         \
4522     /usr/x386/include         \
4523     /usr/XFree86/include/X11  \
4524                               \
4525     /usr/include              \
4526     /usr/local/include        \
4527     /usr/unsupported/include  \
4528     /usr/athena/include       \
4529     /usr/local/x11r5/include  \
4530     /usr/lpp/Xamples/include  \
4531                               \
4532     /usr/openwin/include      \
4533     /usr/openwin/share/include \
4534     ; \
4535   do
4536     if test -r "$ac_dir/$x_direct_test_include"; then
4537       ac_x_includes=$ac_dir
4538       break
4539     fi
4540   done
4541 fi
4542 rm -f conftest*
4543 fi # $ac_x_includes = NO
4544
4545 if test "$ac_x_libraries" = NO; then
4546   # Check for the libraries.
4547
4548   test -z "$x_direct_test_library" && x_direct_test_library=Xt
4549   test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
4550
4551   # See if we find them without any special options.
4552   # Don't add to $LIBS permanently.
4553   ac_save_LIBS="$LIBS"
4554   LIBS="-l$x_direct_test_library $LIBS"
4555 cat > conftest.$ac_ext <<EOF
4556 #line 4557 "configure"
4557 #include "confdefs.h"
4558
4559 int main() {
4560 ${x_direct_test_function}()
4561 ; return 0; }
4562 EOF
4563 if { (eval echo configure:4564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4564   rm -rf conftest*
4565   LIBS="$ac_save_LIBS"
4566 # We can link X programs with no special library path.
4567 ac_x_libraries=
4568 else
4569   echo "configure: failed program was:" >&5
4570   cat conftest.$ac_ext >&5
4571   rm -rf conftest*
4572   LIBS="$ac_save_LIBS"
4573 # First see if replacing the include by lib works.
4574 # Check X11 before X11Rn because it is often a symlink to the current release.
4575 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
4576     /usr/X11/lib          \
4577     /usr/X11R6/lib        \
4578     /usr/X11R5/lib        \
4579     /usr/X11R4/lib        \
4580                           \
4581     /usr/lib/X11          \
4582     /usr/lib/X11R6        \
4583     /usr/lib/X11R5        \
4584     /usr/lib/X11R4        \
4585                           \
4586     /usr/local/X11/lib    \
4587     /usr/local/X11R6/lib  \
4588     /usr/local/X11R5/lib  \
4589     /usr/local/X11R4/lib  \
4590                           \
4591     /usr/local/lib/X11    \
4592     /usr/local/lib/X11R6  \
4593     /usr/local/lib/X11R5  \
4594     /usr/local/lib/X11R4  \
4595                           \
4596     /usr/X386/lib         \
4597     /usr/x386/lib         \
4598     /usr/XFree86/lib/X11  \
4599                           \
4600     /usr/lib              \
4601     /usr/local/lib        \
4602     /usr/unsupported/lib  \
4603     /usr/athena/lib       \
4604     /usr/local/x11r5/lib  \
4605     /usr/lpp/Xamples/lib  \
4606     /lib/usr/lib/X11      \
4607                           \
4608     /usr/openwin/lib      \
4609     /usr/openwin/share/lib \
4610     ; \
4611 do
4612   for ac_extension in a so sl; do
4613     if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
4614       ac_x_libraries=$ac_dir
4615       break 2
4616     fi
4617   done
4618 done
4619 fi
4620 rm -f conftest*
4621 fi # $ac_x_libraries = NO
4622
4623 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
4624   # Didn't find X anywhere.  Cache the known absence of X.
4625   ac_cv_have_x="have_x=no"
4626 else
4627   # Record where we found X for the cache.
4628   ac_cv_have_x="have_x=yes \
4629                 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4630 fi
4631   fi
4632   eval "$ac_cv_have_x"
4633 fi # $with_x != no
4634
4635 if test "$have_x" != yes; then
4636   echo "$ac_t""$have_x" 1>&6
4637   no_x=yes
4638 else
4639   # If each of the values was on the command line, it overrides each guess.
4640   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4641   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4642   # Update the cache value to reflect the command line values.
4643   ac_cv_have_x="have_x=yes \
4644                 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4645   echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
4646 fi
4647
4648 if test "$no_x" = yes; then
4649   # Not all programs may use this symbol, but it does not hurt to define it.
4650   { test "$extra_verbose" = "yes" && cat << \EOF
4651     Defining X_DISPLAY_MISSING
4652 EOF
4653 cat >> confdefs.h <<\EOF
4654 #define X_DISPLAY_MISSING 1
4655 EOF
4656 }
4657
4658   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4659 else
4660   if test -n "$x_includes"; then
4661     X_CFLAGS="$X_CFLAGS -I$x_includes"
4662   fi
4663
4664   # It would also be nice to do this for all -L options, not just this one.
4665   if test -n "$x_libraries"; then
4666     X_LIBS="$X_LIBS -L$x_libraries"
4667     # For Solaris; some versions of Sun CC require a space after -R and
4668     # others require no space.  Words are not sufficient . . . .
4669     case "`(uname -sr) 2>/dev/null`" in
4670     "SunOS 5"*)
4671       echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4672 echo "configure:4673: checking whether -R must be followed by a space" >&5
4673       ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4674       cat > conftest.$ac_ext <<EOF
4675 #line 4676 "configure"
4676 #include "confdefs.h"
4677
4678 int main() {
4679
4680 ; return 0; }
4681 EOF
4682 if { (eval echo configure:4683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4683   rm -rf conftest*
4684   ac_R_nospace=yes
4685 else
4686   echo "configure: failed program was:" >&5
4687   cat conftest.$ac_ext >&5
4688   rm -rf conftest*
4689   ac_R_nospace=no
4690 fi
4691 rm -f conftest*
4692       if test $ac_R_nospace = yes; then
4693         echo "$ac_t""no" 1>&6
4694         X_LIBS="$X_LIBS -R$x_libraries"
4695       else
4696         LIBS="$ac_xsave_LIBS -R $x_libraries"
4697         cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700
4701 int main() {
4702
4703 ; return 0; }
4704 EOF
4705 if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4706   rm -rf conftest*
4707   ac_R_space=yes
4708 else
4709   echo "configure: failed program was:" >&5
4710   cat conftest.$ac_ext >&5
4711   rm -rf conftest*
4712   ac_R_space=no
4713 fi
4714 rm -f conftest*
4715         if test $ac_R_space = yes; then
4716           echo "$ac_t""yes" 1>&6
4717           X_LIBS="$X_LIBS -R $x_libraries"
4718         else
4719           echo "$ac_t""neither works" 1>&6
4720         fi
4721       fi
4722       LIBS="$ac_xsave_LIBS"
4723     esac
4724   fi
4725
4726   # Check for system-dependent libraries X programs must link with.
4727   # Do this before checking for the system-independent R6 libraries
4728   # (-lICE), since we may need -lsocket or whatever for X linking.
4729
4730   if test "$ISC" = yes; then
4731     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4732   else
4733     # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4734     # libraries were built with DECnet support.  And karl@cs.umb.edu says
4735     # the Alpha needs dnet_stub (dnet does not exist).
4736     if test "$with_dnet" = "no" ; then
4737 ac_cv_lib_dnet_dnet_ntoa=no
4738 else
4739
4740 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4741 echo "configure:4742: checking for dnet_ntoa in -ldnet" >&5
4742 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4743
4744 xe_check_libs=" -ldnet "
4745 cat > conftest.$ac_ext <<EOF
4746 #line 4747 "configure"
4747 #include "confdefs.h"
4748 /* Override any gcc2 internal prototype to avoid an error.  */
4749 /* We use char because int might match the return type of a gcc2
4750     builtin and then its argument prototype would still apply.  */
4751 char dnet_ntoa();
4752
4753 int main() {
4754 dnet_ntoa()
4755 ; return 0; }
4756 EOF
4757 if { (eval echo configure:4758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4758   rm -rf conftest*
4759   eval "ac_cv_lib_$ac_lib_var=yes"
4760 else
4761   echo "configure: failed program was:" >&5
4762   cat conftest.$ac_ext >&5
4763   rm -rf conftest*
4764   eval "ac_cv_lib_$ac_lib_var=no"
4765 fi
4766 rm -f conftest*
4767 xe_check_libs=""
4768
4769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4770   echo "$ac_t""yes" 1>&6
4771   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4772 else
4773   echo "$ac_t""no" 1>&6
4774 fi
4775
4776 fi
4777
4778     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4779       
4780 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4781 echo "configure:4782: checking for dnet_ntoa in -ldnet_stub" >&5
4782 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4783
4784 xe_check_libs=" -ldnet_stub "
4785 cat > conftest.$ac_ext <<EOF
4786 #line 4787 "configure"
4787 #include "confdefs.h"
4788 /* Override any gcc2 internal prototype to avoid an error.  */
4789 /* We use char because int might match the return type of a gcc2
4790     builtin and then its argument prototype would still apply.  */
4791 char dnet_ntoa();
4792
4793 int main() {
4794 dnet_ntoa()
4795 ; return 0; }
4796 EOF
4797 if { (eval echo configure:4798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4798   rm -rf conftest*
4799   eval "ac_cv_lib_$ac_lib_var=yes"
4800 else
4801   echo "configure: failed program was:" >&5
4802   cat conftest.$ac_ext >&5
4803   rm -rf conftest*
4804   eval "ac_cv_lib_$ac_lib_var=no"
4805 fi
4806 rm -f conftest*
4807 xe_check_libs=""
4808
4809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4810   echo "$ac_t""yes" 1>&6
4811   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4812 else
4813   echo "$ac_t""no" 1>&6
4814 fi
4815
4816
4817     fi
4818
4819     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4820     # to get the SysV transport functions.
4821     # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4822     # needs -lnsl.
4823     # The nsl library prevents programs from opening the X display
4824     # on Irix 5.2, according to dickey@clark.net.
4825     echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4826 echo "configure:4827: checking for gethostbyname" >&5
4827
4828 cat > conftest.$ac_ext <<EOF
4829 #line 4830 "configure"
4830 #include "confdefs.h"
4831 /* System header to define __stub macros and hopefully few prototypes,
4832     which can conflict with char gethostbyname(); below.  */
4833 #include <assert.h>
4834 /* Override any gcc2 internal prototype to avoid an error.  */
4835 /* We use char because int might match the return type of a gcc2
4836     builtin and then its argument prototype would still apply.  */
4837 char gethostbyname();
4838
4839 int main() {
4840
4841 /* The GNU C library defines this for functions which it implements
4842     to always fail with ENOSYS.  Some functions are actually named
4843     something starting with __ and the normal name is an alias.  */
4844 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4845 choke me
4846 #else
4847 gethostbyname();
4848 #endif
4849
4850 ; return 0; }
4851 EOF
4852 if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4853   rm -rf conftest*
4854   eval "ac_cv_func_gethostbyname=yes"
4855 else
4856   echo "configure: failed program was:" >&5
4857   cat conftest.$ac_ext >&5
4858   rm -rf conftest*
4859   eval "ac_cv_func_gethostbyname=no"
4860 fi
4861 rm -f conftest*
4862
4863 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4864   echo "$ac_t""yes" 1>&6
4865   :
4866 else
4867   echo "$ac_t""no" 1>&6
4868 fi
4869
4870     if test $ac_cv_func_gethostbyname = no; then
4871       
4872 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4873 echo "configure:4874: checking for gethostbyname in -lnsl" >&5
4874 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4875
4876 xe_check_libs=" -lnsl "
4877 cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 /* We use char because int might match the return type of a gcc2
4882     builtin and then its argument prototype would still apply.  */
4883 char gethostbyname();
4884
4885 int main() {
4886 gethostbyname()
4887 ; return 0; }
4888 EOF
4889 if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4890   rm -rf conftest*
4891   eval "ac_cv_lib_$ac_lib_var=yes"
4892 else
4893   echo "configure: failed program was:" >&5
4894   cat conftest.$ac_ext >&5
4895   rm -rf conftest*
4896   eval "ac_cv_lib_$ac_lib_var=no"
4897 fi
4898 rm -f conftest*
4899 xe_check_libs=""
4900
4901 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4902   echo "$ac_t""yes" 1>&6
4903   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4904 else
4905   echo "$ac_t""no" 1>&6
4906 fi
4907
4908
4909     fi
4910
4911     # lieder@skyler.mavd.honeywell.com says without -lsocket,
4912     # socket/setsockopt and other routines are undefined under SCO ODT
4913     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4914     # on later versions), says simon@lia.di.epfl.ch: it contains
4915     # gethostby* variants that don't use the nameserver (or something).
4916     # -lsocket must be given before -lnsl if both are needed.
4917     # We assume that if connect needs -lnsl, so does gethostbyname.
4918     echo $ac_n "checking for connect""... $ac_c" 1>&6
4919 echo "configure:4920: checking for connect" >&5
4920
4921 cat > conftest.$ac_ext <<EOF
4922 #line 4923 "configure"
4923 #include "confdefs.h"
4924 /* System header to define __stub macros and hopefully few prototypes,
4925     which can conflict with char connect(); below.  */
4926 #include <assert.h>
4927 /* Override any gcc2 internal prototype to avoid an error.  */
4928 /* We use char because int might match the return type of a gcc2
4929     builtin and then its argument prototype would still apply.  */
4930 char connect();
4931
4932 int main() {
4933
4934 /* The GNU C library defines this for functions which it implements
4935     to always fail with ENOSYS.  Some functions are actually named
4936     something starting with __ and the normal name is an alias.  */
4937 #if defined (__stub_connect) || defined (__stub___connect)
4938 choke me
4939 #else
4940 connect();
4941 #endif
4942
4943 ; return 0; }
4944 EOF
4945 if { (eval echo configure:4946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4946   rm -rf conftest*
4947   eval "ac_cv_func_connect=yes"
4948 else
4949   echo "configure: failed program was:" >&5
4950   cat conftest.$ac_ext >&5
4951   rm -rf conftest*
4952   eval "ac_cv_func_connect=no"
4953 fi
4954 rm -f conftest*
4955
4956 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4957   echo "$ac_t""yes" 1>&6
4958   :
4959 else
4960   echo "$ac_t""no" 1>&6
4961 fi
4962
4963     if test $ac_cv_func_connect = no; then
4964       
4965 xe_msg_checking="for connect in -lsocket"
4966 test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
4967 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
4968 echo "configure:4969: checking "$xe_msg_checking"" >&5
4969 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
4970
4971 xe_check_libs=" -lsocket $X_EXTRA_LIBS"
4972 cat > conftest.$ac_ext <<EOF
4973 #line 4974 "configure"
4974 #include "confdefs.h"
4975 /* Override any gcc2 internal prototype to avoid an error.  */
4976 /* We use char because int might match the return type of a gcc2
4977     builtin and then its argument prototype would still apply.  */
4978 char connect();
4979
4980 int main() {
4981 connect()
4982 ; return 0; }
4983 EOF
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4985   rm -rf conftest*
4986   eval "ac_cv_lib_$ac_lib_var=yes"
4987 else
4988   echo "configure: failed program was:" >&5
4989   cat conftest.$ac_ext >&5
4990   rm -rf conftest*
4991   eval "ac_cv_lib_$ac_lib_var=no"
4992 fi
4993 rm -f conftest*
4994 xe_check_libs=""
4995
4996 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
4997   echo "$ac_t""yes" 1>&6
4998   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4999 else
5000   echo "$ac_t""no" 1>&6
5001 fi
5002
5003
5004     fi
5005
5006     # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5007     echo $ac_n "checking for remove""... $ac_c" 1>&6
5008 echo "configure:5009: checking for remove" >&5
5009
5010 cat > conftest.$ac_ext <<EOF
5011 #line 5012 "configure"
5012 #include "confdefs.h"
5013 /* System header to define __stub macros and hopefully few prototypes,
5014     which can conflict with char remove(); below.  */
5015 #include <assert.h>
5016 /* Override any gcc2 internal prototype to avoid an error.  */
5017 /* We use char because int might match the return type of a gcc2
5018     builtin and then its argument prototype would still apply.  */
5019 char remove();
5020
5021 int main() {
5022
5023 /* The GNU C library defines this for functions which it implements
5024     to always fail with ENOSYS.  Some functions are actually named
5025     something starting with __ and the normal name is an alias.  */
5026 #if defined (__stub_remove) || defined (__stub___remove)
5027 choke me
5028 #else
5029 remove();
5030 #endif
5031
5032 ; return 0; }
5033 EOF
5034 if { (eval echo configure:5035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5035   rm -rf conftest*
5036   eval "ac_cv_func_remove=yes"
5037 else
5038   echo "configure: failed program was:" >&5
5039   cat conftest.$ac_ext >&5
5040   rm -rf conftest*
5041   eval "ac_cv_func_remove=no"
5042 fi
5043 rm -f conftest*
5044
5045 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5046   echo "$ac_t""yes" 1>&6
5047   :
5048 else
5049   echo "$ac_t""no" 1>&6
5050 fi
5051
5052     if test $ac_cv_func_remove = no; then
5053       
5054 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5055 echo "configure:5056: checking for remove in -lposix" >&5
5056 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5057
5058 xe_check_libs=" -lposix "
5059 cat > conftest.$ac_ext <<EOF
5060 #line 5061 "configure"
5061 #include "confdefs.h"
5062 /* Override any gcc2 internal prototype to avoid an error.  */
5063 /* We use char because int might match the return type of a gcc2
5064     builtin and then its argument prototype would still apply.  */
5065 char remove();
5066
5067 int main() {
5068 remove()
5069 ; return 0; }
5070 EOF
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5072   rm -rf conftest*
5073   eval "ac_cv_lib_$ac_lib_var=yes"
5074 else
5075   echo "configure: failed program was:" >&5
5076   cat conftest.$ac_ext >&5
5077   rm -rf conftest*
5078   eval "ac_cv_lib_$ac_lib_var=no"
5079 fi
5080 rm -f conftest*
5081 xe_check_libs=""
5082
5083 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5084   echo "$ac_t""yes" 1>&6
5085   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5086 else
5087   echo "$ac_t""no" 1>&6
5088 fi
5089
5090
5091     fi
5092
5093     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5094     echo $ac_n "checking for shmat""... $ac_c" 1>&6
5095 echo "configure:5096: checking for shmat" >&5
5096
5097 cat > conftest.$ac_ext <<EOF
5098 #line 5099 "configure"
5099 #include "confdefs.h"
5100 /* System header to define __stub macros and hopefully few prototypes,
5101     which can conflict with char shmat(); below.  */
5102 #include <assert.h>
5103 /* Override any gcc2 internal prototype to avoid an error.  */
5104 /* We use char because int might match the return type of a gcc2
5105     builtin and then its argument prototype would still apply.  */
5106 char shmat();
5107
5108 int main() {
5109
5110 /* The GNU C library defines this for functions which it implements
5111     to always fail with ENOSYS.  Some functions are actually named
5112     something starting with __ and the normal name is an alias.  */
5113 #if defined (__stub_shmat) || defined (__stub___shmat)
5114 choke me
5115 #else
5116 shmat();
5117 #endif
5118
5119 ; return 0; }
5120 EOF
5121 if { (eval echo configure:5122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5122   rm -rf conftest*
5123   eval "ac_cv_func_shmat=yes"
5124 else
5125   echo "configure: failed program was:" >&5
5126   cat conftest.$ac_ext >&5
5127   rm -rf conftest*
5128   eval "ac_cv_func_shmat=no"
5129 fi
5130 rm -f conftest*
5131
5132 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5133   echo "$ac_t""yes" 1>&6
5134   :
5135 else
5136   echo "$ac_t""no" 1>&6
5137 fi
5138
5139     if test $ac_cv_func_shmat = no; then
5140       
5141 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5142 echo "configure:5143: checking for shmat in -lipc" >&5
5143 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5144
5145 xe_check_libs=" -lipc "
5146 cat > conftest.$ac_ext <<EOF
5147 #line 5148 "configure"
5148 #include "confdefs.h"
5149 /* Override any gcc2 internal prototype to avoid an error.  */
5150 /* We use char because int might match the return type of a gcc2
5151     builtin and then its argument prototype would still apply.  */
5152 char shmat();
5153
5154 int main() {
5155 shmat()
5156 ; return 0; }
5157 EOF
5158 if { (eval echo configure:5159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5159   rm -rf conftest*
5160   eval "ac_cv_lib_$ac_lib_var=yes"
5161 else
5162   echo "configure: failed program was:" >&5
5163   cat conftest.$ac_ext >&5
5164   rm -rf conftest*
5165   eval "ac_cv_lib_$ac_lib_var=no"
5166 fi
5167 rm -f conftest*
5168 xe_check_libs=""
5169
5170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5171   echo "$ac_t""yes" 1>&6
5172   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5173 else
5174   echo "$ac_t""no" 1>&6
5175 fi
5176
5177
5178     fi
5179   fi
5180
5181   # Check for libraries that X11R6 Xt/Xaw programs need.
5182   ac_save_LDFLAGS="$LDFLAGS"
5183   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5184   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5185   # check for ICE first), but we must link in the order -lSM -lICE or
5186   # we get undefined symbols.  So assume we have SM if we have ICE.
5187   # These have to be linked with before -lX11, unlike the other
5188   # libraries we check for below, so use a different variable.
5189   #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5190   
5191 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5192 echo "configure:5193: checking for IceConnectionNumber in -lICE" >&5
5193 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5194
5195 xe_check_libs=" -lICE "
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* Override any gcc2 internal prototype to avoid an error.  */
5200 /* We use char because int might match the return type of a gcc2
5201     builtin and then its argument prototype would still apply.  */
5202 char IceConnectionNumber();
5203
5204 int main() {
5205 IceConnectionNumber()
5206 ; return 0; }
5207 EOF
5208 if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5209   rm -rf conftest*
5210   eval "ac_cv_lib_$ac_lib_var=yes"
5211 else
5212   echo "configure: failed program was:" >&5
5213   cat conftest.$ac_ext >&5
5214   rm -rf conftest*
5215   eval "ac_cv_lib_$ac_lib_var=no"
5216 fi
5217 rm -f conftest*
5218 xe_check_libs=""
5219
5220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5221   echo "$ac_t""yes" 1>&6
5222   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5223 else
5224   echo "$ac_t""no" 1>&6
5225 fi
5226
5227
5228   LDFLAGS="$ac_save_LDFLAGS"
5229
5230 fi
5231  # Autoconf claims to find X library and include dirs for us.
5232   if test "$no_x" = "yes"
5233   then with_x11=no  window_system=none HAVE_X_WINDOWS=no
5234   else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
5235   fi
5236 fi
5237
5238 case "$with_x11" in
5239   yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
5240   no  ) window_system=none HAVE_X_WINDOWS=no  ;;
5241 esac
5242
5243 if test "$with_x11" = "yes"; then
5244   { test "$extra_verbose" = "yes" && cat << \EOF
5245     Defining HAVE_X_WINDOWS
5246 EOF
5247 cat >> confdefs.h <<\EOF
5248 #define HAVE_X_WINDOWS 1
5249 EOF
5250 }
5251
5252   MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
5253   SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
5254
5255       for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
5256     inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
5257     if test -d "$lib_dir" -a -d "$inc_dir"; then
5258       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5259         x_libraries="$lib_dir $x_libraries"
5260         X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
5261       esac
5262       case "$x_includes" in "$inc_dir"* ) ;; *)
5263         x_includes="$inc_dir $x_includes"
5264         X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
5265       esac
5266       break;       fi
5267   done
5268
5269     for rel in "X11R6" "X11R5" "X11R4"; do
5270     lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
5271     if test -d "$lib_dir" -a -d "$inc_dir"; then
5272       case "$x_libraries" in *"$lib_dir"* ) ;; *)
5273         x_libraries="$x_libraries $lib_dir"
5274         X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
5275       esac
5276       case "$x_includes" in "$inc_dir"* ) ;; *)
5277         x_includes="$x_includes $inc_dir"
5278         X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
5279       esac
5280       break;     fi
5281   done
5282
5283     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
5284
5285   ld_switch_x_site="$X_LIBS"
5286
5287   
5288 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
5289     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5290   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
5291   
5292         runpath="" runpath_dirs=""
5293   if test -n "$LD_RUN_PATH"; then
5294     runpath="$LD_RUN_PATH"
5295   elif test "$GCC" = "yes"; then
5296         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
5297     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
5298     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
5299     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
5300       case "$arg" in P,* | -L* | -R* )
5301         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
5302           {
5303 xe_runpath_dir="$dir"
5304   test "$xe_runpath_dir" != "/lib"     -a \
5305         "$xe_runpath_dir" != "/usr/lib" -a \
5306         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5307   eval "$xe_add_unique_runpath_dir"
5308 }
5309         done ;;
5310       esac
5311     done
5312     ld_switch_run="$ld_switch_run_save"
5313     rm -f conftest*
5314   else
5315         for arg in $ld_switch_site $ld_switch_x_site; do
5316       case "$arg" in -L*) {
5317 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
5318   test "$xe_runpath_dir" != "/lib"     -a \
5319         "$xe_runpath_dir" != "/usr/lib" -a \
5320         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
5321   eval "$xe_add_unique_runpath_dir"
5322 };; esac
5323     done
5324         if test "$opsys $need_motif" = "sol2 yes"; then
5325       xe_runpath_dir="/opt/SUNWdt/lib";
5326       eval "$xe_add_unique_runpath_dir";
5327     fi
5328   fi 
5329   if test -n "$runpath"; then
5330     ld_switch_run="${dash_r}${runpath}"
5331     
5332 if test "$GCC" = "yes"; then
5333   set x $ld_switch_run; shift; ld_switch_run=""
5334   while test -n "$1"; do
5335     case $1 in
5336       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
5337       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
5338       -Xlinker* ) ;;
5339       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
5340     esac
5341     shift
5342   done
5343 fi
5344     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
5345   fi
5346 fi
5347
5348
5349   if test "$extra_verbose" = "yes"; then
5350     echo; echo "X11 compilation variables:"
5351     for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
5352     echo
5353   fi
5354
5355             bitmapdirs=
5356   if test "$x_includes" != NONE; then
5357     for i in $x_includes; do
5358       if test -d "$i/bitmaps"; then
5359         bitmapdirs="$i/bitmaps:$bitmapdirs"
5360       fi
5361       if test -d "$i/X11/bitmaps"; then
5362         bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
5363       fi
5364     done
5365     bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
5366   fi
5367   test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
5368     Defining BITMAPDIR = "$bitmapdirs"
5369 EOF
5370 cat >> confdefs.h <<EOF
5371 #define BITMAPDIR "$bitmapdirs"
5372 EOF
5373 }
5374
5375
5376     echo "checking for X defines extracted by xmkmf" 1>&6
5377 echo "configure:5378: checking for X defines extracted by xmkmf" >&5
5378   rm -fr conftestdir
5379   if mkdir conftestdir; then
5380     cd conftestdir
5381     cat > Imakefile <<'EOF'
5382 xetest:
5383         @echo ${PROTO_DEFINES} ${STD_DEFINES}
5384 EOF
5385     if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
5386       # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
5387       xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
5388     fi
5389     cd ..
5390     rm -fr conftestdir
5391     for word in $xmkmf_defines; do
5392       case "$word" in
5393         -D*=* ) ;;
5394         -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
5395               { test "$extra_verbose" = "yes" && cat << EOF
5396     Defining $word
5397 EOF
5398 cat >> confdefs.h <<EOF
5399 #define $word 1
5400 EOF
5401 }
5402  ;;
5403       esac
5404     done
5405   fi
5406
5407     ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
5408 echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
5409 echo "configure:5410: checking for X11/Intrinsic.h" >&5
5410
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 #include <X11/Intrinsic.h>
5415 EOF
5416 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5417 { (eval echo configure:5418: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5418 ac_err=`grep -v '^ *+' conftest.out`
5419 if test -z "$ac_err"; then
5420   rm -rf conftest*
5421   eval "ac_cv_header_$ac_safe=yes"
5422 else
5423   echo "$ac_err" >&5
5424   echo "configure: failed program was:" >&5
5425   cat conftest.$ac_ext >&5
5426   rm -rf conftest*
5427   eval "ac_cv_header_$ac_safe=no"
5428 fi
5429 rm -f conftest*
5430 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5431   echo "$ac_t""yes" 1>&6
5432   :
5433 else
5434   echo "$ac_t""no" 1>&6
5435 { echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
5436 fi
5437
5438
5439       
5440 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5441 echo "configure:5442: checking for XOpenDisplay in -lX11" >&5
5442 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5443
5444 xe_check_libs=" -lX11 "
5445 cat > conftest.$ac_ext <<EOF
5446 #line 5447 "configure"
5447 #include "confdefs.h"
5448 /* Override any gcc2 internal prototype to avoid an error.  */
5449 /* We use char because int might match the return type of a gcc2
5450     builtin and then its argument prototype would still apply.  */
5451 char XOpenDisplay();
5452
5453 int main() {
5454 XOpenDisplay()
5455 ; return 0; }
5456 EOF
5457 if { (eval echo configure:5458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5458   rm -rf conftest*
5459   eval "ac_cv_lib_$ac_lib_var=yes"
5460 else
5461   echo "configure: failed program was:" >&5
5462   cat conftest.$ac_ext >&5
5463   rm -rf conftest*
5464   eval "ac_cv_lib_$ac_lib_var=no"
5465 fi
5466 rm -f conftest*
5467 xe_check_libs=""
5468
5469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5470   echo "$ac_t""yes" 1>&6
5471   have_lib_x11=yes
5472 else
5473   echo "$ac_t""no" 1>&6
5474 fi
5475
5476
5477   if test "$have_lib_x11" != "yes"; then
5478     
5479 xe_msg_checking="for XGetFontProperty in -lX11"
5480 test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
5481 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
5482 echo "configure:5483: checking "$xe_msg_checking"" >&5
5483 ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
5484
5485 xe_check_libs=" -lX11 -b i486-linuxaout"
5486 cat > conftest.$ac_ext <<EOF
5487 #line 5488 "configure"
5488 #include "confdefs.h"
5489 /* Override any gcc2 internal prototype to avoid an error.  */
5490 /* We use char because int might match the return type of a gcc2
5491     builtin and then its argument prototype would still apply.  */
5492 char XGetFontProperty();
5493
5494 int main() {
5495 XGetFontProperty()
5496 ; return 0; }
5497 EOF
5498 if { (eval echo configure:5499: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5499   rm -rf conftest*
5500   eval "ac_cv_lib_$ac_lib_var=yes"
5501 else
5502   echo "configure: failed program was:" >&5
5503   cat conftest.$ac_ext >&5
5504   rm -rf conftest*
5505   eval "ac_cv_lib_$ac_lib_var=no"
5506 fi
5507 rm -f conftest*
5508 xe_check_libs=""
5509
5510 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5511   echo "$ac_t""yes" 1>&6
5512   ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
5513 else
5514   echo "$ac_t""no" 1>&6
5515 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5516 fi
5517
5518
5519   fi
5520   libs_x="-lX11"
5521   test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
5522
5523     
5524 echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
5525 echo "configure:5526: checking for XShapeSelectInput in -lXext" >&5
5526 ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
5527
5528 xe_check_libs=" -lXext "
5529 cat > conftest.$ac_ext <<EOF
5530 #line 5531 "configure"
5531 #include "confdefs.h"
5532 /* Override any gcc2 internal prototype to avoid an error.  */
5533 /* We use char because int might match the return type of a gcc2
5534     builtin and then its argument prototype would still apply.  */
5535 char XShapeSelectInput();
5536
5537 int main() {
5538 XShapeSelectInput()
5539 ; return 0; }
5540 EOF
5541 if { (eval echo configure:5542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5542   rm -rf conftest*
5543   eval "ac_cv_lib_$ac_lib_var=yes"
5544 else
5545   echo "configure: failed program was:" >&5
5546   cat conftest.$ac_ext >&5
5547   rm -rf conftest*
5548   eval "ac_cv_lib_$ac_lib_var=no"
5549 fi
5550 rm -f conftest*
5551 xe_check_libs=""
5552
5553 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5554   echo "$ac_t""yes" 1>&6
5555   libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
5556 else
5557   echo "$ac_t""no" 1>&6
5558 fi
5559
5560
5561
5562     
5563 echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
5564 echo "configure:5565: checking for XtOpenDisplay in -lXt" >&5
5565 ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
5566
5567 xe_check_libs=" -lXt "
5568 cat > conftest.$ac_ext <<EOF
5569 #line 5570 "configure"
5570 #include "confdefs.h"
5571 /* Override any gcc2 internal prototype to avoid an error.  */
5572 /* We use char because int might match the return type of a gcc2
5573     builtin and then its argument prototype would still apply.  */
5574 char XtOpenDisplay();
5575
5576 int main() {
5577 XtOpenDisplay()
5578 ; return 0; }
5579 EOF
5580 if { (eval echo configure:5581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5581   rm -rf conftest*
5582   eval "ac_cv_lib_$ac_lib_var=yes"
5583 else
5584   echo "configure: failed program was:" >&5
5585   cat conftest.$ac_ext >&5
5586   rm -rf conftest*
5587   eval "ac_cv_lib_$ac_lib_var=no"
5588 fi
5589 rm -f conftest*
5590 xe_check_libs=""
5591
5592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5593   echo "$ac_t""yes" 1>&6
5594   libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
5595 else
5596   echo "$ac_t""no" 1>&6
5597 { echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
5598 fi
5599
5600
5601
5602   echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
5603 echo "configure:5604: checking the version of X11 being used" >&5
5604   cat > conftest.$ac_ext <<EOF
5605 #line 5606 "configure"
5606 #include "confdefs.h"
5607 #include <X11/Intrinsic.h>
5608     int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
5609 EOF
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5611 then
5612   ./conftest foobar; x11_release=$?
5613 else
5614   conftest_rc="$?"
5615   echo "configure: failed program was:" >&5
5616   cat conftest.$ac_ext >&5
5617   rm -fr conftest*
5618   x11_release=4
5619 fi
5620 rm -fr conftest*
5621   echo "$ac_t""R${x11_release}" 1>&6
5622   { test "$extra_verbose" = "yes" && cat << EOF
5623     Defining THIS_IS_X11R${x11_release}
5624 EOF
5625 cat >> confdefs.h <<EOF
5626 #define THIS_IS_X11R${x11_release} 1
5627 EOF
5628 }
5629
5630
5631   for ac_hdr in X11/Xlocale.h
5632 do
5633 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5634 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5635 echo "configure:5636: checking for $ac_hdr" >&5
5636
5637 cat > conftest.$ac_ext <<EOF
5638 #line 5639 "configure"
5639 #include "confdefs.h"
5640 #include <$ac_hdr>
5641 EOF
5642 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5643 { (eval echo configure:5644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5644 ac_err=`grep -v '^ *+' conftest.out`
5645 if test -z "$ac_err"; then
5646   rm -rf conftest*
5647   eval "ac_cv_header_$ac_safe=yes"
5648 else
5649   echo "$ac_err" >&5
5650   echo "configure: failed program was:" >&5
5651   cat conftest.$ac_ext >&5
5652   rm -rf conftest*
5653   eval "ac_cv_header_$ac_safe=no"
5654 fi
5655 rm -f conftest*
5656 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5657   echo "$ac_t""yes" 1>&6
5658     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5659   { test "$extra_verbose" = "yes" && cat << EOF
5660     Defining $ac_tr_hdr
5661 EOF
5662 cat >> confdefs.h <<EOF
5663 #define $ac_tr_hdr 1
5664 EOF
5665 }
5666  
5667 else
5668   echo "$ac_t""no" 1>&6
5669 fi
5670 done
5671
5672
5673     echo $ac_n "checking for XFree86""... $ac_c" 1>&6
5674 echo "configure:5675: checking for XFree86" >&5
5675   if test -d "/usr/X386/include" -o \
5676           -f "/etc/XF86Config"    -o \
5677           -f "/etc/X11/XF86Config" -o \
5678           -f "/usr/X11R6/lib/X11/XF86Config"; then
5679     echo "$ac_t""yes" 1>&6
5680     { test "$extra_verbose" = "yes" && cat << \EOF
5681     Defining HAVE_XFREE386
5682 EOF
5683 cat >> confdefs.h <<\EOF
5684 #define HAVE_XFREE386 1
5685 EOF
5686 }
5687
5688   else
5689     echo "$ac_t""no" 1>&6
5690   fi
5691
5692     test -z "$with_xmu" && { 
5693 echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
5694 echo "configure:5695: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
5695 ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
5696
5697 xe_check_libs=" -lXmu "
5698 cat > conftest.$ac_ext <<EOF
5699 #line 5700 "configure"
5700 #include "confdefs.h"
5701 /* Override any gcc2 internal prototype to avoid an error.  */
5702 /* We use char because int might match the return type of a gcc2
5703     builtin and then its argument prototype would still apply.  */
5704 char XmuReadBitmapDataFromFile();
5705
5706 int main() {
5707 XmuReadBitmapDataFromFile()
5708 ; return 0; }
5709 EOF
5710 if { (eval echo configure:5711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5711   rm -rf conftest*
5712   eval "ac_cv_lib_$ac_lib_var=yes"
5713 else
5714   echo "configure: failed program was:" >&5
5715   cat conftest.$ac_ext >&5
5716   rm -rf conftest*
5717   eval "ac_cv_lib_$ac_lib_var=no"
5718 fi
5719 rm -f conftest*
5720 xe_check_libs=""
5721
5722 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5723   echo "$ac_t""yes" 1>&6
5724   with_xmu=yes
5725 else
5726   echo "$ac_t""no" 1>&6
5727 with_xmu=no
5728 fi
5729
5730  }
5731   if test "$with_xmu" = "no"; then
5732     extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
5733    echo "    xemacs will be linked with \"xmu.o\""
5734  fi
5735   else
5736     libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
5737     { test "$extra_verbose" = "yes" && cat << \EOF
5738     Defining HAVE_XMU
5739 EOF
5740 cat >> confdefs.h <<\EOF
5741 #define HAVE_XMU 1
5742 EOF
5743 }
5744
5745   fi
5746
5747       
5748 echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
5749 echo "configure:5750: checking for main in -lXbsd" >&5
5750 ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
5751
5752 xe_check_libs=" -lXbsd "
5753 cat > conftest.$ac_ext <<EOF
5754 #line 5755 "configure"
5755 #include "confdefs.h"
5756
5757 int main() {
5758 main()
5759 ; return 0; }
5760 EOF
5761 if { (eval echo configure:5762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5762   rm -rf conftest*
5763   eval "ac_cv_lib_$ac_lib_var=yes"
5764 else
5765   echo "configure: failed program was:" >&5
5766   cat conftest.$ac_ext >&5
5767   rm -rf conftest*
5768   eval "ac_cv_lib_$ac_lib_var=no"
5769 fi
5770 rm -f conftest*
5771 xe_check_libs=""
5772
5773 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5774   echo "$ac_t""yes" 1>&6
5775   libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
5776 else
5777   echo "$ac_t""no" 1>&6
5778 fi
5779
5780
5781
5782     if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
5783         if test "$GCC" = "yes"; then
5784       X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
5785       libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
5786     else
5787       case "$CC" in
5788         "xlc" ) CC="xlc_r" ;;
5789         "xlC" ) CC="xlC_r" ;;
5790         "cc"  ) CC="cc_r" ;;
5791       esac
5792     fi
5793   fi
5794
5795 fi 
5796 if test "$with_msw" != "no"; then
5797   echo "checking for MS-Windows" 1>&6
5798 echo "configure:5799: checking for MS-Windows" >&5
5799   
5800 echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
5801 echo "configure:5802: checking for main in -lgdi32" >&5
5802 ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
5803
5804 xe_check_libs=" -lgdi32 "
5805 cat > conftest.$ac_ext <<EOF
5806 #line 5807 "configure"
5807 #include "confdefs.h"
5808
5809 int main() {
5810 main()
5811 ; return 0; }
5812 EOF
5813 if { (eval echo configure:5814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
5814   rm -rf conftest*
5815   eval "ac_cv_lib_$ac_lib_var=yes"
5816 else
5817   echo "configure: failed program was:" >&5
5818   cat conftest.$ac_ext >&5
5819   rm -rf conftest*
5820   eval "ac_cv_lib_$ac_lib_var=no"
5821 fi
5822 rm -f conftest*
5823 xe_check_libs=""
5824
5825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
5826   echo "$ac_t""yes" 1>&6
5827   with_msw=yes
5828 else
5829   echo "$ac_t""no" 1>&6
5830 fi
5831
5832
5833   if test "$with_msw" = "yes"; then
5834     { test "$extra_verbose" = "yes" && cat << \EOF
5835     Defining HAVE_MS_WINDOWS
5836 EOF
5837 cat >> confdefs.h <<\EOF
5838 #define HAVE_MS_WINDOWS 1
5839 EOF
5840 }
5841
5842     install_pp="$blddir/lib-src/installexe.sh"
5843     libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
5844     test "$with_dragndrop" != no && dragndrop_proto="$dragndrop_proto msw" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"msw\" to \$dragndrop_proto"; fi
5845     if test "$window_system" != x11; then
5846         window_system=msw
5847         test "$with_scrollbars" != "no" && with_scrollbars=msw \
5848             && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5849    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5850  fi
5851         test "$with_menubars"   != "no" && with_menubars=msw \
5852             && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5853    echo "    xemacs will be linked with \"menubar-msw.o\""
5854  fi
5855         test "$with_toolbars"   != "no" && with_toolbars=msw \
5856             && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5857    echo "    xemacs will be linked with \"toolbar-msw.o\""
5858  fi
5859         test "$with_dialogs"   != "no" && with_dialogs=msw \
5860             && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5861    echo "    xemacs will be linked with \"dialog-msw.o\""
5862  fi
5863     else
5864         test "$with_scrollbars" != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5865    echo "    xemacs will be linked with \"scrollbar-msw.o\""
5866  fi
5867         test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5868    echo "    xemacs will be linked with \"menubar-msw.o\""
5869  fi
5870         test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
5871    echo "    xemacs will be linked with \"toolbar-msw.o\""
5872  fi
5873         test "$with_dialogs"    != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
5874    echo "    xemacs will be linked with \"dialog-msw.o\""
5875  fi
5876     fi
5877         cat > conftest.$ac_ext <<EOF
5878 #line 5879 "configure"
5879 #include "confdefs.h"
5880 #include <fcntl.h>
5881     int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
5882 EOF
5883 if { (eval echo configure:5884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
5884 then
5885   { test "$extra_verbose" = "yes" && cat << \EOF
5886     Defining HAVE_MSG_SELECT
5887 EOF
5888 cat >> confdefs.h <<\EOF
5889 #define HAVE_MSG_SELECT 1
5890 EOF
5891 }
5892
5893 else
5894   conftest_rc="$?"
5895   echo "configure: failed program was:" >&5
5896   cat conftest.$ac_ext >&5
5897 fi
5898 rm -fr conftest*
5899     const_is_losing=no
5900     with_file_coding=yes
5901     use_minimal_tagbits=yes
5902     use_indexed_lrecord_implementation=yes
5903     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
5904    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\""
5905  fi
5906   fi
5907 fi
5908
5909
5910
5911 test -z "$window_system" && window_system="none"
5912
5913 if test "$window_system" = "none"; then
5914   for feature in menubars scrollbars toolbars dialogs dragndrop
5915   do
5916     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5917        echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
5918     fi
5919     eval "with_${feature}=no"
5920   done
5921 else
5922   test -z "$with_toolbars" && with_toolbars=yes
5923 fi
5924
5925 if test "$with_msw" != "yes"; then
5926   for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
5927   do
5928     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5929        echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
5930     fi
5931     eval "with_${feature}=no"
5932   done
5933 else
5934   :
5935 fi
5936
5937 if test "$with_x11" != "yes"; then
5938             for feature in tooltalk cde offix session xim xmu \
5939                  xface
5940   do
5941     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
5942        echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
5943     fi
5944     eval "with_${feature}=no"
5945   done
5946 fi
5947
5948 bitmapdir=
5949
5950 case "$window_system" in
5951   x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
5952   msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
5953   none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
5954 esac
5955
5956 case "$x_libraries" in *X11R4* )
5957   test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
5958   test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
5959 esac
5960
5961 echo "checking for session-management option" 1>&6
5962 echo "configure:5963: checking for session-management option" >&5;
5963 if test "$with_session" != "no"; then
5964   { test "$extra_verbose" = "yes" && cat << \EOF
5965     Defining HAVE_SESSION
5966 EOF
5967 cat >> confdefs.h <<\EOF
5968 #define HAVE_SESSION 1
5969 EOF
5970 }
5971
5972 fi
5973
5974 test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
5975 test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
5976 echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
5977 echo "configure:5978: checking for X11/Xauth.h" >&5
5978
5979 cat > conftest.$ac_ext <<EOF
5980 #line 5981 "configure"
5981 #include "confdefs.h"
5982 #include <X11/Xauth.h>
5983 EOF
5984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5985 { (eval echo configure:5986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5986 ac_err=`grep -v '^ *+' conftest.out`
5987 if test -z "$ac_err"; then
5988   rm -rf conftest*
5989   eval "ac_cv_header_$ac_safe=yes"
5990 else
5991   echo "$ac_err" >&5
5992   echo "configure: failed program was:" >&5
5993   cat conftest.$ac_ext >&5
5994   rm -rf conftest*
5995   eval "ac_cv_header_$ac_safe=no"
5996 fi
5997 rm -f conftest*
5998 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5999   echo "$ac_t""yes" 1>&6
6000   :
6001 else
6002   echo "$ac_t""no" 1>&6
6003 with_xauth=no
6004 fi
6005  }
6006 test -z "$with_xauth" && { 
6007 echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
6008 echo "configure:6009: checking for XauGetAuthByAddr in -lXau" >&5
6009 ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
6010
6011 xe_check_libs=" -lXau "
6012 cat > conftest.$ac_ext <<EOF
6013 #line 6014 "configure"
6014 #include "confdefs.h"
6015 /* Override any gcc2 internal prototype to avoid an error.  */
6016 /* We use char because int might match the return type of a gcc2
6017     builtin and then its argument prototype would still apply.  */
6018 char XauGetAuthByAddr();
6019
6020 int main() {
6021 XauGetAuthByAddr()
6022 ; return 0; }
6023 EOF
6024 if { (eval echo configure:6025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6025   rm -rf conftest*
6026   eval "ac_cv_lib_$ac_lib_var=yes"
6027 else
6028   echo "configure: failed program was:" >&5
6029   cat conftest.$ac_ext >&5
6030   rm -rf conftest*
6031   eval "ac_cv_lib_$ac_lib_var=no"
6032 fi
6033 rm -f conftest*
6034 xe_check_libs=""
6035
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6037   echo "$ac_t""yes" 1>&6
6038   :
6039 else
6040   echo "$ac_t""no" 1>&6
6041 with_xauth=no
6042 fi
6043
6044  }
6045 test -z "$with_xauth" && with_xauth=yes
6046 if test "$with_xauth" = "yes"; then
6047   { test "$extra_verbose" = "yes" && cat << \EOF
6048     Defining HAVE_XAUTH
6049 EOF
6050 cat >> confdefs.h <<\EOF
6051 #define HAVE_XAUTH 1
6052 EOF
6053 }
6054
6055   
6056 T=""
6057 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
6058 libs_xauth="$T"
6059
6060 fi
6061
6062
6063
6064
6065 if test "$with_tooltalk" != "no" ; then
6066       for dir in "" "Tt/" "desktop/" ; do
6067     ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
6068 echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
6069 echo "configure:6070: checking for ${dir}tt_c.h" >&5
6070
6071 cat > conftest.$ac_ext <<EOF
6072 #line 6073 "configure"
6073 #include "confdefs.h"
6074 #include <${dir}tt_c.h>
6075 EOF
6076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6077 { (eval echo configure:6078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6078 ac_err=`grep -v '^ *+' conftest.out`
6079 if test -z "$ac_err"; then
6080   rm -rf conftest*
6081   eval "ac_cv_header_$ac_safe=yes"
6082 else
6083   echo "$ac_err" >&5
6084   echo "configure: failed program was:" >&5
6085   cat conftest.$ac_ext >&5
6086   rm -rf conftest*
6087   eval "ac_cv_header_$ac_safe=no"
6088 fi
6089 rm -f conftest*
6090 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6091   echo "$ac_t""yes" 1>&6
6092   tt_c_h_path="${dir}tt_c.h"; break
6093 else
6094   echo "$ac_t""no" 1>&6
6095 fi
6096
6097   done
6098   if test -z "$tt_c_h_path"; then
6099     if test "$with_tooltalk" = "yes"; then
6100       (echo "$progname: Usage error:"
6101 echo " " "Unable to find required tooltalk header files."
6102 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6103     fi
6104     with_tooltalk=no
6105   fi
6106 fi
6107 if test "$with_tooltalk" != "no" ; then
6108   for extra_libs in "" "-lI18N -lce" "-lcxx"; do
6109     
6110 xe_msg_checking="for tt_message_create in -ltt"
6111 test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
6112 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6113 echo "configure:6114: checking "$xe_msg_checking"" >&5
6114 ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
6115
6116 xe_check_libs=" -ltt $extra_libs"
6117 cat > conftest.$ac_ext <<EOF
6118 #line 6119 "configure"
6119 #include "confdefs.h"
6120 /* Override any gcc2 internal prototype to avoid an error.  */
6121 /* We use char because int might match the return type of a gcc2
6122     builtin and then its argument prototype would still apply.  */
6123 char tt_message_create();
6124
6125 int main() {
6126 tt_message_create()
6127 ; return 0; }
6128 EOF
6129 if { (eval echo configure:6130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6130   rm -rf conftest*
6131   eval "ac_cv_lib_$ac_lib_var=yes"
6132 else
6133   echo "configure: failed program was:" >&5
6134   cat conftest.$ac_ext >&5
6135   rm -rf conftest*
6136   eval "ac_cv_lib_$ac_lib_var=no"
6137 fi
6138 rm -f conftest*
6139 xe_check_libs=""
6140
6141 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6142   echo "$ac_t""yes" 1>&6
6143   tt_libs="-ltt $extra_libs"; break
6144 else
6145   echo "$ac_t""no" 1>&6
6146 :
6147 fi
6148
6149
6150   done
6151   if test -z "$tt_libs"; then
6152     if test "$with_tooltalk" = "yes"; then
6153       (echo "$progname: Usage error:"
6154 echo " " "Unable to find required tooltalk libraries."
6155 echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
6156     fi
6157     with_tooltalk=no
6158   fi
6159 fi
6160 test -z "$with_tooltalk" && with_tooltalk=yes
6161 if test "$with_tooltalk" = "yes"; then
6162   { test "$extra_verbose" = "yes" && cat << \EOF
6163     Defining TOOLTALK
6164 EOF
6165 cat >> confdefs.h <<\EOF
6166 #define TOOLTALK 1
6167 EOF
6168 }
6169
6170   { test "$extra_verbose" = "yes" && cat << EOF
6171     Defining TT_C_H_PATH = "$tt_c_h_path"
6172 EOF
6173 cat >> confdefs.h <<EOF
6174 #define TT_C_H_PATH "$tt_c_h_path"
6175 EOF
6176 }
6177
6178   libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
6179   extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
6180    echo "    xemacs will be linked with \"tooltalk.o\""
6181  fi
6182 fi
6183
6184 test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
6185 echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
6186 echo "configure:6187: checking for Dt/Dt.h" >&5
6187
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6190 "configure"
6190 #include "confdefs.h"
6191 #include <Dt/Dt.h>
6192 EOF
6193 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6194 { (eval echo configure:6195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6195 ac_err=`grep -v '^ *+' conftest.out`
6196 if test -z "$ac_err"; then
6197   rm -rf conftest*
6198   eval "ac_cv_header_$ac_safe=yes"
6199 else
6200   echo "$ac_err" >&5
6201   echo "configure: failed program was:" >&5
6202   cat conftest.$ac_ext >&5
6203   rm -rf conftest*
6204   eval "ac_cv_header_$ac_safe=no"
6205 fi
6206 rm -f conftest*
6207 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6208   echo "$ac_t""yes" 1>&6
6209   :
6210 else
6211   echo "$ac_t""no" 1>&6
6212 with_cde=no
6213 fi
6214  }
6215 test -z "$with_cde" && { 
6216 echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
6217 echo "configure:6218: checking for DtDndDragStart in -lDtSvc" >&5
6218 ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
6219
6220 xe_check_libs=" -lDtSvc "
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6224 /* Override any gcc2 internal prototype to avoid an error.  */
6225 /* We use char because int might match the return type of a gcc2
6226     builtin and then its argument prototype would still apply.  */
6227 char DtDndDragStart();
6228
6229 int main() {
6230 DtDndDragStart()
6231 ; return 0; }
6232 EOF
6233 if { (eval echo configure:6234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6234   rm -rf conftest*
6235   eval "ac_cv_lib_$ac_lib_var=yes"
6236 else
6237   echo "configure: failed program was:" >&5
6238   cat conftest.$ac_ext >&5
6239   rm -rf conftest*
6240   eval "ac_cv_lib_$ac_lib_var=no"
6241 fi
6242 rm -f conftest*
6243 xe_check_libs=""
6244
6245 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6246   echo "$ac_t""yes" 1>&6
6247   :
6248 else
6249   echo "$ac_t""no" 1>&6
6250 with_cde=no
6251 fi
6252
6253  }
6254 test -z "$with_cde" && with_cde=yes
6255 if test "$with_dragndrop" = no; then
6256   echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
6257   with_cde=no
6258 fi
6259 if test "$with_cde" = "yes" ; then
6260   { test "$extra_verbose" = "yes" && cat << \EOF
6261     Defining HAVE_CDE
6262 EOF
6263 cat >> confdefs.h <<\EOF
6264 #define HAVE_CDE 1
6265 EOF
6266 }
6267
6268   libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
6269   dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
6270   with_tooltalk=yes # CDE requires Tooltalk
6271   need_motif=yes    # CDE requires Motif
6272 fi
6273
6274 test "$window_system" != "x11" && with_offix=no
6275 if test "$with_xmu" != yes -a "$with_x11" = yes; then
6276   echo "configure: warning: No OffiX without real Xmu support" 1>&2
6277   with_offix=no
6278 fi
6279 if test "$with_dragndrop" = no; then
6280   echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
6281   with_offix=no
6282 fi
6283 if test "$with_cde" = yes; then
6284   echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
6285   with_offix=no
6286 fi
6287 test -z "$with_offix" && with_offix=no
6288 if test "$with_offix" = "yes"; then
6289   { test "$extra_verbose" = "yes" && cat << \EOF
6290     Defining HAVE_OFFIX_DND
6291 EOF
6292 cat >> confdefs.h <<\EOF
6293 #define HAVE_OFFIX_DND 1
6294 EOF
6295 }
6296
6297   dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
6298   dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
6299 fi
6300
6301 echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
6302 echo "configure:6303: checking if drag and drop API is needed" >&5
6303 if test "$with_dragndrop" != "no" ; then
6304   if test -n "$dragndrop_proto" ; then
6305     with_dragndrop=yes
6306     echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
6307     { test "$extra_verbose" = "yes" && cat << \EOF
6308     Defining HAVE_DRAGNDROP
6309 EOF
6310 cat >> confdefs.h <<\EOF
6311 #define HAVE_DRAGNDROP 1
6312 EOF
6313 }
6314
6315     extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
6316   else
6317     with_dragndrop=no
6318     echo "$ac_t""no" 1>&6
6319   fi
6320 fi
6321
6322 echo "checking for LDAP" 1>&6
6323 echo "configure:6324: checking for LDAP" >&5
6324 test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
6325 echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
6326 echo "configure:6327: checking for ldap.h" >&5
6327
6328 cat > conftest.$ac_ext <<EOF
6329 #line 6330 "configure"
6330 #include "confdefs.h"
6331 #include <ldap.h>
6332 EOF
6333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6334 { (eval echo configure:6335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6335 ac_err=`grep -v '^ *+' conftest.out`
6336 if test -z "$ac_err"; then
6337   rm -rf conftest*
6338   eval "ac_cv_header_$ac_safe=yes"
6339 else
6340   echo "$ac_err" >&5
6341   echo "configure: failed program was:" >&5
6342   cat conftest.$ac_ext >&5
6343   rm -rf conftest*
6344   eval "ac_cv_header_$ac_safe=no"
6345 fi
6346 rm -f conftest*
6347 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6348   echo "$ac_t""yes" 1>&6
6349   :
6350 else
6351   echo "$ac_t""no" 1>&6
6352 with_ldap=no
6353 fi
6354  }
6355 test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
6356 echo $ac_n "checking for lber.h""... $ac_c" 1>&6
6357 echo "configure:6358: checking for lber.h" >&5
6358
6359 cat > conftest.$ac_ext <<EOF
6360 #line 6361 "configure"
6361 #include "confdefs.h"
6362 #include <lber.h>
6363 EOF
6364 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6365 { (eval echo configure:6366: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6366 ac_err=`grep -v '^ *+' conftest.out`
6367 if test -z "$ac_err"; then
6368   rm -rf conftest*
6369   eval "ac_cv_header_$ac_safe=yes"
6370 else
6371   echo "$ac_err" >&5
6372   echo "configure: failed program was:" >&5
6373   cat conftest.$ac_ext >&5
6374   rm -rf conftest*
6375   eval "ac_cv_header_$ac_safe=no"
6376 fi
6377 rm -f conftest*
6378 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6379   echo "$ac_t""yes" 1>&6
6380   :
6381 else
6382   echo "$ac_t""no" 1>&6
6383 with_ldap=no
6384 fi
6385  }
6386 if test "$with_ldap" != "no"; then
6387   test -z "$with_umich_ldap" && { 
6388 xe_msg_checking="for ldap_open in -lldap"
6389 test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
6390 echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
6391 echo "configure:6392: checking "$xe_msg_checking"" >&5
6392 ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
6393
6394 xe_check_libs=" -lldap -llber"
6395 cat > conftest.$ac_ext <<EOF
6396 #line 6397 "configure"
6397 #include "confdefs.h"
6398 /* Override any gcc2 internal prototype to avoid an error.  */
6399 /* We use char because int might match the return type of a gcc2
6400     builtin and then its argument prototype would still apply.  */
6401 char ldap_open();
6402
6403 int main() {
6404 ldap_open()
6405 ; return 0; }
6406 EOF
6407 if { (eval echo configure:6408: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6408   rm -rf conftest*
6409   eval "ac_cv_lib_$ac_lib_var=yes"
6410 else
6411   echo "configure: failed program was:" >&5
6412   cat conftest.$ac_ext >&5
6413   rm -rf conftest*
6414   eval "ac_cv_lib_$ac_lib_var=no"
6415 fi
6416 rm -f conftest*
6417 xe_check_libs=""
6418
6419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6420   echo "$ac_t""yes" 1>&6
6421   with_umich_ldap=yes
6422 else
6423   echo "$ac_t""no" 1>&6
6424 with_umich_ldap=no
6425 fi
6426
6427  }
6428   test "$with_umich_ldap" = "no" && { 
6429 echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
6430 echo "configure:6431: checking for ldap_set_option in -lldap10" >&5
6431 ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
6432
6433 xe_check_libs=" -lldap10 "
6434 cat > conftest.$ac_ext <<EOF
6435 #line 6436 "configure"
6436 #include "confdefs.h"
6437 /* Override any gcc2 internal prototype to avoid an error.  */
6438 /* We use char because int might match the return type of a gcc2
6439     builtin and then its argument prototype would still apply.  */
6440 char ldap_set_option();
6441
6442 int main() {
6443 ldap_set_option()
6444 ; return 0; }
6445 EOF
6446 if { (eval echo configure:6447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6447   rm -rf conftest*
6448   eval "ac_cv_lib_$ac_lib_var=yes"
6449 else
6450   echo "configure: failed program was:" >&5
6451   cat conftest.$ac_ext >&5
6452   rm -rf conftest*
6453   eval "ac_cv_lib_$ac_lib_var=no"
6454 fi
6455 rm -f conftest*
6456 xe_check_libs=""
6457
6458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6459   echo "$ac_t""yes" 1>&6
6460   with_ns_ldap=yes
6461 else
6462   echo "$ac_t""no" 1>&6
6463 with_ns_ldap=no
6464 fi
6465
6466  }
6467   test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
6468 fi
6469 if test "$with_ldap" = "yes"; then
6470   { test "$extra_verbose" = "yes" && cat << \EOF
6471     Defining HAVE_LDAP
6472 EOF
6473 cat >> confdefs.h <<\EOF
6474 #define HAVE_LDAP 1
6475 EOF
6476 }
6477
6478   extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
6479    echo "    xemacs will be linked with \"eldap.o\""
6480  fi
6481   if test "$with_umich_ldap" = "yes" ; then
6482     { test "$extra_verbose" = "yes" && cat << \EOF
6483     Defining HAVE_UMICH_LDAP
6484 EOF
6485 cat >> confdefs.h <<\EOF
6486 #define HAVE_UMICH_LDAP 1
6487 EOF
6488 }
6489
6490     LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
6491     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6492   elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
6493     { test "$extra_verbose" = "yes" && cat << \EOF
6494     Defining HAVE_NS_LDAP
6495 EOF
6496 cat >> confdefs.h <<\EOF
6497 #define HAVE_NS_LDAP 1
6498 EOF
6499 }
6500
6501     LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
6502   elif test "$with_ldap" = "yes" ; then
6503     LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
6504   fi
6505 fi
6506
6507
6508 if test "$window_system" != "none"; then
6509   echo "checking for graphics libraries" 1>&6
6510 echo "configure:6511: checking for graphics libraries" >&5
6511
6512     xpm_problem=""
6513   if test -z "$with_xpm"; then
6514     echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
6515 echo "configure:6516: checking for Xpm - no older than 3.4f" >&5
6516     xe_check_libs=-lXpm
6517     cat > conftest.$ac_ext <<EOF
6518 #line 6519 "configure"
6519 #include "confdefs.h"
6520 #include <X11/xpm.h>
6521     int main(int c, char **v) {
6522     return c == 1 ? 0 :
6523       XpmIncludeVersion != XpmLibraryVersion() ? 1 :
6524       XpmIncludeVersion < 30406 ? 2 : 0 ;}
6525 EOF
6526 if { (eval echo configure:6527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6527 then
6528   ./conftest dummy_arg; xpm_status=$?;
6529       if test "$xpm_status" = "0"; then
6530         with_xpm=yes;
6531       else
6532         with_xpm=no;
6533         if test "$xpm_status" = "1"; then
6534           xpm_problem="Xpm library version and header file version don't match!"
6535         elif test "$xpm_status" = "2"; then
6536           xpm_problem="Xpm library version is too old!"
6537         else
6538           xpm_problem="Internal xpm detection logic error!"
6539         fi
6540         echo "
6541 *** WARNING *** $xpm_problem
6542   I'm not touching that with a 10-foot pole!
6543   If you really want to use the installed version of Xpm, rerun
6544   configure and add '--with-xpm=yes', but don't blame me if XEmacs crashes!"
6545     fi
6546 else
6547   conftest_rc="$?"
6548   echo "configure: failed program was:" >&5
6549   cat conftest.$ac_ext >&5
6550   rm -fr conftest*
6551   with_xpm=no
6552 fi
6553 rm -fr conftest*
6554     xe_check_libs=
6555     echo "$ac_t""$with_xpm" 1>&6
6556   fi
6557   if test "$with_xpm" = "yes"; then
6558     { test "$extra_verbose" = "yes" && cat << \EOF
6559     Defining HAVE_XPM
6560 EOF
6561 cat >> confdefs.h <<\EOF
6562 #define HAVE_XPM 1
6563 EOF
6564 }
6565
6566     libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
6567     echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
6568 echo "configure:6569: checking for \"FOR_MSW\" xpm" >&5
6569     xe_check_libs=-lXpm
6570     cat > conftest.$ac_ext <<EOF
6571 #line 6572 "configure"
6572 #include "confdefs.h"
6573
6574 int main() {
6575 XpmCreatePixmapFromData()
6576 ; return 0; }
6577 EOF
6578 if { (eval echo configure:6579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6579   rm -rf conftest*
6580   xpm_for_msw=no
6581 else
6582   echo "configure: failed program was:" >&5
6583   cat conftest.$ac_ext >&5
6584   rm -rf conftest*
6585   xpm_for_msw=yes
6586 fi
6587 rm -f conftest*
6588     xe_check_libs=
6589     echo "$ac_t""$xpm_for_msw" 1>&6
6590     if test "$xpm_for_msw" = "yes"; then
6591       { test "$extra_verbose" = "yes" && cat << \EOF
6592     Defining FOR_MSW
6593 EOF
6594 cat >> confdefs.h <<\EOF
6595 #define FOR_MSW 1
6596 EOF
6597 }
6598
6599     fi
6600   fi
6601
6602         if test "$with_gif" != "no"; then
6603     with_gif="yes"
6604     { test "$extra_verbose" = "yes" && cat << \EOF
6605     Defining HAVE_GIF
6606 EOF
6607 cat >> confdefs.h <<\EOF
6608 #define HAVE_GIF 1
6609 EOF
6610 }
6611
6612     extra_objs="$extra_objs dgif_lib.o gif_io.o" &&  if test "$extra_verbose" = "yes"; then
6613    echo "    xemacs will be linked with \"dgif_lib.o gif_io.o\""
6614  fi
6615   fi
6616
6617       if test "$with_png $with_tiff" != "no no"; then
6618     
6619 echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
6620 echo "configure:6621: checking for inflate in -lc" >&5
6621 ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
6622
6623 xe_check_libs=" -lc "
6624 cat > conftest.$ac_ext <<EOF
6625 #line 6626 "configure"
6626 #include "confdefs.h"
6627 /* Override any gcc2 internal prototype to avoid an error.  */
6628 /* We use char because int might match the return type of a gcc2
6629     builtin and then its argument prototype would still apply.  */
6630 char inflate();
6631
6632 int main() {
6633 inflate()
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6637   rm -rf conftest*
6638   eval "ac_cv_lib_$ac_lib_var=yes"
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_lib_$ac_lib_var=no"
6644 fi
6645 rm -f conftest*
6646 xe_check_libs=""
6647
6648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6649   echo "$ac_t""yes" 1>&6
6650   :
6651 else
6652   echo "$ac_t""no" 1>&6
6653
6654 echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
6655 echo "configure:6656: checking for inflate in -lz" >&5
6656 ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
6657
6658 xe_check_libs=" -lz "
6659 cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662 /* Override any gcc2 internal prototype to avoid an error.  */
6663 /* We use char because int might match the return type of a gcc2
6664     builtin and then its argument prototype would still apply.  */
6665 char inflate();
6666
6667 int main() {
6668 inflate()
6669 ; return 0; }
6670 EOF
6671 if { (eval echo configure:6672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6672   rm -rf conftest*
6673   eval "ac_cv_lib_$ac_lib_var=yes"
6674 else
6675   echo "configure: failed program was:" >&5
6676   cat conftest.$ac_ext >&5
6677   rm -rf conftest*
6678   eval "ac_cv_lib_$ac_lib_var=no"
6679 fi
6680 rm -f conftest*
6681 xe_check_libs=""
6682
6683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6684   echo "$ac_t""yes" 1>&6
6685   libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
6686 else
6687   echo "$ac_t""no" 1>&6
6688
6689 echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
6690 echo "configure:6691: checking for inflate in -lgz" >&5
6691 ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
6692
6693 xe_check_libs=" -lgz "
6694 cat > conftest.$ac_ext <<EOF
6695 #line 6696 "configure"
6696 #include "confdefs.h"
6697 /* Override any gcc2 internal prototype to avoid an error.  */
6698 /* We use char because int might match the return type of a gcc2
6699     builtin and then its argument prototype would still apply.  */
6700 char inflate();
6701
6702 int main() {
6703 inflate()
6704 ; return 0; }
6705 EOF
6706 if { (eval echo configure:6707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6707   rm -rf conftest*
6708   eval "ac_cv_lib_$ac_lib_var=yes"
6709 else
6710   echo "configure: failed program was:" >&5
6711   cat conftest.$ac_ext >&5
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=no"
6714 fi
6715 rm -f conftest*
6716 xe_check_libs=""
6717
6718 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6719   echo "$ac_t""yes" 1>&6
6720   libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
6721 else
6722   echo "$ac_t""no" 1>&6
6723 fi
6724
6725
6726 fi
6727
6728
6729 fi
6730
6731
6732   fi
6733
6734     test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
6735 echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
6736 echo "configure:6737: checking for jpeglib.h" >&5
6737
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6741 #include <jpeglib.h>
6742 EOF
6743 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6744 { (eval echo configure:6745: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6745 ac_err=`grep -v '^ *+' conftest.out`
6746 if test -z "$ac_err"; then
6747   rm -rf conftest*
6748   eval "ac_cv_header_$ac_safe=yes"
6749 else
6750   echo "$ac_err" >&5
6751   echo "configure: failed program was:" >&5
6752   cat conftest.$ac_ext >&5
6753   rm -rf conftest*
6754   eval "ac_cv_header_$ac_safe=no"
6755 fi
6756 rm -f conftest*
6757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6758   echo "$ac_t""yes" 1>&6
6759   :
6760 else
6761   echo "$ac_t""no" 1>&6
6762 with_jpeg=no
6763 fi
6764  }
6765   test -z "$with_jpeg" && { 
6766 echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
6767 echo "configure:6768: checking for jpeg_destroy_decompress in -ljpeg" >&5
6768 ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
6769
6770 xe_check_libs=" -ljpeg "
6771 cat > conftest.$ac_ext <<EOF
6772 #line 6773 "configure"
6773 #include "confdefs.h"
6774 /* Override any gcc2 internal prototype to avoid an error.  */
6775 /* We use char because int might match the return type of a gcc2
6776     builtin and then its argument prototype would still apply.  */
6777 char jpeg_destroy_decompress();
6778
6779 int main() {
6780 jpeg_destroy_decompress()
6781 ; return 0; }
6782 EOF
6783 if { (eval echo configure:6784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6784   rm -rf conftest*
6785   eval "ac_cv_lib_$ac_lib_var=yes"
6786 else
6787   echo "configure: failed program was:" >&5
6788   cat conftest.$ac_ext >&5
6789   rm -rf conftest*
6790   eval "ac_cv_lib_$ac_lib_var=no"
6791 fi
6792 rm -f conftest*
6793 xe_check_libs=""
6794
6795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6796   echo "$ac_t""yes" 1>&6
6797   :
6798 else
6799   echo "$ac_t""no" 1>&6
6800 with_jpeg=no
6801 fi
6802
6803  }
6804   test -z "$with_jpeg" && with_jpeg=yes
6805   if test "$with_jpeg" = "yes"; then
6806     { test "$extra_verbose" = "yes" && cat << \EOF
6807     Defining HAVE_JPEG
6808 EOF
6809 cat >> confdefs.h <<\EOF
6810 #define HAVE_JPEG 1
6811 EOF
6812 }
6813
6814     libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
6815   fi
6816
6817     png_problem=""
6818   test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
6819 echo "configure:6820: checking for pow" >&5
6820
6821 cat > conftest.$ac_ext <<EOF
6822 #line 6823 "configure"
6823 #include "confdefs.h"
6824 /* System header to define __stub macros and hopefully few prototypes,
6825     which can conflict with char pow(); below.  */
6826 #include <assert.h>
6827 /* Override any gcc2 internal prototype to avoid an error.  */
6828 /* We use char because int might match the return type of a gcc2
6829     builtin and then its argument prototype would still apply.  */
6830 char pow();
6831
6832 int main() {
6833
6834 /* The GNU C library defines this for functions which it implements
6835     to always fail with ENOSYS.  Some functions are actually named
6836     something starting with __ and the normal name is an alias.  */
6837 #if defined (__stub_pow) || defined (__stub___pow)
6838 choke me
6839 #else
6840 pow();
6841 #endif
6842
6843 ; return 0; }
6844 EOF
6845 if { (eval echo configure:6846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6846   rm -rf conftest*
6847   eval "ac_cv_func_pow=yes"
6848 else
6849   echo "configure: failed program was:" >&5
6850   cat conftest.$ac_ext >&5
6851   rm -rf conftest*
6852   eval "ac_cv_func_pow=no"
6853 fi
6854 rm -f conftest*
6855
6856 if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
6857   echo "$ac_t""yes" 1>&6
6858   :
6859 else
6860   echo "$ac_t""no" 1>&6
6861 with_png=no
6862 fi
6863  }
6864   test -z "$with_png" && { ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'`
6865 echo $ac_n "checking for png.h""... $ac_c" 1>&6
6866 echo "configure:6867: checking for png.h" >&5
6867
6868 cat > conftest.$ac_ext <<EOF
6869 #line 6870 "configure"
6870 #include "confdefs.h"
6871 #include <png.h>
6872 EOF
6873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6874 { (eval echo configure:6875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6875 ac_err=`grep -v '^ *+' conftest.out`
6876 if test -z "$ac_err"; then
6877   rm -rf conftest*
6878   eval "ac_cv_header_$ac_safe=yes"
6879 else
6880   echo "$ac_err" >&5
6881   echo "configure: failed program was:" >&5
6882   cat conftest.$ac_ext >&5
6883   rm -rf conftest*
6884   eval "ac_cv_header_$ac_safe=no"
6885 fi
6886 rm -f conftest*
6887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6888   echo "$ac_t""yes" 1>&6
6889   :
6890 else
6891   echo "$ac_t""no" 1>&6
6892 with_png=no
6893 fi
6894  }
6895   test -z "$with_png" && { 
6896 echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
6897 echo "configure:6898: checking for png_read_image in -lpng" >&5
6898 ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
6899
6900 xe_check_libs=" -lpng "
6901 cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904 /* Override any gcc2 internal prototype to avoid an error.  */
6905 /* We use char because int might match the return type of a gcc2
6906     builtin and then its argument prototype would still apply.  */
6907 char png_read_image();
6908
6909 int main() {
6910 png_read_image()
6911 ; return 0; }
6912 EOF
6913 if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
6914   rm -rf conftest*
6915   eval "ac_cv_lib_$ac_lib_var=yes"
6916 else
6917   echo "configure: failed program was:" >&5
6918   cat conftest.$ac_ext >&5
6919   rm -rf conftest*
6920   eval "ac_cv_lib_$ac_lib_var=no"
6921 fi
6922 rm -f conftest*
6923 xe_check_libs=""
6924
6925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
6926   echo "$ac_t""yes" 1>&6
6927   :
6928 else
6929   echo "$ac_t""no" 1>&6
6930 with_png=no
6931 fi
6932
6933  }
6934   if test -z "$with_png"; then
6935     echo $ac_n "checking for workable png version information""... $ac_c" 1>&6
6936 echo "configure:6937: checking for workable png version information" >&5
6937     xe_check_libs="-lpng -lz"
6938     cat > conftest.$ac_ext <<EOF
6939 #line 6940 "configure"
6940 #include "confdefs.h"
6941 #include <png.h>
6942     int main(int c, char **v) {
6943     if (c == 1) return 0;
6944     if (strcmp(png_libpng_ver, PNG_LIBPNG_VER_STRING) != 0) return 1;
6945     return (PNG_LIBPNG_VER < 10002) ? 2 : 0 ;}
6946 EOF
6947 if { (eval echo configure:6948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
6948 then
6949   ./conftest dummy_arg; png_status=$?;
6950       if test "$png_status" = "0"; then
6951         with_png=yes;
6952       else
6953         with_png=no;
6954         if test "$png_status" = "1"; then
6955           png_problem="PNG library version and header file don't match!"
6956         elif test "$png_status" = "2"; then
6957           png_problem="PNG library version too old (pre 1.0.2)!"
6958         fi
6959         echo "
6960 *** WARNING *** $png_problem
6961   I'm not touching that with a 10-foot pole!
6962   If you really want to use the installed version of libPNG, rerun
6963   configure and add '--with-png=yes', but don't blame me if XEmacs crashes!"
6964     fi
6965 else
6966   conftest_rc="$?"
6967   echo "configure: failed program was:" >&5
6968   cat conftest.$ac_ext >&5
6969   rm -fr conftest*
6970   with_png=no
6971 fi
6972 rm -fr conftest*
6973     xe_check_libs=
6974     echo "$ac_t""$with_png" 1>&6
6975   fi
6976   if test "$with_png" = "yes"; then
6977     { test "$extra_verbose" = "yes" && cat << \EOF
6978     Defining HAVE_PNG
6979 EOF
6980 cat >> confdefs.h <<\EOF
6981 #define HAVE_PNG 1
6982 EOF
6983 }
6984
6985     libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
6986   fi
6987
6988     test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
6989 echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
6990 echo "configure:6991: checking for tiffio.h" >&5
6991
6992 cat > conftest.$ac_ext <<EOF
6993 #line 6994 "configure"
6994 #include "confdefs.h"
6995 #include <tiffio.h>
6996 EOF
6997 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6998 { (eval echo configure:6999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6999 ac_err=`grep -v '^ *+' conftest.out`
7000 if test -z "$ac_err"; then
7001   rm -rf conftest*
7002   eval "ac_cv_header_$ac_safe=yes"
7003 else
7004   echo "$ac_err" >&5
7005   echo "configure: failed program was:" >&5
7006   cat conftest.$ac_ext >&5
7007   rm -rf conftest*
7008   eval "ac_cv_header_$ac_safe=no"
7009 fi
7010 rm -f conftest*
7011 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7012   echo "$ac_t""yes" 1>&6
7013   :
7014 else
7015   echo "$ac_t""no" 1>&6
7016 with_tiff=no
7017 fi
7018  }
7019   test -z "$with_tiff" && { 
7020 echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
7021 echo "configure:7022: checking for TIFFClientOpen in -ltiff" >&5
7022 ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
7023
7024 xe_check_libs=" -ltiff "
7025 cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7028 /* Override any gcc2 internal prototype to avoid an error.  */
7029 /* We use char because int might match the return type of a gcc2
7030     builtin and then its argument prototype would still apply.  */
7031 char TIFFClientOpen();
7032
7033 int main() {
7034 TIFFClientOpen()
7035 ; return 0; }
7036 EOF
7037 if { (eval echo configure:7038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7038   rm -rf conftest*
7039   eval "ac_cv_lib_$ac_lib_var=yes"
7040 else
7041   echo "configure: failed program was:" >&5
7042   cat conftest.$ac_ext >&5
7043   rm -rf conftest*
7044   eval "ac_cv_lib_$ac_lib_var=no"
7045 fi
7046 rm -f conftest*
7047 xe_check_libs=""
7048
7049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7050   echo "$ac_t""yes" 1>&6
7051   :
7052 else
7053   echo "$ac_t""no" 1>&6
7054 with_tiff=no
7055 fi
7056
7057  }
7058   test -z "$with_tiff" && with_tiff=yes
7059   if test "$with_tiff" = "yes"; then
7060     { test "$extra_verbose" = "yes" && cat << \EOF
7061     Defining HAVE_TIFF
7062 EOF
7063 cat >> confdefs.h <<\EOF
7064 #define HAVE_TIFF 1
7065 EOF
7066 }
7067
7068     libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
7069   fi
7070 fi
7071
7072
7073 if test "$with_x11" = "yes"; then
7074
7075   echo "checking for X11 graphics libraries" 1>&6
7076 echo "configure:7077: checking for X11 graphics libraries" >&5
7077
7078     test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
7079 echo $ac_n "checking for compface.h""... $ac_c" 1>&6
7080 echo "configure:7081: checking for compface.h" >&5
7081
7082 cat > conftest.$ac_ext <<EOF
7083 #line 7084 "configure"
7084 #include "confdefs.h"
7085 #include <compface.h>
7086 EOF
7087 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7088 { (eval echo configure:7089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7089 ac_err=`grep -v '^ *+' conftest.out`
7090 if test -z "$ac_err"; then
7091   rm -rf conftest*
7092   eval "ac_cv_header_$ac_safe=yes"
7093 else
7094   echo "$ac_err" >&5
7095   echo "configure: failed program was:" >&5
7096   cat conftest.$ac_ext >&5
7097   rm -rf conftest*
7098   eval "ac_cv_header_$ac_safe=no"
7099 fi
7100 rm -f conftest*
7101 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7102   echo "$ac_t""yes" 1>&6
7103   :
7104 else
7105   echo "$ac_t""no" 1>&6
7106 with_xface=no
7107 fi
7108  }
7109   test -z "$with_xface" && { 
7110 echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
7111 echo "configure:7112: checking for UnGenFace in -lcompface" >&5
7112 ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
7113
7114 xe_check_libs=" -lcompface "
7115 cat > conftest.$ac_ext <<EOF
7116 #line 7117 "configure"
7117 #include "confdefs.h"
7118 /* Override any gcc2 internal prototype to avoid an error.  */
7119 /* We use char because int might match the return type of a gcc2
7120     builtin and then its argument prototype would still apply.  */
7121 char UnGenFace();
7122
7123 int main() {
7124 UnGenFace()
7125 ; return 0; }
7126 EOF
7127 if { (eval echo configure:7128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7128   rm -rf conftest*
7129   eval "ac_cv_lib_$ac_lib_var=yes"
7130 else
7131   echo "configure: failed program was:" >&5
7132   cat conftest.$ac_ext >&5
7133   rm -rf conftest*
7134   eval "ac_cv_lib_$ac_lib_var=no"
7135 fi
7136 rm -f conftest*
7137 xe_check_libs=""
7138
7139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7140   echo "$ac_t""yes" 1>&6
7141   : 
7142 else
7143   echo "$ac_t""no" 1>&6
7144 with_xface=no
7145 fi
7146
7147  }
7148   test -z "$with_xface" && with_xface=yes
7149   if test "$with_xface" = "yes"; then
7150     { test "$extra_verbose" = "yes" && cat << \EOF
7151     Defining HAVE_XFACE
7152 EOF
7153 cat >> confdefs.h <<\EOF
7154 #define HAVE_XFACE 1
7155 EOF
7156 }
7157
7158     libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
7159   fi
7160
7161     
7162 echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
7163 echo "configure:7164: checking for XawScrollbarSetThumb in -lXaw" >&5
7164 ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
7165
7166 xe_check_libs=" -lXaw "
7167 cat > conftest.$ac_ext <<EOF
7168 #line 7169 "configure"
7169 #include "confdefs.h"
7170 /* Override any gcc2 internal prototype to avoid an error.  */
7171 /* We use char because int might match the return type of a gcc2
7172     builtin and then its argument prototype would still apply.  */
7173 char XawScrollbarSetThumb();
7174
7175 int main() {
7176 XawScrollbarSetThumb()
7177 ; return 0; }
7178 EOF
7179 if { (eval echo configure:7180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7180   rm -rf conftest*
7181   eval "ac_cv_lib_$ac_lib_var=yes"
7182 else
7183   echo "configure: failed program was:" >&5
7184   cat conftest.$ac_ext >&5
7185   rm -rf conftest*
7186   eval "ac_cv_lib_$ac_lib_var=no"
7187 fi
7188 rm -f conftest*
7189 xe_check_libs=""
7190
7191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7192   echo "$ac_t""yes" 1>&6
7193   have_xaw=yes
7194 else
7195   echo "$ac_t""no" 1>&6
7196 have_xaw=no
7197 fi
7198
7199
7200                     
7201     ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
7202 echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
7203 echo "configure:7204: checking for Xm/Xm.h" >&5
7204
7205 cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 #include <Xm/Xm.h>
7209 EOF
7210 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7211 { (eval echo configure:7212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7212 ac_err=`grep -v '^ *+' conftest.out`
7213 if test -z "$ac_err"; then
7214   rm -rf conftest*
7215   eval "ac_cv_header_$ac_safe=yes"
7216 else
7217   echo "$ac_err" >&5
7218   echo "configure: failed program was:" >&5
7219   cat conftest.$ac_ext >&5
7220   rm -rf conftest*
7221   eval "ac_cv_header_$ac_safe=no"
7222 fi
7223 rm -f conftest*
7224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7225   echo "$ac_t""yes" 1>&6
7226   
7227 echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
7228 echo "configure:7229: checking for XmStringFree in -lXm" >&5
7229 ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
7230
7231 xe_check_libs=" -lXm "
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 XmStringFree();
7239
7240 int main() {
7241 XmStringFree()
7242 ; return 0; }
7243 EOF
7244 if { (eval echo configure:7245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; 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   have_motif=yes
7259 else
7260   echo "$ac_t""no" 1>&6
7261 have_motif=no
7262 fi
7263
7264
7265 else
7266   echo "$ac_t""no" 1>&6
7267 have_motif=no
7268 fi
7269
7270
7271   if test "$have_motif" = "yes"; then
7272         echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
7273 echo "configure:7274: checking for Lesstif" >&5
7274     cat > conftest.$ac_ext <<EOF
7275 #line 7276 "configure"
7276 #include "confdefs.h"
7277 #include <Xm/Xm.h>
7278 #ifdef LESSTIF_VERSION
7279 yes
7280 #endif
7281
7282 EOF
7283 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7284   egrep "yes" >/dev/null 2>&1; then
7285   rm -rf conftest*
7286   have_lesstif=yes
7287 else
7288   rm -rf conftest*
7289   have_lesstif=no
7290 fi
7291 rm -f conftest*
7292
7293   echo "$ac_t""$have_lesstif" 1>&6
7294   fi
7295
7296 fi 
7297
7298 case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
7299   with_menubars="lucid" ;;
7300 esac
7301 case "$with_dialogs" in "" | "yes" | "lucid" )
7302   if   test "$have_motif" = "yes"; then with_dialogs="motif"
7303   elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
7304   else with_dialogs=no
7305   fi ;;
7306 esac
7307 case "$with_scrollbars" in "" | "yes" )
7308   with_scrollbars="lucid" ;;
7309 esac
7310
7311 all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
7312
7313 case "$all_widgets" in *athena* )
7314   { test "$extra_verbose" = "yes" && cat << \EOF
7315     Defining LWLIB_USES_ATHENA
7316 EOF
7317 cat >> confdefs.h <<\EOF
7318 #define LWLIB_USES_ATHENA 1
7319 EOF
7320 }
7321
7322   { test "$extra_verbose" = "yes" && cat << \EOF
7323     Defining NEED_ATHENA
7324 EOF
7325 cat >> confdefs.h <<\EOF
7326 #define NEED_ATHENA 1
7327 EOF
7328 }
7329
7330   lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
7331   libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
7332 esac
7333
7334 case "$all_widgets" in *motif* )
7335   { test "$extra_verbose" = "yes" && cat << \EOF
7336     Defining LWLIB_USES_MOTIF
7337 EOF
7338 cat >> confdefs.h <<\EOF
7339 #define LWLIB_USES_MOTIF 1
7340 EOF
7341 }
7342
7343   { test "$extra_verbose" = "yes" && cat << \EOF
7344     Defining NEED_MOTIF
7345 EOF
7346 cat >> confdefs.h <<\EOF
7347 #define NEED_MOTIF 1
7348 EOF
7349 }
7350
7351   lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
7352   need_motif=yes ;;
7353 esac
7354
7355 test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7356 test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
7357 test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
7358 case "$all_widgets" in *lucid* )
7359   { test "$extra_verbose" = "yes" && cat << \EOF
7360     Defining NEED_LUCID
7361 EOF
7362 cat >> confdefs.h <<\EOF
7363 #define NEED_LUCID 1
7364 EOF
7365 }
7366
7367   lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
7368 esac
7369
7370
7371
7372 case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7373     Defining LWLIB_SCROLLBARS_ATHENA
7374 EOF
7375 cat >> confdefs.h <<\EOF
7376 #define LWLIB_SCROLLBARS_ATHENA 1
7377 EOF
7378 }
7379 ;; esac
7380 case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
7381     Defining LWLIB_DIALOGS_ATHENA
7382 EOF
7383 cat >> confdefs.h <<\EOF
7384 #define LWLIB_DIALOGS_ATHENA 1
7385 EOF
7386 }
7387    ;; esac
7388 test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7389     Defining LWLIB_SCROLLBARS_ATHENA3D
7390 EOF
7391 cat >> confdefs.h <<\EOF
7392 #define LWLIB_SCROLLBARS_ATHENA3D 1
7393 EOF
7394 }
7395
7396 test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
7397     Defining LWLIB_DIALOGS_ATHENA3D
7398 EOF
7399 cat >> confdefs.h <<\EOF
7400 #define LWLIB_DIALOGS_ATHENA3D 1
7401 EOF
7402 }
7403
7404
7405 test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7406     Defining HAVE_MENUBARS
7407 EOF
7408 cat >> confdefs.h <<\EOF
7409 #define HAVE_MENUBARS 1
7410 EOF
7411 }
7412
7413 test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7414     Defining HAVE_SCROLLBARS
7415 EOF
7416 cat >> confdefs.h <<\EOF
7417 #define HAVE_SCROLLBARS 1
7418 EOF
7419 }
7420
7421 test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7422     Defining HAVE_DIALOGS
7423 EOF
7424 cat >> confdefs.h <<\EOF
7425 #define HAVE_DIALOGS 1
7426 EOF
7427 }
7428
7429 test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
7430     Defining HAVE_TOOLBARS
7431 EOF
7432 cat >> confdefs.h <<\EOF
7433 #define HAVE_TOOLBARS 1
7434 EOF
7435 }
7436
7437
7438 test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7439     Defining LWLIB_MENUBARS_LUCID
7440 EOF
7441 cat >> confdefs.h <<\EOF
7442 #define LWLIB_MENUBARS_LUCID 1
7443 EOF
7444 }
7445
7446 test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
7447     Defining LWLIB_SCROLLBARS_LUCID
7448 EOF
7449 cat >> confdefs.h <<\EOF
7450 #define LWLIB_SCROLLBARS_LUCID 1
7451 EOF
7452 }
7453
7454
7455 test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7456     Defining LWLIB_MENUBARS_MOTIF
7457 EOF
7458 cat >> confdefs.h <<\EOF
7459 #define LWLIB_MENUBARS_MOTIF 1
7460 EOF
7461 }
7462
7463 test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7464     Defining LWLIB_SCROLLBARS_MOTIF
7465 EOF
7466 cat >> confdefs.h <<\EOF
7467 #define LWLIB_SCROLLBARS_MOTIF 1
7468 EOF
7469 }
7470
7471 test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
7472     Defining LWLIB_DIALOGS_MOTIF
7473 EOF
7474 cat >> confdefs.h <<\EOF
7475 #define LWLIB_DIALOGS_MOTIF 1
7476 EOF
7477 }
7478
7479
7480 test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
7481    echo "    xemacs will be linked with \"menubar.o\""
7482  fi
7483 test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
7484    echo "    xemacs will be linked with \"scrollbar.o\""
7485  fi
7486 test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
7487    echo "    xemacs will be linked with \"dialog.o\""
7488  fi
7489 test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
7490    echo "    xemacs will be linked with \"toolbar.o\""
7491  fi
7492
7493 if test "$with_x11" = "yes"; then
7494   test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
7495    echo "    xemacs will be linked with \"menubar-x.o\""
7496  fi
7497   test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7498    echo "    xemacs will be linked with \"scrollbar-x.o\""
7499  fi
7500   test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
7501    echo "    xemacs will be linked with \"dialog-x.o\""
7502  fi
7503   test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
7504    echo "    xemacs will be linked with \"toolbar-x.o\""
7505  fi
7506   test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
7507    echo "    xemacs will be linked with \"gui-x.o\""
7508  fi
7509 else
7510   if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
7511     echo "Attempt to Build NAS sound without X"
7512     echo "Please remove NAS configuration or build with X"
7513     exit 1
7514   fi
7515 fi
7516
7517 test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
7518     Defining USE_MINIMAL_TAGBITS
7519 EOF
7520 cat >> confdefs.h <<\EOF
7521 #define USE_MINIMAL_TAGBITS 1
7522 EOF
7523 }
7524
7525 test "$use_indexed_lrecord_implementation" = "yes" && \
7526   { test "$extra_verbose" = "yes" && cat << \EOF
7527     Defining USE_INDEXED_LRECORD_IMPLEMENTATION
7528 EOF
7529 cat >> confdefs.h <<\EOF
7530 #define USE_INDEXED_LRECORD_IMPLEMENTATION 1
7531 EOF
7532 }
7533
7534
7535
7536 test -z "$with_mule" && with_mule=no
7537 test -z "$with_file_coding" && with_file_coding=no
7538
7539
7540 if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
7541   { test "$extra_verbose" = "yes" && cat << \EOF
7542     Defining FILE_CODING
7543 EOF
7544 cat >> confdefs.h <<\EOF
7545 #define FILE_CODING 1
7546 EOF
7547 }
7548
7549   extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7550    echo "    xemacs will be linked with \"file-coding.o\""
7551  fi
7552 fi
7553
7554 if test "$with_mule" = "yes" ; then
7555   echo "checking for Mule-related features" 1>&6
7556 echo "configure:7557: checking for Mule-related features" >&5
7557   { test "$extra_verbose" = "yes" && cat << \EOF
7558     Defining MULE
7559 EOF
7560 cat >> confdefs.h <<\EOF
7561 #define MULE 1
7562 EOF
7563 }
7564
7565   { test "$extra_verbose" = "yes" && cat << \EOF
7566     Defining FILE_CODING
7567 EOF
7568 cat >> confdefs.h <<\EOF
7569 #define FILE_CODING 1
7570 EOF
7571 }
7572
7573   extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
7574    echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\""
7575  fi
7576
7577     for ac_hdr in libintl.h
7578 do
7579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7581 echo "configure:7582: checking for $ac_hdr" >&5
7582
7583 cat > conftest.$ac_ext <<EOF
7584 #line 7585 "configure"
7585 #include "confdefs.h"
7586 #include <$ac_hdr>
7587 EOF
7588 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7589 { (eval echo configure:7590: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7590 ac_err=`grep -v '^ *+' conftest.out`
7591 if test -z "$ac_err"; then
7592   rm -rf conftest*
7593   eval "ac_cv_header_$ac_safe=yes"
7594 else
7595   echo "$ac_err" >&5
7596   echo "configure: failed program was:" >&5
7597   cat conftest.$ac_ext >&5
7598   rm -rf conftest*
7599   eval "ac_cv_header_$ac_safe=no"
7600 fi
7601 rm -f conftest*
7602 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7603   echo "$ac_t""yes" 1>&6
7604     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7605   { test "$extra_verbose" = "yes" && cat << EOF
7606     Defining $ac_tr_hdr
7607 EOF
7608 cat >> confdefs.h <<EOF
7609 #define $ac_tr_hdr 1
7610 EOF
7611 }
7612  
7613 else
7614   echo "$ac_t""no" 1>&6
7615 fi
7616 done
7617
7618   
7619 echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
7620 echo "configure:7621: checking for strerror in -lintl" >&5
7621 ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
7622
7623 xe_check_libs=" -lintl "
7624 cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7627 /* Override any gcc2 internal prototype to avoid an error.  */
7628 /* We use char because int might match the return type of a gcc2
7629     builtin and then its argument prototype would still apply.  */
7630 char strerror();
7631
7632 int main() {
7633 strerror()
7634 ; return 0; }
7635 EOF
7636 if { (eval echo configure:7637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7637   rm -rf conftest*
7638   eval "ac_cv_lib_$ac_lib_var=yes"
7639 else
7640   echo "configure: failed program was:" >&5
7641   cat conftest.$ac_ext >&5
7642   rm -rf conftest*
7643   eval "ac_cv_lib_$ac_lib_var=no"
7644 fi
7645 rm -f conftest*
7646 xe_check_libs=""
7647
7648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7649   echo "$ac_t""yes" 1>&6
7650     ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7651     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7652   { test "$extra_verbose" = "yes" && cat << EOF
7653     Defining $ac_tr_lib
7654 EOF
7655 cat >> confdefs.h <<EOF
7656 #define $ac_tr_lib 1
7657 EOF
7658 }
7659
7660   LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
7661
7662 else
7663   echo "$ac_t""no" 1>&6
7664 fi
7665
7666
7667
7668   echo "checking for Mule input methods" 1>&6
7669 echo "configure:7670: checking for Mule input methods" >&5
7670         case "$with_xim" in "" | "yes" )
7671     echo "checking for XIM" 1>&6
7672 echo "configure:7673: checking for XIM" >&5
7673         if test "$have_lesstif" = "yes"; then with_xim=xlib
7674     else 
7675 echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
7676 echo "configure:7677: checking for XmImMbLookupString in -lXm" >&5
7677 ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
7678
7679 xe_check_libs=" -lXm "
7680 cat > conftest.$ac_ext <<EOF
7681 #line 7682 "configure"
7682 #include "confdefs.h"
7683 /* Override any gcc2 internal prototype to avoid an error.  */
7684 /* We use char because int might match the return type of a gcc2
7685     builtin and then its argument prototype would still apply.  */
7686 char XmImMbLookupString();
7687
7688 int main() {
7689 XmImMbLookupString()
7690 ; return 0; }
7691 EOF
7692 if { (eval echo configure:7693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7693   rm -rf conftest*
7694   eval "ac_cv_lib_$ac_lib_var=yes"
7695 else
7696   echo "configure: failed program was:" >&5
7697   cat conftest.$ac_ext >&5
7698   rm -rf conftest*
7699   eval "ac_cv_lib_$ac_lib_var=no"
7700 fi
7701 rm -f conftest*
7702 xe_check_libs=""
7703
7704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7705   echo "$ac_t""yes" 1>&6
7706   with_xim=motif
7707 else
7708   echo "$ac_t""no" 1>&6
7709 with_xim=xlib
7710 fi
7711
7712
7713     fi
7714   esac
7715   if test "$with_xim" != "no"; then
7716     { test "$extra_verbose" = "yes" && cat << \EOF
7717     Defining HAVE_XIM
7718 EOF
7719 cat >> confdefs.h <<\EOF
7720 #define HAVE_XIM 1
7721 EOF
7722 }
7723
7724     if test "$with_xim" = "xlib"; then
7725       { test "$extra_verbose" = "yes" && cat << \EOF
7726     Defining XIM_XLIB
7727 EOF
7728 cat >> confdefs.h <<\EOF
7729 #define XIM_XLIB 1
7730 EOF
7731 }
7732
7733       extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
7734    echo "    xemacs will be linked with \"input-method-xlib.o\""
7735  fi
7736     fi
7737     if test "$with_xim" = "motif"; then
7738       { test "$extra_verbose" = "yes" && cat << \EOF
7739     Defining XIM_MOTIF
7740 EOF
7741 cat >> confdefs.h <<\EOF
7742 #define XIM_MOTIF 1
7743 EOF
7744 }
7745
7746       need_motif=yes
7747       extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
7748    echo "    xemacs will be linked with \"input-method-motif.o\""
7749  fi
7750     fi
7751     if test "$with_xim" = "motif"; then
7752       with_xfs=no
7753     fi
7754   fi
7755
7756     if test "$with_xfs" = "yes" ; then
7757     echo "checking for XFontSet" 1>&6
7758 echo "configure:7759: checking for XFontSet" >&5
7759     
7760 echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
7761 echo "configure:7762: checking for XmbDrawString in -lX11" >&5
7762 ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
7763
7764 xe_check_libs=" -lX11 "
7765 cat > conftest.$ac_ext <<EOF
7766 #line 7767 "configure"
7767 #include "confdefs.h"
7768 /* Override any gcc2 internal prototype to avoid an error.  */
7769 /* We use char because int might match the return type of a gcc2
7770     builtin and then its argument prototype would still apply.  */
7771 char XmbDrawString();
7772
7773 int main() {
7774 XmbDrawString()
7775 ; return 0; }
7776 EOF
7777 if { (eval echo configure:7778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7778   rm -rf conftest*
7779   eval "ac_cv_lib_$ac_lib_var=yes"
7780 else
7781   echo "configure: failed program was:" >&5
7782   cat conftest.$ac_ext >&5
7783   rm -rf conftest*
7784   eval "ac_cv_lib_$ac_lib_var=no"
7785 fi
7786 rm -f conftest*
7787 xe_check_libs=""
7788
7789 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7790   echo "$ac_t""yes" 1>&6
7791   :
7792 else
7793   echo "$ac_t""no" 1>&6
7794 with_xfs=no
7795 fi
7796
7797
7798     if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
7799       { test "$extra_verbose" = "yes" && cat << \EOF
7800     Defining USE_XFONTSET
7801 EOF
7802 cat >> confdefs.h <<\EOF
7803 #define USE_XFONTSET 1
7804 EOF
7805 }
7806
7807       if test "$with_xim" = "no" ; then
7808         extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
7809    echo "    xemacs will be linked with \"input-method-xfs.o\""
7810  fi
7811       fi
7812     fi
7813   fi 
7814     test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
7815   test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
7816 echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
7817 echo "configure:7818: checking for wnn/jllib.h" >&5
7818
7819 cat > conftest.$ac_ext <<EOF
7820 #line 7821 "configure"
7821 #include "confdefs.h"
7822 #include <wnn/jllib.h>
7823 EOF
7824 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7825 { (eval echo configure:7826: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7826 ac_err=`grep -v '^ *+' conftest.out`
7827 if test -z "$ac_err"; then
7828   rm -rf conftest*
7829   eval "ac_cv_header_$ac_safe=yes"
7830 else
7831   echo "$ac_err" >&5
7832   echo "configure: failed program was:" >&5
7833   cat conftest.$ac_ext >&5
7834   rm -rf conftest*
7835   eval "ac_cv_header_$ac_safe=no"
7836 fi
7837 rm -f conftest*
7838 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7839   echo "$ac_t""yes" 1>&6
7840   :
7841 else
7842   echo "$ac_t""no" 1>&6
7843 with_wnn=no
7844 fi
7845  }
7846     if test "$with_wnn" != "no"; then
7847     for ac_func in crypt
7848 do
7849 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7850 echo "configure:7851: checking for $ac_func" >&5
7851
7852 cat > conftest.$ac_ext <<EOF
7853 #line 7854 "configure"
7854 #include "confdefs.h"
7855 /* System header to define __stub macros and hopefully few prototypes,
7856     which can conflict with char $ac_func(); below.  */
7857 #include <assert.h>
7858 /* Override any gcc2 internal prototype to avoid an error.  */
7859 /* We use char because int might match the return type of a gcc2
7860     builtin and then its argument prototype would still apply.  */
7861 char $ac_func();
7862
7863 int main() {
7864
7865 /* The GNU C library defines this for functions which it implements
7866     to always fail with ENOSYS.  Some functions are actually named
7867     something starting with __ and the normal name is an alias.  */
7868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7869 choke me
7870 #else
7871 $ac_func();
7872 #endif
7873
7874 ; return 0; }
7875 EOF
7876 if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7877   rm -rf conftest*
7878   eval "ac_cv_func_$ac_func=yes"
7879 else
7880   echo "configure: failed program was:" >&5
7881   cat conftest.$ac_ext >&5
7882   rm -rf conftest*
7883   eval "ac_cv_func_$ac_func=no"
7884 fi
7885 rm -f conftest*
7886
7887 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7888   echo "$ac_t""yes" 1>&6
7889     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7890   { test "$extra_verbose" = "yes" && cat << EOF
7891     Defining $ac_tr_func
7892 EOF
7893 cat >> confdefs.h <<EOF
7894 #define $ac_tr_func 1
7895 EOF
7896 }
7897  
7898 else
7899   echo "$ac_t""no" 1>&6
7900 fi
7901 done
7902
7903     test "$ac_cv_func_crypt" != "yes" && { 
7904 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
7905 echo "configure:7906: checking for crypt in -lcrypt" >&5
7906 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
7907
7908 xe_check_libs=" -lcrypt "
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7912 /* Override any gcc2 internal prototype to avoid an error.  */
7913 /* We use char because int might match the return type of a gcc2
7914     builtin and then its argument prototype would still apply.  */
7915 char crypt();
7916
7917 int main() {
7918 crypt()
7919 ; return 0; }
7920 EOF
7921 if { (eval echo configure:7922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7922   rm -rf conftest*
7923   eval "ac_cv_lib_$ac_lib_var=yes"
7924 else
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   eval "ac_cv_lib_$ac_lib_var=no"
7929 fi
7930 rm -f conftest*
7931 xe_check_libs=""
7932
7933 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7934   echo "$ac_t""yes" 1>&6
7935     ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7936     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7937   { test "$extra_verbose" = "yes" && cat << EOF
7938     Defining $ac_tr_lib
7939 EOF
7940 cat >> confdefs.h <<EOF
7941 #define $ac_tr_lib 1
7942 EOF
7943 }
7944
7945   LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
7946
7947 else
7948   echo "$ac_t""no" 1>&6
7949 fi
7950
7951  }
7952   fi
7953     if test -z "$with_wnn" -o "$with_wnn" = "yes"; then
7954     
7955 echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
7956 echo "configure:7957: checking for jl_dic_list_e in -lwnn" >&5
7957 ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
7958
7959 xe_check_libs=" -lwnn "
7960 cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 /* Override any gcc2 internal prototype to avoid an error.  */
7964 /* We use char because int might match the return type of a gcc2
7965     builtin and then its argument prototype would still apply.  */
7966 char jl_dic_list_e();
7967
7968 int main() {
7969 jl_dic_list_e()
7970 ; return 0; }
7971 EOF
7972 if { (eval echo configure:7973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
7973   rm -rf conftest*
7974   eval "ac_cv_lib_$ac_lib_var=yes"
7975 else
7976   echo "configure: failed program was:" >&5
7977   cat conftest.$ac_ext >&5
7978   rm -rf conftest*
7979   eval "ac_cv_lib_$ac_lib_var=no"
7980 fi
7981 rm -f conftest*
7982 xe_check_libs=""
7983
7984 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
7985   echo "$ac_t""yes" 1>&6
7986   libwnn=wnn
7987 else
7988   echo "$ac_t""no" 1>&6
7989 echo $ac_n "checking for jl_dic_list_e in -lwnn4""... $ac_c" 1>&6
7990 echo "configure:7991: checking for jl_dic_list_e in -lwnn4" >&5
7991 ac_lib_var=`echo wnn4'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
7992
7993 xe_check_libs=" -lwnn4 "
7994 cat > conftest.$ac_ext <<EOF
7995 #line 7996 "configure"
7996 #include "confdefs.h"
7997 /* Override any gcc2 internal prototype to avoid an error.  */
7998 /* We use char because int might match the return type of a gcc2
7999     builtin and then its argument prototype would still apply.  */
8000 char jl_dic_list_e();
8001
8002 int main() {
8003 jl_dic_list_e()
8004 ; return 0; }
8005 EOF
8006 if { (eval echo configure:8007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8007   rm -rf conftest*
8008   eval "ac_cv_lib_$ac_lib_var=yes"
8009 else
8010   echo "configure: failed program was:" >&5
8011   cat conftest.$ac_ext >&5
8012   rm -rf conftest*
8013   eval "ac_cv_lib_$ac_lib_var=no"
8014 fi
8015 rm -f conftest*
8016 xe_check_libs=""
8017
8018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8019   echo "$ac_t""yes" 1>&6
8020   libwnn=wnn4
8021 else
8022   echo "$ac_t""no" 1>&6
8023 echo $ac_n "checking for jl_dic_list_e in -lwnn6""... $ac_c" 1>&6
8024 echo "configure:8025: checking for jl_dic_list_e in -lwnn6" >&5
8025 ac_lib_var=`echo wnn6'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
8026
8027 xe_check_libs=" -lwnn6 "
8028 cat > conftest.$ac_ext <<EOF
8029 #line 8030 "configure"
8030 #include "confdefs.h"
8031 /* Override any gcc2 internal prototype to avoid an error.  */
8032 /* We use char because int might match the return type of a gcc2
8033     builtin and then its argument prototype would still apply.  */
8034 char jl_dic_list_e();
8035
8036 int main() {
8037 jl_dic_list_e()
8038 ; return 0; }
8039 EOF
8040 if { (eval echo configure:8041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8041   rm -rf conftest*
8042   eval "ac_cv_lib_$ac_lib_var=yes"
8043 else
8044   echo "configure: failed program was:" >&5
8045   cat conftest.$ac_ext >&5
8046   rm -rf conftest*
8047   eval "ac_cv_lib_$ac_lib_var=no"
8048 fi
8049 rm -f conftest*
8050 xe_check_libs=""
8051
8052 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8053   echo "$ac_t""yes" 1>&6
8054   libwnn=wnn6
8055 else
8056   echo "$ac_t""no" 1>&6
8057 echo $ac_n "checking for dic_list_e in -lwnn6_fromsrc""... $ac_c" 1>&6
8058 echo "configure:8059: checking for dic_list_e in -lwnn6_fromsrc" >&5
8059 ac_lib_var=`echo wnn6_fromsrc'_'dic_list_e | sed 'y%./+-%__p_%'`
8060
8061 xe_check_libs=" -lwnn6_fromsrc "
8062 cat > conftest.$ac_ext <<EOF
8063 #line 8064 "configure"
8064 #include "confdefs.h"
8065 /* Override any gcc2 internal prototype to avoid an error.  */
8066 /* We use char because int might match the return type of a gcc2
8067     builtin and then its argument prototype would still apply.  */
8068 char dic_list_e();
8069
8070 int main() {
8071 dic_list_e()
8072 ; return 0; }
8073 EOF
8074 if { (eval echo configure:8075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8075   rm -rf conftest*
8076   eval "ac_cv_lib_$ac_lib_var=yes"
8077 else
8078   echo "configure: failed program was:" >&5
8079   cat conftest.$ac_ext >&5
8080   rm -rf conftest*
8081   eval "ac_cv_lib_$ac_lib_var=no"
8082 fi
8083 rm -f conftest*
8084 xe_check_libs=""
8085
8086 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8087   echo "$ac_t""yes" 1>&6
8088   libwnn=wnn6_fromsrc
8089 else
8090   echo "$ac_t""no" 1>&6
8091 with_wnn=no
8092 fi
8093
8094
8095 fi
8096
8097
8098 fi
8099
8100
8101 fi
8102
8103
8104   fi
8105   test -z "$with_wnn" && with_wnn=yes
8106   if test "$with_wnn" = "yes"; then
8107     { test "$extra_verbose" = "yes" && cat << \EOF
8108     Defining HAVE_WNN
8109 EOF
8110 cat >> confdefs.h <<\EOF
8111 #define HAVE_WNN 1
8112 EOF
8113 }
8114
8115     libs_x="-l$libwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l$libwnn\" to \$libs_x"; fi
8116     extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
8117    echo "    xemacs will be linked with \"mule-wnnfns.o\""
8118  fi
8119     if test "$with_wnn6" != "no"; then
8120       
8121 echo $ac_n "checking for jl_fi_dic_list in -l$libwnn""... $ac_c" 1>&6
8122 echo "configure:8123: checking for jl_fi_dic_list in -l$libwnn" >&5
8123 ac_lib_var=`echo $libwnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
8124
8125 xe_check_libs=" -l$libwnn "
8126 cat > conftest.$ac_ext <<EOF
8127 #line 8128 "configure"
8128 #include "confdefs.h"
8129 /* Override any gcc2 internal prototype to avoid an error.  */
8130 /* We use char because int might match the return type of a gcc2
8131     builtin and then its argument prototype would still apply.  */
8132 char jl_fi_dic_list();
8133
8134 int main() {
8135 jl_fi_dic_list()
8136 ; return 0; }
8137 EOF
8138 if { (eval echo configure:8139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8139   rm -rf conftest*
8140   eval "ac_cv_lib_$ac_lib_var=yes"
8141 else
8142   echo "configure: failed program was:" >&5
8143   cat conftest.$ac_ext >&5
8144   rm -rf conftest*
8145   eval "ac_cv_lib_$ac_lib_var=no"
8146 fi
8147 rm -f conftest*
8148 xe_check_libs=""
8149
8150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8151   echo "$ac_t""yes" 1>&6
8152   with_wnn6=yes
8153 else
8154   echo "$ac_t""no" 1>&6
8155 fi
8156
8157
8158       test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
8159     Defining WNN6
8160 EOF
8161 cat >> confdefs.h <<\EOF
8162 #define WNN6 1
8163 EOF
8164 }
8165
8166     fi
8167   fi
8168
8169     canna_includes_found=no
8170   if test "$with_canna" != "no"; then
8171     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8172 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8173 echo "configure:8174: checking for canna/jrkanji.h" >&5
8174
8175 cat > conftest.$ac_ext <<EOF
8176 #line 8177 "configure"
8177 #include "confdefs.h"
8178 #include <canna/jrkanji.h>
8179 EOF
8180 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8181 { (eval echo configure:8182: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8182 ac_err=`grep -v '^ *+' conftest.out`
8183 if test -z "$ac_err"; then
8184   rm -rf conftest*
8185   eval "ac_cv_header_$ac_safe=yes"
8186 else
8187   echo "$ac_err" >&5
8188   echo "configure: failed program was:" >&5
8189   cat conftest.$ac_ext >&5
8190   rm -rf conftest*
8191   eval "ac_cv_header_$ac_safe=no"
8192 fi
8193 rm -f conftest*
8194 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8195   echo "$ac_t""yes" 1>&6
8196   canna_includes_found=yes
8197 else
8198   echo "$ac_t""no" 1>&6
8199 fi
8200
8201   fi
8202   if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
8203       -d "/usr/local/canna/include"; then
8204     save_c_switch_site="$c_switch_site"
8205     c_switch_site="$c_switch_site -I/usr/local/canna/include"
8206     ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
8207 echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
8208 echo "configure:8209: checking for canna/jrkanji.h" >&5
8209
8210 cat > conftest.$ac_ext <<EOF
8211 #line 8212 "configure"
8212 #include "confdefs.h"
8213 #include <canna/jrkanji.h>
8214 EOF
8215 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8216 { (eval echo configure:8217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8217 ac_err=`grep -v '^ *+' conftest.out`
8218 if test -z "$ac_err"; then
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=yes"
8221 else
8222   echo "$ac_err" >&5
8223   echo "configure: failed program was:" >&5
8224   cat conftest.$ac_ext >&5
8225   rm -rf conftest*
8226   eval "ac_cv_header_$ac_safe=no"
8227 fi
8228 rm -f conftest*
8229 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8230   echo "$ac_t""yes" 1>&6
8231   canna_includes_found=yes
8232 else
8233   echo "$ac_t""no" 1>&6
8234 fi
8235
8236     if test "$canna_includes_found" != "yes"; then
8237       c_switch_site="$save_c_switch_site"
8238       with_canna="no"
8239     fi
8240   fi
8241
8242   test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
8243 echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
8244 echo "configure:8245: checking for canna/RK.h" >&5
8245
8246 cat > conftest.$ac_ext <<EOF
8247 #line 8248 "configure"
8248 #include "confdefs.h"
8249 #include <canna/RK.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`
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 else
8269   echo "$ac_t""no" 1>&6
8270 with_canna=no
8271 fi
8272  }
8273   test -z "$with_canna" && { 
8274 echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
8275 echo "configure:8276: checking for RkBgnBun in -lRKC" >&5
8276 ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
8277
8278 xe_check_libs=" -lRKC "
8279 cat > conftest.$ac_ext <<EOF
8280 #line 8281 "configure"
8281 #include "confdefs.h"
8282 /* Override any gcc2 internal prototype to avoid an error.  */
8283 /* We use char because int might match the return type of a gcc2
8284     builtin and then its argument prototype would still apply.  */
8285 char RkBgnBun();
8286
8287 int main() {
8288 RkBgnBun()
8289 ; return 0; }
8290 EOF
8291 if { (eval echo configure:8292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8292   rm -rf conftest*
8293   eval "ac_cv_lib_$ac_lib_var=yes"
8294 else
8295   echo "configure: failed program was:" >&5
8296   cat conftest.$ac_ext >&5
8297   rm -rf conftest*
8298   eval "ac_cv_lib_$ac_lib_var=no"
8299 fi
8300 rm -f conftest*
8301 xe_check_libs=""
8302
8303 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8304   echo "$ac_t""yes" 1>&6
8305   :
8306 else
8307   echo "$ac_t""no" 1>&6
8308 with_canna=no
8309 fi
8310
8311  }
8312   test -z "$with_canna" && { 
8313 echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
8314 echo "configure:8315: checking for jrKanjiControl in -lcanna" >&5
8315 ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
8316
8317 xe_check_libs=" -lcanna "
8318 cat > conftest.$ac_ext <<EOF
8319 #line 8320 "configure"
8320 #include "confdefs.h"
8321 /* Override any gcc2 internal prototype to avoid an error.  */
8322 /* We use char because int might match the return type of a gcc2
8323     builtin and then its argument prototype would still apply.  */
8324 char jrKanjiControl();
8325
8326 int main() {
8327 jrKanjiControl()
8328 ; return 0; }
8329 EOF
8330 if { (eval echo configure:8331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8331   rm -rf conftest*
8332   eval "ac_cv_lib_$ac_lib_var=yes"
8333 else
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=no"
8338 fi
8339 rm -f conftest*
8340 xe_check_libs=""
8341
8342 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8343   echo "$ac_t""yes" 1>&6
8344   :
8345 else
8346   echo "$ac_t""no" 1>&6
8347 with_canna=no
8348 fi
8349
8350  }
8351   test -z "$with_canna" && with_canna=yes
8352   if test "$with_canna" = "yes"; then
8353     { test "$extra_verbose" = "yes" && cat << \EOF
8354     Defining HAVE_CANNA
8355 EOF
8356 cat >> confdefs.h <<\EOF
8357 #define HAVE_CANNA 1
8358 EOF
8359 }
8360
8361     libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
8362     extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
8363    echo "    xemacs will be linked with \"mule-canna.o\""
8364  fi
8365   fi
8366
8367 else   for feature in xim canna wnn; do
8368     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
8369       echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
8370     fi
8371     eval "with_${feature}=no"
8372   done
8373 fi 
8374
8375 if test "$need_motif" = "yes" ; then
8376   libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
8377     
8378 echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
8379 echo "configure:8380: checking for layout_object_getvalue in -li18n" >&5
8380 ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
8381
8382 xe_check_libs=" -li18n "
8383 cat > conftest.$ac_ext <<EOF
8384 #line 8385 "configure"
8385 #include "confdefs.h"
8386 /* Override any gcc2 internal prototype to avoid an error.  */
8387 /* We use char because int might match the return type of a gcc2
8388     builtin and then its argument prototype would still apply.  */
8389 char layout_object_getvalue();
8390
8391 int main() {
8392 layout_object_getvalue()
8393 ; return 0; }
8394 EOF
8395 if { (eval echo configure:8396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8396   rm -rf conftest*
8397   eval "ac_cv_lib_$ac_lib_var=yes"
8398 else
8399   echo "configure: failed program was:" >&5
8400   cat conftest.$ac_ext >&5
8401   rm -rf conftest*
8402   eval "ac_cv_lib_$ac_lib_var=no"
8403 fi
8404 rm -f conftest*
8405 xe_check_libs=""
8406
8407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
8408   echo "$ac_t""yes" 1>&6
8409   libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
8410 else
8411   echo "$ac_t""no" 1>&6
8412 fi
8413
8414
8415   
8416 if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
8417     ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8418   ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
8419   
8420         runpath="" runpath_dirs=""
8421   if test -n "$LD_RUN_PATH"; then
8422     runpath="$LD_RUN_PATH"
8423   elif test "$GCC" = "yes"; then
8424         ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
8425     echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
8426     xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
8427     for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
8428       case "$arg" in P,* | -L* | -R* )
8429         for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
8430           {
8431 xe_runpath_dir="$dir"
8432   test "$xe_runpath_dir" != "/lib"     -a \
8433         "$xe_runpath_dir" != "/usr/lib" -a \
8434         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8435   eval "$xe_add_unique_runpath_dir"
8436 }
8437         done ;;
8438       esac
8439     done
8440     ld_switch_run="$ld_switch_run_save"
8441     rm -f conftest*
8442   else
8443         for arg in $ld_switch_site $ld_switch_x_site; do
8444       case "$arg" in -L*) {
8445 xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
8446   test "$xe_runpath_dir" != "/lib"     -a \
8447         "$xe_runpath_dir" != "/usr/lib" -a \
8448         -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
8449   eval "$xe_add_unique_runpath_dir"
8450 };; esac
8451     done
8452         if test "$opsys $need_motif" = "sol2 yes"; then
8453       xe_runpath_dir="/opt/SUNWdt/lib";
8454       eval "$xe_add_unique_runpath_dir";
8455     fi
8456   fi 
8457   if test -n "$runpath"; then
8458     ld_switch_run="${dash_r}${runpath}"
8459     
8460 if test "$GCC" = "yes"; then
8461   set x $ld_switch_run; shift; ld_switch_run=""
8462   while test -n "$1"; do
8463     case $1 in
8464       -L  | -l  | -u               ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
8465       -L* | -l* | -u* | -Wl* | -pg ) ld_switch_run="$ld_switch_run $1" ;;
8466       -Xlinker* ) ;;
8467       * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
8468     esac
8469     shift
8470   done
8471 fi
8472     test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
8473   fi
8474 fi
8475
8476 fi
8477
8478 for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
8479 do
8480 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8481 echo "configure:8482: checking for $ac_func" >&5
8482
8483 cat > conftest.$ac_ext <<EOF
8484 #line 8485 "configure"
8485 #include "confdefs.h"
8486 /* System header to define __stub macros and hopefully few prototypes,
8487     which can conflict with char $ac_func(); below.  */
8488 #include <assert.h>
8489 /* Override any gcc2 internal prototype to avoid an error.  */
8490 /* We use char because int might match the return type of a gcc2
8491     builtin and then its argument prototype would still apply.  */
8492 char $ac_func();
8493
8494 int main() {
8495
8496 /* The GNU C library defines this for functions which it implements
8497     to always fail with ENOSYS.  Some functions are actually named
8498     something starting with __ and the normal name is an alias.  */
8499 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8500 choke me
8501 #else
8502 $ac_func();
8503 #endif
8504
8505 ; return 0; }
8506 EOF
8507 if { (eval echo configure:8508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8508   rm -rf conftest*
8509   eval "ac_cv_func_$ac_func=yes"
8510 else
8511   echo "configure: failed program was:" >&5
8512   cat conftest.$ac_ext >&5
8513   rm -rf conftest*
8514   eval "ac_cv_func_$ac_func=no"
8515 fi
8516 rm -f conftest*
8517
8518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8519   echo "$ac_t""yes" 1>&6
8520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8521   { test "$extra_verbose" = "yes" && cat << EOF
8522     Defining $ac_tr_func
8523 EOF
8524 cat >> confdefs.h <<EOF
8525 #define $ac_tr_func 1
8526 EOF
8527 }
8528  
8529 else
8530   echo "$ac_t""no" 1>&6
8531 fi
8532 done
8533
8534
8535
8536 case "$opsys" in
8537   linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8538    echo "    xemacs will be linked with \"realpath.o\""
8539  fi ;;
8540   * )
8541     case "$canonical" in
8542       *-*-sysv4.2uw2* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8543    echo "    xemacs will be linked with \"realpath.o\""
8544  fi ;;
8545       * ) for ac_func in realpath
8546 do
8547 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8548 echo "configure:8549: checking for $ac_func" >&5
8549
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 /* System header to define __stub macros and hopefully few prototypes,
8554     which can conflict with char $ac_func(); below.  */
8555 #include <assert.h>
8556 /* Override any gcc2 internal prototype to avoid an error.  */
8557 /* We use char because int might match the return type of a gcc2
8558     builtin and then its argument prototype would still apply.  */
8559 char $ac_func();
8560
8561 int main() {
8562
8563 /* The GNU C library defines this for functions which it implements
8564     to always fail with ENOSYS.  Some functions are actually named
8565     something starting with __ and the normal name is an alias.  */
8566 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8567 choke me
8568 #else
8569 $ac_func();
8570 #endif
8571
8572 ; return 0; }
8573 EOF
8574 if { (eval echo configure:8575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8575   rm -rf conftest*
8576   eval "ac_cv_func_$ac_func=yes"
8577 else
8578   echo "configure: failed program was:" >&5
8579   cat conftest.$ac_ext >&5
8580   rm -rf conftest*
8581   eval "ac_cv_func_$ac_func=no"
8582 fi
8583 rm -f conftest*
8584
8585 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8586   echo "$ac_t""yes" 1>&6
8587     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8588   { test "$extra_verbose" = "yes" && cat << EOF
8589     Defining $ac_tr_func
8590 EOF
8591 cat >> confdefs.h <<EOF
8592 #define $ac_tr_func 1
8593 EOF
8594 }
8595  
8596 else
8597   echo "$ac_t""no" 1>&6
8598 fi
8599 done
8600
8601           test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
8602    echo "    xemacs will be linked with \"realpath.o\""
8603  fi ;;
8604     esac ;;
8605 esac
8606
8607 echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
8608 echo "configure:8609: checking whether netdb declares h_errno" >&5
8609 cat > conftest.$ac_ext <<EOF
8610 #line 8611 "configure"
8611 #include "confdefs.h"
8612 #include <netdb.h>
8613 int main() {
8614 return h_errno;
8615 ; return 0; }
8616 EOF
8617 if { (eval echo configure:8618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8618   rm -rf conftest*
8619   echo "$ac_t""yes" 1>&6
8620    { test "$extra_verbose" = "yes" && cat << \EOF
8621     Defining HAVE_H_ERRNO
8622 EOF
8623 cat >> confdefs.h <<\EOF
8624 #define HAVE_H_ERRNO 1
8625 EOF
8626 }
8627
8628 else
8629   echo "configure: failed program was:" >&5
8630   cat conftest.$ac_ext >&5
8631   rm -rf conftest*
8632   echo "$ac_t""no" 1>&6
8633 fi
8634 rm -f conftest*
8635
8636 echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
8637 echo "configure:8638: checking for sigsetjmp" >&5
8638 cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8641 #include <setjmp.h>
8642 int main() {
8643 sigjmp_buf bar; sigsetjmp (bar, 0);
8644 ; return 0; }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8647   rm -rf conftest*
8648   echo "$ac_t""yes" 1>&6
8649    { test "$extra_verbose" = "yes" && cat << \EOF
8650     Defining HAVE_SIGSETJMP
8651 EOF
8652 cat >> confdefs.h <<\EOF
8653 #define HAVE_SIGSETJMP 1
8654 EOF
8655 }
8656
8657 else
8658   echo "configure: failed program was:" >&5
8659   cat conftest.$ac_ext >&5
8660   rm -rf conftest*
8661   echo "$ac_t""no" 1>&6
8662 fi
8663 rm -f conftest*
8664
8665 echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
8666 echo "configure:8667: checking whether localtime caches TZ" >&5
8667
8668 if test "$ac_cv_func_tzset" = "yes"; then
8669 cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672 #include <time.h>
8673 #if STDC_HEADERS
8674 # include <stdlib.h>
8675 #endif
8676 extern char **environ;
8677 unset_TZ ()
8678 {
8679   char **from, **to;
8680   for (to = from = environ; (*to = *from); from++)
8681     if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
8682       to++;
8683 }
8684 char TZ_GMT0[] = "TZ=GMT0";
8685 char TZ_PST8[] = "TZ=PST8";
8686 main()
8687 {
8688   time_t now = time ((time_t *) 0);
8689   int hour_GMT0, hour_unset;
8690   if (putenv (TZ_GMT0) != 0)
8691     exit (1);
8692   hour_GMT0 = localtime (&now)->tm_hour;
8693   unset_TZ ();
8694   hour_unset = localtime (&now)->tm_hour;
8695   if (putenv (TZ_PST8) != 0)
8696     exit (1);
8697   if (localtime (&now)->tm_hour == hour_GMT0)
8698     exit (1);
8699   unset_TZ ();
8700   if (localtime (&now)->tm_hour != hour_unset)
8701     exit (1);
8702   exit (0);
8703 }
8704 EOF
8705 if { (eval echo configure:8706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
8706 then
8707   emacs_cv_localtime_cache=no
8708 else
8709   conftest_rc="$?"
8710   echo "configure: failed program was:" >&5
8711   cat conftest.$ac_ext >&5
8712   rm -fr conftest*
8713   emacs_cv_localtime_cache=yes
8714 fi
8715 rm -fr conftest*
8716 else
8717         # If we lack tzset, report that localtime does not cache TZ,
8718         # since we can't invalidate the cache if we don't have tzset.
8719         emacs_cv_localtime_cache=no
8720 fi
8721 echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
8722 if test $emacs_cv_localtime_cache = yes; then
8723   { test "$extra_verbose" = "yes" && cat << \EOF
8724     Defining LOCALTIME_CACHE
8725 EOF
8726 cat >> confdefs.h <<\EOF
8727 #define LOCALTIME_CACHE 1
8728 EOF
8729 }
8730
8731 fi
8732
8733 if test "$HAVE_TIMEVAL" = "yes"; then
8734 echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
8735 echo "configure:8736: checking whether gettimeofday accepts one or two arguments" >&5
8736 cat > conftest.$ac_ext <<EOF
8737 #line 8738 "configure"
8738 #include "confdefs.h"
8739
8740 #ifdef TIME_WITH_SYS_TIME
8741 #include <sys/time.h>
8742 #include <time.h>
8743 #else
8744 #ifdef HAVE_SYS_TIME_H
8745 #include <sys/time.h>
8746 #else
8747 #include <time.h>
8748 #endif
8749 #endif
8750   
8751 int main() {
8752
8753   struct timeval time;
8754   struct timezone dummy;
8755   gettimeofday (&time, &dummy);
8756
8757 ; return 0; }
8758 EOF
8759 if { (eval echo configure:8760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8760   rm -rf conftest*
8761   echo "$ac_t""two" 1>&6
8762 else
8763   echo "configure: failed program was:" >&5
8764   cat conftest.$ac_ext >&5
8765   rm -rf conftest*
8766   echo "$ac_t""one" 1>&6
8767    { test "$extra_verbose" = "yes" && cat << \EOF
8768     Defining GETTIMEOFDAY_ONE_ARGUMENT
8769 EOF
8770 cat >> confdefs.h <<\EOF
8771 #define GETTIMEOFDAY_ONE_ARGUMENT 1
8772 EOF
8773 }
8774
8775 fi
8776 rm -f conftest*
8777 fi
8778
8779
8780 echo $ac_n "checking for inline""... $ac_c" 1>&6
8781 echo "configure:8782: checking for inline" >&5
8782
8783 ac_cv_c_inline=no
8784 for ac_kw in inline __inline__ __inline; do
8785   cat > conftest.$ac_ext <<EOF
8786 #line 8787 "configure"
8787 #include "confdefs.h"
8788
8789 int main() {
8790 } $ac_kw foo() {
8791 ; return 0; }
8792 EOF
8793 if { (eval echo configure:8794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8794   rm -rf conftest*
8795   ac_cv_c_inline=$ac_kw; break
8796 else
8797   echo "configure: failed program was:" >&5
8798   cat conftest.$ac_ext >&5
8799 fi
8800 rm -f conftest*
8801 done
8802
8803
8804 echo "$ac_t""$ac_cv_c_inline" 1>&6
8805 case "$ac_cv_c_inline" in
8806   inline | yes) ;;
8807   no) { test "$extra_verbose" = "yes" && cat << \EOF
8808     Defining inline = 
8809 EOF
8810 cat >> confdefs.h <<\EOF
8811 #define inline 
8812 EOF
8813 }
8814  ;;
8815   *)  { test "$extra_verbose" = "yes" && cat << EOF
8816     Defining inline = $ac_cv_c_inline
8817 EOF
8818 cat >> confdefs.h <<EOF
8819 #define inline $ac_cv_c_inline
8820 EOF
8821 }
8822  ;;
8823 esac
8824
8825 if test "$ac_cv_c_inline" != "no"; then
8826   { test "$extra_verbose" = "yes" && cat << \EOF
8827     Defining HAVE_INLINE
8828 EOF
8829 cat >> confdefs.h <<\EOF
8830 #define HAVE_INLINE 1
8831 EOF
8832 }
8833
8834   test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
8835    echo "    xemacs will be linked with \"inline.o\""
8836  fi
8837 fi
8838
8839
8840 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8841 # for constant arguments.  Useless!
8842 echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
8843 echo "configure:8844: checking for working alloca.h" >&5
8844
8845 cat > conftest.$ac_ext <<EOF
8846 #line 8847 "configure"
8847 #include "confdefs.h"
8848 #include <alloca.h>
8849 int main() {
8850 char *p = alloca(2 * sizeof(int));
8851 ; return 0; }
8852 EOF
8853 if { (eval echo configure:8854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8854   rm -rf conftest*
8855   ac_cv_header_alloca_h=yes
8856 else
8857   echo "configure: failed program was:" >&5
8858   cat conftest.$ac_ext >&5
8859   rm -rf conftest*
8860   ac_cv_header_alloca_h=no
8861 fi
8862 rm -f conftest*
8863
8864 echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
8865 if test $ac_cv_header_alloca_h = yes; then
8866   { test "$extra_verbose" = "yes" && cat << \EOF
8867     Defining HAVE_ALLOCA_H
8868 EOF
8869 cat >> confdefs.h <<\EOF
8870 #define HAVE_ALLOCA_H 1
8871 EOF
8872 }
8873
8874 fi
8875
8876 echo $ac_n "checking for alloca""... $ac_c" 1>&6
8877 echo "configure:8878: checking for alloca" >&5
8878
8879 cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882
8883 #ifdef __GNUC__
8884 # define alloca __builtin_alloca
8885 #else
8886 # if HAVE_ALLOCA_H
8887 #  include <alloca.h>
8888 # else
8889 #  ifdef _AIX
8890  #pragma alloca
8891 #  else
8892 #   ifndef alloca /* predefined by HP cc +Olibcalls */
8893 char *alloca ();
8894 #   endif
8895 #  endif
8896 # endif
8897 #endif
8898
8899 int main() {
8900 char *p = (char *) alloca(1);
8901 ; return 0; }
8902 EOF
8903 if { (eval echo configure:8904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8904   rm -rf conftest*
8905   ac_cv_func_alloca_works=yes
8906 else
8907   echo "configure: failed program was:" >&5
8908   cat conftest.$ac_ext >&5
8909   rm -rf conftest*
8910   ac_cv_func_alloca_works=no
8911 fi
8912 rm -f conftest*
8913
8914 echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
8915 if test $ac_cv_func_alloca_works = yes; then
8916   { test "$extra_verbose" = "yes" && cat << \EOF
8917     Defining HAVE_ALLOCA
8918 EOF
8919 cat >> confdefs.h <<\EOF
8920 #define HAVE_ALLOCA 1
8921 EOF
8922 }
8923
8924 fi
8925
8926 if test $ac_cv_func_alloca_works = no; then
8927   # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8928   # that cause trouble.  Some versions do not even contain alloca or
8929   # contain a buggy version.  If you still want to use their alloca,
8930   # use ar to extract alloca.o from them instead of compiling alloca.c.
8931   ALLOCA=alloca.o
8932   { test "$extra_verbose" = "yes" && cat << \EOF
8933     Defining C_ALLOCA
8934 EOF
8935 cat >> confdefs.h <<\EOF
8936 #define C_ALLOCA 1
8937 EOF
8938 }
8939
8940
8941 echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
8942 echo "configure:8943: checking whether alloca needs Cray hooks" >&5
8943
8944 cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 #if defined(CRAY) && ! defined(CRAY2)
8948 webecray
8949 #else
8950 wenotbecray
8951 #endif
8952
8953 EOF
8954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8955   egrep "webecray" >/dev/null 2>&1; then
8956   rm -rf conftest*
8957   ac_cv_os_cray=yes
8958 else
8959   rm -rf conftest*
8960   ac_cv_os_cray=no
8961 fi
8962 rm -f conftest*
8963
8964
8965 echo "$ac_t""$ac_cv_os_cray" 1>&6
8966 if test $ac_cv_os_cray = yes; then
8967 for ac_func in _getb67 GETB67 getb67; do
8968   echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8969 echo "configure:8970: checking for $ac_func" >&5
8970
8971 cat > conftest.$ac_ext <<EOF
8972 #line 8973 "configure"
8973 #include "confdefs.h"
8974 /* System header to define __stub macros and hopefully few prototypes,
8975     which can conflict with char $ac_func(); below.  */
8976 #include <assert.h>
8977 /* Override any gcc2 internal prototype to avoid an error.  */
8978 /* We use char because int might match the return type of a gcc2
8979     builtin and then its argument prototype would still apply.  */
8980 char $ac_func();
8981
8982 int main() {
8983
8984 /* The GNU C library defines this for functions which it implements
8985     to always fail with ENOSYS.  Some functions are actually named
8986     something starting with __ and the normal name is an alias.  */
8987 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8988 choke me
8989 #else
8990 $ac_func();
8991 #endif
8992
8993 ; return 0; }
8994 EOF
8995 if { (eval echo configure:8996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
8996   rm -rf conftest*
8997   eval "ac_cv_func_$ac_func=yes"
8998 else
8999   echo "configure: failed program was:" >&5
9000   cat conftest.$ac_ext >&5
9001   rm -rf conftest*
9002   eval "ac_cv_func_$ac_func=no"
9003 fi
9004 rm -f conftest*
9005
9006 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9007   echo "$ac_t""yes" 1>&6
9008   { test "$extra_verbose" = "yes" && cat << EOF
9009     Defining CRAY_STACKSEG_END = $ac_func
9010 EOF
9011 cat >> confdefs.h <<EOF
9012 #define CRAY_STACKSEG_END $ac_func
9013 EOF
9014 }
9015
9016   break
9017 else
9018   echo "$ac_t""no" 1>&6
9019 fi
9020
9021 done
9022 fi
9023
9024 echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
9025 echo "configure:9026: checking stack direction for C alloca" >&5
9026
9027 cat > conftest.$ac_ext <<EOF
9028 #line 9029 "configure"
9029 #include "confdefs.h"
9030 find_stack_direction ()
9031 {
9032   static char *addr = 0;
9033   auto char dummy;
9034   if (addr == 0)
9035     {
9036       addr = &dummy;
9037       return find_stack_direction ();
9038     }
9039   else
9040     return (&dummy > addr) ? 1 : -1;
9041 }
9042 main ()
9043 {
9044   exit (find_stack_direction() < 0);
9045 }
9046 EOF
9047 if { (eval echo configure:9048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9048 then
9049   ac_cv_c_stack_direction=1
9050 else
9051   conftest_rc="$?"
9052   echo "configure: failed program was:" >&5
9053   cat conftest.$ac_ext >&5
9054   rm -fr conftest*
9055   ac_cv_c_stack_direction=-1
9056 fi
9057 rm -fr conftest*
9058
9059 echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
9060 { test "$extra_verbose" = "yes" && cat << EOF
9061     Defining STACK_DIRECTION = $ac_cv_c_stack_direction
9062 EOF
9063 cat >> confdefs.h <<EOF
9064 #define STACK_DIRECTION $ac_cv_c_stack_direction
9065 EOF
9066 }
9067
9068 fi
9069
9070 test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
9071    echo "    xemacs will be linked with \"$ALLOCA\""
9072  fi
9073
9074 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9075 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9076 echo "configure:9077: checking for vfork.h" >&5
9077
9078 cat > conftest.$ac_ext <<EOF
9079 #line 9080 "configure"
9080 #include "confdefs.h"
9081 #include <vfork.h>
9082 EOF
9083 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9084 { (eval echo configure:9085: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9085 ac_err=`grep -v '^ *+' conftest.out`
9086 if test -z "$ac_err"; then
9087   rm -rf conftest*
9088   eval "ac_cv_header_$ac_safe=yes"
9089 else
9090   echo "$ac_err" >&5
9091   echo "configure: failed program was:" >&5
9092   cat conftest.$ac_ext >&5
9093   rm -rf conftest*
9094   eval "ac_cv_header_$ac_safe=no"
9095 fi
9096 rm -f conftest*
9097 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9098   echo "$ac_t""yes" 1>&6
9099   { test "$extra_verbose" = "yes" && cat << \EOF
9100     Defining HAVE_VFORK_H
9101 EOF
9102 cat >> confdefs.h <<\EOF
9103 #define HAVE_VFORK_H 1
9104 EOF
9105 }
9106
9107 else
9108   echo "$ac_t""no" 1>&6
9109 fi
9110
9111 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9112 echo "configure:9113: checking for working vfork" >&5
9113
9114 cat > conftest.$ac_ext <<EOF
9115 #line 9116 "configure"
9116 #include "confdefs.h"
9117 /* Thanks to Paul Eggert for this test.  */
9118 #include <stdio.h>
9119 #include <sys/types.h>
9120 #include <sys/stat.h>
9121 #ifdef HAVE_UNISTD_H
9122 #include <unistd.h>
9123 #endif
9124 #ifdef HAVE_VFORK_H
9125 #include <vfork.h>
9126 #endif
9127 /* On some sparc systems, changes by the child to local and incoming
9128    argument registers are propagated back to the parent.
9129    The compiler is told about this with #include <vfork.h>,
9130    but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9131    Test for this by using a static variable whose address
9132    is put into a register that is clobbered by the vfork.  */
9133 static
9134 #ifdef __cplusplus
9135 sparc_address_test (int arg)
9136 #else
9137 sparc_address_test (arg) int arg;
9138 #endif
9139 {
9140   static pid_t child;
9141   if (!child) {
9142     child = vfork ();
9143     if (child < 0) {
9144       perror ("vfork");
9145       _exit(2);
9146     }
9147     if (!child) {
9148       arg = getpid();
9149       write(-1, "", 0);
9150       _exit (arg);
9151     }
9152   }
9153 }
9154 main() {
9155   pid_t parent = getpid ();
9156   pid_t child;
9157
9158   sparc_address_test ();
9159
9160   child = vfork ();
9161
9162   if (child == 0) {
9163     /* Here is another test for sparc vfork register problems.
9164        This test uses lots of local variables, at least
9165        as many local variables as main has allocated so far
9166        including compiler temporaries.  4 locals are enough for
9167        gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9168        A buggy compiler should reuse the register of parent
9169        for one of the local variables, since it will think that
9170        parent can't possibly be used any more in this routine.
9171        Assigning to the local variable will thus munge parent
9172        in the parent process.  */
9173     pid_t
9174       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9175       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9176     /* Convince the compiler that p..p7 are live; otherwise, it might
9177        use the same hardware register for all 8 local variables.  */
9178     if (p != p1 || p != p2 || p != p3 || p != p4
9179         || p != p5 || p != p6 || p != p7)
9180       _exit(1);
9181
9182     /* On some systems (e.g. IRIX 3.3),
9183        vfork doesn't separate parent from child file descriptors.
9184        If the child closes a descriptor before it execs or exits,
9185        this munges the parent's descriptor as well.
9186        Test for this by closing stdout in the child.  */
9187     _exit(close(fileno(stdout)) != 0);
9188   } else {
9189     int status;
9190     struct stat st;
9191
9192     while (wait(&status) != child)
9193       ;
9194     exit(
9195          /* Was there some problem with vforking?  */
9196          child < 0
9197
9198          /* Did the child fail?  (This shouldn't happen.)  */
9199          || status
9200
9201          /* Did the vfork/compiler bug occur?  */
9202          || parent != getpid()
9203
9204          /* Did the file descriptor bug occur?  */
9205          || fstat(fileno(stdout), &st) != 0
9206          );
9207   }
9208 }
9209 EOF
9210 if { (eval echo configure:9211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9211 then
9212   ac_cv_func_vfork_works=yes
9213 else
9214   conftest_rc="$?"
9215   echo "configure: failed program was:" >&5
9216   cat conftest.$ac_ext >&5
9217   rm -fr conftest*
9218   ac_cv_func_vfork_works=no
9219 fi
9220 rm -fr conftest*
9221
9222 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9223 if test $ac_cv_func_vfork_works = no; then
9224   { test "$extra_verbose" = "yes" && cat << \EOF
9225     Defining vfork = fork
9226 EOF
9227 cat >> confdefs.h <<\EOF
9228 #define vfork fork
9229 EOF
9230 }
9231
9232 fi
9233
9234
9235 echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
9236 echo "configure:9237: checking for working strcoll" >&5
9237
9238 cat > conftest.$ac_ext <<EOF
9239 #line 9240 "configure"
9240 #include "confdefs.h"
9241 #include <string.h>
9242 main ()
9243 {
9244   exit (strcoll ("abc", "def") >= 0 ||
9245         strcoll ("ABC", "DEF") >= 0 ||
9246         strcoll ("123", "456") >= 0);
9247 }
9248 EOF
9249 if { (eval echo configure:9250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9250 then
9251   ac_cv_func_strcoll_works=yes
9252 else
9253   conftest_rc="$?"
9254   echo "configure: failed program was:" >&5
9255   cat conftest.$ac_ext >&5
9256   rm -fr conftest*
9257   ac_cv_func_strcoll_works=no
9258 fi
9259 rm -fr conftest*
9260
9261 echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
9262 if test $ac_cv_func_strcoll_works = yes; then
9263   { test "$extra_verbose" = "yes" && cat << \EOF
9264     Defining HAVE_STRCOLL
9265 EOF
9266 cat >> confdefs.h <<\EOF
9267 #define HAVE_STRCOLL 1
9268 EOF
9269 }
9270
9271 fi
9272
9273
9274 for ac_func in getpgrp
9275 do
9276 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9277 echo "configure:9278: checking for $ac_func" >&5
9278
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282 /* System header to define __stub macros and hopefully few prototypes,
9283     which can conflict with char $ac_func(); below.  */
9284 #include <assert.h>
9285 /* Override any gcc2 internal prototype to avoid an error.  */
9286 /* We use char because int might match the return type of a gcc2
9287     builtin and then its argument prototype would still apply.  */
9288 char $ac_func();
9289
9290 int main() {
9291
9292 /* The GNU C library defines this for functions which it implements
9293     to always fail with ENOSYS.  Some functions are actually named
9294     something starting with __ and the normal name is an alias.  */
9295 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9296 choke me
9297 #else
9298 $ac_func();
9299 #endif
9300
9301 ; return 0; }
9302 EOF
9303 if { (eval echo configure:9304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9304   rm -rf conftest*
9305   eval "ac_cv_func_$ac_func=yes"
9306 else
9307   echo "configure: failed program was:" >&5
9308   cat conftest.$ac_ext >&5
9309   rm -rf conftest*
9310   eval "ac_cv_func_$ac_func=no"
9311 fi
9312 rm -f conftest*
9313
9314 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9315   echo "$ac_t""yes" 1>&6
9316     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9317   { test "$extra_verbose" = "yes" && cat << EOF
9318     Defining $ac_tr_func
9319 EOF
9320 cat >> confdefs.h <<EOF
9321 #define $ac_tr_func 1
9322 EOF
9323 }
9324  
9325 else
9326   echo "$ac_t""no" 1>&6
9327 fi
9328 done
9329
9330 echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
9331 echo "configure:9332: checking whether getpgrp takes no argument" >&5
9332
9333 cat > conftest.$ac_ext <<EOF
9334 #line 9335 "configure"
9335 #include "confdefs.h"
9336
9337 /*
9338  * If this system has a BSD-style getpgrp(),
9339  * which takes a pid argument, exit unsuccessfully.
9340  *
9341  * Snarfed from Chet Ramey's bash pgrp.c test program
9342  */
9343 #include <stdio.h>
9344 #include <sys/types.h>
9345
9346 int     pid;
9347 int     pg1, pg2, pg3, pg4;
9348 int     ng, np, s, child;
9349
9350 main()
9351 {
9352         pid = getpid();
9353         pg1 = getpgrp(0);
9354         pg2 = getpgrp();
9355         pg3 = getpgrp(pid);
9356         pg4 = getpgrp(1);
9357
9358         /*
9359          * If all of these values are the same, it's pretty sure that
9360          * we're on a system that ignores getpgrp's first argument.
9361          */
9362         if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
9363                 exit(0);
9364
9365         child = fork();
9366         if (child < 0)
9367                 exit(1);
9368         else if (child == 0) {
9369                 np = getpid();
9370                 /*
9371                  * If this is Sys V, this will not work; pgrp will be
9372                  * set to np because setpgrp just changes a pgrp to be
9373                  * the same as the pid.
9374                  */
9375                 setpgrp(np, pg1);
9376                 ng = getpgrp(0);        /* Same result for Sys V and BSD */
9377                 if (ng == pg1) {
9378                         exit(1);
9379                 } else {
9380                         exit(0);
9381                 }
9382         } else {
9383                 wait(&s);
9384                 exit(s>>8);
9385         }
9386 }
9387
9388 EOF
9389 if { (eval echo configure:9390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9390 then
9391   ac_cv_func_getpgrp_void=yes
9392 else
9393   conftest_rc="$?"
9394   echo "configure: failed program was:" >&5
9395   cat conftest.$ac_ext >&5
9396   rm -fr conftest*
9397   ac_cv_func_getpgrp_void=no
9398 fi
9399 rm -fr conftest*
9400
9401
9402 echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
9403 if test $ac_cv_func_getpgrp_void = yes; then
9404   { test "$extra_verbose" = "yes" && cat << \EOF
9405     Defining GETPGRP_VOID
9406 EOF
9407 cat >> confdefs.h <<\EOF
9408 #define GETPGRP_VOID 1
9409 EOF
9410 }
9411
9412 fi
9413
9414
9415 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9416 echo "configure:9417: checking for working mmap" >&5
9417 case "$opsys" in ultrix* ) have_mmap=no ;; *)
9418 cat > conftest.$ac_ext <<EOF
9419 #line 9420 "configure"
9420 #include "confdefs.h"
9421 #include <stdio.h>
9422 #include <unistd.h>
9423 #include <fcntl.h>
9424 #include <sys/mman.h>
9425
9426 #ifndef MAP_VARIABLE
9427 #define MAP_VARIABLE 0
9428 #endif
9429
9430 #ifndef MAP_FAILED
9431 #define MAP_FAILED -1
9432 #endif
9433
9434 int main (int argc, char *argv[])
9435 {
9436   int fd = -1;
9437   caddr_t p;
9438 #ifndef MAP_ANONYMOUS
9439   fd = open ("/dev/zero", O_RDWR);
9440   if (fd < 0)
9441     return 1;
9442 #define MAP_ANONYMOUS 0
9443 #endif
9444   if (mmap(0, 1024, PROT_READ | PROT_WRITE,
9445            MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
9446            fd, 0) != (void *) MAP_FAILED)
9447     return 0;
9448   perror ("conftest: mmap failed");
9449   return 1;
9450 }
9451 EOF
9452 if { (eval echo configure:9453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9453 then
9454   have_mmap=yes
9455 else
9456   conftest_rc="$?"
9457   echo "configure: failed program was:" >&5
9458   cat conftest.$ac_ext >&5
9459   rm -fr conftest*
9460   have_mmap=no
9461 fi
9462 rm -fr conftest* ;;
9463 esac
9464 echo "$ac_t""$have_mmap" 1>&6
9465 test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9466     Defining HAVE_MMAP
9467 EOF
9468 cat >> confdefs.h <<\EOF
9469 #define HAVE_MMAP 1
9470 EOF
9471 }
9472
9473 for ac_hdr in unistd.h
9474 do
9475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9477 echo "configure:9478: checking for $ac_hdr" >&5
9478
9479 cat > conftest.$ac_ext <<EOF
9480 #line 9481 "configure"
9481 #include "confdefs.h"
9482 #include <$ac_hdr>
9483 EOF
9484 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9485 { (eval echo configure:9486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9486 ac_err=`grep -v '^ *+' conftest.out`
9487 if test -z "$ac_err"; then
9488   rm -rf conftest*
9489   eval "ac_cv_header_$ac_safe=yes"
9490 else
9491   echo "$ac_err" >&5
9492   echo "configure: failed program was:" >&5
9493   cat conftest.$ac_ext >&5
9494   rm -rf conftest*
9495   eval "ac_cv_header_$ac_safe=no"
9496 fi
9497 rm -f conftest*
9498 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9499   echo "$ac_t""yes" 1>&6
9500     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9501   { test "$extra_verbose" = "yes" && cat << EOF
9502     Defining $ac_tr_hdr
9503 EOF
9504 cat >> confdefs.h <<EOF
9505 #define $ac_tr_hdr 1
9506 EOF
9507 }
9508  
9509 else
9510   echo "$ac_t""no" 1>&6
9511 fi
9512 done
9513
9514 for ac_func in getpagesize
9515 do
9516 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9517 echo "configure:9518: checking for $ac_func" >&5
9518
9519 cat > conftest.$ac_ext <<EOF
9520 #line 9521 "configure"
9521 #include "confdefs.h"
9522 /* System header to define __stub macros and hopefully few prototypes,
9523     which can conflict with char $ac_func(); below.  */
9524 #include <assert.h>
9525 /* Override any gcc2 internal prototype to avoid an error.  */
9526 /* We use char because int might match the return type of a gcc2
9527     builtin and then its argument prototype would still apply.  */
9528 char $ac_func();
9529
9530 int main() {
9531
9532 /* The GNU C library defines this for functions which it implements
9533     to always fail with ENOSYS.  Some functions are actually named
9534     something starting with __ and the normal name is an alias.  */
9535 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9536 choke me
9537 #else
9538 $ac_func();
9539 #endif
9540
9541 ; return 0; }
9542 EOF
9543 if { (eval echo configure:9544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9544   rm -rf conftest*
9545   eval "ac_cv_func_$ac_func=yes"
9546 else
9547   echo "configure: failed program was:" >&5
9548   cat conftest.$ac_ext >&5
9549   rm -rf conftest*
9550   eval "ac_cv_func_$ac_func=no"
9551 fi
9552 rm -f conftest*
9553
9554 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9555   echo "$ac_t""yes" 1>&6
9556     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9557   { test "$extra_verbose" = "yes" && cat << EOF
9558     Defining $ac_tr_func
9559 EOF
9560 cat >> confdefs.h <<EOF
9561 #define $ac_tr_func 1
9562 EOF
9563 }
9564  
9565 else
9566   echo "$ac_t""no" 1>&6
9567 fi
9568 done
9569
9570 echo $ac_n "checking for working mmap""... $ac_c" 1>&6
9571 echo "configure:9572: checking for working mmap" >&5
9572
9573 cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576
9577 /* Thanks to Mike Haertel and Jim Avera for this test.
9578    Here is a matrix of mmap possibilities:
9579         mmap private not fixed
9580         mmap private fixed at somewhere currently unmapped
9581         mmap private fixed at somewhere already mapped
9582         mmap shared not fixed
9583         mmap shared fixed at somewhere currently unmapped
9584         mmap shared fixed at somewhere already mapped
9585    For private mappings, we should verify that changes cannot be read()
9586    back from the file, nor mmap's back from the file at a different
9587    address.  (There have been systems where private was not correctly
9588    implemented like the infamous i386 svr4.0, and systems where the
9589    VM page cache was not coherent with the filesystem buffer cache
9590    like early versions of FreeBSD and possibly contemporary NetBSD.)
9591    For shared mappings, we should conversely verify that changes get
9592    propogated back to all the places they're supposed to be.
9593
9594    Grep wants private fixed already mapped.
9595    The main things grep needs to know about mmap are:
9596    * does it exist and is it safe to write into the mmap'd area
9597    * how to use it (BSD variants)  */
9598 #include <sys/types.h>
9599 #include <fcntl.h>
9600 #include <sys/mman.h>
9601
9602 /* This mess was copied from the GNU getpagesize.h.  */
9603 #ifndef HAVE_GETPAGESIZE
9604 # ifdef HAVE_UNISTD_H
9605 #  include <unistd.h>
9606 # endif
9607
9608 /* Assume that all systems that can run configure have sys/param.h.  */
9609 # ifndef HAVE_SYS_PARAM_H
9610 #  define HAVE_SYS_PARAM_H 1
9611 # endif
9612
9613 # ifdef _SC_PAGESIZE
9614 #  define getpagesize() sysconf(_SC_PAGESIZE)
9615 # else /* no _SC_PAGESIZE */
9616 #  ifdef HAVE_SYS_PARAM_H
9617 #   include <sys/param.h>
9618 #   ifdef EXEC_PAGESIZE
9619 #    define getpagesize() EXEC_PAGESIZE
9620 #   else /* no EXEC_PAGESIZE */
9621 #    ifdef NBPG
9622 #     define getpagesize() NBPG * CLSIZE
9623 #     ifndef CLSIZE
9624 #      define CLSIZE 1
9625 #     endif /* no CLSIZE */
9626 #    else /* no NBPG */
9627 #     ifdef NBPC
9628 #      define getpagesize() NBPC
9629 #     else /* no NBPC */
9630 #      ifdef PAGESIZE
9631 #       define getpagesize() PAGESIZE
9632 #      endif /* PAGESIZE */
9633 #     endif /* no NBPC */
9634 #    endif /* no NBPG */
9635 #   endif /* no EXEC_PAGESIZE */
9636 #  else /* no HAVE_SYS_PARAM_H */
9637 #   define getpagesize() 8192   /* punt totally */
9638 #  endif /* no HAVE_SYS_PARAM_H */
9639 # endif /* no _SC_PAGESIZE */
9640
9641 #endif /* no HAVE_GETPAGESIZE */
9642
9643 #ifdef __cplusplus
9644 extern "C" { void *malloc(unsigned); }
9645 #else
9646 char *malloc();
9647 #endif
9648
9649 int
9650 main()
9651 {
9652         char *data, *data2, *data3;
9653         int i, pagesize;
9654         int fd;
9655
9656         pagesize = getpagesize();
9657
9658         /*
9659          * First, make a file with some known garbage in it.
9660          */
9661         data = malloc(pagesize);
9662         if (!data)
9663                 exit(1);
9664         for (i = 0; i < pagesize; ++i)
9665                 *(data + i) = rand();
9666         umask(0);
9667         fd = creat("conftestmmap", 0600);
9668         if (fd < 0)
9669                 exit(1);
9670         if (write(fd, data, pagesize) != pagesize)
9671                 exit(1);
9672         close(fd);
9673
9674         /*
9675          * Next, try to mmap the file at a fixed address which
9676          * already has something else allocated at it.  If we can,
9677          * also make sure that we see the same garbage.
9678          */
9679         fd = open("conftestmmap", O_RDWR);
9680         if (fd < 0)
9681                 exit(1);
9682         data2 = malloc(2 * pagesize);
9683         if (!data2)
9684                 exit(1);
9685         data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
9686         if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
9687             MAP_PRIVATE | MAP_FIXED, fd, 0L))
9688                 exit(1);
9689         for (i = 0; i < pagesize; ++i)
9690                 if (*(data + i) != *(data2 + i))
9691                         exit(1);
9692
9693         /*
9694          * Finally, make sure that changes to the mapped area
9695          * do not percolate back to the file as seen by read().
9696          * (This is a bug on some variants of i386 svr4.0.)
9697          */
9698         for (i = 0; i < pagesize; ++i)
9699                 *(data2 + i) = *(data2 + i) + 1;
9700         data3 = malloc(pagesize);
9701         if (!data3)
9702                 exit(1);
9703         if (read(fd, data3, pagesize) != pagesize)
9704                 exit(1);
9705         for (i = 0; i < pagesize; ++i)
9706                 if (*(data + i) != *(data3 + i))
9707                         exit(1);
9708         close(fd);
9709         unlink("conftestmmap");
9710         exit(0);
9711 }
9712
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
9715 then
9716   ac_cv_func_mmap_fixed_mapped=yes
9717 else
9718   conftest_rc="$?"
9719   echo "configure: failed program was:" >&5
9720   cat conftest.$ac_ext >&5
9721   rm -fr conftest*
9722   ac_cv_func_mmap_fixed_mapped=no
9723 fi
9724 rm -fr conftest*
9725
9726 echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
9727 if test $ac_cv_func_mmap_fixed_mapped = yes; then
9728   { test "$extra_verbose" = "yes" && cat << \EOF
9729     Defining HAVE_MMAP
9730 EOF
9731 cat >> confdefs.h <<\EOF
9732 #define HAVE_MMAP 1
9733 EOF
9734 }
9735
9736 fi
9737
9738
9739 test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
9740 test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
9741 test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
9742     Defining REL_ALLOC
9743 EOF
9744 cat >> confdefs.h <<\EOF
9745 #define REL_ALLOC 1
9746 EOF
9747 }
9748
9749
9750 ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
9751 echo $ac_n "checking for termios.h""... $ac_c" 1>&6
9752 echo "configure:9753: checking for termios.h" >&5
9753
9754 cat > conftest.$ac_ext <<EOF
9755 #line 9756 "configure"
9756 #include "confdefs.h"
9757 #include <termios.h>
9758 EOF
9759 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9760 { (eval echo configure:9761: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9761 ac_err=`grep -v '^ *+' conftest.out`
9762 if test -z "$ac_err"; then
9763   rm -rf conftest*
9764   eval "ac_cv_header_$ac_safe=yes"
9765 else
9766   echo "$ac_err" >&5
9767   echo "configure: failed program was:" >&5
9768   cat conftest.$ac_ext >&5
9769   rm -rf conftest*
9770   eval "ac_cv_header_$ac_safe=no"
9771 fi
9772 rm -f conftest*
9773 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775   { test "$extra_verbose" = "yes" && cat << \EOF
9776     Defining HAVE_TERMIOS
9777 EOF
9778 cat >> confdefs.h <<\EOF
9779 #define HAVE_TERMIOS 1
9780 EOF
9781 }
9782
9783   { test "$extra_verbose" = "yes" && cat << \EOF
9784     Defining SIGNALS_VIA_CHARACTERS
9785 EOF
9786 cat >> confdefs.h <<\EOF
9787 #define SIGNALS_VIA_CHARACTERS 1
9788 EOF
9789 }
9790
9791   { test "$extra_verbose" = "yes" && cat << \EOF
9792     Defining NO_TERMIO
9793 EOF
9794 cat >> confdefs.h <<\EOF
9795 #define NO_TERMIO 1
9796 EOF
9797 }
9798
9799 else
9800   echo "$ac_t""no" 1>&6
9801 ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
9802 echo $ac_n "checking for termio.h""... $ac_c" 1>&6
9803 echo "configure:9804: checking for termio.h" >&5
9804
9805 cat > conftest.$ac_ext <<EOF
9806 #line 9807 "configure"
9807 #include "confdefs.h"
9808 #include <termio.h>
9809 EOF
9810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9811 { (eval echo configure:9812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9812 ac_err=`grep -v '^ *+' conftest.out`
9813 if test -z "$ac_err"; then
9814   rm -rf conftest*
9815   eval "ac_cv_header_$ac_safe=yes"
9816 else
9817   echo "$ac_err" >&5
9818   echo "configure: failed program was:" >&5
9819   cat conftest.$ac_ext >&5
9820   rm -rf conftest*
9821   eval "ac_cv_header_$ac_safe=no"
9822 fi
9823 rm -f conftest*
9824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9825   echo "$ac_t""yes" 1>&6
9826   { test "$extra_verbose" = "yes" && cat << \EOF
9827     Defining HAVE_TERMIO
9828 EOF
9829 cat >> confdefs.h <<\EOF
9830 #define HAVE_TERMIO 1
9831 EOF
9832 }
9833
9834 else
9835   echo "$ac_t""no" 1>&6
9836 fi
9837
9838 fi
9839
9840
9841
9842 echo $ac_n "checking for socket""... $ac_c" 1>&6
9843 echo "configure:9844: checking for socket" >&5
9844
9845 cat > conftest.$ac_ext <<EOF
9846 #line 9847 "configure"
9847 #include "confdefs.h"
9848 /* System header to define __stub macros and hopefully few prototypes,
9849     which can conflict with char socket(); below.  */
9850 #include <assert.h>
9851 /* Override any gcc2 internal prototype to avoid an error.  */
9852 /* We use char because int might match the return type of a gcc2
9853     builtin and then its argument prototype would still apply.  */
9854 char socket();
9855
9856 int main() {
9857
9858 /* The GNU C library defines this for functions which it implements
9859     to always fail with ENOSYS.  Some functions are actually named
9860     something starting with __ and the normal name is an alias.  */
9861 #if defined (__stub_socket) || defined (__stub___socket)
9862 choke me
9863 #else
9864 socket();
9865 #endif
9866
9867 ; return 0; }
9868 EOF
9869 if { (eval echo configure:9870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9870   rm -rf conftest*
9871   eval "ac_cv_func_socket=yes"
9872 else
9873   echo "configure: failed program was:" >&5
9874   cat conftest.$ac_ext >&5
9875   rm -rf conftest*
9876   eval "ac_cv_func_socket=no"
9877 fi
9878 rm -f conftest*
9879
9880 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9881   echo "$ac_t""yes" 1>&6
9882   ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
9883 echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
9884 echo "configure:9885: checking for netinet/in.h" >&5
9885
9886 cat > conftest.$ac_ext <<EOF
9887 #line 9888 "configure"
9888 #include "confdefs.h"
9889 #include <netinet/in.h>
9890 EOF
9891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9892 { (eval echo configure:9893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9893 ac_err=`grep -v '^ *+' conftest.out`
9894 if test -z "$ac_err"; then
9895   rm -rf conftest*
9896   eval "ac_cv_header_$ac_safe=yes"
9897 else
9898   echo "$ac_err" >&5
9899   echo "configure: failed program was:" >&5
9900   cat conftest.$ac_ext >&5
9901   rm -rf conftest*
9902   eval "ac_cv_header_$ac_safe=no"
9903 fi
9904 rm -f conftest*
9905 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9906   echo "$ac_t""yes" 1>&6
9907   ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
9908 echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
9909 echo "configure:9910: checking for arpa/inet.h" >&5
9910
9911 cat > conftest.$ac_ext <<EOF
9912 #line 9913 "configure"
9913 #include "confdefs.h"
9914 #include <arpa/inet.h>
9915 EOF
9916 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9917 { (eval echo configure:9918: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9918 ac_err=`grep -v '^ *+' conftest.out`
9919 if test -z "$ac_err"; then
9920   rm -rf conftest*
9921   eval "ac_cv_header_$ac_safe=yes"
9922 else
9923   echo "$ac_err" >&5
9924   echo "configure: failed program was:" >&5
9925   cat conftest.$ac_ext >&5
9926   rm -rf conftest*
9927   eval "ac_cv_header_$ac_safe=no"
9928 fi
9929 rm -f conftest*
9930 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9931   echo "$ac_t""yes" 1>&6
9932   
9933   { test "$extra_verbose" = "yes" && cat << \EOF
9934     Defining HAVE_SOCKETS
9935 EOF
9936 cat >> confdefs.h <<\EOF
9937 #define HAVE_SOCKETS 1
9938 EOF
9939 }
9940
9941       echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
9942 echo "configure:9943: checking "for sun_len member in struct sockaddr_un"" >&5
9943       cat > conftest.$ac_ext <<EOF
9944 #line 9945 "configure"
9945 #include "confdefs.h"
9946
9947 #include <sys/types.h>
9948 #include <sys/socket.h>
9949 #include <sys/un.h>
9950       
9951 int main() {
9952 static struct sockaddr_un x; x.sun_len = 1;
9953 ; return 0; }
9954 EOF
9955 if { (eval echo configure:9956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9956   rm -rf conftest*
9957   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9958     Defining HAVE_SOCKADDR_SUN_LEN
9959 EOF
9960 cat >> confdefs.h <<\EOF
9961 #define HAVE_SOCKADDR_SUN_LEN 1
9962 EOF
9963 }
9964
9965 else
9966   echo "configure: failed program was:" >&5
9967   cat conftest.$ac_ext >&5
9968   rm -rf conftest*
9969   echo "$ac_t""no" 1>&6
9970 fi
9971 rm -f conftest*
9972       echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
9973 echo "configure:9974: checking "for ip_mreq struct in netinet/in.h"" >&5
9974       cat > conftest.$ac_ext <<EOF
9975 #line 9976 "configure"
9976 #include "confdefs.h"
9977
9978 #include <sys/types.h>
9979 #include <netinet/in.h>
9980       
9981 int main() {
9982 static struct ip_mreq x;
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
9986   rm -rf conftest*
9987   echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
9988     Defining HAVE_MULTICAST
9989 EOF
9990 cat >> confdefs.h <<\EOF
9991 #define HAVE_MULTICAST 1
9992 EOF
9993 }
9994
9995 else
9996   echo "configure: failed program was:" >&5
9997   cat conftest.$ac_ext >&5
9998   rm -rf conftest*
9999   echo "$ac_t""no" 1>&6
10000 fi
10001 rm -f conftest*
10002 else
10003   echo "$ac_t""no" 1>&6
10004 fi
10005
10006 else
10007   echo "$ac_t""no" 1>&6
10008 fi
10009
10010 else
10011   echo "$ac_t""no" 1>&6
10012 fi
10013
10014
10015 echo $ac_n "checking for msgget""... $ac_c" 1>&6
10016 echo "configure:10017: checking for msgget" >&5
10017
10018 cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* System header to define __stub macros and hopefully few prototypes,
10022     which can conflict with char msgget(); below.  */
10023 #include <assert.h>
10024 /* Override any gcc2 internal prototype to avoid an error.  */
10025 /* We use char because int might match the return type of a gcc2
10026     builtin and then its argument prototype would still apply.  */
10027 char msgget();
10028
10029 int main() {
10030
10031 /* The GNU C library defines this for functions which it implements
10032     to always fail with ENOSYS.  Some functions are actually named
10033     something starting with __ and the normal name is an alias.  */
10034 #if defined (__stub_msgget) || defined (__stub___msgget)
10035 choke me
10036 #else
10037 msgget();
10038 #endif
10039
10040 ; return 0; }
10041 EOF
10042 if { (eval echo configure:10043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10043   rm -rf conftest*
10044   eval "ac_cv_func_msgget=yes"
10045 else
10046   echo "configure: failed program was:" >&5
10047   cat conftest.$ac_ext >&5
10048   rm -rf conftest*
10049   eval "ac_cv_func_msgget=no"
10050 fi
10051 rm -f conftest*
10052
10053 if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
10054   echo "$ac_t""yes" 1>&6
10055   ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
10056 echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
10057 echo "configure:10058: checking for sys/ipc.h" >&5
10058
10059 cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 #include <sys/ipc.h>
10063 EOF
10064 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10065 { (eval echo configure:10066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10066 ac_err=`grep -v '^ *+' conftest.out`
10067 if test -z "$ac_err"; then
10068   rm -rf conftest*
10069   eval "ac_cv_header_$ac_safe=yes"
10070 else
10071   echo "$ac_err" >&5
10072   echo "configure: failed program was:" >&5
10073   cat conftest.$ac_ext >&5
10074   rm -rf conftest*
10075   eval "ac_cv_header_$ac_safe=no"
10076 fi
10077 rm -f conftest*
10078 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10079   echo "$ac_t""yes" 1>&6
10080   ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
10081 echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
10082 echo "configure:10083: checking for sys/msg.h" >&5
10083
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 #include <sys/msg.h>
10088 EOF
10089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10090 { (eval echo configure:10091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10091 ac_err=`grep -v '^ *+' conftest.out`
10092 if test -z "$ac_err"; then
10093   rm -rf conftest*
10094   eval "ac_cv_header_$ac_safe=yes"
10095 else
10096   echo "$ac_err" >&5
10097   echo "configure: failed program was:" >&5
10098   cat conftest.$ac_ext >&5
10099   rm -rf conftest*
10100   eval "ac_cv_header_$ac_safe=no"
10101 fi
10102 rm -f conftest*
10103 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10104   echo "$ac_t""yes" 1>&6
10105   { test "$extra_verbose" = "yes" && cat << \EOF
10106     Defining HAVE_SYSVIPC
10107 EOF
10108 cat >> confdefs.h <<\EOF
10109 #define HAVE_SYSVIPC 1
10110 EOF
10111 }
10112
10113 else
10114   echo "$ac_t""no" 1>&6
10115 fi
10116
10117 else
10118   echo "$ac_t""no" 1>&6
10119 fi
10120
10121 else
10122   echo "$ac_t""no" 1>&6
10123 fi
10124
10125
10126 ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
10127 echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
10128 echo "configure:10129: checking for dirent.h" >&5
10129
10130 cat > conftest.$ac_ext <<EOF
10131 #line 10132 "configure"
10132 #include "confdefs.h"
10133 #include <dirent.h>
10134 EOF
10135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10136 { (eval echo configure:10137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10137 ac_err=`grep -v '^ *+' conftest.out`
10138 if test -z "$ac_err"; then
10139   rm -rf conftest*
10140   eval "ac_cv_header_$ac_safe=yes"
10141 else
10142   echo "$ac_err" >&5
10143   echo "configure: failed program was:" >&5
10144   cat conftest.$ac_ext >&5
10145   rm -rf conftest*
10146   eval "ac_cv_header_$ac_safe=no"
10147 fi
10148 rm -f conftest*
10149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10150   echo "$ac_t""yes" 1>&6
10151   { test "$extra_verbose" = "yes" && cat << \EOF
10152     Defining SYSV_SYSTEM_DIR
10153 EOF
10154 cat >> confdefs.h <<\EOF
10155 #define SYSV_SYSTEM_DIR 1
10156 EOF
10157 }
10158
10159 else
10160   echo "$ac_t""no" 1>&6
10161 ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
10162 echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
10163 echo "configure:10164: checking for sys/dir.h" >&5
10164
10165 cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 #include <sys/dir.h>
10169 EOF
10170 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10171 { (eval echo configure:10172: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10172 ac_err=`grep -v '^ *+' conftest.out`
10173 if test -z "$ac_err"; then
10174   rm -rf conftest*
10175   eval "ac_cv_header_$ac_safe=yes"
10176 else
10177   echo "$ac_err" >&5
10178   echo "configure: failed program was:" >&5
10179   cat conftest.$ac_ext >&5
10180   rm -rf conftest*
10181   eval "ac_cv_header_$ac_safe=no"
10182 fi
10183 rm -f conftest*
10184 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10185   echo "$ac_t""yes" 1>&6
10186   :
10187 else
10188   echo "$ac_t""no" 1>&6
10189 { test "$extra_verbose" = "yes" && cat << \EOF
10190     Defining NONSYSTEM_DIR_LIBRARY
10191 EOF
10192 cat >> confdefs.h <<\EOF
10193 #define NONSYSTEM_DIR_LIBRARY 1
10194 EOF
10195 }
10196
10197 fi
10198
10199 fi
10200
10201
10202 ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
10203 echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
10204 echo "configure:10205: checking for nlist.h" >&5
10205
10206 cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <nlist.h>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10226   echo "$ac_t""yes" 1>&6
10227   { test "$extra_verbose" = "yes" && cat << \EOF
10228     Defining NLIST_STRUCT
10229 EOF
10230 cat >> confdefs.h <<\EOF
10231 #define NLIST_STRUCT 1
10232 EOF
10233 }
10234
10235 else
10236   echo "$ac_t""no" 1>&6
10237 fi
10238
10239
10240
10241 echo "checking "for sound support"" 1>&6
10242 echo "configure:10243: checking "for sound support"" >&5
10243 case "$with_sound" in
10244   native | both ) with_native_sound=yes;;
10245   nas    | no   ) with_native_sound=no;;
10246 esac
10247 test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
10248
10249 if test "$with_native_sound" != "no"; then
10250     if test -n "$native_sound_lib"; then
10251     ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
10252 echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
10253 echo "configure:10254: checking for multimedia/audio_device.h" >&5
10254
10255 cat > conftest.$ac_ext <<EOF
10256 #line 10257 "configure"
10257 #include "confdefs.h"
10258 #include <multimedia/audio_device.h>
10259 EOF
10260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10261 { (eval echo configure:10262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10262 ac_err=`grep -v '^ *+' conftest.out`
10263 if test -z "$ac_err"; then
10264   rm -rf conftest*
10265   eval "ac_cv_header_$ac_safe=yes"
10266 else
10267   echo "$ac_err" >&5
10268   echo "configure: failed program was:" >&5
10269   cat conftest.$ac_ext >&5
10270   rm -rf conftest*
10271   eval "ac_cv_header_$ac_safe=no"
10272 fi
10273 rm -f conftest*
10274 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10275   echo "$ac_t""yes" 1>&6
10276   sound_found=yes sound_cflags=""
10277       extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10278    echo "    xemacs will be linked with \"sunplay.o\""
10279  fi
10280 else
10281   echo "$ac_t""no" 1>&6
10282 fi
10283
10284   fi
10285
10286     if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
10287     sound_found=yes
10288     extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
10289    echo "    xemacs will be linked with \"sunplay.o\""
10290  fi
10291     if test -d "/usr/demo/SOUND/include"
10292       then sound_cflags="-I/usr/demo/SOUND/include"
10293       else sound_cflags="-I/usr/demo/SOUND"
10294     fi
10295     if test -z "$native_sound_lib" ; then
10296       if test -r "/usr/demo/SOUND/lib/libaudio.a"
10297         then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
10298         else native_sound_lib="/usr/demo/SOUND/libaudio.a"
10299       fi
10300     fi
10301   fi
10302
10303     if test -z "$sound_found"; then
10304     case "$canonical" in
10305     *-sgi-* )
10306       if test -z "$native_sound_lib"; then
10307         
10308 echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
10309 echo "configure:10310: checking for ALopenport in -laudio" >&5
10310 ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
10311
10312 xe_check_libs=" -laudio "
10313 cat > conftest.$ac_ext <<EOF
10314 #line 10315 "configure"
10315 #include "confdefs.h"
10316 /* Override any gcc2 internal prototype to avoid an error.  */
10317 /* We use char because int might match the return type of a gcc2
10318     builtin and then its argument prototype would still apply.  */
10319 char ALopenport();
10320
10321 int main() {
10322 ALopenport()
10323 ; return 0; }
10324 EOF
10325 if { (eval echo configure:10326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10326   rm -rf conftest*
10327   eval "ac_cv_lib_$ac_lib_var=yes"
10328 else
10329   echo "configure: failed program was:" >&5
10330   cat conftest.$ac_ext >&5
10331   rm -rf conftest*
10332   eval "ac_cv_lib_$ac_lib_var=no"
10333 fi
10334 rm -f conftest*
10335 xe_check_libs=""
10336
10337 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10338   echo "$ac_t""yes" 1>&6
10339   native_sound_lib="-laudio"
10340 else
10341   echo "$ac_t""no" 1>&6
10342 fi
10343
10344
10345       fi
10346       if test -n "$native_sound_lib"; then
10347         sound_found=yes sound_cflags=""
10348         extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
10349    echo "    xemacs will be linked with \"sgiplay.o\""
10350  fi
10351       fi ;;
10352     hppa*-hp-hpux* )
10353       if test -z "$native_sound_lib"; then
10354         
10355 echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
10356 echo "configure:10357: checking for AOpenAudio in -lAlib" >&5
10357 ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
10358
10359 xe_check_libs=" -lAlib "
10360 cat > conftest.$ac_ext <<EOF
10361 #line 10362 "configure"
10362 #include "confdefs.h"
10363 /* Override any gcc2 internal prototype to avoid an error.  */
10364 /* We use char because int might match the return type of a gcc2
10365     builtin and then its argument prototype would still apply.  */
10366 char AOpenAudio();
10367
10368 int main() {
10369 AOpenAudio()
10370 ; return 0; }
10371 EOF
10372 if { (eval echo configure:10373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10373   rm -rf conftest*
10374   eval "ac_cv_lib_$ac_lib_var=yes"
10375 else
10376   echo "configure: failed program was:" >&5
10377   cat conftest.$ac_ext >&5
10378   rm -rf conftest*
10379   eval "ac_cv_lib_$ac_lib_var=no"
10380 fi
10381 rm -f conftest*
10382 xe_check_libs=""
10383
10384 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10385   echo "$ac_t""yes" 1>&6
10386   native_sound_lib="-lAlib"
10387 else
10388   echo "$ac_t""no" 1>&6
10389 fi
10390
10391
10392       fi
10393       if test -n "$native_sound_lib"; then
10394         sound_found=yes
10395         extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
10396    echo "    xemacs will be linked with \"hpplay.o\""
10397  fi
10398         if test "$GCC" = "yes" # Kludge city
10399           then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
10400           else sound_cflags="+e -I/usr/audio/examples"
10401         fi
10402       fi ;;
10403     esac
10404   fi
10405
10406     if test -z "$sound_found"; then
10407     for dir in "machine" "sys" "linux"; do
10408       ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
10409 echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
10410 echo "configure:10411: checking for ${dir}/soundcard.h" >&5
10411
10412 cat > conftest.$ac_ext <<EOF
10413 #line 10414 "configure"
10414 #include "confdefs.h"
10415 #include <${dir}/soundcard.h>
10416 EOF
10417 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10418 { (eval echo configure:10419: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10419 ac_err=`grep -v '^ *+' conftest.out`
10420 if test -z "$ac_err"; then
10421   rm -rf conftest*
10422   eval "ac_cv_header_$ac_safe=yes"
10423 else
10424   echo "$ac_err" >&5
10425   echo "configure: failed program was:" >&5
10426   cat conftest.$ac_ext >&5
10427   rm -rf conftest*
10428   eval "ac_cv_header_$ac_safe=no"
10429 fi
10430 rm -f conftest*
10431 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10432   echo "$ac_t""yes" 1>&6
10433   sound_found=yes
10434         extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
10435    echo "    xemacs will be linked with \"linuxplay.o\""
10436  fi
10437         { test "$extra_verbose" = "yes" && cat << EOF
10438     Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
10439 EOF
10440 cat >> confdefs.h <<EOF
10441 #define SOUNDCARD_H_PATH "${dir}/soundcard.h"
10442 EOF
10443 }
10444
10445         break
10446 else
10447   echo "$ac_t""no" 1>&6
10448 fi
10449
10450     done
10451   fi
10452
10453   test "$sound_found" = "yes" && with_native_sound=yes
10454 fi
10455
10456 if test -z "$with_sound"; then
10457   if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
10458     with_sound=native
10459   fi
10460 fi
10461
10462 if test "$with_native_sound" = "yes"; then
10463   { test "$extra_verbose" = "yes" && cat << \EOF
10464     Defining HAVE_NATIVE_SOUND
10465 EOF
10466 cat >> confdefs.h <<\EOF
10467 #define HAVE_NATIVE_SOUND 1
10468 EOF
10469 }
10470
10471   test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
10472 fi
10473
10474 case "$with_sound" in both | nas )
10475   { test "$extra_verbose" = "yes" && cat << \EOF
10476     Defining HAVE_NAS_SOUND
10477 EOF
10478 cat >> confdefs.h <<\EOF
10479 #define HAVE_NAS_SOUND 1
10480 EOF
10481 }
10482
10483   extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
10484    echo "    xemacs will be linked with \"nas.o\""
10485  fi
10486   libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
10487       cat > conftest.$ac_ext <<EOF
10488 #line 10489 "configure"
10489 #include "confdefs.h"
10490 #include <audio/Xtutil.h>
10491 EOF
10492 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10493   egrep "AuXtErrorJump" >/dev/null 2>&1; then
10494   :
10495 else
10496   rm -rf conftest*
10497   { test "$extra_verbose" = "yes" && cat << \EOF
10498     Defining NAS_NO_ERROR_JUMP
10499 EOF
10500 cat >> confdefs.h <<\EOF
10501 #define NAS_NO_ERROR_JUMP 1
10502 EOF
10503 }
10504
10505 fi
10506 rm -f conftest*
10507
10508 esac
10509
10510
10511 test -z "$with_tty" && with_tty=yes
10512
10513 if test "$with_tty" = "yes"  ; then
10514   echo "checking for TTY-related features" 1>&6
10515 echo "configure:10516: checking for TTY-related features" >&5
10516   { test "$extra_verbose" = "yes" && cat << \EOF
10517     Defining HAVE_TTY
10518 EOF
10519 cat >> confdefs.h <<\EOF
10520 #define HAVE_TTY 1
10521 EOF
10522 }
10523
10524   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
10525    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\""
10526  fi
10527
10528     if test -z "$with_ncurses"; then
10529     
10530 echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
10531 echo "configure:10532: checking for tgetent in -lncurses" >&5
10532 ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
10533
10534 xe_check_libs=" -lncurses "
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538 /* Override any gcc2 internal prototype to avoid an error.  */
10539 /* We use char because int might match the return type of a gcc2
10540     builtin and then its argument prototype would still apply.  */
10541 char tgetent();
10542
10543 int main() {
10544 tgetent()
10545 ; return 0; }
10546 EOF
10547 if { (eval echo configure:10548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=yes"
10550 else
10551   echo "configure: failed program was:" >&5
10552   cat conftest.$ac_ext >&5
10553   rm -rf conftest*
10554   eval "ac_cv_lib_$ac_lib_var=no"
10555 fi
10556 rm -f conftest*
10557 xe_check_libs=""
10558
10559 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10560   echo "$ac_t""yes" 1>&6
10561   with_ncurses=yes
10562 else
10563   echo "$ac_t""no" 1>&6
10564 with_ncurses=no
10565 fi
10566
10567
10568   fi
10569   if test "$with_ncurses" = "yes"; then
10570     { test "$extra_verbose" = "yes" && cat << \EOF
10571     Defining HAVE_NCURSES
10572 EOF
10573 cat >> confdefs.h <<\EOF
10574 #define HAVE_NCURSES 1
10575 EOF
10576 }
10577
10578     ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10579 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10580 echo "configure:10581: checking for ncurses/curses.h" >&5
10581
10582 cat > conftest.$ac_ext <<EOF
10583 #line 10584 "configure"
10584 #include "confdefs.h"
10585 #include <ncurses/curses.h>
10586 EOF
10587 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10588 { (eval echo configure:10589: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10589 ac_err=`grep -v '^ *+' conftest.out`
10590 if test -z "$ac_err"; then
10591   rm -rf conftest*
10592   eval "ac_cv_header_$ac_safe=yes"
10593 else
10594   echo "$ac_err" >&5
10595   echo "configure: failed program was:" >&5
10596   cat conftest.$ac_ext >&5
10597   rm -rf conftest*
10598   eval "ac_cv_header_$ac_safe=no"
10599 fi
10600 rm -f conftest*
10601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10602   echo "$ac_t""yes" 1>&6
10603   curses_h_path=ncurses/curses.h
10604 else
10605   echo "$ac_t""no" 1>&6
10606 fi
10607
10608     ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
10609 echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
10610 echo "configure:10611: checking for ncurses/term.h" >&5
10611
10612 cat > conftest.$ac_ext <<EOF
10613 #line 10614 "configure"
10614 #include "confdefs.h"
10615 #include <ncurses/term.h>
10616 EOF
10617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10618 { (eval echo configure:10619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10619 ac_err=`grep -v '^ *+' conftest.out`
10620 if test -z "$ac_err"; then
10621   rm -rf conftest*
10622   eval "ac_cv_header_$ac_safe=yes"
10623 else
10624   echo "$ac_err" >&5
10625   echo "configure: failed program was:" >&5
10626   cat conftest.$ac_ext >&5
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=no"
10629 fi
10630 rm -f conftest*
10631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10632   echo "$ac_t""yes" 1>&6
10633   term_h_path=ncurses/term.h
10634 else
10635   echo "$ac_t""no" 1>&6
10636 fi
10637
10638     extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10639    echo "    xemacs will be linked with \"terminfo.o\""
10640  fi
10641     LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
10642
10643     if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
10644                         save_c_switch_site="$c_switch_site"
10645       c_switch_site="$c_switch_site -I/usr/include/ncurses"
10646       ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
10647 echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
10648 echo "configure:10649: checking for ncurses/curses.h" >&5
10649
10650 cat > conftest.$ac_ext <<EOF
10651 #line 10652 "configure"
10652 #include "confdefs.h"
10653 #include <ncurses/curses.h>
10654 EOF
10655 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10656 { (eval echo configure:10657: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10657 ac_err=`grep -v '^ *+' conftest.out`
10658 if test -z "$ac_err"; then
10659   rm -rf conftest*
10660   eval "ac_cv_header_$ac_safe=yes"
10661 else
10662   echo "$ac_err" >&5
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   eval "ac_cv_header_$ac_safe=no"
10667 fi
10668 rm -f conftest*
10669 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10670   echo "$ac_t""yes" 1>&6
10671   curses_h_path=ncurses/curses.h
10672 else
10673   echo "$ac_t""no" 1>&6
10674 fi
10675
10676       if test "$ac_cv_header_ncurses_curses_h" = "yes"
10677         then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
10678         else c_switch_site="$save_c_switch_site"
10679       fi
10680     fi
10681   else         if test "$have_terminfo" = "yes"; then
10682       extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
10683    echo "    xemacs will be linked with \"terminfo.o\""
10684  fi
10685       if test -n "$libs_termcap"; then
10686         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10687       else
10688         for lib in curses termlib termcap; do
10689           
10690 echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
10691 echo "configure:10692: checking for tgetent in -l$lib" >&5
10692 ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
10693
10694 xe_check_libs=" -l$lib "
10695 cat > conftest.$ac_ext <<EOF
10696 #line 10697 "configure"
10697 #include "confdefs.h"
10698 /* Override any gcc2 internal prototype to avoid an error.  */
10699 /* We use char because int might match the return type of a gcc2
10700     builtin and then its argument prototype would still apply.  */
10701 char tgetent();
10702
10703 int main() {
10704 tgetent()
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10708   rm -rf conftest*
10709   eval "ac_cv_lib_$ac_lib_var=yes"
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=no"
10715 fi
10716 rm -f conftest*
10717 xe_check_libs=""
10718
10719 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10720   echo "$ac_t""yes" 1>&6
10721   LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
10722 else
10723   echo "$ac_t""no" 1>&6
10724 fi
10725
10726
10727         done
10728       fi
10729     else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
10730    echo "    xemacs will be linked with \"tparam.o\""
10731  fi
10732                         case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
10733       if test -n "$libs_termcap"; then
10734         LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
10735       else
10736         
10737 echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
10738 echo "configure:10739: checking for tgetent in -lcurses" >&5
10739 ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
10740
10741 xe_check_libs=" -lcurses "
10742 cat > conftest.$ac_ext <<EOF
10743 #line 10744 "configure"
10744 #include "confdefs.h"
10745 /* Override any gcc2 internal prototype to avoid an error.  */
10746 /* We use char because int might match the return type of a gcc2
10747     builtin and then its argument prototype would still apply.  */
10748 char tgetent();
10749
10750 int main() {
10751 tgetent()
10752 ; return 0; }
10753 EOF
10754 if { (eval echo configure:10755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10755   rm -rf conftest*
10756   eval "ac_cv_lib_$ac_lib_var=yes"
10757 else
10758   echo "configure: failed program was:" >&5
10759   cat conftest.$ac_ext >&5
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=no"
10762 fi
10763 rm -f conftest*
10764 xe_check_libs=""
10765
10766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10767   echo "$ac_t""yes" 1>&6
10768   LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
10769 else
10770   echo "$ac_t""no" 1>&6
10771 echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
10772 echo "configure:10773: checking for tgetent in -ltermcap" >&5
10773 ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
10774
10775 xe_check_libs=" -ltermcap "
10776 cat > conftest.$ac_ext <<EOF
10777 #line 10778 "configure"
10778 #include "confdefs.h"
10779 /* Override any gcc2 internal prototype to avoid an error.  */
10780 /* We use char because int might match the return type of a gcc2
10781     builtin and then its argument prototype would still apply.  */
10782 char tgetent();
10783
10784 int main() {
10785 tgetent()
10786 ; return 0; }
10787 EOF
10788 if { (eval echo configure:10789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10789   rm -rf conftest*
10790   eval "ac_cv_lib_$ac_lib_var=yes"
10791 else
10792   echo "configure: failed program was:" >&5
10793   cat conftest.$ac_ext >&5
10794   rm -rf conftest*
10795   eval "ac_cv_lib_$ac_lib_var=no"
10796 fi
10797 rm -f conftest*
10798 xe_check_libs=""
10799
10800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10801   echo "$ac_t""yes" 1>&6
10802   LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
10803 else
10804   echo "$ac_t""no" 1>&6
10805 extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
10806    echo "    xemacs will be linked with \"termcap.o\""
10807  fi
10808 fi
10809
10810
10811 fi
10812
10813
10814       fi
10815     fi
10816   fi
10817   { test "$extra_verbose" = "yes" && cat << EOF
10818     Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
10819 EOF
10820 cat >> confdefs.h <<EOF
10821 #define CURSES_H_PATH "${curses_h_path-curses.h}"
10822 EOF
10823 }
10824
10825   { test "$extra_verbose" = "yes" && cat << EOF
10826     Defining TERM_H_PATH = "${term_h_path-term.h}"
10827 EOF
10828 cat >> confdefs.h <<EOF
10829 #define TERM_H_PATH "${term_h_path-term.h}"
10830 EOF
10831 }
10832
10833
10834     test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
10835 echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
10836 echo "configure:10837: checking for gpm.h" >&5
10837
10838 cat > conftest.$ac_ext <<EOF
10839 #line 10840 "configure"
10840 #include "confdefs.h"
10841 #include <gpm.h>
10842 EOF
10843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10844 { (eval echo configure:10845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10845 ac_err=`grep -v '^ *+' conftest.out`
10846 if test -z "$ac_err"; then
10847   rm -rf conftest*
10848   eval "ac_cv_header_$ac_safe=yes"
10849 else
10850   echo "$ac_err" >&5
10851   echo "configure: failed program was:" >&5
10852   cat conftest.$ac_ext >&5
10853   rm -rf conftest*
10854   eval "ac_cv_header_$ac_safe=no"
10855 fi
10856 rm -f conftest*
10857 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10858   echo "$ac_t""yes" 1>&6
10859   :
10860 else
10861   echo "$ac_t""no" 1>&6
10862 with_gpm=no
10863 fi
10864  }
10865   test -z "$with_gpm" && { 
10866 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
10867 echo "configure:10868: checking for Gpm_Open in -lgpm" >&5
10868 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
10869
10870 xe_check_libs=" -lgpm "
10871 cat > conftest.$ac_ext <<EOF
10872 #line 10873 "configure"
10873 #include "confdefs.h"
10874 /* Override any gcc2 internal prototype to avoid an error.  */
10875 /* We use char because int might match the return type of a gcc2
10876     builtin and then its argument prototype would still apply.  */
10877 char Gpm_Open();
10878
10879 int main() {
10880 Gpm_Open()
10881 ; return 0; }
10882 EOF
10883 if { (eval echo configure:10884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10884   rm -rf conftest*
10885   eval "ac_cv_lib_$ac_lib_var=yes"
10886 else
10887   echo "configure: failed program was:" >&5
10888   cat conftest.$ac_ext >&5
10889   rm -rf conftest*
10890   eval "ac_cv_lib_$ac_lib_var=no"
10891 fi
10892 rm -f conftest*
10893 xe_check_libs=""
10894
10895 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
10896   echo "$ac_t""yes" 1>&6
10897   with_gpm=yes
10898 else
10899   echo "$ac_t""no" 1>&6
10900 with_gpm=no
10901 fi
10902
10903  }
10904   if test "$with_gpm" = "yes"; then
10905     { test "$extra_verbose" = "yes" && cat << \EOF
10906     Defining HAVE_GPM
10907 EOF
10908 cat >> confdefs.h <<\EOF
10909 #define HAVE_GPM 1
10910 EOF
10911 }
10912
10913     extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
10914    echo "    xemacs will be linked with \"gpmevent.o\""
10915  fi
10916     LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
10917   fi
10918
10919 else   for feature in ncurses gpm; do
10920     if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
10921       echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
10922     fi
10923     eval "with_${feature}=no"
10924   done
10925 fi 
10926 test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
10927    echo "    xemacs will be linked with \"event-unixoid.o\""
10928  fi
10929
10930
10931 test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
10932   != "no no no" && echo "checking for database support" 1>&6
10933 echo "configure:10934: checking for database support" >&5
10934
10935 if test "$with_database_gnudbm $with_database_dbm" != "no no"; then
10936   ac_safe=`echo "ndbm.h" | sed 'y%./+-%__p_%'`
10937 echo $ac_n "checking for ndbm.h""... $ac_c" 1>&6
10938 echo "configure:10939: checking for ndbm.h" >&5
10939
10940 cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 #include <ndbm.h>
10944 EOF
10945 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10946 { (eval echo configure:10947: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10947 ac_err=`grep -v '^ *+' conftest.out`
10948 if test -z "$ac_err"; then
10949   rm -rf conftest*
10950   eval "ac_cv_header_$ac_safe=yes"
10951 else
10952   echo "$ac_err" >&5
10953   echo "configure: failed program was:" >&5
10954   cat conftest.$ac_ext >&5
10955   rm -rf conftest*
10956   eval "ac_cv_header_$ac_safe=no"
10957 fi
10958 rm -f conftest*
10959 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10960   echo "$ac_t""yes" 1>&6
10961   :
10962 else
10963   echo "$ac_t""no" 1>&6
10964
10965     test "$with_database_gnudbm" = "yes" -o \
10966          "$with_database_dbm"    = "yes" && \
10967       { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
10968     with_database_gnudbm=no with_database_dbm=no
10969 fi
10970
10971 fi
10972
10973 if test "$with_database_gnudbm" != "no"; then
10974   
10975 echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
10976 echo "configure:10977: checking for dbm_open in -lgdbm" >&5
10977 ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
10978
10979 xe_check_libs=" -lgdbm "
10980 cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 /* Override any gcc2 internal prototype to avoid an error.  */
10984 /* We use char because int might match the return type of a gcc2
10985     builtin and then its argument prototype would still apply.  */
10986 char dbm_open();
10987
10988 int main() {
10989 dbm_open()
10990 ; return 0; }
10991 EOF
10992 if { (eval echo configure:10993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
10993   rm -rf conftest*
10994   eval "ac_cv_lib_$ac_lib_var=yes"
10995 else
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=no"
11000 fi
11001 rm -f conftest*
11002 xe_check_libs=""
11003
11004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11005   echo "$ac_t""yes" 1>&6
11006   with_database_gnudbm=yes with_database_dbm=no libdbm=-lgdbm
11007 else
11008   echo "$ac_t""no" 1>&6
11009 if test "$with_database_gnudbm" = "yes"; then
11010      { echo "Error:" "Required GNU DBM support cannot be provided." >&2; exit 1; }
11011    fi
11012    with_database_gnudbm=no
11013 fi
11014
11015
11016 fi
11017
11018 if test "$with_database_dbm" != "no"; then
11019   echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
11020 echo "configure:11021: checking for dbm_open" >&5
11021
11022 cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 /* System header to define __stub macros and hopefully few prototypes,
11026     which can conflict with char dbm_open(); below.  */
11027 #include <assert.h>
11028 /* Override any gcc2 internal prototype to avoid an error.  */
11029 /* We use char because int might match the return type of a gcc2
11030     builtin and then its argument prototype would still apply.  */
11031 char dbm_open();
11032
11033 int main() {
11034
11035 /* The GNU C library defines this for functions which it implements
11036     to always fail with ENOSYS.  Some functions are actually named
11037     something starting with __ and the normal name is an alias.  */
11038 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
11039 choke me
11040 #else
11041 dbm_open();
11042 #endif
11043
11044 ; return 0; }
11045 EOF
11046 if { (eval echo configure:11047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11047   rm -rf conftest*
11048   eval "ac_cv_func_dbm_open=yes"
11049 else
11050   echo "configure: failed program was:" >&5
11051   cat conftest.$ac_ext >&5
11052   rm -rf conftest*
11053   eval "ac_cv_func_dbm_open=no"
11054 fi
11055 rm -f conftest*
11056
11057 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
11058   echo "$ac_t""yes" 1>&6
11059   with_database_dbm=yes libdbm=
11060 else
11061   echo "$ac_t""no" 1>&6
11062
11063     
11064 echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
11065 echo "configure:11066: checking for dbm_open in -ldbm" >&5
11066 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
11067
11068 xe_check_libs=" -ldbm "
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char dbm_open();
11076
11077 int main() {
11078 dbm_open()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 xe_check_libs=""
11092
11093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11094   echo "$ac_t""yes" 1>&6
11095   with_database_dbm=yes libdbm=-ldbm
11096 else
11097   echo "$ac_t""no" 1>&6
11098 test "$with_database_dbm" = "yes" && \
11099         { echo "Error:" "Required DBM support cannot be provided." >&2; exit 1; }
11100       with_database_dbm=no
11101 fi
11102
11103
11104 fi
11105
11106 fi
11107
11108 test -n "$libdbm" && LIBS=""$libdbm" $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \""$libdbm"\" to \$LIBS"; fi
11109 test "$with_database_gnudbm" = "yes" -o \
11110      "$with_database_dbm"    = "yes" && \
11111   { test "$extra_verbose" = "yes" && cat << \EOF
11112     Defining HAVE_DBM
11113 EOF
11114 cat >> confdefs.h <<\EOF
11115 #define HAVE_DBM 1
11116 EOF
11117 }
11118
11119
11120 if test "$with_database_berkdb" != "no"; then
11121   echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
11122 echo "configure:11123: checking for Berkeley db.h" >&5
11123   for path in "db/db.h" "db.h"; do
11124     cat > conftest.$ac_ext <<EOF
11125 #line 11126 "configure"
11126 #include "confdefs.h"
11127 #ifdef HAVE_INTTYPES_H
11128 #define __BIT_TYPES_DEFINED__
11129 #include <inttypes.h>
11130 typedef uint8_t  u_int8_t;
11131 typedef uint16_t u_int16_t;
11132 typedef uint32_t u_int32_t;
11133 #ifdef WE_DONT_NEED_QUADS
11134 typedef uint64_t u_int64_t;
11135 #endif
11136 #endif
11137 #include <$path>
11138
11139 int main() {
11140
11141 ; return 0; }
11142 EOF
11143 if { (eval echo configure:11144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11144   rm -rf conftest*
11145   db_h_path="$path"; break
11146 else
11147   echo "configure: failed program was:" >&5
11148   cat conftest.$ac_ext >&5
11149 fi
11150 rm -f conftest*
11151   done
11152   if test -z "$db_h_path"
11153   then echo "$ac_t""no" 1>&6; with_database_berkdb=no
11154   else echo "$ac_t""$db_h_path" 1>&6
11155   fi
11156
11157   if test "$with_database_berkdb" != "no"; then
11158     echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
11159 echo "configure:11160: checking for Berkeley DB version" >&5
11160     cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 #include <$db_h_path>
11164 #if DB_VERSION_MAJOR > 1
11165 yes
11166 #endif
11167
11168 EOF
11169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11170   egrep "yes" >/dev/null 2>&1; then
11171   rm -rf conftest*
11172   echo "$ac_t""2" 1>&6; dbfunc=db_open
11173 else
11174   rm -rf conftest*
11175   echo "$ac_t""1" 1>&6; dbfunc=dbopen
11176 fi
11177 rm -f conftest*
11178
11179     echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
11180 echo "configure:11181: checking for $dbfunc" >&5
11181
11182 cat > conftest.$ac_ext <<EOF
11183 #line 11184 "configure"
11184 #include "confdefs.h"
11185 /* System header to define __stub macros and hopefully few prototypes,
11186     which can conflict with char $dbfunc(); below.  */
11187 #include <assert.h>
11188 /* Override any gcc2 internal prototype to avoid an error.  */
11189 /* We use char because int might match the return type of a gcc2
11190     builtin and then its argument prototype would still apply.  */
11191 char $dbfunc();
11192
11193 int main() {
11194
11195 /* The GNU C library defines this for functions which it implements
11196     to always fail with ENOSYS.  Some functions are actually named
11197     something starting with __ and the normal name is an alias.  */
11198 #if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
11199 choke me
11200 #else
11201 $dbfunc();
11202 #endif
11203
11204 ; return 0; }
11205 EOF
11206 if { (eval echo configure:11207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11207   rm -rf conftest*
11208   eval "ac_cv_func_$dbfunc=yes"
11209 else
11210   echo "configure: failed program was:" >&5
11211   cat conftest.$ac_ext >&5
11212   rm -rf conftest*
11213   eval "ac_cv_func_$dbfunc=no"
11214 fi
11215 rm -f conftest*
11216
11217 if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
11218   echo "$ac_t""yes" 1>&6
11219   with_database_berkdb=yes need_libdb=no
11220 else
11221   echo "$ac_t""no" 1>&6
11222
11223     
11224 echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
11225 echo "configure:11226: checking for $dbfunc in -ldb" >&5
11226 ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
11227
11228 xe_check_libs=" -ldb "
11229 cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232 /* Override any gcc2 internal prototype to avoid an error.  */
11233 /* We use char because int might match the return type of a gcc2
11234     builtin and then its argument prototype would still apply.  */
11235 char $dbfunc();
11236
11237 int main() {
11238 $dbfunc()
11239 ; return 0; }
11240 EOF
11241 if { (eval echo configure:11242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11242   rm -rf conftest*
11243   eval "ac_cv_lib_$ac_lib_var=yes"
11244 else
11245   echo "configure: failed program was:" >&5
11246   cat conftest.$ac_ext >&5
11247   rm -rf conftest*
11248   eval "ac_cv_lib_$ac_lib_var=no"
11249 fi
11250 rm -f conftest*
11251 xe_check_libs=""
11252
11253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11254   echo "$ac_t""yes" 1>&6
11255   with_database_berkdb=yes need_libdb=yes
11256 else
11257   echo "$ac_t""no" 1>&6
11258 fi
11259
11260
11261 fi
11262
11263   fi
11264
11265   if test "$with_database_berkdb" = "yes"; then
11266     { test "$extra_verbose" = "yes" && cat << EOF
11267     Defining DB_H_PATH = "$db_h_path"
11268 EOF
11269 cat >> confdefs.h <<EOF
11270 #define DB_H_PATH "$db_h_path"
11271 EOF
11272 }
11273
11274     { test "$extra_verbose" = "yes" && cat << \EOF
11275     Defining HAVE_BERKELEY_DB
11276 EOF
11277 cat >> confdefs.h <<\EOF
11278 #define HAVE_BERKELEY_DB 1
11279 EOF
11280 }
11281
11282     test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
11283   else with_database_berkdb=no
11284   fi
11285 fi
11286
11287 if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
11288      != "no no no"; then
11289   { test "$extra_verbose" = "yes" && cat << \EOF
11290     Defining HAVE_DATABASE
11291 EOF
11292 cat >> confdefs.h <<\EOF
11293 #define HAVE_DATABASE 1
11294 EOF
11295 }
11296
11297   extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
11298    echo "    xemacs will be linked with \"database.o\""
11299  fi
11300 fi
11301
11302 if test "$with_socks" = "yes"; then
11303   
11304 echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
11305 echo "configure:11306: checking for SOCKSinit in -lsocks" >&5
11306 ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
11307
11308 xe_check_libs=" -lsocks "
11309 cat > conftest.$ac_ext <<EOF
11310 #line 11311 "configure"
11311 #include "confdefs.h"
11312 /* Override any gcc2 internal prototype to avoid an error.  */
11313 /* We use char because int might match the return type of a gcc2
11314     builtin and then its argument prototype would still apply.  */
11315 char SOCKSinit();
11316
11317 int main() {
11318 SOCKSinit()
11319 ; return 0; }
11320 EOF
11321 if { (eval echo configure:11322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11322   rm -rf conftest*
11323   eval "ac_cv_lib_$ac_lib_var=yes"
11324 else
11325   echo "configure: failed program was:" >&5
11326   cat conftest.$ac_ext >&5
11327   rm -rf conftest*
11328   eval "ac_cv_lib_$ac_lib_var=no"
11329 fi
11330 rm -f conftest*
11331 xe_check_libs=""
11332
11333 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11334   echo "$ac_t""yes" 1>&6
11335     ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
11336     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
11337   { test "$extra_verbose" = "yes" && cat << EOF
11338     Defining $ac_tr_lib
11339 EOF
11340 cat >> confdefs.h <<EOF
11341 #define $ac_tr_lib 1
11342 EOF
11343 }
11344
11345   LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
11346
11347 else
11348   echo "$ac_t""no" 1>&6
11349 fi
11350
11351
11352   test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
11353     Defining HAVE_SOCKS
11354 EOF
11355 cat >> confdefs.h <<\EOF
11356 #define HAVE_SOCKS 1
11357 EOF
11358 }
11359
11360 fi
11361
11362 if test "$usage_tracking" = "yes"; then
11363   { test "$extra_verbose" = "yes" && cat << \EOF
11364     Defining USAGE_TRACKING
11365 EOF
11366 cat >> confdefs.h <<\EOF
11367 #define USAGE_TRACKING 1
11368 EOF
11369 }
11370
11371   LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
11372 fi
11373
11374 test -z "$with_shlib" && test "$opsys $machine" = "cygwin32 intel386" && with_shlib=no
11375
11376 for ac_hdr in dlfcn.h
11377 do
11378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11380 echo "configure:11381: checking for $ac_hdr" >&5
11381
11382 cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 #include <$ac_hdr>
11386 EOF
11387 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11388 { (eval echo configure:11389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11389 ac_err=`grep -v '^ *+' conftest.out`
11390 if test -z "$ac_err"; then
11391   rm -rf conftest*
11392   eval "ac_cv_header_$ac_safe=yes"
11393 else
11394   echo "$ac_err" >&5
11395   echo "configure: failed program was:" >&5
11396   cat conftest.$ac_ext >&5
11397   rm -rf conftest*
11398   eval "ac_cv_header_$ac_safe=no"
11399 fi
11400 rm -f conftest*
11401 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11402   echo "$ac_t""yes" 1>&6
11403     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11404   { test "$extra_verbose" = "yes" && cat << EOF
11405     Defining $ac_tr_hdr
11406 EOF
11407 cat >> confdefs.h <<EOF
11408 #define $ac_tr_hdr 1
11409 EOF
11410 }
11411  have_dlfcn=yes
11412 else
11413   echo "$ac_t""no" 1>&6
11414 fi
11415 done
11416
11417 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11418 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
11419 echo "configure:11420: checking for dlopen in -ldl" >&5
11420 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
11421
11422 xe_check_libs=" -ldl "
11423 cat > conftest.$ac_ext <<EOF
11424 #line 11425 "configure"
11425 #include "confdefs.h"
11426 /* Override any gcc2 internal prototype to avoid an error.  */
11427 /* We use char because int might match the return type of a gcc2
11428     builtin and then its argument prototype would still apply.  */
11429 char dlopen();
11430
11431 int main() {
11432 dlopen()
11433 ; return 0; }
11434 EOF
11435 if { (eval echo configure:11436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11436   rm -rf conftest*
11437   eval "ac_cv_lib_$ac_lib_var=yes"
11438 else
11439   echo "configure: failed program was:" >&5
11440   cat conftest.$ac_ext >&5
11441   rm -rf conftest*
11442   eval "ac_cv_lib_$ac_lib_var=no"
11443 fi
11444 rm -f conftest*
11445 xe_check_libs=""
11446
11447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11448   echo "$ac_t""yes" 1>&6
11449   { test "$extra_verbose" = "yes" && cat << \EOF
11450     Defining HAVE_DLOPEN
11451 EOF
11452 cat >> confdefs.h <<\EOF
11453 #define HAVE_DLOPEN 1
11454 EOF
11455 }
11456  DLL_LIB=dl;  with_shlib=yes
11457 else
11458   echo "$ac_t""no" 1>&6
11459 fi
11460
11461  }
11462 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11463 echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
11464 echo "configure:11465: checking for _dlopen in -lc" >&5
11465 ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
11466
11467 xe_check_libs=" -lc "
11468 cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 /* Override any gcc2 internal prototype to avoid an error.  */
11472 /* We use char because int might match the return type of a gcc2
11473     builtin and then its argument prototype would still apply.  */
11474 char _dlopen();
11475
11476 int main() {
11477 _dlopen()
11478 ; return 0; }
11479 EOF
11480 if { (eval echo configure:11481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11481   rm -rf conftest*
11482   eval "ac_cv_lib_$ac_lib_var=yes"
11483 else
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   eval "ac_cv_lib_$ac_lib_var=no"
11488 fi
11489 rm -f conftest*
11490 xe_check_libs=""
11491
11492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11493   echo "$ac_t""yes" 1>&6
11494   { test "$extra_verbose" = "yes" && cat << \EOF
11495     Defining HAVE_DLOPEN
11496 EOF
11497 cat >> confdefs.h <<\EOF
11498 #define HAVE_DLOPEN 1
11499 EOF
11500 }
11501  DLL_LIB=;   with_shlib=yes
11502 else
11503   echo "$ac_t""no" 1>&6
11504 fi
11505
11506  }
11507 test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
11508 echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
11509 echo "configure:11510: checking for dlopen in -lc" >&5
11510 ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
11511
11512 xe_check_libs=" -lc "
11513 cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 /* Override any gcc2 internal prototype to avoid an error.  */
11517 /* We use char because int might match the return type of a gcc2
11518     builtin and then its argument prototype would still apply.  */
11519 char dlopen();
11520
11521 int main() {
11522 dlopen()
11523 ; return 0; }
11524 EOF
11525 if { (eval echo configure:11526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11526   rm -rf conftest*
11527   eval "ac_cv_lib_$ac_lib_var=yes"
11528 else
11529   echo "configure: failed program was:" >&5
11530   cat conftest.$ac_ext >&5
11531   rm -rf conftest*
11532   eval "ac_cv_lib_$ac_lib_var=no"
11533 fi
11534 rm -f conftest*
11535 xe_check_libs=""
11536
11537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11538   echo "$ac_t""yes" 1>&6
11539   { test "$extra_verbose" = "yes" && cat << \EOF
11540     Defining HAVE_DLOPEN
11541 EOF
11542 cat >> confdefs.h <<\EOF
11543 #define HAVE_DLOPEN 1
11544 EOF
11545 }
11546  DLL_LIB=;   with_shlib=yes
11547 else
11548   echo "$ac_t""no" 1>&6
11549 fi
11550
11551  }
11552 test -z "$with_shlib" && { 
11553 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
11554 echo "configure:11555: checking for shl_load in -ldld" >&5
11555 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
11556
11557 xe_check_libs=" -ldld "
11558 cat > conftest.$ac_ext <<EOF
11559 #line 11560 "configure"
11560 #include "confdefs.h"
11561 /* Override any gcc2 internal prototype to avoid an error.  */
11562 /* We use char because int might match the return type of a gcc2
11563     builtin and then its argument prototype would still apply.  */
11564 char shl_load();
11565
11566 int main() {
11567 shl_load()
11568 ; return 0; }
11569 EOF
11570 if { (eval echo configure:11571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11571   rm -rf conftest*
11572   eval "ac_cv_lib_$ac_lib_var=yes"
11573 else
11574   echo "configure: failed program was:" >&5
11575   cat conftest.$ac_ext >&5
11576   rm -rf conftest*
11577   eval "ac_cv_lib_$ac_lib_var=no"
11578 fi
11579 rm -f conftest*
11580 xe_check_libs=""
11581
11582 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11583   echo "$ac_t""yes" 1>&6
11584   { test "$extra_verbose" = "yes" && cat << \EOF
11585     Defining HAVE_SHL_LOAD
11586 EOF
11587 cat >> confdefs.h <<\EOF
11588 #define HAVE_SHL_LOAD 1
11589 EOF
11590 }
11591  DLL_LIB=dld; with_shlib=yes
11592 else
11593   echo "$ac_t""no" 1>&6
11594 fi
11595
11596  }
11597 test -z "$with_shlib" && { 
11598 echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
11599 echo "configure:11600: checking for dld_init in -ldld" >&5
11600 ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
11601
11602 xe_check_libs=" -ldld "
11603 cat > conftest.$ac_ext <<EOF
11604 #line 11605 "configure"
11605 #include "confdefs.h"
11606 /* Override any gcc2 internal prototype to avoid an error.  */
11607 /* We use char because int might match the return type of a gcc2
11608     builtin and then its argument prototype would still apply.  */
11609 char dld_init();
11610
11611 int main() {
11612 dld_init()
11613 ; return 0; }
11614 EOF
11615 if { (eval echo configure:11616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11616   rm -rf conftest*
11617   eval "ac_cv_lib_$ac_lib_var=yes"
11618 else
11619   echo "configure: failed program was:" >&5
11620   cat conftest.$ac_ext >&5
11621   rm -rf conftest*
11622   eval "ac_cv_lib_$ac_lib_var=no"
11623 fi
11624 rm -f conftest*
11625 xe_check_libs=""
11626
11627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
11628   echo "$ac_t""yes" 1>&6
11629   { test "$extra_verbose" = "yes" && cat << \EOF
11630     Defining HAVE_DLD_INIT
11631 EOF
11632 cat >> confdefs.h <<\EOF
11633 #define HAVE_DLD_INIT 1
11634 EOF
11635 }
11636  DLL_LIB=dld; with_shlib=yes
11637 else
11638   echo "$ac_t""no" 1>&6
11639 fi
11640
11641  }
11642 if test "$with_shlib" = "yes"; then
11643   { test "$extra_verbose" = "yes" && cat << \EOF
11644     Defining HAVE_SHLIB
11645 EOF
11646 cat >> confdefs.h <<\EOF
11647 #define HAVE_SHLIB 1
11648 EOF
11649 }
11650
11651   extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
11652    echo "    xemacs will be linked with \"sysdll.o\""
11653  fi
11654   extra_objs="$extra_objs dll.o" &&  if test "$extra_verbose" = "yes"; then
11655    echo "    xemacs will be linked with \"dll.o\""
11656  fi
11657   test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
11658   
11659 dll_ld="ld"
11660 dll_lflags="-shared"
11661 dll_cflags="-r"
11662 dll_oflags="-o "
11663
11664 echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6
11665 echo "configure:11666: checking how to build a shared library" >&5
11666 case `uname -rs` in
11667         UNIX_SV*|UNIX_System_V*)
11668                 dll_lflags="-G"
11669                 dll_cflags=-Kpic
11670                 dll_ld="ld"
11671                 ;;
11672         BSD/OS*)
11673                 dll_cflags=
11674                 dll_lflags="-r"
11675                 dll_ld="shlicc2"
11676                 ;;
11677         FreeBSD*2*)
11678                 dll_lflags="-Bshareable"
11679                 dll_cflags="-fPIC -DPIC"
11680                 dll_ld=ld
11681                 ;;
11682         SunOS*4.*)
11683                 dll_cflags="-P"
11684                 dll_lflags="-dp -assert pure-text -assert nodefinitions"
11685                 ;;
11686         SunOS*5.*)
11687                 dll_ld="cc"
11688                 dll_cflags="-KPIC"
11689                 dll_lflags="-G"
11690                 dll_oflags="-W0,-y-o -W0,-y"
11691                 ;;      
11692         IRIX*5.*|IRIX*6.*)
11693                 dll_cflags="-KPIC"
11694                 ;;
11695         OSF1*)
11696                 ;;
11697         HP-UX*)
11698                 dll_ld="ld"
11699                 dll_lflags="-b"
11700                 dll_cflags="+z"
11701                 ;;
11702         SCO_SV*)
11703                 dll_ld="ld"
11704                 dll_lflags="-G"
11705                 dll_cflags="-Kpic"
11706                 ;;
11707         AIX*)
11708                 dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
11709                 dll_ld="ld"
11710                 ;;
11711         *)
11712                 ;;
11713         esac
11714
11715         if test "$GCC" = "yes" ; then
11716                 dll_cflags="-fPIC"
11717                 case `uname -rs` in
11718                 SunOS*5.*)
11719                         dll_ld="ld"
11720                         dll_oflags="-o "
11721                         dll_lflags="-G"
11722                         ;;
11723                 SCO_SV*)
11724                         dll_ld="ld"
11725                         dll_lflags="-G"
11726                         dll_cflags="-b elf"
11727                         ;;
11728                 FreeBSD*)
11729                         dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
11730                         dll_lflags="-Bshareable"
11731                         dll_ld=ld
11732                         ;;
11733                 BSD/OS*)
11734                         dll_cflags=
11735                         dll_lflags="-r"
11736                         dll_ld="shlicc2"
11737                         ;;
11738                 UNIX_SV*)
11739                         dll_cflags="-fPIC"
11740                         ;;
11741                 *)
11742                         dll_ld="$CC"
11743                         dll_lflags="-shared"
11744                 esac
11745         fi
11746
11747         echo "$ac_t"""lflags: $dll_lflags cflags: $dll_cflags"" 1>&6
11748
11749
11750
11751
11752
11753   for ac_func in dlerror
11754 do
11755 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11756 echo "configure:11757: checking for $ac_func" >&5
11757
11758 cat > conftest.$ac_ext <<EOF
11759 #line 11760 "configure"
11760 #include "confdefs.h"
11761 /* System header to define __stub macros and hopefully few prototypes,
11762     which can conflict with char $ac_func(); below.  */
11763 #include <assert.h>
11764 /* Override any gcc2 internal prototype to avoid an error.  */
11765 /* We use char because int might match the return type of a gcc2
11766     builtin and then its argument prototype would still apply.  */
11767 char $ac_func();
11768
11769 int main() {
11770
11771 /* The GNU C library defines this for functions which it implements
11772     to always fail with ENOSYS.  Some functions are actually named
11773     something starting with __ and the normal name is an alias.  */
11774 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11775 choke me
11776 #else
11777 $ac_func();
11778 #endif
11779
11780 ; return 0; }
11781 EOF
11782 if { (eval echo configure:11783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
11783   rm -rf conftest*
11784   eval "ac_cv_func_$ac_func=yes"
11785 else
11786   echo "configure: failed program was:" >&5
11787   cat conftest.$ac_ext >&5
11788   rm -rf conftest*
11789   eval "ac_cv_func_$ac_func=no"
11790 fi
11791 rm -f conftest*
11792
11793 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11794   echo "$ac_t""yes" 1>&6
11795     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11796   { test "$extra_verbose" = "yes" && cat << EOF
11797     Defining $ac_tr_func
11798 EOF
11799 cat >> confdefs.h <<EOF
11800 #define $ac_tr_func 1
11801 EOF
11802 }
11803  
11804 else
11805   echo "$ac_t""no" 1>&6
11806 fi
11807 done
11808
11809   ld_dynamic_link_flags=
11810     case "$opsys" in
11811   hpux*)  ld_dynamic_link_flags="-Wl,-E" ;;
11812   linux*) ld_dynamic_link_flags="-rdynamic" ;;
11813   *) ;;
11814   esac
11815 fi
11816
11817 cat > conftest.$ac_ext <<EOF
11818 #line 11819 "configure"
11819 #include "confdefs.h"
11820 int main(int c,char *v[]){return 0;}
11821 EOF
11822 if { (eval echo configure:11823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit $?) 2>&5
11823 then
11824   :
11825 else
11826   conftest_rc="$?"
11827   echo "configure: failed program was:" >&5
11828   cat conftest.$ac_ext >&5
11829   rm -fr conftest*
11830   
11831   echo ""
11832   echo "*** PANIC *** The C compiler can no longer build working executables."
11833   echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
11834   echo "*** PANIC *** The most likely reason for this problem is that configure"
11835   echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
11836   echo "*** PANIC *** found at run time."
11837   echo "*** PANIC ***"
11838   echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
11839   echo "*** PANIC *** On other systems, try telling configure where to find the"
11840   echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
11841   echo "*** PANIC ***"
11842   echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
11843   echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
11844   echo "*** PANIC *** on your system.  Don't do that."
11845   exit 1
11846 fi
11847 rm -fr conftest*
11848
11849
11850 { test "$extra_verbose" = "yes" && cat << \EOF
11851     Defining HAVE_UNIX_PROCESSES
11852 EOF
11853 cat >> confdefs.h <<\EOF
11854 #define HAVE_UNIX_PROCESSES 1
11855 EOF
11856 }
11857
11858 extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
11859    echo "    xemacs will be linked with \"process-unix.o\""
11860  fi
11861
11862
11863
11864 T=""
11865 for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11866 CFLAGS="$T"
11867
11868
11869 T=""
11870 for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11871 extra_objs="$T"
11872
11873
11874 T=""
11875 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
11876 c_switch_general="$T"
11877
11878
11879 T=""
11880 for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11881 c_switch_window_system="$T"
11882
11883
11884 T=""
11885 for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11886 c_switch_all="$T"
11887
11888
11889 T=""
11890 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
11891 ld_switch_general="$T"
11892
11893
11894 T=""
11895 for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11896 ld_switch_window_system="$T"
11897
11898
11899 T=""
11900 for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11901 ld_switch_all="$T"
11902
11903
11904 T=""
11905 for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11906 ld_libs_general="$T"
11907
11908
11909 T=""
11910 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
11911 ld_libs_window_system="$T"
11912
11913
11914 T=""
11915 for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11916 ld_libs_all="$T"
11917
11918
11919
11920 MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
11921 internal_makefile_list="Makefile.in"
11922 SUBDIR_MAKEFILES=''
11923 test -d lock || mkdir lock
11924 for dir in $MAKE_SUBDIR; do
11925   case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
11926         test -d "$d" || mkdir "$d"; cd "$d"
11927       done ) ;;
11928    * ) test -d "$dir" || mkdir "$dir" ;;
11929   esac
11930   
11931 T=""
11932 for W in $SUBDIR_MAKEFILES $dir/Makefile $dir/GNUmakefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11933 SUBDIR_MAKEFILES="$T"
11934
11935   
11936 T=""
11937 for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
11938 internal_makefile_list="$T"
11939
11940 done
11941
11942
11943
11944
11945 for dir in src/s src/m; do
11946   if test ! -d "$dir" ; then
11947     echo Making symbolic link to "$srcdir/$dir"
11948     ${LN_S} "$srcdir/$dir" "$dir"
11949   fi
11950 done
11951
11952 if test "$extra_verbose" = "yes"; then
11953   echo ""
11954   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
11955   echo ""
11956 fi
11957
11958 if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
11959   echo "creating src/gdbinit"; echo ""
11960   echo "source $srcdir/src/gdbinit" > src/gdbinit
11961 fi
11962
11963 if test "$__SUNPRO_C" = "yes"; then
11964   echo "creating .sbinit"; echo ""
11965   ( echo "# For use with Sun WorkShop's Source browser."
11966     echo "# See sbquery(1) and sbinit(4) for more information"
11967     for dir in $MAKE_SUBDIR; do echo "import $dir"; done
11968   ) > .sbinit
11969 fi
11970
11971 rm -f core
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988 PREFIX=$prefix
11989 while true; do
11990   case "$PREFIX" in
11991     *\$* ) eval "PREFIX=$PREFIX" ;;
11992     *) break ;;
11993   esac
11994 done
11995
11996
11997
11998 EXEC_PREFIX=$exec_prefix
11999 while true; do
12000   case "$EXEC_PREFIX" in
12001     *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
12002     *) break ;;
12003   esac
12004 done
12005
12006
12007
12008
12009 INFODIR=$infodir
12010 while true; do
12011   case "$INFODIR" in
12012     *\$* ) eval "INFODIR=$INFODIR" ;;
12013     *) break ;;
12014   esac
12015 done
12016
12017
12018
12019
12020 INFOPATH=$infopath
12021 while true; do
12022   case "$INFOPATH" in
12023     *\$* ) eval "INFOPATH=$INFOPATH" ;;
12024     *) break ;;
12025   esac
12026 done
12027
12028
12029
12030
12031 PACKAGE_PATH=$package_path
12032 while true; do
12033   case "$PACKAGE_PATH" in
12034     *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
12035     *) break ;;
12036   esac
12037 done
12038
12039
12040
12041
12042 LISPDIR=$lispdir
12043 while true; do
12044   case "$LISPDIR" in
12045     *\$* ) eval "LISPDIR=$LISPDIR" ;;
12046     *) break ;;
12047   esac
12048 done
12049
12050
12051
12052
12053
12054 ETCDIR=$etcdir
12055 while true; do
12056   case "$ETCDIR" in
12057     *\$* ) eval "ETCDIR=$ETCDIR" ;;
12058     *) break ;;
12059   esac
12060 done
12061
12062
12063
12064
12065 LOCKDIR=$lockdir
12066 while true; do
12067   case "$LOCKDIR" in
12068     *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
12069     *) break ;;
12070   esac
12071 done
12072
12073
12074
12075
12076 ARCHLIBDIR=$archlibdir
12077 while true; do
12078   case "$ARCHLIBDIR" in
12079     *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
12080     *) break ;;
12081   esac
12082 done
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104 RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
12105
12106
12107
12108
12109
12110
12111
12112 : ${XEMACS_CC:=$CC}
12113
12114
12115
12116 if test "$with_site_lisp" = "no"; then
12117   { test "$extra_verbose" = "yes" && cat << \EOF
12118     Defining INHIBIT_SITE_LISP
12119 EOF
12120 cat >> confdefs.h <<\EOF
12121 #define INHIBIT_SITE_LISP 1
12122 EOF
12123 }
12124
12125 fi
12126
12127
12128 T=""
12129 for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
12130 ac_configure_args="$T"
12131
12132 { test "$extra_verbose" = "yes" && cat << EOF
12133     Defining EMACS_CONFIGURATION = "$canonical"
12134 EOF
12135 cat >> confdefs.h <<EOF
12136 #define EMACS_CONFIGURATION "$canonical"
12137 EOF
12138 }
12139
12140 { test "$extra_verbose" = "yes" && cat << EOF
12141     Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
12142 EOF
12143 cat >> confdefs.h <<EOF
12144 #define EMACS_CONFIG_OPTIONS "$ac_configure_args"
12145 EOF
12146 }
12147
12148 { test "$extra_verbose" = "yes" && cat << EOF
12149     Defining config_machfile = "$machfile"
12150 EOF
12151 cat >> confdefs.h <<EOF
12152 #define config_machfile "$machfile"
12153 EOF
12154 }
12155
12156 { test "$extra_verbose" = "yes" && cat << EOF
12157     Defining config_opsysfile = "$opsysfile"
12158 EOF
12159 cat >> confdefs.h <<EOF
12160 #define config_opsysfile "$opsysfile"
12161 EOF
12162 }
12163
12164
12165
12166 null_string=""
12167 { test "$extra_verbose" = "yes" && cat << EOF
12168     Defining LD_SWITCH_X_SITE = $null_string
12169 EOF
12170 cat >> confdefs.h <<EOF
12171 #define LD_SWITCH_X_SITE $null_string
12172 EOF
12173 }
12174
12175 { test "$extra_verbose" = "yes" && cat << EOF
12176     Defining LD_SWITCH_X_SITE_AUX = $null_string
12177 EOF
12178 cat >> confdefs.h <<EOF
12179 #define LD_SWITCH_X_SITE_AUX $null_string
12180 EOF
12181 }
12182
12183 { test "$extra_verbose" = "yes" && cat << EOF
12184     Defining C_SWITCH_X_SITE = $null_string
12185 EOF
12186 cat >> confdefs.h <<EOF
12187 #define C_SWITCH_X_SITE $null_string
12188 EOF
12189 }
12190
12191 { test "$extra_verbose" = "yes" && cat << EOF
12192     Defining LD_SWITCH_SITE = $null_string
12193 EOF
12194 cat >> confdefs.h <<EOF
12195 #define LD_SWITCH_SITE $null_string
12196 EOF
12197 }
12198
12199 { test "$extra_verbose" = "yes" && cat << EOF
12200     Defining C_SWITCH_SITE = $null_string
12201 EOF
12202 cat >> confdefs.h <<EOF
12203 #define C_SWITCH_SITE $null_string
12204 EOF
12205 }
12206
12207
12208
12209 test -n "$puresize" && { test "$extra_verbose" = "yes" && cat << EOF
12210     Defining RAW_PURESIZE = $puresize
12211 EOF
12212 cat >> confdefs.h <<EOF
12213 #define RAW_PURESIZE $puresize
12214 EOF
12215 }
12216
12217
12218 if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12219     Defining GNU_MALLOC
12220 EOF
12221 cat >> confdefs.h <<\EOF
12222 #define GNU_MALLOC 1
12223 EOF
12224 }
12225
12226 elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12227     Defining USE_SYSTEM_MALLOC
12228 EOF
12229 cat >> confdefs.h <<\EOF
12230 #define USE_SYSTEM_MALLOC 1
12231 EOF
12232 }
12233
12234 elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
12235     Defining USE_DEBUG_MALLOC
12236 EOF
12237 cat >> confdefs.h <<\EOF
12238 #define USE_DEBUG_MALLOC 1
12239 EOF
12240 }
12241
12242                                               { test "$extra_verbose" = "yes" && cat << \EOF
12243     Defining USE_SYSTEM_MALLOC
12244 EOF
12245 cat >> confdefs.h <<\EOF
12246 #define USE_SYSTEM_MALLOC 1
12247 EOF
12248 }
12249
12250 fi
12251 test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12252     Defining I18N3
12253 EOF
12254 cat >> confdefs.h <<\EOF
12255 #define I18N3 1
12256 EOF
12257 }
12258
12259 test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12260     Defining USE_GCC
12261 EOF
12262 cat >> confdefs.h <<\EOF
12263 #define USE_GCC 1
12264 EOF
12265 }
12266
12267 test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12268     Defining EXTERNAL_WIDGET
12269 EOF
12270 cat >> confdefs.h <<\EOF
12271 #define EXTERNAL_WIDGET 1
12272 EOF
12273 }
12274
12275 test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12276     Defining NO_DOC_FILE
12277 EOF
12278 cat >> confdefs.h <<\EOF
12279 #define NO_DOC_FILE 1
12280 EOF
12281 }
12282
12283 test "$with_purify"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12284     Defining PURIFY
12285 EOF
12286 cat >> confdefs.h <<\EOF
12287 #define PURIFY 1
12288 EOF
12289 }
12290
12291 test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12292     Defining QUANTIFY
12293 EOF
12294 cat >> confdefs.h <<\EOF
12295 #define QUANTIFY 1
12296 EOF
12297 }
12298
12299 test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12300     Defining MAIL_USE_POP
12301 EOF
12302 cat >> confdefs.h <<\EOF
12303 #define MAIL_USE_POP 1
12304 EOF
12305 }
12306
12307 test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12308     Defining KERBEROS
12309 EOF
12310 cat >> confdefs.h <<\EOF
12311 #define KERBEROS 1
12312 EOF
12313 }
12314
12315 test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12316     Defining HESIOD
12317 EOF
12318 cat >> confdefs.h <<\EOF
12319 #define HESIOD 1
12320 EOF
12321 }
12322
12323 test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
12324     Defining USE_UNION_TYPE
12325 EOF
12326 cat >> confdefs.h <<\EOF
12327 #define USE_UNION_TYPE 1
12328 EOF
12329 }
12330
12331
12332
12333 (
12334 if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
12335 else
12336   echo "uname -a: `uname -a`"
12337 fi
12338 echo ""
12339 echo "$0 $quoted_arguments"
12340 ) > Installation
12341
12342 xemacs_betaname=""
12343 test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
12344
12345 (
12346 echo "
12347
12348 XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
12349
12350   Where should the build process find the source code?    $srcdir
12351   What installation prefix should install use?            $prefix
12352   What operating system and machine description files should XEmacs use?
12353         \`$opsysfile' and \`$machfile'
12354   What compiler should XEmacs be built with?              $CC $CFLAGS
12355   Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
12356   Should XEmacs use the relocating allocator for buffers? $rel_alloc
12357   What window system should XEmacs use?                   ${window_system}"
12358 if test "$with_x11" = "yes"; then
12359   echo "  Where do we find X Windows header files?                $x_includes"
12360   echo "  Where do we find X Windows libraries?                   $x_libraries"
12361 fi
12362 if test -n "$site_includes"; then
12363   echo "  Additional header files:                                $site_includes"
12364 fi
12365 if test -n "$site_libraries"; then
12366   echo "  Additional libraries:                                   $site_libraries"
12367 fi
12368 if test -n "$site_prefixes"; then
12369   echo "  Additional prefixes:                                    $site_prefixes"
12370 fi
12371 if test -n "$runpath"; then
12372   echo "  Runtime library search path:                            $runpath"
12373 fi
12374 test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
12375 test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
12376 test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
12377 if test "$with_xmu" != yes -a "$with_x11" = yes; then
12378   echo "  No Xmu; substituting equivalent routines."
12379 fi
12380
12381 if test "$with_xpm" = yes; then
12382   echo "  Compiling in support for XPM images."
12383 elif test "$with_x11" = yes; then
12384   echo "  --------------------------------------------------------------------"
12385   echo "  WARNING: Compiling without XPM support."
12386   if test "$xpm_problem" != ""; then
12387     echo "  Reason: $xpm_problem"
12388   fi
12389   echo "  WARNING: You should strongly consider installing XPM."
12390   echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
12391   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
12392   echo "  --------------------------------------------------------------------"
12393 fi
12394 if test "$with_png" = yes; then
12395   echo "  Compiling in support for PNG image handling."
12396 elif test "$window_system" != "none"; then
12397   echo "  --------------------------------------------------------------------"
12398   echo "  WARNING: Compiling without PNG image support."
12399   if test "$png_problem" != ""; then
12400     echo "  Reason: $png_problem"
12401   fi
12402   echo "  WARNING: You should strongly consider installing the PNG libraries."
12403   echo "  WARNING: Otherwise certain images and glyphs may not display."
12404   echo "  WARNING: (a copy may be found in ftp://ftp.xemacs.org/pub/xemacs/aux)"
12405   echo "  --------------------------------------------------------------------"
12406 fi
12407 test "$with_gif"   = yes && echo "  Compiling in support for (builtin) GIF image handling."
12408 test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image handling."
12409 test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image handling."
12410 test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
12411 case "$with_sound" in
12412   nas    ) echo "  Compiling in network sound (NAS) support." ;;
12413   native ) echo "  Compiling in native sound support." ;;
12414   both   ) echo "  Compiling in both network and native sound support." ;;
12415 esac
12416 test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously."
12417
12418 test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
12419 test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
12420 test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
12421
12422 test "$with_umich_ldap"      = yes && echo "  Compiling in support for LDAP (UMich libs)."
12423 test "$with_ns_ldap"         = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
12424 test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
12425
12426 test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
12427 test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
12428
12429 test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
12430 test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
12431 test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
12432 test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
12433 test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
12434 test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
12435 test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
12436 if test "$with_wnn" = yes; then
12437   echo "  Compiling in support for the WNN input method on Mule."
12438   test "$with_wnn6" = yes && echo "    Using WNN version 6."
12439 fi
12440 test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
12441
12442 test "$with_cde"      = yes && echo "  Compiling in support for CDE."
12443 test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
12444 test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
12445 test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
12446 test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
12447 test "$with_session"  != no && echo "  Compiling in support for proper session-management."
12448 case "$with_menubars" in
12449   lucid ) echo "  Using Lucid menubars." ;;
12450   motif ) echo "  Using Motif menubars."
12451           echo "  *WARNING*  The Motif menubar implementation is currently buggy."
12452           echo "             We recommend using the Lucid menubar instead."
12453           echo "             Re-run configure with --with-menubars='lucid'." ;;
12454 esac
12455 case "$with_scrollbars" in
12456   lucid    ) echo "  Using Lucid scrollbars."     ;;
12457   motif    ) echo "  Using Motif scrollbars."     ;;
12458   athena   ) echo "  Using Athena scrollbars."    ;;
12459   athena3d ) echo "  Using Athena-3d scrollbars." ;;
12460 esac
12461 case "$with_dialogs" in
12462   motif    ) echo "  Using Motif dialog boxes."     ;;
12463   athena   ) echo "  Using Athena dialog boxes."    ;;
12464   athena3d ) echo "  Using Athena-3d dialog boxes." ;;
12465 esac
12466 test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
12467 test "$with_clash_detection" = yes && \
12468   echo "  Clash detection will use \"$lockdir\" for locking files."
12469 echo "  movemail will use \"$mail_locking\" for locking mail spool files."
12470 test "$with_pop"        = yes && echo "  Using POP for mail access."
12471 test "$with_kerberos"   = yes && echo "  Using Kerberos for POP authentication."
12472 test "$with_hesiod"     = yes && echo "  Using Hesiod to get POP server host."
12473 test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
12474 test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
12475 test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
12476 test "$debug"              = yes && echo "  Compiling in extra code for debugging."
12477 test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
12478 test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
12479 if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
12480   != "no no no no no"; then
12481   echo "  WARNING: ---------------------------------------------------------"
12482   echo "  WARNING: Compiling in support for runtime error checking."
12483   echo "  WARNING: XEmacs will run noticeably more slowly as a result."
12484   echo "  WARNING: Error checking is on by default for XEmacs beta releases."
12485   echo "  WARNING: ---------------------------------------------------------"
12486 fi
12487 echo ""
12488 ) | tee -a Installation
12489 echo ""
12490
12491 echo '(setq Installation-string "' > Installation.el
12492 sed 's/"/\\"/g' Installation >> Installation.el
12493 echo '")' >> Installation.el
12494
12495
12496 # Remove any trailing slashes in these variables.
12497 test -n "$prefix" &&
12498   prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12499 test -n "$exec_prefix" &&
12500   exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
12501
12502
12503 for file in $internal_makefile_list; do
12504   test "$file" = src/Makefile.in && \
12505     file="src/Makefile.in:src/Makefile.in.in:src/depend"
12506   ac_output_files="${ac_output_files+$ac_output_files }$file"
12507 done
12508 ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
12509
12510 trap '' 1 2 15
12511
12512 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
12513
12514 test "x$prefix" = xNONE && prefix=$ac_default_prefix
12515 # Let make expand exec_prefix.
12516 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
12517
12518 # Any assignment to VPATH causes Sun make to only execute
12519 # the first set of double-colon rules, so remove it if not needed.
12520 # If there is a colon in the path, we need to keep it.
12521 if test "x$srcdir" = x.; then
12522   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
12523 fi
12524
12525 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
12526
12527 DEFS=-DHAVE_CONFIG_H
12528
12529 # Without the "./", some shells look in PATH for config.status.
12530 : ${CONFIG_STATUS=./config.status}
12531
12532 echo creating $CONFIG_STATUS
12533 rm -f $CONFIG_STATUS
12534 cat > $CONFIG_STATUS <<EOF
12535 #! /bin/sh
12536 # Generated automatically by configure.
12537 # Run this file to recreate the current configuration.
12538 # This directory was configured as follows,
12539 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
12540 #
12541 # $0 $ac_configure_args
12542 #
12543 # Compiler output produced by configure, useful for debugging
12544 # configure, is in ./config.log if it exists.
12545
12546 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
12547 for ac_option
12548 do
12549   case "\$ac_option" in
12550   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
12551     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
12552     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
12553   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
12554     echo "$CONFIG_STATUS generated by autoconf version 2.12"
12555     exit 0 ;;
12556   -help | --help | --hel | --he | --h)
12557     echo "\$ac_cs_usage"; exit 0 ;;
12558   *) echo "\$ac_cs_usage"; exit 1 ;;
12559   esac
12560 done
12561
12562 ac_given_srcdir=$srcdir
12563 ac_given_INSTALL="$INSTALL"
12564
12565 trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
12566 EOF
12567 cat >> $CONFIG_STATUS <<EOF
12568
12569 # Protect against being on the right side of a sed subst in config.status.
12570 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
12571  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
12572 $ac_vpsub
12573 $extrasub
12574 s%@CFLAGS@%$CFLAGS%g
12575 s%@CPPFLAGS@%$CPPFLAGS%g
12576 s%@CXXFLAGS@%$CXXFLAGS%g
12577 s%@DEFS@%$DEFS%g
12578 s%@LDFLAGS@%$LDFLAGS%g
12579 s%@LIBS@%$LIBS%g
12580 s%@exec_prefix@%$exec_prefix%g
12581 s%@prefix@%$prefix%g
12582 s%@program_transform_name@%$program_transform_name%g
12583 s%@bindir@%$bindir%g
12584 s%@sbindir@%$sbindir%g
12585 s%@libexecdir@%$libexecdir%g
12586 s%@datadir@%$datadir%g
12587 s%@sysconfdir@%$sysconfdir%g
12588 s%@sharedstatedir@%$sharedstatedir%g
12589 s%@localstatedir@%$localstatedir%g
12590 s%@libdir@%$libdir%g
12591 s%@includedir@%$includedir%g
12592 s%@oldincludedir@%$oldincludedir%g
12593 s%@infodir@%$infodir%g
12594 s%@mandir@%$mandir%g
12595 s%@LN_S@%$LN_S%g
12596 s%@blddir@%$blddir%g
12597 s%@CC@%$CC%g
12598 s%@CPP@%$CPP%g
12599 s%@start_flags@%$start_flags%g
12600 s%@ld_switch_shared@%$ld_switch_shared%g
12601 s%@start_files@%$start_files%g
12602 s%@ld@%$ld%g
12603 s%@lib_gcc@%$lib_gcc%g
12604 s%@RANLIB@%$RANLIB%g
12605 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
12606 s%@INSTALL_DATA@%$INSTALL_DATA%g
12607 s%@YACC@%$YACC%g
12608 s%@SET_MAKE@%$SET_MAKE%g
12609 s%@X_CFLAGS@%$X_CFLAGS%g
12610 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
12611 s%@X_LIBS@%$X_LIBS%g
12612 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
12613 s%@install_pp@%$install_pp%g
12614 s%@libs_xauth@%$libs_xauth%g
12615 s%@dnd_objs@%$dnd_objs%g
12616 s%@lwlib_objs@%$lwlib_objs%g
12617 s%@ALLOCA@%$ALLOCA%g
12618 s%@dll_ld@%$dll_ld%g
12619 s%@dll_cflags@%$dll_cflags%g
12620 s%@dll_oflags@%$dll_oflags%g
12621 s%@dll_lflags@%$dll_lflags%g
12622 s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
12623 s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
12624 s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
12625 s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
12626 s%@PROGNAME@%$PROGNAME%g
12627 s%@version@%$version%g
12628 s%@configuration@%$configuration%g
12629 s%@canonical@%$canonical%g
12630 s%@srcdir@%$srcdir%g
12631 s%@pkgdir@%$pkgdir%g
12632 s%@statedir@%$statedir%g
12633 s%@PREFIX@%$PREFIX%g
12634 s%@EXEC_PREFIX@%$EXEC_PREFIX%g
12635 s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
12636 s%@INFODIR@%$INFODIR%g
12637 s%@infopath@%$infopath%g
12638 s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
12639 s%@INFOPATH@%$INFOPATH%g
12640 s%@package_path@%$package_path%g
12641 s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
12642 s%@PACKAGE_PATH@%$PACKAGE_PATH%g
12643 s%@lispdir@%$lispdir%g
12644 s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
12645 s%@LISPDIR@%$LISPDIR%g
12646 s%@etcdir@%$etcdir%g
12647 s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
12648 s%@ETCDIR@%$ETCDIR%g
12649 s%@lockdir@%$lockdir%g
12650 s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
12651 s%@LOCKDIR@%$LOCKDIR%g
12652 s%@archlibdir@%$archlibdir%g
12653 s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
12654 s%@ARCHLIBDIR@%$ARCHLIBDIR%g
12655 s%@docdir@%$docdir%g
12656 s%@bitmapdir@%$bitmapdir%g
12657 s%@extra_objs@%$extra_objs%g
12658 s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
12659 s%@machfile@%$machfile%g
12660 s%@opsysfile@%$opsysfile%g
12661 s%@c_switch_general@%$c_switch_general%g
12662 s%@c_switch_window_system@%$c_switch_window_system%g
12663 s%@c_switch_all@%$c_switch_all%g
12664 s%@ld_switch_general@%$ld_switch_general%g
12665 s%@ld_switch_window_system@%$ld_switch_window_system%g
12666 s%@ld_switch_all@%$ld_switch_all%g
12667 s%@ld_libs_general@%$ld_libs_general%g
12668 s%@ld_libs_window_system@%$ld_libs_window_system%g
12669 s%@ld_libs_all@%$ld_libs_all%g
12670 s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
12671 s%@native_sound_lib@%$native_sound_lib%g
12672 s%@sound_cflags@%$sound_cflags%g
12673 s%@dynodump_arch@%$dynodump_arch%g
12674 s%@XEMACS_CC@%$XEMACS_CC%g
12675 s%@internal_makefile_list@%$internal_makefile_list%g
12676
12677 CEOF
12678 EOF
12679
12680 cat >> $CONFIG_STATUS <<\EOF
12681
12682 # Split the substitutions into bite-sized pieces for seds with
12683 # small command number limits, like on Digital OSF/1 and HP-UX.
12684 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
12685 ac_file=1 # Number of current file.
12686 ac_beg=1 # First line for current file.
12687 ac_end=$ac_max_sed_cmds # Line after last line for current file.
12688 ac_more_lines=:
12689 ac_sed_cmds=""
12690 while $ac_more_lines; do
12691   if test $ac_beg -gt 1; then
12692     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
12693   else
12694     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
12695   fi
12696   if test ! -s conftest.s$ac_file; then
12697     ac_more_lines=false
12698     rm -f conftest.s$ac_file
12699   else
12700     if test -z "$ac_sed_cmds"; then
12701       ac_sed_cmds="sed -f conftest.s$ac_file"
12702     else
12703       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
12704     fi
12705     ac_file=`expr $ac_file + 1`
12706     ac_beg=$ac_end
12707     ac_end=`expr $ac_end + $ac_max_sed_cmds`
12708   fi
12709 done
12710 if test -z "$ac_sed_cmds"; then
12711   ac_sed_cmds=cat
12712 fi
12713 EOF
12714
12715 cat >> $CONFIG_STATUS <<EOF
12716
12717 CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
12718 EOF
12719 cat >> $CONFIG_STATUS <<\EOF
12720 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
12721   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12722   case "$ac_file" in
12723   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12724        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12725   *) ac_file_in="${ac_file}.in" ;;
12726   esac
12727
12728   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
12729
12730   # Remove last slash and all that follows it.  Not all systems have dirname.
12731   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12732   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12733     # The file is in a subdirectory.
12734     test ! -d "$ac_dir" && mkdir "$ac_dir"
12735     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
12736     # A "../" for each directory in $ac_dir_suffix.
12737     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
12738   else
12739     ac_dir_suffix= ac_dots=
12740   fi
12741
12742   case "$ac_given_srcdir" in
12743   .)  srcdir=.
12744       if test -z "$ac_dots"; then top_srcdir=.
12745       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
12746   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
12747   *) # Relative path.
12748     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
12749     top_srcdir="$ac_dots$ac_given_srcdir" ;;
12750   esac
12751
12752   case "$ac_given_INSTALL" in
12753   [/$]*) INSTALL="$ac_given_INSTALL" ;;
12754   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
12755   esac
12756
12757   echo creating "$ac_file"
12758   rm -f "$ac_file"
12759   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
12760   case "$ac_file" in
12761   *Makefile*) ac_comsub="1i\\
12762 # $configure_input" ;;
12763   *) ac_comsub= ;;
12764   esac
12765
12766   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12767   sed -e "$ac_comsub
12768 s%@configure_input@%$configure_input%g
12769 s%@srcdir@%$srcdir%g
12770 s%@top_srcdir@%$top_srcdir%g
12771 s%@INSTALL@%$INSTALL%g
12772 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
12773 fi; done
12774 rm -f conftest.s*
12775
12776 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
12777 # NAME is the cpp macro being defined and VALUE is the value it is being given.
12778 #
12779 # ac_d sets the value in "#define NAME VALUE" lines.
12780 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
12781 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
12782 ac_dC='\3'
12783 ac_dD='%g'
12784 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
12785 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12786 ac_uB='\([      ]\)%\1#\2define\3'
12787 ac_uC=' '
12788 ac_uD='\4%g'
12789 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
12790 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
12791 ac_eB='$%\1#\2define\3'
12792 ac_eC=' '
12793 ac_eD='%g'
12794
12795 if test "${CONFIG_HEADERS+set}" != set; then
12796 EOF
12797 cat >> $CONFIG_STATUS <<EOF
12798   CONFIG_HEADERS="src/config.h lwlib/config.h"
12799 EOF
12800 cat >> $CONFIG_STATUS <<\EOF
12801 fi
12802 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
12803   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
12804   case "$ac_file" in
12805   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
12806        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
12807   *) ac_file_in="${ac_file}.in" ;;
12808   esac
12809
12810   echo creating $ac_file
12811
12812   rm -f conftest.frag conftest.in conftest.out
12813   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
12814   cat $ac_file_inputs > conftest.in
12815
12816 EOF
12817
12818 # Transform confdefs.h into a sed script conftest.vals that substitutes
12819 # the proper values into config.h.in to produce config.h.  And first:
12820 # Protect against being on the right side of a sed subst in config.status.
12821 # Protect against being in an unquoted here document in config.status.
12822 rm -f conftest.vals
12823 cat > conftest.hdr <<\EOF
12824 s/[\\&%]/\\&/g
12825 s%[\\$`]%\\&%g
12826 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
12827 s%ac_d%ac_u%gp
12828 s%ac_u%ac_e%gp
12829 EOF
12830 sed -n -f conftest.hdr confdefs.h > conftest.vals
12831 rm -f conftest.hdr
12832
12833 # This sed command replaces #undef with comments.  This is necessary, for
12834 # example, in the case of _POSIX_SOURCE, which is predefined and required
12835 # on some systems where configure will not decide to define it.
12836 cat >> conftest.vals <<\EOF
12837 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
12838 EOF
12839
12840 # Break up conftest.vals because some shells have a limit on
12841 # the size of here documents, and old seds have small limits too.
12842
12843 rm -f conftest.tail
12844 while :
12845 do
12846   ac_lines=`grep -c . conftest.vals`
12847   # grep -c gives empty output for an empty file on some AIX systems.
12848   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
12849   # Write a limited-size here document to conftest.frag.
12850   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
12851   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
12852   echo 'CEOF
12853   sed -f conftest.frag conftest.in > conftest.out
12854   rm -f conftest.in
12855   mv conftest.out conftest.in
12856 ' >> $CONFIG_STATUS
12857   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
12858   rm -f conftest.vals
12859   mv conftest.tail conftest.vals
12860 done
12861 rm -f conftest.vals
12862
12863 cat >> $CONFIG_STATUS <<\EOF
12864   rm -f conftest.frag conftest.h
12865   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
12866   cat conftest.in >> conftest.h
12867   rm -f conftest.in
12868   if cmp -s $ac_file conftest.h 2>/dev/null; then
12869     echo "$ac_file is unchanged"
12870     rm -f conftest.h
12871   else
12872     # Remove last slash and all that follows it.  Not all systems have dirname.
12873       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
12874       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
12875       # The file is in a subdirectory.
12876       test ! -d "$ac_dir" && mkdir "$ac_dir"
12877     fi
12878     rm -f $ac_file
12879     mv conftest.h $ac_file
12880   fi
12881 fi; done
12882
12883 EOF
12884 cat >> $CONFIG_STATUS <<EOF
12885 CPP="$CPP"
12886  top_srcdir="$srcdir"
12887  MAKE_SUBDIR="$MAKE_SUBDIR"
12888
12889 EOF
12890 cat >> $CONFIG_STATUS <<\EOF
12891 for dir in . $MAKE_SUBDIR; do
12892   (
12893     cd $dir
12894     rm -f junk.c
12895     < Makefile.in \
12896       sed -e '/^# Generated/d' \
12897           -e 's%/\*\*/#.*%%' \
12898           -e 's/^ *# */#/' \
12899           -e '/^##/d' \
12900           -e '/^#/ {
12901 p
12902 d
12903 }'        \
12904           -e '/./ {
12905 s/\([\"]\)/\\\1/g
12906 s/^/"/
12907 s/$/"/
12908 }'  > junk.c;
12909
12910
12911
12912     echo creating $dir/Makefile
12913 $CPP -I. -I${top_srcdir}/src  junk.c \
12914   | sed -e 's/^\#.*//'          \
12915         -e 's/^[        ][      ]*$//'\
12916         -e 's/^ /       /'              \
12917   | sed -n -e '/^..*$/p'        \
12918   | sed '/^\"/ {
12919         s/\\\([\"]\)/\1/g
12920         s/^[    ]*\"//
12921         s/\"[   ]*$//
12922 }' > Makefile.new
12923     chmod 444 Makefile.new
12924     mv -f Makefile.new Makefile
12925
12926     echo creating $dir/GNUmakefile
12927 $CPP -I. -I${top_srcdir}/src -DUSE_GNU_MAKE junk.c \
12928   | sed -e 's/^\#.*//'          \
12929         -e 's/^[        ][      ]*$//'\
12930         -e 's/^ /       /'              \
12931   | sed -n -e '/^..*$/p'        \
12932   | sed '/^\"/ {
12933         s/\\\([\"]\)/\1/g
12934         s/^[    ]*\"//
12935         s/\"[   ]*$//
12936 }' > Makefile.new
12937     chmod 444 Makefile.new
12938     mv -f Makefile.new GNUmakefile
12939
12940     rm -f junk.c
12941   )
12942 done
12943
12944 sed < config.status >> lib-src/config.values \
12945   -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
12946   -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
12947   -e 's/^\([^ ]*\) $/\1 ""/' \
12948   -e 's/ 1$/ t/'
12949
12950
12951 exit 0
12952 EOF
12953 chmod +x $CONFIG_STATUS
12954 rm -fr confdefs* $ac_clean_files
12955 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1